Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李智书
xzf_uniapp-wechat-web
Commits
f07190b8
Commit
f07190b8
authored
Mar 24, 2022
by
李智书
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
22581a45
9b20edec
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
6394 additions
and
4942 deletions
+6394
-4942
src/common/js/http.js
src/common/js/http.js
+52
-82
src/main.js
src/main.js
+46
-0
src/manifest.json
src/manifest.json
+116
-119
src/pages.json
src/pages.json
+53
-33
src/pages/BankModule/Recharge/Recharge.vue
src/pages/BankModule/Recharge/Recharge.vue
+1818
-1707
src/pages/BankModule/Reflect/Reflect.vue
src/pages/BankModule/Reflect/Reflect.vue
+5
-0
src/pages/ConsumptionReport/ConsumptionReport.vue
src/pages/ConsumptionReport/ConsumptionReport.vue
+1
-1
src/pages/IcbcModule/Recharge/Recharge.vue
src/pages/IcbcModule/Recharge/Recharge.vue
+1534
-1467
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
+815
-0
src/pages/StudentPayment/PayProject/PayProject.vue
src/pages/StudentPayment/PayProject/PayProject.vue
+339
-0
src/pages/StudentPayment/StudentPayment.vue
src/pages/StudentPayment/StudentPayment.vue
+23
-0
src/pages/assignDeposit/assignDeposit.vue
src/pages/assignDeposit/assignDeposit.vue
+1592
-1533
No files found.
src/common/js/http.js
View file @
f07190b8
const
baseUrl
=
'
https://szcf.superbest.wang/API
'
//稳定版本环境
let
baseUrl
=
window
.
location
.
origin
//稳定版本环境
let
UrlReg
=
/^http:
\/\/
.*/i
let
UrlReg2
=
/^https:
\/\/
.*/i
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
console
.
log
(
'
开发环境
'
);
// baseUrl = 'https://dev-az-order-api.xiaopay.net/insure-order';
}
else
{
// baseUrl = 'https://dev-az-order-api.xiaopay.net/insure-orders';
}
function
uploadFile
(
params
)
{
var
_this
=
this
,
...
...
@@ -52,7 +57,8 @@ function downloadFile(params) {
function
request
(
params
,
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
url
:
(
UrlReg
.
test
(
params
.
url
)
||
UrlReg2
.
test
(
params
.
url
))
?
params
.
url
:
baseUrl
+
params
.
url
,
url
:
(
UrlReg
.
test
(
params
.
url
)
||
UrlReg2
.
test
(
params
.
url
))
?
params
.
url
:
baseUrl
+
params
.
url
,
method
:
params
.
method
,
dataType
:
params
.
dataType
,
data
,
...
...
@@ -63,7 +69,9 @@ function request(params, data) {
resolve
(
res
)
},
fail
:
function
(
fail
)
{
reject
(
fail
)
reject
({
message
:
fail
.
errMsg
})
}
});
})
...
...
@@ -81,25 +89,31 @@ function request(params, data) {
function
postRequest
(
params
,
data
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
showLoading
({
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
,
mask
:
true
});
try
{
//登录错误提示
let
duration
;
if
(
params
.
url
==
'
/user/login/pwd
'
)
{
if
(
params
.
url
==
'
/user/login/pwd
'
)
{
duration
=
20000
}
else
{
}
else
{
duration
=
3000
}
//token
let
token
=
uni
.
getStorageSync
(
"
token
"
)
//用户id
let
userId
=
uni
.
getStorageSync
(
"
userId
"
)
data
.
userId
=
data
.
userId
||
userId
;
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
);
params
.
header
=
{
"
token
"
:
token
||
""
// seesionID: personalInfo.seesionID || '',
// sessionid: personalInfo.seesionID || '',
// token: personalInfo.seesionID || '',
// wechattype: 1
};
data
=
Object
.
assign
({
seesionID
:
personalInfo
.
seesionID
||
''
,
sessionid
:
personalInfo
.
seesionID
||
''
,
token
:
personalInfo
.
seesionID
||
''
,
wechattype
:
1
},
data
)
params
.
method
=
"
POST
"
;
params
.
dataType
=
"
JSON
"
if
(
!
params
.
url
)
{
...
...
@@ -118,38 +132,11 @@ function postRequest(params, data = {}) {
reslt
.
data
=
reslt
.
data
//TODO handle the exception
}
if
(
reslt
.
data
.
code
!=
200
)
{
//token失效或者错误 ----401
//账号已在其他地方登录! -----1006
if
(
reslt
.
data
.
code
==
401
||
reslt
.
data
.
code
==
1006
)
{
uni
.
showToast
({
icon
:
"
none
"
,
title
:
reslt
.
data
.
message
,
duration
})
uni
.
hideLoading
();
//401跳转登录
uni
.
redirectTo
({
// url: "/pages/notecheck/notecheck?phone=13428967050",
// url: "/pages/notecheck/notecheck",
url
:
"
/pages/login/login
"
})
reject
(
reslt
.
data
.
message
)
}
uni
.
showToast
({
icon
:
"
none
"
,
title
:
reslt
.
data
.
message
,
duration
})
uni
.
hideLoading
();
reject
(
reslt
.
data
.
message
)
}
console
.
log
(
reslt
);
uni
.
hideLoading
();
resolve
(
reslt
.
data
)
}).
catch
(
e
=>
{
reject
(
e
.
message
)
uni
.
hideLoading
();
reject
(
e
)
})
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -171,24 +158,31 @@ function postRequest(params, data = {}) {
function
getRequest
(
params
,
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
showLoading
({
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
,
mask
:
true
});
try
{
//token
let
token
=
uni
.
getStorageSync
(
"
token
"
)
//用户id
let
userId
=
uni
.
getStorageSync
(
"
userId
"
)
data
.
userId
=
data
.
userId
||
userId
;
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
);
params
.
header
=
{
"
token
"
:
token
||
""
// seesionID: personalInfo.seesionID || '',
// sessionid: personalInfo.seesionID || '',
// token: personalInfo.seesionID || '',
// wechattype: 1
};
data
=
Object
.
assign
({
seesionID
:
personalInfo
.
seesionID
||
''
,
sessionid
:
personalInfo
.
seesionID
||
''
,
token
:
personalInfo
.
seesionID
||
''
,
wechattype
:
1
},
data
)
params
.
method
=
"
GET
"
;
params
.
dataType
=
"
JSON
"
if
(
!
params
.
url
)
{
uni
.
showToast
({
icon
:
"
none
"
,
title
:
"
url不能为空
"
,
duration
:
3000
duration
:
3000
})
uni
.
hideLoading
();
reject
(
"
url不能为空
"
)
...
...
@@ -200,35 +194,10 @@ function getRequest(params, data) {
reslt
.
data
=
reslt
.
data
//TODO handle the exception
}
if
(
reslt
.
data
.
code
!=
200
)
{
//token失效或者错误
if
(
reslt
.
data
.
code
==
401
)
{
uni
.
showToast
({
icon
:
"
none
"
,
title
:
reslt
.
data
.
message
,
duration
:
3000
})
uni
.
hideLoading
();
//401跳转登录
uni
.
redirectTo
({
// url: "/pages/notecheck/notecheck?phone=13428967050",
// url: "/pages/notecheck/notecheck",
url
:
"
/pages/login/login
"
})
reject
(
reslt
.
data
.
message
)
}
uni
.
showToast
({
icon
:
"
none
"
,
title
:
reslt
.
data
.
message
,
duration
:
3000
})
uni
.
hideLoading
();
reject
(
reslt
.
data
.
message
)
}
console
.
log
(
reslt
);
uni
.
hideLoading
();
resolve
(
reslt
.
data
)
}).
catch
(
e
=>
{
uni
.
hideLoading
();
reject
(
e
.
message
)
})
}
catch
(
e
)
{
...
...
@@ -252,7 +221,8 @@ function getRequest(params, data) {
async
function
Login
(
params
,
data
)
{
try
{
await
uni
.
showLoading
({
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
title
:
params
.
Ltitle
?
params
.
Ltitle
:
"
加载中...
"
,
mask
:
true
});
params
.
method
=
"
POST
"
;
params
.
dataType
=
"
JSON
"
...
...
@@ -260,7 +230,7 @@ async function Login(params, data) {
await
uni
.
showToast
({
icon
:
"
none
"
,
title
:
"
url不能为空
"
,
duration
:
3000
duration
:
3000
})
await
uni
.
hideLoading
();
throw
Error
(
"
url不能为空
"
)
...
...
@@ -278,16 +248,16 @@ async function Login(params, data) {
await
uni
.
showToast
({
icon
:
"
none
"
,
title
:
JSON
.
stringify
(
err
),
duration
:
3000
duration
:
3000
})
await
uni
.
hideLoading
();
throw
Error
(
JSON
.
stringify
(
err
))
}
if
(
reslt
.
data
.
code
!=
2
00
)
{
if
(
reslt
.
data
.
code
!=
10
00
)
{
await
uni
.
showToast
({
icon
:
"
none
"
,
title
:
reslt
.
data
.
message
,
duration
:
3000
duration
:
3000
})
await
uni
.
hideLoading
();
throw
Error
(
reslt
.
data
.
message
)
...
...
@@ -310,7 +280,7 @@ async function Login(params, data) {
await
uni
.
showToast
({
icon
:
"
none
"
,
title
:
JSON
.
stringify
(
LoginErr
),
duration
:
3000
duration
:
3000
})
await
uni
.
hideLoading
();
throw
Error
(
JSON
.
stringify
(
LoginErr
))
...
...
@@ -319,7 +289,7 @@ async function Login(params, data) {
await
uni
.
showToast
({
icon
:
"
none
"
,
title
:
LoginInfo
.
data
.
message
,
duration
:
3000
duration
:
3000
})
await
uni
.
hideLoading
();
throw
Error
(
LoginInfo
.
data
.
message
)
...
...
src/main.js
View file @
f07190b8
...
...
@@ -24,6 +24,52 @@ Vue.prototype.$ImgUrl = 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static
import
Vant
from
'
vant
'
;
Vue
.
use
(
Vant
);
let
ua
=
navigator
.
userAgent
.
toLocaleString
();
if
(
ua
.
match
(
"
/MicroMessenger/i
"
)
==
"
micromessenger
"
)
{
console
.
log
(
"
微信浏览器环境
"
);
Vue
.
prototype
.
env
=
"
wx
"
}
else
{
console
.
log
(
"
普通览器环境
"
);
Vue
.
prototype
.
env
=
"
h5
"
}
// JSSDK授权
async
function
JssdkAuth
()
{
try
{
let
[
err
,
res
]
=
await
uni
.
request
({
url
:
"
https://pay.xiaopay.net/mp_wechat/svmpwechat/GetWechatJSSDKConfig
"
,
method
:
"
POST
"
,
data
:
{
"
mp_session_id
"
:
uni
.
getStorageSync
(
"
personalInfo
"
).
seesionID
,
"
url
"
:
encodeURIComponent
(
window
.
location
.
href
.
split
(
"
#
"
)[
0
]),
}
})
console
.
log
(
err
,
res
);
}
catch
(
e
)
{
//TODO handle the exception
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
}
// WeixinJSBridge内置对象在其他浏览器中无效。
setTimeout
(
function
()
{
if
(
typeof
WeixinJSBridge
==
"
undefined
"
)
{
if
(
document
.
addEventListener
)
{
Vue
.
prototype
.
JSBridge
=
false
}
else
if
(
document
.
attachEvent
)
{
Vue
.
prototype
.
JSBridge
=
false
}
}
else
{
Vue
.
prototype
.
JSBridge
=
true
}
},
1000
)
// echarts图标
var
echarts
=
require
(
'
echarts
'
)
...
...
src/manifest.json
View file @
f07190b8
{
"name"
:
"xzf_uniapp-wechat-web"
,
"appid"
:
"__UNI__6500A3F"
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"name"
:
"xzf_uniapp-wechat-web"
,
"appid"
:
"__UNI__6500A3F"
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
/*
模块配置
*/
"modules"
:
{},
"modules"
:
{},
/*
应用发布信息
*/
"distribute"
:
{
"distribute"
:
{
/*
android打包配置
*/
"android"
:
{
"permissions"
:
[
"android"
:
{
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
...
...
@@ -41,81 +41,78 @@
]
},
/*
ios打包配置
*/
"ios"
:
{},
"ios"
:
{},
/*
SDK配置
*/
"sdkConfigs"
:
{}
"sdkConfigs"
:
{}
},
"uniStatistics"
:
{
"enable"
:
true
"uniStatistics"
:
{
"enable"
:
true
}
},
/*
快应用特有相关
*/
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
}
},
"mp-alipay"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
"mp-alipay"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
}
},
"mp-baidu"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
"mp-baidu"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
}
},
"mp-toutiao"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
"mp-toutiao"
:
{
"usingComponents"
:
true
,
"uniStatistics"
:
{
"enable"
:
true
}
},
"uniStatistics"
:
{
"enable"
:
true
"uniStatistics"
:
{
"enable"
:
true
},
"h5"
:
{
"devServer"
:
{
"port"
:
80
,
"disableHostCheck"
:
true
,
"proxy"
:
{
"/api"
:
{
"target"
:
"https://uat.xiaopay.net"
,
"changeOrigin"
:
true
,
"secure"
:
false
,
"pathRewrite"
:
{
"^/api"
:
"/"
}
"h5"
:
{
"devServer"
:
{
"port"
:
80
,
"disableHostCheck"
:
true
,
"proxy"
:
{
"/"
:
{
"target"
:
"https://dev-az-order-api.xiaopay.net"
,
"changeOrigin"
:
true
,
"secure"
:
false
}
}
},
"router"
:
{
"mode"
:
"hash"
,
"base"
:
"./"
"router"
:
{
"mode"
:
"hash"
,
"base"
:
"./"
},
"title"
:
"电子校园卡"
,
"optimization"
:
{
"treeShaking"
:
{
"enable"
:
false
"title"
:
"电子校园卡"
,
"optimization"
:
{
"treeShaking"
:
{
"enable"
:
false
}
},
"uniStatistics"
:
{
"enable"
:
true
"uniStatistics"
:
{
"enable"
:
true
},
"template"
:
"template.h5.html"
"template"
:
"template.h5.html"
},
"mp-qq"
:
{
"uniStatistics"
:
{
"enable"
:
true
"mp-qq"
:
{
"uniStatistics"
:
{
"enable"
:
true
}
}
}
src/pages.json
View file @
f07190b8
...
...
@@ -292,36 +292,56 @@
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/pdfPreview/pdfPreview"
,
"style"
:
{
},
{
"path"
:
"pages/pdfPreview/pdfPreview"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/OpenAccountAgreementBOC/OpenAccountAgreementBOC"
,
"style"
:
{
},
{
"path"
:
"pages/OpenAccountAgreementBOC/OpenAccountAgreementBOC"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"渤海银行线上个人银行Ⅱ、Ⅲ类账户服务协议"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/UserAgreement/UserAgreement"
,
"style"
:
{
},
{
"path"
:
"pages/UserAgreement/UserAgreement"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费用户协议"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/StudentPayment/StudentPayment"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"日常收费"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/StudentPayment/PayProject/PayProject"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"日常收费"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/StudentPayment/PayOrderDetails/PayOrderDetails"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"交费订单明细"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarBackgroundColor"
:
"#01CB88"
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
...
...
src/pages/BankModule/Recharge/Recharge.vue
View file @
f07190b8
This diff is collapsed.
Click to expand it.
src/pages/BankModule/Reflect/Reflect.vue
View file @
f07190b8
...
...
@@ -463,6 +463,11 @@
},
//input键盘弹起不会弹
ReturnToTop
()
{
// 若最后一位为小数点则去掉
let
str
=
this
.
inputOtherM
+
""
;
if
(
str
.
lastIndexOf
(
'
.
'
)
==
str
.
length
-
1
)
{
this
.
inputOtherM
=
str
.
substring
(
0
,
str
.
length
-
1
)
}
this
.
$nextTick
(
function
()
{
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
})
...
...
src/pages/ConsumptionReport/ConsumptionReport.vue
View file @
f07190b8
...
...
@@ -48,7 +48,7 @@
</view>
<view
class=
"consumption-total-number-trend-item consumption-total-number-trend-percent"
>
{{
weekConsumerAmout
.
rate
+
'
%
'
}}
{{
weekConsumerAmout
.
rate
?
weekConsumerAmout
.
rate
+
'
%
'
:
'
%
'
}}
</view>
</view>
</view>
...
...
src/pages/IcbcModule/Recharge/Recharge.vue
View file @
f07190b8
This diff is collapsed.
Click to expand it.
src/pages/StudentPayment/PayOrderDetails/PayOrderDetails.vue
0 → 100644
View file @
f07190b8
This diff is collapsed.
Click to expand it.
src/pages/StudentPayment/PayProject/PayProject.vue
0 → 100644
View file @
f07190b8
<
template
>
<view
class=
"tainer"
>
<van-tabs
ref=
"tabs"
title-inactive-color=
"#999999"
title-active-color=
"#333333"
sticky
animated
v-model:active=
"active"
swipeable
color=
"#01CB88"
background=
"#FFFFFF"
line-width=
"30px"
line-height=
"4px"
@
change=
"PayProjectTab"
>
<van-tab
:title=
"vanTab[0]"
title-class=
"PayProjectTab PayProjectList"
>
<!-- 收费项目 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"PayProjectList.length>0"
>
<view
class=
"container ProjectList"
v-for=
"(item,index) in PayProjectList"
:key=
"index"
@
tap=
"PayOrderDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
{{
item
.
chargeName
}}
</view>
<view
class=
"money"
>
{{
item
.
amountMust
}}
</view>
</view>
<view
class=
"listitem center"
>
<text
class=
"describe"
>
{{
item
.
descInfo
||
""
}}
</text>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
<van-icon
name=
"clock-o"
/>
<text
class=
"Tips"
>
{{
item
.
diffTime
}}
收费结束
</text>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width: 301rpx;height: 258rpx;"
:src=
"ImgUrl+'StudentPayment/NoRecord.png'"
mode=
'widthFix'
></image>
<view>
暂无收费项目
</view>
</view>
</view>
</van-tab>
<van-tab
:title=
"vanTab[1]"
title-class=
"PayProjectTab PayProjectHistory"
>
<!-- 缴费历史 -->
<view
class=
"ListBox"
>
<view
class=
""
v-if=
"PayProjectHistory.length>0"
>
<view
class=
"container ProjectHistory"
v-for=
"(item,index) in PayProjectHistory"
:key=
"index"
@
tap=
"PayOrderDetails(item)"
>
<view
class=
"listitem top"
>
<view
class=
"title"
>
2022高一春季收费
</view>
<view
class=
"money"
>
100.00
</view>
</view>
<view
class=
"listitem center"
>
<text
class=
"describe"
>
本次收费需要收取高一春季开学相关费用,并根据
备注输入相关信息。
</text>
</view>
<view
class=
"listitem botto"
style=
"align-items: baseline;"
>
<van-icon
name=
"clock-o"
/>
<text
class=
"Tips"
>
5天后收费结束
</text>
</view>
</view>
<view
class=
"bottomtxt"
>
已经到底啦~
</view>
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width: 290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命开发
</view>
<view
class=
"bottomtxt"
>
详情请联系客服
</view>
</view>
</view>
</van-tab>
</van-tabs>
</view>
</
template
>
<
script
>
// 时间处理模块
import
dayjs
from
'
dayjs
'
let
orderApi
=
window
.
location
.
origin
export
default
{
name
:
"
PayProject
"
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
active
:
0
,
vanTab
:
[
'
收费项目
'
,
'
交费历史
'
],
PayProjectList
:
[],
PayProjectHistory
:
[],
pageCurrent
:
1
,
pageSize
:
10
,
total
:
0
,
allData
:
{}
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
"
PayProject
"
,
options
);
if
(
options
.
seesionID
&&
options
.
userID
&&
options
.
schoolId
)
{
uni
.
setStorageSync
(
"
personalInfo
"
,
{
userId
:
options
.
userID
||
''
,
seesionID
:
options
.
seesionID
||
''
,
schoolId
:
options
.
schoolId
||
''
,
openId
:
options
.
openId
})
this
.
allData
=
options
}
else
{
let
personalInfo
=
uni
.
getStorageSync
(
"
personalInfo
"
)
this
.
allData
=
Object
.
assign
(
options
,
personalInfo
)
}
this
.
getPayProject
()
},
onPullDownRefresh
:
function
(
e
)
{
console
.
log
(
"
onPullDownRefresh
"
,
e
);
},
onReachBottom
:
function
(
e
)
{
console
.
log
(
"
onReachBottom
"
,
e
);
this
.
pageCurrent
=
this
.
pageCurrent
+
1
this
.
getPayProject
()
},
methods
:
{
// 切换tab
async
PayProjectTab
(
index
)
{
try
{
if
(
index
>
0
)
{
return
}
this
.
getPayProject
(
index
)
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
// 交费项目信息分页查询
async
getPayProject
(
index
)
{
try
{
let
data
=
await
this
.
$http
.
post
({
url
:
orderApi
+
'
/order-charge/app/charge/project/queryChargeProjectPage
'
},
{
"
pageCurrent
"
:
this
.
pageCurrent
,
"
pageSize
"
:
this
.
pageSize
,
"
schoolId
"
:
this
.
allData
.
schoolId
,
"
userId
"
:
this
.
allData
.
userId
||
this
.
allData
.
userID
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
this
.
PayProjectList
=
[]
return
}
if
(
data
.
data
.
records
&&
Array
.
isArray
(
data
.
data
.
records
))
{
let
tmp
=
data
.
data
.
records
;
let
newArr
=
[]
for
(
let
s
of
tmp
)
{
let
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
hour
'
);
if
(
diffTime
>
24
)
{
diffTime
=
dayjs
(
s
.
endTime
).
diff
(
new
Date
(),
'
day
'
);
s
.
diffTime
=
diffTime
+
'
天后
'
}
else
{
s
.
diffTime
=
(
diffTime
+
1
)
+
'
天后
'
}
s
.
amountMust
=
(
s
.
amountMust
/
100
).
toFixed
(
2
)
newArr
.
push
(
s
)
}
if
(
this
.
pageCurrent
==
1
)
{
this
.
PayProjectList
=
newArr
return
}
if
(
this
.
pageCurrent
>
1
)
{
this
.
PayProjectList
.
push
(...
newArr
)
return
}
}
else
{
this
.
PayProjectList
=
[]
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 收费项目详情
async
PayOrderDetails
(
data
)
{
try
{
console
.
log
(
data
);
uni
.
setStorageSync
(
"
PayOrderDetails
"
,
data
)
uni
.
navigateTo
({
url
:
"
../PayOrderDetails/PayOrderDetails?chargeId=
"
+
data
.
id
||
''
})
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
background
:
#F3F5F6
;
}
.noData
{
text-align
:
center
;
margin-top
:
316rpx
;
image
{
position
:
relative
;
}
}
.ListBox
{
width
:
750rpx
;
min-height
:
100%
;
background
:
#F3F5F6
;
padding-top
:
12rpx
;
padding-bottom
:
100rpx
;
.container
{
width
:
686rpx
;
height
:
250rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
margin-top
:
20rpx
;
}
.container
{
font-family
:
PingFang
SC
;
.top
{
.title
{
width
:
266rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
36rpx
;
padding-left
:
31rpx
;
padding-top
:
30rpx
;
word-break
:
break-all
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.money
{
font-size
:
36rpx
;
font-family
:
DIN
;
font-weight
:
bold
;
color
:
#01CB88
;
line-height
:
36rpx
;
padding-left
:
230rpx
;
padding-top
:
30rpx
;
}
.
money
:
:
before
{
content
:
"¥"
;
font-size
:
32rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#01CB88
;
}
}
.center
{
.describe
{
width
:
614rpx
;
height
:
63rpx
;
font-size
:
28rpx
;
font-weight
:
500
;
color
:
#666666
;
line-height
:
36rpx
;
padding-top
:
38rpx
;
padding-left
:
32rpx
;
overflow-y
:
auto
;
}
}
.botto
{
padding-top
:
30rpx
;
padding-left
:
32rpx
;
font-size
:
24rpx
;
font-weight
:
500
;
color
:
#BABABA
;
.Tips
{
padding-left
:
10rpx
;
}
}
}
.ProjectHistory
{}
.listitem
{
display
:
flex
;
align-items
:
center
;
}
.bottomtxt
{
height
:
21rpx
;
font-size
:
22rpx
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
90rpx
;
text-align
:
center
;
}
}
.van-tabs__content
{
width
:
100%
;
height
:
100%
;
position
:
fixed
;
left
:
0
;
z-index
:
999
;
overflow
:
scroll
}
.van-tabs
{
.PayProjectTab
{
height
:
200rpx
;
}
}
</
style
>
src/pages/StudentPayment/StudentPayment.vue
0 → 100644
View file @
f07190b8
This diff is collapsed.
Click to expand it.
src/pages/assignDeposit/assignDeposit.vue
View file @
f07190b8
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