diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..582561b --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "app-plus" : + { + "launchtype" : "local" + }, + "default" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/apis/index.js b/apis/index.js index 7e668fa..dd055dd 100644 --- a/apis/index.js +++ b/apis/index.js @@ -5,6 +5,7 @@ */ import store from '@/store' +import { router } from '@/router/index.js' // 基础配置 const config = { @@ -142,12 +143,12 @@ const loginHint = () => { uni.showModal({ title: '登录提示', content: '您的登录信息已过期,请重新登录', - confirmColor: '#8b64fd', + confirmColor: '#da2b56', showCancel:false, success: res=> { loginHintState = false - if (res.confirm) uni.reLaunch({ - url: '/index/index' + if (res.confirm) router.replaceAll({ + name: 'Login' }) } }) diff --git a/apis/interfaces/empower.js b/apis/interfaces/empower.js index d2e0cfc..15b2ce4 100644 --- a/apis/interfaces/empower.js +++ b/apis/interfaces/empower.js @@ -39,21 +39,25 @@ const buy = data => { }) } -// 核验列表 -const codes = code => { +// 订单列表初始化 +const orderInit = () => { return request({ - url : "empower/code", - data : { code }, - method : "POST", + url : "empower/order/init", }) } -// 确认核验 -const sign = item_id => { +// 订单列表 +const orderList = data => { return request({ - url : "empower/code/sign", - data : { item_id }, - method : "POST", + url : "empower/order/index", + data + }) +} + +// 取消订单 +const orderCancel = order => { + return request({ + url : "empower/order/" + order + "/cancel", }) } @@ -62,7 +66,8 @@ export { info, buyInit, buy, - codes, - sign + orderInit, + orderList, + orderCancel } diff --git a/package.json b/package.json index aa8509b..04057c4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "html2canvas": "^1.4.1", "jweixin-module": "^1.6.0", "uni-read-pages": "^1.0.5", - "uni-simple-router": "^2.0.8-beta.4", + "uni-simple-router": "2.0.7", "uview-ui": "^2.0.31", "vconsole": "^3.15.0", "vue-canvas-poster": "^1.2.1", diff --git a/pages.json b/pages.json index feca962..c798295 100644 --- a/pages.json +++ b/pages.json @@ -635,15 +635,15 @@ } } } - } - ,{ - "path" : "pages/empower/order", - "style" : - { + },{ + "path" : "pages/empower/order", + "aliasPath": "/empower/order", + "name": "EmpowerOrder", + "style" :{ "navigationBarTitleText": "赋能订单", - "enablePullDownRefresh": false + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFF" } - } ], "globalStyle": { diff --git a/pages/empower/info.vue b/pages/empower/info.vue index ca62671..a11a18f 100644 --- a/pages/empower/info.vue +++ b/pages/empower/info.vue @@ -31,7 +31,6 @@ - 分享 立即购买 @@ -131,6 +130,6 @@ z-index: 99; background-color: white; box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .04); - .footer-btn{ background: $mian-color; color: white; line-height: 100rpx; border-radius: 50rpx; flex: 1; text-align: center; font-weight: bold; font-size: 36rpx; margin-left: 50rpx; } + .footer-btn{ background: $mian-color; color: white; line-height: 100rpx; border-radius: 50rpx; flex: 1; text-align: center; font-weight: bold; font-size: 36rpx; } } diff --git a/pages/empower/order.vue b/pages/empower/order.vue index 7bccc5a..3cd53ab 100644 --- a/pages/empower/order.vue +++ b/pages/empower/order.vue @@ -1,19 +1,398 @@ - diff --git a/pages/user/index.vue b/pages/user/index.vue index de85c2f..08b4380 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -71,7 +71,7 @@ - + 增收赋能类 @@ -114,16 +114,11 @@ 其他工具 - - - - 我的订单券 - + 我的收藏 - 信息管理 diff --git a/yarn.lock b/yarn.lock index 12e6306..d1ee0cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,10 +124,10 @@ uni-read-pages@^1.0.5: resolved "https://registry.yarnpkg.com/uni-read-pages/-/uni-read-pages-1.0.5.tgz#452c8dcaa8977bbaef600909be926c8d9704387c" integrity sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA== -uni-simple-router@^2.0.8-beta.4: - version "2.0.8-beta.4" - resolved "https://registry.yarnpkg.com/uni-simple-router/-/uni-simple-router-2.0.8-beta.4.tgz#2f86ef17b361c251e14361ffd860a82669770cc5" - integrity sha512-ipTHhOaRvjV8qrt3HosX5pNMhwFYBnFOuKyV5joH0evfXubjrGI5tjdwpmwzfW5h3VBth3iAqScv+pW/QmIJXw== +uni-simple-router@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/uni-simple-router/-/uni-simple-router-2.0.7.tgz#04e0b5be6cd733a1ecb9d35a3dbe82f27f48204e" + integrity sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA== utrie@^1.0.2: version "1.0.2"