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

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