share.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. <template name="share">
  2. <view class="poster_page">
  3. <canvas canvas-id="poster" class="poster_canvas"></canvas>
  4. <swiper class="poster_swiper" previous-margin="110rpx" circular :current="swiperIndex" next-margin="110rpx" @change="onSwiperChange">
  5. <swiper-item v-for="(v, k) of fetch.pic" :key="k">
  6. <view class="goods_info_box" :class="{ active: swiperIndex == k }">
  7. <image class="goods_image" :src="v" mode="aspectFit"></image>
  8. <view class="goods_info">
  9. <view class="goods_name">{{fetch.info.name}}</view>
  10. <view class="price_box">
  11. <view class="price">{{fetch.info.price}}</view>
  12. <view class="store_price">{{fetch.info.s_price}}</view>
  13. </view>
  14. <view class="poster_info">
  15. <view class="info">
  16. <view>长按识别二维码访问</view>
  17. <text>{{fetch.info.platform_name}}</text>
  18. </view>
  19. <image class="poster_code_image" :src="fetch.info.qrcode" mode="aspectFit"></image>
  20. </view>
  21. </view>
  22. </view>
  23. </swiper-item>
  24. </swiper>
  25. <view class="share_save_box">
  26. <!-- #ifdef MP -->
  27. <button open-type="share">
  28. <image src="@/static/demo/ic_pic.png" mode="aspectFit"></image>
  29. <text>发给好友</text>
  30. </button>
  31. <!-- #endif -->
  32. <!-- #ifdef APP-PLUS -->
  33. <button @click="onAppShare">
  34. <image src="@/static/demo/ic_pic.png" mode="aspectFit"></image>
  35. <text>发给好友</text>
  36. </button>
  37. <!-- #endif -->
  38. <button class="onSave" @click="showText">
  39. <view class="lg text-gray cuIcon-formfill" style="width:70rpx;height:70rpx"></view>
  40. <text>文案</text>
  41. </button>
  42. <button class="onSave" @click="showRes">
  43. <view class="lg text-gray cuIcon-picfill" style="width:70rpx;height:70rpx"></view>
  44. <text>素材</text>
  45. </button>
  46. <button class="onSave" @click="showPoster">
  47. <view class="lg text-gray cuIcon-btn" style="width:70rpx;height:70rpx"></view>
  48. <text>海报</text>
  49. </button>
  50. </view>
  51. <!-- #ifdef H5 -->
  52. <graceDialog :isTitle="false" :title="`长按保存海报`" :isCloseBtn="false" :show="image" closeBtnColor="#FFFFFF" v-on:closeDialog="closeImage">
  53. <view class="grace-img-in" slot="content">
  54. <image class="demo-img" :src="poster" mode="widthFix"></image>
  55. </view>
  56. <view slot="btns" class="grace-space-between">
  57. <text class="grace-dialog-buttons" @tap="closeImage">关闭</text>
  58. <text class="grace-dialog-buttons grace-blue" @tap="closeImage">长按复制</text>
  59. </view>
  60. </graceDialog>
  61. <graceDialog :isTitle="true" :title="`复制文案`" :isCloseBtn="false" :show="text" v-on:closeDialog="closeText">
  62. <scroll-view :scroll-y="true" class="content2" slot="content">
  63. <view v-for="(v, k) in fetch.text" :key="k" @click="textClick(k)">
  64. <graceBorderRadius :background="v.background" :radius="['33rpx','33rpx','33rpx','33rpx']">
  65. <text>{{v.content}}</text>
  66. </graceBorderRadius>
  67. </view>
  68. </scroll-view>
  69. <view slot="btns" class="grace-space-between">
  70. <text class="grace-dialog-buttons" @tap="closeText">关闭</text>
  71. <text class="grace-dialog-buttons grace-blue" @tap="textCopy">复制</text>
  72. </view>
  73. </graceDialog>
  74. <graceDialog :isTitle="true" :title="`图片素材`" :isCloseBtn="false" :show="res" v-on:closeDialog="closeRes">
  75. <scroll-view :scroll-y="true" class="content3" slot="content">
  76. <view class="grid flex-sub padding-lr col-3 grid-square">
  77. <view @tap.stop @tap="Dever.viewPic(fetch.pic, child)" class="bg-img" :style="{backgroundImage: 'url('+child+')'}"
  78. v-for="(child, idx) in fetch.pic" :key="idx">
  79. </view>
  80. </view>
  81. </scroll-view>
  82. <view slot="btns" class="grace-space-between">
  83. <text class="grace-dialog-buttons" @tap="closeRes">关闭</text>
  84. <text class="grace-dialog-buttons grace-blue" @tap="closeRes">长按复制</text>
  85. </view>
  86. </graceDialog>
  87. <!-- #endif -->
  88. </view>
  89. </template>
  90. <script>
  91. import { mapState, mapMutations } from 'vuex';
  92. let settingWritePhotosAlbum = false;
  93. import copyText from "@/lib/clipboard.thorui.js";
  94. export default {
  95. props: {
  96. content_id : {
  97. type : String,
  98. value : null
  99. },
  100. width : {
  101. type : String,
  102. default : '100%'
  103. },
  104. param : {},
  105. index : 0,
  106. type : 0,
  107. },
  108. data() {
  109. return {
  110. swiperIndex: 0,
  111. posterImgs: [],
  112. poster: "",
  113. image : false,
  114. text : false,
  115. res : false,
  116. text_index : 0,
  117. text_top : 0,
  118. fetch : {
  119. info : {},
  120. pic : [],
  121. text : [],
  122. share: {},
  123. }
  124. };
  125. },
  126. //第一次加载
  127. mounted() {
  128. this.getData();
  129. },
  130. computed: {
  131. },
  132. //方法
  133. methods: {
  134. getData : function() {
  135. var url = this.Dever.host + '/pages/dream/view';
  136. this.Dever.get(this, 'app/collection/?l=api.getShare', {code:this.Dever.config.code,content_id:this.content_id,type:this.type, url:url, index:this.index});
  137. },
  138. getInfo : function() {
  139. },
  140. showImage : function () {
  141. this.image = true;
  142. },
  143. closeImage : function () {
  144. this.image = false;
  145. },
  146. showRes : function () {
  147. this.res = true;
  148. },
  149. closeRes : function () {
  150. this.res = false;
  151. },
  152. showText : function () {
  153. this.text = true;
  154. },
  155. closeText : function () {
  156. this.text = false;
  157. },
  158. textClick : function(index) {
  159. if (index == this.text_index) {
  160. this.fetch.text[this.text_index].background = '#bababa';
  161. this.text_index = -1;
  162. return;
  163. }
  164. this.fetch.text[index].background = '#ffaa00';
  165. if (this.fetch.text[this.text_index]) {
  166. this.fetch.text[this.text_index].background = '#bababa';
  167. }
  168. this.text_index = index;
  169. },
  170. textCopy : function() {
  171. var self = this;
  172. var value = this.fetch.text[this.text_index].content;
  173. copyText.getClipboardData(value, function(res) {
  174. if (res) {
  175. self.Dever.alert('复制成功');
  176. } else {
  177. self.Dever.alert('复制失败');
  178. }
  179. });
  180. },
  181. // 轮播图变化
  182. onSwiperChange(e) {
  183. this.swiperIndex = e.detail.current;
  184. },
  185. // 创建海报
  186. createPoster() {
  187. return new Promise((resolve, reject) => {
  188. if (!this.fetch.info.qrcode) {
  189. this.Dever.alert('没有二维码');
  190. return;
  191. }
  192. uni.showLoading({
  193. title: '海报生成中'
  194. });
  195. const ctx = uni.createCanvasContext('poster');
  196. ctx.imageSmoothingEnabled = false;
  197. ctx.fillRect(0, 0, 375, 673);
  198. ctx.setFillStyle("#FFF");
  199. ctx.fillRect(0, 0, 375, 673);
  200. this.downPic(ctx, resolve, reject);
  201. });
  202. },
  203. //下载图片
  204. downPic : function(ctx, resolve, reject) {
  205. var self = this;
  206. uni.downloadFile({
  207. url: self.fetch.pic[self.swiperIndex],
  208. success: (res) => {
  209. if (res.statusCode === 200) {
  210. uni.getImageInfo({
  211. src: res.tempFilePath,
  212. success: function (image) {
  213. var img = self.Dever.getImage(image.width, image.height, 375, 375);
  214. var x = (375 - img[0])/2;
  215. var y = 0;
  216. ctx.drawImage(res.tempFilePath, x, y, img[0], img[1]);
  217. self.downQrcode(ctx, resolve, reject);
  218. }
  219. });
  220. } else {
  221. uni.hideLoading();
  222. self.Dever.alert('海报制作失败,图片下载失败');
  223. }
  224. },
  225. fail: (err) => {
  226. uni.hideLoading();
  227. self.Dever.alert('海报制作失败,图片下载失败');
  228. }
  229. });
  230. },
  231. //下载二维码
  232. downQrcode : function(ctx, resolve, reject) {
  233. uni.downloadFile({
  234. url: this.fetch.info.qrcode,
  235. success: (res) => {
  236. if (res.statusCode === 200) {
  237. this.addPosterName(ctx);
  238. this.addPosterPrice(ctx);
  239. this.addPosterQrcode(ctx);
  240. // 二维码
  241. ctx.drawImage(res.tempFilePath, 238, this.text_top + 88, 120, 120);
  242. this.drawPoster(ctx, resolve, reject);
  243. } else {
  244. uni.hideLoading();
  245. this.Dever.alert('海报制作失败,图片下载失败');
  246. }
  247. },
  248. fail: (err) => {
  249. uni.hideLoading();
  250. this.Dever.alert('海报制作失败,图片下载失败');
  251. }
  252. });
  253. },
  254. // 商品标题
  255. addPosterName : function(ctx) {
  256. ctx.setFontSize(21);
  257. ctx.setFillStyle('#333');
  258. let drawtextList = drawtext(this.fetch.info.name, 341);
  259. this.text_top = 0;
  260. drawtextList.forEach((item,index) => {
  261. if(index < 2){
  262. this.text_top = 380 + (index + 1) * 28;
  263. ctx.fillText(item.content, 17, this.text_top);
  264. }
  265. });
  266. },
  267. // 商品价格
  268. addPosterPrice : function(ctx) {
  269. if (this.fetch.info.price) {
  270. ctx.setFontSize(26);
  271. ctx.setFillStyle('#f00');
  272. ctx.fillText(this.fetch.info.price, 17, this.text_top + 47);
  273. // 商品门市价
  274. ctx.setFontSize(18);
  275. ctx.setFillStyle('#999');
  276. let textLeft = 38 + (this.fetch.info.price.length * 13)
  277. ctx.fillText(this.fetch.info.s_price, textLeft, this.text_top + 45);
  278. // 商品门市价横线
  279. ctx.beginPath();
  280. ctx.setLineWidth(1);
  281. ctx.moveTo(textLeft - 1, this.text_top + 38);
  282. ctx.lineTo((textLeft + 5 + this.fetch.info.s_price.length * 9), this.text_top + 38);
  283. ctx.setStrokeStyle('#999');
  284. ctx.stroke();
  285. }
  286. // 商品分割线
  287. ctx.beginPath();
  288. ctx.setLineWidth(1);
  289. ctx.moveTo(17, this.text_top + 70);
  290. ctx.lineTo(358, this.text_top + 70);
  291. ctx.setStrokeStyle('#eee');
  292. ctx.stroke();
  293. },
  294. //二维码
  295. addPosterQrcode : function(ctx) {
  296. // 长按识别二维码访问
  297. ctx.setFontSize(19);
  298. ctx.setFillStyle('#333');
  299. ctx.fillText("长按识别二维码访问", 17, this.text_top + 136);
  300. // 平台名称
  301. ctx.setFontSize(16);
  302. ctx.setFillStyle('#999');
  303. ctx.fillText(this.fetch.info.platform_name, 17, this.text_top + 170);
  304. },
  305. // 绘制海报
  306. drawPoster : function(ctx, resolve, reject) {
  307. ctx.draw(true, () => {
  308. // canvas画布转成图片并返回图片地址
  309. uni.canvasToTempFilePath({
  310. canvasId: 'poster',
  311. width: 375,
  312. height: 673,
  313. quality : 1,
  314. success: (res) => {
  315. if(this.posterImgs[this.swiperIndex]){
  316. this.posterImgs[this.swiperIndex].temporary = res.tempFilePath;
  317. }else{
  318. this.posterImgs[this.swiperIndex] = {
  319. temporary: res.tempFilePath
  320. };
  321. }
  322. resolve(res.tempFilePath);
  323. },
  324. fail: () => {
  325. uni.hideLoading();
  326. reject();
  327. }
  328. })
  329. });
  330. },
  331. // 保存图片
  332. async showPoster() {
  333. let imgUrl = "";
  334. if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].temporary){
  335. imgUrl = await this.posterImgs[this.swiperIndex].temporary;
  336. }else{
  337. imgUrl = await this.createPoster();
  338. }
  339. // #ifdef H5
  340. this.poster = imgUrl;
  341. this.showImage();
  342. uni.hideLoading();
  343. // #endif
  344. // #ifdef MP-WEIXIN
  345. uni.showLoading({
  346. title: '海报下载中'
  347. });
  348. if (settingWritePhotosAlbum) {
  349. uni.getSetting({
  350. success: res => {
  351. if (res.authSetting['scope.writePhotosAlbum']) {
  352. uni.saveImageToPhotosAlbum({
  353. filePath: imgUrl,
  354. success: () => {
  355. uni.hideLoading();
  356. uni.showToast({
  357. title: '保存成功'
  358. });
  359. }
  360. });
  361. } else {
  362. uni.showModal({
  363. title: '提示',
  364. content: '请先在设置页面打开“保存相册”使用权限',
  365. confirmText: '去设置',
  366. cancelText: '算了',
  367. success: data => {
  368. if (data.confirm) {
  369. uni.hideLoading();
  370. uni.openSetting();
  371. }
  372. }
  373. });
  374. }
  375. }
  376. });
  377. } else {
  378. settingWritePhotosAlbum = true;
  379. uni.authorize({
  380. scope: 'scope.writePhotosAlbum',
  381. success: () => {
  382. uni.saveImageToPhotosAlbum({
  383. filePath: imgUrl,
  384. success: () => {
  385. uni.hideLoading();
  386. uni.showToast({
  387. title: '保存成功'
  388. });
  389. }
  390. });
  391. }
  392. });
  393. }
  394. // #endif
  395. // #ifdef APP-PLUS
  396. uni.showLoading({
  397. title: '海报下载中'
  398. });
  399. uni.saveImageToPhotosAlbum({
  400. filePath: imgUrl,
  401. success: () => {
  402. uni.hideLoading();
  403. uni.showToast({
  404. title: '保存成功'
  405. });
  406. }
  407. });
  408. // #endif
  409. },
  410. async onAppShare() {
  411. // let imgUrl = "";
  412. // if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].url){
  413. // imgUrl = this.posterImgs[this.swiperIndex].url;
  414. // } else if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].temporary){
  415. // let imgData = await this.$http.qnFileUpload([this.posterImgs[this.swiperIndex].temporary]);
  416. // imgUrl = imgData[0];
  417. // }else{
  418. // let data = await this.createPoster();
  419. // let imgData = await this.$http.qnFileUpload([data]);
  420. // imgUrl = imgData[0];
  421. // }
  422. // uni.hideLoading();
  423. this.fetch.share.url = this.Dever.host + '';
  424. uni.share({
  425. provider: 'weixin',
  426. scene: 'WXSceneSession',
  427. type: 0,
  428. title: this.fetch.share.title,
  429. href: this.fetch.share.url,
  430. summary: this.fetch.share.content,
  431. imageUrl: this.fetch.share.pic,
  432. success: function(res) {
  433. console.log('success:' + JSON.stringify(res));
  434. },
  435. fail: function(err) {
  436. console.log('fail:' + JSON.stringify(err));
  437. }
  438. });
  439. }
  440. },
  441. //页面隐藏
  442. onHide() {},
  443. //页面卸载
  444. onUnload() {},
  445. //页面下来刷新
  446. onPullDownRefresh() {},
  447. //页面上拉触底
  448. onReachBottom() {},
  449. //用户点击分享
  450. onShareAppMessage(e) {
  451. let shareInfo = {
  452. path: "/pages/home/shop/goodsDetail?objId="+this.fetch.info.id,
  453. title: this.fetch.share.title,
  454. imageUrl: this.fetch.share.pic
  455. };
  456. if(this.userInfo.token){
  457. shareInfo.path += "&recommendCode=" + this.userInfo.uid;
  458. }
  459. console.log(shareInfo);
  460. return shareInfo;
  461. },
  462. components:{copyText}
  463. };
  464. // 文字换行
  465. function drawtext(text, maxWidth) {
  466. let textArr = text.split("");
  467. let len = textArr.length;
  468. // 上个节点
  469. let previousNode = 0;
  470. // 记录节点宽度
  471. let nodeWidth = 0;
  472. // 文本换行数组
  473. let rowText = [];
  474. // 如果是字母,侧保存长度
  475. let letterWidth = 0;
  476. // 汉字宽度
  477. let chineseWidth = 21;
  478. // otherFont宽度
  479. let otherWidth = 10.5;
  480. for (let i = 0; i < len; i++) {
  481. if (/[\u4e00-\u9fa5]|[\uFE30-\uFFA0]/g.test(textArr[i])) {
  482. if(letterWidth > 0){
  483. if(nodeWidth + chineseWidth + letterWidth * otherWidth > maxWidth){
  484. rowText.push({
  485. type: "text",
  486. content: text.substring(previousNode, i)
  487. });
  488. previousNode = i;
  489. nodeWidth = chineseWidth;
  490. letterWidth = 0;
  491. } else {
  492. nodeWidth += chineseWidth + letterWidth * otherWidth;
  493. letterWidth = 0;
  494. }
  495. } else {
  496. if(nodeWidth + chineseWidth > maxWidth){
  497. rowText.push({
  498. type: "text",
  499. content: text.substring(previousNode, i)
  500. });
  501. previousNode = i;
  502. nodeWidth = chineseWidth;
  503. }else{
  504. nodeWidth += chineseWidth;
  505. }
  506. }
  507. } else {
  508. if(/\n/g.test(textArr[i])){
  509. rowText.push({
  510. type: "break",
  511. content: text.substring(previousNode, i)
  512. });
  513. previousNode = i + 1;
  514. nodeWidth = 0;
  515. letterWidth = 0;
  516. }else if(textArr[i] == "\\" && textArr[i + 1] == "n"){
  517. rowText.push({
  518. type: "break",
  519. content: text.substring(previousNode, i)
  520. });
  521. previousNode = i + 2;
  522. nodeWidth = 0;
  523. letterWidth = 0;
  524. }else if(/[a-zA-Z0-9]/g.test(textArr[i])){
  525. letterWidth += 1;
  526. if(nodeWidth + letterWidth * otherWidth > maxWidth){
  527. rowText.push({
  528. type: "text",
  529. content: text.substring(previousNode, i + 1 - letterWidth)
  530. });
  531. previousNode = i + 1 - letterWidth;
  532. nodeWidth = letterWidth * otherWidth;
  533. letterWidth = 0;
  534. }
  535. } else{
  536. if(nodeWidth + otherWidth > maxWidth){
  537. rowText.push({
  538. type: "text",
  539. content: text.substring(previousNode, i)
  540. });
  541. previousNode = i;
  542. nodeWidth = otherWidth;
  543. }else{
  544. nodeWidth += otherWidth;
  545. }
  546. }
  547. }
  548. }
  549. if (previousNode < len) {
  550. rowText.push({
  551. type: "text",
  552. content: text.substring(previousNode, len)
  553. });
  554. }
  555. return rowText;
  556. }
  557. </script>
  558. <style lang="scss" scoped>
  559. .content3 {
  560. padding:30rpx;
  561. line-height:50rpx;
  562. font-size:26rpx;
  563. height:675rpx;
  564. color:#000000;
  565. }
  566. .content2 {
  567. padding:30rpx;
  568. line-height:50rpx;
  569. font-size:26rpx;
  570. height:675rpx;
  571. color:#000000;
  572. }
  573. .content2 view{
  574. padding: 15rpx;
  575. }
  576. .content2 .active {
  577. }
  578. .demo-msg {
  579. width:600rpx;
  580. }
  581. .icon-close{}
  582. .poster_page {
  583. }
  584. .onSave:after {
  585. border:0px;
  586. }
  587. .poster_canvas {
  588. width: 750rpx;
  589. height: 1334rpx;
  590. position: fixed;
  591. top: -10000rpx;
  592. left: 0rpx;
  593. }
  594. .poster_swiper {
  595. height: 950rpx;
  596. width: 100%;
  597. swiper-item {
  598. box-sizing: border-box;
  599. display: flex;
  600. align-items: center;
  601. .goods_info_box {
  602. width: 100%;
  603. height: 100%;
  604. transform: scale(0.88);
  605. transition: all 0.4s;
  606. position: relative;
  607. overflow: hidden;
  608. background-color: #FFFFFF;
  609. &.active {
  610. transform: scale(1);
  611. }
  612. .goods_image {
  613. width: 100%;
  614. height: calc(100vw - 220rpx);
  615. }
  616. .goods_info {
  617. padding: 24rpx;
  618. .goods_name {
  619. color: #333;
  620. font-size: 30rpx;
  621. }
  622. .price_box {
  623. margin-top: 24rpx;
  624. display: flex;
  625. align-items: center;
  626. .price {
  627. font-size: 38rpx;
  628. color: red;
  629. }
  630. .store_price {
  631. margin-left: 30rpx;
  632. font-size: 26rpx;
  633. color: #999;
  634. text-decoration: line-through;
  635. }
  636. }
  637. .poster_info {
  638. border-top: 2rpx solid #f1f1f1;
  639. padding-top: 24rpx;
  640. margin-top: 24rpx;
  641. display: flex;
  642. align-items: center;
  643. justify-content: space-between;
  644. .info {
  645. display: flex;
  646. flex-direction: column;
  647. view {
  648. color: #333;
  649. font-size: 28rpx;
  650. }
  651. text {
  652. color: #999;
  653. font-size: 24rpx;
  654. margin-top: 20rpx;
  655. }
  656. }
  657. .poster_code_image {
  658. width: 170rpx;
  659. height: 170rpx;
  660. flex-shrink: 0;
  661. }
  662. }
  663. }
  664. }
  665. }
  666. }
  667. .share_save_box {
  668. position: fixed;
  669. bottom: calc((100vh - 950rpx - 240rpx) / 4);
  670. left: 0;
  671. z-index: 6;
  672. width: 100%;
  673. display: flex;
  674. justify-content: space-around;
  675. button {
  676. display: flex;
  677. flex-direction: column;
  678. align-items: center;
  679. background-color: transparent;
  680. image {
  681. width: 60rpx;
  682. height: 60rpx;
  683. }
  684. text {
  685. font-size: 24rpx;
  686. color: #333333;
  687. }
  688. }
  689. }
  690. .h5_press_save {
  691. background-color: #000;
  692. position: fixed;
  693. top: 0;
  694. left: 0;
  695. width: 100%;
  696. height: 100%;
  697. display: flex;
  698. align-items: center;
  699. z-index: 100;
  700. image {
  701. width: 100%;
  702. }
  703. .download {
  704. font-size: 24rpx;
  705. color: #ffffff;
  706. background-color: rgba(0,0,0,0.5);
  707. display: flex;
  708. align-items: center;
  709. flex-direction: row;
  710. justify-content: center;
  711. position: absolute;
  712. padding: 5rpx 30rpx;
  713. border-radius: 40rpx;
  714. bottom: 30rpx;
  715. left: 50%;
  716. transform: translateX(-50%);
  717. &:before {
  718. content: '';
  719. width: 24rpx;
  720. height: 24rpx;
  721. margin-right: 15rpx;
  722. }
  723. }
  724. }
  725. </style>