|
@@ -1,14 +1,19 @@
|
|
|
import axios from 'axios'
|
|
|
-
|
|
|
+let apiPath = 'http://apitest.yiguanjia.me/index.php?r='
|
|
|
+// let apiPath = ''
|
|
|
var formData = new FormData()
|
|
|
formData.append('user_id', '57e238929f5160d6048b456d')
|
|
|
export default({
|
|
|
// 获取用户信息
|
|
|
|
|
|
- getO2oUserInfo: function () {
|
|
|
- axios.post('o2o/user/info', formData).then((response) => {
|
|
|
- console.log(response.data)
|
|
|
- return response.data
|
|
|
+ getO2oUserInfo: function (cb) {
|
|
|
+ axios.post(apiPath + 'o2o/user/info', formData).then(function (res) {
|
|
|
+ cb(res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getProductList: function (cb) {
|
|
|
+ axios.get(apiPath + 'o2o/product/list').then(function (res) {
|
|
|
+ cb(res.data)
|
|
|
})
|
|
|
}
|
|
|
})
|