goods-classify.vue 27 KB

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