goods-classify.vue 27 KB

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