diff --git a/api/order.js b/api/order.js index 0c445ba..703f1e9 100644 --- a/api/order.js +++ b/api/order.js @@ -81,7 +81,9 @@ export function orderComment(data) { export function orderPay(data) { return request.post('pay/payment', data); } - +export function orderPays(data) { + return request.post('user/aliPayRepayment', data); +} /** * 订单统计数据 */ diff --git a/config/app.js b/config/app.js index 428cbe9..f85ef8c 100644 --- a/config/app.js +++ b/config/app.js @@ -1,7 +1,7 @@ //移动端商城API // let domain = 'http://117.50.163.143:20410' // let domain = 'http://117.50.215.20:20410' -// let domain = 'http://192.168.2.14:8081' +// let domain = 'http://192.168.2.26:20411' // let domain = 'http://106.75.49.247:20410' let domain = 'https://yruibao.com/prod' module.exports = { diff --git a/manifest.json b/manifest.json index 8ecc5b1..3f5a1c3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "先享后付", - "appid" : "__UNI__C7D69AA", //wxb74514b47a2f29d4 wx46c3a73d8c4f7051 __UNI__EB8A7B + "appid" : "__UNI__EA8F22D", //wxb74514b47a2f29d4 wx46c3a73d8c4f7051 __UNI__EB8A7B "description" : "crmeb商城", "versionName" : "2.1", "versionCode" : 2, diff --git a/pages.json b/pages.json index 52ed79f..dfbcdd5 100644 --- a/pages.json +++ b/pages.json @@ -820,6 +820,14 @@ "enablePullDownRefresh": false } } + ,{ + "path" : "alipay_returns/alipay_return", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + } ,{ "path" : "alipay_invoke/index", "style" : diff --git a/pages/activity/goods_seckill_details/index.vue b/pages/activity/goods_seckill_details/index.vue index 506a680..3185284 100644 --- a/pages/activity/goods_seckill_details/index.vue +++ b/pages/activity/goods_seckill_details/index.vue @@ -108,20 +108,20 @@ - - + diff --git a/pages/order_details/index.vue b/pages/order_details/index.vue index 7396ebb..e5e427e 100644 --- a/pages/order_details/index.vue +++ b/pages/order_details/index.vue @@ -113,17 +113,17 @@
- 联系客服 +
-
diff --git a/pages/user/index.vue b/pages/user/index.vue index a940210..635daaa 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -111,14 +111,14 @@
- + - + -->
diff --git a/pages/users/alipay_return/alipay_return.vue b/pages/users/alipay_return/alipay_return.vue index 6725eca..1638a42 100644 --- a/pages/users/alipay_return/alipay_return.vue +++ b/pages/users/alipay_return/alipay_return.vue @@ -1,239 +1,1711 @@ - - \ No newline at end of file diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 6220366..a1730c5 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -1110,7 +1110,7 @@ uid: this.$store.getters.uid } getidentity(data).then(res=>{ - if (res.message == '操作成功') { + if (res.message == '操作成功' && res.data!=null){ this.sfxx = '已完成' this.identification = res.data } diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index a4f7654..b84754a 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -76,8 +76,10 @@ 驳回原因: {{item.auditRejectReason}} + 立即签约 + + 待还款 已结清 @@ -18,10 +21,14 @@ {{item.repaymentStatus == 'Pending'? '待还款' : 'Partial' ? '部分还款' : 'Paid' ? '已还款' : '逾期'}} + - {{title}} + {{title}} + + + @@ -30,19 +37,49 @@ import { getreceivable } from '@/api/api.js' + import payment from '@/components/payments'; export default { data() { return { index: 0, binglist: [], - title: '还款' + title: '还款', + pay_close: false, + pay_order_id: '', + totalPrice: '0', } }, + components: { + payment, + + }, onLoad() { + uni.webView.postMessage({ + data: { + action: 'authorize' + } + }) + this.getData() // console.log(this.$Cache.get('orderno')) + // window.my.postMessage({ action: 'authorize' }); + + // step 4. 接受小程序发过来的用户信息 + }, methods: { + toreturn(){ + console.log('点击了'); + + // uni.navigateTo({ + // url: '/pages/users/alipay_return/alipay_return' + // }) + }, + ispayok(num){ + uni.navigateTo({ + url: '/pages/users/alipay_return/alipay_return' + }) + }, btnhk() { this.index = 0 this.title = '还款' @@ -57,13 +94,59 @@ getData: function() { let data = { uid:this.$store.getters.uid, - orderId:this.$Cache.get('ordernobh'), + // orderId:this.$Cache.get('ordernobh'), type: this.index } getreceivable(data).then(res => { this.binglist = res.data }) - } + }, + /** + * 事件回调 + * + */ + onChangeFun: function(e) { + + let opt = e; + let action = opt.action || null; + let value = opt.value != undefined ? opt.value : null; + (action && this[action]) && this[action](value); + }, + /** + * 关闭支付组件 + * + */ + payClose: function() { + this.pay_close = false; + }, + /** + * 打开支付组件 + * + */ + goPay(pay_price, order_id) { + this.$set(this, 'pay_close', true); + this.$set(this, 'pay_order_id', order_id); + this.$set(this, 'totalPrice', pay_price); + }, + /** + * 支付成功回调 + * + */ + pay_complete: function() { + this.loadend = false; + this.page = 1; + this.$set(this, 'orderList', []); + this.$set(this, 'pay_close', false); + this.getOrderData(); + this.getOrderList(); + }, + /** + * 支付失败回调 + * + */ + pay_fail: function() { + this.pay_close = false; + }, } } diff --git a/pages/users/signin/index.vue b/pages/users/signin/index.vue index 9d05c42..dbc6df9 100644 --- a/pages/users/signin/index.vue +++ b/pages/users/signin/index.vue @@ -52,12 +52,17 @@ } }, onLoad(option) { - this.orderNo = this.$Cache.get('qyids') + // this.orderNo = this.$Cache.get('qyids') // console.log(this.id) - // this.orderNo = option.orderId + this.orderNo = option.orderId + let token =option.token + console.log(token,'tokentokentokentokentoken'); + this.$store.commit("LOGIN", { + 'token': token + }); // this.shopobj = JSON.parse(option.shopobj) - this.getnews(this.orderNo) - this.logoflag = true + // this.getnews() + // this.logoflag = true this.timer = setInterval(() => { this.getnews() @@ -67,14 +72,15 @@ }, methods: { - getnews(orderNo) { - getqianyue(orderNo).then(res => { + getnews() { + getqianyue(this.orderNo).then(res => { console.log(res) this.signStatus = res.data.signStatus if (this.signStatus == 2) { this.flag = true this.text = '成功' this.logoflag = false + clearInterval(this.timer); } }) }, diff --git a/template.html b/template.html index 44d80ec..68ea06a 100644 --- a/template.html +++ b/template.html @@ -1,29 +1,48 @@ - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - - - - - - -
- - - + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/utils/checkOverdue.js b/utils/checkOverdue.js index 5bd6c31..3609acf 100644 --- a/utils/checkOverdue.js +++ b/utils/checkOverdue.js @@ -6,10 +6,10 @@ export function checkOverdue(data) { url: Url + '/api/front/user', method: 'GET', header: header, - success:(res) =>{ - if([410000, 410001, 410002, 401].indexOf(res.data.code) !== -1){ - store.commit("LOGOUT"); - } - } + // success:(res) =>{ + // if([410000, 410001, 410002, 401].indexOf(res.data.code) !== -1){ + // store.commit("LOGOUT"); + // } + // } }) } \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index 603eaf4..2cf733d 100644 --- a/utils/request.js +++ b/utils/request.js @@ -46,7 +46,7 @@ function baseRequest(url, method, data, { else if (res.data.code == 200) reslove(res.data, res); else if ([410000, 410001, 410002, 401].indexOf(res.data.code) !== -1) { - toLogin(); + // toLogin(); reject(res.data); }else if (res.data.code == 500){ reject(res.data.message || '系统异常');