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

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