12 changed files with 503 additions and 464 deletions
@ -1,77 +1,97 @@ |
|||||||
<template> |
<template> |
||||||
<view class="lottie-bg"> |
<view class="lottie-bg"> |
||||||
<view id="lottie"><image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" /></view> |
<view id="lottie"> |
||||||
</view> |
<image |
||||||
|
src="../../static/images/live-logo.gif" |
||||||
|
rel="preload" |
||||||
|
mode="widthFix" |
||||||
|
style="width: 100%;" |
||||||
|
/> |
||||||
|
</view> |
||||||
|
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import { mapState, mapMutations, mapActions } from 'vuex'; |
import { mapState, mapMutations, mapActions } from "vuex"; |
||||||
// 组件 |
// 组件 |
||||||
// import request from "@//api/request"; |
// import request from "@//api/request"; |
||||||
import { wxappAuth, getUser } from '@/api/user'; |
import { wxappAuth, getUser } from "@/api/user"; |
||||||
import dayjs from 'dayjs'; |
import dayjs from "dayjs"; |
||||||
import cookie from '@/utils/store/cookie'; |
import cookie from "@/utils/store/cookie"; |
||||||
import { parseQuery, login, handleQrCode } from '@/utils'; |
import { parseQuery, login, handleQrCode } from "@/utils"; |
||||||
|
|
||||||
export default { |
export default { |
||||||
name: 'Loading', |
name: "Loading", |
||||||
data() { |
data() { |
||||||
return {}; |
return {}; |
||||||
}, |
}, |
||||||
mounted() { |
onShow() { |
||||||
var url = handleQrCode(); |
var url = handleQrCode(); |
||||||
// 判断是否是分销 |
// 判断是否是分销 |
||||||
if (url) { |
if (url) { |
||||||
var spread = cookie.get('spread'); |
var spread = cookie.get("spread"); |
||||||
let urlSpread = parseInt(url.spread); |
let urlSpread = parseInt(url.spread); |
||||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { |
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { |
||||||
cookie.set('spread', urlSpread || 0); |
cookie.set("spread", urlSpread || 0); |
||||||
} else if (spread === 0 || typeof spread !== 'number') { |
} else if (spread === 0 || typeof spread !== "number") { |
||||||
cookie.set('spread', urlSpread || 0); |
cookie.set("spread", urlSpread || 0); |
||||||
} |
} |
||||||
} |
} |
||||||
// this.toLaunch(); |
if (this.$store.getters.token) { |
||||||
login({ |
this.toLaunch(); |
||||||
fail: () => { |
return; |
||||||
this.toLaunch(); |
} |
||||||
} |
console.log(this.$store.getters.token, 9999); |
||||||
}); |
cookie.get("spread"); |
||||||
}, |
// this.toLaunch(); |
||||||
methods: { |
if (this.$deviceType == 'App') { |
||||||
...mapActions(['changeAuthorization', 'changeUserInfo']), |
// this.toLaunch(); |
||||||
toLaunch() { |
this.$yrouter.switchTab({ |
||||||
console.log(this); |
path: '/pages/home/index', |
||||||
this.changeAuthorization(false); |
}); |
||||||
this.$yrouter.switchTab({ |
return |
||||||
path: '/pages/home/index', |
} |
||||||
}); |
login({ |
||||||
} |
fail: () => { |
||||||
} |
this.toLaunch(); |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
...mapActions(["changeAuthorization", "setUserInfo"]), |
||||||
|
toLaunch() { |
||||||
|
console.log(this); |
||||||
|
this.changeAuthorization(false); |
||||||
|
this.$yrouter.switchTab({ |
||||||
|
path: "/pages/home/index" |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
}; |
}; |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style scoped> |
<style scoped> |
||||||
.lottie-bg { |
.lottie-bg { |
||||||
position: fixed; |
position: fixed; |
||||||
left: 0; |
left: 0; |
||||||
top: 0; |
top: 0; |
||||||
background-color: #fff; |
background-color: #fff; |
||||||
width: 100%; |
width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
z-index: 999; |
z-index: 999; |
||||||
display: -webkit-flex; |
display: -webkit-flex; |
||||||
display: flex; |
display: flex; |
||||||
-webkit-align-items: center; |
-webkit-align-items: center; |
||||||
align-items: center; |
align-items: center; |
||||||
-webkit-justify-content: center; |
-webkit-justify-content: center; |
||||||
justify-content: center; |
justify-content: center; |
||||||
} |
} |
||||||
|
|
||||||
#lottie { |
#lottie { |
||||||
width: 35%; |
width: 35%; |
||||||
display: block; |
display: block; |
||||||
overflow: hidden; |
overflow: hidden; |
||||||
transform: translate3d(0, 0, 0); |
transform: translate3d(0, 0, 0); |
||||||
margin: auto; |
margin: auto; |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
@ -1,318 +1,329 @@ |
|||||||
<template> |
<template> |
||||||
<view class="register absolute"> |
<view class="register absolute"> |
||||||
<view class="shading"> |
<view class="shading"> |
||||||
<view class="pictrue acea-row row-center-wrapper"> |
<view class="pictrue acea-row row-center-wrapper"> |
||||||
<image src="@/assets/images/logo.png" /> |
<image src="@/assets/images/logo.png" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="whiteBg" v-if="formItem === 1"> |
<view class="whiteBg" v-if="formItem === 1"> |
||||||
<view class="title acea-row row-center-wrapper"> |
<view class="title acea-row row-center-wrapper"> |
||||||
<view |
<view class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)" |
||||||
class="item" |
:key="index">{{ item }}</view> |
||||||
:class="current === index ? 'on' : ''" |
</view> |
||||||
v-for="(item, index) in navList" |
<view class="list" :hidden="current !== 0"> |
||||||
@click="navTap(index)" |
<form @submit.prevent="submit"> |
||||||
:key="index" |
<view class="item"> |
||||||
>{{ item }}</view> |
<view class="acea-row row-between-wrapper"> |
||||||
</view> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<view class="list" :hidden="current !== 0"> |
|
||||||
<form @submit.prevent="submit"> |
|
||||||
<view class="item"> |
|
||||||
<view class="acea-row row-between-wrapper"> |
|
||||||
<svg class="icon" aria-hidden="true"> |
|
||||||
<use xlink:href="#icon-phone_" /> |
<use xlink:href="#icon-phone_" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="text" placeholder="输入手机号码" v-model="account" required /> |
<input type="text" placeholder="输入手机号码" v-model="account" required /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="item"> |
<view class="item"> |
||||||
<view class="acea-row row-between-wrapper"> |
<view class="acea-row row-between-wrapper"> |
||||||
<svg class="icon" aria-hidden="true"> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<use xlink:href="#icon-code_" /> |
<use xlink:href="#icon-code_" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="password" placeholder="填写登录密码" v-model="password" required /> |
<input type="password" placeholder="填写登录密码" v-model="password" required /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</form> |
</form> |
||||||
</view> |
</view> |
||||||
<view class="list" :hidden="current !== 1"> |
<view class="list" :hidden="current !== 1"> |
||||||
<view class="item"> |
<view class="item"> |
||||||
<view class="acea-row row-between-wrapper"> |
<view class="acea-row row-between-wrapper"> |
||||||
<svg class="icon" aria-hidden="true"> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<use xlink:href="#icon-phone_" /> |
<use xlink:href="#icon-phone_" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="text" placeholder="输入手机号码" v-model="account" /> |
<input type="text" placeholder="输入手机号码" v-model="account" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="item"> |
<view class="item"> |
||||||
<view class="align-left"> |
<view class="align-left"> |
||||||
<svg class="icon" aria-hidden="true"> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<use xlink:href="#icon-code_1" /> |
<use xlink:href="#icon-code_1" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
||||||
<button |
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">{{ text }}</button> |
||||||
class="code" |
</view> |
||||||
:disabled="disabled" |
</view> |
||||||
:class="disabled === true ? 'on' : ''" |
</view> |
||||||
@click="code" |
<view class="logon" @click="loginMobile" :hidden="current !== 1">登录</view> |
||||||
>{{ text }}</button> |
<view class="logon" @click="submit" :hidden="current === 1">登录</view> |
||||||
</view> |
<view class="tip"> |
||||||
</view> |
没有账号? |
||||||
</view> |
<text @click="formItem = 2" class="font-color-red">立即注册</text> |
||||||
<view class="logon" @click="loginMobile" :hidden="current !== 1">登录</view> |
</view> |
||||||
<view class="logon" @click="submit" :hidden="current === 1">登录</view> |
</view> |
||||||
<view class="tip"> |
<view class="whiteBg" v-else> |
||||||
没有账号? |
<view class="title">注册账号</view> |
||||||
<text @click="formItem = 2" class="font-color-red">立即注册</text> |
<view class="list"> |
||||||
</view> |
<view class="item"> |
||||||
</view> |
<view> |
||||||
<view class="whiteBg" v-else> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<view class="title">注册账号</view> |
|
||||||
<view class="list"> |
|
||||||
<view class="item"> |
|
||||||
<view> |
|
||||||
<svg class="icon" aria-hidden="true"> |
|
||||||
<use xlink:href="#icon-phone_" /> |
<use xlink:href="#icon-phone_" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="text" placeholder="输入手机号码" v-model="account" /> |
<input type="text" placeholder="输入手机号码" v-model="account" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="item"> |
<view class="item"> |
||||||
<view class="align-left"> |
<view class="align-left"> |
||||||
<svg class="icon" aria-hidden="true"> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
<use xlink:href="#icon-code_1" /> |
<use xlink:href="#icon-code_1" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" /> |
||||||
<button |
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">{{ text }}</button> |
||||||
class="code" |
</view> |
||||||
:disabled="disabled" |
</view> |
||||||
:class="disabled === true ? 'on' : ''" |
<view class="item"> |
||||||
@click="code" |
<view> |
||||||
>{{ text }}</button> |
<!-- <svg class="icon" aria-hidden="true"> |
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view> |
|
||||||
<svg class="icon" aria-hidden="true"> |
|
||||||
<use xlink:href="#icon-code_" /> |
<use xlink:href="#icon-code_" /> |
||||||
</svg> |
</svg> --> |
||||||
<input type="password" placeholder="填写您的登录密码" v-model="password" /> |
<input type="password" placeholder="填写您的登录密码" v-model="password" /> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="logon" @click="register">注册</view> |
<view class="logon" @click="register">注册</view> |
||||||
<view class="tip"> |
<view class="tip"> |
||||||
已有账号? |
已有账号? |
||||||
<text @click="formItem = 1" class="font-color-red">立即登录</text> |
<text @click="formItem = 1" class="font-color-red">立即登录</text> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
<view class="bottom"></view> |
<view class="bottom"></view> |
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
<script> |
<script> |
||||||
import sendVerifyCode from "@/mixins/SendVerifyCode"; |
import sendVerifyCode from "@/mixins/SendVerifyCode"; |
||||||
import { login, loginMobile, registerVerify, register } from "@/api/user"; |
import { |
||||||
import attrs, { required, alpha_num, chs_phone } from "@/utils/validate"; |
login, |
||||||
import { validatorDefaultCatch } from "@/utils/dialog"; |
loginMobile, |
||||||
import dayjs from "dayjs"; |
registerVerify, |
||||||
import cookie from "@/utils/store/cookie"; |
register |
||||||
|
} from "@/api/user"; |
||||||
|
import attrs, { |
||||||
|
required, |
||||||
|
alpha_num, |
||||||
|
chs_phone |
||||||
|
} from "@/utils/validate"; |
||||||
|
import { |
||||||
|
validatorDefaultCatch |
||||||
|
} from "@/utils/dialog"; |
||||||
|
import dayjs from "dayjs"; |
||||||
|
import cookie from "@/utils/store/cookie"; |
||||||
|
|
||||||
|
import {handleGetUserInfo} from '@/utils' |
||||||
|
|
||||||
const BACK_URL = "login_back_url"; |
const BACK_URL = "login_back_url"; |
||||||
|
|
||||||
export default { |
export default { |
||||||
name: "Login", |
name: "Login", |
||||||
mixins: [sendVerifyCode], |
mixins: [sendVerifyCode], |
||||||
data: function() { |
data: function() { |
||||||
return { |
return { |
||||||
navList: ["账号登录"], |
navList: ["账号登录"], |
||||||
current: 0, |
current: 0, |
||||||
account: "", |
account: "", |
||||||
password: "", |
password: "", |
||||||
captcha: "", |
captcha: "", |
||||||
formItem: 1, |
formItem: 1, |
||||||
type: "login" |
type: "login" |
||||||
}; |
}; |
||||||
}, |
}, |
||||||
methods: { |
methods: { |
||||||
async loginMobile() { |
async loginMobile() { |
||||||
var that = this; |
var that = this; |
||||||
const { account, captcha } = that; |
const { |
||||||
try { |
account, |
||||||
await that |
captcha |
||||||
.$validator({ |
} = that; |
||||||
account: [ |
try { |
||||||
required(required.message("手机号码")), |
await that |
||||||
chs_phone(chs_phone.message()) |
.$validator({ |
||||||
], |
account: [ |
||||||
captcha: [ |
required(required.message("手机号码")), |
||||||
required(required.message("验证码")), |
chs_phone(chs_phone.message()) |
||||||
alpha_num(alpha_num.message("验证码")) |
], |
||||||
] |
captcha: [ |
||||||
}) |
required(required.message("验证码")), |
||||||
.validate({ |
alpha_num(alpha_num.message("验证码")) |
||||||
account, |
] |
||||||
captcha |
}) |
||||||
}); |
.validate({ |
||||||
} catch (e) { |
account, |
||||||
return validatorDefaultCatch(e); |
captcha |
||||||
} |
}); |
||||||
loginMobile({ |
} catch (e) { |
||||||
phone: that.account, |
return validatorDefaultCatch(e); |
||||||
captcha: that.captcha, |
} |
||||||
spread: cookie.get("spread") |
loginMobile({ |
||||||
}) |
phone: that.account, |
||||||
.then(res => { |
captcha: that.captcha, |
||||||
var data = res.data; |
spread: cookie.get("spread") |
||||||
that.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); |
}) |
||||||
const backUrl = cookie.get(BACK_URL) || "/"; |
.then(res => { |
||||||
cookie.remove(BACK_URL); |
var data = res.data; |
||||||
that.$yrouter.replace({ |
that.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); |
||||||
path: backUrl |
handleGetUserInfo() |
||||||
}); |
}) |
||||||
}) |
.catch(err => { |
||||||
.catch(err => { |
uni.showToast({ |
||||||
uni.showToast({ |
title: err.msg || err.response.data.msg, |
||||||
title: err.msg || err.response.data.msg, |
icon: 'none', |
||||||
icon: 'none', |
duration: 2000 |
||||||
duration: 2000 |
}); |
||||||
}); |
}); |
||||||
}); |
}, |
||||||
}, |
async register() { |
||||||
async register() { |
var that = this; |
||||||
var that = this; |
const { |
||||||
const { account, captcha, password } = that; |
account, |
||||||
try { |
captcha, |
||||||
await that |
password |
||||||
.$validator({ |
} = that; |
||||||
account: [ |
try { |
||||||
required(required.message("手机号码")), |
await that |
||||||
chs_phone(chs_phone.message()) |
.$validator({ |
||||||
], |
account: [ |
||||||
captcha: [ |
required(required.message("手机号码")), |
||||||
required(required.message("验证码")), |
chs_phone(chs_phone.message()) |
||||||
alpha_num(alpha_num.message("验证码")) |
], |
||||||
], |
captcha: [ |
||||||
password: [ |
required(required.message("验证码")), |
||||||
required(required.message("密码")), |
alpha_num(alpha_num.message("验证码")) |
||||||
attrs.range([6, 16], attrs.range.message("密码")), |
], |
||||||
alpha_num(alpha_num.message("密码")) |
password: [ |
||||||
] |
required(required.message("密码")), |
||||||
}) |
attrs.range([6, 16], attrs.range.message("密码")), |
||||||
.validate({ |
alpha_num(alpha_num.message("密码")) |
||||||
account, |
] |
||||||
captcha, |
}) |
||||||
password |
.validate({ |
||||||
}); |
account, |
||||||
} catch (e) { |
captcha, |
||||||
return validatorDefaultCatch(e); |
password |
||||||
} |
}); |
||||||
register({ |
} catch (e) { |
||||||
account: that.account, |
return validatorDefaultCatch(e); |
||||||
captcha: that.captcha, |
} |
||||||
password: that.password, |
register({ |
||||||
spread: cookie.get("spread") |
account: that.account, |
||||||
}) |
captcha: that.captcha, |
||||||
.then(res => { |
password: that.password, |
||||||
uni.showToast({ |
spread: cookie.get("spread") |
||||||
title: res.msg, |
}) |
||||||
icon: "success", |
.then(res => { |
||||||
duration: 2000 |
uni.showToast({ |
||||||
}); |
title: res.msg, |
||||||
that.formItem = 1; |
icon: "success", |
||||||
}) |
duration: 2000 |
||||||
.catch(err => { |
}); |
||||||
uni.showToast({ |
that.formItem = 1; |
||||||
title: err.msg || err.response.data.msg, |
}) |
||||||
icon: "none", |
.catch(err => { |
||||||
duration: 2000 |
uni.showToast({ |
||||||
}); |
title: err.msg || err.response.data.msg, |
||||||
}); |
icon: "none", |
||||||
}, |
duration: 2000 |
||||||
async code() { |
}); |
||||||
var that = this; |
}); |
||||||
const { account } = that; |
}, |
||||||
try { |
async code() { |
||||||
await that |
var that = this; |
||||||
.$validator({ |
const { |
||||||
account: [ |
account |
||||||
required(required.message("手机号码")), |
} = that; |
||||||
chs_phone(chs_phone.message()) |
try { |
||||||
] |
await that |
||||||
}) |
.$validator({ |
||||||
.validate({ |
account: [ |
||||||
account |
required(required.message("手机号码")), |
||||||
}); |
chs_phone(chs_phone.message()) |
||||||
} catch (e) { |
] |
||||||
return validatorDefaultCatch(e); |
}) |
||||||
} |
.validate({ |
||||||
if (that.formItem == 2) that.type = "register"; |
account |
||||||
await registerVerify({ |
}); |
||||||
phone: that.account, |
} catch (e) { |
||||||
type: that.type |
return validatorDefaultCatch(e); |
||||||
}) |
} |
||||||
.then(res => { |
if (that.formItem == 2) that.type = "register"; |
||||||
uni.showToast({ |
await registerVerify({ |
||||||
title: res.msg, |
phone: that.account, |
||||||
icon: "success", |
type: that.type |
||||||
duration: 2000 |
}) |
||||||
}); |
.then(res => { |
||||||
that.sendCode(); |
uni.showToast({ |
||||||
}) |
title: res.msg, |
||||||
.catch(err => { |
icon: "success", |
||||||
uni.showToast({ |
duration: 2000 |
||||||
title: err.msg || err.response.data.msg, |
}); |
||||||
icon: "none", |
that.sendCode(); |
||||||
duration: 2000 |
}) |
||||||
}); |
.catch(err => { |
||||||
}); |
uni.showToast({ |
||||||
}, |
title: err.msg || err.response.data.msg, |
||||||
navTap: function(index) { |
icon: "none", |
||||||
this.current = index; |
duration: 2000 |
||||||
}, |
}); |
||||||
async submit() { |
}); |
||||||
console.log("spread:" + cookie.get("spread")); |
}, |
||||||
const { account, password } = this; |
navTap: function(index) { |
||||||
try { |
this.current = index; |
||||||
await this.$validator({ |
}, |
||||||
account: [ |
async submit() { |
||||||
required(required.message("账号")), |
console.log("spread:" + cookie.get("spread")); |
||||||
attrs.range([5, 16], attrs.range.message("账号")), |
const { |
||||||
alpha_num(alpha_num.message("账号")) |
account, |
||||||
], |
password |
||||||
password: [ |
} = this; |
||||||
required(required.message("密码")), |
try { |
||||||
attrs.range([6, 16], attrs.range.message("密码")), |
await this.$validator({ |
||||||
alpha_num(alpha_num.message("密码")) |
account: [ |
||||||
] |
required(required.message("账号")), |
||||||
}).validate({ |
attrs.range([5, 16], attrs.range.message("账号")), |
||||||
account, |
alpha_num(alpha_num.message("账号")) |
||||||
password |
], |
||||||
}); |
password: [ |
||||||
} catch (e) { |
required(required.message("密码")), |
||||||
return validatorDefaultCatch(e); |
attrs.range([6, 16], attrs.range.message("密码")), |
||||||
} |
alpha_num(alpha_num.message("密码")) |
||||||
|
] |
||||||
|
}).validate({ |
||||||
|
account, |
||||||
|
password |
||||||
|
}); |
||||||
|
} catch (e) { |
||||||
|
return validatorDefaultCatch(e); |
||||||
|
} |
||||||
|
|
||||||
login({ |
login({ |
||||||
username: account, |
username: account, |
||||||
password, |
password, |
||||||
spread: cookie.get("spread") |
spread: cookie.get("spread") |
||||||
}) |
}) |
||||||
.then(({ data }) => { |
.then(({ |
||||||
this.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); |
data |
||||||
const backUrl = cookie.get(BACK_URL) || "/"; |
}) => { |
||||||
cookie.remove(BACK_URL); |
this.$store.commit("LOGIN", data.token, dayjs(data.expires_time)); |
||||||
this.$yrouter.replace({ |
handleGetUserInfo() |
||||||
path: backUrl |
// let replace=this.$yroute.query.replace |
||||||
}); |
// if(replace){ |
||||||
}) |
|
||||||
.catch(err => { |
// } |
||||||
uni.showToast({ |
// this.$yrouter.replace({ |
||||||
title: err.msg || err.response.data.msg, |
// path: this.$yroute.query.replace || '/pages/home/index' |
||||||
icon: "none", |
// }); |
||||||
duration: 2000 |
}) |
||||||
}); |
.catch(err => { |
||||||
}); |
uni.showToast({ |
||||||
} |
title: err.msg || err.response.data.msg, |
||||||
} |
icon: "none", |
||||||
}; |
duration: 2000 |
||||||
</script> |
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
</script> |
||||||
|
Loading…
Reference in new issue