fixbug
This commit is contained in:
parent
37e7ac68b2
commit
f2c31084c7
@ -100,7 +100,7 @@ module.exports = configure(function (/* ctx */) {
|
||||
// (like functional components as one of the examples),
|
||||
// you can manually specify Quasar components/directives to be available everywhere:
|
||||
//
|
||||
// components: [],
|
||||
components: ['QInput'],
|
||||
// directives: [],
|
||||
|
||||
// Quasar plugins
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<q-btn dense flat no-wrap>
|
||||
<q-avatar size="40px">
|
||||
<img :src="user.avatar" />
|
||||
<img :src="user.avatar" @click="updateInfo">
|
||||
</q-avatar>
|
||||
<q-icon name="arrow_drop_down" size="16px" />
|
||||
<q-menu auto-close>
|
||||
@ -82,13 +82,17 @@ import { LocalStorage, SessionStorage } from "quasar";
|
||||
import { ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
const tab = ref("ai");
|
||||
const user = ref(null)
|
||||
const router = useRouter();
|
||||
const user = LocalStorage.getItem("sd-accountInfo") || {};
|
||||
user.value = LocalStorage.getItem("sd-accountInfo") || {};
|
||||
const logOut = () => {
|
||||
LocalStorage.remove("sd-accountInfo");
|
||||
LocalStorage.remove("sd-token");
|
||||
window.location.href = "/#/login";
|
||||
};
|
||||
const updateInfo = () => {
|
||||
user.value = LocalStorage.getItem("sd-accountInfo") || {};
|
||||
};
|
||||
const goMine = () => {
|
||||
router.push("/mine?active=mineCenter");
|
||||
};
|
||||
|
@ -63,6 +63,11 @@
|
||||
class="input-box"
|
||||
v-model="telNum"
|
||||
:dense="true"
|
||||
@keyup="
|
||||
() => {
|
||||
telNum = telNum.trim();
|
||||
}
|
||||
"
|
||||
placeholder="请输入账号"
|
||||
/>
|
||||
</div>
|
||||
@ -73,6 +78,11 @@
|
||||
maxlength="8"
|
||||
class="input-box"
|
||||
v-model="password"
|
||||
@keyup="
|
||||
() => {
|
||||
password = password.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入密码"
|
||||
>
|
||||
@ -86,7 +96,9 @@
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="forget" @click="forgetPwd">忘记密码?</div>
|
||||
<div class="forget">
|
||||
<span @click="forgetPwd">忘记密码?</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 'code'">
|
||||
@ -97,6 +109,11 @@
|
||||
<q-input
|
||||
class="input-box"
|
||||
v-model="telNum"
|
||||
@keyup="
|
||||
() => {
|
||||
telNum = telNum.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入账号"
|
||||
/>
|
||||
@ -107,20 +124,17 @@
|
||||
>
|
||||
<q-input
|
||||
style="width: 250px"
|
||||
:type="isPwd ? 'password' : 'text'"
|
||||
:type="'text'"
|
||||
class="input-box"
|
||||
v-model="code"
|
||||
@keyup="
|
||||
() => {
|
||||
code = code.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入账号"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
color="grey-13"
|
||||
:name="isPwd ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="isPwd = !isPwd"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-btn
|
||||
class="code-btn"
|
||||
@ -140,8 +154,8 @@
|
||||
<div class="read">
|
||||
<q-checkbox v-model="readed" />
|
||||
<a>我已阅读并同意</a>
|
||||
<span style="color: #c348b8"> 《用户协议》</span>
|
||||
<span style="color: #c348b8">《隐私政策》</span>
|
||||
<span style="color: #c348b8" @click="goAgreement"> 《用户协议》</span>
|
||||
<span style="color: #c348b8" @click="goPolicy">《隐私政策》</span>
|
||||
</div>
|
||||
<q-btn
|
||||
label="登录"
|
||||
@ -181,6 +195,11 @@
|
||||
<q-input
|
||||
class="input-box"
|
||||
v-model="telNum"
|
||||
@keyup="
|
||||
() => {
|
||||
telNum = telNum.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入账号"
|
||||
/>
|
||||
@ -191,20 +210,17 @@
|
||||
>
|
||||
<q-input
|
||||
style="width: 238px"
|
||||
:type="isPwd ? 'password' : 'text'"
|
||||
:type="'text'"
|
||||
@keyup="
|
||||
() => {
|
||||
code = code.trim();
|
||||
}
|
||||
"
|
||||
class="input-box"
|
||||
v-model="code"
|
||||
:dense="true"
|
||||
placeholder="请输入验证码"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
color="grey-13"
|
||||
:name="isPwd ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="isPwd = !isPwd"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-btn
|
||||
class="code-btn"
|
||||
@ -226,6 +242,11 @@
|
||||
class="input-box"
|
||||
v-model="password"
|
||||
:dense="true"
|
||||
@keyup="
|
||||
() => {
|
||||
password = password.trim();
|
||||
}
|
||||
"
|
||||
placeholder="请输入密码"
|
||||
maxlength="8"
|
||||
style="margin-left: 10px"
|
||||
@ -248,6 +269,11 @@
|
||||
:type="isPwd ? 'password' : 'text'"
|
||||
class="input-box"
|
||||
v-model="verfyPassword"
|
||||
@keyup="
|
||||
() => {
|
||||
verfyPassword = verfyPassword.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入密码"
|
||||
maxlength="8"
|
||||
@ -333,6 +359,11 @@
|
||||
class="input-box"
|
||||
v-model="telNum"
|
||||
:dense="true"
|
||||
@keyup="
|
||||
() => {
|
||||
telNum = telNum.trim();
|
||||
}
|
||||
"
|
||||
placeholder="请输入账号"
|
||||
/>
|
||||
</div>
|
||||
@ -342,20 +373,17 @@
|
||||
>
|
||||
<q-input
|
||||
style="width: 232px"
|
||||
:type="isPwd ? 'password' : 'text'"
|
||||
:type="'text'"
|
||||
class="input-box"
|
||||
v-model="code"
|
||||
@keyup="
|
||||
() => {
|
||||
code = code.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入验证码"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
color="grey-13"
|
||||
:name="isPwd ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="isPwd = !isPwd"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-btn
|
||||
class="code-btn"
|
||||
@ -376,6 +404,11 @@
|
||||
:type="isPwd ? 'password' : 'text'"
|
||||
class="input-box"
|
||||
v-model="password"
|
||||
@keyup="
|
||||
() => {
|
||||
password = password.trim();
|
||||
}
|
||||
"
|
||||
:dense="true"
|
||||
placeholder="请输入密码"
|
||||
style="margin-left: 5px"
|
||||
@ -400,6 +433,11 @@
|
||||
class="input-box"
|
||||
v-model="verfyPassword"
|
||||
:dense="true"
|
||||
@keyup="
|
||||
() => {
|
||||
verfyPassword = verfyPassword.trim();
|
||||
}
|
||||
"
|
||||
placeholder="请输入密码"
|
||||
style="margin-right: 25px"
|
||||
maxlength="8"
|
||||
@ -472,6 +510,15 @@ function startScrolling(carousel, track) {
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
const inputNum = (val) => {
|
||||
console.log(val, 123);
|
||||
};
|
||||
const goAgreement = () => {
|
||||
router.push("/agreement");
|
||||
};
|
||||
const goPolicy = () => {
|
||||
router.push("/policy");
|
||||
};
|
||||
// 登录
|
||||
const login = async () => {
|
||||
// 如果没有勾选同意协议
|
||||
@ -665,7 +712,7 @@ const goResetPwd = async () => {
|
||||
if (res.status === 0) {
|
||||
loading.value = false;
|
||||
code.value = "";
|
||||
registType.value = 2;
|
||||
isFlipped.value = false;
|
||||
} else {
|
||||
loading.value = false;
|
||||
errMsg.value = res.msg;
|
||||
@ -680,6 +727,11 @@ const goResetPwd = async () => {
|
||||
function toggleFlip() {
|
||||
isFlipped.value = !isFlipped.value;
|
||||
code.value = "";
|
||||
password.value = "";
|
||||
telNum.value = "";
|
||||
verfyPassword.value = "";
|
||||
isErr.value = false;
|
||||
errMsg.value = "";
|
||||
registType.value = 1;
|
||||
}
|
||||
const forgetPwd = () => {
|
||||
@ -699,8 +751,8 @@ const goRegist = async () => {
|
||||
isErr.value = true;
|
||||
return;
|
||||
}
|
||||
// 密码不允许有空格
|
||||
if (password.value.indexOf(" ") !== -1) {
|
||||
// 密码不允许有空格
|
||||
if (password.value.indexOf(" ") !== -1) {
|
||||
errMsg.value = "密码不允许有空格";
|
||||
isErr.value = true;
|
||||
return;
|
||||
@ -732,6 +784,12 @@ const goRegist = async () => {
|
||||
};
|
||||
// 返回登陆
|
||||
const backLogin = () => {
|
||||
code.value = "";
|
||||
password.value = "";
|
||||
telNum.value = "";
|
||||
verfyPassword.value = "";
|
||||
isErr.value = false;
|
||||
errMsg.value = "";
|
||||
isFlipped.value = false;
|
||||
};
|
||||
onMounted(() => {
|
||||
@ -754,10 +812,10 @@ onMounted(() => {
|
||||
.bg {
|
||||
display: flex;
|
||||
transform: rotate(30deg);
|
||||
height: 197%;
|
||||
height: 207%;
|
||||
position: relative;
|
||||
top: -437px;
|
||||
width: 113%;
|
||||
width: 123%;
|
||||
left: -133px;
|
||||
}
|
||||
/* 创建一个伪元素作为黑色透明蒙版 */
|
||||
|
@ -164,7 +164,7 @@
|
||||
list-type="image-card"
|
||||
:max="1"
|
||||
:on-finish="handleChange"
|
||||
action="http://192.168.1.244:8085/api/ai/upload-file"
|
||||
action="http://114.218.158.24:8085/api/ai/upload-file"
|
||||
>
|
||||
<n-upload-dragger>
|
||||
<div style="margin-bottom: 12px">
|
||||
@ -485,8 +485,8 @@ const selectedSize = ref({
|
||||
width: 600,
|
||||
height: 800,
|
||||
});
|
||||
const width = ref(0);
|
||||
const height = ref(0);
|
||||
const width = ref(null);
|
||||
const height = ref(null);
|
||||
const apiWidth = ref(0);
|
||||
const apiHeight = ref(0);
|
||||
const imgList = ref([]);
|
||||
@ -606,6 +606,7 @@ const getUserInfo = async() => {
|
||||
await UserApi.getUserInfo().then((res) => {
|
||||
if (res.status === 0) {
|
||||
coin.value = res.data.coin;
|
||||
LocalStorage.set("sd-accountInfo", res.data);
|
||||
} else {
|
||||
processError(res.msg);
|
||||
}
|
||||
@ -732,11 +733,11 @@ const generate = async () => {
|
||||
txt2img();
|
||||
} else {
|
||||
// 如果没有上传图片
|
||||
if (!init_images.value.length) {
|
||||
createLoading.value = false;
|
||||
processError("请上传参考图");
|
||||
return;
|
||||
}
|
||||
// if (!init_images.value.length) {
|
||||
// createLoading.value = false;
|
||||
// processError("请上传参考图");
|
||||
// return;
|
||||
// }
|
||||
img2img();
|
||||
}
|
||||
if (plane.value) {
|
||||
|
@ -110,6 +110,19 @@ const closeModal = () => {
|
||||
// 修改手机号
|
||||
const submit = async () => {
|
||||
errMsg.value = "";
|
||||
// 验证
|
||||
if (!name.value) {
|
||||
processError('请输入姓名')
|
||||
return;
|
||||
}
|
||||
if (!phone.value) {
|
||||
processError('请输入手机号')
|
||||
return;
|
||||
}
|
||||
if (!content.value) {
|
||||
processError('请输入留言内容')
|
||||
return;
|
||||
}
|
||||
const data = {
|
||||
domain: "fontree",
|
||||
name: name.value,
|
||||
|
@ -39,7 +39,7 @@
|
||||
<span>提示词</span>
|
||||
<span>{{ detailData.realPrompt }}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="info" v-if="detailData.realNegativePrompt">
|
||||
<span>反向词</span>
|
||||
<span>{{ detailData.realNegativePrompt }}</span>
|
||||
</div>
|
||||
|
@ -86,7 +86,7 @@
|
||||
list-type="image-card"
|
||||
:max="1"
|
||||
:on-finish="handleChange"
|
||||
action="http://192.168.1.244:8085/api/ai/upload-file"
|
||||
action="http://114.218.158.24:8085/api/ai/upload-file"
|
||||
>
|
||||
<n-upload-dragger>
|
||||
<div>
|
||||
|
10
src/pages/policy/agreement.vue
Normal file
10
src/pages/policy/agreement.vue
Normal file
File diff suppressed because one or more lines are too long
10
src/pages/policy/policy.vue
Normal file
10
src/pages/policy/policy.vue
Normal file
File diff suppressed because one or more lines are too long
@ -45,6 +45,20 @@ const routes = [
|
||||
{ path: '', component: () => import('pages/feedback/index.vue') }
|
||||
]
|
||||
},
|
||||
// 隐私政策
|
||||
{
|
||||
path: '/policy',
|
||||
children: [
|
||||
{ path: '', component: () => import('pages/policy/policy.vue') }
|
||||
]
|
||||
},
|
||||
// 用户协议
|
||||
{
|
||||
path: '/agreement',
|
||||
children: [
|
||||
{ path: '', component: () => import('pages/policy/agreement.vue') }
|
||||
]
|
||||
},
|
||||
// Always leave this as last one,
|
||||
// but you can also remove it
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user