diff --git a/src/apps/AppMyGrid/AppMyGrid.vue b/src/apps/AppMyGrid/AppMyGrid.vue
index 638ab5e0..db0f2e07 100644
--- a/src/apps/AppMyGrid/AppMyGrid.vue
+++ b/src/apps/AppMyGrid/AppMyGrid.vue
@@ -10,7 +10,7 @@
@@ -47,18 +47,33 @@ export default {
}
},
methods: {
- getMyGrid() {
-
+ getMySignStatus() {
+ this.$http.post("/app/appgirdmemberinfo/checkLogOnUser").then(res => {
+ if (res?.data) {
+ this.signIn = res.data.isSign == 1
+ }
+ })
},
linkTo(url) {
uni.navigateTo({url})
},
handleSignIn() {
- !this.signIn && this.linkTo("./signResult")
+ !this.signIn && wx.getLocation({
+ success: res => {
+ const {latitude: lat, longitude: lng} = res
+ this.$http.post('/app/appdvcpconfig/apiForward', `https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1`)
+ .then(({data: {result: {address}}}) => this.$http.post("/app/appwxsigninfo/sign", {lat, lng, address}))
+ .then(res => {
+ if (res?.code == 0) {
+ this.linkTo("./signResult")
+ }
+ })
+ }
+ })
}
},
created() {
- this.getMyGrid()
+ this.getMySignStatus()
}
}
diff --git a/src/apps/AppMyGrid/signResult.vue b/src/apps/AppMyGrid/signResult.vue
index 104c8d5f..250ca16b 100644
--- a/src/apps/AppMyGrid/signResult.vue
+++ b/src/apps/AppMyGrid/signResult.vue
@@ -2,9 +2,10 @@
今日已完成签到
- 积分+5
- 2022-9-2 16:59:23
- 张家湾小区
+ 积分+5
+
+ {{ result.createTime }}
+ {{ result.address }}
@@ -13,10 +14,17 @@ export default {
name: "signResult",
appName: "签到结果",
data() {
- return {}
+ return {
+ result: {}
+ }
+ },
+ methods: {
+ getResult() {
+
+ }
},
- methods: {},
created() {
+ this.getResult()
}
}
@@ -43,13 +51,16 @@ export default {
.score {
color: #3975C6;
height: 32px;
- margin-bottom: 112px;
padding-left: 48px;
background-image: url("./assets/score.png");
background-repeat: no-repeat;
background-position: left center;
}
+ .mar-b112 {
+ margin-bottom: 112px;
+ }
+
::v-deep.normal {
height: 56px;
}