错误的代码:
<block wx:if="{{data_info.is_own==1?false:true}}>
<template is=" fixedBtn " data="{{imagePath:imagePath,url: ‘/pages/activity/activity_qrcode?activity_id=’+activity_id+ ‘&id=’+id,bottom: ‘150’,image:imagePath+ ‘/images/white/qrcode.png’}} " />
</block>
正确的代码:
<block wx:if="{{data_info.is_own==1?false:true}}">
<template is=" fixedBtn " data="{{imagePath:imagePath,url: ‘/pages/activity/activity_qrcode?activity_id=’+activity_id+ ‘&id=’+id,bottom: ‘150’,image:imagePath+ ‘/images/white/qrcode.png’}}" />
</block>
错误代码里少了个" 格式化后会自动加空格,保存后错误,然后添加漏的双引号,空格已经自动添加了,保存后,有的因为空格会解析不出来。