天气
This commit is contained in:
@@ -51,7 +51,7 @@ export default {
|
||||
this.$refs.loginForm.validate(v => {
|
||||
if (v) {
|
||||
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({})
|
||||
}).catch(() => 0)
|
||||
}
|
||||
|
||||
@@ -291,16 +291,15 @@
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
const data = res.data.result.now
|
||||
alert(JSON.stringify(data))
|
||||
|
||||
uni.setStorageSync('address', {
|
||||
...uni.getStorageSync('address'),
|
||||
weather: data.text || ''
|
||||
weather: `${data.text} ${data.temp}°` || ''
|
||||
})
|
||||
|
||||
this.address = {
|
||||
...uni.getStorageSync('address'),
|
||||
weather: data.text || ''
|
||||
weather: `${data.text} ${data.temp}°` || ''
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user