1 line
5.3 KiB
Plaintext
1 line
5.3 KiB
Plaintext
|
{"version":3,"file":"goods.js","sources":["../../../../../../../../src/sheep/components/s-share-modal/canvas-poster/poster/goods.js"],"sourcesContent":["import sheep from '@/sheep'\r\nimport { formatImageUrlProtocol, getWxaQrcode } from './index'\r\n\r\nconst goods = async (poster) => {\r\n const width = poster.width\r\n const userInfo = sheep.$store('user').userInfo\r\n const wxa_qrcode = await getWxaQrcode(poster.shareInfo.path, poster.shareInfo.query)\r\n return [\r\n {\r\n type: 'image',\r\n src: formatImageUrlProtocol(\r\n sheep.$url.cdn(sheep.$store('app').platform.share.posterInfo.goods_bg),\r\n ),\r\n css: {\r\n width,\r\n position: 'fixed',\r\n 'object-fit': 'contain',\r\n top: '0',\r\n left: '0',\r\n zIndex: -1,\r\n },\r\n },\r\n {\r\n type: 'text',\r\n text: userInfo.nickname,\r\n css: {\r\n color: '#333',\r\n fontSize: 16,\r\n fontFamily: 'sans-serif',\r\n position: 'fixed',\r\n top: width * 0.06,\r\n left: width * 0.22,\r\n },\r\n },\r\n {\r\n type: 'image',\r\n src: formatImageUrlProtocol(sheep.$url.cdn(userInfo.avatar)),\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.04,\r\n top: width * 0.04,\r\n width: width * 0.14,\r\n height: width * 0.14,\r\n },\r\n },\r\n {\r\n type: 'image',\r\n src: formatImageUrlProtocol(poster.shareInfo.poster.image),\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.03,\r\n top: width * 0.21,\r\n width: width * 0.94,\r\n height: width * 0.94,\r\n },\r\n },\r\n {\r\n type: 'text',\r\n text: poster.shareInfo.poster.title,\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.04,\r\n top: width * 1.18,\r\n color: '#333',\r\n fontSize: 14,\r\n lineHeight: 15,\r\n maxWidth: width * 0.91,\r\n },\r\n },\r\n {\r\n type: 'text',\r\n text: '¥' + poster.shareInfo.poster.price,\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.04,\r\n top: width * 1.31,\r\n fontSize: 20,\r\n fontFamily: 'OPPOSANS',\r\n color: '#333',\r\n },\r\n },\r\n {\r\n type: 'text',\r\n text:\r\n poster.shareInfo.poster.original_price > 0\r\n ? '¥' + poster.shareInfo.poster.original_price\r\n : '',\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.3,\r\n top: width * 1.33,\r\n color: '#999',\r\n fontSize: 10,\r\n fontFamily: 'OPPOSANS',\r\n textDecoration: 'line-through',\r\n },\r\n },\r\n // #ifndef MP-WEIXIN\r\n {\r\n type: 'qrcode',\r\n text: poster.shareInfo.link,\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.75,\r\n top: width * 1.3,\r\n width: width * 0.2,\r\n height: width * 0.2,\r\n },\r\n },\r\n // #endif\r\n // #ifdef MP-WEIXIN\r\n {\r\n type: 'image',\r\n src: wxa_qrcode,\r\n css: {\r\n position: 'fixed',\r\n left: width * 0.75,\r\n top: width * 1.3,\r\n width: width * 0.2,\r\n height: width * 0.2,\r\n },\r\n },\r\n // #endif\r\n ]\r\n}\r\n\r\nexport default goods\r\n"],"names":["sheep","getWxaQrcode","formatImageUrlProtocol"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGK,MAAC,QAAQ,CAAO,WAAW;AAC9B,QAAM,QAAQ,OAAO;AACrB,QAAM,WAAWA,YAAK,MAAC,OAAO,MAAM,EAAE;AACtC,QAAM,aAAa,MAAMC,uDAAAA,aAAa,OAAO,UAAU,MAAM,OAAO,UAAU,KAAK;AACnF,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,KAAKC,uDAAsB;AAAA,QACzBF,YAAAA,MAAM,KAAK,IAAIA,YAAAA,MAAM,OAAO,KAAK,EAAE,SAAS,MAAM,WAAW,QAAQ;AAAA,MACtE;AAAA,MACD,KAAK;AAAA,QACH;AAAA,QACA,UAAU;AAAA,QACV,cAAc;AAAA,QACd,KAAK;AAAA,QACL,MAAM;AAAA,QACN,QAAQ;AAAA,MACT;AAAA,IACF;AAAA,IACD;AAAA,MACE,MAAM;AAAA,MACN,MAAM,SAAS;AAAA,MACf,KAAK;AAAA,QACH,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,KAAK,QAAQ;AAAA,QACb,MAAM,QAAQ;AAAA,
|