时空网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

877 lines
22 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <view>
  3. <skeleton :loading="skeletonLoading" :row="12" :showAvatar="false" :showTitle="true">
  4. <block v-if="isRight(goods_detail)">
  5. <!-- 商品图片轮播 -->
  6. <swiper :current="current" :indicator-dots="goods_detail.banners.length > 1 ? true : false"
  7. :circular="true" class="swiper-box" indicator-active-color="#FE9903">
  8. <swiper-item v-for="(item, index) in goods_detail.banners" :key="item.id">
  9. <image mode="aspectFill" :src="item.cover" style="width: 100%; height: 100%;"
  10. @click="lookImg(index)"></image>
  11. </swiper-item>
  12. </swiper>
  13. <view class="bill-position" @tap='formSubmit()' v-if="isShowButtonCount >= 2">
  14. <button class="cu-btn1 margin-left-sm lf-font-28 lf-m-20">
  15. 分享海报
  16. </button>
  17. </view>
  18. <!-- 商品主要信息 -->
  19. <view class="head-info">
  20. <view class="lf-font-40">{{ goods_detail.name }}</view>
  21. <view class="lf-row-between lf-font-24 lf-m-t-30 lf-p-b-20">
  22. <view class="lf-flex price">
  23. <lf-price :price="goods_detail.specs[0].selling_price"></lf-price>
  24. <view class="lf-m-l-20">¥{{ goods_detail.specs[0].original_price }}</view>
  25. <view v-if="goods_detail.specs[0].cost">{{ goods_detail.specs[0].cost }}</view>
  26. </view>
  27. <view class="lf-font-24 lf-text-right">
  28. <view class="lf-color-gray">{{ goods_detail.specs[0].sold_stock_text }}</view>
  29. <view class="lf-color-primary" v-if="goods_detail.specs[0].stock && goods_detail.specs[0].stock < 100">{{ goods_detail.specs[0].stock_text }}</view>
  30. </view>
  31. </view>
  32. <view class="label-box" v-if="goods_detail.tags && goods_detail.tags.length">
  33. <view class="label-item" v-for="(item, index) in goods_detail.tags" :key="index">{{ item }}
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 地址信息 -->
  38. <view class="address-box">
  39. <view class="lf-font-32 lf-font-bold">适用门店</view>
  40. <view class="lf-m-t-20 lf-row-between">
  41. <view class="lf-flex">
  42. <image mode="aspectFill" class="lf-fle shop-img" :src="goods_detail.store.cover"
  43. v-if="goods_detail.store.cover"></image>
  44. <image mode="aspectFill" class="lf-fle shop-img" src="../../static/center/shop-logo.png"
  45. v-else></image>
  46. <view class="lf-font-32 lf-m-l-20 lf-line-1" style="max-width: 512rpx;">
  47. {{ goods_detail.store.name }}</view>
  48. </view>
  49. <view @click="makePhoneCall(goods_detail.store.tel)">
  50. <text class="lf-iconfont lf-icon-dianhua lf-font-40" style="color: #3A62FF;"></text>
  51. </view>
  52. </view>
  53. <view class="lf-flex lf-m-t-20" @click="openMap">
  54. <view style="width: 60rpx; height: 60rpx;" class="lf-row-center">
  55. <text class="lf-iconfont lf-icon-dizhi lf-font-40" style="color: #555555;"></text>
  56. </view>
  57. <view class="lf-m-l-20 lf-font-28" style="color: #555555;">{{ goods_detail.store.address }}
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 商品详情 -->
  62. <view class="goods-detail">
  63. <view class="lf-font-32 lf-font-bold lf-m-b-20">商品详情</view>
  64. <rich-text :nodes="afterDone"
  65. v-if="goods_detail.content_type == 'rich_text'"></rich-text>
  66. <image class="goods-img" :src="item" v-for="(item, index) in goods_detail.content" :key="index"
  67. v-if="goods_detail.content_type == 'img'"></image>
  68. </view>
  69. <!-- 修饰专用 -->
  70. <view class="extra"></view>
  71. <!-- 吸底操作按钮 -->
  72. <view class="lf-row-between fixed-bottom">
  73. <view class="lf-flex lf-p-t-10 lf-p-b-10">
  74. <view class="lf-flex-column lf-row-center icon-item"
  75. @click="$url('/pages/index/index', {type: 'switch'})">
  76. <image class="icon-img" src="../../static/center/home.png"></image>
  77. <view class="lf-m-t-1">首页</view>
  78. </view>
  79. <view class="lf-flex-column lf-row-center icon-item"
  80. @click="$url('/pages/contactService/index')">
  81. <image class="icon-img" src="../../static/center/service.png"></image>
  82. <view class="lf-m-t-1">客服</view>
  83. </view>
  84. <view class="lf-flex-column lf-row-center icon-item" @click="switchCollect">
  85. <image class="icon-img" src="../../static/center/collect-active.png" v-if="is_collect">
  86. </image>
  87. <image class="icon-img" src="../../static/center/collect.png" v-else></image>
  88. <view class="lf-m-t-1">{{ is_collect ? '已收藏' : '收藏' }}</view>
  89. </view>
  90. <button class="lf-flex-column lf-row-center icon-item" open-type="share">
  91. <image class="icon-img" src="../../static/center/share.png"></image>
  92. <view class="lf-m-t-1">分享</view>
  93. </button>
  94. </view>
  95. <button class="btn" @click="toAddOrder">立即抢购</button>
  96. </view>
  97. <!-- 回到顶部 -->
  98. <!-- <u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}" :icon-style="{color: '#ffffff'}"></u-back-top> -->
  99. <u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}">
  100. </u-back-top>
  101. </block>
  102. </skeleton>
  103. <view class="canvas-box">
  104. <canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas" />
  105. </view>
  106. <view class='imagePathBox' v-if="maskHidden == true && imagePath" @click="maskHidden = false ">
  107. <image :src="imagePath" class='shengcheng' mode="widthFix"></image>
  108. <button class='baocun' @click.stop="saveBill()">保存相册分享到朋友圈</button>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. let SparkMD5 = require("@/common/SparkMD5.js"); // 签名加密js文件
  114. export default {
  115. data() {
  116. return {
  117. current: 0, // 轮播下标
  118. goods_id: 0,
  119. goods_detail: {},
  120. is_collect: 0, // 1为当前收藏商品了,0为否
  121. skeletonLoading: true,
  122. base64Img: '',
  123. checkArea: 'Cannot find module',
  124. maskHidden: false,
  125. info: {
  126. avatar: '',
  127. nickname: '',
  128. id: '',
  129. tel: '',
  130. tags: []
  131. },
  132. showLogin: true,
  133. imagePath: '',
  134. userToken: '',
  135. wxCode: '',
  136. onceCode: '',
  137. pt: 1,
  138. afterDone: '',
  139. backgroundImg: '',
  140. goodShare: '',
  141. s_id: '',
  142. isShowButtonCount: 0
  143. }
  144. },
  145. computed: {
  146. isRight() {
  147. return function(val) {
  148. return this.$shared.isRight(val);
  149. }
  150. }
  151. },
  152. onLoad(options) {
  153. this.goods_id = options.id;
  154. this.pt = options.pt || 1;
  155. this.s_id = options.share_id || ''
  156. this.getGoodsDetail();
  157. this.getWxCode()
  158. this.getBackground()
  159. },
  160. methods: {
  161. getBackground() {
  162. let _this = this
  163. _this.$http(_this.API.API_BILLBACKGROUND, {
  164. type: 'goods'
  165. }).then(res => {
  166. let img = res.data.img_url
  167. if (img) {
  168. wx.getImageInfo({
  169. src: img,
  170. success: function(sres) {
  171. _this.backgroundImg = sres.path;
  172. _this.isShowButtonCount++;
  173. }
  174. })
  175. }
  176. })
  177. },
  178. //获取商品分享图
  179. getGoodsBackground() {
  180. let _this = this
  181. let goods = _this.goods_detail;
  182. let imageUrl = goods.share_cover || goods.cover;
  183. wx.getImageInfo({
  184. src: imageUrl,
  185. success: function(sres) {
  186. _this.goodShare = sres.path
  187. console.log('商品分享图',_this.goodShare)
  188. }
  189. })
  190. console.log('商品分享图',_this.goodShare)
  191. },
  192. //商品绑定
  193. bindGoods() {
  194. var _this = this;
  195. let yy = new Date().getFullYear();
  196. let mm = new Date().getMonth()+1;
  197. let dd = new Date().getDate();
  198. let hh = new Date().getHours();
  199. let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
  200. let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
  201. let gettime = yy+'-'+mm+'-'+dd+' '+hh+':'+mf+':'+ss;
  202. let userInfo = uni.getStorageSync('userinfo') || {};
  203. let timeDate = Math.round(new Date().getTime() / 1000).toString();
  204. console.log(SparkMD5)
  205. let md5TimeDate = SparkMD5.hash(timeDate)
  206. let nowTime = new Date().toLocaleString();
  207. _this.$http(_this.API.API_BINDGOODS, {
  208. deed: md5TimeDate,
  209. sid: _this.s_id,
  210. gid: _this.goods_id,
  211. gn: _this.goods_detail.name,
  212. t: gettime
  213. }).then(res => {
  214. console.log(res)
  215. }).catch(err => {
  216. console.log(err)
  217. })
  218. },
  219. getWxCode() {
  220. let userInfo = uni.getStorageSync('userinfo') || {};
  221. const token = this.$shared.createToken();
  222. let options = {
  223. route: 'goods',
  224. pt: 2,
  225. id: this.goods_id,
  226. share_id: userInfo.id,
  227. scene_code: this.$scene.V2_GOODS_SHAREPOSTER
  228. }
  229. this.generateKooken(token, options); // 谁分享了就生成一个token
  230. this.$http(this.API.API_WXBILL, {
  231. scene: token,
  232. page: 'pages/route/index',
  233. width: '2800'
  234. }).then(res => {
  235. this.wxCode = res.data.base_url
  236. if (this.wxCode) {
  237. this.getwxCodeImg()
  238. }
  239. })
  240. },
  241. //海报开始
  242. //保存头像
  243. getwxCodeImg() {
  244. var imgSrc = this.wxCode; //base64编码
  245. var save = wx.getFileSystemManager();
  246. var number = Math.random();
  247. save.writeFile({
  248. filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.jpg',
  249. data: imgSrc,
  250. encoding: 'base64',
  251. success: res => {
  252. this.onceCode = wx.env.USER_DATA_PATH + '/pic' + number + '.jpg';
  253. this.isShowButtonCount++;
  254. console.log('二维码临时路径',this.onceCode)
  255. },
  256. fail: err => {
  257. console.log(err)
  258. }
  259. })
  260. },
  261. createNewImg() {
  262. var that = this;
  263. var context = wx.createCanvasContext('mycanvas');
  264. let goods = that.goods_detail;
  265. let title = goods.name;
  266. let price = '¥'+goods.specs[0].selling_price;
  267. //背景图
  268. var path = that.backgroundImg;
  269. // context.setFillStyle("#fff")
  270. // context.fillRect(0, 0, 375, 600)
  271. let goodsBackground = that.goodShare
  272. context.drawImage(path, 0, 0, 375, 496);
  273. context.drawImage(goodsBackground, 10, 10, 355, 300);
  274. //绘制二维码
  275. let wxcode = that.onceCode
  276. context.drawImage(wxcode, 244, 324, 120, 120);
  277. let message = '长按识别小程序码'
  278. context.setFontSize(16);
  279. context.setFillStyle('#999');
  280. context.setTextAlign('center');
  281. context.fillText(message,300,470);
  282. //绘制价格
  283. context.setFontSize(40);
  284. context.setFillStyle('#FF0000');
  285. context.setTextAlign('center');
  286. context.fillText(price,65, 366);
  287. if(title.length <= 11){
  288. context.setFontSize(20);
  289. context.setFillStyle('#222');
  290. context.setTextAlign('left');
  291. context.fillText(title, 10, 470);
  292. }else{
  293. let str = title;
  294. if(str.length > 22){
  295. str = str.substr(0, 21) + '...';
  296. }
  297. let before = str.substr(0, 11);
  298. let last = str.substr(11, str.length);
  299. context.setFontSize(20);
  300. context.setFillStyle('#222');
  301. context.setTextAlign('left');
  302. context.fillText(before, 10, 448);
  303. context.fillText(last, 10, 472);
  304. }
  305. /*
  306. console.log('标题长度',title.length)
  307. if(title.length < 18 ) {
  308. context.fillText(title, 10, 350);
  309. }else if(18<title.length && title.length<36) {
  310. console.log('1111')
  311. let before = title.substr(0,18)
  312. let last = title.substr(18,title.length)
  313. //绘制标题
  314. context.setFontSize(20);
  315. context.setFillStyle('#222');
  316. context.setTextAlign('left');
  317. context.fillText(before, 10, 350);
  318. context.fillText(last, 10, 374);
  319. }else if(title.length > 36) {
  320. console.log('22222')
  321. console.log(title.substr(18,41))
  322. let before = title.substr(0,18)
  323. let last = title.substr(18,28)
  324. // let last1 = title.substr(36,title.length)
  325. //绘制标题
  326. context.setFontSize(20);
  327. context.setFillStyle('#222');
  328. context.setTextAlign('left');
  329. context.fillText(before, 10, 350);
  330. context.fillText(last, 10, 374);
  331. // context.fillText(last1, 10, 398);
  332. }
  333. */
  334. context.stroke();
  335. context.draw();
  336. //将生成好的图片保存到本地,需要延迟一会,绘制期间耗时
  337. setTimeout(function() {
  338. wx.hideToast();
  339. wx.canvasToTempFilePath({
  340. canvasId: 'mycanvas',
  341. success: function(res) {
  342. that.imagePath = res.tempFilePath;
  343. if (that.imagePath) {
  344. that.canvasHidden = true
  345. that.maskHidden = true
  346. }
  347. console.log('海报生成成功')
  348. console.log(res)
  349. console.log('图片链接', that.imagePath)
  350. },
  351. fail: function(res) {
  352. console.log(res);
  353. }
  354. });
  355. }, 200);
  356. },
  357. saveBill() {
  358. var that = this
  359. wx.saveImageToPhotosAlbum({
  360. filePath: that.imagePath,
  361. success(res) {
  362. wx.showModal({
  363. content: '图片已保存到相册,赶紧晒一下吧~',
  364. showCancel: false,
  365. confirmText: '好的',
  366. confirmColor: '#333',
  367. success: function(res) {
  368. if (res.confirm) {
  369. console.log('用户点击确定');
  370. that.maskHidden = false
  371. }
  372. },
  373. fail: function(res) {
  374. that.maskHidden = false
  375. }
  376. })
  377. }
  378. })
  379. },
  380. formSubmit() {
  381. var that = this;
  382. that.$u.throttle(() => {
  383. wx.showToast({
  384. title: '生成海报中...',
  385. icon: 'loading',
  386. duration: 1000
  387. });
  388. console.log(that.onceCode)
  389. console.log(that.backgroundImg)
  390. if(that.onceCode && that.backgroundImg) {
  391. that.createNewImg()
  392. }else if(!that.onceCode){
  393. this.$msg('小程序码生成失败!')
  394. }else if(!that.backgroundImg){
  395. this.$msg('海报背景图生成失败!')
  396. }
  397. }, 500);
  398. },
  399. //海报结束
  400. getGoodsDetail() {
  401. let that = this;
  402. this.$http(this.API.API_GOODS_DETAIL, {
  403. goods_id: this.goods_id
  404. }).then(res => {
  405. this.skeletonLoading = false;
  406. this.goods_detail = res.data;
  407. if(this.goods_detail) {
  408. this.getGoodsBackground()
  409. if(this.pt == 2) {
  410. this.bindGoods()
  411. }
  412. }
  413. this.afterDone = this.formatRichText(this.goods_detail.content)
  414. this.is_collect = Boolean(res.data.user.is_collect);
  415. }).catch(err => {
  416. this.skeletonLoading = false;
  417. setTimeout(() => {
  418. that.$toBack();
  419. }, 1000);
  420. })
  421. },
  422. // 切换商品收藏
  423. switchCollect() {
  424. let userInfo = uni.getStorageSync('userinfo') || {};
  425. if (!userInfo.id || !userInfo.nickname || !userInfo.avatar) {
  426. this.$url('/pages/login/index?type=userinfo');
  427. return;
  428. }
  429. this.$http(this.API.API_COLLECT_DEAL, {
  430. goods_id: this.goods_id
  431. }).then(res => {
  432. this.$msg(res.msg);
  433. this.is_collect = Boolean(res.data.user.is_collect);
  434. })
  435. },
  436. // 拨打电话
  437. makePhoneCall(phoneStr) {
  438. uni.makePhoneCall({
  439. phoneNumber: String(phoneStr)
  440. })
  441. },
  442. // 打开地图
  443. openMap(){
  444. let { address, lat, lng } = this.goods_detail?.store || {};
  445. uni.openLocation({
  446. longitude: Number(lat),
  447. latitude: Number(lng),
  448. scale: 20,
  449. name: address
  450. });
  451. },
  452. // 跳转到确认下单页面
  453. toAddOrder() {
  454. let goods_id = this.goods_detail.id;
  455. let goods_specs_id = this.goods_detail.specs[0].id
  456. this.$url('/pages/order/confirm-order?goods_id=' + goods_id + '&goods_specs_id=' + goods_specs_id +'&pt='+ this.pt +'&share_id='+ this.s_id);
  457. },
  458. // 预览图片
  459. lookImg(index) {
  460. this.$u.throttle(() => {
  461. let goods_banner = this.goods_detail.banners || [];
  462. let banners = goods_banner.map(item => item.cover);
  463. uni.previewImage({
  464. urls: banners,
  465. current: index
  466. })
  467. }, 200);
  468. },
  469. // 富文本处理
  470. formatRichText(richText) {
  471. if (richText != null) {
  472. let newRichText = richText.replace(/<img[^>]*>/gi, function(match, capture) {
  473. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  474. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  475. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  476. return match;
  477. });
  478. newRichText = newRichText.replace(/style="[^"]+"/gi, function(match, capture) {
  479. match = match.replace(/width:[^;]+;/gi, 'width:100%;').replace(/width:[^;]+;/gi,
  480. 'width:100%;');
  481. return match;
  482. });
  483. newRichText = newRichText.replace(/<br[^>]*\/>/gi, '');
  484. newRichText = newRichText.replace(/\<img/gi,
  485. '<img style="width:100%;height:auto;display:block;margin:10px 0;"');
  486. return newRichText;
  487. } else {
  488. return null;
  489. }
  490. },
  491. // 将token上传到后端
  492. generateKooken(token, options){
  493. options.version = this.API.VERSION;
  494. let values = JSON.stringify(options);
  495. values = encodeURIComponent(values);
  496. this.$http(this.API.API_WAREHOUSE_SET, {
  497. key: token,
  498. value: values
  499. }).then(res => {
  500. console.log("res", token, res);
  501. });
  502. }
  503. },
  504. onShareAppMessage() {
  505. const token = this.$shared.createToken();
  506. let goods = this.goods_detail;
  507. let options = {
  508. id: goods.id,
  509. route: 'goods',
  510. scene_code: this.$scene.V2_GOODS_SHAREPOSTER
  511. }
  512. this.generateKooken(token, options); // 谁分享了就生成一个token
  513. // let goods = this.goods_detail;
  514. // let title = goods.name;
  515. // let imageUrl = goods.share_cover || goods.cover;
  516. // let path = '/pages/route/index?route=goods_detail&id=' + goods.id;
  517. let title = goods.name;
  518. let imageUrl = goods.share_cover || goods.cover;
  519. let path = '/pages/route/index?token='+ token;
  520. return {
  521. title,
  522. path,
  523. imageUrl
  524. }
  525. }
  526. }
  527. </script>
  528. <style>
  529. page {
  530. background-color: #f5f5f5;
  531. overflow-x: hidden;
  532. }
  533. </style>
  534. <style lang="scss" scoped="scoped">
  535. .bill-position {
  536. position: absolute;
  537. top: 0;
  538. right: 0;
  539. }
  540. .cu-btn1 {
  541. position: relative;
  542. display: inline-flex;
  543. align-items: center;
  544. justify-content: center;
  545. box-sizing: border-box;
  546. padding: 0 30rpx;
  547. font-size: 28rpx;
  548. height: 64rpx;
  549. line-height: 1;
  550. text-align: center;
  551. text-decoration: none;
  552. overflow: visible;
  553. margin-left: initial;
  554. transform: translate(0upx, 0upx);
  555. margin-right: initial;
  556. background-color: rgba(0, 0, 0, 0.5);
  557. color: #FFFFFF;
  558. border-radius: 33rpx;
  559. }
  560. .swiper-box {
  561. width: 750rpx;
  562. height: 520rpx;
  563. background-color: #FFFFFF;
  564. }
  565. .head-info {
  566. width: 750rpx;
  567. height: auto;
  568. box-sizing: border-box;
  569. padding: 0 32rpx;
  570. padding-top: 20rpx;
  571. background-color: #FFFFFF;
  572. // .price>view:nth-of-type(1){
  573. // color: #FF0000;
  574. // margin-right: 22rpx;
  575. // font-weight: bold;
  576. // }
  577. .price>view:nth-of-type(1) {
  578. text-decoration: line-through;
  579. color: #777777;
  580. margin-right: 22rpx;
  581. }
  582. .price>view:nth-of-type(2) {
  583. width: max-content;
  584. padding: 0 18rpx;
  585. height: 46rpx;
  586. background-color: #FE9903;
  587. border-radius: 10rpx;
  588. display: flex;
  589. justify-content: center;
  590. align-items: center;
  591. color: #FFFFFF;
  592. }
  593. .label-box {
  594. min-height: 130rpx;
  595. width: 100%;
  596. border-top: 1rpx solid #E5E5E5;
  597. display: flex;
  598. flex-wrap: wrap;
  599. padding: 30rpx 0 10rpx 0;
  600. .label-item {
  601. width: 156rpx;
  602. height: 70rpx;
  603. border-radius: 10rpx;
  604. border: 2rpx solid #FE9903;
  605. display: flex;
  606. justify-content: center;
  607. align-items: center;
  608. font-size: 28rpx;
  609. color: #FE9903;
  610. margin-right: 20rpx;
  611. margin-bottom: 20rpx;
  612. }
  613. }
  614. }
  615. .address-box {
  616. width: 750rpx;
  617. height: auto;
  618. box-sizing: border-box;
  619. background-color: #FFFFFF;
  620. padding: 32rpx;
  621. margin-top: 20rpx;
  622. .shop-img {
  623. width: 60rpx;
  624. height: 60rpx;
  625. border-radius: 50%;
  626. }
  627. }
  628. .goods-detail {
  629. width: 750rpx;
  630. height: auto;
  631. background-color: #FFFFFF;
  632. padding: 32rpx;
  633. box-sizing: border-box;
  634. margin-top: 20rpx;
  635. .goods-img {
  636. width: 100%;
  637. }
  638. }
  639. .extra {
  640. width: 100%;
  641. height: 120rpx;
  642. padding-bottom: constant(safe-area-inset-bottom);
  643. padding-bottom: env(safe-area-inset-bottom);
  644. box-sizing: content-box;
  645. }
  646. .fixed-bottom {
  647. position: fixed;
  648. bottom: 0;
  649. left: 0;
  650. z-index: 99;
  651. background-color: #FFFFFF;
  652. width: 100%;
  653. height: auto;
  654. padding: 0 32rpx;
  655. border-top: 1rpx solid #e5e5e5;
  656. padding-bottom: constant(safe-area-inset-bottom);
  657. padding-bottom: env(safe-area-inset-bottom);
  658. .icon-item {
  659. margin-right: 16rpx;
  660. background-color: transparent;
  661. margin: 0;
  662. line-height: initial;
  663. font-size: 28rpx;
  664. font-weight: inherit;
  665. margin-right: 10rpx;
  666. padding: 0;
  667. width: 88rpx;
  668. &:first-child {
  669. padding-left: 0;
  670. }
  671. .icon-img {
  672. height: 50rpx;
  673. width: 50rpx;
  674. }
  675. }
  676. .btn {
  677. margin: 0;
  678. padding: 0;
  679. width: 208rpx;
  680. height: 80rpx;
  681. background-color: #FE9903;
  682. color: #FFFFFF;
  683. line-height: 80rpx;
  684. font-size: 32rpx;
  685. border-radius: 42rpx;
  686. }
  687. }
  688. //海报
  689. .bgImg {
  690. display: block;
  691. width: 100%;
  692. height: 366rpx;
  693. }
  694. .mine {
  695. display: block;
  696. text-align: center;
  697. color: #333;
  698. margin-top: 44rpx;
  699. }
  700. .code {
  701. display: block;
  702. text-align: center;
  703. color: #333;
  704. font-size: 76rpx;
  705. font-weight: bold;
  706. margin-top: 30rpx;
  707. }
  708. .who {
  709. display: block;
  710. margin-top: 80rpx;
  711. font-size: 32rpx;
  712. color: #333;
  713. text-align: center;
  714. }
  715. .inputBox {
  716. text-align: center;
  717. margin-top: 44rpx;
  718. }
  719. .input {
  720. text-align: center;
  721. width: 440rpx;
  722. height: 88rpx;
  723. border-radius: 44rpx;
  724. background: #f5f5f5;
  725. font-size: 32rpx;
  726. display: inline-block;
  727. }
  728. .btn {
  729. width: 160rpx;
  730. height: 88rpx;
  731. border-radius: 44rpx;
  732. background: rgba(254, 153, 3, 1);
  733. color: #333;
  734. font-size: 32rpx;
  735. display: inline-block;
  736. line-height: 88rpx;
  737. margin-left: 40rpx;
  738. }
  739. button[class="btn"]::after {
  740. border: 0;
  741. }
  742. .tishi {
  743. display: block;
  744. text-align: center;
  745. color: #999;
  746. margin-top: 30rpx;
  747. }
  748. .shareText {
  749. display: block;
  750. text-align: center;
  751. color: #333;
  752. font-size: 28rpx;
  753. margin-top: 100rpx;
  754. }
  755. .imgBox {
  756. text-align: center;
  757. width: 100%;
  758. margin-top: 60rpx;
  759. padding-bottom: 120rpx;
  760. }
  761. .img {
  762. display: inline-block;
  763. width: 100%;
  764. height: 100%;
  765. }
  766. .m_l {
  767. margin-left: 180rpx;
  768. }
  769. .zfbtn {
  770. display: inline-block;
  771. width: 120rpx;
  772. height: 120rpx;
  773. border-radius: 50%;
  774. background: transparent;
  775. outline: none;
  776. border: 0;
  777. padding: 0;
  778. }
  779. button[class="zfbtn"]::after {
  780. border: 0;
  781. }
  782. button[class="zfbtn m_l"]::after {
  783. border: 0;
  784. }
  785. .imagePathBox {
  786. width: 100%;
  787. height: 100%;
  788. background: rgba(0, 0, 0, 0.7);
  789. position: fixed;
  790. top: 0;
  791. left: 0;
  792. right: 0;
  793. bottom: 0;
  794. z-index: 100;
  795. }
  796. .shengcheng {
  797. width: 80%;
  798. height: 80%;
  799. position: fixed;
  800. // top: 50rpx;
  801. top: 140rpx;
  802. left: 50%;
  803. margin-left: -40%;
  804. z-index: 100;
  805. }
  806. .baocun {
  807. display: block;
  808. width: 80%;
  809. height: 80rpx;
  810. padding: 0;
  811. line-height: 80rpx;
  812. text-align: center;
  813. position: fixed;
  814. bottom: 100rpx;
  815. left: 10%;
  816. background: rgba(254, 153, 3, 1);
  817. color: #fff;
  818. font-size: 32rpx;
  819. border-radius: 44rpx;
  820. }
  821. button[class="baocun"]::after {
  822. border: 0;
  823. }
  824. </style>