Commit 423884b5 authored by 吴冠's avatar 吴冠

优化登录

parent aec23193
......@@ -44,8 +44,15 @@
}
},
methods: {
//收藏按钮
addFavo() {
this.$message('这是一条消息提示');
/* let browser = browser||chrome */
window.external.addFavorite({
title: document.title,
url: document.URL
}).then(
console.log('created')
)
},
admin() {
this.$router.push("/login/admin")
......
......@@ -14,7 +14,7 @@
<div class="author"></div>
<div class="login-title">{{userName}}</div>
<div class="login-button" @click="loginuser" v-show="showDefault">用户登录</div>
<div class="login-button">商家入驻</div>
<div class="login-button" @click="Merchant">商家入驻</div>
<div class="login-button" @click="checkout" v-show="!showDefault">退出</div>
</div>
</div>
......@@ -64,6 +64,9 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
this.getListSite()
},
methods:{
Merchant(){
this.$router.push('/login/examine')
},
async getCategoryList(){
const {data} = await getCategoryList()
this.dynamicList = data
......
......@@ -98,18 +98,14 @@
},
async submitForm1() {
try {
const valid = await this.$refs['params'].validate()
const valid = await this.$refs['param'].validate()
if (valid) {
/* const {
const {
msg,
code,
data
} = await powerLogin(this.param) */
//将手机号和手机验证码发送
let mess = {}
mess.phone = this.param.account
mess.verify = this.param.password
const {data,code,msg} = await getVerifyPhone(mess)
} = await powerLogin(this.param)
//将手机号和密码发送
console.log(data,code)
if (code == 200) {
sessionStorage.setItem("token",data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment