Browse Source

update for pay

dev
赵明涛 7 months ago
parent
commit
75900d12e1
  1. 4
      app/build.gradle
  2. 2
      app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js
  3. 2
      app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json
  4. 30
      uniapp_project_code/src/manifest.json
  5. 36
      uniapp_project_code/src/pages/pay/index.vue

4
app/build.gradle

@ -8,8 +8,8 @@ android {
minSdkVersion 21
targetSdkVersion 28 //21 io.dcloud.PandoraEntry apk入口时 targetSDKVersion>=21
versionCode 113
versionName "1.1.3"
versionCode 114
versionName "1.1.4"
multiDexEnabled true
ndk {
// abiFilters 'x86','armeabi-v7a'

2
app/src/main/assets/apps/__UNI__3B4D40B/www/app-service.js
File diff suppressed because it is too large
View File

2
app/src/main/assets/apps/__UNI__3B4D40B/www/manifest.json

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__3B4D40B","name":"欧轩收银端","version":{"name":"1.0.0","code":"100"},"description":"","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"3.99","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"launch_path":"__uniappview.html"}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__3B4D40B","name":"欧轩收银端","version":{"name":"1.0.1","code":101},"description":"","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"3.99","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"launch_path":"__uniappview.html"}

30
uniapp_project_code/src/manifest.json

@ -2,8 +2,8 @@
"name" : "欧轩收银端",
"appid" : "__UNI__3B4D40B",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.1",
"versionCode" : 101,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -69,17 +69,17 @@
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"devServer" : {
"proxy" : {
"/api" : {
"target" : "http://localhost:5173",
"changeOrigin" : true,
"pathRewrite" : {
"^/api" : ""
}
}
}
}
}
"h5" : {
"devServer" : {
"proxy" : {
"/api" : {
"target" : "http://localhost:5173",
"changeOrigin" : true,
"pathRewrite" : {
"^/api" : ""
}
}
}
}
}
}

36
uniapp_project_code/src/pages/pay/index.vue

@ -82,6 +82,10 @@
async onReady() {
await this.setPageHeight()
// this.testAcceptScanCode()
this.preMakeOrder()
},
onUnload(){
this.clearMakeOrder()
},
methods: {
//,,acceptScanCode
@ -124,6 +128,13 @@
}
return pay_type
},
async preMakeOrder(){
this.makeInfo = await this.makeOrder()
if(!this.makeInfo?.order_no)return util.showNone("生成订单失败,请重新下单!")
},
clearMakeOrder(){
this.makeInfo = null
},
async acceptScanCode(code) {
console.log("acceptScanCode:",code)
// util.showNone("...")
@ -136,15 +147,24 @@
return
}
await this.makeOrder((makeInfo)=>{
console.log("makeInfo-result",makeInfo)
}).then((orderInfo)=>{
console.log("orderInfo-result",orderInfo)
return this.payOrder({
"order_no":orderInfo.order_no,
// await this.makeOrder((makeInfo)=>{
// console.log("makeInfo-result",makeInfo)
// }).then((orderInfo)=>{
// console.log("orderInfo-result",orderInfo)
// return this.payOrder({
// "order_no":orderInfo.order_no,
// pay_code,pay_type
// })
// })
let order_no = this.makeInfo?.order_no||""
if(!order_no)return util.showNone("支付失败,请重新下单!")
await this.payOrder({
"order_no":order_no,
pay_code,pay_type
})
}).then((payInfo)=>{
})
.then((payInfo)=>{
console.log("payInfo-result:",payInfo)
return this.checkOrder(payInfo)
}).then(async (checkInfo)=>{

Loading…
Cancel
Save