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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
12 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 = {
//充值提现单据详细
rechargeWithdrawOrderDetail
:
[],
//订单信息
orderInfoData
:
[]
orderInfoData
:
[],
//默认提现可点击(防多次点击)
amountWithdrawFlag
:
true
}
const
mutations
=
{
...
...
@@ -77,7 +79,9 @@ const mutations = {
state
.
amountRechargeID
=
payload
.
data
},
walletWithdraw
(
state
,
payload
)
{
state
.
amountWithdrawID
=
payload
.
data
debugger
state
.
amountWithdrawID
=
payload
.
data
,
state
.
amountWithdrawFlag
=
payload
.
amountWithdrawFlag
},
rechargeWithdrawOrderIfo
(
state
,
payload
)
{
state
.
rechargeWithdrawOrderDetail
=
payload
.
data
...
...
@@ -512,7 +516,8 @@ const actions = {
});
commit
({
type
:
'walletWithdraw'
,
data
:
data
.
data
data
:
data
.
data
,
amountWithdrawFlag
:
false
});
setTimeout
(
function
()
{
window
.
location
.
href
=
"/h5/view/#/wallet/record"
;
...
...
@@ -522,6 +527,11 @@ const actions = {
message
:
data
.
err_msg
,
duration
:
3000
});
commit
({
type
:
'walletWithdraw'
,
data
:
data
.
data
,
amountWithdrawFlag
:
true
});
}
}).
catch
(
function
(
err
)
{
Toast
.
clear
();
...
...
src/views/wallet/Index.vue
View file @
185396f9
...
...
@@ -42,9 +42,9 @@
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
Header
from
'@/views/common/Header.vue'
;
import
{
Popup
}
from
'vant'
;
import
{
Dialog
}
from
'vant'
;
Vue
.
use
(
Popup
);
Vue
.
use
(
Dialog
);
export
default
{
name
:
'wallet'
,
...
...
@@ -74,9 +74,18 @@
},
methods
:
{
withdraw
()
{
if
(
this
.
walletInfoData
.
wallet_status
==
1
)
{
if
(
this
.
walletInfoData
.
wallet_status
==
1
&&
!
(
this
.
walletInfoData
.
bank_account
===
null
)
)
{
//钱包状态:1启用,-1未启用,-2锁定
this
.
$router
.
push
({
path
:
'/wallet/withdraw'
});
}
else
{
Dialog
.
confirm
({
title
:
'提醒'
,
message
:
'请先去绑卡'
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/wallet/bind'
});
}).
catch
(()
=>
{
// on cancel
});
}
},
activate
()
{
...
...
src/views/wallet/Withdraw.vue
View file @
185396f9
...
...
@@ -50,17 +50,19 @@
showPassword
:
true
,
//是否显示密码
amountNum
:
true
,
password
:
''
,
withdrawNum
:
''
withdrawNum
:
''
,
clickFlag
:
true
}
},
computed
:
{
...
mapState
({
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
,
amountWithdrawFlag
:
state
=>
state
.
wallet
.
amountWithdrawFlag
})
},
watch
:
{
withdrawNum
:
function
(
val
){
if
(
val
>
this
.
walletInfoData
.
wallet_usable
)
{
if
(
val
>
this
.
walletInfoData
.
wallet_usable
)
{
this
.
amountNum
=
!
this
.
amountNum
;
}
else
{
this
.
amountNum
=
true
;
...
...
@@ -80,8 +82,9 @@
this
.
withdrawNum
=
this
.
walletInfoData
.
wallet_usable
;
},
submit
()
{
if
(
this
.
withdrawNum
!==
''
){
if
(
this
.
withdrawNum
!==
''
&&
this
.
clickFlag
){
if
(
this
.
password
){
this
.
clickFlag
=
false
;
//提现申请
this
.
$store
.
dispatch
({
type
:
'walletWithdraw'
,
...
...
view/21.js
View file @
185396f9
...
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"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 @@
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"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
This diff is collapsed.
Click to expand it.
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