collection.vue 25 KB

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