From cf43dc8e70ff99712b3ccb0873a243bb9e4d7394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Sun, 16 Oct 2022 15:54:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=BC=A0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yi-sqlsugar-dev.db | Bin 364544 -> 364544 bytes .../Yi.Framework.Service/ArticleService.cs | 2 +- Yi.Vue3.x.Vant/src/api/articleApi.ts | 6 +-- Yi.Vue3.x.Vant/src/api/fileApi.ts | 2 +- Yi.Vue3.x.Vant/src/api/login.ts | 2 +- Yi.Vue3.x.Vant/src/components/AppGrid.vue | 2 +- Yi.Vue3.x.Vant/src/main.ts | 1 - Yi.Vue3.x.Vant/src/store/modules/user.ts | 7 +-- Yi.Vue3.x.Vant/src/utils/myaxios.ts | 5 +- Yi.Vue3.x.Vant/src/view/main/recommend.vue | 10 ++-- Yi.Vue3.x.Vant/src/view/my.vue | 2 +- Yi.Vue3.x.Vant/src/view/send/imageText.vue | 19 +++++--- Yi.Vue3.x.Vant/tsconfig.json | 5 ++ Yi.Vue3.x.Vant/vite.config.ts | 3 +- ...vite.config.ts.timestamp-1665906237992.mjs | 46 ++++++++++++++++++ 15 files changed, 86 insertions(+), 26 deletions(-) create mode 100644 Yi.Vue3.x.Vant/vite.config.ts.timestamp-1665906237992.mjs diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index f62873e1bd31a156cc778f25ba9d2ab3a8c077bc..da5b244af193c06bf06753a74af3271501e0fe3d 100644 GIT binary patch delta 3399 zcmcInZEO=|9KZIq>t62K10766*(QM*?Rn30_uO4?uyq?y2_d2+Q)x(PSQ!J>;RY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?R(IU1~7AUcb377K`_9 z?cHUjkCi5VQSt-TFJa9O5r}N=?GgH;@$I{#-9k^Sd)Mx0{9(Cedmx5`w(1TCj2d@1 zP(tG3g3PtpRVmz3%x*Ld2m9$I@&GyB%(8%@V(R`t*)4JfhMRNb*c^05-!Zz-e_@wY z9jbziV0d|sJx6XdH3xYBNK=>PQukCgVU+$Oy693>nTg*;&M_^pM#efUs7W z5|hvvQ{6rI(Yw5TJ{5)4Vs>NhIpX%vTERw>d{D92?1~amZ1&uMnluNggFTPDMo{?P=!V!j5YL4CoLDima(BLJ?3Xd&<21 zILK!$J23#DplGTFWwc)OGK)Mzd;Dd|J^u2;uh2Ej`GjYn{8=}1o?MOgGPV7KOL%5Z z{UT8RoN+rMp9=GLOya~9ckRMZEFSCY-dwl7C)&4b=hohMtTo=**W2A$2Vi1OEnPd; XybD21mt;W^$xi|qCZ8E9|Ec013xJ8h delta 599 zcmZ9K&1(}u7>8#w`9iu$EVdFA+-~bvah93c+4;ytr3iwT;xz=albtD62!)*NB~g%q z2Wd}>7wI7vPYOl$<{>BjBm55n3Ld|`gR$#0LWVbypjh2tQVUB z)QvIH*lHxRII+wyhGQG;JhkE7P#cx9j8QaTTp^YiisXPB#8WD*(2`hV{WO0|3m*{Ncvumn}eOOxWU}m{LSAA|xQJgK>wkNJ)+fr{iu&bZUgO7G*?G#In>n zkfunfOiG?5+R`lA8}5V-1it$1^C0;?ot=Vce4Y|_Fz*l=sW?d#7Tqu%P%F5?NNO=a zjALh$2!+N(#$q6tkcs4HIw12e|3i6p!|BAtnfwPyI#@;6)j8wcP$bM u.ConfigKey.Contains(config.ConfigKey)) .WhereIF(page.StartTime is not null && page.EndTime is not null, u => u.CreateTime >= page.StartTime && u.CreateTime <= page.EndTime) .WhereIF(entity.IsDeleted is not null, u => u.IsDeleted == entity.IsDeleted) - .OrderBy(u => u.CreateTime, OrderByType.Desc) + .OrderBy(u => u.CreateTime, OrderByType.Asc) .ToPageListAsync(page.PageNum, page.PageSize, total); return new PageModel>(data, total); diff --git a/Yi.Vue3.x.Vant/src/api/articleApi.ts b/Yi.Vue3.x.Vant/src/api/articleApi.ts index 56127ad0..24ad276c 100644 --- a/Yi.Vue3.x.Vant/src/api/articleApi.ts +++ b/Yi.Vue3.x.Vant/src/api/articleApi.ts @@ -1,8 +1,8 @@ -import myaxios from '@/utils/myaxios.ts' +import myaxios from '@/utils/myaxios' import { ArticleEntity } from '@/type/interface/ArticleEntity' export default { - add(data: ArticleEntity) { + add(data:any) { console.log(data) return myaxios({ url: `/article/add`, @@ -10,7 +10,7 @@ export default { data: data }) }, - pageList(data:ArticleEntity) { + pageList(data:any) { return myaxios({ url: '/article/pageList', method: 'get', diff --git a/Yi.Vue3.x.Vant/src/api/fileApi.ts b/Yi.Vue3.x.Vant/src/api/fileApi.ts index 2000eef4..bcd09760 100644 --- a/Yi.Vue3.x.Vant/src/api/fileApi.ts +++ b/Yi.Vue3.x.Vant/src/api/fileApi.ts @@ -1,4 +1,4 @@ -import myaxios from '@/utils/myaxios.ts' +import myaxios from '@/utils/myaxios' export default{ upload(type:string,data:any){ diff --git a/Yi.Vue3.x.Vant/src/api/login.ts b/Yi.Vue3.x.Vant/src/api/login.ts index 0fdae247..cb1f59c1 100644 --- a/Yi.Vue3.x.Vant/src/api/login.ts +++ b/Yi.Vue3.x.Vant/src/api/login.ts @@ -1,4 +1,4 @@ -import myaxios from '@/utils/myaxios.ts' +import myaxios from '@/utils/myaxios' // 登录方法 export function login(username:string, password:string, code:string, uuid:string) { diff --git a/Yi.Vue3.x.Vant/src/components/AppGrid.vue b/Yi.Vue3.x.Vant/src/components/AppGrid.vue index 0b634a3e..42dcc356 100644 --- a/Yi.Vue3.x.Vant/src/components/AppGrid.vue +++ b/Yi.Vue3.x.Vant/src/components/AppGrid.vue @@ -9,7 +9,7 @@ diff --git a/Yi.Vue3.x.Vant/src/main.ts b/Yi.Vue3.x.Vant/src/main.ts index 6ac54909..429931bc 100644 --- a/Yi.Vue3.x.Vant/src/main.ts +++ b/Yi.Vue3.x.Vant/src/main.ts @@ -7,7 +7,6 @@ import 'vant/es/notify/style'; import router from './router' import store from './store' import './permission' - import App from './App.vue' const app=createApp(App) diff --git a/Yi.Vue3.x.Vant/src/store/modules/user.ts b/Yi.Vue3.x.Vant/src/store/modules/user.ts index ddf7b1f9..bb84d008 100644 --- a/Yi.Vue3.x.Vant/src/store/modules/user.ts +++ b/Yi.Vue3.x.Vant/src/store/modules/user.ts @@ -13,7 +13,7 @@ const useUserStore = defineStore( }), actions: { // 登录 - login(userInfo) { + login(userInfo:any ) { const username = userInfo.username.trim() const password = userInfo.password const code = userInfo.code @@ -48,7 +48,7 @@ const useUserStore = defineStore( // this.permissions=["*:*:*"] } else { - this.roles = ['ROLE_DEFAULT'] + this.roles = ["ROLE_DEFAULT"] as never[] } // this.roles = ["admin"]; // this.permissions=["*:*:*"] @@ -67,7 +67,8 @@ const useUserStore = defineStore( // 退出系统 logOut() { return new Promise((resolve, reject) => { - logout(this.token).then((response) => { + //this.token + logout().then((response) => { this.token = '' this.roles = [] this.permissions = [] diff --git a/Yi.Vue3.x.Vant/src/utils/myaxios.ts b/Yi.Vue3.x.Vant/src/utils/myaxios.ts index 8e00722c..fbcd51fd 100644 --- a/Yi.Vue3.x.Vant/src/utils/myaxios.ts +++ b/Yi.Vue3.x.Vant/src/utils/myaxios.ts @@ -1,3 +1,4 @@ + import axios from 'axios' // import store from '../store/index' // import vm from '../main' @@ -24,12 +25,12 @@ const myaxios = axios.create({ }], }) // 请求拦截器 -myaxios.interceptors.request.use(function(config) { +myaxios.interceptors.request.use(function(config:any) { const isToken = (config.headers || {}).isToken === false // 是否需要防止数据重复提交 const isRepeatSubmit = (config.headers || {}).repeatSubmit === false if (getToken() && !isToken) { - config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 + config.headers['Authorization'] = 'Bearer ' + getToken() } // store.dispatch("openLoad"); return config; diff --git a/Yi.Vue3.x.Vant/src/view/main/recommend.vue b/Yi.Vue3.x.Vant/src/view/main/recommend.vue index 1cb8bbcc..89311e01 100644 --- a/Yi.Vue3.x.Vant/src/view/main/recommend.vue +++ b/Yi.Vue3.x.Vant/src/view/main/recommend.vue @@ -73,8 +73,8 @@ import { ref, onMounted, reactive, toRefs } from "vue"; import { ImagePreview, Toast } from "vant"; import AppCreateTime from "@/components/AppCreateTime.vue"; import AppUserIcon from "@/components/AppUserIcon.vue"; -import articleApi from "@/api/articleApi.ts"; -import { ArticleEntity } from "@/type/interface/ArticleEntity.ts"; +import articleApi from "@/api/articleApi"; +import { ArticleEntity } from "@/type/interface/ArticleEntity"; const VanImagePreview = ImagePreview.Component; const url = `${import.meta.env.VITE_APP_BASE_API}/file/`; const data = reactive({ @@ -88,7 +88,7 @@ const data = reactive({ }); const { queryParams } = toRefs(data); -const articleList = ref([]); +const articleList = ref([]); const totol = ref(0); const imageShow = ref(false); const index = ref(0); @@ -119,7 +119,7 @@ const onLoad = async () => { finished.value = true; } else { console.log("执行"); - articleList.value.push(...(response.data.data as ArticleEntity[])); + articleList.value.push(...(response.data.data)); totol.value = response.data.totol; queryParams.value.pageNum += 1; } @@ -149,7 +149,7 @@ onMounted(() => { const getList = () => { articleApi.pageList(queryParams.value).then((response: any) => { - articleList.value.push(...(response.data.data as ArticleEntity[])); + articleList.value.push(...(response.data.data)); totol.value = response.data.totol; }); }; diff --git a/Yi.Vue3.x.Vant/src/view/my.vue b/Yi.Vue3.x.Vant/src/view/my.vue index b4a36b4d..09eb1644 100644 --- a/Yi.Vue3.x.Vant/src/view/my.vue +++ b/Yi.Vue3.x.Vant/src/view/my.vue @@ -90,7 +90,7 @@