goods-supporting.vue 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. <template>
  2. <view class="container product clearfix">
  3. <view class="product-content" :style="{ paddingBottom: popupShow ? '136rpx' : '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">
  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:10
  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((el, index) => {
  354. el.isChecked = false
  355. el.number = el.minBuyNumber
  356. return el
  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((el, index) => {
  388. el.isChecked = false
  389. el.number = el.minBuyNumber
  390. return el
  391. })
  392. this.productList = this.productList.concat(list)
  393. this.pullFlag = false // 防上拉暴滑
  394. setTimeout(() => {
  395. this.pullFlag = true
  396. }, 500)
  397. if (this.hasNextPage) {
  398. this.pullUpOn = false
  399. this.nomoreText = '上拉显示更多'
  400. } else {
  401. this.pullUpOn = false
  402. this.loadding = false
  403. this.nomoreText = '已至底部'
  404. }
  405. }
  406. })
  407. .catch(error => {
  408. this.$util.msg(error.msg, 2000)
  409. })
  410. },
  411. handleSupportingSubmit(type) {
  412. if (this.hasLogin) {
  413. switch (type) {
  414. case 'buy':
  415. console.log('立即购买')
  416. this.toConfirmation()
  417. break
  418. case 'add':
  419. console.log('加入购物车')
  420. this.getAddProductCart()
  421. break
  422. }
  423. } else {
  424. this.$api.navigateTo('/pages/login/login')
  425. }
  426. },
  427. getAddProductCart() {
  428. //增加购物车成功和toast弹窗提示成功
  429. let list = []
  430. if(!this.isProductChecked){
  431. this.$util.msg('请先选择商品', 2000)
  432. return
  433. }
  434. this.productList.forEach((el)=>{
  435. if(el.isChecked){
  436. list.push({ productId:el.productId , productCount: el.number })
  437. }
  438. })
  439. this.ProductService.ShoppingAddCarts({
  440. productInfo:JSON.stringify(list),
  441. userId: this.listQuery.userId
  442. })
  443. .then(response => {
  444. this.$util.msg('加入购物车成功', 1500, true, 'success')
  445. })
  446. .catch(error => {
  447. this.$util.msg(error.msg, 2000)
  448. })
  449. },
  450. toConfirmation() {
  451. //跳转确认订单页面
  452. let list = []
  453. if(!this.isProductChecked){
  454. this.$util.msg('请先选择商品', 2000)
  455. return
  456. }
  457. this.productList.map((el, index) => {
  458. if(el.isChecked){
  459. list.push({ id:el.productId , count: el.number })
  460. }
  461. })
  462. console.log('勾选商品',list)
  463. this.$api.navigateTo(
  464. `/pages/user/order/create-order?type=3&data=${JSON.stringify({ data: list })}`
  465. )
  466. },
  467. updateCheckAllBtn() {
  468. //勾选单个判断全选
  469. let goodsCheckedLength = 0
  470. this.productList.forEach(pros => {
  471. if (pros.isChecked) {
  472. goodsCheckedLength++
  473. }
  474. })
  475. this.isAllChecked = goodsCheckedLength === this.productList.length
  476. if (goodsCheckedLength > 0) {
  477. this.isProductChecked = true
  478. } else {
  479. this.isProductChecked = false
  480. }
  481. },
  482. updateBothCheckBtn() {
  483. //全选勾选判断
  484. this.productList.forEach(pros => {
  485. if(!this.disabledChecked(pros)){
  486. pros.isChecked = this.isAllChecked
  487. }
  488. })
  489. },
  490. disabledChecked(pros){
  491. if(pros.priceFlag ==1){// 为公开价格返回 true 禁用按钮
  492. return true
  493. }else{
  494. if(this.userIdentity == 4 && pros.priceFlag ==2){// 普通机构且商品价格仅会员可见 禁用按钮
  495. return true
  496. }
  497. }
  498. },
  499. isCheckedAll() {
  500. //全选
  501. this.isAllChecked = !this.isAllChecked
  502. if (this.isAllChecked) {
  503. this.isProductChecked = true
  504. } else {
  505. this.isProductChecked = false
  506. }
  507. this.updateBothCheckBtn()
  508. },
  509. checkedSoperv(pros) {
  510. //选择
  511. if(this.disabledChecked(pros)){
  512. return
  513. }
  514. pros.isChecked = !pros.isChecked
  515. this.updateCheckAllBtn()
  516. },
  517. PromotionsFormat(promo) {
  518. //促销活动类型数据处理
  519. if (promo != null) {
  520. if (promo.type == 1 && promo.mode == 1) {
  521. return true
  522. } else {
  523. return false
  524. }
  525. }
  526. return false
  527. },
  528. changeCountAdd(pros) {
  529. //popup弹窗数量增加按钮
  530. if (pros.step == 2) {
  531. pros.number += pros.minBuyNumber
  532. } else {
  533. pros.number++
  534. }
  535. this.calculatPerice()
  536. },
  537. changeCountSub(pros) {
  538. //popup弹窗数量减按钮
  539. if (pros.number <= pros.minBuyNumber) {
  540. pros.number = pros.minBuyNumber
  541. this.isQuantity = true
  542. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
  543. return
  544. } else {
  545. if (pros.step == 2) {
  546. pros.number -= pros.minBuyNumber
  547. } else {
  548. pros.number--
  549. }
  550. this.calculatPerice()
  551. this.isQuantity = false
  552. }
  553. },
  554. changeNumber(e, pros) {
  555. let _value = e.detail.value
  556. if (!this.$api.isNumber(_value)) {
  557. pros.number = pros.minBuyNumber
  558. } else if (_value < pros.minBuyNumber) {
  559. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`, 2000)
  560. pros.number = pros.minBuyNumber
  561. } else if (_value % pros.minBuyNumber != 0) {
  562. this.$util.msg('购买量必须为起订量的整数倍', 2000)
  563. pros.number = pros.minBuyNumber
  564. } else {
  565. pros.number = e.detail.value
  566. this.calculatPerice(pros)
  567. }
  568. },
  569. calculatPerice(pros) {
  570. //判断是否为阶梯价然后做计算价格处理
  571. if (pros.ladderPriceFlag == 1) {
  572. pros.ladderPrices.forEach((el, index) => {
  573. if (pros.number >= el.buyNum) {
  574. pros.price = el.buyPrice
  575. }
  576. })
  577. }
  578. },
  579. isShowVipFlag(pros) {
  580. // 超级会员价格显示控制
  581. if (this.hasLogin) {
  582. if (pros.priceFlag != 1) {
  583. if (this.userIdentity == 4 && this.vipFlag == 1) {
  584. return true
  585. } else if (this.userIdentity == 2) {
  586. return true
  587. }
  588. }
  589. }
  590. },
  591. navToDetailPage(id) {
  592. this.isModallayer = true
  593. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  594. this.isModallayer = false
  595. }
  596. },
  597. onPageScroll(e) {
  598. //实时获取到滚动的值
  599. },
  600. onReachBottom() {
  601. if (this.hasNextPage) {
  602. this.loadding = true
  603. this.pullUpOn = true
  604. this.GetOnReachBottomData()
  605. }
  606. },
  607. onPullDownRefresh() {
  608. setTimeout(() => {
  609. this.getCommodityCombinationList()
  610. uni.stopPullDownRefresh()
  611. }, 200)
  612. },
  613. onShow() {}
  614. }
  615. </script>
  616. <style lang="scss">
  617. @import '@/uni.scss';
  618. page {
  619. background: #fff;
  620. }
  621. .empty-container {
  622. z-index: 9999;
  623. }
  624. .tui-header {
  625. width: 100%;
  626. font-size: 16px;
  627. font-weight: 500;
  628. height: 32px;
  629. display: flex;
  630. align-items: center;
  631. justify-content: center;
  632. position: relative;
  633. padding: 0 40rpx;
  634. }
  635. .header-sit {
  636. width: 100%;
  637. box-sizing: border-box;
  638. height: 80rpx;
  639. line-height: 80rpx;
  640. box-sizing: border-box;
  641. padding: 0 40rpx;
  642. text-align: left;
  643. font-size: $font-size-40;
  644. color: #ffffff;
  645. font-weight: 600;
  646. font-family: '正楷';
  647. margin-top: 30rpx;
  648. .iconfont {
  649. font-size: 42rpx;
  650. margin-left: 30rpx;
  651. }
  652. }
  653. .mine {
  654. width: 100%;
  655. height: 100%;
  656. position: relative;
  657. }
  658. .product-content {
  659. width: 100%;
  660. height: auto;
  661. position: relative;
  662. padding: 0;
  663. box-sizing: border-box;
  664. .empty-container-image {
  665. width: 260rpx;
  666. height: 260rpx;
  667. margin-top: -300rpx;
  668. }
  669. }
  670. .tui-goods-item {
  671. padding: 30rpx 20rpx 0 20rpx;
  672. box-sizing: border-box;
  673. position: relative;
  674. .tui-goods-main {
  675. display: flex;
  676. width: 100%;
  677. height: 100%;
  678. border-bottom: 1px solid #ebebeb;
  679. padding-bottom: 24rpx;
  680. }
  681. }
  682. .tui-goods-checkBox {
  683. display: flex;
  684. align-items: center;
  685. margin: 0 15rpx;
  686. .checkbox {
  687. display: flex;
  688. margin: 0;
  689. padding: 0;
  690. display: flex;
  691. flex-direction: column;
  692. align-items: center;
  693. box-sizing: border-box;
  694. text-align: center;
  695. text-decoration: none;
  696. border-radius: 0;
  697. -webkit-tap-highlight-color: transparent;
  698. overflow: hidden;
  699. background-color: #ffffff;
  700. font-size: 36rpx;
  701. color: $color-system;
  702. }
  703. .text {
  704. font-size: $font-size-24;
  705. margin-left: 10rpx;
  706. }
  707. }
  708. .tui-goods-image {
  709. width: 180rpx;
  710. height: 180rpx !important;
  711. border-radius: 12rpx;
  712. .tui-goods-img {
  713. width: 180rpx;
  714. height: 180rpx !important;
  715. border-radius: 12rpx;
  716. flex-shrink: 0;
  717. display: block;
  718. }
  719. }
  720. .tui-goods-info {
  721. width: 460rpx;
  722. padding-left: 20rpx;
  723. box-sizing: border-box;
  724. position: relative;
  725. .list-details-title {
  726. line-height: 38rpx;
  727. text-overflow: ellipsis;
  728. overflow: hidden;
  729. display: -webkit-box;
  730. -webkit-line-clamp: 2;
  731. line-clamp: 2;
  732. -webkit-box-orient: vertical;
  733. font-size: 26rpx;
  734. color: #333333;
  735. }
  736. .list-details-specs {
  737. width: 100%;
  738. display: inline-block;
  739. margin-top: 8rpx;
  740. color: #999999;
  741. font-size: 24rpx;
  742. }
  743. .list-details-price {
  744. width: 100%;
  745. line-height: 54rpx;
  746. float: left;
  747. .p-stars {
  748. float: left;
  749. .p-no {
  750. font-size: $font-size-28;
  751. color: $text-color;
  752. display: block;
  753. float: left;
  754. }
  755. }
  756. &.none {
  757. height: 32rpx;
  758. line-height: 32rpx;
  759. }
  760. .floor-item-act {
  761. height: 54rpx;
  762. text-align: center;
  763. box-sizing: border-box;
  764. float: left;
  765. }
  766. .price-icon {
  767. width: 22rpx;
  768. height: 28rpx;
  769. vertical-align: middle;
  770. margin-right: 10rpx;
  771. }
  772. .price-icon + text {
  773. font-size: 25rpx;
  774. vertical-align: middle;
  775. }
  776. .list-login-now {
  777. width: 375rpx;
  778. color: #f8c499;
  779. position: absolute;
  780. bottom: 0;
  781. .p-no {
  782. float: left;
  783. font-size: $font-size-24;
  784. color: $color-system;
  785. margin-right: 10rpx;
  786. }
  787. }
  788. .login-now {
  789. padding: 10rpx 10rpx 10rpx 0;
  790. }
  791. .list-none {
  792. margin-top: 20rpx;
  793. .price-small {
  794. font-size: $font-size-26;
  795. line-height: 40rpx;
  796. color: #ff2a2a;
  797. }
  798. }
  799. .list-price {
  800. color: #ff2a2a;
  801. float: left;
  802. line-height: 54rpx;
  803. align-items: center;
  804. justify-content: center;
  805. .price-larger {
  806. font-size: $font-size-30;
  807. display: inline-block;
  808. &.none {
  809. text-decoration: line-through;
  810. color: #999999;
  811. }
  812. }
  813. }
  814. .add-cart-btn {
  815. float: right;
  816. width: 186rpx;
  817. height: 54rpx;
  818. line-height: 54rpx;
  819. border-radius: 30rpx;
  820. color: #fff;
  821. font-size: 24rpx;
  822. margin-right: 0;
  823. background: #ffffff;
  824. color: $text-color;
  825. text-align: center;
  826. .number-box {
  827. display: flex;
  828. justify-content: center;
  829. align-items: center;
  830. border: 2rpx solid #ffe6dc;
  831. border-radius: 30rpx;
  832. .iconfont {
  833. font-size: $font-size-24;
  834. padding: 0 18rpx;
  835. color: #999999;
  836. text-align: center;
  837. line-height: 48rpx;
  838. font-weight: bold;
  839. background: #fef6f3;
  840. &.icon-jianhao {
  841. border-radius: 30rpx 0 0 30rpx;
  842. }
  843. &.icon-jiahao {
  844. border-radius: 0 30rpx 30rpx 0;
  845. }
  846. }
  847. .btn-input {
  848. width: 62rpx;
  849. height: 48rpx;
  850. line-height: 48rpx;
  851. background: #fff;
  852. border-radius: 4rpx;
  853. text-align: center;
  854. font-size: $font-size-24;
  855. }
  856. }
  857. }
  858. }
  859. }
  860. .tui-popup-box {
  861. position: relative;
  862. box-sizing: border-box;
  863. min-height: 168rpx;
  864. padding: 6rpx 24rpx;
  865. .tui-popup-content {
  866. padding-top: 30rpx;
  867. }
  868. }
  869. .layer-smimg {
  870. width: 114rpx;
  871. height: 114rpx;
  872. float: left;
  873. border-radius: 10rpx;
  874. margin-right: 24rpx;
  875. image {
  876. width: 114rpx;
  877. height: 114rpx;
  878. border-radius: 10rpx;
  879. }
  880. }
  881. .layer-nunbox {
  882. justify-content: space-between;
  883. align-items: center;
  884. width: 536rpx;
  885. height: 88rpx;
  886. padding: 13rpx 0 0 0;
  887. float: left;
  888. .layer-nunbox-t {
  889. width: 100%;
  890. height: 44rpx;
  891. position: relative;
  892. display: flex;
  893. .layer-nunbox-text {
  894. line-height: 44rpx;
  895. font-size: $font-size-28;
  896. }
  897. .number-box {
  898. display: flex;
  899. justify-content: center;
  900. align-items: center;
  901. border: 2rpx solid #ffe6dc;
  902. border-radius: 30rpx;
  903. height: 48rpx;
  904. margin-left: 20rpx;
  905. .iconfont {
  906. font-size: $font-size-24;
  907. padding: 0 18rpx;
  908. color: #999999;
  909. text-align: center;
  910. line-height: 48rpx;
  911. font-weight: bold;
  912. background: #fef6f3;
  913. &.icon-jianhao {
  914. border-radius: 30rpx 0 0 30rpx;
  915. }
  916. &.icon-jiahao {
  917. border-radius: 0 30rpx 30rpx 0;
  918. }
  919. }
  920. .btn-input {
  921. width: 62rpx;
  922. height: 48rpx;
  923. line-height: 48rpx;
  924. background: #ffffff;
  925. border-radius: 4rpx;
  926. text-align: center;
  927. font-size: $font-size-28;
  928. }
  929. }
  930. .product-step {
  931. position: absolute;
  932. left: 45rpx;
  933. bottom: 0;
  934. height: 44rpx;
  935. background: #ffffff;
  936. }
  937. }
  938. .layer-nunbox-b {
  939. width: 100%;
  940. height: 44rpx;
  941. margin-top: 13rpx;
  942. }
  943. .text {
  944. line-height: 44rpx;
  945. font-size: $font-size-28;
  946. .p {
  947. color: #ff2a2a;
  948. }
  949. .p:first-child {
  950. margin-left: 30rpx;
  951. }
  952. .p.sm {
  953. font-size: $font-size-24;
  954. }
  955. }
  956. }
  957. .tui-popup-btn {
  958. width: 100%;
  959. height: auto;
  960. float: left;
  961. box-sizing: border-box;
  962. margin-top: 30rpx;
  963. .superv-header-checked {
  964. float: left;
  965. font-size: $font-size-30;
  966. .oltext {
  967. width: 120rpx;
  968. float: left;
  969. color: #666666;
  970. display: flex;
  971. margin-left: 10rpx;
  972. .checkbox {
  973. display: flex;
  974. margin: 0;
  975. padding: 0;
  976. display: flex;
  977. flex-direction: column;
  978. align-items: center;
  979. box-sizing: border-box;
  980. text-align: center;
  981. text-decoration: none;
  982. border-radius: 0;
  983. -webkit-tap-highlight-color: transparent;
  984. overflow: hidden;
  985. font-size: 34rpx;
  986. color: $color-system;
  987. line-height: 80rpx;
  988. }
  989. .text {
  990. float: left;
  991. line-height: 80rpx;
  992. margin-left: 15rpx;
  993. }
  994. }
  995. .ortext {
  996. width: 120rpx;
  997. float: right;
  998. color: $color-system;
  999. text-align: right;
  1000. }
  1001. }
  1002. .tui-button {
  1003. width: 210rpx;
  1004. height: 88rpx;
  1005. float: right;
  1006. background: #e1e1e1;
  1007. line-height: 88rpx;
  1008. text-align: center;
  1009. color: #ffffff;
  1010. font-size: $font-size-28;
  1011. border-radius: 44rpx;
  1012. margin-left: 32rpx;
  1013. &.add {
  1014. background: #ffe6dc;
  1015. color: #e15616;
  1016. }
  1017. &.buy {
  1018. background: $btn-confirm;
  1019. }
  1020. }
  1021. .tui-flex-btn {
  1022. width: 100%;
  1023. height: 88rpx;
  1024. display: flex;
  1025. box-sizing: border-box;
  1026. padding: 0 34rpx;
  1027. .button {
  1028. width: 280rpx;
  1029. height: 88rpx;
  1030. color: #fff;
  1031. display: flex;
  1032. align-items: center;
  1033. justify-content: center;
  1034. font-size: $font-size-28;
  1035. border-radius: 44rpx;
  1036. &.buy {
  1037. background: $btn-confirm;
  1038. margin-left: 78rpx;
  1039. }
  1040. &.add {
  1041. background: #ffe6dc;
  1042. color: #e15616;
  1043. }
  1044. }
  1045. }
  1046. }
  1047. </style>