diff --git a/App.vue b/App.vue index c7ed182..be6d003 100644 --- a/App.vue +++ b/App.vue @@ -113,6 +113,7 @@ .openid); uni.setStorageSync('uid', response.data .id); + uni.setStorageSync('userInfo', response.data); } else { uni.showToast({ icon: 'none', @@ -120,7 +121,7 @@ duration: 2000 }); } - //returnA(response); + returnA(response); }) .catch(error => { uni.showToast({ diff --git a/pages.json b/pages.json index fb30985..ea7d483 100644 --- a/pages.json +++ b/pages.json @@ -186,25 +186,48 @@ { "path": "pages/index/my_card_holder", "style": { - "navigationBarTitleText": "" + "navigationBarTitleText": "智慧云商协" } }, { - "path" : "pages/index/policy", + "path": "pages/index/policy", + "style": { + "navigationBarTitleText": "智慧云商协" + } + }, + { + "path": "pages/index/policy_list", + "style": { + "navigationBarTitleText": "智慧云商协" + } + }, + { + "path": "pages/index/policy_info", + "style": { + "navigationBarTitleText": "智慧云商协" + } + }, + { + "path": "pages/index/user_auditing", + "style": { + "navigationBarTitleText": "智慧云商协" + } + }, + { + "path": "pages/index/user_auditing_info", + "style": { + "navigationBarTitleText": "智慧云商协" + } + }, + { + "path" : "pages/index/user_activity", "style" : { "navigationBarTitleText" : "" } }, { - "path" : "pages/index/policy_list", - "style" : - { - "navigationBarTitleText" : "" - } - }, - { - "path" : "pages/index/policy_info", + "path" : "pages/index/my_sign", "style" : { "navigationBarTitleText" : "" diff --git a/pages/index/event_info.vue b/pages/index/event_info.vue index 2c8d45d..b49c284 100644 --- a/pages/index/event_info.vue +++ b/pages/index/event_info.vue @@ -16,78 +16,137 @@ - - {{ info.activity_name }} - - - - 开始时间: - {{ info.activity_start_time }} - - - - 结束时间: - {{ info.activity_end_time }} - - - - 活动地点: - {{ info.activity_location }} - - - - 报名人数: - {{ info.list.length}}人 - - - - - 报名详情: - + + + {{ info.activity_name }} + + + + 活动开始时间: + {{ info.activity_start_time }} + + + + 活动结束时间: + {{ info.activity_end_time }} - {{info.list.length}}人 - + + 活动地点: + {{ info.activity_location }} + + + + 活动规模: + {{info.number==0?'不限制':info.number+'人'}} + + + + + 捐赠人数: + 填写人数: + 报名人数: + {{ info.list.length}}人 + + + + + + 捐赠详情: + + 填写详情: + 报名详情: + + + + {{info.list.length}}人 + + + - 活动介绍 - - - - + + + + + + 报名开始时间: + {{ info.signup_start_time }} + + + + 报名结束时间: + {{ info.signup_end_time }} + + + + 报名人数: + {{ info.list.length}}人 + + + + + 报名详情: + + + + {{info.list.length}}人 + + - - - - 问卷问题 - - - + + + 活动介绍 + + + + + + + + + + + 问卷问题 + + + + @@ -101,10 +160,9 @@ - - - + + + @@ -117,9 +175,9 @@ - - + + + @@ -178,6 +236,16 @@ 暂无 + + + 登陆提示 + 请登录后参与活动! + + + 点击登陆 + + @@ -187,13 +255,15 @@ questionnaireFind, applicationAdd, questionnaireAdd, - moneyLogAdd + moneyLogAdd, + wxphoneLogin } from '@/util/api.js'; import store from '@/store/index.js' export default { data() { return { + showLogin: false, money: '', juanMod: false, rightMod: false, @@ -245,33 +315,80 @@ // 更多参数配置,参考文档 return { title: this.info.activity_name, - path: '/pages/index/event_info?id=' + this.info.id, + path: '/pages/index/event_info?id=' + this.info.id + "&gid=" + store.state.Gid, imageUrl: this.apiImgUrl + this.info.activity_image, } }, onShareTimeline() { // 分享到朋友圈 return { title: this.info.activity_name, - path: '/pages/index/event_info?id=' + this.info.id, + path: '/pages/index/event_info?id=' + this.info.id + "&gid=" + store.state.Gid, imageUrl: this.apiImgUrl + this.info.activity_image, } }, onLoad(d) { + var uid = uni.getStorageSync('uid'); console.log(d); this.id = d.id; + if (typeof(d.gid) != 'undefined') { + console.log(11111111); + store.commit('$tStore', { + name: 'Gid', + value: d.gid + }) + uni.setStorageSync('Gid', d.gid); + } + if (!uid) { + getApp().getUserLogin((r) => { + console.log('---Login---', r); + }) + } this.getEventInfo(); }, methods: { + PhoneLogin(d) { + console.log(d); + this.showLogin = false; + var openid = uni.getStorageSync('openid'); + wxphoneLogin({ + code: d.code, + openid: openid + }) + .then(res => { + console.log(res); + if (res.code == 1) { + uni.showToast({ + title: '登陆成功!', + icon: 'none', + duration: 2000 + }); + uni.setStorageSync('uid', res.data.id); + uni.setStorageSync('userInfo', res.data); + this.userInfo = res.data; + this.login = true; + this.loginMod = false; + } else { + uni.showToast({ + title: '登陆失败!', + icon: 'none', + duration: 2000 + }); + } + }) + .catch(error => { + uni.showToast({ + title: error, + icon: 'none', + duration: 2000 + }); + }) + }, zhifuDo() { this.peiMod = false; var uid = uni.getStorageSync('uid'); if (!uid) { - uni.showToast({ - title: '请登录后报名!', - icon: 'none', - duration: 2000 - }); + this.modalAdd.showLogin = true; return; } applicationAdd({ @@ -307,11 +424,7 @@ this.juanMod = false; var uid = uni.getStorageSync('uid'); if (!uid) { - uni.showToast({ - title: '请登录后捐助!', - icon: 'none', - duration: 2000 - }); + this.modalAdd.showLogin = true; return; } moneyLogAdd({ @@ -346,11 +459,7 @@ option_add() { var uid = uni.getStorageSync('uid'); if (!uid) { - uni.showToast({ - title: '请登录后报名!', - icon: 'none', - duration: 2000 - }); + this.modalAdd.showLogin = true; return; } var that = this; @@ -402,18 +511,14 @@ application_add() { var uid = uni.getStorageSync('uid'); if (!uid) { - uni.showToast({ - title: '请登录后报名!', - icon: 'none', - duration: 2000 - }); + this.modalAdd.showLogin = true; return; } applicationAdd({ association_id: store.state.Gid, member_id: uid, activity_id: this.id, - application_time: new Date().toISOString().slice(0, 19).replace('T', ' ') + //application_time: new Date().toISOString().slice(0, 19).replace('T', ' ') }) .then(res => { if (res.code == 1) { diff --git a/pages/index/events_my.vue b/pages/index/events_my.vue index 4e7a4d4..fb2f3d1 100644 --- a/pages/index/events_my.vue +++ b/pages/index/events_my.vue @@ -18,7 +18,7 @@ @click="openUrl('/pages/index/event_info?id='+item.activity_id)" style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;margin-bottom: 30rpx;box-shadow: rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;"> - {{item.activity_name}} + {{item.activity_name}} {{item.application_time}} diff --git a/pages/index/home.vue b/pages/index/home.vue index bc43088..d7ee137 100644 --- a/pages/index/home.vue +++ b/pages/index/home.vue @@ -200,20 +200,23 @@ + + 暂无活动 + - - 暂无活动 + + + + + - - - - - + + style="padding: 20rpx;min-height: 200rpx;"> @@ -291,7 +294,7 @@ this.getAssociationIndex(); this.getCarouselIndex(); this.getMsg(); - this.getArticlePolicyListAll(); + //this.getArticlePolicyListAll(); }, methods: { msg() { @@ -423,7 +426,7 @@ activityList({ association_id: store.state.Gid, page: 1, - size: 5 + size: 10 }) .then(res => { console.log(res); @@ -541,7 +544,7 @@ } .rounded_corner { - border-radius: 16rpx 16rpx 0rpx 0rpx; + //border-radius: 16rpx 16rpx 0rpx 0rpx; padding-top: 20rpx; } diff --git a/pages/index/index.vue b/pages/index/index.vue index ae12dbc..c34b32d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -113,6 +113,15 @@ var index = data.index; that.tabShow = index; }) + if (typeof(options.scene) != 'undefined') { + let decodedParams = decodeURIComponent(options.scene); + var searchParams = this.parseQuery(decodedParams); + store.commit('$tStore', { + name: 'Gid', + value: searchParams.gid + }) + uni.setStorageSync('Gid', searchParams.gid); + } }, mounted() { @@ -122,20 +131,25 @@ // 更多参数配置,参考文档 return { title: this.name, - path: '/pages/index/index', + path: '/pages/index/index?gid=' + store.state.Gid, imageUrl: this.icon, } }, onShareTimeline() { // 分享到朋友圈 return { title: this.name, - path: '/pages/index/index', + path: '/pages/index/index?gid=' + store.state.Gid, imageUrl: this.icon, } }, methods: { - preventTouchMove() { - + parseQuery(queryStr) { + let params = {}; + queryStr.split('&').forEach(param => { + let [key, value] = param.split('='); + params[key] = decodeURIComponent(value); + }); + return params; }, childEvent(data) { console.log(123); diff --git a/pages/index/my_card.vue b/pages/index/my_card.vue index 0b15d18..b5257b0 100644 --- a/pages/index/my_card.vue +++ b/pages/index/my_card.vue @@ -21,14 +21,16 @@ - + {{userThisInfo.nikename}} - 协会职务:{{userThisInfo.position_name}} + 协会职务:{{userThisInfo.position_name==null||userThisInfo.position_name==''?'无':userThisInfo.position_name}} 性别:{{userThisInfo.gender==0?'女':'男'}} @@ -59,17 +61,22 @@ style="width: 160rpx;height: 160rpx;background: #d9d9d9;"> - {{userThisInfo.enterprise_name}} + + {{userThisInfo.enterprise_name==null||userThisInfo.enterprise_name==''?'未填写':userThisInfo.enterprise_name}} 所属行业:{{userThisInfo.industry_id==-1?'其他行业':userThisInfo.industry_name}} - 企业地址:{{userThisInfo.enterprise_location}} + + 企业地址:{{userThisInfo.enterprise_location==null||userThisInfo.enterprise_location==''?'无':userThisInfo.enterprise_location}} + - {{userThisInfo.enterprise_Introduction}} + + {{userThisInfo.enterprise_Introduction==null||userThisInfo.enterprise_Introduction==''?'无':userThisInfo.enterprise_Introduction}} + @@ -125,7 +132,7 @@ {{userThisInfo.introduction==''||userThisInfo.introduction==null?'无':userThisInfo.introduction}} - {{userThisInfo.enterprise_Introduction}} + {{userThisInfo.enterprise_Introduction==''||userThisInfo.enterprise_Introduction==null?'无':userThisInfo.enterprise_Introduction}} @@ -181,7 +188,13 @@ } else { this.uid = uid; } - + if (typeof(d.gid) != 'undefined') { + store.commit('$tStore', { + name: 'Gid', + value: d.gid + }) + uni.setStorageSync('Gid', d.gid); + } this.getUserInfo(); }, onShareAppMessage(res) { @@ -189,7 +202,16 @@ console.log(info); return { title: this.userThisInfo.nikename, - path: '/pages/index/my_card?id=' + this.userThisInfo.member_id, + path: '/pages/index/my_card?id=' + this.userThisInfo.member_id + '&gid=' + this.userThisInfo + .association_id, + imageUrl: this.apiImgUrl + this.userThisInfo.photo_image + } + }, + onShareTimeline() { // 分享到朋友圈 + return { + title: this.userThisInfo.nikename, + path: '/pages/index/my_card?id=' + this.userThisInfo.member_id + '&gid=' + this.userThisInfo + .association_id, imageUrl: this.apiImgUrl + this.userThisInfo.photo_image } }, diff --git a/pages/index/my_edit.vue b/pages/index/my_edit.vue index e103571..9a69edd 100644 --- a/pages/index/my_edit.vue +++ b/pages/index/my_edit.vue @@ -541,10 +541,16 @@ nikename: res.data.nikename, phone: res.data.phone, wx_number: res.data.wx_number, - introduction: res.data.introduction, - enterprise_name: res.data.enterprise_name, - enterprise_location: res.data.enterprise_location, - enterprise_Introduction: res.data.enterprise_Introduction, + introduction: res.data.introduction == null || res.data.introduction == '' ? '无' : res + .data.introduction, + enterprise_name: res.data.enterprise_name == null || res.data.enterprise_name == '' ? + '无' : res.data.enterprise_name, + enterprise_location: res.data.enterprise_location == null || res.data + .enterprise_location == '' ? '无' : res.data + .enterprise_location, + enterprise_Introduction: res.data.enterprise_Introduction == null || res.data + .enterprise_Introduction == '' ? '无' : res.data + .enterprise_Introduction, association_id: res.data.association_id, industry_id: res.data.industry_id, company_image: res.data.company_image, @@ -554,9 +560,9 @@ gender: res.data.gender, region_id: res.data.region_id, }; - this.region_id_name = res.data.region_name; - this.industry_id_name = res.data.industry_name; - this.position_id_name = res.data.position_name; + this.region_id_name = res.data.region_name == null ? '无' : res.data.region_name; + this.industry_id_name = res.data.industry_name == null ? '无' : res.data.industry_name; + this.position_id_name = res.data.position_name == null ? '无' : res.data.position_name; this.getIndustry(); this.getPositionList(); this.getRegionList(); diff --git a/pages/index/my_invite.vue b/pages/index/my_invite.vue index 7cd2906..25eceda 100644 --- a/pages/index/my_invite.vue +++ b/pages/index/my_invite.vue @@ -25,24 +25,24 @@ fontColor="#ffffff" width="100%">转发到微信好友 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
使用二维码邀请入会
@@ -109,9 +109,9 @@ }) }, openQrcode() { - uni.showLoading({ + uni.showLoading({ title: '生成中', - mask:true, + mask: true, }); var that = this; uni.request({ @@ -143,11 +143,11 @@ console.log('图片保存成功', filePath); // 成功回调 that.show = true; - uni.hideLoading() + uni.hideLoading() }, fail: (err) => { console.error('图片保存失败', err); - uni.hideLoading() + uni.hideLoading() // 失败回调 } }); @@ -224,4 +224,4 @@ } /* 标签内容 end*/ - + \ No newline at end of file diff --git a/pages/index/new_info.vue b/pages/index/new_info.vue index daf4e61..de99070 100644 --- a/pages/index/new_info.vue +++ b/pages/index/new_info.vue @@ -59,20 +59,27 @@ onLoad(d) { console.log(d); this.id = d.id; + if (typeof(d.gid) != 'undefined') { + store.commit('$tStore', { + name: 'Gid', + value: d.gid + }) + uni.setStorageSync('Gid', d.gid); + } this.getNewsInfo(); }, onShareAppMessage() { // 分享到微信好友 // 更多参数配置,参考文档 return { title: this.info.news_title, - path: '/pages/index/new_info?id=' + this.info.news_id, + path: '/pages/index/new_info?id=' + this.info.news_id + '&gid=' + this.info.association_id, imageUrl: this.apiImgUrl + this.info.news_image, } }, onShareTimeline() { // 分享到朋友圈 return { title: this.info.news_title, - path: '/pages/index/new_info?id=' + this.info.news_id, + path: '/pages/index/new_info?id=' + this.info.news_id + '&gid=' + this.info.association_id, imageUrl: this.apiImgUrl + this.info.news_image, } }, diff --git a/pages/index/pizz_info.vue b/pages/index/pizz_info.vue index d89f5c2..22ba655 100644 --- a/pages/index/pizz_info.vue +++ b/pages/index/pizz_info.vue @@ -22,13 +22,13 @@
- + + + + + +
@@ -141,6 +141,16 @@
--> + + + + + + + 保存图片 + + @@ -158,6 +168,7 @@ export default { data() { return { + show: false, currentIndex: -1, // 底部tabbar菜单数据 tabbarList: [{ @@ -203,6 +214,7 @@ cardCur: 0, info: {}, apiImgUrl: this.$store.state.imgUrl, + qrcode_url: '', architecture: [], association_id: 0, userInfo: {}, @@ -217,6 +229,63 @@ this.getArchitectureList(); }, methods: { + openQrcode() { + uni.showLoading({ + title: '生成中', + mask: true, + }); + var that = this; + uni.request({ + url: store.state.apiUrl + '/move/login/getUnlimitedQRCode', + method: 'POST', + data: { + path: 'pages/index/index', + scene: "gid=" + this.association_id + }, + responseType: 'arraybuffer', + arraybuffer: true, + success: (result) => { + const url = 'data:image/png;base64,' + uni.arrayBufferToBase64(result.data); + that.base64ToImage(url); + } + }) + }, + base64ToImage(base64Data) { + var that = this; + const fs = uni.getFileSystemManager(); + var filePath = wx.env.USER_DATA_PATH + '/qrcode.jpg'; + const base64 = base64Data.split(',')[1]; // 获取base64字符串部分 + fs.writeFile({ + filePath: filePath, + data: base64, + encoding: 'base64', + success: (res) => { + that.qrcode_url = filePath; + console.log('图片保存成功', filePath); + // 成功回调 + that.show = true; + uni.hideLoading() + }, + fail: (err) => { + console.error('图片保存失败', err); + uni.hideLoading() + // 失败回调 + } + }); + }, + saveBase64() { + wx.saveImageToPhotosAlbum({ + filePath: this.qrcode_url, + success: function(res) { + wx.showToast({ + title: '保存成功', + }) + }, + fail: function(err) { + console.log(err, '失败') + } + }) + }, tab_change(d) { this.tab_current = d; this.type = d + 1; diff --git a/pages/index/user.vue b/pages/index/user.vue index e000c9b..447e53f 100644 --- a/pages/index/user.vue +++ b/pages/index/user.vue @@ -17,7 +17,9 @@ {{ userInfo.nikename }} - {{userInfo.position_name}} + + {{userInfo.position_name}} + @@ -25,7 +27,8 @@ - 点击登陆 + + 点击登陆 @@ -74,13 +77,13 @@ - + 名片夹 - + 信息修改 @@ -107,7 +110,7 @@ fontColor="#ffffff">{{msg()}} - + 邀请入会 @@ -119,13 +122,26 @@ - - + @@ -173,13 +189,15 @@ + + + \ No newline at end of file diff --git a/pages/index/user_auditing.vue b/pages/index/user_auditing.vue new file mode 100644 index 0000000..c82577e --- /dev/null +++ b/pages/index/user_auditing.vue @@ -0,0 +1,258 @@ + + + + + \ No newline at end of file diff --git a/pages/index/user_auditing_info.vue b/pages/index/user_auditing_info.vue new file mode 100644 index 0000000..5659243 --- /dev/null +++ b/pages/index/user_auditing_info.vue @@ -0,0 +1,330 @@ + + + + + \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico deleted file mode 100644 index 7bf9037..0000000 Binary files a/static/favicon.ico and /dev/null differ diff --git a/static/icon13.png b/static/icon13.png index 9c6489e..2674e62 100644 Binary files a/static/icon13.png and b/static/icon13.png differ diff --git a/static/icon15.png b/static/icon15.png new file mode 100644 index 0000000..736f670 Binary files /dev/null and b/static/icon15.png differ diff --git a/static/jj.png b/static/jj.png new file mode 100644 index 0000000..7b93efd Binary files /dev/null and b/static/jj.png differ diff --git a/static/sh.png b/static/sh.png new file mode 100644 index 0000000..9207b65 Binary files /dev/null and b/static/sh.png differ diff --git a/static/tg.png b/static/tg.png new file mode 100644 index 0000000..aac7098 Binary files /dev/null and b/static/tg.png differ diff --git a/util/api.js b/util/api.js index a458667..75a312e 100644 --- a/util/api.js +++ b/util/api.js @@ -48,4 +48,16 @@ export const getPosition = data => request.post('/move/position', data, false); export const getArticlePolicy = data => request.post('/move/Article/gory', data, false); export const getArticlePolicyList = data => request.post('/move/Article/index', data, false); export const getArticlePolicyInfo = data => request.post('/move/Article/find', data, false); -export const getRegion = data => request.post('/move/region', data, false); \ No newline at end of file +export const getRegion = data => request.post('/move/region', data, false); + +export const getAuditing = data => request.post('/move/auditing', data, false); + +export const getAuditingFind = data => request.post('/move/auditing/find', data, false); + +export const auditingUpadte = data => request.post('/move/auditing/auditing', data, false); + +export const activityAdd = data => request.post('/move/activity/activityAdd', data, false); + +export const wxphoneLogin = data => request.post('/move/login/wxphone', data, false); + +export const activitySign = data => request.post('/move/activity_sign/index ', data, false); \ No newline at end of file