goods-classify.vue 26 KB

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