企业微信ios不能生成海报,普通微信上可以生成海报?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:05 1506 0 全屏看文

AI助手支持GPT4.0

企业微信ios不能生成海报,普通微信上可以生成海报?

使用的扩展工具 wxml-to-canvas

企业微信上,安卓、虚拟机上面都可以正常生成海报。

ios企业微信没办法生成海报,但是普通微信上可以正常生成海报。

ios 13.x 左右。

Using the extension tool wxml to canvas, posters can be generated normally on Android and virtual machine. IOS enterprise wechat can not generate posters, but ordinary wechat can generate posters normally. IOS 13. X.

回答:

企业微信运营专员-千夜:

您好,能否提供复现问题的代码片段看下

王建:可以,我放到哪里
王建:const wxml = item => {
 const originPrice = item.spec.originalPrice > item.spec.price ? `<text class="origin">原价:${item.spec.originalPrice}元</text>` : ''
 item.bgImg = item.spec.img.indexOf('http:') != -1 ? item.spec.img.replace(/http:/, 'https:') : item.bgImg
 item.tempImg = item.tempImg.indexOf('http:') != -1 ? item.tempImg.replace(/http:/, 'https:') : item.tempImg
  return `<view class="container">
   <image class="img" src="${item.bgImg}"></image>
   <view class="title-warp">
    <view><text class="title">${item.detail.goodsName}</text></view>
    <view><text class="rules">${item.detail.goodsShareDesc}</text></view>
   </view>
   <view class="info-block">
    <view class="price-box">
     <view class="price"><text class="un">¥</text><text class="amt">${item.spec.price}</text></view>
     <view>${originPrice}</view>
    </view>
    <view class="ewm-block">
     <image src="${item.tempImg}" class="ewm"></image>
      <view><text class="ewm-text">长按或者扫一扫</text></view>
    </view>
   </view>
  </view>
  `
}
const style = item => {
 return {
  container:{
   width: 300,
   height: 240 + 130 + 50 + 40,
   backgroundColor:'#fff',
  },
  img:{
   width: 300,
   height: 182,
  },
  titleWarp: {
   width: 270,
   height:90,
   marginLeft: 15,
   marginRight: 15,
   flexDirection: 'column',
   alignItems: 'center',
   justifyContent: 'flex-start',
  },
  title: {
   width: 270,
   height: 50,
   fontSize: 18,
   verticalAlign: 'bottom',
  },
  infoBlock:{
   width:270,
   height:130,
   paddingLeft:15,
   paddingRight:15,
   flexDirection:'row',
   justifyContent:'space-between',
   alignItems: 'center',
  },
  priceBox: {
   width: 180,
  },
  price: {
   width: 180,
   height:33,
   flexDirection: 'row',
   alignItems: 'flex-start',
   justifyContent: 'flex-start',
  },
  un: {
   height: 28,
   width: 11,
   fontSize: 12,
   verticalAlign: 'bottom',
   color: '#ff6655',
  },
  amt: {
   width: 170,
   height: 33,
   fontSize: 22,
   verticalAlign: 'bottom',
   color: '#ff6655',
  },
  origin: {
   height:16,
   width: 180,
   fontSize: 10,
   textAlign:'left',
   verticalAlign: 'bottom',
   color:'#999999'
  },
  ewmBlock:{
   width:90,
   height:130,
   flexDirection: 'column',
   alignItems: 'center',
   justifyContent: 'center',
  },
  ewm: {
   width:90,
   height:90,
  },
  ewmText: {
   width: 120,
   height: 18,
   fontSize: 9,
   textAlign:'center',
   verticalAlign: 'middle',
   color: '#999'
  },
  rules:{
   width: 270,
   height:40,
   fontSize:10,
   marginTop:10,
   verticalAlign: 'top',
   color:'#999'
  }
 }
}
export const post = arg => {
 console.log(arg)
  return {
    wxml: wxml(arg),
    style: style(arg),
  width: 300,
  height: 182 + 130 + 50 + 40,
  }
}
王建:解决了,感谢。是源码里面有限制

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
微信支付返回-1,未登录情况下可以拉起微信,登录情况下拉不起微信,错误码返回-1
微信支付分免押申请?
微信公众号添加授权域名提示域名不合法怎么办?
返回的json数据存在当value为空时,key也消失,能不能当value为空时,key值就为空呢
之前能够正常访问的H5项目,今天突然在微信中打不开了,打开一片空白,在微信开发者中是可以正常打开的?
随便看看
教育科技公司申请微信支付被拒绝? 3932
微信公众号免300认证教程 5039
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4258
小程序广告组件通过审核,但是小程序内没有显示广告? 4333
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8239
问题? 7463
如何快速搭建抽奖助手小程序(无需代码知识) 5141
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6100
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5707
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5289