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

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