he2802 4 سال پیش
والد
کامیت
a8716ec039
4فایلهای تغییر یافته به همراه21 افزوده شده و 6 حذف شده
  1. 3 1
      common/api.js
  2. 13 0
      common/httpList/order.js
  3. 2 2
      common/request.js
  4. 3 3
      pages2/payment/payment.vue

+ 3 - 1
common/api.js

@@ -14,6 +14,7 @@ import system from './httpList/system.js'
 import record from './httpList/record.js'
 import plan from './httpList/plan.js'
 import wxpay from './httpList/wxpay.js'
+import order from './httpList/order.js'
 export default {
 	...login,
 	...polyvVideo,
@@ -30,5 +31,6 @@ export default {
 	...system,
 	...record,
 	...plan,
-	...wxpay
+	...wxpay,
+	...order
 }

+ 13 - 0
common/httpList/order.js

@@ -0,0 +1,13 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	order(data) {
+		return myRequest({
+			url: '/order',
+			method: 'post',
+			data: data
+		})
+	},
+	
+}

+ 2 - 2
common/request.js

@@ -1,7 +1,7 @@
 
-const BASE_URL = 'http://192.168.0.222:8088'
+//const BASE_URL = 'http://127.0.0.1:8088'
 // const BASE_URL = 'http://192.168.0.145:8088'   //
-// const BASE_URL = 'https://api.xyyxt.net'  //
+const BASE_URL = 'https://api.xyyxt.net'  //
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1

+ 3 - 3
pages2/payment/payment.vue

@@ -26,11 +26,11 @@
 		},
 		methods: {
 			pay(){
-				this.wxPayment({orderNo:"123"})
+				this.wxPayment({})
 			},
 			wxPayment(param){
 				let self = this
-				this.$api.wxPayment(param).then(res => {
+				this.$api.order(param).then(res => {
 					if (res.data.code == 200){
 						let data = res.data.data
 						uni.requestPayment({
@@ -38,7 +38,7 @@
 						    nonceStr: data.nonceStr,
 						    package: data.package,
 						    signType: data.signType,
-						    paySign: data.paySign,
+						    paySign: data.sign,
 							timeStamp: String(data.timeStamp),
 						    success: function (res) {
 						        console.log('success:' + JSON.stringify(res));