diff --git a/src/project/activeAnalysis/AppWechatActivities/AppWechatActivities.vue b/src/project/activeAnalysis/AppWechatActivities/AppWechatActivities.vue index 5cb24606..7b16ab37 100644 --- a/src/project/activeAnalysis/AppWechatActivities/AppWechatActivities.vue +++ b/src/project/activeAnalysis/AppWechatActivities/AppWechatActivities.vue @@ -24,9 +24,7 @@
- {{ item.beginTime }} - - 至 {{ item.endTime }} + {{ item.createTime }}
{{ item.areaName }}{{ item.address }}
@@ -44,6 +42,23 @@ +
+
打卡
+
+ +
+ *手机号 +
+ +
+
+ +
@@ -61,6 +76,8 @@ export default { current: 1, size: 6, total: '', + show: false, + phone: '' } }, computed: { @@ -68,14 +85,7 @@ export default { }, watch: {}, onLoad() { - this.$dict.load(['villageActivityStatus']).then(() => { - this.getList() - }) - - uni.$on('updateList', () => { - this.current = 1 - this.getList() - }) + this.getList() }, onShow() { document.title = '运营活动' @@ -86,8 +96,6 @@ export default { params: { size: this.size, current: this.current, - // createUserId: this.currentTabs == 1 ? this.user.id : '', - // areaId: this.user.areaId, }, }).then((res) => { if (res.code == 0) { @@ -99,28 +107,40 @@ export default { } }) }, - - change(index) { - this.datas = [] - this.current = 1 - this.currentTabs = index - this.getList() - }, - - toAdd() { - uni.navigateTo({ url: `./Add` }) - }, - toDetail(item) { uni.navigateTo({ url: `./Detail?id=${item.id}` }) }, - previewImage(images, img) { - uni.previewImage({ - urls: images.map((v) => v.url), - current: img, + bindPhoneConfirm() { + if(!this.phone) { + return this.$u.toast('请输入手机号') + } + let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/ + if (!regTel.test(this.phone)) { + return this.$u.toast('请输入正确的手机号') + } + + this.$http.post(`/appactivityinfo/bindPhone?phone=${this.phone}`).then((res) => { + if (res.code == 0) { + this.getUserInfo() + this.$u.toast('绑定成功') + } }) }, + cancel() { + this.phone = '' + this.show = false + }, + getUserInfo () { + this.$http.post('/api/user/info').then(res => { + if (res.code === 0) { + this.$store.commit('setUser', res.data) + } + }) + }, + toCalendar() { + uni.navigateTo({url: './ActiveCalendar'}) + } }, onReachBottom() { this.current = this.current + 1 @@ -222,22 +242,22 @@ uni-page-body { } } - .AiFixedBtn { - .movableArea { - .addBtn { - display: flex; - justify-content: center; - align-items: center; - width: 96px; - height: 96px; - flex-shrink: 0; - background: $uni-color-primary; - box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); - font-size: 48px; - background: #fff; - color: #1365dd; - border-radius: 50%; - } + .add-btn { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + div { + width: 100%; + height: 100px; + background: #3975C6; + text-align: center; + line-height: 100px; + color: #fff; + font-family: PingFangSC-Medium; + font-weight: 500; + font-size: 34px; } } } diff --git a/src/project/activeAnalysis/AppWechatActivities/Detail.vue b/src/project/activeAnalysis/AppWechatActivities/Detail.vue index d2795618..d1ef64e2 100644 --- a/src/project/activeAnalysis/AppWechatActivities/Detail.vue +++ b/src/project/activeAnalysis/AppWechatActivities/Detail.vue @@ -1,43 +1,15 @@