goods-classify.vue 26 KB

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