share.vue 20 KB

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