share.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  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. setTimeout(()=>{
  321. uni.canvasToTempFilePath({
  322. canvasId: 'poster',
  323. destWidth: 375,
  324. destHeight: 673,
  325. quality : 1,
  326. fileType : 'jpg',
  327. success: (res) => {
  328. /*
  329. if (res.tempFilePath.indexOf('base64')) {
  330. base64ToPath(res.tempFilePath).then(path => {
  331. this.finish(path, resolve);
  332. });
  333. } else {
  334. this.finish(res.tempFilePath, resolve);
  335. }*/
  336. this.finish(res.tempFilePath, resolve);
  337. },
  338. fail: () => {
  339. uni.hideLoading();
  340. reject();
  341. }
  342. })
  343. }, 500);
  344. });
  345. },
  346. // 完成绘制
  347. finish : function(path, resolve) {
  348. if(this.posterImgs[this.swiperIndex]){
  349. this.posterImgs[this.swiperIndex].temporary = path;
  350. }else{
  351. this.posterImgs[this.swiperIndex] = {
  352. temporary: path
  353. };
  354. }
  355. resolve(path);
  356. },
  357. // 保存图片
  358. async showPoster() {
  359. let imgUrl = "";
  360. if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].temporary){
  361. imgUrl = await this.posterImgs[this.swiperIndex].temporary;
  362. }else{
  363. imgUrl = await this.createPoster();
  364. }
  365. // #ifdef H5
  366. this.poster = imgUrl;
  367. this.showImage();
  368. uni.hideLoading();
  369. // #endif
  370. // #ifdef MP-WEIXIN
  371. uni.showLoading({
  372. title: '海报下载中'
  373. });
  374. if (settingWritePhotosAlbum) {
  375. uni.getSetting({
  376. success: res => {
  377. if (res.authSetting['scope.writePhotosAlbum']) {
  378. uni.saveImageToPhotosAlbum({
  379. filePath: imgUrl,
  380. success: () => {
  381. uni.hideLoading();
  382. uni.showToast({
  383. title: '保存成功'
  384. });
  385. }
  386. });
  387. } else {
  388. uni.showModal({
  389. title: '提示',
  390. content: '请先在设置页面打开“保存相册”使用权限',
  391. confirmText: '去设置',
  392. cancelText: '算了',
  393. success: data => {
  394. if (data.confirm) {
  395. uni.hideLoading();
  396. uni.openSetting();
  397. }
  398. }
  399. });
  400. }
  401. }
  402. });
  403. } else {
  404. settingWritePhotosAlbum = true;
  405. uni.authorize({
  406. scope: 'scope.writePhotosAlbum',
  407. success: () => {
  408. uni.saveImageToPhotosAlbum({
  409. filePath: imgUrl,
  410. success: () => {
  411. uni.hideLoading();
  412. uni.showToast({
  413. title: '保存成功'
  414. });
  415. }
  416. });
  417. }
  418. });
  419. }
  420. // #endif
  421. // #ifdef APP-PLUS
  422. uni.showLoading({
  423. title: '海报下载中'
  424. });
  425. uni.saveImageToPhotosAlbum({
  426. filePath: imgUrl,
  427. success: () => {
  428. uni.hideLoading();
  429. uni.showToast({
  430. title: '保存成功'
  431. });
  432. }
  433. });
  434. // #endif
  435. },
  436. async onAppShare() {
  437. // let imgUrl = "";
  438. // if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].url){
  439. // imgUrl = this.posterImgs[this.swiperIndex].url;
  440. // } else if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].temporary){
  441. // let imgData = await this.$http.qnFileUpload([this.posterImgs[this.swiperIndex].temporary]);
  442. // imgUrl = imgData[0];
  443. // }else{
  444. // let data = await this.createPoster();
  445. // let imgData = await this.$http.qnFileUpload([data]);
  446. // imgUrl = imgData[0];
  447. // }
  448. // uni.hideLoading();
  449. this.fetch.share.url = this.Dever.host + '';
  450. uni.share({
  451. provider: 'weixin',
  452. scene: 'WXSceneSession',
  453. type: 0,
  454. title: this.fetch.share.title,
  455. href: this.fetch.share.url,
  456. summary: this.fetch.share.content,
  457. imageUrl: this.fetch.share.pic,
  458. success: function(res) {
  459. console.log('success:' + JSON.stringify(res));
  460. },
  461. fail: function(err) {
  462. console.log('fail:' + JSON.stringify(err));
  463. }
  464. });
  465. }
  466. },
  467. //页面隐藏
  468. onHide() {},
  469. //页面卸载
  470. onUnload() {},
  471. //页面下来刷新
  472. onPullDownRefresh() {},
  473. //页面上拉触底
  474. onReachBottom() {},
  475. //用户点击分享
  476. onShareAppMessage(e) {
  477. let shareInfo = {
  478. path: "/pages/home/shop/goodsDetail?objId="+this.fetch.info.id,
  479. title: this.fetch.share.title,
  480. imageUrl: this.fetch.share.pic
  481. };
  482. if(this.userInfo.token){
  483. shareInfo.path += "&recommendCode=" + this.userInfo.uid;
  484. }
  485. console.log(shareInfo);
  486. return shareInfo;
  487. },
  488. components:{copyText}
  489. };
  490. // 文字换行
  491. function drawtext(text, maxWidth) {
  492. let textArr = text.split("");
  493. let len = textArr.length;
  494. // 上个节点
  495. let previousNode = 0;
  496. // 记录节点宽度
  497. let nodeWidth = 0;
  498. // 文本换行数组
  499. let rowText = [];
  500. // 如果是字母,侧保存长度
  501. let letterWidth = 0;
  502. // 汉字宽度
  503. let chineseWidth = 21;
  504. // otherFont宽度
  505. let otherWidth = 10.5;
  506. for (let i = 0; i < len; i++) {
  507. if (/[\u4e00-\u9fa5]|[\uFE30-\uFFA0]/g.test(textArr[i])) {
  508. if(letterWidth > 0){
  509. if(nodeWidth + chineseWidth + letterWidth * otherWidth > maxWidth){
  510. rowText.push({
  511. type: "text",
  512. content: text.substring(previousNode, i)
  513. });
  514. previousNode = i;
  515. nodeWidth = chineseWidth;
  516. letterWidth = 0;
  517. } else {
  518. nodeWidth += chineseWidth + letterWidth * otherWidth;
  519. letterWidth = 0;
  520. }
  521. } else {
  522. if(nodeWidth + chineseWidth > maxWidth){
  523. rowText.push({
  524. type: "text",
  525. content: text.substring(previousNode, i)
  526. });
  527. previousNode = i;
  528. nodeWidth = chineseWidth;
  529. }else{
  530. nodeWidth += chineseWidth;
  531. }
  532. }
  533. } else {
  534. if(/\n/g.test(textArr[i])){
  535. rowText.push({
  536. type: "break",
  537. content: text.substring(previousNode, i)
  538. });
  539. previousNode = i + 1;
  540. nodeWidth = 0;
  541. letterWidth = 0;
  542. }else if(textArr[i] == "\\" && textArr[i + 1] == "n"){
  543. rowText.push({
  544. type: "break",
  545. content: text.substring(previousNode, i)
  546. });
  547. previousNode = i + 2;
  548. nodeWidth = 0;
  549. letterWidth = 0;
  550. }else if(/[a-zA-Z0-9]/g.test(textArr[i])){
  551. letterWidth += 1;
  552. if(nodeWidth + letterWidth * otherWidth > maxWidth){
  553. rowText.push({
  554. type: "text",
  555. content: text.substring(previousNode, i + 1 - letterWidth)
  556. });
  557. previousNode = i + 1 - letterWidth;
  558. nodeWidth = letterWidth * otherWidth;
  559. letterWidth = 0;
  560. }
  561. } else{
  562. if(nodeWidth + otherWidth > maxWidth){
  563. rowText.push({
  564. type: "text",
  565. content: text.substring(previousNode, i)
  566. });
  567. previousNode = i;
  568. nodeWidth = otherWidth;
  569. }else{
  570. nodeWidth += otherWidth;
  571. }
  572. }
  573. }
  574. }
  575. if (previousNode < len) {
  576. rowText.push({
  577. type: "text",
  578. content: text.substring(previousNode, len)
  579. });
  580. }
  581. return rowText;
  582. }
  583. </script>
  584. <style lang="scss" scoped>
  585. .content3 {
  586. padding:30rpx;
  587. line-height:50rpx;
  588. font-size:26rpx;
  589. height:675rpx;
  590. color:#000000;
  591. }
  592. .content2 {
  593. padding:30rpx;
  594. line-height:50rpx;
  595. font-size:26rpx;
  596. height:675rpx;
  597. color:#000000;
  598. }
  599. .content2 view{
  600. padding: 15rpx;
  601. }
  602. .content2 .active {
  603. }
  604. .demo-msg {
  605. width:600rpx;
  606. }
  607. .icon-close{}
  608. .poster_page {
  609. }
  610. .onSave:after {
  611. border:0px;
  612. }
  613. .poster_canvas {
  614. width: 750rpx;
  615. height: 1334rpx;
  616. position: fixed;
  617. top: -10000rpx;
  618. left: 0rpx;
  619. }
  620. .poster_swiper {
  621. height: 950rpx;
  622. width: 100%;
  623. swiper-item {
  624. box-sizing: border-box;
  625. display: flex;
  626. align-items: center;
  627. .goods_info_box {
  628. width: 100%;
  629. height: 100%;
  630. transform: scale(0.88);
  631. transition: all 0.4s;
  632. position: relative;
  633. overflow: hidden;
  634. background-color: #FFFFFF;
  635. &.active {
  636. transform: scale(1);
  637. }
  638. .goods_image {
  639. width: 100%;
  640. height: calc(100vw - 220rpx);
  641. }
  642. .goods_info {
  643. padding: 24rpx;
  644. .goods_name {
  645. color: #333;
  646. font-size: 30rpx;
  647. }
  648. .price_box {
  649. margin-top: 24rpx;
  650. display: flex;
  651. align-items: center;
  652. .price {
  653. font-size: 38rpx;
  654. color: red;
  655. }
  656. .store_price {
  657. margin-left: 30rpx;
  658. font-size: 26rpx;
  659. color: #999;
  660. text-decoration: line-through;
  661. }
  662. }
  663. .poster_info {
  664. border-top: 2rpx solid #f1f1f1;
  665. padding-top: 24rpx;
  666. margin-top: 24rpx;
  667. display: flex;
  668. align-items: center;
  669. justify-content: space-between;
  670. .info {
  671. display: flex;
  672. flex-direction: column;
  673. view {
  674. color: #333;
  675. font-size: 28rpx;
  676. }
  677. text {
  678. color: #999;
  679. font-size: 24rpx;
  680. margin-top: 20rpx;
  681. }
  682. }
  683. .poster_code_image {
  684. width: 170rpx;
  685. height: 170rpx;
  686. flex-shrink: 0;
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. .share_save_box {
  694. position: fixed;
  695. bottom: calc((100vh - 950rpx - 240rpx) / 4);
  696. left: 0;
  697. z-index: 6;
  698. width: 100%;
  699. display: flex;
  700. justify-content: space-around;
  701. button {
  702. display: flex;
  703. flex-direction: column;
  704. align-items: center;
  705. background-color: transparent;
  706. image {
  707. width: 60rpx;
  708. height: 60rpx;
  709. }
  710. text {
  711. font-size: 24rpx;
  712. color: #333333;
  713. }
  714. }
  715. }
  716. .h5_press_save {
  717. background-color: #000;
  718. position: fixed;
  719. top: 0;
  720. left: 0;
  721. width: 100%;
  722. height: 100%;
  723. display: flex;
  724. align-items: center;
  725. z-index: 100;
  726. image {
  727. width: 100%;
  728. }
  729. .download {
  730. font-size: 24rpx;
  731. color: #ffffff;
  732. background-color: rgba(0,0,0,0.5);
  733. display: flex;
  734. align-items: center;
  735. flex-direction: row;
  736. justify-content: center;
  737. position: absolute;
  738. padding: 5rpx 30rpx;
  739. border-radius: 40rpx;
  740. bottom: 30rpx;
  741. left: 50%;
  742. transform: translateX(-50%);
  743. &:before {
  744. content: '';
  745. width: 24rpx;
  746. height: 24rpx;
  747. margin-right: 15rpx;
  748. }
  749. }
  750. }
  751. </style>