时空网前端
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.

884 lines
22 KiB

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