1340652578@qq.com 8 gadi atpakaļ
vecāks
revīzija
a408268971

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
www/vue/dist/static/js/app.js


+ 3 - 1
www/vue/src/components/product.vue

@@ -47,13 +47,15 @@
         console.log(this.$route.query.productBox)
       },
       btnOrder: function (cb) {
-        const balance = 1
+        config.formData = new FormData()
+        const balance = 0
         console.log(balance)
         let productParamJson = ''
         productParamJson = JSON.stringify([{
           product_id: '57e3a5a49f5160c9048b457c', // 产品ID
           count: '1' // 产品数量
         }])
+
         console.log(productParamJson)
         let extraJson = ''
         extraJson = JSON.stringify([{type: '整间日常清洁', price: '388'}])

+ 4 - 2
www/vue/src/config/api.js

@@ -2,11 +2,11 @@ import axios from 'axios'
 import config from './config'
 import pingpp from '../../../webapp/common/js/pingpp'
 // let apiPath = 'http://commontest.yiguanjia.me/index.php?r='
-console.log(config.formData)
+
 export default ({
   // 获取用户信息
   getO2oUserInfo: function (cb) {
-    axios.post('o2o/user/info', config.formData).then(function (res) {
+    axios.get('o2o/user/info&user_id=' + config.userId).then(function (res) {
       cb(res.data)
     })
   },
@@ -47,6 +47,8 @@ export default ({
     axios.post('o2o/order/add', config.formData).then(function (res) {
       let data = res.data.data
       // 支付成功
+      console.log('api.js' + 50)
+      console.log(res)
       if (data.status === 1) {
       } else {
         //  支付失败

+ 1 - 2
www/vue/src/config/config.js

@@ -3,7 +3,7 @@ let apiPath = ''
 let uri = location.href
 let test = true
 var userId = ''
-var formData = new FormData()
+var formData = ''
 if (uri.indexOf('common.yiguanjia.me') > -1) {
   test = false
 }
@@ -26,7 +26,6 @@ if (uri.indexOf('http://localhost:8080/') > -1) {
 
 axios.defaults.baseURL = apiPath
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
-formData.append('user_id', userId)
 export default {
   userId: userId,
   formData: formData

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels