goods-classify.vue 26 KB

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