Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gllinzbk1 committed Aug 24, 2023
1 parent ecd8f90 commit ed5b2fe
Show file tree
Hide file tree
Showing 98 changed files with 22,616 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
.DS_Store
.yarn/
./nuxt
./vscode

.github*/
.vscode
/.pnp
.pnp*
yarn*
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# nuxtgenerate2
# blueblocks-lightbicycle
Nuxt新官网
36 changes: 36 additions & 0 deletions apis/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//导出搜索接口方法获取搜索结果
export function useSearchListApi(query) {
return useHttpGet(
"searchList",
() => {
let q = useQueryToString(query());
return `/search${q}`;
},
{
lazy: true,
}
);
}

//获取可用优惠券列表 /coupon/list
export function useCouponListApi() {
return useHttpGet("CouponList", "/coupon/list ");
}

//通用列表接口
export function useListApi(type, query={}) {
let q = useQueryToString(query);
return useHttpGet(type + "List", `/${type}/list${q}`, {
lazy: true,
});
}

//查看课程、专栏详情接口
export function useReadDetailApi(type,query = {}) {
let q = useQueryToString(query);
return useHttpGet("readDetail", `/${type}/read${q}`, {
lazy: true,
});
}


5 changes: 5 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default defineAppConfig({
siteName: 'Light Bicycle',
siteUrl: 'https://www.lightbicycle.com'
})

11 changes: 11 additions & 0 deletions app/router.options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 点击分页返回顶部
export default {
scrollBehavior(to, from, savedPosition) {
//在按下前进/后退按钮,就会触发这个方法实现前进后退功能
if (savedPosition) {
return savedPosition;
} else {
return { top: 0 };
}
},
};
Loading

0 comments on commit ed5b2fe

Please sign in to comment.