提交 6cee744e authored 作者: YunaiV's avatar YunaiV

前端:优惠劵领取界面(未完成)

上级 989259de
......@@ -4,7 +4,7 @@ import request from "../config/request";
export function getBannerList() {
return request({
url: 'promotion-api/users/banner/list',
url: '/promotion-api/users/banner/list',
method: 'get',
});
}
......@@ -13,7 +13,11 @@ export function getBannerList() {
export function getProductRecommendList() {
return request({
url: 'promotion-api/users/product_recommend/list',
url: '/promotion-api/users/product_recommend/list',
method: 'get',
});
}
\ No newline at end of file
}
// Coupon Template
// Coupon Card
......@@ -15,6 +15,10 @@ const serviceRouter = function(requestUrl) {
prefix: '/user-api',
target: 'http://127.0.0.1:18082/user-api',
},
'/promotion-api': {
prefix: '/promotion-api',
target: 'http://127.0.0.1:18085/promotion-api',
},
};
const configProd = {
......@@ -26,6 +30,10 @@ const serviceRouter = function(requestUrl) {
prefix: '/user-api',
target: 'http://127.0.0.1:18082/user-api',
},
'/promotion-api': {
prefix: '/promotion-api',
target: 'http://127.0.0.1:18085/promotion-api',
},
};
if (process.env.NODE_ENV == 'development') {
......@@ -117,8 +125,8 @@ service.interceptors.request.use(
const { target, prefix } = serviceRouter(config.url)
let url = config.url = config.url.replace(`${prefix}`, target);
// TODO 芋艿,这些 url 不用增加认证 token 。可能这么写,有点脏,后面看看咋优化下。
if (url.indexOf('user-api/users/passport/mobile/send_register_code') != -1
|| url.indexOf('user-api/users/passport/mobile/register') != -1) {
if (url.indexOf('user-api/users/passport/mobile/send_register_code') !== -1
|| url.indexOf('user-api/users/passport/mobile/register') !== -1) {
return config;
}
......
......@@ -185,6 +185,13 @@ const routes = [
title: '分类'
}
},
{
path: '/coupon/fetch',
component: () => import('../page/coupon/fetch'),
meta: {
title: '优惠劵领取'
}
}
];
// add route path
......
<template>
<van-cell-group>
<van-cell title="单元格" value="内容" />
<van-cell title="单元格" value="内容" label="描述信息" />
</van-cell-group>
</template>
<script>
</script>
......@@ -65,9 +65,9 @@ export default {
}
},
created:function(){
GetPage().then(response=>{
this.page=response;
});
// GetPage().then(response=>{
// this.page=response;
// });
},
mounted: function() {
// 加载 Banner
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论