share.vue 20 KB

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