diff --git a/.project b/.project
new file mode 100644
index 0000000..a6f049f
--- /dev/null
+++ b/.project
@@ -0,0 +1,28 @@
+
+
+ 1hjz-h5
+
+
+
+
+
+ com.aptana.ide.core.unifiedBuilder
+
+
+
+
+
+ com.aptana.projects.webnature
+
+
+
+ 1531969554902
+
+ 26
+
+ org.eclipse.ui.ide.multiFilter
+ 1.0-name-matches-false-false-node_modules
+
+
+
+
diff --git a/src/api/put-money.js b/src/api/put-money.js
new file mode 100644
index 0000000..188030a
--- /dev/null
+++ b/src/api/put-money.js
@@ -0,0 +1,7 @@
+export default {
+ //提现申请
+ putMoney: {
+ method: 'POST',
+ url: '/mall/web/enchashment/add',
+ }
+}
\ No newline at end of file
diff --git a/src/assets/styles/style.css b/src/assets/styles/style.css
index 3df3ecd..6888b0d 100644
--- a/src/assets/styles/style.css
+++ b/src/assets/styles/style.css
@@ -557,7 +557,7 @@ html,body {
color:rgba(0,186,134,1);
border-radius: 5px;
border-top: 1px solid #D2D3D5;
-}
+}
/*******提现申请******/
.page-content {
diff --git a/src/models/put-money-model.js b/src/models/put-money-model.js
new file mode 100644
index 0000000..f89a575
--- /dev/null
+++ b/src/models/put-money-model.js
@@ -0,0 +1,15 @@
+import utilsModel from './utils-model'
+import putMoneyApi from '../api/put-money.js'
+
+export default {
+ //提现申请
+ putMoney : (params,type) =>
+ utilsModel
+ .config(putMoneyApi.putMoney)
+ .request({
+ data : params
+ // headers: {
+ // 'Content-Type': 'application/x-www-form-urlencoded'
+ // }
+ }),
+}
\ No newline at end of file
diff --git a/src/models/utils-model.js b/src/models/utils-model.js
index 580b63b..9a423d9 100644
--- a/src/models/utils-model.js
+++ b/src/models/utils-model.js
@@ -1,33 +1,36 @@
import configs from '../configs';
import axios from 'axios'
-import {bus} from '../bus.js'
+import {
+ bus
+} from '../bus.js'
// axios.defaults.withCredentials = true;
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';//配置请求头
// 添加一个请求拦截器
-// axios.interceptors.request.use(function (config) {
-// console.dir(config);
-// return config;
-// }, function (error) {
-// // Do something with request error
-// return Promise.reject(error);
-// });
+axios.interceptors.request.use(function (config) {
+ console.log(config);
+ // config.headers.
+ return config;
+}, function (error) {
+ // Do something with request error
+ return Promise.reject(error);
+});
// 添加一个响应拦截器
axios.interceptors.response.use(function (response) {
- if (response.data && response.data.errcode) {
- if (parseInt(response.data.errcode) === 40001) {
- //未登录
- bus.$emit('goto', '/login')
+ if (response.data && response.data.errcode) {
+ if (parseInt(response.data.errcode) === 40001) {
+ //未登录
+ bus.$emit('goto', '/login')
+ }
}
- }
- return response;
+ return response;
}, function (error) {
- // Do something with response error
- return Promise.reject(error);
+ // Do something with response error
+ return Promise.reject(error);
});
//基地址
@@ -44,7 +47,7 @@ let basePath = configs.baseURL;
*
* Inspired by pathRexp in visionmedia/express/lib/utils.js.
*/
-const pathReplace = function(path, opts) {
+const pathReplace = function (path, opts) {
const ret = {
originalPath: path,
patternPath: path
@@ -52,16 +55,16 @@ const pathReplace = function(path, opts) {
path = path
.replace(/([().])/g, '\\$1')
- .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
+ .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function (_, slash, key, option) {
const optional = (option === '?' || option === '*?') ? '?' : null;
const star = (option === '*' || option === '*?') ? '*' : null;
slash = slash || '';
opts[key] = typeof opts[key] === 'number' ? opts[key].toString() : opts[key];
- return ''
- + (optional ? '' : slash)
- + (opts[key] != ''
- ? opts[key] : '${'+ key +'}')
- + (optional || '');
+ return '' +
+ (optional ? '' : slash) +
+ (opts[key] != '' ?
+ opts[key] : '${' + key + '}') +
+ (optional || '');
})
ret.patternPath = path;
@@ -69,22 +72,24 @@ const pathReplace = function(path, opts) {
}
// 处理http请求
-const config = function(config, params){
+const config = function (config, params) {
//提取接口url路径
const url = basePath + pathReplace(config.url, params || {}).patternPath;
return {
// 发送请求
- request: function(obj) {
+ request: function (obj) {
// 全部接口带token
obj = obj || {}
obj.params = obj.params || {}
obj.params.token = localStorage.getItem('user_key')
-
+
//整合请求配置
- const newConfig = Object.assign({}, obj || {}, config, {url: url});
-
+ const newConfig = Object.assign({}, obj || {}, config, {
+ url: url
+ });
+
//执行http接口请求
return axios(newConfig).then(successCallback, errorCallback);
}
@@ -92,13 +97,13 @@ const config = function(config, params){
}
// 请求成功回调
-const successCallback = (result) => {
+const successCallback = (result) => {
// -402用户认证失败,请重新登录 -101没有操作权限
if (result.data.error_code === -402) {
sessionStorage.clear()
- localStorage.removeItem('user_key')
+ localStorage.removeItem('user_key')
//未登录
- bus.$emit('goto', '/login')
+ bus.$emit('goto', '/login')
}
return result.data
diff --git a/src/view/my-money.vue b/src/view/my-money.vue
index a4f48b8..acf4e37 100644
--- a/src/view/my-money.vue
+++ b/src/view/my-money.vue
@@ -57,7 +57,7 @@
-
+
+
diff --git a/src/view/put-money.vue b/src/view/put-money.vue
index a7af5e3..73c1294 100644
--- a/src/view/put-money.vue
+++ b/src/view/put-money.vue
@@ -19,10 +19,10 @@
提现现金 {{inputCue}}
- 可提现余额:800
-
+ 可提现余额:{{currentAmount}}
+
@@ -32,43 +32,73 @@
已达本月提现5次上限
-
-
-
+
\ No newline at end of file
diff --git a/src/view/put-moneySuccess.vue b/src/view/put-moneySuccess.vue
deleted file mode 100644
index 709286e..0000000
--- a/src/view/put-moneySuccess.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-

-
提现申请
-
-
-
-
-

-
提现审核中
-
1-3个工作日
-
-
-
-
-
-
-
-
-
-
diff --git a/src/view/service-evaluation-status.vue b/src/view/service-evaluation-status.vue
index 4386a90..4b1a297 100644
--- a/src/view/service-evaluation-status.vue
+++ b/src/view/service-evaluation-status.vue
@@ -18,13 +18,13 @@
../assets/images/service-evaluation/evaluation-status-3.png
-->
-
-
-
+
+
+
评价成功
- 不可重复评价
- 已过期
- 账号不一致
+ 不可重复评价
+ 已过期
+ 账号不一致
diff --git a/src/view/service-evaluation.vue b/src/view/service-evaluation.vue
index 668c411..b8cff22 100644
--- a/src/view/service-evaluation.vue
+++ b/src/view/service-evaluation.vue
@@ -2,7 +2,7 @@
-

+
服务评价
@@ -131,24 +131,23 @@ export default {
.then(res => {
let code = res.code;
if (code == 0) {
+ //成功
this.code = 0;
this.statusShow = true;
} else if (code == 1) {
- let str = res.msg;
- switch (str) {
- case "已过期":
- this.code = 2;
- this.statusShow = true;
- break;
- case "不可重复评价":
- this.code = 1;
- this.statusShow = true;
- break;
- case "账号不一致":
- this.code = 3;
- this.statusShow = true;
- break;
- }
+ //订单不存在
+ } else if (code == 2) {
+ //不可重复评价
+ this.code = 2;
+ this.statusShow = true;
+ } else if (code == 3) {
+ //已过期
+ this.code = 3;
+ this.statusShow = true;
+ } else if (code == 4) {
+ //账号不一致
+ this.code = 4;
+ this.statusShow = true;
}
});
}
@@ -158,7 +157,15 @@ export default {
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
- }
+ },
+ //返回上一页
+ goBack() {
+ history.go(-1)
+ }
+ },
+ mounted(){
+ let param=this.getParam("code")
+ // if()
}
};