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

优化登录

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