goods-supporting.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  1. <template>
  2. <view class="container product clearfix">
  3. <view class="product-content" :style="{ paddingBottom: popupShow ? '150rpx' : '0' }">
  4. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  5. <!-- 空白页 -->
  6. <view class="empty-container" v-if="isEmpty">
  7. <image
  8. class="empty-container-image"
  9. :src="StaticUrl + '/icon/icon-collection-empty@2x.png'"
  10. ></image>
  11. <text class="error-text">暂无收藏商品~</text>
  12. </view>
  13. <!-- 列表 -->
  14. <view class="tui-cart-cell tui-mtop" v-for="(pros, index) in productList" :key="index">
  15. <view class="tui-goods-item">
  16. <view class="tui-goods-main" :class="{'none': index === productList.length -1 }">
  17. <view class="tui-goods-checkBox">
  18. <view
  19. class="checkbox iconfont"
  20. :class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  21. :style="{color : disabledChecked(pros) ? '#E1E1E1' : '#E15616' }"
  22. @click="checkedSoperv(pros)"
  23. >
  24. </view>
  25. </view>
  26. <view class="tui-goods-image" @click.stop="navToDetailPage(pros.productId)"
  27. ><image :src="pros.image" class="tui-goods-img" />
  28. </view>
  29. <view class="tui-goods-info">
  30. <text class="list-details-title" @click.stop="navToDetailPage(pros.productId)">{{
  31. pros.name
  32. }}</text>
  33. <text class="list-details-specs" @click.stop="navToDetailPage(pros.productId)"
  34. >规格:{{ pros.unit != null ? pros.unit : '' }}</text
  35. >
  36. <template v-if="hasLogin">
  37. <template v-if="userIdentity == 4">
  38. <view class="list-details-price" v-if="pros.priceFlag == 1">
  39. <view class="list-none"><view class="price-small">¥未公开价格</view></view>
  40. </view>
  41. <view class="list-details-price" v-else-if="pros.priceFlag == 2">
  42. <view class="list-none"
  43. ><view class="price-small">¥价格仅会员可见</view></view
  44. >
  45. </view>
  46. <view class="list-details-price" v-else-if="pros.priceFlag == 3">
  47. <view class="list-none"
  48. ><view class="price-small">¥仅医美机构可见</view></view
  49. >
  50. </view>
  51. <template v-else>
  52. <view class="list-details-price">
  53. <view class="list-price">
  54. <text
  55. class="price-larger"
  56. :class="
  57. PromotionsFormat(pros.promotions) ||
  58. pros.svipProductFlag == 1
  59. ? 'none'
  60. : ''
  61. "
  62. >
  63. ¥{{
  64. (PromotionsFormat(pros.promotions) ||
  65. pros.svipProductFlag == 1
  66. ? pros.originalPrice
  67. : pros.price) | NumFormat
  68. }}
  69. </text>
  70. </view>
  71. <view class="add-cart-btn" v-if="!disabledChecked(pros)">
  72. <view class="number-box">
  73. <view
  74. class="iconfont icon-jianhao"
  75. @click="changeCountSub(pros)"
  76. ></view>
  77. <input
  78. class="btn-input"
  79. type="number"
  80. maxlength="4"
  81. v-model="pros.number"
  82. @blur="changeNumber($event, pros)"
  83. />
  84. <view
  85. class="iconfont icon-jiahao"
  86. @click="changeCountAdd(pros)"
  87. ></view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="list-details-price none">
  92. <view class="floor-item-act">
  93. <view class="coupon-tags" v-if="pros.couponsLogo"
  94. >优惠券</view
  95. >
  96. <template v-if="pros.actStatus == 1">
  97. <view
  98. class="floor-tags"
  99. v-if="
  100. pros.actStatus == 1 && PromotionsFormat(pros.promotions)
  101. "
  102. >
  103. {{ pros.promotions.name }}
  104. <text
  105. v-if="
  106. hasLogin && userIdentity == 2 && pros.priceFlag != 1
  107. "
  108. >:¥{{ pros.price | NumFormat }}</text
  109. >
  110. </view>
  111. <view class="floor-tags" v-else>{{
  112. pros.promotions.name
  113. }}</view>
  114. </template>
  115. <template v-if="pros.svipProductFlag == 1">
  116. <view class="svip-tags">
  117. <view class="tags" :class="{ none: !isShowVipFlag(pros) }"
  118. >SVIP</view
  119. >
  120. <view class="price" v-if="isShowVipFlag(pros)">{{
  121. pros.svipPriceTag
  122. }}</view>
  123. </view>
  124. </template>
  125. </view>
  126. </view>
  127. </template>
  128. </template>
  129. <template v-else>
  130. <view class="list-details-price" v-if="pros.priceFlag == 1">
  131. <view class="list-none"><view class="price-small">¥未公开价格</view></view>
  132. </view>
  133. <view class="list-details-price" v-else-if="pros.priceFlag == 3 && (firstClubType!=1)">
  134. <view class="list-none"><view class="price-small">¥仅医美机构可见</view></view>
  135. </view>
  136. <template v-else>
  137. <view class="list-details-price">
  138. <view class="list-price">
  139. <text
  140. class="price-larger"
  141. :class="
  142. PromotionsFormat(pros.promotions) ||
  143. pros.svipProductFlag == 1
  144. ? 'none'
  145. : ''
  146. "
  147. >
  148. ¥{{
  149. (PromotionsFormat(pros.promotions) ||
  150. pros.svipProductFlag == 1
  151. ? pros.originalPrice
  152. : pros.price) | NumFormat
  153. }}
  154. </text>
  155. </view>
  156. <view class="add-cart-btn">
  157. <view class="number-box">
  158. <view
  159. class="iconfont icon-jianhao"
  160. :class="[isQuantity == true ? 'disabled' : '']"
  161. @click="changeCountSub(pros)"
  162. ></view>
  163. <input
  164. class="btn-input"
  165. type="number"
  166. maxlength="4"
  167. v-model="pros.number"
  168. @blur="changeNumber($event, pros)"
  169. />
  170. <view
  171. class="iconfont icon-jiahao"
  172. :class="[isStock == true ? 'disabled' : '']"
  173. @click="changeCountAdd(pros)"
  174. ></view>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="list-details-price none">
  179. <view class="floor-item-act">
  180. <template v-if="pros.actStatus == 1">
  181. <view
  182. class="floor-tags"
  183. v-if="
  184. pros.actStatus == 1 && PromotionsFormat(pros.promotions)
  185. "
  186. >
  187. {{ pros.promotions.name }}
  188. <text
  189. v-if="
  190. hasLogin && userIdentity == 2 && pros.priceFlag != 1
  191. "
  192. >:¥{{ pros.price | NumFormat }}</text
  193. >
  194. </view>
  195. <view class="floor-tags" v-else>{{
  196. pros.promotions.name
  197. }}</view>
  198. </template>
  199. <template v-if="pros.svipProductFlag == 1">
  200. <view class="svip-tags">
  201. <view class="tags" :class="{ none: vipFlag == 0 }"
  202. >SVIP</view
  203. >
  204. <view class="price" v-if="isShowVipFlag(pros)">{{
  205. pros.svipPriceTag
  206. }}</view>
  207. </view>
  208. </template>
  209. </view>
  210. </view>
  211. </template>
  212. </template>
  213. </template>
  214. <template v-else>
  215. <view class="list-details-price">
  216. <view class="p-stars">
  217. <text class="p-no">¥</text>
  218. <uni-grader :grade="Number(pros.priceGrade)" :margin="14"></uni-grader>
  219. </view>
  220. <view class="add-cart-btn">
  221. <view class="number-box">
  222. <view
  223. class="iconfont icon-jianhao"
  224. @click="changeCountSub(pros)"
  225. ></view>
  226. <input
  227. class="btn-input"
  228. type="number"
  229. maxlength="4"
  230. v-model="pros.number"
  231. @blur="changeNumber($event, pros)"
  232. />
  233. <view class="iconfont icon-jiahao" @click="changeCountAdd(pros)"></view>
  234. </view>
  235. </view>
  236. </view>
  237. <view class="list-details-price none">
  238. <view class="floor-item-act">
  239. <template v-if="pros.actStatus == 1">
  240. <view
  241. class="floor-tags"
  242. v-if="pros.actStatus == 1 && PromotionsFormat(pros.promotions)"
  243. >
  244. {{ pros.promotions.name }}
  245. </view>
  246. <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
  247. </template>
  248. <template v-if="pros.svipProductFlag == 1">
  249. <view class="svip-tags"> <view class="tags none">SVIP</view> </view>
  250. </template>
  251. </view>
  252. </view>
  253. </template>
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. <!--加载loadding-->
  259. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  260. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
  261. <!--加载loadding-->
  262. </view>
  263. </view>
  264. <!-- 取消收藏操作 -->
  265. <tui-bottom-popup :radius="false" :mask="false" :show="popupShow">
  266. <view class="tui-popup-box clearfix">
  267. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  268. <view class="tui-flex-1">
  269. <view class="superv-header-checked">
  270. <view class="oltext" @click="isCheckedAll">
  271. <view
  272. class="checkbox iconfont"
  273. :class="[isAllChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  274. ></view>
  275. <view class="text">全选</view>
  276. </view>
  277. </view>
  278. <view class="tui-button buy" @click="handleSupportingSubmit('buy')">立即购买</view>
  279. <view class="tui-button add" @click="handleSupportingSubmit('add')">加入购物车</view>
  280. </view>
  281. </view>
  282. </view>
  283. </tui-bottom-popup>
  284. </view>
  285. </template>
  286. <script>
  287. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  288. import tuiNomore from '@/components/tui-components/nomore/nomore'
  289. import uniGrader from '@/components/uni-grade/uni-grade.vue'
  290. import { mapState, mapMutations } from 'vuex'
  291. export default {
  292. components: {
  293. tuiLoadmore,
  294. tuiNomore,
  295. uniGrader
  296. },
  297. data() {
  298. return {
  299. StaticUrl: this.$Static,
  300. isIphoneX: this.$store.state.isIphoneX,
  301. totalRecord: 0,
  302. cartQuantity: 0,
  303. popupShow: true,
  304. listQuery: {
  305. userId: 0,
  306. productId: 0,
  307. source: 2,
  308. pageNum:1,
  309. pageSize:50
  310. },
  311. productList: [],
  312. handleData: {},
  313. number: 0,
  314. buyRetailPrice: 0,
  315. buyRetailPriceStep: 1,
  316. isQuantity: false,
  317. scrollTop: 0,
  318. isEmpty: false,
  319. isAllChecked: false,
  320. navbarHeight: '',
  321. loadding: false,
  322. pullUpOn: true,
  323. pullFlag: true,
  324. hasNextPage: false,
  325. nomoreText: '上拉显示更多',
  326. vipFlag: 0,
  327. userIdentity: 0,
  328. firstClubType:0,
  329. isStock: false
  330. }
  331. },
  332. onLoad(option) {
  333. this.listQuery.productId = option.productId
  334. this.initGetStotage()
  335. },
  336. filters: {
  337. NumFormat: function(value) {
  338. //处理金额
  339. if (!value) return '0.00'
  340. let number = Number(value).toFixed(2)
  341. return number
  342. }
  343. },
  344. computed: {
  345. ...mapState(['hasLogin', 'userInfo','clubType']),
  346. },
  347. methods: {
  348. ...mapMutations(['login', 'logout']),
  349. async initGetStotage() {
  350. const userInfo = await this.$api.getStorage()
  351. this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
  352. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  353. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  354. this.firstClubType = this.clubType
  355. this.getCommodityCombinationList()
  356. },
  357. getCommodityCombinationList() {
  358. // 初始化商品详情配套商品
  359. this.ProductService.getCommodityCombinationList(this.listQuery)
  360. .then(response => {
  361. let data = response.data
  362. this.hasNextPage = data.hasNextPage
  363. this.productList = data.results.map((pros, index) => {
  364. pros.isChecked = false
  365. pros.number = pros.minBuyNumber
  366. return pros
  367. })
  368. this.pullFlag = false
  369. setTimeout(() => {
  370. this.pullFlag = true
  371. }, 500)
  372. if (this.hasNextPage) {
  373. this.pullUpOn = false
  374. this.nomoreText = '上拉显示更多'
  375. } else {
  376. if (this.productList.length < 8) {
  377. this.pullUpOn = true
  378. } else {
  379. this.pullUpOn = false
  380. this.loadding = false
  381. this.nomoreText = '已至底部'
  382. }
  383. }
  384. })
  385. .catch(error => {
  386. console.log('获取组合商品列表失败')
  387. })
  388. },
  389. GetOnReachBottomData() {
  390. //上拉加载
  391. this.listQuery.pageNum += 1
  392. this.ProductService.getCommodityCombinationList(this.listQuery)
  393. .then(response => {
  394. let data = response.data
  395. if (data.results && data.results.length > 0) {
  396. this.hasNextPage = data.hasNextPage
  397. let list = data.results.map((pros, index) => {
  398. if(this.isAllChecked && !this.disabledChecked(pros)){
  399. pros.isChecked = true
  400. }else{
  401. pros.isChecked = false
  402. }
  403. pros.number = pros.minBuyNumber
  404. return pros
  405. })
  406. this.productList = this.productList.concat(list)
  407. this.pullFlag = false // 防上拉暴滑
  408. setTimeout(() => {
  409. this.pullFlag = true
  410. }, 500)
  411. if (this.hasNextPage) {
  412. this.pullUpOn = false
  413. this.nomoreText = '上拉显示更多'
  414. } else {
  415. this.pullUpOn = false
  416. this.loadding = false
  417. this.nomoreText = '已至底部'
  418. }
  419. }
  420. })
  421. .catch(error => {
  422. this.$util.msg(error.msg, 2000)
  423. })
  424. },
  425. handleSupportingSubmit(type) {
  426. if (this.hasLogin) {
  427. switch (type) {
  428. case 'buy':
  429. console.log('立即购买')
  430. this.toConfirmation()
  431. break
  432. case 'add':
  433. console.log('加入购物车')
  434. this.getAddProductCart()
  435. break
  436. }
  437. } else {
  438. this.$api.navigateTo('/pages/login/login')
  439. }
  440. },
  441. getAddProductCart() {
  442. //增加购物车成功和toast弹窗提示成功
  443. let list = []
  444. if(!this.isProductChecked){
  445. this.$util.msg('请先选择商品', 2000)
  446. return
  447. }
  448. this.productList.forEach((el)=>{
  449. if(el.isChecked){
  450. list.push({ productId:el.productId , productCount: el.number })
  451. }
  452. })
  453. this.ProductService.ShoppingAddCarts({
  454. productInfo:JSON.stringify(list),
  455. userId: this.listQuery.userId
  456. })
  457. .then(response => {
  458. this.$util.msg('加入购物车成功', 1500, true, 'success')
  459. })
  460. .catch(error => {
  461. this.$util.msg(error.msg, 2000)
  462. })
  463. },
  464. toConfirmation() {
  465. //跳转确认订单页面
  466. let list = []
  467. if(!this.isProductChecked){
  468. this.$util.msg('请先选择商品', 2000)
  469. return
  470. }
  471. this.productList.map((el, index) => {
  472. if(el.isChecked){
  473. list.push({ id:el.productId , count: el.number })
  474. }
  475. })
  476. console.log('勾选商品',list)
  477. this.$api.navigateTo(
  478. `/pages/user/order/create-order?type=3&data=${JSON.stringify({ data: list })}`
  479. )
  480. },
  481. updateCheckAllBtn() {
  482. //勾选单个判断全选
  483. let goodsCheckedLength = 0
  484. this.productList.forEach(pros => {
  485. if (pros.isChecked) {
  486. goodsCheckedLength++
  487. }
  488. })
  489. this.isAllChecked = goodsCheckedLength === this.productList.length
  490. if (goodsCheckedLength > 0) {
  491. this.isProductChecked = true
  492. } else {
  493. this.isProductChecked = false
  494. }
  495. },
  496. updateBothCheckBtn() {
  497. //全选勾选判断
  498. this.productList.forEach(pros => {
  499. if(!this.disabledChecked(pros)){
  500. pros.isChecked = this.isAllChecked
  501. }
  502. })
  503. },
  504. disabledChecked(pros){
  505. if(pros.priceFlag ==1){// 为公开价格返回 true 禁用按钮
  506. return true
  507. }else if(this.userIdentity == 4){// 普通机构且商品价格仅会员可见 || 商品价格仅医美机构可见 禁用按钮
  508. if( pros.priceFlag ==2 || pros.priceFlag ==3){
  509. return true
  510. }
  511. }else if(this.userIdentity == 2){// 资质机构下 商品价格仅医美机构可见 且本机构不为医美机构 禁用按钮
  512. if( pros.priceFlag ==3 && this.firstClubType !=1 ){
  513. return true
  514. }
  515. }
  516. },
  517. isCheckedAll() {
  518. //全选
  519. this.isAllChecked = !this.isAllChecked
  520. if (this.isAllChecked) {
  521. this.isProductChecked = true
  522. } else {
  523. this.isProductChecked = false
  524. }
  525. this.updateBothCheckBtn()
  526. },
  527. checkedSoperv(pros) {
  528. // 勾选商品
  529. if(this.disabledChecked(pros)){
  530. this.$util.msg('该商品暂不能购买', 2000)
  531. return
  532. }
  533. pros.isChecked = !pros.isChecked
  534. this.updateCheckAllBtn()
  535. },
  536. PromotionsFormat(promo) {
  537. //优惠价促销活动类型数据处理
  538. if (promo != null) {
  539. if (promo.type == 1 && promo.mode == 1) {
  540. return true
  541. } else {
  542. return false
  543. }
  544. }
  545. return false
  546. },
  547. changeCountAdd(pros) {
  548. //popup弹窗数量增加按钮
  549. if (pros.step == 2) {
  550. pros.number += pros.minBuyNumber
  551. } else {
  552. pros.number++
  553. }
  554. this.calculatPerice()
  555. },
  556. changeCountSub(pros) {
  557. //popup弹窗数量减按钮
  558. if (pros.number <= pros.minBuyNumber) {
  559. pros.number = pros.minBuyNumber
  560. this.isQuantity = true
  561. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`, 2000)
  562. return
  563. } else {
  564. if (pros.step == 2) {
  565. pros.number -= pros.minBuyNumber
  566. } else {
  567. pros.number--
  568. }
  569. this.calculatPerice()
  570. this.isQuantity = false
  571. }
  572. },
  573. changeNumber(e, pros) {
  574. let _value = Number(e.detail.value)
  575. if (!this.$api.isNumber(_value)) {
  576. pros.number = pros.minBuyNumber
  577. } else if (_value < pros.minBuyNumber) {
  578. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`, 2000)
  579. pros.number = pros.minBuyNumber
  580. } else if (_value % pros.minBuyNumber != 0) {
  581. this.$util.msg('购买量必须为起订量的整数倍', 2000)
  582. pros.number = pros.minBuyNumber
  583. } else {
  584. pros.number = _value
  585. this.calculatPerice(pros)
  586. }
  587. },
  588. calculatPerice(pros) {
  589. //判断是否为阶梯价然后做计算价格处理
  590. if (pros.ladderPriceFlag == 1) {
  591. pros.ladderPrices.forEach((el, index) => {
  592. if (pros.number >= el.buyNum) {
  593. pros.price = el.buyPrice
  594. }
  595. })
  596. }
  597. },
  598. isShowVipFlag(pros) {
  599. /**
  600. *显示SVIP和超级会员价格:
  601. * 个人机构(不是超级会员,但价格所有机构可见),
  602. * 资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
  603. * 超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
  604. *商品价格是否可见:priceFlag 0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
  605. * 普通机构
  606. * 超级会员 && priceFlag === 0
  607. * 资质机构
  608. * priceFlag !== 1 ||
  609. * 超级会员
  610. * 商品priceFlag === 3 && 是否是医美机构
  611. */
  612. // 未登录 || 非会员
  613. if(!this.hasLogin || !this.vipFlag === 1) return false
  614. // 商品所有机构可见
  615. if(pros.priceFlag === 0 ) return true
  616. // 商品价格仅资质机构可见
  617. if(pros.priceFlag === 2 && this.userIdentity === 2) return true
  618. // 商品价格仅医美机构可见
  619. if(pros.priceFlag === 3 && this.userIdentity === 2 && this.firstClubType == 1) return true
  620. // 其它
  621. return false
  622. },
  623. navToDetailPage(id) {
  624. this.isModallayer = true
  625. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  626. this.isModallayer = false
  627. }
  628. },
  629. onPageScroll(e) {
  630. //实时获取到滚动的值
  631. },
  632. onReachBottom() {
  633. if (this.hasNextPage) {
  634. this.loadding = true
  635. this.pullUpOn = true
  636. this.GetOnReachBottomData()
  637. }
  638. },
  639. onPullDownRefresh() {
  640. setTimeout(() => {
  641. this.getCommodityCombinationList()
  642. uni.stopPullDownRefresh()
  643. }, 200)
  644. },
  645. onShow() {}
  646. }
  647. </script>
  648. <style lang="scss">
  649. @import '@/uni.scss';
  650. page {
  651. background: #fff;
  652. }
  653. .empty-container {
  654. z-index: 9999;
  655. }
  656. .tui-header {
  657. width: 100%;
  658. font-size: 16px;
  659. font-weight: 500;
  660. height: 32px;
  661. display: flex;
  662. align-items: center;
  663. justify-content: center;
  664. position: relative;
  665. padding: 0 40rpx;
  666. }
  667. .header-sit {
  668. width: 100%;
  669. box-sizing: border-box;
  670. height: 80rpx;
  671. line-height: 80rpx;
  672. box-sizing: border-box;
  673. padding: 0 40rpx;
  674. text-align: left;
  675. font-size: $font-size-40;
  676. color: #ffffff;
  677. font-weight: 600;
  678. font-family: '正楷';
  679. margin-top: 30rpx;
  680. .iconfont {
  681. font-size: 42rpx;
  682. margin-left: 30rpx;
  683. }
  684. }
  685. .mine {
  686. width: 100%;
  687. height: 100%;
  688. position: relative;
  689. }
  690. .product-content {
  691. width: 100%;
  692. height: auto;
  693. position: relative;
  694. padding: 0;
  695. box-sizing: border-box;
  696. .empty-container-image {
  697. width: 260rpx;
  698. height: 260rpx;
  699. margin-top: -300rpx;
  700. }
  701. }
  702. .tui-goods-item {
  703. padding: 30rpx 20rpx 0 20rpx;
  704. box-sizing: border-box;
  705. position: relative;
  706. .tui-goods-main {
  707. display: flex;
  708. width: 100%;
  709. height: 100%;
  710. border-bottom: 1px solid #ebebeb;
  711. padding-bottom: 24rpx;
  712. &.none{
  713. border-bottom: none;
  714. }
  715. }
  716. }
  717. .tui-goods-checkBox {
  718. display: flex;
  719. align-items: center;
  720. margin: 0 15rpx;
  721. .checkbox {
  722. display: flex;
  723. margin: 0;
  724. padding: 0;
  725. display: flex;
  726. flex-direction: column;
  727. align-items: center;
  728. box-sizing: border-box;
  729. text-align: center;
  730. text-decoration: none;
  731. border-radius: 0;
  732. -webkit-tap-highlight-color: transparent;
  733. overflow: hidden;
  734. background-color: #ffffff;
  735. font-size: 36rpx;
  736. color: $color-system;
  737. }
  738. .text {
  739. font-size: $font-size-24;
  740. margin-left: 10rpx;
  741. }
  742. }
  743. .tui-goods-image {
  744. width: 180rpx;
  745. height: 180rpx !important;
  746. border-radius: 12rpx;
  747. .tui-goods-img {
  748. width: 180rpx;
  749. height: 180rpx !important;
  750. border-radius: 12rpx;
  751. flex-shrink: 0;
  752. display: block;
  753. }
  754. }
  755. .tui-goods-info {
  756. width: 460rpx;
  757. padding-left: 20rpx;
  758. box-sizing: border-box;
  759. position: relative;
  760. .list-details-title {
  761. line-height: 38rpx;
  762. text-overflow: ellipsis;
  763. overflow: hidden;
  764. display: -webkit-box;
  765. -webkit-line-clamp: 2;
  766. line-clamp: 2;
  767. -webkit-box-orient: vertical;
  768. font-size: 26rpx;
  769. color: #333333;
  770. }
  771. .list-details-specs {
  772. width: 100%;
  773. display: inline-block;
  774. margin-top: 8rpx;
  775. color: #999999;
  776. font-size: 24rpx;
  777. }
  778. .list-details-price {
  779. width: 100%;
  780. line-height: 54rpx;
  781. float: left;
  782. .p-stars {
  783. float: left;
  784. .p-no {
  785. font-size: $font-size-28;
  786. color: $text-color;
  787. display: block;
  788. float: left;
  789. }
  790. }
  791. &.none {
  792. height: 32rpx;
  793. line-height: 32rpx;
  794. }
  795. .floor-item-act {
  796. height: 54rpx;
  797. text-align: center;
  798. box-sizing: border-box;
  799. float: left;
  800. }
  801. .price-icon {
  802. width: 22rpx;
  803. height: 28rpx;
  804. vertical-align: middle;
  805. margin-right: 10rpx;
  806. }
  807. .price-icon + text {
  808. font-size: 25rpx;
  809. vertical-align: middle;
  810. }
  811. .list-login-now {
  812. width: 375rpx;
  813. color: #f8c499;
  814. position: absolute;
  815. bottom: 0;
  816. .p-no {
  817. float: left;
  818. font-size: $font-size-24;
  819. color: $color-system;
  820. margin-right: 10rpx;
  821. }
  822. }
  823. .login-now {
  824. padding: 10rpx 10rpx 10rpx 0;
  825. }
  826. .list-none {
  827. margin-top: 20rpx;
  828. .price-small {
  829. font-size: $font-size-26;
  830. line-height: 40rpx;
  831. color: #ff2a2a;
  832. }
  833. }
  834. .list-price {
  835. color: #ff2a2a;
  836. float: left;
  837. line-height: 54rpx;
  838. align-items: center;
  839. justify-content: center;
  840. .price-larger {
  841. font-size: $font-size-30;
  842. display: inline-block;
  843. &.none {
  844. text-decoration: line-through;
  845. color: #999999;
  846. }
  847. }
  848. }
  849. .add-cart-btn {
  850. float: right;
  851. width: 186rpx;
  852. height: 54rpx;
  853. line-height: 54rpx;
  854. border-radius: 30rpx;
  855. color: #fff;
  856. font-size: 24rpx;
  857. margin-right: 0;
  858. background: #ffffff;
  859. color: $text-color;
  860. text-align: center;
  861. .number-box {
  862. display: flex;
  863. justify-content: center;
  864. align-items: center;
  865. border: 2rpx solid #ffe6dc;
  866. border-radius: 30rpx;
  867. .iconfont {
  868. font-size: $font-size-24;
  869. padding: 0 18rpx;
  870. color: #999999;
  871. text-align: center;
  872. line-height: 48rpx;
  873. font-weight: bold;
  874. background: #fef6f3;
  875. &.icon-jianhao {
  876. border-radius: 30rpx 0 0 30rpx;
  877. }
  878. &.icon-jiahao {
  879. border-radius: 0 30rpx 30rpx 0;
  880. }
  881. }
  882. .btn-input {
  883. width: 62rpx;
  884. height: 48rpx;
  885. line-height: 48rpx;
  886. background: #fff;
  887. border-radius: 4rpx;
  888. text-align: center;
  889. font-size: $font-size-24;
  890. }
  891. }
  892. }
  893. }
  894. }
  895. .tui-popup-box {
  896. position: relative;
  897. box-sizing: border-box;
  898. min-height: 168rpx;
  899. padding: 6rpx 24rpx;
  900. .tui-popup-content {
  901. padding-top: 30rpx;
  902. }
  903. }
  904. .layer-smimg {
  905. width: 114rpx;
  906. height: 114rpx;
  907. float: left;
  908. border-radius: 10rpx;
  909. margin-right: 24rpx;
  910. image {
  911. width: 114rpx;
  912. height: 114rpx;
  913. border-radius: 10rpx;
  914. }
  915. }
  916. .layer-nunbox {
  917. justify-content: space-between;
  918. align-items: center;
  919. width: 536rpx;
  920. height: 88rpx;
  921. padding: 13rpx 0 0 0;
  922. float: left;
  923. .layer-nunbox-t {
  924. width: 100%;
  925. height: 44rpx;
  926. position: relative;
  927. display: flex;
  928. .layer-nunbox-text {
  929. line-height: 44rpx;
  930. font-size: $font-size-28;
  931. }
  932. .number-box {
  933. display: flex;
  934. justify-content: center;
  935. align-items: center;
  936. border: 2rpx solid #ffe6dc;
  937. border-radius: 30rpx;
  938. height: 48rpx;
  939. margin-left: 20rpx;
  940. .iconfont {
  941. font-size: $font-size-24;
  942. padding: 0 18rpx;
  943. color: #999999;
  944. text-align: center;
  945. line-height: 48rpx;
  946. font-weight: bold;
  947. background: #fef6f3;
  948. &.icon-jianhao {
  949. border-radius: 30rpx 0 0 30rpx;
  950. }
  951. &.icon-jiahao {
  952. border-radius: 0 30rpx 30rpx 0;
  953. }
  954. }
  955. .btn-input {
  956. width: 62rpx;
  957. height: 48rpx;
  958. line-height: 48rpx;
  959. background: #ffffff;
  960. border-radius: 4rpx;
  961. text-align: center;
  962. font-size: $font-size-28;
  963. }
  964. }
  965. .product-step {
  966. position: absolute;
  967. left: 45rpx;
  968. bottom: 0;
  969. height: 44rpx;
  970. background: #ffffff;
  971. }
  972. }
  973. .layer-nunbox-b {
  974. width: 100%;
  975. height: 44rpx;
  976. margin-top: 13rpx;
  977. }
  978. .text {
  979. line-height: 44rpx;
  980. font-size: $font-size-28;
  981. .p {
  982. color: #ff2a2a;
  983. }
  984. .p:first-child {
  985. margin-left: 30rpx;
  986. }
  987. .p.sm {
  988. font-size: $font-size-24;
  989. }
  990. }
  991. }
  992. .tui-popup-btn {
  993. width: 100%;
  994. height: auto;
  995. float: left;
  996. box-sizing: border-box;
  997. margin-top: 30rpx;
  998. .superv-header-checked {
  999. float: left;
  1000. font-size: $font-size-30;
  1001. .oltext {
  1002. width: 120rpx;
  1003. float: left;
  1004. color: #666666;
  1005. display: flex;
  1006. margin-left: 10rpx;
  1007. .checkbox {
  1008. display: flex;
  1009. margin: 0;
  1010. padding: 0;
  1011. display: flex;
  1012. flex-direction: column;
  1013. align-items: center;
  1014. box-sizing: border-box;
  1015. text-align: center;
  1016. text-decoration: none;
  1017. border-radius: 0;
  1018. -webkit-tap-highlight-color: transparent;
  1019. overflow: hidden;
  1020. font-size: 34rpx;
  1021. color: $color-system;
  1022. line-height: 80rpx;
  1023. }
  1024. .text {
  1025. float: left;
  1026. line-height: 80rpx;
  1027. margin-left: 15rpx;
  1028. }
  1029. }
  1030. .ortext {
  1031. width: 120rpx;
  1032. float: right;
  1033. color: $color-system;
  1034. text-align: right;
  1035. }
  1036. }
  1037. .tui-button {
  1038. width: 210rpx;
  1039. height: 88rpx;
  1040. float: right;
  1041. background: #e1e1e1;
  1042. line-height: 88rpx;
  1043. text-align: center;
  1044. color: #ffffff;
  1045. font-size: $font-size-28;
  1046. border-radius: 44rpx;
  1047. margin-left: 32rpx;
  1048. &.add {
  1049. background: #ffe6dc;
  1050. color: #e15616;
  1051. }
  1052. &.buy {
  1053. background: $btn-confirm;
  1054. }
  1055. }
  1056. .tui-flex-btn {
  1057. width: 100%;
  1058. height: 88rpx;
  1059. display: flex;
  1060. box-sizing: border-box;
  1061. padding: 0 34rpx;
  1062. .button {
  1063. width: 280rpx;
  1064. height: 88rpx;
  1065. color: #fff;
  1066. display: flex;
  1067. align-items: center;
  1068. justify-content: center;
  1069. font-size: $font-size-28;
  1070. border-radius: 44rpx;
  1071. &.buy {
  1072. background: $btn-confirm;
  1073. margin-left: 78rpx;
  1074. }
  1075. &.add {
  1076. background: #ffe6dc;
  1077. color: #e15616;
  1078. }
  1079. }
  1080. }
  1081. }
  1082. </style>