diff --git a/.env.test b/.env.test index 691a7457..c3d5c2cb 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,4 @@ NODE_ENV = 'development' -# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' -VUE_APP_BASE_URL = 'http://18.167.251.121:10086' +VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' +# VUE_APP_BASE_URL = 'http://18.167.251.121:10086' # VUE_APP_BASE_URL = 'http://192.168.1.6:5567' diff --git a/src/assets/style/style.css b/src/assets/style/style.css index 933a85a0..e0296515 100644 --- a/src/assets/style/style.css +++ b/src/assets/style/style.css @@ -130,16 +130,17 @@ li { --el-color-primary: #d9d9d9; --el-cascader-tag-background: #e1d9ec; --el-fill-color: #e1d9ec; - height: 80%; + height: 100%; width: 90% !important; flex-wrap: nowrap; overflow: hidden; + align-items: center; } .el-cascader__tags .el-tag--light, .el-cascader__collapse-tag .el-tag--light { margin: 0 0 0 0.6rem; padding-right: 0.5rem; - height: 100%; + height: 80%; --el-icon-size: 1.4rem; display: flex; } diff --git a/src/assets/style/style.less b/src/assets/style/style.less index 4c67cdb2..186929b8 100644 --- a/src/assets/style/style.less +++ b/src/assets/style/style.less @@ -144,14 +144,15 @@ ul,li{ --el-color-primary: #d9d9d9; --el-cascader-tag-background:#e1d9ec; --el-fill-color:#e1d9ec; - height: 80%; + height: 100%; width: 90% !important; flex-wrap: nowrap; overflow: hidden; + align-items: center; .el-tag--light{ margin: 0 0 0 .6rem; padding-right: .5rem; - height: 100%; + height: 80%; --el-icon-size: 1.4rem; display: flex; .el-tag__content{ diff --git a/src/component/Detail/DesignDetailAlter.vue b/src/component/Detail/DesignDetailAlter.vue index 289b052f..7d4072eb 100644 --- a/src/component/Detail/DesignDetailAlter.vue +++ b/src/component/Detail/DesignDetailAlter.vue @@ -674,7 +674,7 @@ export default defineComponent({ }, setSketchLibrary(item){ let data = { - libraryId:item.id, + libraryId:[item.id], level2Type:item.level2Type, } Https.axiosPost(Https.httpUrls.setSketchLibrary,data).then( diff --git a/src/component/HomePage/Material.vue b/src/component/HomePage/Material.vue index 6a7fd188..58776d1c 100644 --- a/src/component/HomePage/Material.vue +++ b/src/component/HomePage/Material.vue @@ -358,7 +358,7 @@ export default defineComponent({ }, setSketchLibrary(item:any){ let data = { - libraryId:item.id, + libraryId:[item.id], level2Type:item.category, } Https.axiosPost(Https.httpUrls.setSketchLibrary,data).then( diff --git a/src/lang/cn.ts b/src/lang/cn.ts index 0f6140b3..94de5b91 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -78,6 +78,7 @@ export default { Model2:'插画画风', Model3:'真实画风', Name:'名字:', + Category:'类别:', inputContent3:'输入生成图片的标题', Cancel:'取消', Sure:'保存', diff --git a/src/lang/en.ts b/src/lang/en.ts index db2fa769..e1130528 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -78,6 +78,7 @@ export default { Model2:'Illustration Style', Model3:'Real Style', Name:'Name:', + Category:'Category:', inputContent3:'Enter a new name', Cancel:'Cancel', Sure:'Submit', diff --git a/src/lang/fr.ts b/src/lang/fr.ts index 5231a00a..c16fcd85 100644 --- a/src/lang/fr.ts +++ b/src/lang/fr.ts @@ -79,6 +79,7 @@ export default { Model2:"Style d'illustration", Model3:'Style réel', Name:'Nom:', + Category:'Catégorie:', inputContent3:'Saisie rapide', Cancel:'Annuler', Sure:'Soumettre', diff --git a/src/lang/it.ts b/src/lang/it.ts index 0b010fab..92ee7192 100644 --- a/src/lang/it.ts +++ b/src/lang/it.ts @@ -78,6 +78,7 @@ export default { Model2:'Stile di illustrazione', Model3:'Stile reale', Name:'Nome:', + Category:'Categoria:', inputContent3:'Immissione rapida', Cancel:'Annulla', Sure:'Invia', diff --git a/src/lang/ja.ts b/src/lang/ja.ts index 539e2f71..b3198687 100644 --- a/src/lang/ja.ts +++ b/src/lang/ja.ts @@ -78,6 +78,7 @@ export default { Model2:'イラストのスタイル', Model3:'リアルなスタイル', Name:'名前:', + Category:'カテゴリー:', inputContent3:'プロンプト入力', Cancel:'キャンセル', Sure:'提出す', diff --git a/src/lang/kr.ts b/src/lang/kr.ts index ad60274d..68d01e69 100644 --- a/src/lang/kr.ts +++ b/src/lang/kr.ts @@ -78,6 +78,7 @@ export default { Model2:'일러스트 스타일', Model3:'리얼 스타일', Name:'이름:', + Category:'카테고리:', inputContent3:'프롬프트 입력', Cancel:'취소', Sure:'제출하다', diff --git a/src/lang/ru.ts b/src/lang/ru.ts index 0a37b86b..9aece6ac 100644 --- a/src/lang/ru.ts +++ b/src/lang/ru.ts @@ -78,6 +78,7 @@ export default { Model2:'Стиль иллюстрации', Model3:'Реалистический стиль', Name:'Имя:', + Category:'категория :', inputContent3:'Быстрый ввод', Cancel:'Отмена', Sure:'Запись', diff --git a/src/lang/th.ts b/src/lang/th.ts index 4effafab..19a6c9f4 100644 --- a/src/lang/th.ts +++ b/src/lang/th.ts @@ -78,6 +78,7 @@ export default { Model2:'สไตล์การวาดภาพประกอบ', Model3:'สไตล์แบบจริง', Name:'ชื่อ:', + Category:'หมวดหมู่:', inputContent3:'ป้อนข้อมูลทันที', Cancel:'ยกเลิก', Sure:'บันทึก', diff --git a/src/lang/vn.ts b/src/lang/vn.ts index 6d73e239..9a035430 100644 --- a/src/lang/vn.ts +++ b/src/lang/vn.ts @@ -78,6 +78,7 @@ export default { Model2:'Phong cách minh họa', Model3:'Phong cách thực tế', Name:'Tên:', + Category:'Danh mục:', inputContent3:'Nhập liệu nhanh chóng', Cancel:'Hủy bỏ', Sure:'Nộp', diff --git a/src/router/index.ts b/src/router/index.ts index 0ad945ec..02565bfa 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,49 +1,62 @@ import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router' import { defineAsyncComponent } from 'vue' -const _import = (path : string) => defineAsyncComponent(() => import(`../views/${path}.vue`)); +const _import = (path: string) => defineAsyncComponent(() => import(`../views/${path}.vue`)); const routes: Array = [ - { - path: "/", - // redirect重定向 - redirect: "/login" - }, - { - path: '/login', - name: 'login', - component: _import('LoginPage') - }, - { - path: '/home', - name: 'home', - component: _import('HomeView') - }, - { - path: '/demo', - name: 'demo', - component: _import('Demo') - }, - { - path: '/history', - name: 'history', - component: _import('HistoryPage') - }, - { - path: '/library', - name: 'library', - component: _import('LibraryPage') - }, - { - path: '/trialApproval', - name: 'trialApproval', - component: _import('trialApproval') - }, + { + path: "/", + // redirect重定向 + redirect: "/login" + // redirect: "/Upgrade" + }, + { + path: '/login', + name: 'login', + component: _import('LoginPage') + }, + { + path: '/upgrade', + name: 'upgrade', + component: _import('Upgrade'), + }, + { + path: '/home', + name: 'home', + component: _import('HomeView') + }, + { + path: '/demo', + name: 'demo', + component: _import('Demo') + }, + { + path: '/history', + name: 'history', + component: _import('HistoryPage') + }, + { + path: '/library', + name: 'library', + component: _import('LibraryPage') + }, + { + path: '/trialApproval', + name: 'trialApproval', + component: _import('trialApproval') + }, ] const router = createRouter({ - history: createWebHistory(process.env.BASE_URL), -// history: createWebHashHistory(), - routes + history: createWebHistory(process.env.BASE_URL), + // history: createWebHashHistory(), + routes }) - +// router.beforeEach((to, from, next) => { +// const toName = to.name === 'upgrade'; +// if (toName) { +// next(); +// } else { +// next({ name: 'upgrade' }); +// } +// }); export default router diff --git a/src/tool/guide.js b/src/tool/guide.js index 71cf9f2a..59af0044 100644 --- a/src/tool/guide.js +++ b/src/tool/guide.js @@ -210,12 +210,13 @@ function removeDiv(element){ } const openGuide = () =>{ + let isTest = JSON.parse(getCookie('isTest')) let isBeginner = JSON.parse(getCookie('isBeginner')) // console.log(isBeginner); let isBeginnerNum = JSON.parse(getCookie('isBeginnerNum')?getCookie('isBeginnerNum'):'0') let data // console.log(isBeginner); - if(isBeginner){ + if(isBeginner && isTest){ if(isBeginnerNum){ driverObj__.drive(isBeginnerNum); }else{ diff --git a/src/tool/https.js b/src/tool/https.js index bce7f99a..6f8eb4b2 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -100,7 +100,10 @@ export const Https = { trialUserLogout:`/account/trialUserLogout`, //试用用户退出登录接口 completeGuidancet:`/api/account/completeGuidance`, //用户指引结束 + + getExpiredTime:`/api/account/getExpiredTime`, //获取用户到期事件 + preLogin:'/api/account/preLogin',//预先登入 accountSendEmail:`/api/account/sendEmail`, //发送邮件 accountResetPwd:'/api/account/resetPwd', //忘记密码修改 diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 74b5d7d2..9ef5904f 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -365,7 +365,7 @@ export default defineComponent({ }, }, }, - mounted() { + async mounted() { // if(JSON.parse( getCookie('isFirst') as any)){ openGuide() // } @@ -373,7 +373,28 @@ export default defineComponent({ let userInfo:any = getCookie("userInfo") this.userInfo = JSON.parse(userInfo); this.store.dispatch('get_clothingType') + //判断账号剩余时间是否太短 + // await new Promise(async (resolve) => { + // await Https.axiosPost(Https.httpUrls.getExpiredTime,{}).then((rv: any) => { + // if (rv) { + // let dateNow = Date.now() + // let date:any = new Date(dateNow) + // let rvDate:any = new Date(rv); + // let diffInMilliseconds = Math.abs(date - rvDate); // 获取时间差的毫秒数 + // let days = Math.floor(diffInMilliseconds / (24 * 60 * 60 * 1000)); // 计算天数 + // let hours = Math.floor((diffInMilliseconds % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000)); // 计算小时数 + // let minutes = Math.floor((diffInMilliseconds % (60 * 60 * 1000)) / (60 * 1000)); // 计算分钟数 + // // console.log(`${days}天 ${hours}时 ${minutes}分`); + // // if(30>Number(days)){ + // // } + // }else{ + // openGuide() + // } + // resolve('') + // }) + + // }) // console.log(this.store.state.UserHabit); let noRefresh = this.$route.params.noRefresh; //判断是否主动刷新还是路由跳转过来的 true 路由跳转过来的 diff --git a/src/views/LibraryPage.vue b/src/views/LibraryPage.vue index 26214dd6..41f5eaa8 100644 --- a/src/views/LibraryPage.vue +++ b/src/views/LibraryPage.vue @@ -310,7 +310,7 @@
-
+
@@ -361,6 +361,37 @@ +
{{$t('LibraryPage.Category')}}
+ +
+
+ + + + + + +
+
{{ $t('LibraryPage.Cancel') }}
{{ $t('LibraryPage.Sure') }}
@@ -431,6 +462,12 @@ export default defineComponent({ let disignTypeList:any = [ ] + let editSex:any = ref({ + value:'' + }) + let editDesignType:any = ref({ + value:'' + }) let imgList = ref([]) let currentPage:any = ref(1) let pageSize:any = ref(18) @@ -506,6 +543,8 @@ export default defineComponent({ sexList, sex, disignTypeList, + editSex, + editDesignType, designType, imgList, currentPage, @@ -607,6 +646,7 @@ export default defineComponent({ }) }); this.designType = arr[0] + this.editDesignType = arr[0] this.disignTypeList = arr // this.workspaceItem.position = this.singleTypeList[0].label } @@ -807,7 +847,17 @@ export default defineComponent({ ).catch((res)=>{ }); } - + let data3 = { + libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList, + level2Type:this.editDesignType.value, + } + if(this.selectCode == 'Sketchboard'){ + await Https.axiosPost(Https.httpUrls.setSketchLibrary,data3).then( + (rv) => { + } + ).catch((res)=>{ + }); + } // if(bor){ // } @@ -819,6 +869,8 @@ export default defineComponent({ //打开修改名称弹窗 showRenameModal(data:any,type:any){ this.newPicName = '' + this.editSex = this.sex + this.editDesignType = this.designType if(type =='batch' && !this.selectImgList.length){ //批量但未选中 this.newPicName = '' return @@ -1577,7 +1629,6 @@ export default defineComponent({ .librart_headr_right{ display: flex; align-items: center; - .select_block{ // background: #FFFFFF; color: #1A1A1A !important; @@ -1906,6 +1957,37 @@ export default defineComponent({ color:#adabb9 } } + .select_block{ + display: flex; + justify-content: space-between; + font-size: 1.8rem; + color:#adabb9; + font-weight: 300; + .ant-select{ + border-radius: 4px; + width: 48%; + border: 0.1rem solid #d9d9d9 !important; + .ant-select-arrow{ + .icon-xiala{ + margin-left: -0rem; + } + } + } + .ant-select-selection-item{ + color:#262626; + font-weight: 300; + } + .ant-select-selector{ + margin-left: 0rem; + color:#adabb9; + width: 100%; + padding-left: 2.1rem; + } + .icon-xiala{ + color: #adabb9 !important; + font-weight: 400; + } + } } .rename_button_list{ diff --git a/src/views/LoginPage.vue b/src/views/LoginPage.vue index f1d3d49d..7e809b8e 100644 --- a/src/views/LoginPage.vue +++ b/src/views/LoginPage.vue @@ -470,7 +470,7 @@ export default defineComponent({ setCookie("token", token); setCookie("isTest", isTest); setCookie("isBeginner", isBeginner); - setCookie("isBeginnerNum", 0); + setCookie("isBeginnerNum", 0);//从第一步开始,机器人开始的话就是从第二部开始 setCookie("userInfo", JSON.stringify(rv)); this.turnToHomePage(); } diff --git a/src/views/Upgrade.vue b/src/views/Upgrade.vue new file mode 100644 index 00000000..b908d0ad --- /dev/null +++ b/src/views/Upgrade.vue @@ -0,0 +1,81 @@ + + + + diff --git a/vue.config.js b/vue.config.js index d1fc5197..2f69fcb1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,7 +38,7 @@ module.exports = defineConfig({ } } }, - // https:true, + https:true, }, pluginOptions: { "style-resources-loader": {