share.vue 19 KB

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