diff --git a/src/apps/AppMyGrid/AppMyGrid.vue b/src/apps/AppMyGrid/AppMyGrid.vue
index e7b401b1..b088a801 100644
--- a/src/apps/AppMyGrid/AppMyGrid.vue
+++ b/src/apps/AppMyGrid/AppMyGrid.vue
@@ -10,7 +10,7 @@
@@ -45,7 +45,7 @@ export default {
{title: '我的积分', img: require('./assets/wdjf.png'), linkUrl: '../AppCreditPoints/AppGridIntegral'},
{title: '积分兑换', img: require('./assets/jfdh.png'), linkUrl: '../AppCreditPoints/AppGridIntegral'},
{title: '我收到的评价', img: require('./assets/wsddpj.png'), linkUrl: '../AppCreditPoints/AppGridIntegral'},
- ]
+ ],
}
},
methods: {
@@ -53,8 +53,11 @@ export default {
linkTo(url) {
uni.navigateTo({url})
},
+ handleSignClick() {
+ this.$u.debounce(this.handleSignIn, 500)
+ },
handleSignIn() {
- !this.signIn && wx.getLocation({
+ !this.signIn ? uni.getLocation({
success: res => {
const {latitude: lat, longitude: lng} = res
if (!!lat && !!lng) {
@@ -77,8 +80,9 @@ export default {
}
}).catch(err => this.$u.toast(err))
} else this.$u.toast("无法获取到定位!")
- }
- })
+ },
+ fail: () => this.$u.toast("获取定位失败,请重新尝试!")
+ }) : this.$u.toast("已签到,请勿重复签到!")
}
},
onShow() {
@@ -173,17 +177,36 @@ export default {
.signBtn {
min-width: 144px;
- text-align: center;
border: 1px solid #1365DD;
color: #1365DD;
- line-height: 52px;
+ height: 52px;
border-radius: 4px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
&.signIn {
border-color: #ccc;
color: #666;
background: #eee;
}
+
+ &:after {
+ content: " ";
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ background: #1365DD;
+ opacity: 0;
+ transition: .3s;
+ }
+
+ &:active:after {
+ background: transparent;
+ opacity: 0.4;
+ transition: 0s; /*取消过渡*/
+ }
}
}