telephone-clients 3.0.104-12 → 3.0.104-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telephone-clients",
3
- "version": "3.0.104-12",
3
+ "version": "3.0.104-13",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,204 @@
1
+ <template>
2
+ <div style="height: auto;width: 100%">
3
+ <div partial>
4
+ <div class="" align="center">
5
+ <div class="" ><img src="../../../assets/scanCode.png">请扫描下方二维码进行购气</div>
6
+ <div class="row app-row">
7
+ <div class="col-xs-4">
8
+ <label class="font text-left">订单编号:</label>
9
+ </div>
10
+ <div class="col-xs-8">
11
+ <input type="text" class ="search_input input-font" v-model="oderInfo.out_trade_no" />
12
+ </div>
13
+ </div>
14
+ <div class="row app-row">
15
+ <div class="col-xs-4">
16
+ <label class="font text-left">订单状态:</label>
17
+ </div>
18
+ <div class="col-xs-8">
19
+ <input type="text" class ="search_input input-font" v-model="oderInfo.msg" />
20
+ </div>
21
+ </div>
22
+ <!--<div @click="callBack('支付成功')">返回</div>-->
23
+ </div>
24
+ <div class="" align="center" >
25
+ <div class="QR-code">
26
+ <img src="../../../assets/qrcode_no.png" v-show="isTimeout" width="266" height="266" />
27
+ <div id="scan" style="margin-top: 25px"></div>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </template>
33
+ <script>
34
+ import QRCode from 'qrcodejs2'
35
+ import {HttpResetClass} from "vue-client";
36
+ import Vue from 'vue'
37
+
38
+ export default {
39
+ title: '二维码扫码',
40
+ prop:['row'],
41
+
42
+ data () {
43
+ return {
44
+ // 订单状态定时器
45
+ timer1: {},
46
+ timer2: {},
47
+ // 订单信息
48
+ oderInfo: {
49
+ out_trade_no: "",
50
+ msg:''
51
+ },
52
+ // 下单信息
53
+ parameter: {
54
+ /*"attach": "梅河口POS支付",// 自定义字段 可不传
55
+ "bankName": "ccb", // 银行名字
56
+ // 商户配置 银行提供
57
+ "merchBase":{
58
+ "bankName": "ccb",
59
+ "socketUrl": "127.0.0.1",
60
+ "merchId":"105000049002821",
61
+ "posId":"051500429",
62
+ "branchId":"220000000",
63
+ "socketPort":"12345",
64
+ "operatorId":"105000049002821-003",
65
+ "operatorPassword":"mhrq2021",
66
+ "qrCodePayUrl": "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain?CCB_IBSVersion=V6&",
67
+ "pubKey": "30819c300d06092a864886f70d010101050003818a0030818602818055f36b8d4566e42635a6592d08bce92e1af3b9918dd3a7792531a7113622315fdd2541722cdeab6cd92349147589d3b86f496efd358fe967f8a35b0f2e53af55f3cba5ecde8d6f0fd3a7ead416d982432b2fe5872459e433faad329831188b218d4f85aa6b0a44fb7a10c157e8f8e1ec64b4559071a56661b7f5e399d068015f020111"
68
+ },
69
+ "money": 100, // 金额 分
70
+ "notifyUrl": "http://192.168.120.82:8445/bank/test" // 回调地址*/
71
+ },
72
+ isTimeout: true // 二维码图片
73
+
74
+ }
75
+ },
76
+ methods: {
77
+ callBack (para) {
78
+ //tag
79
+ this.$back(para)
80
+ },
81
+ // 生成二维码
82
+ async createOrder () {
83
+ if (!this.parameter) {
84
+ this.$showMessage('下单参数获取失败')
85
+ return
86
+ }
87
+ let http = new HttpResetClass()
88
+ //tag)
89
+ // let resp1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/PosJianHang/pay/`, this.parameter, {})
90
+ Vue.mmType = ''
91
+ Vue.mm = ""
92
+ let resp1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/PSBCGetCode`, {
93
+ "f_revenue": "productV3",
94
+ "money": this.row.money * 100 + "",
95
+ "attach": {},
96
+ "config": "jiaocheng",
97
+ "pay_way": "pos支付"
98
+ }, {})
99
+ Vue.mmType = 'AES'
100
+ Vue.mm = "3KMKqvgwR8ULbR8Z"
101
+ console.log('resp1=', JSON.stringify(resp1))
102
+ //tag)
103
+ if (resp1.data.code == 200) {
104
+ // 订单编号
105
+ this.oderInfo.out_trade_no = resp1.data.f_out_trade_no
106
+ // 支付连接
107
+ //tag
108
+ // 将链接转成二维码
109
+ new QRCode(document.getElementById('scan'), {'text': resp1.data.url, width: 266, height: 266})
110
+ this.isTimeout = false
111
+ // 查询订单状态
112
+ if (this.oderInfo.out_trade_no) {
113
+ this.timer1 = window.setInterval (this.queryOrderSatus,3000)
114
+ }
115
+ }else {
116
+ this.$showMessage('生成二维码失败!')
117
+ }
118
+ },
119
+ // 查询订单状态
120
+ async queryOrderSatus () {
121
+ //tag)
122
+ let http1 = new HttpResetClass()
123
+ let resp = await http1.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
124
+ data: {
125
+ items: "id",
126
+ tablename: "t_weixinreturnxml",
127
+ condition: ` f_out_trade_no = '${this.oderInfo.out_trade_no}' and f_bill_state = 1 `,
128
+ orderitem: "id"
129
+ }
130
+ }, {resolveMsg: null, rejectMsg: null})
131
+ //tag)
132
+ if (resp.data.length > 0) {
133
+ //tag
134
+ this.oderInfo.msg = '支付成功'
135
+ // 清除定时器 返回上一层
136
+ await this.destroyed()
137
+ await this.callBack(this.oderInfo.out_trade_no)
138
+ }else {
139
+ this.oderInfo.msg = '订单未支付'
140
+ }
141
+ },
142
+ destroyed () {
143
+ // 停止计时器
144
+ //tag
145
+ window.clearInterval(this.timer1)
146
+ // window.clearInterval(this.timer2)
147
+ }
148
+ },
149
+ ready () {
150
+ //tag)
151
+ if(Vue.config.telephone != undefined){
152
+ if(Vue.config.telephone.ApproveConfig != undefined){
153
+ if(Vue.config.telephone.ApproveConfig.merchBase != undefined) {
154
+ // 下单信息
155
+ this.parameter = Vue.config.telephone.ApproveConfig.merchBase
156
+ if (this.row.money) {
157
+ // 下单金额
158
+ //tag)
159
+ this.parameter.money = this.row.money * 100
160
+ //tag)
161
+ this.createOrder()
162
+ }else {
163
+ this.$showMessage('金额获取失败!')
164
+ }
165
+
166
+ }else {
167
+ //tag
168
+ this.$showMessage('银行参数获取失败!')
169
+ }
170
+ }else {
171
+ //tag
172
+ this.$showMessage('银行参数获取失败!')
173
+ }
174
+ }else{
175
+ this.$showMessage('银行参数获取失败!')
176
+ }
177
+ },
178
+ destroyed () {
179
+ // 停止计时器
180
+ //tag
181
+ window.clearInterval(this.timer1)
182
+ // window.clearInterval(this.timer2)
183
+ }
184
+ }
185
+ </script>
186
+ <style>
187
+ .app-row {
188
+ background-color: white;
189
+ padding: 10px 10px 0 10px;
190
+ border-bottom: 1px solid rgba(235, 235, 235, 0.7);
191
+ }
192
+ .search_input {
193
+ border: 0;
194
+ outline: none;
195
+ }
196
+ .font{
197
+ font: 15px PingFang-SC-Medium;
198
+ color: #666666;
199
+ }
200
+ .input-font{
201
+ font: 15px PingFang-SC-Medium;
202
+ color: #333333;
203
+ }
204
+ </style>