shish 4 жил өмнө
parent
commit
7e37efafda

+ 1 - 1
ghsApp/src/manifest.json

@@ -30,7 +30,7 @@
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>"
                 ],
-                "autoSdkPermissions" : false
+                "autoSdkPermissions" : true
             },
             /* ios打包配置 */
             "ios" : {

+ 16 - 1
ghsApp/src/mixins/globalMixins.js

@@ -5,6 +5,8 @@ import { getUser, uniLoginFn } from '@/utils/auth'
 import { postWxCode, getDictionaries } from '@/api/mini'
 import { getStaffApi,appReGetLoginInfo } from '@/api/common'
 import { allProduct } from '@/api/product'
+import { codePay} from "@/api/order/index";
+
 // #ifdef APP-PLUS
 const shangMiPrint = uni.requireNativePlugin('G5KJ-ShangMiPrint')
 const globalEvent = uni.requireNativePlugin('globalEvent')
@@ -264,7 +266,20 @@ export default {
       }
     },
 		// #endif
-
+    //付款码付款
+    requestCodePay(authCode){
+      let that = this
+      uni.showLoading({title: '正在付款',mask:true})
+      let orderId = uni.getStorageSync('globalCodePayId');
+      codePay({id:orderId,authCode:authCode}).then(res=>{
+        uni.hideLoading()
+        if(res.code == 1){
+          if(res.data.returnStatus == 'SUCCESS'){
+            that.$util.pageTo({ url: '/admin/billing/result',type:2,query: {orderId:orderId,title:'支付成功'}})
+          }
+        }
+      })
+    },
     toFreeApply_HOME () {
       let status = ''
         if (uni.getStorageSync('HOME_STATUS_STROAGE_SHOW') == '0') {