mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-03 04:19:37 +08:00
微信小程序优化
This commit is contained in:
parent
b35948a93e
commit
e90cdffcbf
@ -452,7 +452,7 @@ App({
|
||||
case 3:
|
||||
var values = value.split('|');
|
||||
if (values.length != 4) {
|
||||
wx.showToast({ content: '事件值格式有误' });
|
||||
this.showToast('事件值格式有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -108,10 +108,7 @@ Page({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: res.data.msg
|
||||
});
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
@ -121,10 +118,7 @@ Page({
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
});
|
||||
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: "服务器请求出错"
|
||||
});
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -170,10 +164,7 @@ Page({
|
||||
wx.redirectTo({url: '/pages/user-order/user-order'});
|
||||
}
|
||||
} else {
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: res.data.msg
|
||||
});
|
||||
app.showToast(res.data.msg);
|
||||
this.setData({ buy_submit_disabled_status: false });
|
||||
}
|
||||
},
|
||||
@ -181,10 +172,7 @@ Page({
|
||||
wx.hideLoading();
|
||||
this.setData({buy_submit_disabled_status: false});
|
||||
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: "服务器请求出错"
|
||||
});
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -53,10 +53,7 @@ Page({
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: res.data.msg
|
||||
});
|
||||
app.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
@ -67,10 +64,7 @@ Page({
|
||||
load_status: 1,
|
||||
});
|
||||
|
||||
wx.showToast({
|
||||
type: "fail",
|
||||
content: "服务器请求出错"
|
||||
});
|
||||
app.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -79,7 +73,7 @@ Page({
|
||||
search_input_event(e) {
|
||||
var keywords = e.detail.value || null;
|
||||
if (keywords == null) {
|
||||
wx.showToast({content: '请输入搜索关键字'});
|
||||
app.showToast("请输入搜索关键字");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,10 @@ Page({
|
||||
default_city: "请选择市",
|
||||
default_county: "请选择区/县",
|
||||
|
||||
province_value: -1,
|
||||
city_value: -1,
|
||||
county_value: -1,
|
||||
|
||||
params: null,
|
||||
},
|
||||
|
||||
|
@ -8,18 +8,18 @@
|
||||
<!-- 地区选择 -->
|
||||
<view class="select-address br-b oh">
|
||||
<view class="section fl br-r">
|
||||
<picker name="province" onChange="select_province" value="{{province_value}}" range="{{province_list}}" range-key="name">
|
||||
<view class="name">{{province_list[province_value].name || default_province}}</view>
|
||||
<picker name="province" bindchange="select_province" value="{{province_value}}" range="{{province_list}}" range-key="name">
|
||||
<view class="name {{(province_value == -1) ? 'not-selected' : '' }}">{{province_list[province_value].name || default_province}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="section fl br-r">
|
||||
<picker name="city" onChange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
|
||||
<view class="name">{{city_list[city_value].name || default_city}}</view>
|
||||
<picker name="city" bindchange="select_city" value="{{city_value}}" range="{{city_list}}" range-key="name">
|
||||
<view class="name {{(city_value == -1) ? 'not-selected' : '' }}">{{city_list[city_value].name || default_city}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="section fl">
|
||||
<picker name="county" onChange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
|
||||
<view class="name">{{county_list[county_value].name || default_county}}</view>
|
||||
<picker name="county" bindchange="select_county" value="{{county_value}}" range="{{county_list}}" range-key="name">
|
||||
<view class="name {{(county_value == -1) ? 'not-selected' : '' }}">{{county_list[county_value].name || default_county}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -6,6 +6,8 @@
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius:0;
|
||||
}
|
||||
.addressee .addressee-name{
|
||||
width: 250rpx;
|
||||
@ -22,9 +24,11 @@
|
||||
line-height: 100rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.select-address .section{
|
||||
.select-address .section {
|
||||
width: 33%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.select-address .section:not(:first-child) {
|
||||
padding: 0 5rpx;
|
||||
}
|
||||
/* end 三级联动 */
|
||||
@ -32,3 +36,6 @@
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
.not-selected {
|
||||
color: #888;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view class="list-item" wx:if="{{data_list.length > 0}}">
|
||||
<view class="goods-item oh bg-white spacing-mb" wx:for="{{data_list}}" wx:for-item="item" >
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none">
|
||||
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
|
||||
<view class="goods-base">
|
||||
<view class="goods-title multi-text">{{item.title}}</view>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view class="list-item" wx:if="{{data_list.length > 0}}">
|
||||
<view class="goods-item oh bg-white spacing-mb" wx:for="{{data_list}}" wx:for-item="item">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none">
|
||||
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
|
||||
<view class="goods-base">
|
||||
<view class="goods-title multi-text">{{item.title}}</view>
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<view class="goods bg-white spacing-mb">
|
||||
<view wx:for="{{detail.items}}" class="goods-item oh">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none">
|
||||
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
|
||||
<view class="goods-base">
|
||||
<view class="goods-title multi-text">{{item.title}}</view>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<text class="fr cr-main">{{item.status_name}}</text>
|
||||
</view>
|
||||
<view wx:for="{{item.items}}" wx:key="key" wx:for-item="detail" class="goods-item oh">
|
||||
<navigator url="/pages/user-order-detail/user-order-detail?id={{item.id}}">
|
||||
<navigator url="/pages/user-order-detail/user-order-detail?id={{item.id}}" hover-class="none">
|
||||
<image class="goods-image fl" src="{{detail.images}}" mode="aspectFill" />
|
||||
<view class="goods-base">
|
||||
<view class="goods-title multi-text" >{{detail.title}}</view>
|
||||
|
Loading…
Reference in New Issue
Block a user