事件上报登录

This commit is contained in:
liuye
2023-05-18 11:48:58 +08:00
parent 98d266845a
commit eaab46eb76

View File

@@ -93,11 +93,12 @@
<div class="btn-wrapper">
<div class="btn" hover-class="text-hover" @click="submit">提交</div>
</div>
<AiLogin ref="login"/>
</div>
</template>
<script>
import {mapState} from 'vuex'
import {mapActions, mapState} from 'vuex'
export default {
appName: "上报事件",
@@ -122,16 +123,23 @@ export default {
},
computed: {
...mapState(['user'])
...mapState(['user', 'token'])
},
onLoad() {
this.getDict()
this.form.phone = this.user.phone
this.form.name = this.user.realName || ''
this.autoLogin()
},
onShow() {
this.$nextTick(() => {
this.token && this.getUserInfo()
this.getDict()
this.form.phone = this.user.phone
this.form.name = this.user.realName || ''
})
},
methods: {
...mapActions(['autoLogin', 'getUserInfo']),
chooseAddress() {
uni.authorize({
scope: 'scope.userLocation',