index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. <template>
  2. <view>
  3. <!-- #ifdef MP-ALIPAY -->
  4. <view v-if="$pagesNum() > 1">
  5. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的仓库" leftIconSize="0"></u-navbar>
  6. </view>
  7. <view v-else>
  8. <u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="我的仓库">
  9. <view class="nav-left flex" slot="left" @click="$toIndex()">
  10. <u-icon name="arrow-left" size="20" color="#333"></u-icon>
  11. </view>
  12. </u-navbar>
  13. </view>
  14. <!-- #endif -->
  15. <!-- #ifndef MP-ALIPAY -->
  16. <view v-if="$pagesNum() > 1">
  17. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的仓库"></u-navbar>
  18. </view>
  19. <view v-else>
  20. <u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="我的仓库">
  21. <view class="nav-left flex" slot="left" @click="$toIndex()">
  22. <u-icon name="arrow-left" size="20" color="#333"></u-icon>
  23. </view>
  24. </u-navbar>
  25. </view>
  26. <!-- #endif -->
  27. <!-- 奖品选择 -->
  28. <view class="prize-state">
  29. <!-- 类型 -->
  30. <view class="prize-state-tabs">
  31. <u-tabs @change="changeTab" :scrollable="false" :list="stateArr" lineWidth="30" lineHeight="3"
  32. :current='currentIndex' lineColor="#F9822C " :activeStyle="{
  33. color: '#333 ',
  34. transform: 'scale(1.1)',
  35. width: '120px'
  36. }" :inactiveStyle="{
  37. color: '#999',
  38. transform: 'scale(1)',
  39. width: '120px'
  40. }" itemStyle="padding-left: 20px; padding-right: 15px; height: 44px; text-align: center;">
  41. </u-tabs>
  42. </view>
  43. <!-- 商品状态 -->
  44. <!-- <view class="prize-state-type flex" v-if="state == 0">
  45. <view class="prize-state-type-item" :class="{ 'prize-state-type-item__action': index == typeIndex }"
  46. v-for="(item, index) in typeList" :key="index" @click="typeState(index)">{{ item.name }}</view>
  47. </view> -->
  48. </view>
  49. <!-- 实物商品 -->
  50. <view class="prize-goods" v-if="state == 0">
  51. <view class="prize-goods-list">
  52. <view class="prize-goods-list-item" v-for="(item, index) in list" :key="index">
  53. <!-- <view class="prize-goods-list-item" v-for="(item, index) in list" :key="index" > -->
  54. <!-- 商品 -->
  55. <view class="prize-goods-list-item__content flex">
  56. <view class="flex" v-if="item.status == 1">
  57. <u-checkbox-group>
  58. <u-checkbox size="24" :value="item.checked" shape="circle" :checked="item.checked"
  59. activeColor="#F9822C" @change="changeChecked($event, item)"></u-checkbox>
  60. </u-checkbox-group>
  61. </view>
  62. <view class="info flex" @click="toPrizeGoods(item)">
  63. <image :src="item.picUrl" mode="aspectFill"></image>
  64. <view class="desc flex">
  65. <view class="ells title">{{ item.title }}</view>
  66. <view class="num flex">
  67. <view class="sku ells-one" v-if="item.goodsType === 1">规格:{{ item.properties || '-' }}</view>
  68. <view class="sku ells-one" v-else></view>
  69. <view class="">共{{ item.goodsNum }}件</view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 来源 -->
  75. <view class="prize-goods-list-item__btn flex" v-if="item.status == 1">
  76. <view class="type">来自:{{ item.inType && item.inType.desc }}</view>
  77. <view class="btn" @click="toRecovery(item)" v-if="item.inType.value == '1' && item.recovery && item.discountRate > 0">兑换盲豆</view>
  78. <view class="btn" @click="toRecovery(item)" v-else-if="item.inType.value == '1' && item.type.value == 'offline' && item.discountRate > 0">兑换盲豆</view>
  79. </view>
  80. <view class="prize-goods-list-item__btn flex" v-else>
  81. <view class="type"></view>
  82. <!-- <view class="btnTwo">已兑换</view> -->
  83. </view>
  84. </view>
  85. <u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
  86. </view>
  87. <view class="flex empty" v-if="!list.length && !loading">
  88. <view class="center">
  89. <image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode="scaleToFill"></image>
  90. <view class="center-font">还没有商品</view>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- 优惠券 -->
  95. <view class="prize-coupon" v-else>
  96. <view class="prize-coupon-list">
  97. <view @click="toPrizeDetail(item)" class="prize-coupon-list-item" v-for="(item, index) in list" :key="index">
  98. <view class="content flex">
  99. <view class="content-left flex">
  100. <image src="../static/prize_coupon.png" mode="scaleToFill"></image>
  101. <view class="price flex">
  102. <text>{{ item.discount / 100 }}</text>
  103. <text>元</text>
  104. </view>
  105. </view>
  106. <view class="content-right flex">
  107. <view class="title ells-one">{{ item.title }}</view>
  108. <view class="desc" v-if="item.type && JSON.parse(item.type).value == 2 && item.useArea && JSON.parse(item.useArea).value == 1">适用范围:点击查看</view>
  109. <view class="desc" v-else-if="item.type && JSON.parse(item.type).value == 2 && item.useArea && JSON.parse(item.useArea).value == 0">适用范围:点击查看</view>
  110. <view class="desc" v-else>适用范围:{{ item.useAreaDesc || '-' }}</view>
  111. <view class="desc">使用期限:{{ $parseTime(item.validStart, '{y}.{m}.{d}') }} ~ {{ $parseTime(item.validEnd, '{y}.{m}.{d}') }}</view>
  112. </view>
  113. </view>
  114. <view class="btn flex">
  115. <view class="btn-title" v-if="JSON.parse(item.useArea).value != '4'">立即使用</view>
  116. <view class="btn-title" v-else>查看详情</view>
  117. </view>
  118. </view>
  119. <u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
  120. </view>
  121. <view class="flex empty" v-if="!list.length && !loading">
  122. <view class="center">
  123. <image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode="scaleToFill"></image>
  124. <view class="center-font">还没有优惠券</view>
  125. </view>
  126. </view>
  127. </view>
  128. <view class="prize-action">
  129. <!-- 实物商品提货 -->
  130. <view class="flex prize-action-goods" v-if="state == 0 && statusIndex == 1">
  131. <view class="flex checkbox">
  132. <u-checkbox-group>
  133. <u-checkbox v-model="checkedAll" shape="circle" size="24" :checked="checkedAll"
  134. activeColor="#F9822C" @change="changeCheckedAll($event)"></u-checkbox>
  135. </u-checkbox-group>
  136. <view class="all">全选</view>
  137. </view>
  138. <view class="btn" @click="toSettlement">立即提货</view>
  139. </view>
  140. <!-- 优惠券使用记录 -->
  141. <view class="flex prize-action-coupon" @click="toCoupon" v-if="state == 1">
  142. <view class="title">优惠券使用记录</view>
  143. <u-icon name="arrow-right" size="15" color="#999"></u-icon>
  144. </view>
  145. </view>
  146. <!-- 兑换成功 -->
  147. <u-popup :show="tipShow" mode="center">
  148. <view class="tip-show">
  149. <view class="tip-show-title">
  150. <view>确认选择后,如需变更规格,请联系客服</view>
  151. </view>
  152. <view class="tip-show-titletwo">
  153. <view>当前规格:{{tipData.properties}}</view>
  154. </view>
  155. <view class="flex tip-show-btn">
  156. <view class="close" @click="tipShow = false">取消</view>
  157. <view class="prize" @click="tipSecction">确认选择</view>
  158. </view>
  159. </view>
  160. </u-popup>
  161. <!-- 商品选择sku -->
  162. <sku-popup
  163. :popup-show="skuPopupShow"
  164. :detailInfo="info"
  165. :popup-info="payInfo"
  166. :sku-list-init="skuListInit"
  167. :sku-list-popup="skuList"
  168. @close="close"
  169. @success="skuSuccess"
  170. v-if="skuPopupShow"
  171. />
  172. </view>
  173. </template>
  174. <script>
  175. import env from '../../config/env.js'
  176. import $http from '@/utils/request.js'
  177. import skuPopup from '../components/sku-popup/sku-popup.vue'
  178. export default {
  179. components: {
  180. skuPopup
  181. },
  182. data() {
  183. return {
  184. status: 'nomore',//上拉刷新状态
  185. loading: false,
  186. stateArr: [{
  187. name: ' 商品',
  188. }, {
  189. name: ' 优惠券',
  190. }],
  191. // typeList: [{
  192. // name: '待提货'
  193. // },
  194. // {
  195. // name: '已兑换'
  196. // },
  197. // ],
  198. typeIndex: 0,
  199. state: 0,
  200. checkedAll: false,
  201. pageNum: 1,
  202. total: 0,
  203. list: [],
  204. currentIndex: 0,
  205. statusIndex: 1,
  206. info: {},
  207. skuPopupShow: false,//选择框
  208. skuList: [],
  209. skuListInit: [],
  210. tipShow: false,
  211. tipData: {},
  212. payInfo: {},
  213. // infoItem: {},
  214. };
  215. },
  216. onShow() {
  217. this.pageList()
  218. this.couponNum()
  219. },
  220. onLoad(opthios) {
  221. if (opthios != undefined) {
  222. if (opthios.coupon == 1) {
  223. this.currentIndex = 1
  224. this.state = 1
  225. } else {
  226. this.currentIndex = 0
  227. this.state = 0
  228. }
  229. }
  230. },
  231. methods: {
  232. getList() {
  233. let _this = this
  234. let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : '/api/v1/mp/user/mine/coupon/list'
  235. let data = _this.state == 0 ? { } : {
  236. status: 1
  237. }
  238. this.loading = true
  239. this.checkedAll = false
  240. $http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, data).then(res => {
  241. this.loading = false
  242. if (res.code == 0) {
  243. res.rows.forEach(item => {
  244. item.status = JSON.parse(item.status).value
  245. let picUrlArr = item.picUrl.split(',')
  246. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  247. if (_this.state == 0) {
  248. item.checked = false
  249. item.inType = JSON.parse(item.inType)
  250. item.type = JSON.parse(item.type)
  251. }
  252. })
  253. _this.total = res.total
  254. _this.list = _this.list.concat(res.rows)
  255. }
  256. }).catch(() => {
  257. this.loading = false
  258. })
  259. },
  260. getListTwo(){
  261. let _this = this
  262. let url = '/api/v1/mp/user/prize/recovery/list'
  263. this.loading = true
  264. this.checkedAll = false
  265. $http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, {}).then(res => {
  266. uni.hideLoading();
  267. this.loading = false
  268. if (res.code == 0) {
  269. res.rows.forEach(item => {
  270. item.status = 3
  271. item.goodsNum = item.num
  272. let picUrlArr = item.picUrl.split(',')
  273. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  274. })
  275. _this.total = res.total
  276. _this.list = _this.list.concat(res.rows)
  277. }
  278. }).catch(() => {
  279. uni.hideLoading();
  280. this.loading = false
  281. })
  282. },
  283. typeState(index){
  284. this.list = []
  285. this.typeIndex = index//样式改变
  286. // this.statusIndex = index
  287. if(index == 0 ){
  288. this.statusIndex = 1 //待提货
  289. this.pageNum = 1
  290. this.getList()
  291. }
  292. if(index == 1 ){
  293. this.statusIndex = 3 //已兑换
  294. this.pageNum = 1
  295. this.getListTwo()
  296. }
  297. },
  298. toRecovery(item) {
  299. uni.navigateTo({
  300. url: `/packageGoods/recovery/index?goodsId=${ item.goodsId}&num=${ item.goodsNum }&storageId=${ item.storageId }&properties=${item.properties }&skuId=${ item.skuId }`
  301. })
  302. },
  303. pageList() {
  304. this.typeIndex = 0
  305. this.pageNum = 1
  306. this.list = []
  307. this.getList()
  308. },
  309. // 切换奖品
  310. changeTab(e) {
  311. if (e.index == 0) {
  312. this.state = 0
  313. this.statusIndex = 1
  314. } else if (e.index == 1) {
  315. this.state = 1
  316. }
  317. this.pageList()
  318. this.checkedAll = false
  319. },
  320. close() {
  321. this.skuPopupShow = false
  322. this.tipShow = false
  323. },
  324. skuSuccess(data) {
  325. this.tipData = data
  326. this.close()
  327. this.tipShow = true
  328. // this.pageList()
  329. },
  330. tipSecction() {
  331. uni.showLoading({
  332. title: '兑换中'
  333. });
  334. $http.post('/api/v1/mp/user/mine/prize/saveSku', this.tipData).then(res => {
  335. uni.hideLoading();
  336. if (res.code == 0) {
  337. for (var i = 0; i < this.list.length; i++) {
  338. if(this.list[i].storageId == this.info.storageId){
  339. this.$set(this.list[i],"properties",this.tipData.properties)
  340. }
  341. }
  342. this.close()
  343. } else if (res.code == 1021) {
  344. uni.$u.toast(res.msg);
  345. }
  346. }).catch(() => {
  347. uni.hideLoading();
  348. })
  349. },
  350. changeChecked(e, item) {
  351. if(item.checked == false && item.isMoreSku == 1 && item.inType.value != 2 && item.properties == ""){
  352. $http.post('/api/v1/mp/user/exchange/goods/detail', {
  353. goodsId: item.goodsId,
  354. noToken: true
  355. }).then(res => {
  356. this.info = item
  357. this.skuPopupShow = true
  358. this.skuListInit = res.data.skuList
  359. if (res.data.skuList.length) {
  360. let skuProp = JSON.parse(res.data.skuProp)
  361. skuProp.forEach(item => {
  362. item.actionIndex = 0,
  363. item.txt = `${item.name}:${item.value[0]}`
  364. })
  365. let actionSku = skuProp.map(item => {
  366. return item.txt
  367. }).join(';')
  368. let sku = res.data.skuList.find(item => {
  369. return item.properties == actionSku
  370. })
  371. this.payInfo = {
  372. ...sku,
  373. exValue: sku.exchangePrice,
  374. storageId: item.storageId,
  375. price: sku.value,
  376. picUrl: env.filePublic + sku.picUrl
  377. }
  378. this.skuList = skuProp
  379. } else {
  380. this.payInfo = {
  381. ...res.data,
  382. price: this.info.value,
  383. exValue: this.info.exchangePrice,
  384. picUrl: this.picUrlArr[0],
  385. storageId: item.storageId,
  386. }
  387. }
  388. })
  389. }
  390. let bool = this.list.every(res => res.checked ? item.goodsType == res.goodsType : item.goodsType)
  391. if(!bool && e == true) {
  392. uni.$u.toast('实物商品和卡密商品不能同时提货')
  393. }
  394. this.$set(item, 'checked', e)
  395. let flag = this.list.every(item => item.checked == true)
  396. this.checkedAll = flag
  397. this.$forceUpdate()
  398. },
  399. changeCheckedAll(e) {
  400. this.checkedAll = e
  401. this.list.forEach(item => {
  402. item.checked = e
  403. })
  404. this.$forceUpdate()
  405. },
  406. // 查看优惠券使用记录
  407. toCoupon() {
  408. uni.navigateTo({
  409. url: '/packagePrize/coupon/use'
  410. })
  411. },
  412. // 立即提货
  413. toSettlement() {
  414. let arr = []
  415. this.list.forEach(item => {
  416. if (item.checked) {
  417. arr.push(item)
  418. }
  419. })
  420. if (!arr.length) {
  421. uni.$u.toast('请选择商品');
  422. return
  423. }
  424. let bool = this.list.every(res => res.checked ? arr[0].goodsType === res.goodsType : arr[0].goodsType)
  425. if(!bool){
  426. uni.$u.toast('实物商品和卡密商品不能同时提货');
  427. return;
  428. }
  429. for (var i = 0; i < this.list.length; i++) {
  430. //选中 && 是多sku && 不为盲豆兑换 && sku为空
  431. if(this.list[i].checked && this.list[i].isMoreSku == 1 && this.list[i].inType.value != 2 && this.list[i].properties == ""){
  432. $http.post('/api/v1/mp/user/exchange/goods/detail', {
  433. goodsId: this.list[i].goodsId,
  434. noToken: true
  435. }).then(res => {
  436. this.info = this.list[i]
  437. this.skuPopupShow = true
  438. this.skuListInit = res.data.skuList
  439. if (res.data.skuList.length) {
  440. let skuProp = JSON.parse(res.data.skuProp)
  441. skuProp.forEach(item => {
  442. item.actionIndex = 0,
  443. item.txt = `${item.name}:${item.value[0]}`
  444. })
  445. let actionSku = skuProp.map(item => {
  446. return item.txt
  447. }).join(';')
  448. let sku = res.data.skuList.find(item => {
  449. return item.properties == actionSku
  450. })
  451. this.payInfo = {
  452. ...sku,
  453. exValue: sku.exchangePrice,
  454. storageId: this.list[i].storageId,
  455. price: sku.value,
  456. picUrl: env.filePublic + sku.picUrl
  457. }
  458. this.skuList = skuProp
  459. } else {
  460. this.payInfo = {
  461. ...res.data,
  462. price: this.info.value,
  463. exValue: this.info.exchangePrice,
  464. picUrl: this.picUrlArr[0],
  465. storageId: this.list[i].storageId,
  466. }
  467. }
  468. })
  469. return
  470. }
  471. }
  472. uni.showLoading({
  473. title: '提货中'
  474. });
  475. let ids = JSON.stringify(arr.map(item => item.storageId))
  476. uni.hideLoading();
  477. uni.navigateTo({
  478. url: `/packageGoods/order/settlement?ids=${ ids }`
  479. })
  480. },
  481. couponNum() {
  482. $http.post(`/api/v1/mp/user/mine/prize/list?pageNum=1&pageSize=20`, {
  483. }).then(res => {
  484. $http.post(`/api/v1/mp/user/mine/coupon/list?pageNum=1&pageSize=20`, {
  485. status: 1
  486. }).then(data => {
  487. if (res.code == 0) {
  488. this.stateArr = [{
  489. name: ' 商品 (' + res.total + ') '
  490. },
  491. {
  492. name: ' 优惠券 (' + data.total + ') '
  493. },
  494. ]
  495. } else {
  496. this.stateArr = [{
  497. name: ' 商品 (0)'
  498. },
  499. {
  500. name: ' 优惠券 (0)'
  501. },
  502. ]
  503. }
  504. })
  505. });
  506. },
  507. toPrizeGoods(item) {
  508. uni.navigateTo({
  509. url: `/packagePrize/goods/detail?id=${ item.goodsId }`
  510. })
  511. },
  512. toPrizeDetail(item) {
  513. let boxIds = JSON.stringify(item.boxIds)
  514. let useArea = JSON.parse(item.useArea)
  515. let type = JSON.parse(item.type)
  516. // 1判断type,如果为门店直接跳转不需要判断useArec
  517. if (type.value == 2) {
  518. // data.value 2为指定优惠券 0为通用优惠券
  519. uni.navigateTo({
  520. url: `/packagePrize/coupon/detail?id=${ item.id }`
  521. })
  522. } else {
  523. // 3为线上票使用
  524. if (useArea.value == 3 || useArea.value == 1) {
  525. uni.navigateTo({
  526. url: `/packageGoods/ticket/index?ids=${ boxIds }`
  527. })
  528. }
  529. //0为通用优惠券
  530. if (useArea.value == 0) {
  531. uni.navigateTo({
  532. url: `/packageGoods/ticket/index`
  533. })
  534. }
  535. // 4为线下票使用
  536. if (useArea.value == 4) {
  537. uni.navigateTo({
  538. url: `/packagePrize/coupon/detail?id=${ item.id }`
  539. })
  540. }
  541. }
  542. }
  543. },
  544. onReachBottom() {
  545. if(this.total < this.pageNum * 20) return ;
  546. this.status = 'loading';
  547. ++this.pageNum
  548. if(this.total < this.pageNum * 20) this.status = 'nomore';
  549. else this.status = 'loading';
  550. this.statusIndex == 3 && this.state == 0 ? this.getListTwo():this.getList()
  551. },
  552. }
  553. </script>
  554. <style lang="scss" scoped>
  555. .empty {
  556. height: 60vh;
  557. }
  558. .prize-state {
  559. position: fixed;
  560. background-color: #FFFFFF;
  561. width: 100%;
  562. z-index: 10;
  563. box-shadow: 0 2rpx 2rpx #ececec;
  564. // 类型
  565. &-tabs {
  566. display: flex;
  567. box-shadow: 0 5rpx 5rpx #ececec;
  568. }
  569. // 商品状态
  570. &-type {
  571. justify-content: flex-start;
  572. padding: 24rpx 34rpx;
  573. &-item {
  574. margin-right: 34rpx;
  575. padding: 12rpx 36rpx;
  576. border-radius: 24rpx;
  577. color: #FFAB4D;
  578. }
  579. &-item__action {
  580. background: #FFAB4D;
  581. color: #fff;
  582. }
  583. }
  584. }
  585. // 实物商品
  586. .prize-goods {
  587. // margin-top: 180rpx;
  588. margin-top: 70rpx;
  589. padding: 34rpx 34rpx 200rpx;
  590. &-list {
  591. &-item {
  592. padding: 34rpx 22rpx 34rpx;
  593. background-color: #fff;
  594. border-radius: 18rpx;
  595. margin-bottom: 30rpx;
  596. &__content {
  597. justify-content: space-between;
  598. padding-bottom: 34rpx;
  599. .info {
  600. padding-left: 16rpx;
  601. flex: 1;
  602. justify-content: flex-start;
  603. image {
  604. width: 176rpx;
  605. height: 176rpx;
  606. border-radius: 12rpx;
  607. }
  608. .desc {
  609. height: 176rpx;
  610. padding-left: 22rpx;
  611. flex: 1;
  612. font-size: 30rpx;
  613. flex-direction: column;
  614. align-items: flex-start;
  615. justify-content: space-between;
  616. .title {
  617. line-height: 40rpx;
  618. font-weight: bold;
  619. }
  620. .num {
  621. width: 100%;
  622. color: #666666;
  623. font-size: 26rpx;
  624. justify-content: space-between;
  625. .sku {
  626. flex: 1;
  627. }
  628. }
  629. }
  630. }
  631. }
  632. &__btn {
  633. justify-content: space-between;
  634. .type {
  635. font-size: 26rpx;
  636. color: #999999;
  637. line-height: 26rpx;
  638. padding-left: 70rpx;
  639. }
  640. .btn {
  641. width: 168rpx;
  642. height: 60rpx;
  643. line-height: 60rpx;
  644. text-align: center;
  645. color: #F9822C;
  646. border: 1px solid #F9822C;
  647. border-radius: 30rpx;
  648. }
  649. .btnTwo {
  650. width: 168rpx;
  651. height: 60rpx;
  652. line-height: 60rpx;
  653. text-align: center;
  654. border-radius: 30rpx;
  655. background-color: #f1f1f1;
  656. color: #666;
  657. border: 2rpx solid #999;
  658. }
  659. }
  660. }
  661. &-item:last-child {
  662. margin-bottom: 0;
  663. }
  664. }
  665. }
  666. // 优惠券
  667. .prize-coupon {
  668. margin-top: 85rpx;
  669. padding: 20rpx 20rpx 150rpx;
  670. &-list {
  671. &-item {
  672. padding-top: 30rpx;
  673. margin-bottom: 30rpx;
  674. background-color: #fff;
  675. .content {
  676. width: 100%;
  677. height: 184rpx;
  678. justify-content: flex-start;
  679. margin-bottom: 40rpx;
  680. &-left {
  681. width: 210rpx;
  682. height: 100%;
  683. margin-right: 20rpx;
  684. image {
  685. width: 100%;
  686. height: 100%;
  687. }
  688. .price {
  689. position: absolute;
  690. color: #fff;
  691. text:first-child {
  692. font-size: 45rpx;
  693. }
  694. text:last-child {
  695. font-size: 40rpx;
  696. }
  697. }
  698. }
  699. &-right {
  700. flex: 1;
  701. align-items: flex-start;
  702. flex-direction: column;
  703. justify-content: space-between;
  704. height: 100%;
  705. padding: 24rpx 0;
  706. .title {
  707. font-size: 32rpx;
  708. line-height: 32rpx;
  709. height: 32rpx;
  710. overflow: hidden;
  711. font-weight: bold;
  712. }
  713. .desc {
  714. font-size: 24rpx;
  715. line-height: 24rpx;
  716. color: #999999;
  717. }
  718. }
  719. }
  720. .btn {
  721. padding: 20rpx 0 22rpx;
  722. margin: 0 30rpx 0;
  723. border-top: 1px solid #F2F2F2;
  724. &-title {
  725. font-size: 30rpx;
  726. line-height: 30rpx;
  727. height: 30rpx;
  728. font-weight: bold;
  729. color: #F9822C;
  730. }
  731. }
  732. }
  733. &-item:last-child {
  734. margin-bottom: 0;
  735. }
  736. }
  737. }
  738. .prize-action {
  739. position: fixed;
  740. bottom: var(--window-bottom);
  741. left: 0;
  742. right: 0;
  743. z-index: 10;
  744. box-shadow: 0 -4rpx 10rpx 0 rgba(151, 151, 151, 0.24);
  745. background: #fff;
  746. width: 100%;
  747. // 设置ios刘海屏底部横线安全区域
  748. padding-bottom: constant(safe-area-inset-bottom);
  749. padding-bottom: env(safe-area-inset-bottom);
  750. &-goods {
  751. justify-content: space-between;
  752. padding: 20rpx 40rpx;
  753. .all {
  754. margin-right: 10rpx;
  755. }
  756. .btn {
  757. width: 225rpx;
  758. height: 82rpx;
  759. font-size: 28rpx;
  760. line-height: 82rpx;
  761. border-radius: 40rpx;
  762. background-color: #F9822C;
  763. color: #fff;
  764. text-align: center;
  765. }
  766. }
  767. &-coupon {
  768. padding: 24rpx 40rpx;
  769. .title {
  770. margin-right: 10rpx;
  771. color: #999;
  772. line-height: 40rpx;
  773. }
  774. }
  775. }
  776. .empty {
  777. height: 60vh;
  778. .center {
  779. text-align: center;
  780. &-img {
  781. width: 228rpx;
  782. height: 320rpx;
  783. }
  784. &-font {
  785. font-size: 30rpx;
  786. font-weight: 400;
  787. color: #999999;
  788. margin-bottom: 350rpx;
  789. }
  790. }
  791. }
  792. .tip-show {
  793. width: 80vw;
  794. background-color: #FFFFFF;
  795. border-radius: 10rpx;
  796. padding: 60rpx 40rpx;
  797. &-title {
  798. margin-bottom: 64rpx;
  799. view {
  800. margin-left: 20rpx;
  801. }
  802. }
  803. &-titletwo {
  804. margin-bottom: 64rpx;
  805. view {
  806. margin-left: 20rpx;
  807. color: #999; font-size: 26rpx;
  808. }
  809. }
  810. &-btn {
  811. justify-content: space-around;
  812. .close {
  813. width: 160rpx;
  814. height: 60rpx;
  815. line-height: 60rpx;
  816. border-radius: 8rpx;
  817. color: rgba(235, 112, 9, 100);
  818. font-size: 28rpx;
  819. text-align: center;
  820. border: 1px solid rgba(235, 112, 9, 100);
  821. }
  822. .prize {
  823. width: 160rpx;
  824. height: 60rpx;
  825. line-height: 60rpx;
  826. border-radius: 8rpx;
  827. color: rgba(235, 112, 9, 100);
  828. font-size: 28rpx;
  829. text-align: center;
  830. background-color: rgba(235, 112, 9, 100);
  831. color: rgba(255, 255, 255, 100);
  832. font-size: 14px;
  833. }
  834. }
  835. }
  836. </style>