先提交一波
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="bottom" flex>
|
||||
<div class="fill" v-text="user.girdName"/>
|
||||
<div class="signBtn" :class="{signIn}" v-text="signBtn" @click="handleSignIn"/>
|
||||
<div class="signBtn" :class="{signIn}" v-text="signBtn" @click="$u.debounce(handleSignIn,500)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="link" v-for="(item, index) in linkList" :key="index" @click="linkTo(item.linkUrl)">
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<section class="signResult">
|
||||
<div class="successImg"/>
|
||||
<b class="mar-t32">今日已完成签到</b>
|
||||
<div class="mar-t32 score">积分+5</div>
|
||||
<AiItem label="时间" :border="false">2022-9-2 16:59:23</AiItem>
|
||||
<AiItem label="位置" :border="false">张家湾小区</AiItem>
|
||||
<div v-if="result.score" class="mar-t32 score mar-b112">积分+5</div>
|
||||
<u-gap v-else class="mar-t32 mar-b112" height="32"/>
|
||||
<AiItem label="时间" :border="false">{{ result.createTime }}</AiItem>
|
||||
<AiItem label="位置" :border="false">{{ result.address }}</AiItem>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -13,10 +14,17 @@ export default {
|
||||
name: "signResult",
|
||||
appName: "签到结果",
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
result: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getResult() {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
this.getResult()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user