更新优化

This commit is contained in:
gyq
2025-10-21 10:36:29 +08:00
parent dc0cd2076c
commit 1721203610
17 changed files with 1253 additions and 132 deletions

View File

@@ -9,6 +9,11 @@
<el-radio-button :value="1">员工</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="快捷输入账号" label-width="100px" v-if="env == 'development'">
<el-button :type="item.type" v-for="item in accountList" @click="accountHandle(item)">
{{ item.username }}
</el-button>
</el-form-item>
<el-form-item prop="username">
<el-input v-model="state.loginForm.username" type="text" auto-complete="off" placeholder="商户号"></el-input>
</el-form-item>
@@ -28,7 +33,6 @@
</div>
</div>
</el-form-item>
<el-form-item style="width: 100%">
<el-button :loading="state.loading" size="default" type="primary" style="width: 100%"
@click.prevent="handleLogin">
@@ -38,10 +42,10 @@
</el-form-item>
</el-form>
<!-- 底部 -->
<div id="el-login-footer">
<!-- <div id="el-login-footer">
<span></span>
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank"></a>
</div>
</div> -->
</div>
</template>
@@ -57,6 +61,23 @@ import { $douyin_checkIn } from "@/api/coup/index";
import { getToken, getDouyinToken, setDouyinToken } from "@/utils/auth";
const route = useRoute();
const env = process.env.NODE_ENV
const accountList = reactive([
{ username: "admin", type: 'primary' },
{ username: "19191703856", type: 'warning' },
// { username: "19191703856", type: 'danger' },
]);
// 快捷模拟登录
function accountHandle(item) {
state.loginForm.username = item.username;
const d = new Date();
state.loginForm.password = `czg${d.getHours().toString().padStart(2, '0')}${d.getMinutes().toString().padStart(2, '0')}`;
handleLogin()
}
const state = reactive({
Background: Background,
codeUrl: "",