1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| const wxml = (msg) => { return ` <view class="container" > <image class="img" src="${msg.img}"></image> <view class="day-txt"> <text class="day-tips">您已累计出行</text> <text class="day">${msg.day}</text> <text class="day-tips">天</text> </view> <view class="yuan-txt"> <text class="yuan-tips">XXXXX已帮您捐出</text> <text class="yuan">${msg.yuan}</text> <text class="yuan-tips">元</text> </view> </view> ` }
const style = (styles) => { return { container: { width: 340, height: 507, flexDirection: 'column', backgroundColor: 'transparent', }, dayTxt: { position: 'absolute', left: 50, top: 319, fontWeight: 500, width: 300, height: 34, flexDirection: 'row', }, dayTips: { width: 78, fontSize: 13, height: 34, color: '#333333', textAlign: 'left' }, day: { width: styles.dayWidth, verticalAlign: 'top', fontSize: 15, height: 40, color: '#FF1E37', textAlign: 'center', }, yuanTxt: { position: 'absolute', left: 50, top: 341, fontWeight: 500, width: 300, height: 38, flexDirection: 'row', }, yuanTips: { width: 160, fontSize: 20, height: 52, color: '#333333', textAlign: 'left' }, yuan: { fontWeight: 'bold', width: 60, fontSize: 26, height: 68, lineHeight: 26, color: '#FF1E37', textAlign: 'center', verticalAlign: 'top', }, img: { width: 340, height: 507, borderRadius: 20, } } }
module.exports = { wxml, style }
|