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

pull/1/head
YunaiV 2019-04-07 02:34:45 +08:00
parent 989259de7e
commit 6cee744ec1
6 changed files with 37 additions and 8 deletions

View File

@ -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',
});
}
}
// Coupon Template
// Coupon Card

View File

@ -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;
}

View File

@ -185,6 +185,13 @@ const routes = [
title: '分类'
}
},
{
path: '/coupon/fetch',
component: () => import('../page/coupon/fetch'),
meta: {
title: '优惠劵领取'
}
}
];
// add route path

View File

@ -0,0 +1,9 @@
<template>
<van-cell-group>
<van-cell title="单元格" value="内容" />
<van-cell title="单元格" value="内容" label="描述信息" />
</van-cell-group>
</template>
<script>
</script>

View File

@ -65,9 +65,9 @@ export default {
}
},
created:function(){
GetPage().then(response=>{
this.page=response;
});
// GetPage().then(response=>{
// this.page=response;
// });
},
mounted: function() {
// Banner