|
@@ -28,7 +28,10 @@ Page({
|
|
'shop_remark': '' // 备注
|
|
'shop_remark': '' // 备注
|
|
},
|
|
},
|
|
booLock: false,
|
|
booLock: false,
|
|
- userInfo: {}
|
|
|
|
|
|
+ userInfo: {},
|
|
|
|
+ booCountryMsg: false,
|
|
|
|
+ countryMsgList: [],
|
|
|
|
+ countryMsgInDefaultIndex: 0
|
|
},
|
|
},
|
|
tempFormKey: '',
|
|
tempFormKey: '',
|
|
tempPostData: {},
|
|
tempPostData: {},
|
|
@@ -40,6 +43,9 @@ Page({
|
|
app.fetchUserDataCallback = () => {
|
|
app.fetchUserDataCallback = () => {
|
|
this.bindCallBack()
|
|
this.bindCallBack()
|
|
}
|
|
}
|
|
|
|
+ app.fetchSystemConfigCallback = () => {
|
|
|
|
+ this.setCountryMsgList()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -53,7 +59,7 @@ Page({
|
|
* 生命周期函数--监听页面显示
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
*/
|
|
onShow() {
|
|
onShow() {
|
|
-
|
|
|
|
|
|
+ this.setCountryMsgList()
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -290,7 +296,7 @@ Page({
|
|
user_card,
|
|
user_card,
|
|
shop_phone,
|
|
shop_phone,
|
|
country_msg,
|
|
country_msg,
|
|
- shop_address,
|
|
|
|
|
|
+ shop_address
|
|
} = this.getForm()
|
|
} = this.getForm()
|
|
|
|
|
|
if (!user_name) {
|
|
if (!user_name) {
|
|
@@ -342,5 +348,36 @@ Page({
|
|
this.setData({
|
|
this.setData({
|
|
booLock: false
|
|
booLock: false
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ setCountryMsgList() {
|
|
|
|
+ const { country_msg_list } = app.globalData.objSystemConfig
|
|
|
|
+
|
|
|
|
+ this.setData({
|
|
|
|
+ countryMsgList: Array.isArray(country_msg_list) && country_msg_list.length > 0 ? country_msg_list : []
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ showCountryMsg() {
|
|
|
|
+ this.setData({
|
|
|
|
+ booCountryMsg: true
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ hideCountryMsg() {
|
|
|
|
+ if (this.data.countryMsgList.length > 0) {
|
|
|
|
+ this.selectComponent('#picker-country-msg').setIndexes([this.data.countryMsgInDefaultIndex])
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.setData({
|
|
|
|
+ booCountryMsg: false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ confirmCountryMsg(event) {
|
|
|
|
+ const { value, index } = event.detail
|
|
|
|
+
|
|
|
|
+ this.setData({
|
|
|
|
+ 'form.country_msg': value,
|
|
|
|
+ countryMsgInDefaultIndex: index
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.hideCountryMsg()
|
|
}
|
|
}
|
|
})
|
|
})
|