share.vue 20 KB

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