天气
This commit is contained in:
@@ -51,7 +51,7 @@ export default {
|
|||||||
this.$refs.loginForm.validate(v => {
|
this.$refs.loginForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
let {name: module} = this.currentApp
|
let {name: module} = this.currentApp
|
||||||
this.getToken({...this.form, module}).then(() => {
|
this.getToken({...this.form, module, corpId: 'wpytYEDgAAcpXjmlYkYwKO60JDGDWrXg'}).then(() => {
|
||||||
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
||||||
}).catch(() => 0)
|
}).catch(() => 0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,16 +291,15 @@
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
const data = res.data.result.now
|
const data = res.data.result.now
|
||||||
alert(JSON.stringify(data))
|
|
||||||
|
|
||||||
uni.setStorageSync('address', {
|
uni.setStorageSync('address', {
|
||||||
...uni.getStorageSync('address'),
|
...uni.getStorageSync('address'),
|
||||||
weather: data.text || ''
|
weather: `${data.text} ${data.temp}°` || ''
|
||||||
})
|
})
|
||||||
|
|
||||||
this.address = {
|
this.address = {
|
||||||
...uni.getStorageSync('address'),
|
...uni.getStorageSync('address'),
|
||||||
weather: data.text || ''
|
weather: `${data.text} ${data.temp}°` || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user