diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml new file mode 100644 index 0000000..adde661 --- /dev/null +++ b/.idea/UniappTool.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..c27af06 --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/api/coupon.js b/api/coupon.js new file mode 100644 index 0000000..d56c141 --- /dev/null +++ b/api/coupon.js @@ -0,0 +1,12 @@ +import { + http +} from "../util/api" +const baseURL = "http://192.168.0.11:3000" +export const coupon = { + get_coupon: (params = {}) => http.get(baseURL + '/api/coupon',params ), + post_coupon: (data = {}) => http.get(`${baseURL}/api/coupon/${data.user_id}`,{coupon_id:data.coupon_id} ), +} +export default { + coupon +} + diff --git a/pages.json b/pages.json index 6c4b2d7..f65ae3e 100644 --- a/pages.json +++ b/pages.json @@ -160,6 +160,20 @@ "navigationBarTitleText" : "搜索商品", "navigationStyle": "custom" } + }, + { + "path" : "pages/my/getCoupons", + "style" : + { + "navigationBarTitleText" : "领券中心" + } + }, + { + "path" : "pages/my/car", + "style" : + { + "navigationBarTitleText" : "购物车" + } } ], "globalStyle": { diff --git a/pages/my/car.vue b/pages/my/car.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/my/car.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/my/getCoupons.vue b/pages/my/getCoupons.vue new file mode 100644 index 0000000..97f1546 --- /dev/null +++ b/pages/my/getCoupons.vue @@ -0,0 +1,295 @@ + + + + + \ No newline at end of file diff --git a/pages/my/my.vue b/pages/my/my.vue index eef0024..b0d6ef1 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -45,12 +45,12 @@ 我的兑换 - + 283 - 我的收藏 + 购物车 @@ -87,7 +87,7 @@ - + 领券中心 @@ -182,6 +182,17 @@ url: '/pages/login/login' }) } + const navigatorSrc = ()=>{ + uni.navigateTo({ + url:'/pages/my/getCoupons' + }) + } + //购物车跳转 + const shop_car = ()=>{ + uni.navigateTo({ + url:'/pages/my/car' + }) + }