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
ae8d9f9e
authored
May 13, 2019
by
林翔
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
lx
parent
42d6f5df
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
15 deletions
src/api/index.js
src/assets/css/wallet/wallet.css
src/store/modules/wallet/wallet.js
src/views/wallet/Cashier.vue
src/views/wallet/Recharge.vue
view/1.js
view/10.js
view/16.js
view/app.js
src/api/index.js
View file @
ae8d9f9e
...
...
@@ -200,6 +200,12 @@ export const apis = {
* *
*/
payTodo
:
productionUrlApi
+
'pay/todo'
,
/**
* *
* 查看订单信息api
* *
*/
orderInfo
:
productionUrlApi
+
'order/info'
,
}
export
const
services
=
{
...
...
@@ -309,4 +315,7 @@ export const services = {
payTodo
(
params
)
{
return
axios
.
post
(
apis
.
payTodo
,
params
)
},
orderInfo
(
params
)
{
return
axios
.
post
(
apis
.
orderInfo
,
params
)
},
}
src/assets/css/wallet/wallet.css
View file @
ae8d9f9e
...
...
@@ -1204,6 +1204,13 @@
color
:
#333333
;
}
.cashier-content
.form-wrap
.inp-wrap
.f-r
{
float
:
right
;
font-size
:
22px
;
margin-right
:
0.55rem
;
margin-top
:
0.55rem
;
}
.cashier-content
.pay
{
width
:
9.2rem
;
height
:
1.33rem
;
...
...
src/store/modules/wallet/wallet.js
View file @
ae8d9f9e
...
...
@@ -34,7 +34,9 @@ const state = {
//提现单ID
amountWithdrawID
:
''
,
//充值提现单据详细
rechargeWithdrawOrderDetail
:
[]
rechargeWithdrawOrderDetail
:
[],
//订单信息
orderInfoData
:
[]
}
const
mutations
=
{
...
...
@@ -82,7 +84,10 @@ const mutations = {
},
payTodo
(
state
,
payload
)
{
state
.
rechargeWithdrawOrderDetail
=
payload
.
data
}
},
orderInfo
(
state
,
payload
)
{
state
.
orderInfoData
=
payload
.
data
},
}
const
actions
=
{
...
...
@@ -576,7 +581,54 @@ const actions = {
}).
catch
(
function
(
err
)
{
});
},
orderInfo
({
commit
},
payload
)
{
var
params
=
{
order_id
:
payload
.
order_id
}
Services
.
orderInfo
(
qs
.
stringify
(
params
)).
then
((
res
)
=>
{
let
data
=
res
.
data
;
if
(
data
.
err_code
==
0
)
{
commit
({
type
:
'orderInfo'
,
data
:
data
.
data
});
}
else
{
Toast
({
message
:
data
.
err_msg
,
duration
:
3000
});
}
}).
catch
(
function
(
err
)
{
});
},
walletPayTodo
({
commit
},
payload
)
{
var
params
=
{
pay_code
:
payload
.
pay_code
,
pay_password
:
payload
.
pay_password
,
types
:
payload
.
types
,
order_id
:
payload
.
order_id
,
site_type
:
payload
.
site_type
}
Services
.
payTodo
(
qs
.
stringify
(
params
)).
then
((
res
)
=>
{
let
data
=
res
.
data
;
if
(
data
.
err_code
==
0
)
{
setTimeout
(
function
()
{
window
.
location
.
href
=
"/v3/pay/success?order_id="
+
payload
.
order_id
+
"&types="
+
(
payload
.
types
||
0
);
},
2000
)
}
else
{
Toast
({
message
:
data
.
err_msg
,
duration
:
3000
});
}
}).
catch
(
function
(
err
)
{
});
},
}
const
getters
=
{}
...
...
src/views/wallet/Cashier.vue
View file @
ae8d9f9e
...
...
@@ -3,18 +3,25 @@
<Header
:title=
"title"
:meaushow=
'meaushow'
></Header>
<div
class=
"cashier-content"
>
<div
class=
"cashier-detail"
>
<p
class=
"order-num"
>
订单编号:
{{
order
Num
}}
</p>
<p
class=
"order-money"
>
¥
{{
orderMoney
}}
</p>
<p
class=
"order-num"
>
订单编号:
{{
order
InfoData
.
order_sn
}}
</p>
<p
class=
"order-money"
>
{{
orderInfoData
.
order_amount_format
}}
</p>
</div>
<ul
class=
"form-wrap"
>
<li
class=
"inp-wrap"
>
<label
class=
"lineBlock va-m"
>
交易密码
</label>
<input
type=
"text"
placeholder=
"请输入交易密码"
class=
"va-m inp"
/>
<template
v-if=
"showPassword"
>
<input
type=
"password"
placeholder=
"请输入交易密码"
class=
"va-m inp password"
v-model=
"password"
/>
</
template
>
<
template
v-else
>
<input
type=
"text"
placeholder=
"请输入交易密码"
class=
"va-m inp password"
v-model=
"password"
/>
</
template
>
<van-icon
v-if=
"showPassword"
name=
"closed-eye"
class=
"va-m f-r"
@
click=
"changeShow"
/>
<van-icon
v-else
name=
"eye-o"
class=
"va-m f-r"
@
click=
"changeShow"
/>
</li>
</ul>
<p
class=
"forget-password"
><a
href=
"javascript:;"
>
忘记密码?
</a></p>
<p
class=
"forget-password"
><a
href=
"javascript:;"
@
click=
"forget"
>
忘记密码?
</a></p>
<a
href=
"javascript:;"
class=
"pay"
@
click=
"pay
()
"
>
立即支付
</a>
<a
href=
"javascript:;"
class=
"pay"
@
click=
"pay"
>
立即支付
</a>
</div>
</section>
</template>
...
...
@@ -23,6 +30,9 @@
import
Vue
from
'vue'
;
import
{
mapState
}
from
'vuex'
import
Header
from
'@/views/common/Header.vue'
;
import
{
Icon
}
from
'vant'
;
Vue
.
use
(
Icon
);
export
default
{
name
:
'WalletCashier'
,
...
...
@@ -30,23 +40,42 @@
return
{
title
:
"猎芯网收银台"
,
meaushow
:
true
,
orderNum
:
12019040186325
,
orderMoney
:
523.16
showPassword
:
true
,
//是否显示密码
password
:
''
,
}
},
computed
:
{
...
mapState
({
orderInfoData
:
state
=>
state
.
wallet
.
orderInfoData
})
},
watch
:
{
},
created
()
{
this
.
$store
.
dispatch
({
type
:
'orderInfo'
,
order_id
:
this
.
$route
.
query
.
order_id
||
''
});
},
methods
:
{
changeShow
()
{
this
.
showPassword
=
!
this
.
showPassword
;
},
forget
()
{
this
.
$router
.
push
({
path
:
'/wallet/retrieve'
});
},
pay
()
{
this
.
$store
.
dispatch
({
type
:
'walletPayTodo'
,
pay_code
:
'wallet'
,
pay_password
:
this
.
password
,
//支付密码 pay_code=wallet时传入
rescue
:
1
,
types
:
0
,
site_type
:
2
,
order_id
:
this
.
$route
.
query
.
order_id
||
''
});
},
},
components
:
{
Header
...
...
src/views/wallet/Recharge.vue
View file @
ae8d9f9e
...
...
@@ -65,8 +65,8 @@
this
.
$store
.
dispatch
({
type
:
'payTodo'
,
pay_code
:
'wxpay'
,
rescue
:
'1'
,
types
:
'1'
,
rescue
:
1
,
types
:
1
,
site_type
:
2
,
order_id
:
value
});
...
...
view/1.js
View file @
ae8d9f9e
This diff is collapsed.
Click to expand it.
view/10.js
View file @
ae8d9f9e
...
...
@@ -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/* 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\nconsole.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: 'WalletRecharge',\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(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 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 //支付宝支付\n window.location.href = _api_index__WEBPACK_IMPORTED_MODULE_5__[\"productionUrlApi\"] + \"pay/todo?pay_code=alipay&rescue=1&types=1&site_type=2&order_id=\" + value;\n } else if (this.radio == 3) {\n //中国银联\n window.location.href = _api_index__WEBPACK_IMPORTED_MODULE_5__[\"productionUrlApi\"] + \"pay/todo?pay_code=unionpay&rescue=1&types=1&pay_mode=2&order_id=\" + value;\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@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/* 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\nconsole.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: 'WalletRecharge',\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(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 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 //支付宝支付\n window.location.href = _api_index__WEBPACK_IMPORTED_MODULE_5__[\"productionUrlApi\"] + \"pay/todo?pay_code=alipay&rescue=1&types=1&site_type=2&order_id=\" + value;\n } else if (this.radio == 3) {\n //中国银联\n window.location.href = _api_index__WEBPACK_IMPORTED_MODULE_5__[\"productionUrlApi\"] + \"pay/todo?pay_code=unionpay&rescue=1&types=1&pay_mode=2&order_id=\" + value;\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@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/16.js
View file @
ae8d9f9e
This diff is collapsed.
Click to expand it.
view/app.js
View file @
ae8d9f9e
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