share.vue 19 KB

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