collection.vue 25 KB

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