2023-11-20-1
This commit is contained in:
@@ -137,7 +137,7 @@ li {
|
||||
padding-right: 0.5rem;
|
||||
height: 100%;
|
||||
--el-icon-size: 1.4rem;
|
||||
display: block;
|
||||
display: flex;
|
||||
}
|
||||
.el-cascader__tags .el-tag--light .el-tag__content,
|
||||
.el-cascader__collapse-tag .el-tag--light .el-tag__content {
|
||||
|
||||
@@ -149,7 +149,7 @@ ul,li{
|
||||
padding-right: .5rem;
|
||||
height: 100%;
|
||||
--el-icon-size: 1.4rem;
|
||||
display: block;
|
||||
display: flex;
|
||||
.el-tag__content{
|
||||
font-size: 1.4rem;
|
||||
color: #000;
|
||||
|
||||
@@ -310,8 +310,8 @@ export default defineComponent({
|
||||
// })
|
||||
// this.store.commit("addGenerateFils", this.fileList);
|
||||
this.token = getCookie("token") || "";
|
||||
this.isTest = getCookie("isTest");
|
||||
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
this.uploadUrl = getUploadUrl();
|
||||
this.workspace = this.store.state.Workspace.workspace
|
||||
},
|
||||
@@ -460,7 +460,7 @@ export default defineComponent({
|
||||
this.inputTime = setTimeout(()=>{
|
||||
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||
if(this.searchPictureName.split(/\s+/).length > 75){
|
||||
if(this.searchPictureName?.split(/\s+/).length > 75){
|
||||
this.inputShow = true
|
||||
}else{
|
||||
this.inputShow = false
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<div class="header_user_icon"></div>
|
||||
<!-- <div class="header_icon icon iconfont icon-touxiang3"></div> -->
|
||||
<div class="header_user_content">
|
||||
<div class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div v-if="isTest" class="username"><span>/</span> {{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
|
||||
<div v-else class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div
|
||||
:class="[
|
||||
'icon',
|
||||
@@ -146,7 +147,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script >
|
||||
import { defineComponent, createVNode } from "vue";
|
||||
import { defineComponent, createVNode, ref } from "vue";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||
@@ -165,10 +166,12 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const {t} = useI18n()
|
||||
const {locale} = useI18n()
|
||||
let isTest = ref()
|
||||
return {
|
||||
store,
|
||||
t,
|
||||
locale
|
||||
locale,
|
||||
isTest,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -201,6 +204,9 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let isTest = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
|
||||
this.userInfo = JSON.parse(getCookie("userInfo"));
|
||||
if (!this.userInfo) {
|
||||
this.$router.replace("/login");
|
||||
|
||||
@@ -314,6 +314,7 @@ export default defineComponent({
|
||||
if(item.id == v.id){
|
||||
item.id_ = v.id_?v.id_:GO.id++
|
||||
item.checked = true
|
||||
item.pin = v.pin
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
@@ -221,7 +221,8 @@ export default defineComponent({
|
||||
},
|
||||
mounted(){
|
||||
this.token = getCookie('token') || ''
|
||||
this.isTest = getCookie('isTest') || ''
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
this.uploadUrl = getUploadUrl()
|
||||
},
|
||||
methods:{
|
||||
@@ -494,7 +495,7 @@ export default defineComponent({
|
||||
ifMaximumLength(){
|
||||
clearTimeout(this.inputTime)
|
||||
this.inputTime = setTimeout(()=>{
|
||||
if(this.captionGeneration.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
this.inputShow = true
|
||||
}else{
|
||||
this.inputShow = false
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<div class="robot_text">
|
||||
<span>
|
||||
{{item.str}}
|
||||
<a v-if="item.src" :href="item.src" target="_blank"><i class="fi fi-br-link-alt"></i></a>
|
||||
</span>
|
||||
<div class="robot_img" :class="[item.img ?'img':'']">
|
||||
<div class="robot_img_item" v-for="imgItem,imgIndex in item.img">
|
||||
@@ -69,6 +70,7 @@ export default defineComponent({
|
||||
const userInfo:any = {}
|
||||
let bloodBars:any = ref(0)
|
||||
let {t} = useI18n()
|
||||
let isTest = ref()
|
||||
return {
|
||||
robotTop,
|
||||
robotInput,
|
||||
@@ -81,6 +83,7 @@ export default defineComponent({
|
||||
userInfo,
|
||||
bloodBars,
|
||||
t,
|
||||
isTest,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -90,6 +93,8 @@ export default defineComponent({
|
||||
mounted() {
|
||||
this.textScroll()
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
if (sessionStorage.getItem("record") == null) {
|
||||
this.record = []
|
||||
@@ -196,6 +201,20 @@ export default defineComponent({
|
||||
// }
|
||||
},
|
||||
}
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
// message.warning(
|
||||
// this.t('isTest.available')
|
||||
// );
|
||||
this.record.push({
|
||||
state:1,
|
||||
str:this.t('isTest.src'),
|
||||
src:'https://code-create.com.hk/aida/'
|
||||
})
|
||||
this.createTimer()
|
||||
this.textScroll()
|
||||
this.chatCentent = ""
|
||||
return
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.chatStreamTest, data).then(
|
||||
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
|
||||
(rv) => {
|
||||
|
||||
@@ -474,7 +474,7 @@ export default defineComponent({
|
||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||
console.log(this.captionGeneration);
|
||||
|
||||
if(this.captionGeneration.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
this.inputShow = true
|
||||
}else{
|
||||
this.inputShow = false
|
||||
|
||||
@@ -313,5 +313,9 @@ export default {
|
||||
},
|
||||
isTest:{
|
||||
available:"This feature is not available to trial users",
|
||||
src:"This function is not open to trial users, if you need to subscribe, please click ->",
|
||||
userName:'Trial User',
|
||||
loginIsTest:"You are a trial user, Probation period until{date}. For the security of users' data, we do not save any personal data uploaded by trial users, and will erase personal data after each logout. if you need to subscribe, please click ->",
|
||||
image:'Because you are a trial user, you can only upload 10 images'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ axios.interceptors.response.use((res) =>{
|
||||
// message.error(res.data.errMsg)
|
||||
return Promise.resolve(res.data.data);
|
||||
} else if(res.data.errCode === 1){
|
||||
message.warning(res.data.errMsg)
|
||||
return Promise.reject(res.data);
|
||||
} else if(res.data.errCode === 2){
|
||||
message.warning(res.data.errMsg)
|
||||
return Promise.reject(res.data);
|
||||
}else if(res.data.errCode === -1){
|
||||
message.error(res.data.errMsg)
|
||||
@@ -69,9 +69,9 @@ axios.interceptors.response.use((res) =>{
|
||||
message.warning(res.data.errMsg)
|
||||
return Promise.reject(res.data);
|
||||
} else if(res.data.errCode === 1){
|
||||
message.warning(res.data.errMsg)
|
||||
return Promise.reject(res.data);
|
||||
} else if(res.data.errCode === 2){
|
||||
message.warning(res.data.errMsg)
|
||||
return Promise.reject(res.data);
|
||||
}else if(res.data.errCode === -1){
|
||||
message.error(res.data.errMsg)
|
||||
|
||||
@@ -516,7 +516,8 @@ export default defineComponent({
|
||||
},
|
||||
async mounted(){
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.isTest = getCookie('isTest') || ''
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.uploadUrl = getUploadUrl()
|
||||
this.getLibraryList()
|
||||
@@ -633,8 +634,13 @@ export default defineComponent({
|
||||
fileUploadChange(data:any){
|
||||
let file = data.file
|
||||
// let Cropper:any = this.$refs.Cropper
|
||||
|
||||
if(this.selectCode == 'Models'){
|
||||
let reader = new FileReader();
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
return
|
||||
}
|
||||
reader.onload = (e:any) => {
|
||||
let data_new;
|
||||
if (typeof e.target.result === 'object') {
|
||||
@@ -893,6 +899,10 @@ export default defineComponent({
|
||||
if(this.selectCode == "Models"){
|
||||
return
|
||||
}
|
||||
if(this.imgList.length+this.currentUploadFileNum > 10 && this.isTest){
|
||||
message.info(this.t('isTest.image'));
|
||||
return
|
||||
}
|
||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType : ''
|
||||
let new_data = {
|
||||
file:event.file,
|
||||
@@ -1015,7 +1025,7 @@ export default defineComponent({
|
||||
ifMaximumLength(){
|
||||
clearTimeout(this.inputTime)
|
||||
this.inputTime = setTimeout(()=>{
|
||||
if(this.captionGeneration.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
this.inputShow = true
|
||||
}else{
|
||||
this.inputShow = false
|
||||
@@ -1080,6 +1090,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
getgenerate(){
|
||||
console.log(this.isTest);
|
||||
|
||||
if(this.isTest){//试用用户禁止使用
|
||||
message.info(
|
||||
this.t('isTest.available')
|
||||
|
||||
@@ -375,8 +375,6 @@ export default defineComponent({
|
||||
//提交账号密码预先登录
|
||||
submitPerLogin() {
|
||||
//输入账号密码
|
||||
console.log(this.emailStap);
|
||||
|
||||
if(this.emailStap>=2){
|
||||
return;
|
||||
}else{
|
||||
@@ -415,7 +413,6 @@ export default defineComponent({
|
||||
// if (rv) {
|
||||
// this.loginType = 'email'
|
||||
// }
|
||||
|
||||
if (rv) {
|
||||
this.userId = rv.userId
|
||||
this.loginType = 'email'
|
||||
@@ -426,7 +423,7 @@ export default defineComponent({
|
||||
}
|
||||
).catch(res=>{
|
||||
this.emailStap = 1;
|
||||
});;
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
this.loginTime = true
|
||||
@@ -456,11 +453,14 @@ export default defineComponent({
|
||||
let isTest = false
|
||||
setCookie("token", token);
|
||||
setCookie("isTest", isTest);
|
||||
console.log();
|
||||
|
||||
setCookie("userInfo", JSON.stringify(rv));
|
||||
this.turnToHomePage();
|
||||
}
|
||||
}
|
||||
);
|
||||
).catch(res=>{
|
||||
});
|
||||
},
|
||||
|
||||
//修改密码提交
|
||||
@@ -510,8 +510,6 @@ export default defineComponent({
|
||||
(rv: any) => {
|
||||
if (rv) {
|
||||
this.locale = rv
|
||||
console.log(rv);
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user