完善定位功能

This commit is contained in:
2025-05-02 14:41:47 +08:00
parent 05aaed3b16
commit c7b6aacafb
268 changed files with 8649 additions and 3000 deletions

View File

@ -23,7 +23,7 @@
<view class="u-flex u-row-center">
<u-image :src="cloudPath + 'img/icon_balance.png'" width="52" height="52"></u-image>
<view class="u-m-l-60 u-text-center">
<view class="nr">0.00</view>
<view class="nr">{{userInfo.user_money || 0.00}}</view>
<view class="text-default xs">余额</view>
</view>
</view>
@ -31,7 +31,7 @@
<view class="u-flex u-row-center">
<u-image :src="cloudPath + 'img/icon_points.png'" width="52" height="52"></u-image>
<view class="u-m-l-60 u-text-center">
<view class="nr">0.00</view>
<view class="nr">{{ userInfo.user_integral || 0}}</view>
<view class="text-default xs">积分</view>
</view>
</view>
@ -39,7 +39,7 @@
<view class="u-flex u-row-center">
<u-image :src="cloudPath + 'img/icon_coupon.png'" width="52" height="52"></u-image>
<view class="u-m-l-60 u-text-center">
<view class="nr">0</view>
<view class="nr">{{ userInfo.coupon || 0}}</view>
<view class="text-default xs u-text-center"></view>
</view>
</view>
@ -72,6 +72,7 @@
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
import { getConfig } from '@/api/app'
import { getMenu } from '@/api/store'
import { setTabbar } from '@/utils/tools'
@ -120,6 +121,12 @@
url: '/pages/signin/signin'
})
}
},
computed: {
...mapGetters(['cartNum', 'userInfo', 'inviteCode', 'appConfig', 'cityInfo']),
statusBar() {
return uni.getSystemInfoSync().statusBarHeight + 10
}
}
}
</script>

View File

@ -5,14 +5,30 @@
<view class="u-text-center text-fff lg" :style="{paddingTop: statusBar + 'px'}">我的</view>
<!-- #endif -->
<view class="u-p-t-60 px32 row-between" @click="toProfile">
<view class="row u-col-top text-fff">
<view>
<u-avatar :src="cloudPath + 'img/icon_avatar.png'" mode="square" size="112"></u-avatar>
<view class="u-p-t-60 px32 row-between">
<view class="text-fff">
<view v-if="isLogin">
<navigator class="row u-col-top" url="/pages/my/profile" hover-class="none">
<view>
<u-avatar :src="userInfo.avatar ? userInfo.avatar : cloudPath + 'img/icon_avatar_empty2.png'" size="112"></u-avatar>
</view>
<view class="u-m-l-32 nr u-m-10">
<view>{{ userInfo.nickname }}</view>
<view class="u-m-t-16">{{userInfo.mobile || userInfo.sn}}</view>
</view>
</navigator>
</view>
<view class="u-m-l-32 nr u-m-10">
<view>用户昵称</view>
<view class="u-m-t-16">18749957626</view>
<view v-if="!isLogin">
<navigator class="row u-col-top" url="/pages/login/login" hover-class="none">
<view>
<u-avatar :src="cloudPath + 'img/icon_avatar_empty2.png'" size="112"></u-avatar>
</view>
<view class="u-m-l-32 nr u-m-10">
<view>点击登录</view>
<view class="u-m-t-16">登录体验更多功能</view>
</view>
</navigator>
</view>
</view>
<view>
@ -64,7 +80,7 @@
<u-image :src="cloudPath + 'img/icon_my_coupon.png'" width="64" height="64"></u-image>
<view class="grid-text mt10">我的优惠券</view>
</u-grid-item>
<u-grid-item>
<u-grid-item @tap="toSetting">
<u-image :src="cloudPath + 'img/icon_my_setting.png'" width="64" height="64"></u-image>
<view class="grid-text mt10">设置</view>
</u-grid-item>
@ -85,6 +101,8 @@
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
export default {
data() {
return {
@ -92,7 +110,8 @@
},
onLoad() {
console.log(uni.getSystemInfoSync())
console.log(this.isLogin)
console.log(this.userInfo)
},
methods: {
@ -108,9 +127,17 @@
uni.navigateTo({
url: '/pages/my/wallet'
})
},
// 去设置页
toSetting() {
uni.navigateTo({
url: '/bundle/pages/setting/setting'
})
}
},
computed: {
...mapGetters(['cartNum', 'userInfo', 'inviteCode', 'appConfig']),
statusBar() {
return uni.getSystemInfoSync().statusBarHeight + 10
}

View File

@ -75,8 +75,19 @@
</template>
<script>
import { mapActions, mapMutations, mapGetters } from 'vuex'
export default {
data() {
return {
}
},
methods: {
chooseStore() {
// this.setCityInfo(city);
}
}
}
</script>