goods-classify.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  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">
  48. <text class="mclap-tag" v-if="item.p_act_flag == '1'">美博会</text>
  49. <text class="mclap" :class="item.p_act_flag =='1' ? 'indent' : ''">{{ item.p_name }}</text>
  50. </text>
  51. <text class="list-details-specs">规格:{{item.p_unit}}</text>
  52. <view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">商品编码:{{item.p_code}}</view>
  53. <view class="list-details-price">
  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.p_price_flag != '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.p_price_flag != '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.p_price_flag == '1'">
  87. <text class="txt">¥未公开价格</text>
  88. </view>
  89. <view class="price-larger" v-if="item.p_price_flag == '2'">
  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.p_price_flag == '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.p_price_grade)"></uni-grader>
  113. </view>
  114. </template>
  115. </template>
  116. <template v-if="userIdentity == 2">
  117. <view class="price-larger" v-if="item.p_price_flag == '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">
  129. <text class="p-no">¥</text>
  130. <uni-grader :grade="Number(item.p_price_grade)"></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. pageNum:1,
  187. pageSize:10,
  188. sortField:'',
  189. sortType:1,
  190. idType:0,//一级
  191. };
  192. export default{
  193. components:{
  194. customFloor,
  195. listSkeleton,
  196. uniGrader,
  197. modalLayer
  198. },
  199. data(){
  200. return{
  201. shopID:0,
  202. tabIndex:0,
  203. isModallayer:false,
  204. isSearchSalesFirst:true,
  205. isSearchMoodFirst:true,
  206. isSearchPriceFirst:true,
  207. isSearchSales:true,
  208. isSearchMood:true,
  209. isSearchPrice:true,
  210. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  211. systeminfo: this.setSysteminfo(), //获取设备信息
  212. CustomBar:this.CustomBar,// 顶部导航栏高度
  213. isIphoneX:this.$store.state.isIphoneX,
  214. emptyText: '该分类暂时还没有商品哟,去逛逛别的吧~',
  215. isRequest:false,
  216. showSkeleton: true,
  217. showEmpty: false,
  218. userID: 0,
  219. userIdentity:'',
  220. listData: [],
  221. windowHeight: '',
  222. scrollHeight: '',
  223. listQuery:Object.assign({}, defaultListQuery),
  224. priceLoading:true,
  225. loadding: false,
  226. pullUpOn: true,
  227. pullFlag: true,
  228. totalPage: 0,
  229. nomoreText: '上拉显示更多',
  230. rightDrawer: false,
  231. classifyType:0,
  232. classData:{},
  233. searchCheckedId:null
  234. }
  235. },
  236. computed: {
  237. ...mapState(['hasLogin','userInfo','identity','isWxAuthorize'])
  238. },
  239. onLoad(option) {
  240. console.log(option)
  241. if(option.type =='share'){
  242. if(this.isWxAuthorize){
  243. wxLogin.wxLoginAuthorize()
  244. }else{
  245. console.log(new Date +'用户未授权微信信息')
  246. }
  247. }
  248. this.SetScrollHeight()
  249. this.InitOption(option)
  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. position: relative;
  575. .mclap{
  576. line-height: 38rpx;
  577. text-overflow: ellipsis;
  578. overflow: hidden;
  579. display: -webkit-box;
  580. -webkit-line-clamp: 2;
  581. line-clamp: 2;
  582. -webkit-box-orient: vertical;
  583. &.indent{
  584. text-indent: 95rpx;
  585. }
  586. }
  587. .mclap-tag{
  588. display: block;
  589. width: 84rpx;
  590. height: 32rpx;
  591. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  592. border-radius: 4rpx 48rpx 4px 4px;
  593. line-height: 32rpx;
  594. font-size: $font-size-22;
  595. color: #FFFFFF;
  596. text-align: center;
  597. position: absolute;
  598. left: 0;
  599. top: 0;
  600. }
  601. }
  602. .list-details-specs {
  603. margin-top: 8rpx;
  604. color: #666666;
  605. }
  606. .list-details-miniQuantity {
  607. margin-top: 7rpx;
  608. }
  609. }
  610. .list-details-price {
  611. width: 100%;
  612. height: 54rpx;
  613. line-height: 54rpx;
  614. position: absolute;
  615. bottom: -10rpx;
  616. right: 0;
  617. .floor-item-act{
  618. height: 54rpx;
  619. text-align: center;
  620. box-sizing: border-box;
  621. float: right;
  622. .floor-tags{
  623. height: 28rpx;
  624. border-radius: 6rpx;
  625. background-color: #FFFFFF;
  626. line-height: 28rpx;
  627. color: $color-system;
  628. text-align: center;
  629. display: inline-block;
  630. padding:0 16rpx;
  631. font-size: $font-size-20;
  632. margin-left: 15rpx;
  633. border: 1px solid #E15616;
  634. }
  635. }
  636. .price-icon {
  637. width: 22rpx;
  638. height: 28rpx;
  639. vertical-align: middle;
  640. margin-right: 10rpx;
  641. }
  642. .price-icon + text {
  643. font-size: 25rpx;
  644. vertical-align: middle;
  645. }
  646. .list-login-now {
  647. color: #F8C499;
  648. float: left;
  649. line-height: 54rpx;
  650. .p-no{
  651. float: left;
  652. font-size: $font-size-24;
  653. color: $text-color;
  654. }
  655. }
  656. .login-now {
  657. padding: 10rpx 10rpx 10rpx 0;
  658. }
  659. .list-price {
  660. color: #FF2A2A;
  661. height: 44rpx;
  662. float: left;
  663. .price-larger {
  664. width: 100%;
  665. height: 44rpx;
  666. font-size: 32rpx;
  667. &.none{
  668. text-decoration: line-through;
  669. color: #999999;
  670. }
  671. &.small{
  672. font-size: $font-size-24;
  673. }
  674. .txt{
  675. font-size: $font-size-24;
  676. display: inline-block;
  677. line-height: 44rpx;
  678. text-align: left;
  679. float: left;
  680. }
  681. }
  682. }
  683. .add-cart-btn {
  684. width: 156rpx;
  685. height: 64rpx;
  686. line-height: 64rpx;
  687. border-radius: 32rpx;
  688. color: #fff;
  689. font-size: 26rpx;
  690. margin-right: 0;
  691. background:linear-gradient(45deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
  692. }
  693. }
  694. /*screen*/
  695. .tui-header-screen {
  696. width: 100%;
  697. box-sizing: border-box;
  698. background: #fff;
  699. position: fixed;
  700. z-index: 1000;
  701. /* padding-top: 12rpx; */
  702. }
  703. .tui-screen-top,
  704. .tui-screen-bottom {
  705. display: flex;
  706. align-items: center;
  707. justify-content: space-between;
  708. font-size: 28rpx;
  709. color: #999999;
  710. }
  711. .tui-screen-top {
  712. height: 88rpx;
  713. position: relative;
  714. background: #fff;
  715. border-bottom: 1px solid #EFEFEF;
  716. }
  717. .tui-top-item {
  718. height: 28rpx;
  719. line-height: 28rpx;
  720. flex: 1;
  721. display: flex;
  722. align-items: center;
  723. justify-content: center;
  724. }
  725. .icon-shangxiajiantou{
  726. font-size: 20rpx;
  727. color: #999999;
  728. margin-left: 8rpx;
  729. }
  730. .tui-topitem-active {
  731. color: #e15616;
  732. }
  733. .tui-screen-bottom {
  734. height: 100rpx;
  735. padding: 0 30rpx;
  736. box-sizing: border-box;
  737. font-size: 24rpx;
  738. align-items: center;
  739. overflow: hidden;
  740. }
  741. .tui-bottom-text {
  742. line-height: 26rpx;
  743. max-width: 82%;
  744. white-space: nowrap;
  745. overflow: hidden;
  746. text-overflow: ellipsis;
  747. }
  748. .tui-bottom-item {
  749. flex: 1;
  750. width: 0;
  751. display: flex;
  752. align-items: center;
  753. justify-content: center;
  754. padding: 0 12rpx;
  755. box-sizing: border-box;
  756. background: #f7f7f7;
  757. margin-right: 20rpx;
  758. white-space: nowrap;
  759. height: 60rpx;
  760. border-radius: 40rpx;
  761. }
  762. .tui-bottom-item:last-child {
  763. margin-right: 0;
  764. }
  765. .tui-btmItem-active {
  766. background: #fcedea !important;
  767. color: #e15616;
  768. font-weight: bold;
  769. position: relative;
  770. }
  771. .tui-btmItem-active::after {
  772. content: "";
  773. position: absolute;
  774. border: 1rpx solid #e15616;
  775. width: 100%;
  776. height: 100%;
  777. border-radius: 40rpx;
  778. left: 0;
  779. top: 0;
  780. }
  781. .tui-btmItem-tap {
  782. position: relative;
  783. border-bottom-left-radius: 0;
  784. border-bottom-right-radius: 0;
  785. }
  786. .tui-btmItem-tap::after {
  787. content: "";
  788. position: absolute;
  789. width: 100%;
  790. height: 22rpx;
  791. background: #f7f7f7;
  792. left: 0;
  793. top: 58rpx;
  794. }
  795. .tui-active {
  796. color: #e15616;
  797. }
  798. .tui-icon-ml .tui-icon-class {
  799. margin-left: 6rpx;
  800. }
  801. .tui-ml {
  802. margin-left: 6rpx;
  803. }
  804. .tui-seizeaseat-20 {
  805. height: 20rpx;
  806. }
  807. .tui-seizeaseat-30 {
  808. height: 30rpx;
  809. }
  810. .tui-icon-middle .tui-icon-class {
  811. vertical-align: middle;
  812. }
  813. .tui-middle {
  814. vertical-align: middle;
  815. }
  816. /*screen*/
  817. .drawer-container {
  818. width: 560rpx;
  819. height: 100%;
  820. padding: 80rpx 0;
  821. box-sizing: border-box;
  822. .drawer-title{
  823. width: 100%;
  824. height: 72rpx;
  825. line-height: 72rpx;
  826. box-sizing: border-box;
  827. padding: 0 30rpx;
  828. text-align: left;
  829. font-size: $font-size-26;
  830. color: #e15616;
  831. font-weight: bold;
  832. background-color: #F7F7F7;
  833. }
  834. .drawer-main{
  835. width: 100%;
  836. height: auto;
  837. box-sizing: border-box;
  838. padding: 0 30rpx;
  839. .drawer-item-cell{
  840. width: 100%;
  841. height: auto;
  842. float: left;
  843. .drawer-item-title{
  844. width: 100%;
  845. height: 82rpx;
  846. line-height: 82rpx;
  847. text-align: left;
  848. font-size: $font-size-26;
  849. color: $text-color;
  850. float: left;
  851. }
  852. .drawer-item-main{
  853. width: 100%;
  854. height: auto;
  855. float: left;
  856. &.none{
  857. margin-top: 24rpx;
  858. }
  859. .drawer-item-text{
  860. display: inline-block;
  861. float: left;
  862. padding: 0 30rpx;
  863. height: 56rpx;
  864. border-radius: 28rpx;
  865. background-color: #F7F7F7;
  866. line-height: 56rpx;
  867. text-align: center;
  868. color: #999999;
  869. font-size: $font-size-26;
  870. margin-right: 24rpx;
  871. margin-bottom: 24rpx;
  872. &.checked{
  873. background-color: #fef6f3;
  874. color: $color-system;
  875. }
  876. }
  877. }
  878. }
  879. }
  880. .drawer-input{
  881. width: 100%;
  882. height: 80rpx;
  883. float: left;
  884. box-sizing: border-box;
  885. padding: 0 10rpx;
  886. border: 1px solid rgba(0,0,0,0.2);
  887. border-radius: 4rpx;
  888. margin-bottom: 30rpx;
  889. position: relative;
  890. &.btn{
  891. border: none;
  892. margin-top: 40rpx;
  893. display: flex;
  894. position: absolute;
  895. left: 0;
  896. }
  897. .drawer-btn{
  898. width: 210rpx;
  899. height: 84rpx;
  900. border-radius: 42rpx;
  901. background: $btn-confirm;
  902. line-height: 84rpx;
  903. text-align: center;
  904. font-size: $font-size-26;
  905. color: #FFFFFF;
  906. flex: 1;
  907. margin: 0 10rpx;
  908. &.comfrim{
  909. background: $btn-confirm;
  910. }
  911. &.clear{
  912. background: #e1e1e1;
  913. }
  914. }
  915. }
  916. }
  917. </style>