productdetails.vue 21 KB

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