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 f62873e1..da5b244a 100644 Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/Yi.Framework.Service/ArticleService.cs b/Yi.Framework.Net6/Yi.Framework.Service/ArticleService.cs index 0b039004..1ff17a7f 100644 --- a/Yi.Framework.Net6/Yi.Framework.Service/ArticleService.cs +++ b/Yi.Framework.Net6/Yi.Framework.Service/ArticleService.cs @@ -19,7 +19,7 @@ namespace Yi.Framework.Service //.WhereIF(!string.IsNullOrEmpty(config.ConfigKey), u => 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 @@