const getwxml = ( qrcodeUrl, name = '这是一件文物', wenwuUrl ) => {
  const wxml = `<view class="container">
      <view class="top-image">
        <image class="wenwubg" src="${wenwuUrl}"></image>
      </view>
      <view class="item-box">
        <image class="btmbg" src="https://swkz-1332577016.cos.ap-guangzhou.myqcloud.com/swkzGuicang/img_share_bg.png"></image>
        <view class="left-box">
          <text class="text scrwenwu">${name}</text>
          <text class="text scrcontent">长按扫码 查看更多内容</text>
        </view>
        <view class="right-box">
          <image class="qrcode" src="${qrcodeUrl}"></image>
        </view>
      </view>
    </view>
  `
  return wxml
}

const style = {
  container: {
    width: 360,
    height: 256,
    flexDirection: 'column',
    backgroundColor: '#262626',
    alignItems: 'center',
    justifyContent: 'center',
  },
  topImage: {
    width: 280,
    height: 190,
  },
  wenwubg: {
    width: 280,
    height: 190,
  },
  itemBox: {
    position: 'relative',
    width: 360,
    height: 66,
  },
  btmbg: {
    width: 360,
    height: 66,
  },
  leftBox: {
    position:'absolute',
    left: 0,
    top: 0,
    width: 177,
    height: 66,
    flexDirection: 'column',
    justifyContent: 'center',
    alignItems: 'center',
    paddingLeft: 24,
    marginTop: 4,
  },
  text: {
    width: 177,
    height: 30,
    textAlign: 'left',
  },
  scrwenwu: {
    fontSize: 14,
    color: '#383127',
    verticalAlign: 'bottom',
  },
  scrcontent: {
    fontSize: 10,
    color: '#B39775',
    verticalAlign: 'top',
  },
  rightBox: {
    width: 60,
    height: 50,
    position:'absolute',
    right: 0,
    top: 8,
  },
  qrcode: {
    width: 50,
    height: 50,
    borderRadius: 1,
  }
}
module.exports = {
  getwxml,
  style
}