productdetails.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. <template>
  2. <view class="pages">
  3. <u-navbar
  4. title="产品详情"
  5. :placeholder="true"
  6. :autoBack="false"
  7. @leftClick="leftClick"
  8. :safeAreaInsetTop="true"
  9. >
  10. </u-navbar>
  11. <u-loading-page :loading="loadingPage" bgColor="#f1f1f1"></u-loading-page>
  12. <u-swiper
  13. v-if="details.slideImgList.length>0"
  14. :list="details.slideImgList"
  15. height="700rpx"
  16. @change="e => currentNum = e.current"
  17. :autoplay="false"
  18. indicatorStyle="right: 20px"
  19. >
  20. <view
  21. slot="indicator"
  22. class="indicator-num"
  23. >
  24. <text class="indicator-num__text">{{ currentNum + 1 }}/{{ details.slideImgList.length }}</text>
  25. </view>
  26. </u-swiper>
  27. <view class="product-info view-wrap">
  28. <view class="red">
  29. <view class="">
  30. <!-- <text class="vip-icon">VIP</text> -->
  31. <view class="exchangeCredit u-flex" v-if="details.isCredit==1">
  32. <text class="price">¥ <text class="price-num">{{details.exchangeType==0?0:details.salePrice}}</text></text>
  33. +{{details.exchangeCredit}}
  34. <text style="font-size: 30rpx;">积分</text>
  35. </view>
  36. <view class="u-flex" v-else>
  37. <text class="price">¥ <text class="price-num">{{details.vipPrice}}</text></text>
  38. <text class="price-type" style="margin-left: 20rpx;">会员价</text>
  39. </view>
  40. </view>
  41. <!-- <view class="" v-else>
  42. <text v-if="details.isCredit==1&&details.exchangeType==0" class="price">¥ <text class="price-num">0</text></text>
  43. <text v-else class="price">¥ <text class="price-num">{{details.salePrice}}</text></text>
  44. <text class="exchangeCredit" v-if="details.isCredit==1">+{{details.exchangeCredit}}积分</text>
  45. </view> -->
  46. </view>
  47. <view class="u-flex u-row-between gray">
  48. <text class="line-through" v-if="details.isCredit!=1">¥ <text class="">{{details.salePrice}}</text></text>
  49. <text class="">库存 {{details.stock}}</text>
  50. </view>
  51. <view class="name">{{details.goodsName}}</view>
  52. </view>
  53. <view class="specification info-line u-flex view-wrap" v-if="details.specification">
  54. <view class="info-til">规格</view>
  55. <view class="info-con u-flex">{{details.specification}}</view>
  56. </view>
  57. <view class="addr view-wrap">
  58. <view class="addr-line u-flex">
  59. <view class="info-til">提货方式</view>
  60. <view class="info-con u-flex">
  61. <text v-for="(item,index) in logisticsType" :key="index">
  62. {{item|filterLogisticsType}}
  63. <text style="margin: 0 5px;" v-if="index<logisticsType.length-1">/</text>
  64. </text>
  65. </view>
  66. </view>
  67. <view class="addr-line u-flex" v-if="details.period">
  68. <view class="info-til">保质期</view>
  69. <view class="info-con u-flex">
  70. {{details.period|filterPeriod}}
  71. </view>
  72. </view>
  73. <!-- <view class="addr-line u-flex">
  74. <text class="addr-til">送至</text>
  75. <view class="addr-con u-flex u-flex-1">
  76. <view class="u-flex u-row-between u-flex-1">
  77. <text>贵阳市 南明区</text>
  78. <u-icon name="arrow-right" color="#676767" size="20"></u-icon>
  79. </view>
  80. </view>
  81. </view> -->
  82. </view>
  83. <view class="comment view-wrap u-flex u-row-between">
  84. <view class="left">
  85. <text class="til">评价</text>
  86. <text class="num">({{details.commentNum}})</text>
  87. </view>
  88. <view class="right u-flex" @click="$u.route('/shopping/comment',{id:details.id})">
  89. <text>查看全部</text>
  90. <u-icon name="arrow-right" color="#676767" size="20"></u-icon>
  91. </view>
  92. </view>
  93. <view class="detail view-wrap">
  94. <view class="til">详情</view>
  95. <view class="con">
  96. <!-- <view class="" v-html="details.detail"></view> -->
  97. <u-parse :content="details.detail"></u-parse>
  98. <!-- {{details.detail}} -->
  99. </view>
  100. </view>
  101. <view class="details-tool-wrap">
  102. <view class="details-tool u-flex u-row-between">
  103. <view class="left u-flex">
  104. <view class="icon-wrap">
  105. <button class="share-btn" data-name="contactBtn" open-type="contact">
  106. <u-icon name="chat" color="#676767" size="30"></u-icon>
  107. 客服
  108. </button>
  109. </view>
  110. <view class="icon-wrap" @click="openShare">
  111. <u-icon name="share" color="#676767" size="30"></u-icon>
  112. 分享
  113. <!-- <button class="share-btn" data-name="shareBtn" open-type="share">
  114. <u-icon name="share" color="#676767" size="30"></u-icon>
  115. 分享
  116. </button> -->
  117. </view>
  118. <view class="icon-wrap" v-if="details.isCredit!=1" @click="$u.route('/shopping/cart')">
  119. <u-icon name="shopping-cart" color="#676767" size="30"></u-icon>
  120. 购物车
  121. <u-badge class="badge" numberType="overflow" type="error " max="99" :value="cartTotal" :absolute="true" :offset="[0,0]"></u-badge>
  122. </view>
  123. </view>
  124. <view class="right" v-if="details.stock>0">
  125. <view class="u-flex" v-if="details.isCredit==1">
  126. <view class="btn add-btn" @click="addCreditOrder(details.id)">立即兑换</view>
  127. </view>
  128. <view class=" u-flex" v-else>
  129. <view class="btn add-btn" @click="addCart(details.id)">加入购物车</view>
  130. <view class="btn buy-btn" @click="buyNow(details.id)">立即购买</view>
  131. </view>
  132. </view>
  133. <view class="right" v-else>
  134. <view class="btn gray">暂无库存</view>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 分享选择弹出内容 -->
  139. <view class="share-option" :class="{shareShow:shareShow}">
  140. <view class="overlay" v-if="shareShow" @click="shareShow=false"></view>
  141. <button class="share-option-item wx-share" data-name="shareBtn" open-type="share">
  142. 发送给朋友
  143. </button>
  144. <view class="share-option-item" @click="getPoster">生成海报</view>
  145. <view class="share-option-item" @click="shareShow=false">取消</view>
  146. </view>
  147. <u-popup :show="posterShow" @close="posterShow=false" ref="uni-popup">
  148. <view class="poster-wrap u-flex u-col-center">
  149. <view class="poster-inner">
  150. <view class="close-wrap" @click="posterShow=false">
  151. <u-icon name="close-circle" color="#fff" size="56rpx"></u-icon>
  152. </view>
  153. <view class="poster" id="poster" ref="poster" >
  154. <u--image :showLoading="true" :src="posterSrc" width="100%" height="65vh" mode="aspectFit"></u--image>
  155. </view>
  156. <!-- savePoster -->
  157. <view class="poster-btn" @click="saveImage">保存图片</view>
  158. </view>
  159. </view>
  160. </u-popup>
  161. <u-toast ref="uToast"></u-toast>
  162. </view>
  163. </template>
  164. <script>
  165. export default {
  166. components: {
  167. },
  168. data() {
  169. return {
  170. staticUrl:this.$commonConfig.staticUrl,
  171. loadingPage:true,
  172. id:'',
  173. cartTotal:0,
  174. currentNum:0,
  175. swiperList: [],
  176. details:{
  177. slideImgList:[]
  178. },
  179. hasAddr:false,
  180. shareShow:false,
  181. posterShow:false,
  182. mode:'aspectFill',
  183. wxml:'',
  184. posterStyle:{},
  185. posterSrc:'',
  186. logisticsType:[],
  187. }
  188. },
  189. onLoad(page) {
  190. this.id = page.id;
  191. if(page.goodsId){
  192. this.id = page.goodsId;
  193. }
  194. const scene = decodeURIComponent(page.scene);
  195. scene&&uni.setStorage({
  196. key:'scene',
  197. data:scene
  198. });
  199. // console.log('this.id',this.id);
  200. this.getDetails(this.id);
  201. },
  202. onShow(){
  203. if(this.vuex_member_info.name){
  204. this.getCartList();
  205. this.getAddrList();
  206. this.goodsAddView(this.id)
  207. }
  208. },
  209. methods: {
  210. leftClick(e){
  211. let pages = getCurrentPages();
  212. if(pages.length==1){
  213. uni.$u.route('/pages/index/index')
  214. }else{
  215. uni.navigateBack()
  216. };
  217. },
  218. getCartList(isAdd){
  219. this.$u.api.cartList().then(res=>{
  220. if(isAdd){
  221. if(res.data.total==this.cartTotal){
  222. this.$refs.uToast.show({
  223. type:"success",
  224. message:'添加成功'
  225. });
  226. }
  227. }
  228. this.cartTotal = res.data.total;
  229. console.log('getCartList',res);
  230. }).catch(err=>{
  231. console.log('getCartList',err.data);
  232. })
  233. },
  234. getDetails(id){
  235. this.$u.api.memberGoodDetails({id:id}).then(res=>{
  236. this.loadingPage = false;
  237. // console.log('res',res.data);
  238. this.details = res.data;
  239. this.logisticsType = res.data.logisticsType?.split(",")||[];
  240. if(!res.data.slideImgList&&res.data.mainImg){
  241. this.details.slideImgList = [];
  242. this.details.slideImgList.push(res.data.mainImg)
  243. }
  244. }).catch(err=>{
  245. console.log('getDetails',err.data);
  246. })
  247. },
  248. goodsAddView(id){
  249. this.$u.api.goodsAddView({id:id}).then(res=>{
  250. // console.log('res',res.data);
  251. }).catch(err=>{
  252. console.log('goodsAddView',err.data);
  253. })
  254. },
  255. async addCart(id,buyNow){
  256. // 检测是否登录
  257. if (!this.checkLogin()) {
  258. return;
  259. }
  260. try {
  261. let authResult = await this.checkAuth();
  262. console.log('实名认证结果:', authResult);
  263. // 在此处可以继续执行需要进行实名认证的业务逻辑
  264. // 例如下单购买商品等操作
  265. } catch (err) {
  266. console.log('实名认证未通过:', err);
  267. return
  268. // 在此处可以处理用户未通过实名认证的情况
  269. // 例如返回上一页或者跳转到实名认证页等操作
  270. }
  271. this.checkAuth();
  272. this.$u.api.addCart({goodsId:id}).then(res=>{
  273. this.$refs.uToast.show({
  274. type:"success",
  275. message:res.msg
  276. });
  277. if(buyNow){
  278. uni.$u.route('/shopping/cart', {
  279. buyNowId: id,
  280. buyNowName:this.details.goodsName
  281. });
  282. }
  283. this.getCartList('isAdd');
  284. console.log('res',res.data);
  285. }).catch(err=>{
  286. console.log('addCart',err);
  287. })
  288. },
  289. checkLogin() {
  290. if (!this.vuex_member_info.name) {
  291. let that = this;
  292. let pageUrl = encodeURIComponent(`shopping/productdetails?id=${that.id}`);
  293. uni.showModal({
  294. title: '提示',
  295. content: '你需要登录后,才可使用此功能!',
  296. success: res => {
  297. if (res.confirm) {
  298. uni.setStorage({
  299. key: 'backUrl',
  300. data: pageUrl,
  301. success: function () {
  302. uni.$u.route('/pages/login/login')
  303. }
  304. });
  305. }
  306. }
  307. });
  308. return false;
  309. }
  310. return true;
  311. },
  312. openShare(){
  313. // 检测是否登录
  314. // if (!this.checkLogin()) {
  315. // return;
  316. // }
  317. this.shareShow = true;
  318. },
  319. async buyNow(id){
  320. // 检测是否登录
  321. if (!this.checkLogin()) {
  322. return;
  323. }
  324. try {
  325. let authResult = await this.checkAuth();
  326. console.log('实名认证结果:', authResult);
  327. // 在此处可以继续执行需要进行实名认证的业务逻辑
  328. // 例如下单购买商品等操作
  329. } catch (err) {
  330. console.log('实名认证未通过:', err);
  331. return
  332. // 在此处可以处理用户未通过实名认证的情况
  333. // 例如返回上一页或者跳转到实名认证页等操作
  334. }
  335. // this.addCart(id,'buyNow')//跳购物车
  336. if(!this.hasAddr){
  337. uni.showModal({
  338. title: '温馨提示',
  339. content: '请先设置地址!',
  340. success: res => {
  341. if (res.confirm) {
  342. let url = encodeURIComponent(`/shopping/productdetails?id=${that.id}`) ;
  343. uni.$u.route('/center/addrlist', {
  344. from: 'productdetails',
  345. backUrl:url
  346. });
  347. }
  348. }
  349. })
  350. return
  351. }
  352. this.$u.vuex('buyNowGoods',[{goodsId:this.id,quantity:1}]);
  353. uni.$u.route('/shopping/submitorder', {fromPage: 'productdetails'});
  354. },
  355. async addCreditOrder(id){
  356. // 检测是否登录
  357. if (!this.checkLogin()) {
  358. return;
  359. }
  360. try {
  361. let authResult = await this.checkAuth();
  362. console.log('实名认证结果:', authResult);
  363. // 在此处可以继续执行需要进行实名认证的业务逻辑
  364. // 例如下单购买商品等操作
  365. } catch (err) {
  366. console.log('实名认证未通过:', err);
  367. return
  368. // 在此处可以处理用户未通过实名认证的情况
  369. // 例如返回上一页或者跳转到实名认证页等操作
  370. }
  371. let that = this;
  372. let creditGoods = [];
  373. creditGoods.push({id:that.details.id,quantity:1})
  374. // console.log('creditGoods',creditGoods);
  375. that.$u.vuex('cartGoods',creditGoods);
  376. uni.$u.route('/shopping/submitorder', {fromPage:'creditOrder'});
  377. },
  378. onShareAppMessage: function( options ){
  379. var that = this;
  380. // 设置菜单中的转发按钮触发转发事件时的转发内容
  381. var shareObj = {
  382. title: this.details.goodsName, // 默认是小程序的名称(可以写slogan等)
  383. path: '/shopping/productdetails', // 默认是当前页面,必须是以‘/'开头的完整路径
  384. imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  385. success: function(res){
  386. // 转发成功之后的回调
  387. if(res.errMsg == 'shareAppMessage:ok'){
  388. }
  389. },
  390. fail: function(){
  391. // 转发失败之后的回调
  392. if(res.errMsg == 'shareAppMessage:fail cancel'){
  393. // 用户取消转发
  394. }else if(res.errMsg == 'shareAppMessage:fail'){
  395. // 转发失败,其中 detail message 为详细失败信息
  396. }
  397. },
  398. complete:function(){
  399. // 转发结束之后的回调(转发成不成功都会执行)
  400. }
  401. };
  402. // 来自页面内的按钮的转发
  403. if( options.from == 'button' ){
  404. var eData = options.target.dataset;
  405. console.log('options.target.dataset',options.target.dataset);
  406. console.log('id' ,this.details.id); // shareBtn
  407. // 此处可以修改 shareObj 中的内容
  408. shareObj.path = '/shopping/productdetails?id='+this.details.id;
  409. }
  410. // 返回shareObj
  411. return shareObj;
  412. },
  413. getAddrList(){
  414. this.$u.api.addrList().then(res=>{
  415. // this.dataList = res.data.rows;
  416. console.log('getAddrList',res);
  417. if( res.data.total>0){
  418. this.hasAddr = true;
  419. }else{
  420. this.hasAddr = false;
  421. }
  422. }).catch(err=>{
  423. console.log('getAddrList',err.data);
  424. })
  425. },
  426. checkAuth() {
  427. // console.log('details-----',this.details);
  428. let that = this;
  429. return new Promise((resolve, reject) => {
  430. console.log('vuex_member_info', this.vuex_member_info.isAuth);
  431. if (that.details.isBuy!=1&&that.details.isAuth==1) {
  432. uni.showModal({
  433. title: '温馨提示',
  434. content: '购买该商品需要实名认证,请先实名认证!',
  435. success: res => {
  436. if (res.confirm) {
  437. let url = encodeURIComponent(`/shopping/productdetails?id=${that.id}`);
  438. uni.$u.route('/center/factorauth', {
  439. from: 'productdetails',
  440. backUrl: url
  441. });
  442. reject('needAuth'); // 实名认证未通过,使用 reject 方法返回结果
  443. }
  444. }
  445. });
  446. } else {
  447. resolve('noNeedAuth'); // 实名认证已通过,使用 resolve 方法返回结果
  448. }
  449. });
  450. },
  451. // 海报相关开始
  452. getPoster(){
  453. this.posterShow = true;
  454. this.shareShow = false;
  455. this.$u.api.getPoster({goodsId:this.id}).then(res=>{
  456. this.posterSrc = res.data.imageUrl;
  457. // console.log('getPoster',res.data);
  458. }).catch(err=>{
  459. console.log('getPoster',err);
  460. })
  461. },
  462. saveImage() {
  463. let that = this;
  464. uni.showLoading({
  465. title: '保存中'
  466. });
  467. uni.downloadFile({
  468. url: this.posterSrc,
  469. success(res) {
  470. if (res.statusCode === 200) {
  471. uni.saveImageToPhotosAlbum({
  472. filePath: res.tempFilePath,
  473. success() {
  474. uni.showToast({
  475. title: '保存到相册成功',
  476. icon: 'success'
  477. });
  478. },
  479. fail(err) {
  480. console.log('保存图片失败',err);
  481. if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
  482. uni.getSetting({
  483. success(res) {
  484. if (!res.authSetting['scope.writePhotosAlbum']) {
  485. uni.showModal({
  486. title: '提示',
  487. content: '您还没有授权访问相册,请前往设置页面打开权限。',
  488. confirmText: '去设置',
  489. success(res) {
  490. if (res.confirm) {
  491. uni.openSetting();
  492. }
  493. }
  494. });
  495. } else {
  496. uni.showToast({
  497. title: '保存图片失败',
  498. icon: 'none'
  499. });
  500. }
  501. }
  502. });
  503. } else {
  504. uni.showToast({
  505. title: '保存图片失败',
  506. icon: 'none'
  507. });
  508. }
  509. },
  510. complete() {
  511. uni.hideLoading();
  512. that.posterShow = false;
  513. }
  514. });
  515. } else {
  516. uni.showToast({
  517. title: '下载图片失败',
  518. icon: 'none'
  519. });
  520. }
  521. },
  522. fail() {
  523. uni.showToast({
  524. title: '下载图片失败',
  525. icon: 'none'
  526. });
  527. }
  528. });
  529. },
  530. // 海报相关结束
  531. }
  532. }
  533. </script>
  534. <style lang="scss" scoped>
  535. .indicator-num {
  536. padding: 2px 0;
  537. background-color: rgba(0, 0, 0, 0.35);
  538. border-radius: 100px;
  539. width: 35px;
  540. @include flex;
  541. justify-content: center;
  542. &__text {
  543. color: #FFFFFF;
  544. font-size: 12px;
  545. }
  546. }
  547. .product-info{
  548. .price-num{
  549. font-size: 60rpx;
  550. font-family: PingFangSC-Semibold, PingFang SC;
  551. }
  552. .exchangeCredit{
  553. font-size: 60rpx;
  554. }
  555. .name{
  556. margin-top: 30rpx;
  557. font-size: 36rpx;
  558. font-weight: 600;
  559. color: #333;
  560. line-height: 50rpx;
  561. }
  562. }
  563. .info-line{
  564. margin-bottom: 20rpx;
  565. }
  566. .info-til{
  567. color: #999;
  568. margin-right: 40rpx;
  569. }
  570. .info-con{
  571. color: #666;
  572. }
  573. .addr{
  574. font-size: 30rpx;
  575. .addr-line:not(:last-child){
  576. margin-bottom: 20rpx;
  577. }
  578. }
  579. .comment{
  580. color: #999;
  581. .til{
  582. font-size: 30rpx;
  583. font-weight: 600;
  584. margin-right: 20rpx;
  585. color: #333;
  586. }
  587. }
  588. .detail{
  589. .til{
  590. font-size: 30rpx;
  591. color: #333;
  592. font-weight: 600;
  593. margin-bottom: 20rpx;
  594. }
  595. .con{
  596. // background-color: #F5F5F5;
  597. img{max-width: 100%;}
  598. }
  599. }
  600. .details-tool-wrap{
  601. height: 98rpx;
  602. .details-tool{
  603. position: fixed;
  604. left: 0;
  605. right: 0;
  606. bottom: 0;
  607. height: 98rpx;
  608. background-color: #fff;
  609. }
  610. .left{
  611. text-align: center;
  612. color: #666;
  613. font-size: 24rpx;
  614. .icon-wrap{
  615. position: relative;
  616. margin-left: 20rpx;
  617. }
  618. }
  619. .right{
  620. .btn{
  621. padding: 19rpx 40rpx;
  622. border-radius: 40rpx;
  623. color: #fff;
  624. margin-right: 20rpx;
  625. }
  626. .add-btn{
  627. background-color: #FFB100;
  628. }
  629. .buy-btn{
  630. background-color: #FF3C3F;
  631. }
  632. .gray{
  633. background-color: #ddd;
  634. color: #999;
  635. }
  636. }
  637. .share-btn{
  638. padding: 0;
  639. margin: 0;
  640. border: 0;
  641. font-size: 24rpx;
  642. color: #666;
  643. line-height: 1;
  644. background-color: transparent;
  645. outline: none;
  646. &::after{
  647. border: none;
  648. }
  649. }
  650. }
  651. .share-option{
  652. transform: translateY(100%);
  653. .overlay{
  654. position: fixed;
  655. left: 0;
  656. top: 0;
  657. width: 100vw;
  658. height: 100vh;
  659. background-color: rgba(0, 0, 0, 0.35);
  660. transform: translateY(-100%);
  661. }
  662. &.shareShow{
  663. transform: translateY(0);
  664. }
  665. position: fixed;
  666. width: 100%;
  667. left: 0;
  668. bottom: 0;
  669. z-index: 50;
  670. background-color: #fff;
  671. .share-option-item{
  672. position: relative;
  673. height: 46px;
  674. line-height: 46px;
  675. border: 0;
  676. background-color: #fff;
  677. text-align: center;
  678. border-radius: 0;
  679. border-bottom: 1px solid #eee;
  680. font-size: 30rpx;
  681. }
  682. .wx-share{
  683. border-bottom: 0;
  684. }
  685. }
  686. .poster-wrap{
  687. position: fixed;
  688. left: 0;
  689. top: 0;
  690. width: 100%;
  691. height: 100vh;
  692. .poster-inner{
  693. flex: 1;
  694. margin: 0 75rpx;
  695. .close-wrap{
  696. display: flex;
  697. justify-content: flex-end;
  698. margin-bottom: 16rpx;
  699. }
  700. }
  701. .poster{
  702. position: relative;
  703. // padding-bottom: 90rpx;
  704. background-color: transparent;
  705. .posterBg{
  706. position: absolute;
  707. left: 0;
  708. bottom: 0;
  709. right: 0;
  710. width: 100%;
  711. z-index: 1;
  712. }
  713. .placard{
  714. position: relative;
  715. z-index: 10;
  716. }
  717. .bottom{
  718. position: relative;
  719. z-index: 20;
  720. margin: 33rpx 40rpx 0;
  721. .left{
  722. margin-right: 58rpx;
  723. .price{
  724. font-size: 22rpx;
  725. font-weight: 600;
  726. color: #FF3538;
  727. line-height: 30rpx;
  728. margin-bottom: 10rpx;
  729. .num{
  730. font-size: 40rpx;
  731. font-weight: 600;
  732. margin-left: 5rpx;
  733. }
  734. }
  735. .goodsName{
  736. font-size: 30rpx;
  737. font-weight: 400;
  738. color: #333333;
  739. line-height: 38rpx;
  740. margin-bottom: 16rpx;
  741. }
  742. .slogan{
  743. font-size: 26rpx;
  744. font-weight: 600;
  745. line-height: 37rpx;
  746. }
  747. }
  748. .right{
  749. text-align: center;
  750. .imgTip{
  751. margin-top: 12rpx;
  752. font-size: 20rpx;
  753. font-weight: 400;
  754. color: #333333;
  755. line-height: 28rpx;
  756. }
  757. .qrcode{
  758. width: 108rpx;
  759. height:108rpx;
  760. }
  761. }
  762. }
  763. }
  764. .poster-btn{
  765. height: 88rpx;
  766. line-height: 88rpx;
  767. border-radius: 44rpx;
  768. text-align: center;
  769. color: #fff;
  770. margin-top: 40rpx;
  771. font-size: 32rpx;
  772. font-weight: 600;
  773. background: linear-gradient(90deg, #00DC84 0%, #00A447 100%);
  774. }
  775. }
  776. </style>