Multiple Conditional Judgments of Mini Programs: The above code
<
view
wx:for
=
"{{myattacheArr}}"
wx:key
=
"{{id}}"
wx:for-item
=
"AttacheItem"
class
=
'call-attache'
wx:if
=
"{{AttacheItem.personnelType[0]==0 && RoleArr[AttacheItem.roleType].label !='Channel Manager'&& appBindPhone==1}}"
>
<
view
class
=
'call-type'>
{{RoleArr[AttacheItem.roleType].label}}
</
view
>
<
view
class=
'call-name'>{{AttacheItem.userName}}
</
view
>
<
view
class=
'call-him'
data-number=
'{{AttacheItem.phone}}'
bindtap=
'callServeice'
>联系他
</
view
>
</
view
>
<
view
wx:for=
"{{myattacheArr}}"
wx:key=
"{{id}}"
wx:for-item=
"AttacheItem"
class=
'call-attache'
wx:if=
"{{RoleArr[AttacheItem.roleType].label =='渠道经理'&& appBindPhone==0}}"
>
<
view
class=
'call-type'>{{RoleArr[AttacheItem.roleType].label}}
</
view
>
<
view
class=
'call-name'>{{AttacheItem.userName}}
</
view
>
<
view
class=
'call-him'
data-number=
'{{AttacheItem.phone}}'
bindtap=
'callServeice'
>联系他
</
view
>
</
view
>
从上面的代码可以看出来,小程序的if判断也可以支持 ‘与或非’ 的拼接判断 这样就可以多层次进行小程序的判断了,真是美滋滋