productdetails.vue 21 KB

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