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
4a0f01d4
authored
May 14, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
8ad6582b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
108 deletions
src/App.vue
src/assets/css/wallet/wallet.css
src/store/modules/wallet/wallet.js
src/views/wallet/Recharge.vue
src/views/wallet/Verify.vue
view/1.js
view/13.js
view/15.js
view/app.js
src/App.vue
View file @
4a0f01d4
<
template
>
<div
id=
"app"
>
<keep-alive
exclude=
"newsDetail,wallet,walletRetrieve,walletDetail,walletRecord,walletStatus,walletWithdraw"
>
<keep-alive
exclude=
"newsDetail,wallet,walletRetrieve,walletDetail,walletRecord,walletStatus,walletWithdraw
,walletRecharge
"
>
<router-view
class=
"router-view"
></router-view>
</keep-alive>
</div>
...
...
src/assets/css/wallet/wallet.css
View file @
4a0f01d4
...
...
@@ -1317,6 +1317,13 @@
border-top
:
0.133rem
solid
rgba
(
0
,
0
,
0
,
0.4
);
}
.verify-content
.form-error
{
font-size
:
12px
;
line-height
:
20px
;
color
:
#e00106
;
padding
:
0.1rem
0.3rem
;
}
@-webkit-keyframes
fadeInUp
{
0
%
{
...
...
src/store/modules/wallet/wallet.js
View file @
4a0f01d4
...
...
@@ -380,6 +380,10 @@ const actions = {
Services
.
verifySafeMobile
(
qs
.
stringify
(
params
)).
then
((
res
)
=>
{
let
data
=
res
.
data
;
Toast
.
loading
({
message
:
'处理中...'
});
if
(
data
.
err_code
==
0
)
{
Toast
({
message
:
data
.
err_msg
,
...
...
@@ -389,7 +393,7 @@ const actions = {
type
:
'verifySafeMobile'
,
data
:
data
.
data
});
setTimeout
(
function
()
{
setTimeout
(
()
=>
{
window
.
location
.
href
=
"/h5/view/#/wallet/bind"
;
},
2000
)
}
else
if
(
data
.
err_code
==
11030
)
{
...
...
@@ -403,11 +407,11 @@ const actions = {
}
else
{
Toast
({
message
:
data
.
err_msg
,
duration
:
200
duration
:
200
0
});
}
}).
catch
(
function
(
err
)
{
Toast
.
clear
();
});
},
getBindBankmsg
({
commit
},
payload
)
{
...
...
src/views/wallet/Recharge.vue
View file @
4a0f01d4
...
...
@@ -39,12 +39,11 @@
import
{
RadioGroup
,
Radio
,
Cell
,
CellGroup
}
from
'vant'
;
import
{
productionUrlApi
}
from
'../../api/index'
console
.
log
(
productionUrlApi
)
Vue
.
use
(
RadioGroup
).
use
(
Radio
).
use
(
Cell
).
use
(
CellGroup
);
export
default
{
name
:
'
W
alletRecharge'
,
name
:
'
w
alletRecharge'
,
data
()
{
return
{
title
:
"钱包充值"
,
...
...
src/views/wallet/Verify.vue
View file @
4a0f01d4
...
...
@@ -33,117 +33,138 @@
</template>
<
script
>
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
Header
from
'@/views/common/Header.vue'
;
import
{
Icon
}
from
'vant'
;
import
{
productionUrlPc
}
from
'../../api/index'
;
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
Header
from
'@/views/common/Header.vue'
;
import
{
Icon
,
Toast
}
from
'vant'
;
import
{
productionUrlPc
}
from
'../../api/index'
;
Vue
.
use
(
Icon
);
Vue
.
use
(
Icon
);
export
default
{
name
:
'WalletVerify'
,
data
()
{
return
{
title
:
"验证身份"
,
meaushow
:
true
,
showPassword
:
true
,
//是否显示密码
yzmSend
:
true
,
//验证码发送
countDown
:
60
,
countDownText
:
'发送验证码'
,
form
:
{
verifyCode
:
''
,
imgCode
:
''
,
password
:
''
,
},
formError
:
false
,
formMsg
:
''
,
imgCodeVal
:
productionUrlPc
+
"public/verify"
,
}
export
default
{
name
:
'WalletVerify'
,
data
()
{
return
{
title
:
"验证身份"
,
meaushow
:
true
,
showPassword
:
true
,
//是否显示密码
yzmSend
:
true
,
//验证码发送
countDown
:
60
,
countDownText
:
'发送验证码'
,
form
:
{
verifyCode
:
''
,
imgCode
:
''
,
password
:
''
,
},
computed
:
{
...
mapState
({
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
,
verifyShowImgCode
:
state
=>
state
.
wallet
.
verifyShowImgCode
,
verifyCountDownFlag
:
state
=>
state
.
wallet
.
verifyCountDownFlag
,
})
},
watch
:
{
verifyCountDownFlag
(
value
)
{
if
(
value
){
this
.
yzmSend
=
false
;
this
.
timeNum
();
}
else
{
this
.
yzmSend
=
true
;
}
}
},
created
()
{
this
.
$store
.
dispatch
({
type
:
'getWalletInfo'
})
},
methods
:
{
changeShow
()
{
this
.
showPassword
=
!
this
.
showPassword
;
},
timeNum
()
{
var
me
=
this
;
var
clock
=
setInterval
(
doLoop
,
1000
);
formError
:
false
,
formMsg
:
''
,
imgCodeVal
:
productionUrlPc
+
"public/verify"
,
}
},
computed
:
{
...
mapState
({
walletInfoData
:
state
=>
state
.
wallet
.
walletInfoData
,
verifyShowImgCode
:
state
=>
state
.
wallet
.
verifyShowImgCode
,
verifyCountDownFlag
:
state
=>
state
.
wallet
.
verifyCountDownFlag
,
})
},
watch
:
{
verifyCountDownFlag
(
value
)
{
if
(
value
)
{
this
.
yzmSend
=
false
;
this
.
timeNum
();
}
else
{
this
.
yzmSend
=
true
;
}
}
},
created
()
{
this
.
$store
.
dispatch
({
type
:
'getWalletInfo'
})
},
methods
:
{
changeShow
()
{
this
.
showPassword
=
!
this
.
showPassword
;
},
timeNum
()
{
var
me
=
this
;
var
clock
=
setInterval
(
doLoop
,
1000
);
function
doLoop
()
{
me
.
countDown
--
;
if
(
me
.
countDown
<=
0
)
{
clearInterval
(
clock
);
me
.
countDown
=
60
;
me
.
countDownText
=
"再次发送"
;
me
.
yzmSend
=
true
;
}
}
},
//获取图片验证码
changeImgCode
()
{
this
.
imgCodeVal
=
productionUrlPc
+
"public/verify?"
+
new
Date
().
getTime
()
},
getCode
()
{
this
.
$store
.
dispatch
({
//actions分发
type
:
'sendSafesms'
,
imgCode
:
this
.
form
.
imgCode
})
},
next
()
{
//下一步
var
password_reg
=
new
RegExp
(
/^
[
a-zA-Z0-9
]{6,20}
$/
);
//^表示开始 $表示结束 8~20位字母和数字组合
if
(
!
this
.
form
.
password
)
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,请输入原支付密码'
;
return
;
}
function
doLoop
()
{
me
.
countDown
--
;
if
(
me
.
countDown
<=
0
)
{
clearInterval
(
clock
);
me
.
countDown
=
60
;
me
.
countDownText
=
"再次发送"
;
me
.
yzmSend
=
true
;
}
}
},
//获取图片验证码
changeImgCode
()
{
this
.
imgCodeVal
=
productionUrlPc
+
"public/verify?"
+
new
Date
().
getTime
()
},
getCode
()
{
//下一步
var
password_reg
=
new
RegExp
(
/^
[
a-zA-Z0-9
]{6,20}
$/
);
//^表示开始 $表示结束 8~20位字母和数字组合
if
(
!
this
.
form
.
password
)
{
Toast
({
message
:
'亲,请输入原支付密码'
,
duration
:
2000
});
return
;
}
if
(
!
password_reg
.
test
(
this
.
form
.
password
))
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,密码由8~20位字母、数字组合'
;
return
;
}
if
(
!
password_reg
.
test
(
this
.
form
.
password
))
{
Toast
({
message
:
'亲,密码由6~20位字母、数字组合'
,
duration
:
2000
});
return
;
}
if
(
!
this
.
form
.
verifyCode
)
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,请输入验证码'
;
return
;
}
this
.
formError
=
false
;
this
.
$store
.
dispatch
({
//actions分发
type
:
'sendSafesms'
,
imgCode
:
this
.
form
.
imgCode
})
},
next
()
{
//下一步
var
password_reg
=
new
RegExp
(
/^
[
a-zA-Z0-9
]{6,20}
$/
);
//^表示开始 $表示结束 8~20位字母和数字组合
if
(
!
this
.
form
.
password
)
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,请输入原支付密码'
;
return
;
}
this
.
$store
.
dispatch
({
type
:
'verifySafeMobile'
,
verify_code
:
this
.
form
.
verifyCode
,
pay_password
:
this
.
form
.
password
})
}
},
components
:
{
Header
if
(
!
password_reg
.
test
(
this
.
form
.
password
))
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,密码由6~20位字母、数字组合'
;
return
;
}
if
(
!
this
.
form
.
verifyCode
)
{
this
.
formError
=
true
;
this
.
formMsg
=
'亲,请输入验证码'
;
return
;
}
this
.
formError
=
false
;
this
.
$store
.
dispatch
({
type
:
'verifySafeMobile'
,
verify_code
:
this
.
form
.
verifyCode
,
pay_password
:
this
.
form
.
password
})
}
},
components
:
{
Header
}
}
</
script
>
<
style
scoped
>
...
...
view/1.js
View file @
4a0f01d4
This diff is collapsed.
Click to expand it.
view/13.js
View file @
4a0f01d4
...
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var E_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.5.22@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.5.7@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../api/index */ \"./src/api/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
console.log(_api_index__WEBPACK_IMPORTED_MODULE_5__[\"productionUrlApi\"]);\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"RadioGroup\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Radio\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Cell\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"CellGroup\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'W
alletRecharge',\n data: function data() {\n return {\n title: \"钱包充值\",\n meaushow: true,\n inputNum: this.$route.query.amount || '',\n radio: '1'\n };\n },\n computed: Object(E_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 amountRechargeID: function amountRechargeID(state) {\n return state.wallet.amountRechargeID;\n }\n })),\n watch: {\n amountRechargeID: function amountRechargeID(value) {\n if (value) {\n if (this.radio == 1) {\n //微信支付\n this.$store.dispatch({\n type: 'payTodo',\n pay_code: 'wxpay',\n // rescue: 1,\n types: 1,\n site_type: 2,\n order_id: value\n });\n } // else if (this.radio == 2) { //支付宝支付\n // window.location.href = productionUrlApi + \"pay/todo?pay_code=alipay&rescue=1&types=1&pay_mode=2&site_type=2&order_id=\" + value;\n // } else if (this.radio == 3) { //中国银联\n // window.location.href = productionUrlApi + \"pay/todo?pay_code=unionpay&rescue=1&types=1&site_type=2&order_id=\" + value;\n // }\n\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n recharge: function recharge() {\n //充值\n if (this.inputNum !== '') {\n console.log(this.radio); //充值申请\n\n this.$store.dispatch({\n type: 'walletRecharge',\n amount: this.inputNum\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/Recharge.vue?./node_modules/_cache-loader@1.2.5@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@1.2.5@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.2@vue-loader/lib??vue-loader-options"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var E_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.5.22@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.5.7@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../api/index */ \"./src/api/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
vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_4__[\"RadioGroup\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Radio\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"Cell\"]).use(vant__WEBPACK_IMPORTED_MODULE_4__[\"CellGroup\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'w
alletRecharge',\n data: function data() {\n return {\n title: \"钱包充值\",\n meaushow: true,\n inputNum: this.$route.query.amount || '',\n radio: '1'\n };\n },\n computed: Object(E_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 amountRechargeID: function amountRechargeID(state) {\n return state.wallet.amountRechargeID;\n }\n })),\n watch: {\n amountRechargeID: function amountRechargeID(value) {\n if (value) {\n if (this.radio == 1) {\n //微信支付\n this.$store.dispatch({\n type: 'payTodo',\n pay_code: 'wxpay',\n // rescue: 1,\n types: 1,\n site_type: 2,\n order_id: value\n });\n } // else if (this.radio == 2) { //支付宝支付\n // window.location.href = productionUrlApi + \"pay/todo?pay_code=alipay&rescue=1&types=1&pay_mode=2&site_type=2&order_id=\" + value;\n // } else if (this.radio == 3) { //中国银联\n // window.location.href = productionUrlApi + \"pay/todo?pay_code=unionpay&rescue=1&types=1&site_type=2&order_id=\" + value;\n // }\n\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: 'getWalletInfo'\n });\n },\n methods: {\n recharge: function recharge() {\n //充值\n if (this.inputNum !== '') {\n console.log(this.radio); //充值申请\n\n this.$store.dispatch({\n type: 'walletRecharge',\n amount: this.inputNum\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/Recharge.vue?./node_modules/_cache-loader@1.2.5@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@1.2.5@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.6.2@vue-loader/lib??vue-loader-options"
);
/***/
}),
...
...
view/15.js
View file @
4a0f01d4
This diff is collapsed.
Click to expand it.
view/app.js
View file @
4a0f01d4
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