share.vue 20 KB

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