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

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