Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
185396f9
authored
May 14, 2019
by
林翔
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
lx
parent
7a8cfdd1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
13 deletions
src/store/modules/wallet/wallet.js
src/views/wallet/Index.vue
src/views/wallet/Withdraw.vue
view/21.js
view/9.js
view/app.js
src/store/modules/wallet/wallet.js
View file @
185396f9
...
@@ -36,7 +36,9 @@ const state = {
...
@@ -36,7 +36,9 @@ const state = {
//充值提现单据详细
//充值提现单据详细
rechargeWithdrawOrderDetail
:
[],
rechargeWithdrawOrderDetail
:
[],
//订单信息
//订单信息
orderInfoData
:
[]
orderInfoData
:
[],
//默认提现可点击(防多次点击)
amountWithdrawFlag
:
true
}
}
const
mutations
=
{
const
mutations
=
{
...
@@ -77,7 +79,9 @@ const mutations = {
...
@@ -77,7 +79,9 @@ const mutations = {
state
.
amountRechargeID
=
payload
.
data
state
.
amountRechargeID
=
payload
.
data
},
},
walletWithdraw
(
state
,
payload
)
{
walletWithdraw
(
state
,
payload
)
{
state
.
amountWithdrawID
=
payload
.
data
debugger
state
.
amountWithdrawID
=
payload
.
data
,
state
.
amountWithdrawFlag
=
payload
.
amountWithdrawFlag
},
},
rechargeWithdrawOrderIfo
(
state
,
payload
)
{
rechargeWithdrawOrderIfo
(
state
,
payload
)
{
state
.
rechargeWithdrawOrderDetail
=
payload
.
data
state
.
rechargeWithdrawOrderDetail
=
payload
.
data
...
@@ -512,7 +516,8 @@ const actions = {
...
@@ -512,7 +516,8 @@ const actions = {
});
});
commit
({
commit
({
type
:
'walletWithdraw'
,
type
:
'walletWithdraw'
,
data
:
data
.
data
data
:
data
.
data
,
amountWithdrawFlag
:
false
});
});
setTimeout
(
function
()
{
setTimeout
(
function
()
{
window
.
location
.
href
=
"/h5/view/#/wallet/record"
;
window
.
location
.
href
=
"/h5/view/#/wallet/record"
;
...
@@ -522,6 +527,11 @@ const actions = {
...
@@ -522,6 +527,11 @@ const actions = {
message
:
data
.
err_msg
,
message
:
data
.
err_msg
,
duration
:
3000
duration
:
3000
});
});
commit
({
type
:
'walletWithdraw'
,
data
:
data
.
data
,
amountWithdrawFlag
:
true
});
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
Toast
.
clear
();
Toast
.
clear
();
...
...
src/views/wallet/Index.vue
View file @
185396f9
...
@@ -42,9 +42,9 @@
...
@@ -42,9 +42,9 @@
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
import
Header
from
'@/views/common/Header.vue'
;
import
Header
from
'@/views/common/Header.vue'
;
import
{
Popup
}
from
'vant'
;
import
{
Dialog
}
from
'vant'
;
Vue
.
use
(
Popup
);
Vue
.
use
(
Dialog
);
export
default
{
export
default
{
name
:
'wallet'
,
name
:
'wallet'
,
...
@@ -74,9 +74,18 @@
...
@@ -74,9 +74,18 @@
},
},
methods
:
{
methods
:
{
withdraw
()
{
withdraw
()
{
if
(
this
.
walletInfoData
.
wallet_status
==
1
)
{
if
(
this
.
walletInfoData
.
wallet_status
==
1
&&
!
(
this
.
walletInfoData
.
bank_account
===
null
)
)
{
//钱包状态:1启用,-1未启用,-2锁定
//钱包状态:1启用,-1未启用,-2锁定
this
.
$router
.
push
({
path
:
'/wallet/withdraw'
});
this
.
$router
.
push
({
path
:
'/wallet/withdraw'
});
}
else
{
Dialog
.
confirm
({
title
:
'提醒'
,
message
:
'请先去绑卡'
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/wallet/bind'
});
}).
catch
(()
=>
{
// on cancel
});
}
}
},
},
activate
()
{
activate
()
{
...
...
src/views/wallet/Withdraw.vue
View file @
185396f9
...
@@ -50,17 +50,19 @@
...
@@ -50,17 +50,19 @@
showPassword
:
true
,
//是否显示密码
showPassword
:
true
,
//是否显示密码
amountNum
:
true
,
amountNum
:
true
,
password
:
''
,
password
:
''
,
withdrawNum
:
''
withdrawNum
:
''
,
clickFlag
:
true
}
}
},
},
computed
:
{
computed
:
{
...
mapState
({
...
mapState
({
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
,
amountWithdrawFlag
:
state
=>
state
.
wallet
.
amountWithdrawFlag
})
})
},
},
watch
:
{
watch
:
{
withdrawNum
:
function
(
val
){
withdrawNum
:
function
(
val
){
if
(
val
>
this
.
walletInfoData
.
wallet_usable
)
{
if
(
val
>
this
.
walletInfoData
.
wallet_usable
)
{
this
.
amountNum
=
!
this
.
amountNum
;
this
.
amountNum
=
!
this
.
amountNum
;
}
else
{
}
else
{
this
.
amountNum
=
true
;
this
.
amountNum
=
true
;
...
@@ -80,8 +82,9 @@
...
@@ -80,8 +82,9 @@
this
.
withdrawNum
=
this
.
walletInfoData
.
wallet_usable
;
this
.
withdrawNum
=
this
.
walletInfoData
.
wallet_usable
;
},
},
submit
()
{
submit
()
{
if
(
this
.
withdrawNum
!==
''
){
if
(
this
.
withdrawNum
!==
''
&&
this
.
clickFlag
){
if
(
this
.
password
){
if
(
this
.
password
){
this
.
clickFlag
=
false
;
//提现申请
//提现申请
this
.
$store
.
dispatch
({
this
.
$store
.
dispatch
({
type
:
'walletWithdraw'
,
type
:
'walletWithdraw'
,
...
...
view/21.js
View file @
185396f9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/_@babel_runtime-corejs2@7.3.1@@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.0@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Icon\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'WalletWithdraw',\n data: function data() {\n return {\n title: \"钱包提现\",\n meaushow: true,\n showPassword: true,\n //是否显示密码\n amountNum: true,\n password: '',\n withdrawNum: ''
\n };\n },\n computed: Object(D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_2__[\"mapState\"])({\n walletInfoData: function walletInfoData(state) {\n return state.wallet.walletInfoData;\n }\n })),\n watch: {\n withdrawNum: function withdrawNum(val) {\n if (val > this.walletInfoData.wallet_usable) {\n this.amountNum = !this.amountNum;\n } else {\n this.amountNum = true;\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n changeShow: function changeShow() {\n this.showPassword = !this.showPassword;\n },\n withdraw: function withdraw() {\n //全部提现\n this.withdrawNum = this.walletInfoData.wallet_usable;\n },\n submit: function submit() {\n if (this.withdrawNum !== '') {\n if (this.password) {\n //提现申请
\n this.$store.dispatch({\n type: 'walletWithdraw',\n amount: this.withdrawNum,\n pay_password: this.password\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_4__[\"Toast\"])({\n message: '请输入提现密码'\n });\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/wallet/Withdraw.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.4@vue-loader/lib??vue-loader-options"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/_@babel_runtime-corejs2@7.3.1@@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.0@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Icon\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'WalletWithdraw',\n data: function data() {\n return {\n title: \"钱包提现\",\n meaushow: true,\n showPassword: true,\n //是否显示密码\n amountNum: true,\n password: '',\n withdrawNum: ''
,\n clickFlag: true\n };\n },\n computed: Object(D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_2__[\"mapState\"])({\n walletInfoData: function walletInfoData(state) {\n return state.wallet.walletInfoData;\n },\n amountWithdrawFlag: function amountWithdrawFlag(state) {\n return state.wallet.amountWithdrawFlag;\n }\n })),\n watch: {\n withdrawNum: function withdrawNum(val) {\n if (val > this.walletInfoData.wallet_usable) {\n this.amountNum = !this.amountNum;\n } else {\n this.amountNum = true;\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n changeShow: function changeShow() {\n this.showPassword = !this.showPassword;\n },\n withdraw: function withdraw() {\n //全部提现\n this.withdrawNum = this.walletInfoData.wallet_usable;\n },\n submit: function submit() {\n if (this.withdrawNum !== '' && this.clickFlag) {\n if (this.password) {\n this.clickFlag = false; //提现申请\n
\n this.$store.dispatch({\n type: 'walletWithdraw',\n amount: this.withdrawNum,\n pay_password: this.password\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_4__[\"Toast\"])({\n message: '请输入提现密码'\n });\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/wallet/Withdraw.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.4@vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/9.js
View file @
185396f9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/_@babel_runtime-corejs2@7.3.1@@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var
core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.promise */ \"./node_modules/_core-js@2.6.5@core-js/modules/es6.promise.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/_core-js@2.6.5@core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.0@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_3__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_6__[\"Popup\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wallet',\n data: function data() {\n return {\n title: \"我的钱包\",\n meaushow: true\n };\n },\n beforeRouteEnter: function beforeRouteEnter(to, from, next) {\n next(function (vm) {\n vm.$store.dispatch({\n type: 'loginCheck',\n is_jump: true\n });\n });\n },\n computed: Object(D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_4__[\"mapState\"])({\n walletInfoData: function walletInfoData(state) {\n return state.wallet.walletInfoData;\n }\n })),\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n withdraw: function withdraw() {\n if (this.walletInfoData.wallet_status == 1) {\n //钱包状态:1启用,-1未启用,-2锁定\n this.$router.push({\n path: '/wallet/withdraw'\n });\n }\n },\n activate: function activate() {\n this.$router.push({\n path: '/wallet/activate'\n });\n },\n recharge: function recharge() {\n this.$router.push({\n path: '/wallet/recharge'\n });\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_5
__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/wallet/Index.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.4@vue-loader/lib??vue-loader-options"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/_@babel_runtime-corejs2@7.3.1@@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var
vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.0@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Dialog\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wallet',\n data: function data() {\n return {\n title: \"我的钱包\",\n meaushow: true\n };\n },\n beforeRouteEnter: function beforeRouteEnter(to, from, next) {\n next(function (vm) {\n vm.$store.dispatch({\n type: 'loginCheck',\n is_jump: true\n });\n });\n },\n computed: Object(D_svnData_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_2__[\"mapState\"])({\n walletInfoData: function walletInfoData(state) {\n return state.wallet.walletInfoData;\n }\n })),\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n withdraw: function withdraw() {\n var _this = this;\n\n if (this.walletInfoData.wallet_status == 1 && !(this.walletInfoData.bank_account === null)) {\n //钱包状态:1启用,-1未启用,-2锁定\n this.$router.push({\n path: '/wallet/withdraw'\n });\n } else {\n vant__WEBPACK_IMPORTED_MODULE_4__[\"Dialog\"].confirm({\n title: '提醒',\n message: '请先去绑卡'\n }).then(function () {\n _this.$router.push({\n path: '/wallet/bind'\n });\n }).catch(function () {// on cancel\n });\n }\n },\n activate: function activate() {\n this.$router.push({\n path: '/wallet/activate'\n });\n },\n recharge: function recharge() {\n this.$router.push({\n path: '/wallet/recharge'\n });\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_3
__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/wallet/Index.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.4@vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/app.js
View file @
185396f9
...
@@ -4782,7 +4782,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
...
@@ -4782,7 +4782,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util */ \"./src/util/index.js\");\n\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.6.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n //钱包信息\n walletInfoData: {},\n //验证安全手机——图形验证码和开始倒计时标记\n verifyShowImgCode: false,\n verifyCountDownFlag: false,\n //激活钱包——图形验证码和开始倒计时标记\n activateShowImgCode: false,\n activateCountDownFlag: false,\n //找回密码——图形验证码和开始倒计时标记\n retieveShowImgCode: false,\n retieveCountDownFlag: false,\n passwordToken: '',\n //钱包明细\n walletListData: [],\n //提现充值明细\n walletRecordData: [],\n //绑定银行卡\n bankPasswordToken: '',\n bankCountDownFlag: false,\n bindBankKey: '',\n bindBankData: '',\n //充值单ID\n amountRechargeID: '',\n //提现单ID\n amountWithdrawID: '',\n //充值提现单据详细\n rechargeWithdrawOrderDetail: [],\n //订单信息\n orderInfoData: []\n};\nvar mutations = {\n getWalletInfo: function getWalletInfo(state, payload) {\n state.walletInfoData = payload.data;\n },\n sendSafesms: function sendSafesms(state, payload) {\n state.verifyShowImgCode = !payload.verifyCountDownFlag;\n state.verifyCountDownFlag = payload.verifyCountDownFlag;\n },\n smsVerifyActivate: function smsVerifyActivate(state, payload) {\n state.activateShowImgCode = !payload.activateCountDownFlag;\n state.activateCountDownFlag = payload.activateCountDownFlag;\n },\n smsVerifyRetrieve: function smsVerifyRetrieve(state, payload) {\n state.retieveShowImgCode = !payload.retieveCountDownFlag;\n state.retieveCountDownFlag = payload.retieveCountDownFlag;\n },\n verifyResetsms: function verifyResetsms(state, payload) {\n state.passwordToken = payload.data;\n },\n walletListLog: function walletListLog(state, payload) {\n state.walletListData = payload.data;\n },\n walletRecordList: function walletRecordList(state, payload) {\n state.walletRecordData = payload.data;\n },\n verifySafeMobile: function verifySafeMobile(state, payload) {\n state.bankPasswordToken = payload.data;\n _util__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setCookie(\"bankPasswordToken\", payload.data, 1);\n },\n getBindBankmsg: function getBindBankmsg(state, payload) {\n state.bankCountDownFlag = payload.bankCountDownFlag;\n state.bindBankKey = payload.data.access_key;\n state.bindBankData = payload.data.access_data;\n },\n walletRecharge: function walletRecharge(state, payload) {\n state.amountRechargeID = payload.data;\n },\n walletWithdraw: function walletWithdraw(state, payload) {\n state.amountWithdrawID = payload.data;\n },\n rechargeWithdrawOrderIfo: function rechargeWithdrawOrderIfo(state, payload) {\n state.rechargeWithdrawOrderDetail = payload.data;\n },\n payTodo: function payTodo(state, payload) {\n state.rechargeWithdrawOrderDetail = payload.data;\n },\n orderInfo: function orderInfo(state, payload) {\n state.orderInfoData = payload.data;\n }\n};\nvar actions = {\n getWalletInfo: function getWalletInfo(_ref, payload) {\n var commit = _ref.commit;\n var params = {};\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].getWalletInfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'getWalletInfo',\n data: data.data\n });\n }\n }).catch(function (err) {});\n },\n smsVerifyActivate: function smsVerifyActivate(_ref2, payload) {\n var commit = _ref2.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n mobile: payload.mobile,\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].smsVerify(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyActivate',\n activateCountDownFlag: true\n });\n } else if (data.err_code == 23019 || data.err_code == 11008 || data.err_code == 11011) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyActivate',\n activateCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n activateWallet: function activateWallet(_ref3, payload) {\n var commit = _ref3.commit;\n var params = {\n intl_code: '',\n safe_mobile: payload.mobile,\n verify_code: payload.verifyCode,\n pay_password: payload.password,\n reconfirm: payload.passwordConfirm\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].activateWallet(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/activate\";\n }, 2000);\n }\n }).catch(function (err) {});\n },\n sendSafesms: function sendSafesms(_ref4, payload) {\n var commit = _ref4.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].sendSafesms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'sendSafesms',\n verifyCountDownFlag: true\n });\n } else if (data.err_code == 23019) {\n //请确认图形验证码\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'sendSafesms',\n verifyCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n smsVerifyRetrieve: function smsVerifyRetrieve(_ref5, payload) {\n var commit = _ref5.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].sendSafesms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyRetrieve',\n retieveCountDownFlag: true\n });\n } else if (data.err_code == 23019) {\n //请确认图形验证码\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyRetrieve',\n retieveCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n verifyResetsms: function verifyResetsms(_ref6, payload) {\n var commit = _ref6.commit;\n var params = {\n verify_code: payload.verify_code\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].verifyResetsms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'verifyResetsms',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n changeWalletpwd: function changeWalletpwd(_ref7, payload) {\n var commit = _ref7.commit;\n var params = {\n token: payload.token,\n pay_password: payload.pay_password,\n reconfirm: payload.reconfirm,\n mode: payload.mode\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].changeWalletpwd(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletListLog: function walletListLog(_ref8, payload) {\n var commit = _ref8.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...'\n });\n var params = {\n log_type: payload.log_type,\n stime: payload.stime,\n etime: payload.etime\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].walletListLog(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletListLog',\n data: data.data.list\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n walletRecordList: function walletRecordList(_ref9, payload) {\n var commit = _ref9.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...'\n });\n var params = {\n wallet_type: payload.wallet_type,\n stime: payload.stime,\n etime: payload.etime\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].walletRecordList(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletRecordList',\n data: data.data.list\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n verifySafeMobile: function verifySafeMobile(_ref10, payload) {\n var commit = _ref10.commit;\n var params = {\n verify_code: payload.verify_code,\n pay_password: payload.pay_password\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].verifySafeMobile(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'verifySafeMobile',\n data: data.data\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/bind\";\n }, 2000);\n } else if (data.err_code == 11030) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = '/h5/view/#/';\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 200\n });\n }\n }).catch(function (err) {});\n },\n getBindBankmsg: function getBindBankmsg(_ref11, payload) {\n var commit = _ref11.commit;\n var params = {\n bank_user: payload.bank_user,\n bank_id: payload.bank_id,\n bank_account: payload.bank_account,\n id_type: payload.id_type,\n id_number: payload.id_number,\n account_type: payload.account_type,\n mobile: payload.mobile,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].getBindBankmsg(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'getBindBankmsg',\n bankCountDownFlag: true,\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n bindBankCard: function bindBankCard(_ref12, payload) {\n var commit = _ref12.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n token: payload.token,\n wallet_bank_id: payload.wallet_bank_id,\n sms_code: payload.sms_code,\n access_key: payload.access_key,\n access_data: payload.access_data\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].bindBankCard(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n walletRecharge: function walletRecharge(_ref13, payload) {\n var commit = _ref13.commit;\n var params = {\n amount: payload.amount\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].walletRecharge(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletRecharge',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletWithdraw: function walletWithdraw(_ref14, payload) {\n var commit = _ref14.commit;\n var params = {\n amount: payload.amount,\n pay_password: payload.pay_password\n };\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '处理中...'\n });\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].walletWithdraw(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: '提现申请成功,预计1个工作日后到账,节假日顺延,请耐心等待',\n duration: 2000\n });\n commit({\n type: 'walletWithdraw',\n data: data.data\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/record\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n rechargeWithdrawOrderIfo: function rechargeWithdrawOrderIfo(_ref15, payload) {\n var commit = _ref15.commit;\n var params = {\n wallet_id: payload.wallet_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].rechargeWithdrawOrderIfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'rechargeWithdrawOrderIfo',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n payTodo: function payTodo(_ref16, payload) {\n var commit = _ref16.commit;\n var params = {\n pay_code: payload.pay_code,\n rescue: payload.rescue,\n types: payload.types,\n site_type: payload.site_type,\n order_id: payload.order_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].payTodo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n if (is_miniProgram()) {\n //微信小程序\n wx.requestPayment(data.data);\n } else {\n window.location.href = data.data;\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n orderInfo: function orderInfo(_ref17, payload) {\n var commit = _ref17.commit;\n var params = {\n order_id: payload.order_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].orderInfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'orderInfo',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletPayTodo: function walletPayTodo(_ref18, payload) {\n var commit = _ref18.commit;\n var params = {\n pay_code: payload.pay_code,\n pay_password: payload.pay_password,\n types: payload.types,\n order_id: payload.order_id,\n site_type: payload.site_type\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].payTodo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n setTimeout(function () {\n window.location.href = \"/v3/pay/success?order_id=\" + payload.order_id + \"&types=\" + (payload.types || 0);\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1
__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/wallet/wallet.js?"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.promise */ \"./node_modules/_core-js@2.6.5@core-js/modules/es6.promise.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/_core-js@2.6.5@core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.6@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@1.6.5@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../util */ \"./src/util/index.js\");\n\n\n\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.6.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_2__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"]);\nvar state = {\n //钱包信息\n walletInfoData: {},\n //验证安全手机——图形验证码和开始倒计时标记\n verifyShowImgCode: false,\n verifyCountDownFlag: false,\n //激活钱包——图形验证码和开始倒计时标记\n activateShowImgCode: false,\n activateCountDownFlag: false,\n //找回密码——图形验证码和开始倒计时标记\n retieveShowImgCode: false,\n retieveCountDownFlag: false,\n passwordToken: '',\n //钱包明细\n walletListData: [],\n //提现充值明细\n walletRecordData: [],\n //绑定银行卡\n bankPasswordToken: '',\n bankCountDownFlag: false,\n bindBankKey: '',\n bindBankData: '',\n //充值单ID\n amountRechargeID: '',\n //提现单ID\n amountWithdrawID: '',\n //充值提现单据详细\n rechargeWithdrawOrderDetail: [],\n //订单信息\n orderInfoData: [],\n //默认提现可点击(防多次点击)\n amountWithdrawFlag: true\n};\nvar mutations = {\n getWalletInfo: function getWalletInfo(state, payload) {\n state.walletInfoData = payload.data;\n },\n sendSafesms: function sendSafesms(state, payload) {\n state.verifyShowImgCode = !payload.verifyCountDownFlag;\n state.verifyCountDownFlag = payload.verifyCountDownFlag;\n },\n smsVerifyActivate: function smsVerifyActivate(state, payload) {\n state.activateShowImgCode = !payload.activateCountDownFlag;\n state.activateCountDownFlag = payload.activateCountDownFlag;\n },\n smsVerifyRetrieve: function smsVerifyRetrieve(state, payload) {\n state.retieveShowImgCode = !payload.retieveCountDownFlag;\n state.retieveCountDownFlag = payload.retieveCountDownFlag;\n },\n verifyResetsms: function verifyResetsms(state, payload) {\n state.passwordToken = payload.data;\n },\n walletListLog: function walletListLog(state, payload) {\n state.walletListData = payload.data;\n },\n walletRecordList: function walletRecordList(state, payload) {\n state.walletRecordData = payload.data;\n },\n verifySafeMobile: function verifySafeMobile(state, payload) {\n state.bankPasswordToken = payload.data;\n _util__WEBPACK_IMPORTED_MODULE_5__[\"default\"].setCookie(\"bankPasswordToken\", payload.data, 1);\n },\n getBindBankmsg: function getBindBankmsg(state, payload) {\n state.bankCountDownFlag = payload.bankCountDownFlag;\n state.bindBankKey = payload.data.access_key;\n state.bindBankData = payload.data.access_data;\n },\n walletRecharge: function walletRecharge(state, payload) {\n state.amountRechargeID = payload.data;\n },\n walletWithdraw: function walletWithdraw(state, payload) {\n debugger;\n state.amountWithdrawID = payload.data, state.amountWithdrawFlag = payload.amountWithdrawFlag;\n },\n rechargeWithdrawOrderIfo: function rechargeWithdrawOrderIfo(state, payload) {\n state.rechargeWithdrawOrderDetail = payload.data;\n },\n payTodo: function payTodo(state, payload) {\n state.rechargeWithdrawOrderDetail = payload.data;\n },\n orderInfo: function orderInfo(state, payload) {\n state.orderInfoData = payload.data;\n }\n};\nvar actions = {\n getWalletInfo: function getWalletInfo(_ref, payload) {\n var commit = _ref.commit;\n var params = {};\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].getWalletInfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'getWalletInfo',\n data: data.data\n });\n }\n }).catch(function (err) {});\n },\n smsVerifyActivate: function smsVerifyActivate(_ref2, payload) {\n var commit = _ref2.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n mobile: payload.mobile,\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].smsVerify(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyActivate',\n activateCountDownFlag: true\n });\n } else if (data.err_code == 23019 || data.err_code == 11008 || data.err_code == 11011) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyActivate',\n activateCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n activateWallet: function activateWallet(_ref3, payload) {\n var commit = _ref3.commit;\n var params = {\n intl_code: '',\n safe_mobile: payload.mobile,\n verify_code: payload.verifyCode,\n pay_password: payload.password,\n reconfirm: payload.passwordConfirm\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].activateWallet(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/activate\";\n }, 2000);\n }\n }).catch(function (err) {});\n },\n sendSafesms: function sendSafesms(_ref4, payload) {\n var commit = _ref4.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].sendSafesms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'sendSafesms',\n verifyCountDownFlag: true\n });\n } else if (data.err_code == 23019) {\n //请确认图形验证码\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'sendSafesms',\n verifyCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n smsVerifyRetrieve: function smsVerifyRetrieve(_ref5, payload) {\n var commit = _ref5.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n verify: payload.imgCode,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].sendSafesms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyRetrieve',\n retieveCountDownFlag: true\n });\n } else if (data.err_code == 23019) {\n //请确认图形验证码\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'smsVerifyRetrieve',\n retieveCountDownFlag: false\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n verifyResetsms: function verifyResetsms(_ref6, payload) {\n var commit = _ref6.commit;\n var params = {\n verify_code: payload.verify_code\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].verifyResetsms(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'verifyResetsms',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n changeWalletpwd: function changeWalletpwd(_ref7, payload) {\n var commit = _ref7.commit;\n var params = {\n token: payload.token,\n pay_password: payload.pay_password,\n reconfirm: payload.reconfirm,\n mode: payload.mode\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].changeWalletpwd(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletListLog: function walletListLog(_ref8, payload) {\n var commit = _ref8.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '加载中...'\n });\n var params = {\n log_type: payload.log_type,\n stime: payload.stime,\n etime: payload.etime\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].walletListLog(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletListLog',\n data: data.data.list\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n walletRecordList: function walletRecordList(_ref9, payload) {\n var commit = _ref9.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '加载中...'\n });\n var params = {\n wallet_type: payload.wallet_type,\n stime: payload.stime,\n etime: payload.etime\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].walletRecordList(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletRecordList',\n data: data.data.list\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n verifySafeMobile: function verifySafeMobile(_ref10, payload) {\n var commit = _ref10.commit;\n var params = {\n verify_code: payload.verify_code,\n pay_password: payload.pay_password\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].verifySafeMobile(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'verifySafeMobile',\n data: data.data\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/bind\";\n }, 2000);\n } else if (data.err_code == 11030) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = '/h5/view/#/';\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 200\n });\n }\n }).catch(function (err) {});\n },\n getBindBankmsg: function getBindBankmsg(_ref11, payload) {\n var commit = _ref11.commit;\n var params = {\n bank_user: payload.bank_user,\n bank_id: payload.bank_id,\n bank_account: payload.bank_account,\n id_type: payload.id_type,\n id_number: payload.id_number,\n account_type: payload.account_type,\n mobile: payload.mobile,\n channel: 3\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].getBindBankmsg(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'getBindBankmsg',\n bankCountDownFlag: true,\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n bindBankCard: function bindBankCard(_ref12, payload) {\n var commit = _ref12.commit;\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '处理中...'\n });\n var params = {\n token: payload.token,\n wallet_bank_id: payload.wallet_bank_id,\n sms_code: payload.sms_code,\n access_key: payload.access_key,\n access_data: payload.access_data\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].bindBankCard(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n walletRecharge: function walletRecharge(_ref13, payload) {\n var commit = _ref13.commit;\n var params = {\n amount: payload.amount\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].walletRecharge(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'walletRecharge',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletWithdraw: function walletWithdraw(_ref14, payload) {\n var commit = _ref14.commit;\n var params = {\n amount: payload.amount,\n pay_password: payload.pay_password\n };\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].loading({\n message: '处理中...'\n });\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].walletWithdraw(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: '提现申请成功,预计1个工作日后到账,节假日顺延,请耐心等待',\n duration: 2000\n });\n commit({\n type: 'walletWithdraw',\n data: data.data,\n amountWithdrawFlag: false\n });\n setTimeout(function () {\n window.location.href = \"/h5/view/#/wallet/record\";\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n commit({\n type: 'walletWithdraw',\n data: data.data,\n amountWithdrawFlag: true\n });\n }\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"].clear();\n });\n },\n rechargeWithdrawOrderIfo: function rechargeWithdrawOrderIfo(_ref15, payload) {\n var commit = _ref15.commit;\n var params = {\n wallet_id: payload.wallet_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].rechargeWithdrawOrderIfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n commit({\n type: 'rechargeWithdrawOrderIfo',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n payTodo: function payTodo(_ref16, payload) {\n var commit = _ref16.commit;\n var params = {\n pay_code: payload.pay_code,\n rescue: payload.rescue,\n types: payload.types,\n site_type: payload.site_type,\n order_id: payload.order_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].payTodo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n if (is_miniProgram()) {\n //微信小程序\n wx.requestPayment(data.data);\n } else {\n window.location.href = data.data;\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n orderInfo: function orderInfo(_ref17, payload) {\n var commit = _ref17.commit;\n var params = {\n order_id: payload.order_id\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].orderInfo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'orderInfo',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n walletPayTodo: function walletPayTodo(_ref18, payload) {\n var commit = _ref18.commit;\n var params = {\n pay_code: payload.pay_code,\n pay_password: payload.pay_password,\n types: payload.types,\n order_id: payload.order_id,\n site_type: payload.site_type\n };\n _api_index__WEBPACK_IMPORTED_MODULE_4__[\"services\"].payTodo(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n setTimeout(function () {\n window.location.href = \"/v3/pay/success?order_id=\" + payload.order_id + \"&types=\" + (payload.types || 0);\n }, 2000);\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_3
__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/wallet/wallet.js?"
);
/***/
}),
/***/
}),
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment