Browse Source

Merge branch 'yantai_master' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov

yantai_master
dai 3 years ago
parent
commit
1913b6a2aa
  1. 4
      src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue
  2. 118
      src/views/pages/login.vue

4
src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

@ -171,14 +171,14 @@
</div>
<!-- <div class="div_btn">
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div> -->
</div>
</div>
</template>

118
src/views/pages/login.vue

@ -1,57 +1,57 @@
<template>
<div class="g-app">
<div class="g-bd" v-if="isShowLogin || true">
<div class="g-bd"
v-if="isShowLogin || true">
<div class="m-fm">
<div class="wrap">
<h2 class="title">{{ $t("brand.work") }}</h2>
<div class="fm">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
status-icon
>
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
status-icon>
<div class="fm-item">
<div class="ico">
<img src="@/assets/img/login/zhanghao.png" alt="" />
<img src="@/assets/img/login/zhanghao.png"
alt="" />
</div>
<el-form-item prop="phone" class="input">
<input
type="text"
v-model="dataForm.phone"
placeholder="账号"
/>
<el-form-item prop="phone"
class="input">
<input type="text"
v-model="dataForm.phone"
placeholder="账号" />
</el-form-item>
</div>
<div class="fm-item">
<div class="ico">
<img src="@/assets/img/login/mima.png" alt="" />
<img src="@/assets/img/login/mima.png"
alt="" />
</div>
<el-form-item prop="password" class="input">
<input
type="password"
v-model="dataForm.password"
:placeholder="$t('login.password')"
/>
<el-form-item prop="password"
class="input">
<input type="password"
v-model="dataForm.password"
:placeholder="$t('login.password')" />
</el-form-item>
</div>
<div class="fm-captcha">
<div class="fm-item">
<el-form-item prop="captcha" class="input">
<input
type="text"
v-model="dataForm.captcha"
placeholder="验证码"
/>
<el-form-item prop="captcha"
class="input">
<input type="text"
v-model="dataForm.captcha"
placeholder="验证码" />
</el-form-item>
</div>
<div class="captcha">
<img :src="captchaPath" @click="getCaptcha()" />
<img :src="captchaPath"
@click="getCaptcha()" />
</div>
</div>
<div class="fm-btn" @click="dataFormSubmitHandle()">
<div class="fm-btn"
@click="dataFormSubmitHandle()">
{{ $t("login.title") }}
</div>
<div class="hint">请使用小程序端的账号密码登录</div>
@ -63,25 +63,27 @@
<div class="m-footer">
<div class="login-footer">
<p>
<a href="" target="_blank">{{ $t("login.copyright") }}</a>
<a href=""
target="_blank">{{ $t("login.copyright") }}</a>
</p>
</div>
</div>
</div>
<c-dialog
:showFooter="false"
:title="'选择客户'"
:isNest="false"
:visible="diaVisible"
:dialogHeight="0.8"
:width="30"
:top="'120px'"
@cancel="diaCancel"
>
<c-dialog :showFooter="false"
:title="'选择客户'"
:isNest="false"
:visible="diaVisible"
:dialogHeight="0.8"
:width="30"
:top="'120px'"
@cancel="diaCancel">
<div class="m-pop">
<div v-for="(item, index) in tableData" :key="index" class="div_row">
<span @click="selectCustomer(item)" class="span_name">{{
<div v-for="(item, index) in tableData"
:key="index"
class="div_row">
<span @click="selectCustomer(item)"
class="span_name">{{
item.customerName
}}</span>
</div>
@ -100,7 +102,7 @@ import { Loading } from "element-ui"; // 引入Loading服务
let loading; //
export default {
data() {
data () {
return {
pubKey: null, //
isShowLogin: true,
@ -126,7 +128,7 @@ export default {
CDialog,
},
computed: {
dataRule() {
dataRule () {
return {
phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
password: [
@ -138,7 +140,7 @@ export default {
};
},
},
created() {
created () {
//
if (this.$route.query.platformToken) {
this.isShowLogin = false;
@ -149,13 +151,13 @@ export default {
this.getPubKey();
}
},
mounted() {
mounted () {
localStorage.removeItem("showHeader");
},
methods: {
//
skipAfterLogin() {
skipAfterLogin () {
let href = localStorage.getItem("thePageAtExit");
if (href && href.indexOf("login") == -1) {
localStorage.removeItem("thePageAtExit");
@ -166,7 +168,7 @@ export default {
}
},
//
getPubKey() {
getPubKey () {
this.$http
.post("/auth/govweb/getKey")
.then(({ data: res }) => {
@ -176,15 +178,15 @@ export default {
this.pubKey = res.data; // ;
})
.catch(() => {});
.catch(() => { });
},
//
getCaptcha() {
getCaptcha () {
this.dataForm.uuid = getUUID();
this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/auth/login/captcha?uuid=${this.dataForm.uuid}`;
},
//
dataFormSubmitHandle() {
dataFormSubmitHandle () {
this.$refs["dataForm"].validate((valid, messageObj) => {
console.log(valid, messageObj);
if (!valid) {
@ -222,7 +224,7 @@ export default {
});
},
//
getAutoLogin(platformToken) {
getAutoLogin (platformToken) {
this.dataForm.thirdToken = platformToken;
this.dataForm.platform = "pyld";
this.$http
@ -240,11 +242,11 @@ export default {
localStorage.setItem("token", res.data.token);
this.$router.replace({ name: "index" });
})
.catch(() => {});
.catch(() => { });
// epmet-ext9.elinkservice.cn/platform-admin
},
//
selectCustomer(row) {
selectCustomer (row) {
localStorage.setItem("customerId", row.customerId);
localStorage.setItem("customerName", row.customerName);
this.startLoading();
@ -275,11 +277,11 @@ export default {
});
},
//
diaCancel() {
diaCancel () {
this.diaVisible = false;
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -287,7 +289,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

Loading…
Cancel
Save