提交 1a157781 编写于 作者: D devil_gong

小程序优化

上级 f471d0b5
......@@ -12,7 +12,7 @@
<view class="content">
<block a:if="{{item.items.length > 0}}">
<view a:for="{{item.items}}" a:for-item="v" class="content-items" data-value="{{v.id}}" onTap="category_event">
<image a:if="{{v.icon != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<image a:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
</view>
</block>
......
......@@ -56,10 +56,11 @@ Page({
self = this;
if (user != false) {
// 用户未绑定用户则转到登录页面
var msg = (user == false) ? '授权用户信息' : '绑定手机号码';
if ((user.mobile || null) == null) {
my.confirm({
title: '温馨提示',
content: '绑定手机号码',
content: msg,
confirmButtonText: '确认',
cancelButtonText: '暂不',
success: (result) => {
......@@ -70,9 +71,9 @@ Page({
}
self.setData({
avatar: user.avatar || app.data.default_user_head_src,
nickname: user.nickname,
nickname: user.nickname || '',
});
self.get_data();
my.stopPullDownRefresh();
},
});
} else {
......
......@@ -9,7 +9,7 @@
<block wx:if="{{data_content.length > 0}}">
<block wx:for="{{data_content}}" wx:key="keys" wx:for-item="v">
<view class="content-items" data-value="{{v.id}}" bindtap="category_event">
<image wx:if="{{v.icon != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<image wx:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
</view>
</block>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册