From 8b8cbd0b1a4de1b708b9ed53115537e13980dd60 Mon Sep 17 00:00:00 2001 From: lzwjava Date: Tue, 23 Feb 2016 18:11:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BE=8B=E9=A1=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=89=93=E8=B5=8F=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/article.html | 1 - src/components/order-form.vue | 3 --- src/components/reward-form.vue | 37 ++++++++++++++++++---------------- src/views/article.vue | 4 ++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/article.html b/src/article.html index 5fbc022..984445d 100644 --- a/src/article.html +++ b/src/article.html @@ -15,5 +15,4 @@ - diff --git a/src/components/order-form.vue b/src/components/order-form.vue index 576091a..8589f1a 100644 --- a/src/components/order-form.vue +++ b/src/components/order-form.vue @@ -128,9 +128,6 @@ module.exports = { } }); - // this.qrcode = resp.data.credential.alipay_qr; - // this.$broadcast('loaded'); - //window.open(this.qrcode, '_blank'); }, util.httpErrorFn(this)) } }, diff --git a/src/components/reward-form.vue b/src/components/reward-form.vue index 01a63be..c1fef10 100644 --- a/src/components/reward-form.vue +++ b/src/components/reward-form.vue @@ -14,9 +14,9 @@
- - - + +
@@ -28,8 +28,8 @@
-

扫一扫付款

- +

打赏

+

请按照支付提示完成打赏

¥ {{reward}}

@@ -42,6 +42,8 @@ import serviceUrl from "../common/serviceUrl.js" import UserAvatar from "../components/user-avatar.vue" import util from '../common/util' +import pingpp from '../common/pingpp-pc.js' + var debug = require('debug')('reward-form'); export default { @@ -69,16 +71,20 @@ export default { var user = util.getLocalUser() debug('user: %j', user); if (!user.username) { - alert('弹出注册 form ') + alert('请先注册') } else { this.$http.post(serviceUrl.ordersReward.replace(/:id/, this.order.orderId),{ amount: this.reward * 100 }).then((resp) => { if (resp.data && resp.data.credential) { - debug('%j', resp.data) - this.qrpay = true; - this.qrcode = resp.data.credential.alipay_qr; - window.open(this.qrcode, '_blank'); + this.qrpay = true; + window.pingppPc.createPayment(resp.data, function (result, err) { + if (err != null) { + util.show(this, 'error', err) + } else { + + } + }); } else { util.show(this, 'error', resp.data.error); } @@ -155,16 +161,13 @@ export default { .pay-desc width 200px - margin 10px auto + margin 30px auto p.amount font-size 20px span color #33C96F - img - margin-top 20px - margin-bottom 20px - width 200px - height 200px - + p.tips + margin 60px 0px + line-height 150% diff --git a/src/views/article.vue b/src/views/article.vue index 73f2d45..b4a193c 100644 --- a/src/views/article.vue +++ b/src/views/article.vue @@ -44,7 +44,7 @@
- +