goods-classify.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  1. <template>
  2. <view class="container all-type-list-wrapper">
  3. <!-- 自定义顶部 -->
  4. <custom-floor :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi"></custom-floor>
  5. <view class="tui-header-screen" :style="{top:CustomBar+'px'}">
  6. <view class="tui-screen-top">
  7. <view class="tui-top-item" :class="[tabIndex ==0 ?'tui-active':'']" @tap="handleScreen" data-index="0">综合</view>
  8. <view class="tui-top-item tui-icon-ml" :class="[tabIndex==1?'tui-active':'']" data-index="1" @tap="handleScreen">
  9. <view>销量</view>
  10. <text class="iconfont icon-shangxiajiantou" v-if="isSearchSalesFirst"></text>
  11. <template v-else>
  12. <tui-icon :name="isSearchSales ? 'turningdown':'turningup'" :size="18" :color="tabIndex==1 ?'#e15616':'#999'" tui-icon-class="tui-ml"></tui-icon>
  13. </template>
  14. </view>
  15. <view class="tui-top-item tui-icon-ml" :class="[tabIndex==2?'tui-active':'']" data-index="2" @tap="handleScreen">
  16. <view>人气</view>
  17. <text class="iconfont icon-shangxiajiantou" v-if="isSearchMoodFirst"></text>
  18. <template v-else>
  19. <tui-icon :name="isSearchMood ? 'turningdown':'turningup'" :size="18" :color="tabIndex==2 ?'#e15616':'#999'" tui-icon-class="tui-ml"></tui-icon>
  20. </template>
  21. </view>
  22. <view class="tui-top-item tui-icon-ml" :class="[tabIndex==3?'tui-active':'']" data-index="3" @tap="handleScreen">
  23. <view>价格</view>
  24. <text class="iconfont icon-shangxiajiantou" v-if="isSearchPriceFirst"></text>
  25. <template v-else>
  26. <tui-icon :name="isSearchPrice ? 'turningdown':'turningup'" :size="18" :color="tabIndex==3?'#e15616':'#999'" tui-icon-class="tui-ml"></tui-icon>
  27. </template>
  28. </view>
  29. <view class="tui-top-item" @tap="handleScreen" data-index="4">
  30. <view>筛选</view>
  31. <text class="iconfont icon-shaixuan"></text>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 商品列表 -->
  36. <list-skeleton v-if="showSkeleton" :listType='0'></list-skeleton>
  37. <template v-else>
  38. <view class="empty-container" v-if="showEmpty">
  39. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"></image>
  40. <text class="error-text">{{emptyText}}</text>
  41. </view>
  42. <template v-else>
  43. <view class="container-list" :style="{'height':scrollHeight+'px',paddingTop:(CustomBar+44)+'px'}">
  44. <view v-for="(item,index) in listData" :key="index" :id="item.productId" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productId)">
  45. <image mode='widthFix' :src="item.image" class="list-img" alt="list-img"></image>
  46. <view class="list-details-info">
  47. <text class="list-details-title">
  48. <text class="mclap-tag" v-if="item.beautyActFlag == 1">美博会</text>
  49. <text class="mclap" :class="item.beautyActFlag == 1 ? 'indent' : ''">{{ item.name }}</text>
  50. </text>
  51. <text class="list-details-specs">规格:{{item.unit}}</text>
  52. <view class="list-details-specs" v-if="hasLogin && item.code!=''&&item.code!=null">商品编码:{{item.code}}</view>
  53. <view class="list-details-price" v-if="hasLogin">
  54. <template v-if="userIdentity == 3">
  55. <view class="floor-item-act" v-if="item.actStatus==1">
  56. <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
  57. {{item.promotions.name}}<text v-if="item.priceFlag != 1 && item.supplierId === shopId">:¥{{ item.price | NumFormat }}</text>
  58. </view>
  59. <view class="floor-tags" v-else>{{item.promotions.name}}</view>
  60. </view>
  61. <view class="floor-item-act" v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
  62. <view class="floor-tags">阶梯价格</view>
  63. </view>
  64. </template>
  65. <template v-else>
  66. <view class="floor-item-act" v-if="item.actStatus==1">
  67. <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
  68. {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != 1">:¥{{ item.price | NumFormat }}</text>
  69. </view>
  70. <view class="floor-tags" v-else>{{item.promotions.name}}</view>
  71. </view>
  72. <view class="floor-item-act" v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
  73. <view class="floor-tags">阶梯价格</view>
  74. </view>
  75. </template>
  76. <view v-if="hasLogin" class="list-price">
  77. <template v-if="userIdentity == 1">
  78. <text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
  79. <template v-else>
  80. <text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  81. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  82. </text>
  83. </template>
  84. </template>
  85. <template v-if="userIdentity == 4">
  86. <view class="price-larger" v-if="item.priceFlag == 1">
  87. <text class="txt">¥未公开价格</text>
  88. </view>
  89. <view class="price-larger" v-if="item.priceFlag == 1">
  90. <text class="txt">¥价格仅会员可见</text>
  91. </view>
  92. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  93. <template v-else>
  94. <text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  95. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  96. </text>
  97. </template>
  98. </template>
  99. <template v-if="userIdentity == 3">
  100. <template v-if="item.supplierId === shopId">
  101. <view class="price-larger" v-if="item.priceFlag == 1">
  102. <text class="txt">¥未公开价格</text>
  103. </view>
  104. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  105. <text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  106. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  107. </text>
  108. </template>
  109. <template v-else>
  110. <view class="list-login-now">
  111. <text class="p-no">¥</text>
  112. <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
  113. </view>
  114. </template>
  115. </template>
  116. <template v-if="userIdentity == 2">
  117. <view class="price-larger" v-if="item.priceFlag == 1">
  118. <text class="txt">¥未公开价格</text>
  119. </view>
  120. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  121. <template v-else>
  122. <text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  123. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  124. </text>
  125. </template>
  126. </template>
  127. </view>
  128. <view v-else class="list-login-now service_none">
  129. <text class="p-no">¥</text>
  130. <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <!--加载loadding-->
  136. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  137. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text='nomoreText'></tui-nomore>
  138. <!--加载loadding-->
  139. </view>
  140. </template>
  141. </template>
  142. <!--右抽屉-->
  143. <tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
  144. <view class="drawer-container clearfix" :style="{paddingTop:CustomBar+'px'}">
  145. <view class="drawer-title">{{ classData.name }}</view>
  146. <view class="drawer-main">
  147. <template v-if="classData.smallTypeList">
  148. <view class="drawer-item-cell" v-for="(item,index) in classData.smallTypeList" :key="index">
  149. <view class="drawer-item-title">{{ item.name }}</view>
  150. <view class="drawer-item-main" v-if="item.tinyTypeList">
  151. <text class="drawer-item-text" :class="tiny.isChecked ? 'checked' : ''" v-for="(tiny,tinyIndex) in item.tinyTypeList" :key="tinyIndex" @click="SearchCondition(3,item,tiny)">{{ tiny.name }}</text>
  152. </view>
  153. <view class="drawer-item-main" v-else>
  154. <text class="drawer-item-text" :class="item.isChecked ? 'checked' : ''" @click="SearchCondition(2,item)">全部商品</text>
  155. </view>
  156. </view>
  157. </template>
  158. <template v-else>
  159. <view class="drawer-item-cell">
  160. <view class="drawer-item-main none">
  161. <text class="drawer-item-text" :class="classData.isChecked ? 'checked' : ''" @click="SearchCondition(1,classData)">全部商品</text>
  162. </view>
  163. </view>
  164. </template>
  165. </view>
  166. <view class="drawer-input btn" :style="{bottom :isIphoneX ? '68rpx' : '34rpx'}">
  167. <view class="drawer-btn clear" @click="closeDrawer">取消</view>
  168. <view class="drawer-btn comfrim" @click="handSearchList">确定</view>
  169. </view>
  170. </view>
  171. </tui-drawer>
  172. <!-- 透明模态层 -->
  173. <modal-layer v-if='isModallayer'></modal-layer>
  174. </view>
  175. </template>
  176. <script>
  177. import { mapState,mapMutations} from 'vuex';
  178. import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
  179. import customFloor from '@/components/cm-custom/custom-floor' //自定义导航
  180. import uniGrader from '@/components/uni-grade/uni-grade.vue'
  181. import modalLayer from "@/components/modal-layer"
  182. import authorize from '@/common/config/authorize.js'
  183. import wxLogin from "@/common/config/wxLogin.js"
  184. const defaultListQuery = {
  185. id:0,
  186. identity:0,
  187. pageNum:1,
  188. pageSize:10,
  189. sortField:'',
  190. sortType:1,
  191. idType:0,//一级
  192. };
  193. export default{
  194. components:{
  195. customFloor,
  196. listSkeleton,
  197. uniGrader,
  198. modalLayer
  199. },
  200. data(){
  201. return{
  202. shopId:0,
  203. tabIndex:0,
  204. isModallayer:false,
  205. isSearchSalesFirst:true,
  206. isSearchMoodFirst:true,
  207. isSearchPriceFirst:true,
  208. isSearchSales:true,
  209. isSearchMood:true,
  210. isSearchPrice:true,
  211. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  212. systeminfo: this.setSysteminfo(), //获取设备信息
  213. CustomBar:this.CustomBar,// 顶部导航栏高度
  214. isIphoneX:this.$store.state.isIphoneX,
  215. emptyText: '该分类暂时还没有商品哟,去逛逛别的吧~',
  216. isRequest:false,
  217. showSkeleton: true,
  218. showEmpty: false,
  219. userId: 0,
  220. userIdentity:'',
  221. listData: [],
  222. windowHeight: '',
  223. scrollHeight: '',
  224. listQuery:Object.assign({}, defaultListQuery),
  225. priceLoading:true,
  226. loadding: false,
  227. pullUpOn: true,
  228. pullFlag: true,
  229. totalPage: 0,
  230. nomoreText: '上拉显示更多',
  231. rightDrawer: false,
  232. classifyType:0,
  233. classData:{},
  234. searchCheckedId:null
  235. }
  236. },
  237. computed: {
  238. ...mapState(['hasLogin','userInfo','identity','isWxAuthorize'])
  239. },
  240. onLoad(option) {
  241. console.log(option)
  242. if(option.type =='share'){
  243. wxLogin.wxLoginAuthorize()
  244. }
  245. this.SetScrollHeight()
  246. this.InitOption(option)
  247. },
  248. filters: {
  249. NumFormat:function(text) {//处理金额
  250. return Number(text).toFixed(2);
  251. },
  252. },
  253. methods:{
  254. InitOption(option) {
  255. this.listQuery.id = option.id;
  256. this.listQuery.identity = this.identity;
  257. this.listQuery.idType = this.classifyType = Number(option.classType);
  258. uni.setNavigationBarTitle({title:option.title});
  259. this.$api.getComStorage('userInfo').then((resolve) =>{
  260. this.userId = resolve.userId ? resolve.userId : 0
  261. this.shopId = resolve.shopId ? resolve.shopId : 0
  262. this.userIdentity = resolve.userIdentity
  263. this.isRequest = true
  264. this.GetProductListInfo()
  265. this.GetProductOneClassly()
  266. }).catch(error =>{
  267. this.GetProductListInfo()
  268. this.GetProductOneClassly()
  269. })
  270. console.log(this.classifyID)
  271. },
  272. GetProductOneClassly(){//根据分类ID 查询二三级分类
  273. this.CommonService.GetProductOneClassly(
  274. {
  275. typeId:this.listQuery.id,
  276. idType:this.classifyType,
  277. source :'crm',
  278. }
  279. )
  280. .then(response =>{
  281. this.classData = response.data
  282. })
  283. .catch(error =>{
  284. this.$util.msg(error.msg,2000)
  285. })
  286. },
  287. GetProductListInfo(){//查询分类商品列表
  288. this.listQuery.pageNum = 1
  289. this.ProductService.GetSearchProductTypeData(this.listQuery).then(response =>{
  290. const resData = JSON.parse(response.data);
  291. const resList = resData.items;
  292. this.showSkeleton = false
  293. if(resList && resList.length > 0){
  294. this.showEmpty = false
  295. this.totalPage = resData.total;
  296. this.listData = [...resList];
  297. this.GetProductPrice()
  298. // 防上拉暴滑
  299. this.pullFlag = false;
  300. setTimeout(()=>{ this.pullFlag = true; },500)
  301. // 底部提示文案
  302. if(this.totalPage>this.listData.length) {
  303. this.pullUpOn = false
  304. this.nomoreText = '上拉显示更多'
  305. } else {
  306. if(this.listData.length>4){
  307. this.pullUpOn = false
  308. this.loadding = false
  309. this.nomoreText = '已至底部'
  310. }else{
  311. this.pullUpOn = true
  312. this.loadding = false
  313. this.nomoreText = '已至底部'
  314. }
  315. }
  316. console.log(this.listData)
  317. } else {
  318. this.showEmpty = true;
  319. }
  320. }).catch(error =>{
  321. this.$util.msg(error.msg,2000);
  322. })
  323. },
  324. GetOnReachBottomData(){//上拉加载
  325. this.listQuery.pageNum += 1
  326. this.ProductService.GetSearchProductTypeData(this.listQuery).then(response =>{
  327. const resData = JSON.parse(response.data);
  328. const resList = resData.items;
  329. this.totalPage = resData.total;
  330. this.listData = [...this.listData,...resList];
  331. this.GetProductPrice()
  332. // 防上拉暴滑
  333. this.pullFlag = false;
  334. setTimeout(()=>{ this.pullFlag = true; },500)
  335. // 底部提示文案
  336. if(this.totalPage>this.listData.length) {
  337. this.pullUpOn = false
  338. this.nomoreText = '上拉显示更多'
  339. } else {
  340. this.pullUpOn = false
  341. this.loadding = false
  342. this.nomoreText = '已至底部'
  343. }
  344. }).catch(error =>{
  345. this.$util.msg(error.msg,2000);
  346. })
  347. },
  348. GetProductPrice(){//获取价格
  349. let productIdArr = [];
  350. this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
  351. productIdArr.push(item.productId)
  352. })
  353. this.priceLoading = true;
  354. this.productIds = productIdArr.join(",");
  355. this.ProductService.querySearchProductPrice({userId: this.userId,productIds:this.productIds}).then(response =>{
  356. if(response.data) {
  357. this.listData = this.ReturnNewProducts(this.listData,response.data);
  358. }
  359. this.priceLoading = false;
  360. }).catch(error =>{
  361. this.$util.msg(error.msg,2000)
  362. })
  363. },
  364. ReturnNewProducts(Array,list){//处理对应商品ID的商品价格
  365. let NewArray = []
  366. Array.map(item=>{
  367. for (let i = 0; i < list.length; i++) {
  368. if( item.productId == list[i].productId ){
  369. NewArray.push(Object.assign(item,list[i]))
  370. }
  371. }
  372. });
  373. return NewArray
  374. },
  375. handleScreen(e) {
  376. let index = e.currentTarget.dataset.index;
  377. console.log(index)
  378. if (index == 0) {
  379. this.tabIndex = 0
  380. this.isSearchSalesFirst = true
  381. this.isSearchMoodFirst = true
  382. this.isSearchPriceFirst = true
  383. this.listQuery.sortType = 1
  384. this.listQuery.sortField = ''
  385. } else if (index == 1) {
  386. this.tabIndex = 1
  387. this.isSearchSalesFirst = false
  388. this.isSearchMoodFirst = true
  389. this.isSearchPriceFirst = true
  390. this.isSearchSales = !this.isSearchSales
  391. if(this.isSearchSales){
  392. this.listQuery.sortType = 1
  393. }else{
  394. this.listQuery.sortType = 0
  395. }
  396. this.listQuery.sortField = 'p_sales'
  397. } else if (index == 2) {
  398. this.tabIndex = 2
  399. this.isSearchSalesFirst = true
  400. this.isSearchPriceFirst = true
  401. this.isSearchMoodFirst= false
  402. this.isSearchMood = !this.isSearchMood
  403. if(this.isSearchMood){
  404. this.listQuery.sortType = 1
  405. }else{
  406. this.listQuery.sortType = 0
  407. }
  408. this.listQuery.sortField = 'p_favorite'
  409. } else if (index == 3) {
  410. this.tabIndex = 3
  411. this.isSearchSalesFirst = true
  412. this.isSearchMoodFirst = true
  413. this.isSearchPriceFirst= false
  414. this.isSearchPrice = !this.isSearchPrice
  415. if(this.isSearchPrice){
  416. this.listQuery.sortType = 1
  417. }else{
  418. this.listQuery.sortType = 0
  419. }
  420. this.listQuery.sortField = 'p_price'
  421. } else if (index == 4) {
  422. this.searchClickFn()
  423. }
  424. this.GetProductListInfo()
  425. },
  426. handSearchList(){//确定筛选
  427. if(this.searchCheckedId == ''){
  428. this.listQuery.id = this.classData.bigTypeID
  429. }else{
  430. this.listQuery.id = this.searchCheckedId
  431. }
  432. this.leftDrawer = false;
  433. this.rightDrawer = false;
  434. this.GetProductListInfo()
  435. },
  436. SearchCondition(type,item,tiny){//选择筛选分类
  437. this.listQuery.idType = type;
  438. const { classData, classData: { smalltypeList } } = this;
  439. classData.isChecked = false;
  440. if(smalltypeList && smalltypeList.length > 0) {
  441. smalltypeList.forEach((item, index) => {
  442. item.isChecked = false;
  443. const { tinytypeList } = item;
  444. if(tinytypeList && tinytypeList.length > 0) {
  445. tinytypeList.forEach((tinyItem, tinyIndex) => {
  446. tinyItem.isChecked = false;
  447. })
  448. }
  449. });
  450. }
  451. switch(type){
  452. case 1:
  453. console.log('1级分类全部商品',item);
  454. item.isChecked = !item.isChecked
  455. this.searchCheckedId = item.bigTypeId
  456. break;
  457. case 2:
  458. console.log('2级分类全部商品',item);
  459. item.isChecked = !item.isChecked
  460. if(item.isChecked){
  461. this.searchCheckedId = item.smallTypeId
  462. }else{
  463. this.searchCheckedId = ''
  464. }
  465. break;
  466. case 3:
  467. console.log('3级分类',tiny);
  468. tiny.isChecked = !tiny.isChecked
  469. if(tiny.isChecked){
  470. this.searchCheckedId = tiny.tinyTypeId
  471. }else{
  472. this.searchCheckedId = ''
  473. }
  474. break;
  475. }
  476. },
  477. navToDetailPage(id) {
  478. this.isModallayer = true;
  479. this.$api.navigateTo(`/pages/goods/product?id=${id}`);
  480. this.isModallayer = false;
  481. },
  482. PromotionsFormat(promo){//促销活动类型数据处理
  483. if(promo!=null){
  484. if(promo.type == 1 && promo.mode == 1){
  485. return true
  486. }else{
  487. return false
  488. }
  489. }
  490. return false
  491. },
  492. SetScrollHeight() {
  493. const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
  494. this.windowHeight = windowHeight - 1;
  495. this.scrollHeight = windowHeight - 1;
  496. },
  497. setHeaderBtnPosi(){
  498. // 获得胶囊按钮位置信息
  499. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  500. return headerBtnPosi
  501. },
  502. searchClickFn() {//弹出抽屉
  503. this.rightDrawer = true;
  504. },
  505. closeDrawer(e) {//关闭抽屉
  506. this.leftDrawer = false;
  507. this.rightDrawer = false;
  508. },
  509. setSysteminfo(){
  510. let systeminfo;
  511. uni.getSystemInfo({ // 获取设备信息
  512. success: (res) => {
  513. systeminfo = res
  514. },
  515. })
  516. return systeminfo
  517. },
  518. },
  519. onPullDownRefresh() {
  520. setTimeout(() => {
  521. this.GetProductListInfo()
  522. uni.stopPullDownRefresh()
  523. }, 200)
  524. },
  525. onReachBottom() {
  526. if(this.totalPage>this.listData.length) {
  527. this.loadding = true
  528. this.pullUpOn = true
  529. this.GetOnReachBottomData()
  530. }
  531. },
  532. onShareAppMessage(res){//分享转发
  533. if (res.from === 'button') {
  534. // 来自页面内转发按钮
  535. }
  536. return {
  537. title: `点击查看“${this.classData.name}”相关的商品`,
  538. path: `pages/goods/goods-classify?type=share&classType=${this.classifyType}&id=${this.listQuery.id}&title=${this.classData.name}`
  539. }
  540. },
  541. onShow() {
  542. }
  543. }
  544. </script>
  545. <style lang="scss">
  546. page {
  547. background: #FFFFFF;
  548. .all-type-list-wrapper {
  549. display: flex;
  550. flex-direction: column;
  551. }
  552. }
  553. .container-list{
  554. width: 100%;
  555. height: auto;
  556. }
  557. .all-type-list-content {
  558. height: 216rpx;
  559. padding: 24rpx;
  560. background: #fff;
  561. margin-bottom: 2rpx;
  562. display: flex;
  563. flex-direction: row;
  564. box-sizing: content-box;
  565. .list-img {
  566. width: 210rpx;
  567. height: 218rpx !important;
  568. margin-right: 26rpx;
  569. border-radius: 10rpx;
  570. border: 2rpx solid #f3f3f3;
  571. }
  572. }
  573. .list-details-info {
  574. width: 466rpx;
  575. display: flex;
  576. flex-direction: column;
  577. font-size: 26rpx;
  578. position: relative;
  579. .list-details-title {
  580. position: relative;
  581. .mclap{
  582. line-height: 38rpx;
  583. text-overflow: ellipsis;
  584. overflow: hidden;
  585. display: -webkit-box;
  586. -webkit-line-clamp: 2;
  587. line-clamp: 2;
  588. -webkit-box-orient: vertical;
  589. &.indent{
  590. text-indent: 95rpx;
  591. }
  592. }
  593. .mclap-tag{
  594. display: block;
  595. width: 84rpx;
  596. height: 32rpx;
  597. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  598. border-radius: 4rpx 48rpx 4px 4px;
  599. line-height: 32rpx;
  600. font-size: $font-size-22;
  601. color: #FFFFFF;
  602. text-align: center;
  603. position: absolute;
  604. left: 0;
  605. top: 0;
  606. }
  607. }
  608. .list-details-specs {
  609. margin-top: 8rpx;
  610. color: #666666;
  611. }
  612. .list-details-miniQuantity {
  613. margin-top: 7rpx;
  614. }
  615. }
  616. .list-details-price {
  617. width: 100%;
  618. height: 54rpx;
  619. line-height: 54rpx;
  620. position: absolute;
  621. bottom: -10rpx;
  622. right: 0;
  623. .floor-item-act{
  624. height: 54rpx;
  625. text-align: center;
  626. box-sizing: border-box;
  627. float: right;
  628. .floor-tags{
  629. height: 28rpx;
  630. border-radius: 6rpx;
  631. background-color: #FFFFFF;
  632. line-height: 28rpx;
  633. color: $color-system;
  634. text-align: center;
  635. display: inline-block;
  636. padding:0 16rpx;
  637. font-size: $font-size-20;
  638. margin-left: 15rpx;
  639. border: 1px solid #E15616;
  640. }
  641. }
  642. .price-icon {
  643. width: 22rpx;
  644. height: 28rpx;
  645. vertical-align: middle;
  646. margin-right: 10rpx;
  647. }
  648. .price-icon + text {
  649. font-size: 25rpx;
  650. vertical-align: middle;
  651. }
  652. .list-login-now {
  653. color: #F8C499;
  654. float: left;
  655. line-height: 54rpx;
  656. .p-no{
  657. float: left;
  658. font-size: $font-size-24;
  659. color: $text-color;
  660. }
  661. }
  662. .login-now {
  663. padding: 10rpx 10rpx 10rpx 0;
  664. }
  665. .list-price {
  666. color: #FF2A2A;
  667. height: 44rpx;
  668. float: left;
  669. .price-larger {
  670. width: 100%;
  671. height: 44rpx;
  672. font-size: 32rpx;
  673. &.none{
  674. text-decoration: line-through;
  675. color: #999999;
  676. }
  677. &.small{
  678. font-size: $font-size-24;
  679. }
  680. .txt{
  681. font-size: $font-size-24;
  682. display: inline-block;
  683. line-height: 44rpx;
  684. text-align: left;
  685. float: left;
  686. }
  687. }
  688. }
  689. .add-cart-btn {
  690. width: 156rpx;
  691. height: 64rpx;
  692. line-height: 64rpx;
  693. border-radius: 32rpx;
  694. color: #fff;
  695. font-size: 26rpx;
  696. margin-right: 0;
  697. background:linear-gradient(45deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
  698. }
  699. }
  700. /*screen*/
  701. .tui-header-screen {
  702. width: 100%;
  703. box-sizing: border-box;
  704. background: #fff;
  705. position: fixed;
  706. z-index: 1000;
  707. /* padding-top: 12rpx; */
  708. }
  709. .tui-screen-top,
  710. .tui-screen-bottom {
  711. display: flex;
  712. align-items: center;
  713. justify-content: space-between;
  714. font-size: 28rpx;
  715. color: #999999;
  716. }
  717. .tui-screen-top {
  718. height: 88rpx;
  719. position: relative;
  720. background: #fff;
  721. border-bottom: 1px solid #EFEFEF;
  722. }
  723. .tui-top-item {
  724. height: 28rpx;
  725. line-height: 28rpx;
  726. flex: 1;
  727. display: flex;
  728. align-items: center;
  729. justify-content: center;
  730. }
  731. .icon-shangxiajiantou{
  732. font-size: 20rpx;
  733. color: #999999;
  734. margin-left: 8rpx;
  735. }
  736. .tui-topitem-active {
  737. color: #e15616;
  738. }
  739. .tui-screen-bottom {
  740. height: 100rpx;
  741. padding: 0 30rpx;
  742. box-sizing: border-box;
  743. font-size: 24rpx;
  744. align-items: center;
  745. overflow: hidden;
  746. }
  747. .tui-bottom-text {
  748. line-height: 26rpx;
  749. max-width: 82%;
  750. white-space: nowrap;
  751. overflow: hidden;
  752. text-overflow: ellipsis;
  753. }
  754. .tui-bottom-item {
  755. flex: 1;
  756. width: 0;
  757. display: flex;
  758. align-items: center;
  759. justify-content: center;
  760. padding: 0 12rpx;
  761. box-sizing: border-box;
  762. background: #f7f7f7;
  763. margin-right: 20rpx;
  764. white-space: nowrap;
  765. height: 60rpx;
  766. border-radius: 40rpx;
  767. }
  768. .tui-bottom-item:last-child {
  769. margin-right: 0;
  770. }
  771. .tui-btmItem-active {
  772. background: #fcedea !important;
  773. color: #e15616;
  774. font-weight: bold;
  775. position: relative;
  776. }
  777. .tui-btmItem-active::after {
  778. content: "";
  779. position: absolute;
  780. border: 1rpx solid #e15616;
  781. width: 100%;
  782. height: 100%;
  783. border-radius: 40rpx;
  784. left: 0;
  785. top: 0;
  786. }
  787. .tui-btmItem-tap {
  788. position: relative;
  789. border-bottom-left-radius: 0;
  790. border-bottom-right-radius: 0;
  791. }
  792. .tui-btmItem-tap::after {
  793. content: "";
  794. position: absolute;
  795. width: 100%;
  796. height: 22rpx;
  797. background: #f7f7f7;
  798. left: 0;
  799. top: 58rpx;
  800. }
  801. .tui-active {
  802. color: #e15616;
  803. }
  804. .tui-icon-ml .tui-icon-class {
  805. margin-left: 6rpx;
  806. }
  807. .tui-ml {
  808. margin-left: 6rpx;
  809. }
  810. .tui-seizeaseat-20 {
  811. height: 20rpx;
  812. }
  813. .tui-seizeaseat-30 {
  814. height: 30rpx;
  815. }
  816. .tui-icon-middle .tui-icon-class {
  817. vertical-align: middle;
  818. }
  819. .tui-middle {
  820. vertical-align: middle;
  821. }
  822. /*screen*/
  823. .drawer-container {
  824. width: 560rpx;
  825. height: 100%;
  826. padding: 80rpx 0;
  827. box-sizing: border-box;
  828. .drawer-title{
  829. width: 100%;
  830. height: 72rpx;
  831. line-height: 72rpx;
  832. box-sizing: border-box;
  833. padding: 0 30rpx;
  834. text-align: left;
  835. font-size: $font-size-26;
  836. color: #e15616;
  837. font-weight: bold;
  838. background-color: #F7F7F7;
  839. }
  840. .drawer-main{
  841. width: 100%;
  842. height: auto;
  843. box-sizing: border-box;
  844. padding: 0 30rpx;
  845. .drawer-item-cell{
  846. width: 100%;
  847. height: auto;
  848. float: left;
  849. .drawer-item-title{
  850. width: 100%;
  851. height: 82rpx;
  852. line-height: 82rpx;
  853. text-align: left;
  854. font-size: $font-size-26;
  855. color: $text-color;
  856. float: left;
  857. }
  858. .drawer-item-main{
  859. width: 100%;
  860. height: auto;
  861. float: left;
  862. &.none{
  863. margin-top: 24rpx;
  864. }
  865. .drawer-item-text{
  866. display: inline-block;
  867. float: left;
  868. padding: 0 30rpx;
  869. height: 56rpx;
  870. border-radius: 28rpx;
  871. background-color: #F7F7F7;
  872. line-height: 56rpx;
  873. text-align: center;
  874. color: #999999;
  875. font-size: $font-size-26;
  876. margin-right: 24rpx;
  877. margin-bottom: 24rpx;
  878. &.checked{
  879. background-color: #fef6f3;
  880. color: $color-system;
  881. }
  882. }
  883. }
  884. }
  885. }
  886. .drawer-input{
  887. width: 100%;
  888. height: 80rpx;
  889. float: left;
  890. box-sizing: border-box;
  891. padding: 0 10rpx;
  892. border: 1px solid rgba(0,0,0,0.2);
  893. border-radius: 4rpx;
  894. margin-bottom: 30rpx;
  895. position: relative;
  896. &.btn{
  897. border: none;
  898. margin-top: 40rpx;
  899. display: flex;
  900. position: absolute;
  901. left: 0;
  902. }
  903. .drawer-btn{
  904. width: 210rpx;
  905. height: 84rpx;
  906. border-radius: 42rpx;
  907. background: $btn-confirm;
  908. line-height: 84rpx;
  909. text-align: center;
  910. font-size: $font-size-26;
  911. color: #FFFFFF;
  912. flex: 1;
  913. margin: 0 10rpx;
  914. &.comfrim{
  915. background: $btn-confirm;
  916. }
  917. &.clear{
  918. background: #e1e1e1;
  919. }
  920. }
  921. }
  922. }
  923. </style>