goods-classify.vue 26 KB

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