goods-supporting.vue 26 KB

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