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