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

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