|
@@ -17,10 +17,22 @@
|
|
|
@click="updateVerificationCode"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="!isDev" label="服务器地址">
|
|
|
+ <el-input v-model="base_url" placeholder="请输入服务器地址" @change="changeBaseUrl" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button class="submit" type="primary" @click="signIn">登录</el-button>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <div class="protocol">
|
|
|
+ <span>
|
|
|
+ <el-checkbox v-model="isAgree" /> 我已阅读并同意<span style="color: #4d78ff">《用户协议》</span>
|
|
|
+ </span>
|
|
|
+ <span style="color: #4d78ff">忘记密码?</span>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
+ <div class="not-tips">没有账号</div>
|
|
|
</main>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -28,12 +40,16 @@
|
|
|
<script>
|
|
|
import md5 from 'md5';
|
|
|
import { GetVerificationCodeImage, GetLogo } from '@/api/app';
|
|
|
-import { setConfig } from '@/utils/auth';
|
|
|
+import { setConfig, getBaseUrl, setBaseUrl } from '@/utils/auth';
|
|
|
+import { resetBaseUrl } from '@/utils/http';
|
|
|
|
|
|
export default {
|
|
|
name: 'LoginPage',
|
|
|
data() {
|
|
|
return {
|
|
|
+ base_url: getBaseUrl(),
|
|
|
+ isDev: process.env.NODE_ENV === 'development',
|
|
|
+ isAgree: true, // 是否同意用户协议
|
|
|
form: {
|
|
|
user_type: 'TEACHER',
|
|
|
user_name: '',
|
|
@@ -74,6 +90,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ changeBaseUrl() {
|
|
|
+ setBaseUrl(this.base_url);
|
|
|
+ resetBaseUrl();
|
|
|
+ },
|
|
|
+
|
|
|
getLogo() {
|
|
|
GetLogo().then((res) => {
|
|
|
setConfig(res);
|
|
@@ -163,10 +184,29 @@ export default {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .submit {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .protocol {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item--small.el-form-item:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- .submit {
|
|
|
- width: 100%;
|
|
|
+ .not-tips {
|
|
|
+ margin-top: 20px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
}
|