浏览代码

营销签到功能

祁鹏飞 4 月之前
父节点
当前提交
5be8616704
共有 3 个文件被更改,包括 75 次插入2 次删除
  1. 11 0
      pages.json
  2. 5 2
      pages/index/index.vue
  3. 59 0
      pages/lottery/index.vue

+ 11 - 0
pages.json

@@ -567,6 +567,17 @@
 					"titleNView": false
 				}
 			}
+		},
+		{
+			"path": "pages/lottery/index",
+			"style": {
+				"navigationBarTitleText": "抽奖",
+				"app-plus": {
+					"scrollIndicator": "none",
+					"bounce": "none",
+					"titleNView": false
+				}
+			}
 		}
 
 

+ 5 - 2
pages/index/index.vue

@@ -242,6 +242,7 @@
 					})
 					await this.bannerquery(); //获取轮播图
 					await this.getUserInfo(); //获取人员信息
+					let res1 = await this.$http.post('/signIn/doSignIn',)
 				}
 
 			}
@@ -373,8 +374,10 @@
 					data: info.sysName
 				})
 				this.deptSelectShow = false;
-				this.bannerquery();
-				this.getUserInfo();
+				await this.bannerquery();
+				await this.getUserInfo();
+				let res1 = await this.$http.post('/signIn/doSignIn',)
+				console.log("🚀 ~ res1:", res1)
 			},
 			async manualQuote() {
 				uni.navigateTo({

+ 59 - 0
pages/lottery/index.vue

@@ -0,0 +1,59 @@
+<template>
+	<view class="content">
+		<web-view :webview-styles="webviewStyles"
+			:src="to_url"
+			@message="getMessage"></web-view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				webviewStyles: {
+					progress: {
+						color: '#FF3333'
+					}
+				},
+				to_url: '',
+			}
+		},
+		onLoad(options) {
+			// jzg-7kP9xL2mN5vQ8zR1jW  ,晋掌柜
+			// gyy-aB4cD6eF8gH0iJ2kL4  ,广誉源
+			// bdsh-X9yZ1wV3uT5sR7qP9o  ,本地生活
+			
+			
+			let currentPlatform = 'gyy-aB4cD6eF8gH0iJ2kL4';// 当前平台
+			
+			// let currentUser = '2043971820430372866'
+			let currentUser = '2049045470263193601'// 当前用户id
+			
+			let tenantId = '2049045470263193601'// 晋掌柜 租户id  需要传不需要不传
+			
+			let activityId = '2029805805219950593';// 当前活动id
+			
+			// this.to_url = 'http://192.168.5.21:8080/custh5/#/packageF/pages/activity/lottery/turntable?activityId='+ activityId + '&currentPlatform='+currentPlatform+'&currentUser='+currentUser;
+			
+			this.to_url = 'https://life.baoxianzhanggui.com/custh5/#/packageF/pages/activity/lottery/turntable?activityId='+ activityId + '&currentPlatform='+currentPlatform+'&currentUser='+currentUser+'&tenantId='+tenantId;
+		},
+		methods: {
+			// 这个 getMessage 在 H5 下其实不会被调到,可以保留给 App/小程序用
+			getMessage(event) {
+				console.log("🚀 ~ event:", event)
+				const list = event.detail && event.detail.data
+				const urlType = list && list[list.length - 1]
+				switch (urlType && urlType.type) {
+					case 'back':
+						uni.navigateBack()
+						break
+					default:
+				}
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss" scoped>
+
+</style>