Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_admin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a00c6bf5
authored
2023-10-09 11:53:29 +0800
by
华明祺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://code.itechtop.cn/yangyang/ztx_wx_admin
2 parents
e51d7a54
4c11fc3e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
274 additions
and
90 deletions
common/api.js
common/match.js
config.js
pages/index/index.vue
pages/index/msgList.vue
pages/personalVip/addVip.vue
common/api.js
View file @
a00c6bf
...
...
@@ -2,13 +2,56 @@ import request from './request.js'
import
config
from
'@/config.js'
import
*
as
loginServer
from
'@/common/login.js'
;
function
get
Venue
(
)
{
function
get
Message
(
params
)
{
return
request
({
url
:
`/systemj/venue/appId`
,
method
:
'get'
url
:
'/common/home/getMessage'
,
method
:
'get'
,
params
:
params
})
}
function
reader
(
query
)
{
return
request
({
url
:
'/common/home/readMessage'
,
method
:
'get'
,
params
:
query
})
}
function
regionsList
(
params
)
{
return
request
({
url
:
'/common/region/regionsList'
,
method
:
'get'
,
params
})
}
// 添加会员自动录入 上传图片
function
carUrl
(
data
,
type
)
{
return
request
({
url
:
`/person/info/getPersonInfoFromCert/
${
type
}
`
,
method
:
'post'
,
params
:
data
})
}
// 图片上传
function
uploadImg
(
e
){
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
uni
.
showLoading
({
title
:
'加载中'
});
return
uni
.
uploadFile
({
url
:
config
.
baseUrl_api
+
'/upload/uploadImg'
,
filePath
:
imgUrl
,
name
:
'image'
}).
then
(
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
);
return
data
}).
finally
(()
=>
{
uni
.
hideLoading
();
});
}
function
getOwnMemberInfo
()
{
// return loginServer.getNowOpenId().then(()=>{
...
...
@@ -221,7 +264,8 @@ function miniappData(params) {
export
{
getVenue
,
getMessage
,
reader
,
regionsList
,
carUrl
,
uploadImg
,
getOwnMemberInfo
,
getSiteList
,
getDateOrderInfo
,
...
...
common/match.js
View file @
a00c6bf
...
...
@@ -93,24 +93,7 @@ function uploadFile(e){
uni
.
hideLoading
();
});
}
// 图片上传
function
uploadImg
(
e
){
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
uni
.
showLoading
({
title
:
'加载中'
});
return
uni
.
uploadFile
({
url
:
config
.
baseUrl_api
+
'/upload/uploadImg'
,
filePath
:
imgUrl
,
name
:
'image'
}).
then
(
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
);
return
data
}).
finally
(()
=>
{
uni
.
hideLoading
();
});
}
// 图片上传
function
uploadImgHasCrop
(
e
){
const
tempFilePaths
=
e
.
tempFilePaths
;
...
...
config.js
View file @
a00c6bf
...
...
@@ -3,8 +3,8 @@
// staging
const
baseUrl_api
=
"http://192.168.1.
96
:8787"
;
const
baseUrl_api
=
"http://192.168.1.
11
:8787"
;
export
default
{
baseUrl_api
};
\ No newline at end of file
}
\ No newline at end of file
...
...
pages/index/index.vue
View file @
a00c6bf
...
...
@@ -9,8 +9,8 @@
</view>
</view>
<
uni-section
padding
>
<uni-grid
:column=
"4"
:show-border=
"false"
:square=
"false"
@
change=
"change"
>
<
view
>
<uni-grid
:column=
"4"
:show-border=
"false"
:square=
"false"
>
<uni-grid-item
v-for=
"(item ,index) in list"
:index=
"index"
:key=
"index"
>
<view
class=
"grid-item-box"
>
<image
class=
"image"
:src=
"item.url"
mode=
"aspectFill"
/>
...
...
@@ -21,16 +21,16 @@
</view>
</uni-grid-item>
</uni-grid>
</
uni-section
>
</
view
>
<uni-section
title=
"待办提醒"
padding
>
<template
v-slot:right
>
<text
@
click=
"goMsgList"
class=
"more"
>
更多>
</text>
</
template
>
<view
class=
"msglist"
>
<view
class=
"msgitem"
v-for=
"n in
4
"
>
<text
class=
"dot"
:class=
"n.
isRead
?'done':''"
></text>
<view
class=
"tt esp"
>
你有一条会员缴费等待审批,点击前去处理!
</view>
<view
class=
"date"
>
2023-09-23
</view>
<view
class=
"msgitem"
v-for=
"n in
messageList"
@
click=
"readMessage(n)
"
>
<text
class=
"dot"
:class=
"n.
readFlag=='1'
?'done':''"
></text>
<view
class=
"tt esp"
>
{{n.name}}
</view>
<view
class=
"date"
>
{{n.createTime}}
</view>
</view>
</view>
</uni-section>
...
...
@@ -68,47 +68,47 @@
let
goPath
;
const
svId
=
ref
(
null
);
const
list
=
ref
([{
url
:
'
/static/c1.png
'
,
url
:
''
,
text
:
'会员调动'
,
badge
:
'0'
,
type
:
"primary"
},
{
url
:
'
/static/c2.png
'
,
url
:
''
,
text
:
'调动审核'
,
badge
:
'1'
,
type
:
"success"
},
{
url
:
'
/static/c3.png
'
,
url
:
''
,
text
:
'级位考试申请'
,
badge
:
'99'
,
type
:
"warning"
},
{
url
:
'
/static/c4.png
'
,
url
:
''
,
text
:
'级位考试审核'
,
badge
:
'2'
,
type
:
"error"
},
{
url
:
'
/static/c5.png
'
,
url
:
''
,
text
:
'段位考试申请'
},
{
url
:
'
/static/c6.png
'
,
url
:
''
,
text
:
'段位考试审核'
},
{
url
:
'
/static/c7.png
'
,
url
:
''
,
text
:
'级位证书发送'
},
{
url
:
'
/static/c8.png
'
,
url
:
''
,
text
:
'段位证书发送'
}
]);
const
messageList
=
ref
([])
onShow
(()
=>
{
if
(
app
.
globalData
.
isLogin
)
{
init
();
...
...
@@ -142,14 +142,14 @@
});
}
function
goAddVip
()
{
let
path
=
'/pages/personalVip/addVip'
;
uni
.
navigateTo
({
url
:
path
});
}
function
goRenew
()
{
let
path
=
'/pages/personalVip/renew'
;
uni
.
navigateTo
({
...
...
@@ -158,7 +158,66 @@
}
function
init
()
{
api
.
getMessage
({
pageNum
:
1
,
pageSize
:
10
}).
then
(
res
=>
{
for
(
var
d
of
res
.
rows
)
{
switch
(
d
.
type
)
{
case
30001
:
d
.
name
=
'你有一条会员缴费等待审批,点击去处理!'
d
.
path
=
'/member/audit'
break
case
30002
:
d
.
name
=
'你有一条级位考试等待审批,点击去处理!'
d
.
path
=
'/level/approval'
break
case
30003
:
d
.
name
=
'你有一条段位考试等待审批,点击去处理!'
d
.
path
=
'/rank/approval'
break
case
30004
:
d
.
name
=
'你有一条会员调动等待审批,点击去处理!'
d
.
path
=
'/member/mobillize'
break
case
30005
:
d
.
name
=
'你有一条团体会员认证等待审批,点击去处理!'
d
.
path
=
'/group/authentication'
break
case
30006
:
d
.
name
=
'你有一条段位成绩等待审批,点击去处理!'
d
.
path
=
'/rank/score/approval'
break
case
40001
:
d
.
name
=
'你有一条级位申请待提交,点击去处理!'
d
.
path
=
'/level/apply/modify/'
+
d
.
eventId
break
case
40002
:
d
.
name
=
'你有一条段位申请待提交,点击去处理!'
d
.
path
=
'/rank/apply/modify/'
+
d
.
eventId
break
case
40003
:
d
.
name
=
'你有一条成绩维护的数据待提交,点击去处理!'
d
.
path
=
'/rank/score/modify/'
+
d
.
eventId
break
case
50001
:
d
.
name
=
'你有一条新的个人会员申请,点击去处理!'
d
.
path
=
'/member/list'
break
}
}
messageList
.
value
=
res
.
rows
})
}
function
readMessage
(
item
)
{
uni
.
navigateTo
({
url
:
item
.
path
});
api
.
reader
({
id
:
item
.
id
}).
then
(
res
=>
{
item
.
readFlag
=
'1'
})
}
function
goMsgList
()
{
...
...
pages/index/msgList.vue
View file @
a00c6bf
...
...
@@ -5,10 +5,10 @@
<!-- 需要固定在页面顶部的view请通过slot="top"插入,包括自定义的导航栏 -->
<uni-section
title=
"待办提醒"
padding
>
<view
class=
"msglist"
>
<view
class=
"msgitem"
v-for=
"n in dataList"
>
<text
class=
"dot"
:class=
"
n.isRead?'done':''
"
></text>
<view
class=
"tt esp"
>
你有一条会员缴费等待审批,点击前去处理!
</view>
<view
class=
"date"
>
2023-09-23
</view>
<view
class=
"msgitem"
v-for=
"n in dataList"
@
click=
"readMessage(n)"
>
<text
class=
"dot"
:class=
"
{'done':n.readFlag=='1'}
">
</text>
<view
class=
"tt esp"
>
{{
n
.
name
}}
</view>
<view
class=
"date"
>
{{
n
.
createTime
}}
</view>
</view>
</view>
</uni-section>
...
...
@@ -19,13 +19,69 @@
<
script
setup
>
import
{
ref
}
from
'vue'
}
from
'vue'
import
*
as
api
from
'@/common/api.js'
;
const
dataList
=
ref
([])
const
paging
=
ref
(
null
)
const
total
=
ref
(
50
)
const
current
=
ref
(
2
)
function
queryList
(
pageNo
,
pageSize
){
paging
.
value
.
complete
([{},{},{},{},{},{},{},{},{}]);
function
queryList
(
pageNum
,
pageSize
){
api
.
getMessage
({
pageNum
,
pageSize
}).
then
(
res
=>
{
for
(
var
d
of
res
.
rows
)
{
switch
(
d
.
type
)
{
case
30001
:
d
.
name
=
'你有一条会员缴费等待审批,点击去处理!'
d
.
path
=
'/member/audit'
break
case
30002
:
d
.
name
=
'你有一条级位考试等待审批,点击去处理!'
d
.
path
=
'/level/approval'
break
case
30003
:
d
.
name
=
'你有一条段位考试等待审批,点击去处理!'
d
.
path
=
'/rank/approval'
break
case
30004
:
d
.
name
=
'你有一条会员调动等待审批,点击去处理!'
d
.
path
=
'/member/mobillize'
break
case
30005
:
d
.
name
=
'你有一条团体会员认证等待审批,点击去处理!'
d
.
path
=
'/group/authentication'
break
case
30006
:
d
.
name
=
'你有一条段位成绩等待审批,点击去处理!'
d
.
path
=
'/rank/score/approval'
break
case
40001
:
d
.
name
=
'你有一条级位申请待提交,点击去处理!'
d
.
path
=
'/level/apply/modify/'
+
d
.
eventId
break
case
40002
:
d
.
name
=
'你有一条段位申请待提交,点击去处理!'
d
.
path
=
'/rank/apply/modify/'
+
d
.
eventId
break
case
40003
:
d
.
name
=
'你有一条成绩维护的数据待提交,点击去处理!'
d
.
path
=
'/rank/score/modify/'
+
d
.
eventId
break
case
50001
:
d
.
name
=
'你有一条新的个人会员申请,点击去处理!'
d
.
path
=
'/member/list'
break
}
}
paging
.
value
.
complete
(
res
.
rows
);
})
}
function
readMessage
(
item
)
{
uni
.
navigateTo
({
url
:
item
.
path
});
api
.
reader
({
id
:
item
.
id
}).
then
(
res
=>
{
item
.
readFlag
=
'1'
})
}
</
script
>
...
...
pages/personalVip/addVip.vue
View file @
a00c6bf
...
...
@@ -8,30 +8,29 @@
<view
class=
"nolineform"
>
<uni-forms-item
label=
"姓名"
required
name=
"
realN
ame"
v-show=
"current === 0"
>
<uni-easyinput
:styles=
"inputstyle"
:placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.
realN
ame"
placeholder=
"请输入姓名"
/>
<uni-forms-item
label=
"姓名"
required
name=
"
n
ame"
v-show=
"current === 0"
>
<uni-easyinput
:styles=
"inputstyle"
:
clearable=
'false'
:
placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.
n
ame"
placeholder=
"请输入姓名"
/>
</uni-forms-item>
<uni-forms-item
label=
"证件类型"
required
name=
"idcType"
>
<uni-data-select
v-model=
"baseFormData.idcType"
:localdata=
"idcTypeList"
@
change=
"changeidcType"
></uni-data-select>
<uni-data-select
v-model=
"baseFormData.idcType"
:localdata=
"idcTypeList"
></uni-data-select>
</uni-forms-item>
<uni-forms-item
label=
"证件照"
required
name=
"picUrl"
v-show=
"current === 1"
>
<view
class=
"upCard"
>
<uni-file-picker
:class=
"baseFormData.
idcFrontImg
?'':'op0'"
v-model=
"baseFormData.
idcFrontImg
Obj"
@
delete=
"delimgFont"
return-type=
"object"
<uni-file-picker
:class=
"baseFormData.
card
?'':'op0'"
v-model=
"baseFormData.
card
Obj"
@
delete=
"delimgFont"
return-type=
"object"
limit=
"1"
@
select=
"upIdCardImgFront"
:image-styles=
"imageStylesZJ"
></uni-file-picker>
<image
v-if=
"!baseFormData.
idcFrontImg
"
class=
"sfz"
src=
"@/static/login/sfz.png"
>
<image
v-if=
"!baseFormData.
card
"
class=
"sfz"
src=
"@/static/login/sfz.png"
>
</image>
</view>
</uni-forms-item>
<uni-forms-item
label=
"姓名"
required
name=
"
realN
ame"
v-show=
"current === 1"
>
<uni-easyinput
:styles=
"inputstyle"
:placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.
realN
ame"
placeholder=
"请输入姓名"
/>
<uni-forms-item
label=
"姓名"
required
name=
"
n
ame"
v-show=
"current === 1"
>
<uni-easyinput
:styles=
"inputstyle"
:
clearable=
'false'
:
placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.
n
ame"
placeholder=
"请输入姓名"
/>
</uni-forms-item>
<uni-forms-item
label=
"证件号码"
required
name=
"idcCode"
>
<uni-easyinput
:styles=
"inputstyle"
:placeholderStyle=
"placeholderStyle"
<uni-easyinput
:styles=
"inputstyle"
:
clearable=
'false'
:
placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.idcCode"
@
blur=
"giveBirthDay"
placeholder=
"请输入证件号码"
/>
</uni-forms-item>
<uni-forms-item
label=
"性别"
required
name=
"sex"
>
...
...
@@ -47,16 +46,16 @@
</uni-forms-item>
<uni-forms-item
label=
"所在地区"
>
<uni-data-picker
class=
"fixUniFormItemStyle"
v-model=
"baseFormData.
region
Id"
<uni-data-picker
class=
"fixUniFormItemStyle"
v-model=
"baseFormData.
city
Id"
:localdata=
"regionsList"
popup-title=
"请选择所在地区"
></uni-data-picker>
</uni-forms-item>
<uni-forms-item
label=
"详细地址"
><uni-easyinput
:styles=
"inputstyle"
:placeholderStyle=
"placeholderStyle"
v-model=
"baseFormData.address"
placeholder=
"请输入详细地址"
/></uni-forms-item>
<uni-forms-item
label=
"头像"
required
name=
"p
icUrl
"
>
<uni-file-picker
v-model=
"baseFormData.
idcFrontImgObj"
@
delete=
"delimgFont
"
return-type=
"object"
limit=
"1"
@
select=
"up
IdCardImgFront
"
<uni-forms-item
label=
"头像"
required
name=
"p
hoto
"
>
<uni-file-picker
v-model=
"baseFormData.
photoObj"
@
delete=
"delPhoto
"
return-type=
"object"
limit=
"1"
@
select=
"up
Photo
"
:image-styles=
"imageStylesTx"
></uni-file-picker>
</uni-forms-item>
...
...
@@ -71,7 +70,7 @@
</view>
<view
class=
"agreeline"
>
<image
@
click=
"changeAgree(agree)"
v-if=
"agree"
src=
"@/static/login/xz_dwn@2x.png"
></image>
<image
v-else
src=
"@/static/login/xz2
@2x.png"
></image>
<image
@
click=
"changeAgree(agree)"
v-else
src=
"@/static/login/xz
@2x.png"
></image>
<view>
我已阅读
<text
@
click=
"openpopup"
>
《入会须知》
</text></view>
</view>
</view>
...
...
@@ -111,14 +110,17 @@
<
script
setup
>
import
{
onMounted
,
ref
}
from
'vue'
}
from
'vue'
import
*
as
api
from
'@/common/api.js'
const
current
=
ref
(
0
)
const
popup
=
ref
(
null
)
const
agree
=
ref
(
tru
e
)
const
agree
=
ref
(
fals
e
)
const
regionsList
=
ref
([])
const
baseFormData
=
ref
({
sex
:
'0'
sex
:
'0'
,
idcType
:
'0'
})
const
baseFormData2
=
ref
({})
const
items
=
ref
([
'手动录入'
,
'自动录入'
])
...
...
@@ -128,12 +130,16 @@
},
{
value
:
'1'
,
text
:
"
护照
"
text
:
"
港澳台通信身份证
"
},
{
value
:
'2'
,
text
:
"
其他
"
text
:
"
中国护照
"
},
{
value
:
'3'
,
text
:
"外国护照"
}
])
const
sexs
=
ref
([{
text
:
'女'
,
...
...
@@ -162,26 +168,63 @@
width
:
'500rpx'
,
height
:
'316rpx'
});
onMounted
(()
=>
{
getRegionsList
()
})
function
getRegionsList
()
{
api
.
regionsList
().
then
(
res
=>
{
regionsList
.
value
=
res
.
data
})
}
function
onClickItem
(
e
)
{
if
(
current
.
value
!=
e
.
currentIndex
)
{
current
.
value
=
e
.
currentIndex
}
}
function
changeAgree
(
item
)
{
item
=
!
item
function
changeAgree
(
item
)
{
if
(
agree
.
value
){
agree
.
value
=
false
}
else
{
agree
.
value
=
true
}
// item = !item
}
function
upIdCardImgFront
(
e
)
{
//身份证识别
function
upIdCardImgFront
(
e
)
{
baseFormData
.
value
.
card
=
e
.
tempFiles
;
console
.
log
(
e
.
tempFiles
[
0
].
file
)
const
formData
=
new
FormData
()
formData
.
append
(
'pic'
,
e
.
tempFiles
[
0
].
file
)
api
.
carUrl
(
formData
,
baseFormData
.
value
.
idcType
).
then
(
res
=>
{
baseFormData
.
value
.
idcUrl
=
res
.
data
.
url
baseFormData
.
value
.
sex
=
res
.
data
.
sex
baseFormData
.
value
.
birth
=
res
.
data
.
birth
baseFormData
.
value
.
idcCode
=
res
.
data
.
code
baseFormDatabaseFormData
.
value
.
cityId
=
res
.
data
.
cityId
baseFormData
.
value
.
address
=
res
.
data
.
address
baseFormData
.
value
.
photo
=
res
.
data
.
photo
baseFormData
.
value
.
name
=
res
.
data
.
name
baseFormData
.
value
.
picUUid
=
res
.
data
.
picUUid
})
// api.uploadImg(e).then(data => {
// baseFormData.value.idcFrontImg = data.data;
// baseFormData.value.card = data.data;
// });
}
function
upPhoto
(
e
)
{
// api.uploadImg(e).then(data => {
// baseFormData.value.photo = data.data;
// });
baseFormData
.
value
.
idcFrontImg
=
e
}
function
delimgFont
(
n
)
{
baseFormData
.
value
.
idcFrontImg
=
''
;
baseFormData
.
value
.
card
=
''
;
}
function
delPhoto
(
n
)
{
baseFormData
.
value
.
photo
=
''
;
}
function
giveBirthDay
()
{
...
...
@@ -224,24 +267,19 @@
console
.
log
(
"性别:"
,
e
.
detail
.
value
)
}
function
changeidcType
(
e
)
{
console
.
log
(
"证件:"
,
e
)
if
(
e
)
{
baseFormData
.
value
.
idcTypeStr
=
idcTypeList
[
e
].
text
}
}
function
openpopup
()
{
popup
.
value
.
open
()
}
function
closepopup
()
{
function
closepopup
()
{
agree
.
value
=
true
popup
.
value
.
close
()
}
function
goSubmit
()
{
if
(
!
agree
.
value
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'请阅知入会须知'
,
duration
:
2000
});
...
...
@@ -297,5 +335,9 @@
.op0
{
opacity
:
0
;
}
}
:deep
(
.item-text-overflow
)
{
text-align
:
left
;}
:deep
(
.selected-list
)
{
justify-content
:
end
;}
</
style
>
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment