|
@@ -3,22 +3,29 @@ import axios from 'axios'
|
|
|
let apiPath = ''
|
|
|
let uri = location.href
|
|
|
let test = true
|
|
|
+var userId = ''
|
|
|
+var formData = new FormData()
|
|
|
+
|
|
|
if (uri.indexOf('common.yiguanjia.me') > -1) {
|
|
|
test = false
|
|
|
}
|
|
|
// 正式开发判断test还是pro
|
|
|
if (test) {
|
|
|
apiPath = 'http://commontest.yiguanjia.me/index.php?r='
|
|
|
+ userId = localStorage.getItem('wxUserID')
|
|
|
} else {
|
|
|
apiPath = 'http://common.yiguanjia.me/index.php?r='
|
|
|
+ userId = localStorage.getItem('wxUserID')
|
|
|
}
|
|
|
// 判断是否为dev开发
|
|
|
if (uri.indexOf('http://localhost:8080/') > -1) {
|
|
|
apiPath = ''
|
|
|
+ userId = '57e238929f5160d6048b456d'
|
|
|
+} else if (uri.indexOf('common.yiguanjiadev.me') > -1) {
|
|
|
+ apiPath = 'http://common.yiguanjiadev.me/index.php?r='
|
|
|
+ userId = '57e238929f5160d6048b456d'
|
|
|
}
|
|
|
-console.log(localStorage.getItem('wxUserID'))
|
|
|
-var formData = new FormData()
|
|
|
-formData.append('user_id', '57e238929f5160d6048b456d')
|
|
|
+formData.append('user_id', userId) // 获取
|
|
|
export default({
|
|
|
// 获取用户信息
|
|
|
|