前端:优惠劵领取界面(未完成)
This commit is contained in:
parent
989259de7e
commit
6cee744ec1
@ -4,7 +4,7 @@ import request from "../config/request";
|
|||||||
|
|
||||||
export function getBannerList() {
|
export function getBannerList() {
|
||||||
return request({
|
return request({
|
||||||
url: 'promotion-api/users/banner/list',
|
url: '/promotion-api/users/banner/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -13,7 +13,11 @@ export function getBannerList() {
|
|||||||
|
|
||||||
export function getProductRecommendList() {
|
export function getProductRecommendList() {
|
||||||
return request({
|
return request({
|
||||||
url: 'promotion-api/users/product_recommend/list',
|
url: '/promotion-api/users/product_recommend/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Coupon Template
|
||||||
|
|
||||||
|
// Coupon Card
|
||||||
|
@ -15,6 +15,10 @@ const serviceRouter = function(requestUrl) {
|
|||||||
prefix: '/user-api',
|
prefix: '/user-api',
|
||||||
target: 'http://127.0.0.1:18082/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 = {
|
const configProd = {
|
||||||
@ -26,6 +30,10 @@ const serviceRouter = function(requestUrl) {
|
|||||||
prefix: '/user-api',
|
prefix: '/user-api',
|
||||||
target: 'http://127.0.0.1:18082/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') {
|
if (process.env.NODE_ENV == 'development') {
|
||||||
@ -117,8 +125,8 @@ service.interceptors.request.use(
|
|||||||
const { target, prefix } = serviceRouter(config.url)
|
const { target, prefix } = serviceRouter(config.url)
|
||||||
let url = config.url = config.url.replace(`${prefix}`, target);
|
let url = config.url = config.url.replace(`${prefix}`, target);
|
||||||
// TODO 芋艿,这些 url 不用增加认证 token 。可能这么写,有点脏,后面看看咋优化下。
|
// TODO 芋艿,这些 url 不用增加认证 token 。可能这么写,有点脏,后面看看咋优化下。
|
||||||
if (url.indexOf('user-api/users/passport/mobile/send_register_code') != -1
|
if (url.indexOf('user-api/users/passport/mobile/send_register_code') !== -1
|
||||||
|| url.indexOf('user-api/users/passport/mobile/register') != -1) {
|
|| url.indexOf('user-api/users/passport/mobile/register') !== -1) {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,6 +185,13 @@ const routes = [
|
|||||||
title: '分类'
|
title: '分类'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/coupon/fetch',
|
||||||
|
component: () => import('../page/coupon/fetch'),
|
||||||
|
meta: {
|
||||||
|
title: '优惠劵领取'
|
||||||
|
}
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// add route path
|
// add route path
|
||||||
|
9
mobile-web/src/page/coupon/fetch.vue
Normal file
9
mobile-web/src/page/coupon/fetch.vue
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<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(){
|
created:function(){
|
||||||
GetPage().then(response=>{
|
// GetPage().then(response=>{
|
||||||
this.page=response;
|
// this.page=response;
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
// 加载 Banner
|
// 加载 Banner
|
||||||
|
@ -36,3 +36,4 @@ public class UsersBannerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user