调试
This commit is contained in:
@@ -311,6 +311,8 @@
|
||||
if (res.code === 0) {
|
||||
const data = res.data.result.now
|
||||
|
||||
alert(JSON.stringify(data))
|
||||
|
||||
uni.setStorageSync('address', {
|
||||
...uni.getStorageSync('address'),
|
||||
weather: `${data.text} ${data.temp}°` || ''
|
||||
|
||||
@@ -79,6 +79,17 @@
|
||||
if (v.address) {
|
||||
this.address = uni.getStorageSync('address').address || ''
|
||||
this.weather = uni.getStorageSync('address').weather || ''
|
||||
this.configList = JSON.parse(JSON.stringify(this.config)).map(v => {
|
||||
if (v.fieldType === '3') {
|
||||
v.defaultValue = uni.getStorageSync('address').address || ''
|
||||
}
|
||||
|
||||
if (v.fieldType === '2') {
|
||||
v.defaultValue = uni.getStorageSync('address').weather || ''
|
||||
}
|
||||
|
||||
return v
|
||||
})
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
|
||||
Reference in New Issue
Block a user