goods-classify.vue 26 KB

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