提交 3321f27d 编写于 作者: D devil

小程序新增销售+自提

上级 c5e0a096
...@@ -143,6 +143,17 @@ ...@@ -143,6 +143,17 @@
padding: 8rpx 10rpx; padding: 8rpx 10rpx;
} }
/**
* 销售+自提 模式选择
*/
.buy-header-nav {
background: #e9e9e9;
}
.buy-header-nav .item {
padding: 25rpx 0;
width: 50%;
}
/** /**
* 插件样式区域 * 插件样式区域
*/ */
......
...@@ -4,8 +4,15 @@ ...@@ -4,8 +4,15 @@
</block> </block>
<block a:else> <block a:else>
<view a:if="{{goods_list.length > 0}}" class="page"> <view a:if="{{goods_list.length > 0}}" class="page">
<!-- 销售+自提 模式选择 -->
<view a:if="{{common_site_type == 4}}" class="buy-header-nav oh tc">
<block a:for="{{buy_header_nav}}" a:key="key">
<view class="item fl {{site_model == item.value ? 'cr-main' : 'cr-666'}}" data-value="{{item.value}}" onTap="buy_header_nav_event">{{item.name}}</view>
</block>
</view>
<!-- 地址 --> <!-- 地址 -->
<block a:if="{{common_site_type == 0 || common_site_type == 2}}"> <block a:if="{{common_site_type == 0 || common_site_type == 2 || common_site_type == 4}}">
<view class="address bg-white arrow-right" onTap="address_event"> <view class="address bg-white arrow-right" onTap="address_event">
<view a:if="{{address != null}}"> <view a:if="{{address != null}}">
<view class="address-base oh"> <view class="address-base oh">
...@@ -19,7 +26,7 @@ ...@@ -19,7 +26,7 @@
</view> </view>
</view> </view>
<view a:if="{{address == null}}" class="no-address cr-888"> <view a:if="{{address == null}}" class="no-address cr-888">
请选择地址 {{(common_site_type == 0 || (common_site_type == 4 && site_model == 0)) ? '请选择收货地址' : '请选择取货地址'}}
</view> </view>
</view> </view>
<view class="address-divider spacing-mb"></view> <view class="address-divider spacing-mb"></view>
......
...@@ -17,6 +17,11 @@ Page({ ...@@ -17,6 +17,11 @@ Page({
common_order_is_booking: 0, common_order_is_booking: 0,
common_site_type: 0, common_site_type: 0,
extraction_address: [], extraction_address: [],
site_model: 0,
buy_header_nav: [
{ name: "快递邮寄", value: 0 },
{ name: "自提点取货", value: 2 }
],
// 优惠劵 // 优惠劵
plugins_coupon_data: null, plugins_coupon_data: null,
...@@ -87,6 +92,7 @@ Page({ ...@@ -87,6 +92,7 @@ Page({
data['address_id'] = this.data.address_id; data['address_id'] = this.data.address_id;
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
my.request({ my.request({
url: app.get_request_url("index", "buy"), url: app.get_request_url("index", "buy"),
method: "POST", method: "POST",
...@@ -178,10 +184,11 @@ Page({ ...@@ -178,10 +184,11 @@ Page({
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['user_note'] = this.data.user_note_value; data['user_note'] = this.data.user_note_value;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
// 数据验证 // 数据验证
var validation = []; var validation = [];
if (this.data.common_site_type == 0 || this.data.common_site_type == 2) if (this.data.common_site_type == 0 || this.data.common_site_type == 2 || this.data.common_site_type == 4)
{ {
validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 }); validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
} }
...@@ -278,12 +285,12 @@ Page({ ...@@ -278,12 +285,12 @@ Page({
// 地址选择事件 // 地址选择事件
address_event(e) { address_event(e) {
if(this.data.common_site_type == 0) if (this.data.common_site_type == 0 || (this.data.common_site_type == 4 && this.data.site_model == 0))
{ {
my.navigateTo({ my.navigateTo({
url: '/pages/user-address/user-address?is_back=1' url: '/pages/user-address/user-address?is_back=1'
}); });
} else if (this.data.common_site_type == 2) } else if (this.data.common_site_type == 2 || (this.data.common_site_type == 4 && this.data.site_model == 2))
{ {
my.navigateTo({ my.navigateTo({
url: '/pages/extraction-address/extraction-address?is_back=1' url: '/pages/extraction-address/extraction-address?is_back=1'
...@@ -293,4 +300,19 @@ Page({ ...@@ -293,4 +300,19 @@ Page({
} }
}, },
// 销售+自提 模式选择事件
buy_header_nav_event(e) {
// 数据设置
this.setData({
address: null,
address_id: null,
site_model: e.currentTarget.dataset.value || 0,
});
// 删除地址缓存
my.removeStorageSync({key: app.data.cache_buy_user_address_select_key});
// 数据初始化
this.init();
},
}); });
...@@ -4,14 +4,19 @@ Page({ ...@@ -4,14 +4,19 @@ Page({
data: { data: {
data_list_loding_status: 1, data_list_loding_status: 1,
data_list_loding_msg: '处理错误', data_list_loding_msg: '处理错误',
params: null,
name : '',
tel : '',
address: '',
is_default: 0,
province_id: null,
city_id: null,
county_id: null,
province_list: [], province_list: [],
city_list: [], city_list: [],
county_list: [], county_list: [],
province_id: null,
city_id: null,
county_id: null,
is_default: 0,
default_province: "请选择省", default_province: "请选择省",
default_city: "请选择市", default_city: "请选择市",
...@@ -20,8 +25,6 @@ Page({ ...@@ -20,8 +25,6 @@ Page({
province_value: null, province_value: null,
city_value: null, city_value: null,
county_value: null, county_value: null,
params: null,
}, },
onLoad(params) { onLoad(params) {
......
...@@ -621,8 +621,12 @@ App({ ...@@ -621,8 +621,12 @@ App({
} }
}, },
// 登录校验 /**
is_login_check(res) { * 登录校验
* object 回调操作对象
* method 回调操作对象的函数
*/
is_login_check(res, object, method) {
if(res.code == -400) if(res.code == -400)
{ {
swan.clearStorage(); swan.clearStorage();
......
...@@ -142,6 +142,17 @@ ...@@ -142,6 +142,17 @@
padding: 10rpx; padding: 10rpx;
} }
/**
* 销售+自提 模式选择
*/
.buy-header-nav {
background: #e9e9e9;
}
.buy-header-nav .item {
padding: 25rpx 0;
width: 50%;
}
/** /**
* 插件样式区域 * 插件样式区域
*/ */
......
...@@ -17,6 +17,11 @@ Page({ ...@@ -17,6 +17,11 @@ Page({
common_order_is_booking: 0, common_order_is_booking: 0,
common_site_type: 0, common_site_type: 0,
extraction_address: [], extraction_address: [],
site_model: 0,
buy_header_nav: [
{ name: "快递邮寄", value: 0 },
{ name: "自提点取货", value: 2 }
],
// 优惠劵 // 优惠劵
plugins_coupon_data: null, plugins_coupon_data: null,
...@@ -72,6 +77,7 @@ Page({ ...@@ -72,6 +77,7 @@ Page({
data['address_id'] = this.data.address_id; data['address_id'] = this.data.address_id;
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
swan.request({ swan.request({
url: app.get_request_url("index", "buy"), url: app.get_request_url("index", "buy"),
method: "POST", method: "POST",
...@@ -160,10 +166,11 @@ Page({ ...@@ -160,10 +166,11 @@ Page({
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['user_note'] = this.data.user_note_value; data['user_note'] = this.data.user_note_value;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
// 数据验证 // 数据验证
var validation = []; var validation = [];
if (this.data.common_site_type == 0 || this.data.common_site_type == 2) { if (this.data.common_site_type == 0 || this.data.common_site_type == 2 || this.data.common_site_type == 4) {
validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 }); validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
} }
if (this.data.common_order_is_booking != 1) { if (this.data.common_order_is_booking != 1) {
...@@ -257,17 +264,32 @@ Page({ ...@@ -257,17 +264,32 @@ Page({
// 地址选择事件 // 地址选择事件
address_event(e) { address_event(e) {
if (this.data.common_site_type == 0) { if (this.data.common_site_type == 0 || (this.data.common_site_type == 4 && this.data.site_model == 0)) {
swan.navigateTo({ swan.navigateTo({
url: '/pages/user-address/user-address?is_back=1' url: '/pages/user-address/user-address?is_back=1'
}); });
} else if (this.data.common_site_type == 2) { } else if (this.data.common_site_type == 2 || (this.data.common_site_type == 4 && this.data.site_model == 2)) {
swan.navigateTo({ swan.navigateTo({
url: '/pages/extraction-address/extraction-address?is_back=1' url: '/pages/extraction-address/extraction-address?is_back=1'
}); });
} else { } else {
app.showToast('当前模式不允许使用地址'); app.showToast('当前模式不允许使用地址');
} }
} },
// 销售+自提 模式选择事件
buy_header_nav_event(e) {
// 数据设置
this.setData({
address: null,
address_id: null,
site_model: e.currentTarget.dataset.value || 0,
});
// 删除地址缓存
swan.removeStorageSync(app.data.cache_buy_user_address_select_key);
// 数据初始化
this.init();
},
}); });
\ No newline at end of file
...@@ -4,8 +4,15 @@ ...@@ -4,8 +4,15 @@
</block> </block>
<block s-else> <block s-else>
<view s-if="goods_list.length > 0" class="page"> <view s-if="goods_list.length > 0" class="page">
<!-- 销售+自提 模式选择 -->
<view s-if="common_site_type == 4" class="buy-header-nav oh tc">
<block s-for="{{buy_header_nav}}" s-key="key">
<view class="item fl {{site_model == item.value ? 'cr-main' : 'cr-666'}}" data-value="{{item.value}}" bindtap="buy_header_nav_event">{{item.name}}</view>
</block>
</view>
<!-- 地址 --> <!-- 地址 -->
<block s-if="common_site_type == 0 || common_site_type == 2"> <block s-if="common_site_type == 0 || common_site_type == 2 || common_site_type == 4">
<view class="address bg-white arrow-right" bindtap="address_event"> <view class="address bg-white arrow-right" bindtap="address_event">
<view s-if="address != null"> <view s-if="address != null">
<view class="address-base oh"> <view class="address-base oh">
...@@ -19,7 +26,7 @@ ...@@ -19,7 +26,7 @@
</view> </view>
</view> </view>
<view s-if="address == null" class="no-address cr-888"> <view s-if="address == null" class="no-address cr-888">
请选择地址 {{(common_site_type == 0 || (common_site_type == 4 && site_model == 0)) ? '请选择收货地址' : '请选择取货地址'}}
</view> </view>
</view> </view>
<view class="address-divider spacing-mb"></view> <view class="address-divider spacing-mb"></view>
......
...@@ -2,13 +2,21 @@ const app = getApp(); ...@@ -2,13 +2,21 @@ const app = getApp();
Page({ Page({
data: { data: {
province_list: [], data_list_loding_status: 1,
city_list: [], data_list_loding_msg: '处理错误',
county_list: [], params: null,
name : '',
tel : '',
address: '',
is_default: 0,
province_id: null, province_id: null,
city_id: null, city_id: null,
county_id: null, county_id: null,
is_default: 0,
province_list: [],
city_list: [],
county_list: [],
default_province: "请选择省", default_province: "请选择省",
default_city: "请选择市", default_city: "请选择市",
...@@ -16,9 +24,7 @@ Page({ ...@@ -16,9 +24,7 @@ Page({
province_value: null, province_value: null,
city_value: null, city_value: null,
county_value: null, county_value: null
params: null
}, },
onLoad(params) { onLoad(params) {
......
...@@ -17,6 +17,11 @@ Page({ ...@@ -17,6 +17,11 @@ Page({
common_order_is_booking: 0, common_order_is_booking: 0,
common_site_type: 0, common_site_type: 0,
extraction_address: [], extraction_address: [],
site_model: 0,
buy_header_nav: [
{ name: "快递邮寄", value: 0 },
{ name: "自提点取货", value: 2 }
],
// 优惠劵 // 优惠劵
plugins_coupon_data: null, plugins_coupon_data: null,
...@@ -75,6 +80,7 @@ Page({ ...@@ -75,6 +80,7 @@ Page({
data['address_id'] = this.data.address_id; data['address_id'] = this.data.address_id;
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
qq.request({ qq.request({
url: app.get_request_url("index", "buy"), url: app.get_request_url("index", "buy"),
method: "POST", method: "POST",
...@@ -166,10 +172,11 @@ Page({ ...@@ -166,10 +172,11 @@ Page({
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['user_note'] = this.data.user_note_value; data['user_note'] = this.data.user_note_value;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
// 数据验证 // 数据验证
var validation = []; var validation = [];
if (this.data.common_site_type == 0 || this.data.common_site_type == 2) if (this.data.common_site_type == 0 || this.data.common_site_type == 2 || this.data.common_site_type == 4)
{ {
validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 }); validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
} }
...@@ -264,12 +271,12 @@ Page({ ...@@ -264,12 +271,12 @@ Page({
// 地址选择事件 // 地址选择事件
address_event(e) { address_event(e) {
if(this.data.common_site_type == 0) if (this.data.common_site_type == 0 || (this.data.common_site_type == 4 && this.data.site_model == 0))
{ {
qq.navigateTo({ qq.navigateTo({
url: '/pages/user-address/user-address?is_back=1' url: '/pages/user-address/user-address?is_back=1'
}); });
} else if (this.data.common_site_type == 2) } else if (this.data.common_site_type == 2 || (this.data.common_site_type == 4 && this.data.site_model == 2))
{ {
qq.navigateTo({ qq.navigateTo({
url: '/pages/extraction-address/extraction-address?is_back=1' url: '/pages/extraction-address/extraction-address?is_back=1'
...@@ -279,4 +286,19 @@ Page({ ...@@ -279,4 +286,19 @@ Page({
} }
}, },
// 销售+自提 模式选择事件
buy_header_nav_event(e) {
// 数据设置
this.setData({
address: null,
address_id: null,
site_model: e.currentTarget.dataset.value || 0,
});
// 删除地址缓存
qq.removeStorageSync(app.data.cache_buy_user_address_select_key);
// 数据初始化
this.init();
},
}); });
...@@ -4,8 +4,15 @@ ...@@ -4,8 +4,15 @@
</block> </block>
<block qq:else> <block qq:else>
<view qq:if="{{goods_list.length > 0}}" class="page"> <view qq:if="{{goods_list.length > 0}}" class="page">
<!-- 销售+自提 模式选择 -->
<view qq:if="{{common_site_type == 4}}" class="buy-header-nav oh tc">
<block qq:for="{{buy_header_nav}}" qq:key="key">
<view class="item fl {{site_model == item.value ? 'cr-main' : 'cr-666'}}" data-value="{{item.value}}" bindtap="buy_header_nav_event">{{item.name}}</view>
</block>
</view>
<!-- 地址 --> <!-- 地址 -->
<block qq:if="{{common_site_type == 0 || common_site_type == 2}}"> <block qq:if="{{common_site_type == 0 || common_site_type == 2 || common_site_type == 4}}">
<view class="address bg-white arrow-right" bindtap="address_event"> <view class="address bg-white arrow-right" bindtap="address_event">
<view qq:if="{{address != null}}"> <view qq:if="{{address != null}}">
<view class="address-base oh"> <view class="address-base oh">
...@@ -19,7 +26,7 @@ ...@@ -19,7 +26,7 @@
</view> </view>
</view> </view>
<view qq:if="{{address == null}}" class="no-address cr-888"> <view qq:if="{{address == null}}" class="no-address cr-888">
请选择地址 {{(common_site_type == 0 || (common_site_type == 4 && site_model == 0)) ? '请选择收货地址' : '请选择取货地址'}}
</view> </view>
</view> </view>
<view class="address-divider spacing-mb"></view> <view class="address-divider spacing-mb"></view>
......
...@@ -141,6 +141,17 @@ ...@@ -141,6 +141,17 @@
padding: 12rpx; padding: 12rpx;
} }
/**
* 销售+自提 模式选择
*/
.buy-header-nav {
background: #e9e9e9;
}
.buy-header-nav .item {
padding: 25rpx 0;
width: 50%;
}
/** /**
* 插件样式区域 * 插件样式区域
*/ */
......
...@@ -2,13 +2,21 @@ const app = getApp(); ...@@ -2,13 +2,21 @@ const app = getApp();
Page({ Page({
data: { data: {
province_list: [], data_list_loding_status: 1,
city_list: [], data_list_loding_msg: '处理错误',
county_list: [], params: null,
name : '',
tel : '',
address: '',
is_default: 0,
province_id: null, province_id: null,
city_id: null, city_id: null,
county_id: null, county_id: null,
is_default: 0,
province_list: [],
city_list: [],
county_list: [],
default_province: "请选择省", default_province: "请选择省",
default_city: "请选择市", default_city: "请选择市",
...@@ -17,8 +25,6 @@ Page({ ...@@ -17,8 +25,6 @@ Page({
province_value: null, province_value: null,
city_value: null, city_value: null,
county_value: null, county_value: null,
params: null,
}, },
onLoad(params) { onLoad(params) {
......
...@@ -17,6 +17,11 @@ Page({ ...@@ -17,6 +17,11 @@ Page({
common_order_is_booking: 0, common_order_is_booking: 0,
common_site_type: 0, common_site_type: 0,
extraction_address: [], extraction_address: [],
site_model: 0,
buy_header_nav: [
{ name: "快递邮寄", value: 0 },
{ name: "自提点取货", value: 2 }
],
// 优惠劵 // 优惠劵
plugins_coupon_data: null, plugins_coupon_data: null,
...@@ -75,6 +80,7 @@ Page({ ...@@ -75,6 +80,7 @@ Page({
data['address_id'] = this.data.address_id; data['address_id'] = this.data.address_id;
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
tt.request({ tt.request({
url: app.get_request_url("index", "buy"), url: app.get_request_url("index", "buy"),
method: "POST", method: "POST",
...@@ -166,10 +172,11 @@ Page({ ...@@ -166,10 +172,11 @@ Page({
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
data['user_note'] = this.data.user_note_value; data['user_note'] = this.data.user_note_value;
data['coupon_id'] = this.data.plugins_use_coupon_id; data['coupon_id'] = this.data.plugins_use_coupon_id;
data['site_model'] = this.data.site_model;
// 数据验证 // 数据验证
var validation = []; var validation = [];
if (this.data.common_site_type == 0 || this.data.common_site_type == 2) if (this.data.common_site_type == 0 || this.data.common_site_type == 2 || this.data.common_site_type == 4)
{ {
validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 }); validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
} }
...@@ -264,12 +271,12 @@ Page({ ...@@ -264,12 +271,12 @@ Page({
// 地址选择事件 // 地址选择事件
address_event(e) { address_event(e) {
if(this.data.common_site_type == 0) if (this.data.common_site_type == 0 || (this.data.common_site_type == 4 && this.data.site_model == 0))
{ {
tt.navigateTo({ tt.navigateTo({
url: '/pages/user-address/user-address?is_back=1' url: '/pages/user-address/user-address?is_back=1'
}); });
} else if (this.data.common_site_type == 2) } else if (this.data.common_site_type == 2 || (this.data.common_site_type == 4 && this.data.site_model == 2))
{ {
tt.navigateTo({ tt.navigateTo({
url: '/pages/extraction-address/extraction-address?is_back=1' url: '/pages/extraction-address/extraction-address?is_back=1'
...@@ -279,4 +286,19 @@ Page({ ...@@ -279,4 +286,19 @@ Page({
} }
}, },
// 销售+自提 模式选择事件
buy_header_nav_event(e) {
// 数据设置
this.setData({
address: null,
address_id: null,
site_model: e.currentTarget.dataset.value || 0,
});
// 删除地址缓存
tt.removeStorageSync(app.data.cache_buy_user_address_select_key);
// 数据初始化
this.init();
},
}); });
...@@ -4,8 +4,15 @@ ...@@ -4,8 +4,15 @@
</block> </block>
<block tt:else> <block tt:else>
<view tt:if="{{goods_list.length > 0}}" class="page"> <view tt:if="{{goods_list.length > 0}}" class="page">
<!-- 销售+自提 模式选择 -->
<view tt:if="{{common_site_type == 4}}" class="buy-header-nav oh tc">
<block tt:for="{{buy_header_nav}}" tt:key="key">
<view class="item fl {{site_model == item.value ? 'cr-main' : 'cr-666'}}" data-value="{{item.value}}" bindtap="buy_header_nav_event">{{item.name}}</view>
</block>
</view>
<!-- 地址 --> <!-- 地址 -->
<block tt:if="{{common_site_type == 0 || common_site_type == 2}}"> <block tt:if="{{common_site_type == 0 || common_site_type == 2 || common_site_type == 4}}">
<view class="address bg-white arrow-right" bindtap="address_event"> <view class="address bg-white arrow-right" bindtap="address_event">
<view tt:if="{{address != null}}"> <view tt:if="{{address != null}}">
<view class="address-base oh"> <view class="address-base oh">
...@@ -19,7 +26,7 @@ ...@@ -19,7 +26,7 @@
</view> </view>
</view> </view>
<view tt:if="{{address == null}}" class="no-address cr-888"> <view tt:if="{{address == null}}" class="no-address cr-888">
请选择地址 {{(common_site_type == 0 || (common_site_type == 4 && site_model == 0)) ? '请选择收货地址' : '请选择取货地址'}}
</view> </view>
</view> </view>
<view class="address-divider spacing-mb"></view> <view class="address-divider spacing-mb"></view>
......
...@@ -141,6 +141,17 @@ ...@@ -141,6 +141,17 @@
padding: 12rpx; padding: 12rpx;
} }
/**
* 销售+自提 模式选择
*/
.buy-header-nav {
background: #e9e9e9;
}
.buy-header-nav .item {
padding: 25rpx 0;
width: 50%;
}
/** /**
* 插件样式区域 * 插件样式区域
*/ */
......
...@@ -2,13 +2,21 @@ const app = getApp(); ...@@ -2,13 +2,21 @@ const app = getApp();
Page({ Page({
data: { data: {
province_list: [], data_list_loding_status: 1,
city_list: [], data_list_loding_msg: '处理错误',
county_list: [], params: null,
name : '',
tel : '',
address: '',
is_default: 0,
province_id: null, province_id: null,
city_id: null, city_id: null,
county_id: null, county_id: null,
is_default: 0,
province_list: [],
city_list: [],
county_list: [],
default_province: "请选择省", default_province: "请选择省",
default_city: "请选择市", default_city: "请选择市",
...@@ -17,8 +25,6 @@ Page({ ...@@ -17,8 +25,6 @@ Page({
province_value: null, province_value: null,
city_value: null, city_value: null,
county_value: null, county_value: null,
params: null,
}, },
onLoad(params) { onLoad(params) {
......
...@@ -176,7 +176,7 @@ Page({ ...@@ -176,7 +176,7 @@ Page({
// 数据验证 // 数据验证
var validation = []; var validation = [];
if (this.data.common_site_type == 0 || this.data.common_site_type == 2) if (this.data.common_site_type == 0 || this.data.common_site_type == 2 || this.data.common_site_type == 4)
{ {
validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 }); validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
} }
......
...@@ -2,13 +2,21 @@ const app = getApp(); ...@@ -2,13 +2,21 @@ const app = getApp();
Page({ Page({
data: { data: {
province_list: [], data_list_loding_status: 1,
city_list: [], data_list_loding_msg: '处理错误',
county_list: [], params: null,
name : '',
tel : '',
address: '',
is_default: 0,
province_id: null, province_id: null,
city_id: null, city_id: null,
county_id: null, county_id: null,
is_default: 0,
province_list: [],
city_list: [],
county_list: [],
default_province: "请选择省", default_province: "请选择省",
default_city: "请选择市", default_city: "请选择市",
...@@ -17,8 +25,6 @@ Page({ ...@@ -17,8 +25,6 @@ Page({
province_value: null, province_value: null,
city_value: null, city_value: null,
county_value: null, county_value: null,
params: null,
}, },
onLoad(params) { onLoad(params) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册