|
|
|
@ -60,17 +60,15 @@
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
<choice ref="choice" @radioData="radioData"></choice>
|
|
|
|
<choice ref="choice" @radioData="radioData"></choice>
|
|
|
|
<hiddens ref="hiddens" @hiddensData="hiddensData"></hiddens>
|
|
|
|
<hiddens ref="hiddens" @hiddensData="hiddensData"></hiddens>
|
|
|
|
|
|
|
|
<super-password ref="superPassword" @confirm='confirm' :storeId="storeId" :mobilePhone='form.mobilePhone' :password='form.password'/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
phoneLogin,
|
|
|
|
|
|
|
|
phonePassLogin,
|
|
|
|
phonePassLogin,
|
|
|
|
getSmsCode,
|
|
|
|
getSmsCode,
|
|
|
|
staffls,
|
|
|
|
|
|
|
|
storeLists,
|
|
|
|
storeLists,
|
|
|
|
getSmsCodesPassword,
|
|
|
|
|
|
|
|
phonePassLoginzd,
|
|
|
|
phonePassLoginzd,
|
|
|
|
phonePassLoginNew,
|
|
|
|
phonePassLoginNew,
|
|
|
|
phonePassLoginNews,
|
|
|
|
phonePassLoginNews,
|
|
|
|
@ -85,8 +83,9 @@ import { setCookie, getCookie, delCookie } from "../utils/utils";
|
|
|
|
import { partten } from "../../partten/index";
|
|
|
|
import { partten } from "../../partten/index";
|
|
|
|
import choice from "./components/radio.vue";
|
|
|
|
import choice from "./components/radio.vue";
|
|
|
|
import hiddens from "./components/hiddens.vue";
|
|
|
|
import hiddens from "./components/hiddens.vue";
|
|
|
|
|
|
|
|
import superPassword from "./components/superPassword.vue";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: { choice, hiddens },
|
|
|
|
components: { choice, hiddens,superPassword },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
@ -110,9 +109,13 @@ export default {
|
|
|
|
passText: "",
|
|
|
|
passText: "",
|
|
|
|
rowForm: {},
|
|
|
|
rowForm: {},
|
|
|
|
loginText: "",
|
|
|
|
loginText: "",
|
|
|
|
|
|
|
|
res:null,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
confirm(){
|
|
|
|
|
|
|
|
this.toHome(this.res)
|
|
|
|
|
|
|
|
},
|
|
|
|
openPass() {
|
|
|
|
openPass() {
|
|
|
|
this.$refs.password.focus();
|
|
|
|
this.$refs.password.focus();
|
|
|
|
this.$refs.password.select();
|
|
|
|
this.$refs.password.select();
|
|
|
|
@ -167,6 +170,7 @@ export default {
|
|
|
|
if (partten.phoneNum.test(this.form.mobilePhone)) {
|
|
|
|
if (partten.phoneNum.test(this.form.mobilePhone)) {
|
|
|
|
phonePassLoginNew(this.form).then((res) => {
|
|
|
|
phonePassLoginNew(this.form).then((res) => {
|
|
|
|
if (res.code == "000000") {
|
|
|
|
if (res.code == "000000") {
|
|
|
|
|
|
|
|
// this.$refs.superPassword.dialogVisible = true
|
|
|
|
if (res.data.storeType == 2) {
|
|
|
|
if (res.data.storeType == 2) {
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
@ -211,10 +215,16 @@ export default {
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
this.toHome(res);
|
|
|
|
// this.toHome(res);
|
|
|
|
} else {
|
|
|
|
if(v.dynamicCheckPsw==1){
|
|
|
|
this.$refs.choice.show(res.data.baseStores);
|
|
|
|
this.$refs.superPassword.dialogVisible = true
|
|
|
|
}
|
|
|
|
this.res = res
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.toHome(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$refs.choice.show(res.data.baseStores);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
@ -234,7 +244,13 @@ export default {
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
this.toHome(res);
|
|
|
|
// this.toHome(res);
|
|
|
|
|
|
|
|
if(v.dynamicCheckPsw==1){
|
|
|
|
|
|
|
|
this.$refs.superPassword.dialogVisible = true
|
|
|
|
|
|
|
|
this.res = res
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.toHome(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$refs.choice.show(res.data.baseStores);
|
|
|
|
this.$refs.choice.show(res.data.baseStores);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -255,6 +271,7 @@ export default {
|
|
|
|
radioData(v) {
|
|
|
|
radioData(v) {
|
|
|
|
let form = { ...this.form };
|
|
|
|
let form = { ...this.form };
|
|
|
|
form.storeId = v.id;
|
|
|
|
form.storeId = v.id;
|
|
|
|
|
|
|
|
this.storeId = v.id
|
|
|
|
form.storeName = v.storeName;
|
|
|
|
form.storeName = v.storeName;
|
|
|
|
form.storeNum = v.storeNum;
|
|
|
|
form.storeNum = v.storeNum;
|
|
|
|
if (this.showLogin == 0) {
|
|
|
|
if (this.showLogin == 0) {
|
|
|
|
@ -263,7 +280,13 @@ export default {
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
this.toHome(res);
|
|
|
|
if(v.dynamicCheckPsw==1){
|
|
|
|
|
|
|
|
this.$refs.superPassword.dialogVisible = true
|
|
|
|
|
|
|
|
this.res = res
|
|
|
|
|
|
|
|
// this.toHome(res);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.toHome(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
@ -282,7 +305,13 @@ export default {
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
localStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
sessionStorage.setItem("token", res.data.token);
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
setCookie("token", res.data.token, 120); //设置
|
|
|
|
this.toHome(res);
|
|
|
|
// this.toHome(res);
|
|
|
|
|
|
|
|
if(v.dynamicCheckPsw==1){
|
|
|
|
|
|
|
|
this.$refs.superPassword.dialogVisible = true
|
|
|
|
|
|
|
|
this.res = res
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.toHome(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
this.$alert(res.message, "提示", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
@ -331,7 +360,6 @@ export default {
|
|
|
|
}).then((res) => {
|
|
|
|
}).then((res) => {
|
|
|
|
sessionStorage.setItem("storeInfo", JSON.stringify(res.data));
|
|
|
|
sessionStorage.setItem("storeInfo", JSON.stringify(res.data));
|
|
|
|
if (res.code == "000000") {
|
|
|
|
if (res.code == "000000") {
|
|
|
|
console.log('存储进去了呀???',res.data)
|
|
|
|
|
|
|
|
if (res.data.parentId == null) {
|
|
|
|
if (res.data.parentId == null) {
|
|
|
|
sessionStorage.setItem("parentId", res.data.id);
|
|
|
|
sessionStorage.setItem("parentId", res.data.id);
|
|
|
|
sessionStorage.setItem("parentName", res.data.storeName);
|
|
|
|
sessionStorage.setItem("parentName", res.data.storeName);
|
|
|
|
|