882dddb0 by 杨炀

no message

1 parent c49a1142
...@@ -2,12 +2,55 @@ import request from './request.js' ...@@ -2,12 +2,55 @@ import request from './request.js'
2 import config from '@/config.js' 2 import config from '@/config.js'
3 import * as loginServer from '@/common/login.js'; 3 import * as loginServer from '@/common/login.js';
4 4
5 function getVenue() { 5 function getMessage(params) {
6 return request({ 6 return request({
7 url: `/systemj/venue/appId`, 7 url: '/common/home/getMessage',
8 method: 'get' 8 method: 'get',
9 params: params
10 })
11 }
12 function reader(query) {
13 return request({
14 url: '/common/home/readMessage',
15 method: 'get',
16 params: query
17 })
18 }
19
20 function regionsList(params) {
21 return request({
22 url: '/common/region/regionsList',
23 method: 'get',
24 params
9 }) 25 })
10 } 26 }
27 // 添加会员自动录入 上传图片
28 function carUrl(data, type) {
29 return request({
30 url: `/person/info/getPersonInfoFromCert/${type}`,
31 method: 'post',
32 params: data
33 })
34 }
35 // 图片上传
36 function uploadImg(e){
37 const tempFilePaths = e.tempFilePaths;
38 const imgUrl=tempFilePaths[0]
39 uni.showLoading({
40 title: '加载中'
41 });
42 return uni.uploadFile({
43 url: config.baseUrl_api + '/upload/uploadImg',
44 filePath: imgUrl,
45 name: 'image'
46 }).then(res=>{
47 let data = JSON.parse(res.data);
48 return data
49 }).finally(()=>{
50 uni.hideLoading();
51 });
52 }
53
11 54
12 55
13 function getOwnMemberInfo() { 56 function getOwnMemberInfo() {
...@@ -221,7 +264,8 @@ function miniappData(params) { ...@@ -221,7 +264,8 @@ function miniappData(params) {
221 264
222 265
223 export { 266 export {
224 getVenue, 267 getMessage,reader,regionsList,carUrl,uploadImg,
268
225 getOwnMemberInfo, 269 getOwnMemberInfo,
226 getSiteList, 270 getSiteList,
227 getDateOrderInfo, 271 getDateOrderInfo,
......
...@@ -93,24 +93,7 @@ function uploadFile(e){ ...@@ -93,24 +93,7 @@ function uploadFile(e){
93 uni.hideLoading(); 93 uni.hideLoading();
94 }); 94 });
95 } 95 }
96 // 图片上传 96
97 function uploadImg(e){
98 const tempFilePaths = e.tempFilePaths;
99 const imgUrl=tempFilePaths[0]
100 uni.showLoading({
101 title: '加载中'
102 });
103 return uni.uploadFile({
104 url: config.baseUrl_api + '/upload/uploadImg',
105 filePath: imgUrl,
106 name: 'image'
107 }).then(res=>{
108 let data = JSON.parse(res.data);
109 return data
110 }).finally(()=>{
111 uni.hideLoading();
112 });
113 }
114 // 图片上传 97 // 图片上传
115 function uploadImgHasCrop(e){ 98 function uploadImgHasCrop(e){
116 const tempFilePaths = e.tempFilePaths; 99 const tempFilePaths = e.tempFilePaths;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
3 3
4 4
5 // staging 5 // staging
6 const baseUrl_api = "http://192.168.1.96:8787"; 6 const baseUrl_api = "http://192.168.1.11:8787";
7 7
8 export default { 8 export default {
9 baseUrl_api 9 baseUrl_api
10 };
...\ No newline at end of file ...\ No newline at end of file
10 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
9 </view> 9 </view>
10 10
11 </view> 11 </view>
12 <uni-section padding> 12 <view>
13 <uni-grid :column="4" :show-border="false" :square="false" @change="change"> 13 <uni-grid :column="4" :show-border="false" :square="false">
14 <uni-grid-item v-for="(item ,index) in list" :index="index" :key="index"> 14 <uni-grid-item v-for="(item ,index) in list" :index="index" :key="index">
15 <view class="grid-item-box"> 15 <view class="grid-item-box">
16 <image class="image" :src="item.url" mode="aspectFill" /> 16 <image class="image" :src="item.url" mode="aspectFill" />
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
21 </view> 21 </view>
22 </uni-grid-item> 22 </uni-grid-item>
23 </uni-grid> 23 </uni-grid>
24 </uni-section> 24 </view>
25 <uni-section title="待办提醒" padding> 25 <uni-section title="待办提醒" padding>
26 <template v-slot:right> 26 <template v-slot:right>
27 <text @click="goMsgList" class="more">更多></text> 27 <text @click="goMsgList" class="more">更多></text>
28 </template> 28 </template>
29 <view class="msglist"> 29 <view class="msglist">
30 <view class="msgitem" v-for="n in 4"> 30 <view class="msgitem" v-for="n in messageList" @click="readMessage(n)">
31 <text class="dot" :class="n.isRead?'done':''"></text> 31 <text class="dot" :class="n.readFlag=='1'?'done':''"></text>
32 <view class="tt esp">你有一条会员缴费等待审批,点击前去处理!</view> 32 <view class="tt esp">{{n.name}}</view>
33 <view class="date">2023-09-23</view> 33 <view class="date">{{n.createTime}}</view>
34 </view> 34 </view>
35 </view> 35 </view>
36 </uni-section> 36 </uni-section>
...@@ -68,47 +68,47 @@ ...@@ -68,47 +68,47 @@
68 let goPath; 68 let goPath;
69 const svId = ref(null); 69 const svId = ref(null);
70 const list = ref([{ 70 const list = ref([{
71 url: '/static/c1.png', 71 url: '',
72 text: '会员调动', 72 text: '会员调动',
73 badge: '0', 73 badge: '0',
74 type: "primary" 74 type: "primary"
75 }, 75 },
76 { 76 {
77 url: '/static/c2.png', 77 url: '',
78 text: '调动审核', 78 text: '调动审核',
79 badge: '1', 79 badge: '1',
80 type: "success" 80 type: "success"
81 }, 81 },
82 { 82 {
83 url: '/static/c3.png', 83 url: '',
84 text: '级位考试申请', 84 text: '级位考试申请',
85 badge: '99', 85 badge: '99',
86 type: "warning" 86 type: "warning"
87 }, 87 },
88 { 88 {
89 url: '/static/c4.png', 89 url: '',
90 text: '级位考试审核', 90 text: '级位考试审核',
91 badge: '2', 91 badge: '2',
92 type: "error" 92 type: "error"
93 }, 93 },
94 { 94 {
95 url: '/static/c5.png', 95 url: '',
96 text: '段位考试申请' 96 text: '段位考试申请'
97 }, 97 },
98 { 98 {
99 url: '/static/c6.png', 99 url: '',
100 text: '段位考试审核' 100 text: '段位考试审核'
101 }, 101 },
102 { 102 {
103 url: '/static/c7.png', 103 url: '',
104 text: '级位证书发送' 104 text: '级位证书发送'
105 }, 105 },
106 { 106 {
107 url: '/static/c8.png', 107 url: '',
108 text: '段位证书发送' 108 text: '段位证书发送'
109 } 109 }
110 ]); 110 ]);
111 111 const messageList = ref([])
112 onShow(() => { 112 onShow(() => {
113 if (app.globalData.isLogin) { 113 if (app.globalData.isLogin) {
114 init(); 114 init();
...@@ -158,9 +158,68 @@ ...@@ -158,9 +158,68 @@
158 } 158 }
159 159
160 function init() { 160 function init() {
161 api.getMessage({
162 pageNum: 1,
163 pageSize: 10
164 }).then(res => {
165 for (var d of res.rows) {
166 switch (d.type) {
167 case 30001:
168 d.name = '你有一条会员缴费等待审批,点击去处理!'
169 d.path = '/member/audit'
170 break
171 case 30002:
172 d.name = '你有一条级位考试等待审批,点击去处理!'
173 d.path = '/level/approval'
174 break
175 case 30003:
176 d.name = '你有一条段位考试等待审批,点击去处理!'
177 d.path = '/rank/approval'
178 break
179 case 30004:
180 d.name = '你有一条会员调动等待审批,点击去处理!'
181 d.path = '/member/mobillize'
182 break
183 case 30005:
184 d.name = '你有一条团体会员认证等待审批,点击去处理!'
185 d.path = '/group/authentication'
186 break
187 case 30006:
188 d.name = '你有一条段位成绩等待审批,点击去处理!'
189 d.path = '/rank/score/approval'
190 break
191 case 40001:
192 d.name = '你有一条级位申请待提交,点击去处理!'
193 d.path = '/level/apply/modify/' + d.eventId
194 break
195 case 40002:
196 d.name = '你有一条段位申请待提交,点击去处理!'
197 d.path = '/rank/apply/modify/' + d.eventId
198 break
199 case 40003:
200 d.name = '你有一条成绩维护的数据待提交,点击去处理!'
201 d.path = '/rank/score/modify/' + d.eventId
202 break
203 case 50001:
204 d.name = '你有一条新的个人会员申请,点击去处理!'
205 d.path = '/member/list'
206 break
207 }
208 }
209 messageList.value = res.rows
210 })
161 211
162 } 212 }
163 213
214 function readMessage(item) {
215 uni.navigateTo({
216 url: item.path
217 });
218 api.reader({id: item.id}).then(res=>{
219 item.readFlag = '1'
220 })
221 }
222
164 function goMsgList() { 223 function goMsgList() {
165 let path = '/pages/index/msgList'; 224 let path = '/pages/index/msgList';
166 uni.navigateTo({ 225 uni.navigateTo({
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
5 <!-- 需要固定在页面顶部的view请通过slot="top"插入,包括自定义的导航栏 --> 5 <!-- 需要固定在页面顶部的view请通过slot="top"插入,包括自定义的导航栏 -->
6 <uni-section title="待办提醒" padding> 6 <uni-section title="待办提醒" padding>
7 <view class="msglist"> 7 <view class="msglist">
8 <view class="msgitem" v-for="n in dataList"> 8 <view class="msgitem" v-for="n in dataList" @click="readMessage(n)">
9 <text class="dot" :class="n.isRead?'done':''"></text> 9 <text class="dot" :class="{'done':n.readFlag=='1'}"></text>
10 <view class="tt esp">你有一条会员缴费等待审批,点击前去处理!</view> 10 <view class="tt esp">{{n.name}}</view>
11 <view class="date">2023-09-23</view> 11 <view class="date">{{ n.createTime }}</view>
12 </view> 12 </view>
13 </view> 13 </view>
14 </uni-section> 14 </uni-section>
...@@ -20,12 +20,68 @@ ...@@ -20,12 +20,68 @@
20 import { 20 import {
21 ref 21 ref
22 } from 'vue' 22 } from 'vue'
23 import * as api from '@/common/api.js';
23 const dataList = ref([]) 24 const dataList = ref([])
24 const paging = ref(null) 25 const paging = ref(null)
25 const total = ref(50)
26 const current = ref(2) 26 const current = ref(2)
27 function queryList(pageNo, pageSize){ 27 function queryList(pageNum, pageSize){
28 paging.value.complete([{},{},{},{},{},{},{},{},{}]); 28 api.getMessage({pageNum, pageSize}).then(res=>{
29 for (var d of res.rows) {
30 switch (d.type) {
31 case 30001:
32 d.name = '你有一条会员缴费等待审批,点击去处理!'
33 d.path = '/member/audit'
34 break
35 case 30002:
36 d.name = '你有一条级位考试等待审批,点击去处理!'
37 d.path = '/level/approval'
38 break
39 case 30003:
40 d.name = '你有一条段位考试等待审批,点击去处理!'
41 d.path = '/rank/approval'
42 break
43 case 30004:
44 d.name = '你有一条会员调动等待审批,点击去处理!'
45 d.path = '/member/mobillize'
46 break
47 case 30005:
48 d.name = '你有一条团体会员认证等待审批,点击去处理!'
49 d.path = '/group/authentication'
50 break
51 case 30006:
52 d.name = '你有一条段位成绩等待审批,点击去处理!'
53 d.path = '/rank/score/approval'
54 break
55 case 40001:
56 d.name = '你有一条级位申请待提交,点击去处理!'
57 d.path = '/level/apply/modify/' + d.eventId
58 break
59 case 40002:
60 d.name = '你有一条段位申请待提交,点击去处理!'
61 d.path = '/rank/apply/modify/' + d.eventId
62 break
63 case 40003:
64 d.name = '你有一条成绩维护的数据待提交,点击去处理!'
65 d.path = '/rank/score/modify/' + d.eventId
66 break
67 case 50001:
68 d.name = '你有一条新的个人会员申请,点击去处理!'
69 d.path = '/member/list'
70 break
71 }
72 }
73 paging.value.complete(res.rows);
74 })
75
76 }
77
78 function readMessage(item) {
79 uni.navigateTo({
80 url: item.path
81 });
82 api.reader({id: item.id}).then(res=>{
83 item.readFlag = '1'
84 })
29 } 85 }
30 </script> 86 </script>
31 87
......
...@@ -8,30 +8,29 @@ ...@@ -8,30 +8,29 @@
8 8
9 <view class="nolineform"> 9 <view class="nolineform">
10 10
11 <uni-forms-item label="姓名" required name="realName" v-show="current === 0"> 11 <uni-forms-item label="姓名" required name="name" v-show="current === 0">
12 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 12 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
13 v-model="baseFormData.realName" placeholder="请输入姓名" /> 13 v-model="baseFormData.name" placeholder="请输入姓名" />
14 </uni-forms-item> 14 </uni-forms-item>
15 <uni-forms-item label="证件类型" required name="idcType"> 15 <uni-forms-item label="证件类型" required name="idcType">
16 <uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList" 16 <uni-data-select v-model="baseFormData.idcType" :localdata="idcTypeList"></uni-data-select>
17 @change="changeidcType"></uni-data-select>
18 </uni-forms-item> 17 </uni-forms-item>
19 <uni-forms-item label="证件照" required name="picUrl" v-show="current === 1"> 18 <uni-forms-item label="证件照" required name="picUrl" v-show="current === 1">
20 <view class="upCard"> 19 <view class="upCard">
21 <uni-file-picker :class="baseFormData.idcFrontImg?'':'op0'" 20 <uni-file-picker :class="baseFormData.card?'':'op0'"
22 v-model="baseFormData.idcFrontImgObj" @delete="delimgFont" return-type="object" 21 v-model="baseFormData.cardObj" @delete="delimgFont" return-type="object"
23 limit="1" @select="upIdCardImgFront" 22 limit="1" @select="upIdCardImgFront"
24 :image-styles="imageStylesZJ"></uni-file-picker> 23 :image-styles="imageStylesZJ"></uni-file-picker>
25 <image v-if="!baseFormData.idcFrontImg" class="sfz" src="@/static/login/sfz.png"> 24 <image v-if="!baseFormData.card" class="sfz" src="@/static/login/sfz.png">
26 </image> 25 </image>
27 </view> 26 </view>
28 </uni-forms-item> 27 </uni-forms-item>
29 <uni-forms-item label="姓名" required name="realName" v-show="current === 1"> 28 <uni-forms-item label="姓名" required name="name" v-show="current === 1">
30 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 29 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
31 v-model="baseFormData.realName" placeholder="请输入姓名" /> 30 v-model="baseFormData.name" placeholder="请输入姓名" />
32 </uni-forms-item> 31 </uni-forms-item>
33 <uni-forms-item label="证件号码" required name="idcCode"> 32 <uni-forms-item label="证件号码" required name="idcCode">
34 <uni-easyinput :styles="inputstyle" :placeholderStyle="placeholderStyle" 33 <uni-easyinput :styles="inputstyle" :clearable='false' :placeholderStyle="placeholderStyle"
35 v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" /> 34 v-model="baseFormData.idcCode" @blur="giveBirthDay" placeholder="请输入证件号码" />
36 </uni-forms-item> 35 </uni-forms-item>
37 <uni-forms-item label="性别" required name="sex"> 36 <uni-forms-item label="性别" required name="sex">
...@@ -47,16 +46,16 @@ ...@@ -47,16 +46,16 @@
47 </uni-forms-item> 46 </uni-forms-item>
48 47
49 <uni-forms-item label="所在地区"> 48 <uni-forms-item label="所在地区">
50 <uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.regionId" 49 <uni-data-picker class="fixUniFormItemStyle" v-model="baseFormData.cityId"
51 :localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker> 50 :localdata="regionsList" popup-title="请选择所在地区"></uni-data-picker>
52 </uni-forms-item> 51 </uni-forms-item>
53 <uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle" 52 <uni-forms-item label="详细地址"><uni-easyinput :styles="inputstyle"
54 :placeholderStyle="placeholderStyle" v-model="baseFormData.address" 53 :placeholderStyle="placeholderStyle" v-model="baseFormData.address"
55 placeholder="请输入详细地址" /></uni-forms-item> 54 placeholder="请输入详细地址" /></uni-forms-item>
56 55
57 <uni-forms-item label="头像" required name="picUrl"> 56 <uni-forms-item label="头像" required name="photo">
58 <uni-file-picker v-model="baseFormData.idcFrontImgObj" @delete="delimgFont" 57 <uni-file-picker v-model="baseFormData.photoObj" @delete="delPhoto"
59 return-type="object" limit="1" @select="upIdCardImgFront" 58 return-type="object" limit="1" @select="upPhoto"
60 :image-styles="imageStylesTx"></uni-file-picker> 59 :image-styles="imageStylesTx"></uni-file-picker>
61 </uni-forms-item> 60 </uni-forms-item>
62 61
...@@ -71,7 +70,7 @@ ...@@ -71,7 +70,7 @@
71 </view> 70 </view>
72 <view class="agreeline"> 71 <view class="agreeline">
73 <image @click="changeAgree(agree)" v-if="agree" src="@/static/login/xz_dwn@2x.png"></image> 72 <image @click="changeAgree(agree)" v-if="agree" src="@/static/login/xz_dwn@2x.png"></image>
74 <image v-else src="@/static/login/xz2@2x.png"></image> 73 <image @click="changeAgree(agree)" v-else src="@/static/login/xz@2x.png"></image>
75 <view>我已阅读<text @click="openpopup">《入会须知》</text></view> 74 <view>我已阅读<text @click="openpopup">《入会须知》</text></view>
76 </view> 75 </view>
77 </view> 76 </view>
...@@ -111,14 +110,17 @@ ...@@ -111,14 +110,17 @@
111 110
112 <script setup> 111 <script setup>
113 import { 112 import {
113 onMounted,
114 ref 114 ref
115 } from 'vue' 115 } from 'vue'
116 import * as api from '@/common/api.js'
116 const current = ref(0) 117 const current = ref(0)
117 const popup = ref(null) 118 const popup = ref(null)
118 const agree = ref(true) 119 const agree = ref(false)
119 const regionsList = ref([]) 120 const regionsList = ref([])
120 const baseFormData = ref({ 121 const baseFormData = ref({
121 sex: '0' 122 sex: '0',
123 idcType:'0'
122 }) 124 })
123 const baseFormData2 = ref({}) 125 const baseFormData2 = ref({})
124 const items = ref(['手动录入', '自动录入']) 126 const items = ref(['手动录入', '自动录入'])
...@@ -128,12 +130,16 @@ ...@@ -128,12 +130,16 @@
128 }, 130 },
129 { 131 {
130 value: '1', 132 value: '1',
131 text: "护照" 133 text: "港澳台通信身份证"
132 }, 134 },
133 { 135 {
134 value: '2', 136 value: '2',
135 text: "其他" 137 text: "中国护照"
136 }, 138 },
139 {
140 value: '3',
141 text: "外国护照"
142 }
137 ]) 143 ])
138 const sexs = ref([{ 144 const sexs = ref([{
139 text: '女', 145 text: '女',
...@@ -163,6 +169,14 @@ ...@@ -163,6 +169,14 @@
163 height: '316rpx' 169 height: '316rpx'
164 }); 170 });
165 171
172 onMounted(()=>{
173 getRegionsList()
174 })
175 function getRegionsList() {
176 api.regionsList().then(res=>{
177 regionsList.value = res.data
178 })
179 }
166 function onClickItem(e) { 180 function onClickItem(e) {
167 if (current.value != e.currentIndex) { 181 if (current.value != e.currentIndex) {
168 current.value = e.currentIndex 182 current.value = e.currentIndex
...@@ -170,18 +184,47 @@ ...@@ -170,18 +184,47 @@
170 } 184 }
171 185
172 function changeAgree(item) { 186 function changeAgree(item) {
173 item = !item 187 if(agree.value){
188 agree.value = false
189 } else {
190 agree.value = true
191 }
192 // item = !item
174 } 193 }
175 194
195 //身份证识别
176 function upIdCardImgFront(e) { 196 function upIdCardImgFront(e) {
197 baseFormData.value.card = e.tempFiles;
198 console.log(e.tempFiles[0].file)
199 const formData = new FormData()
200 formData.append('pic', e.tempFiles[0].file)
201 api.carUrl(formData, baseFormData.value.idcType).then(res=>{
202 baseFormData.value.idcUrl = res.data.url
203 baseFormData.value.sex = res.data.sex
204 baseFormData.value.birth = res.data.birth
205 baseFormData.value.idcCode = res.data.code
206 baseFormDatabaseFormData.value.cityId = res.data.cityId
207 baseFormData.value.address = res.data.address
208 baseFormData.value.photo = res.data.photo
209 baseFormData.value.name = res.data.name
210 baseFormData.value.picUUid = res.data.picUUid
211 })
177 // api.uploadImg(e).then(data => { 212 // api.uploadImg(e).then(data => {
178 // baseFormData.value.idcFrontImg = data.data; 213 // baseFormData.value.card = data.data;
214 // });
215 }
216 function upPhoto(e) {
217 // api.uploadImg(e).then(data => {
218 // baseFormData.value.photo = data.data;
179 // }); 219 // });
180 baseFormData.value.idcFrontImg = e
181 } 220 }
182 221
183 function delimgFont(n) { 222 function delimgFont(n) {
184 baseFormData.value.idcFrontImg = ''; 223 baseFormData.value.card = '';
224 }
225
226 function delPhoto(n) {
227 baseFormData.value.photo = '';
185 } 228 }
186 229
187 function giveBirthDay() { 230 function giveBirthDay() {
...@@ -224,24 +267,19 @@ ...@@ -224,24 +267,19 @@
224 console.log("性别:", e.detail.value) 267 console.log("性别:", e.detail.value)
225 } 268 }
226 269
227 function changeidcType(e) {
228 console.log("证件:", e)
229 if (e) {
230 baseFormData.value.idcTypeStr = idcTypeList[e].text
231 }
232 }
233
234 function openpopup() { 270 function openpopup() {
235 popup.value.open() 271 popup.value.open()
236 } 272 }
237 273
238 function closepopup() { 274 function closepopup() {
275 agree.value = true
239 popup.value.close() 276 popup.value.close()
240 } 277 }
241 278
242 function goSubmit() { 279 function goSubmit() {
243 if(!agree.value){ 280 if(!agree.value){
244 uni.showToast({ 281 uni.showToast({
282 icon:'none',
245 title: '请阅知入会须知', 283 title: '请阅知入会须知',
246 duration: 2000 284 duration: 2000
247 }); 285 });
...@@ -298,4 +336,8 @@ ...@@ -298,4 +336,8 @@
298 .op0 { 336 .op0 {
299 opacity: 0; 337 opacity: 0;
300 } 338 }
339
340
341 :deep(.item-text-overflow){text-align: left;}
342 :deep(.selected-list){justify-content: end;}
301 </style> 343 </style>
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!