share.vue 20 KB

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