|
@@ -1,42 +1,62 @@
|
|
|
<template>
|
|
<template>
|
|
|
<FlexCol :padding="[40,30,50,30]">
|
|
<FlexCol :padding="[40,30,50,30]">
|
|
|
|
|
+ <HomeLargeTitle title="我的" />
|
|
|
<Touchable
|
|
<Touchable
|
|
|
- direction="column"
|
|
|
|
|
- justify="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
|
|
+ direction="row"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ justify="space-between"
|
|
|
touchable
|
|
touchable
|
|
|
:gap="25"
|
|
:gap="25"
|
|
|
|
|
+ :padding="[0,30]"
|
|
|
@click="goUserProfile"
|
|
@click="goUserProfile"
|
|
|
>
|
|
>
|
|
|
- <Image
|
|
|
|
|
- :src="userInfo?.avatar || UserHead"
|
|
|
|
|
- :defaultImage="UserHead"
|
|
|
|
|
- :failedImage="UserHead"
|
|
|
|
|
- mode="aspectFill"
|
|
|
|
|
- class="avatar"
|
|
|
|
|
- width="100rpx"
|
|
|
|
|
- height="100rpx"
|
|
|
|
|
- :showFailed="false"
|
|
|
|
|
- round
|
|
|
|
|
- />
|
|
|
|
|
- <H4 v-if="userInfo">{{ userInfo.nickname }}</H4>
|
|
|
|
|
- <H4 v-else>欢迎登录</H4>
|
|
|
|
|
- <H4 v-if="userInfo">{{ userInfo.mobile }}</H4>
|
|
|
|
|
|
|
+ <FlexRow align="center" :gap="25">
|
|
|
|
|
+ <Image
|
|
|
|
|
+ :src="userInfo?.avatar || UserHead"
|
|
|
|
|
+ :defaultImage="UserHead"
|
|
|
|
|
+ :failedImage="UserHead"
|
|
|
|
|
+ mode="aspectFill"
|
|
|
|
|
+ class="avatar"
|
|
|
|
|
+ width="100rpx"
|
|
|
|
|
+ height="100rpx"
|
|
|
|
|
+ :showFailed="false"
|
|
|
|
|
+ round
|
|
|
|
|
+ />
|
|
|
|
|
+ <H4 v-if="userInfo">{{ userInfo.nickname }}</H4>
|
|
|
|
|
+ <H4 v-else>欢迎登录</H4>
|
|
|
|
|
+ <H4 v-if="userInfo">{{ userInfo.mobile }}</H4>
|
|
|
|
|
+ </FlexRow>
|
|
|
|
|
+ <Icon icon="arrow-right" size="30" />
|
|
|
</Touchable>
|
|
</Touchable>
|
|
|
- <Height :height="50" />
|
|
|
|
|
- <CellGroup round>
|
|
|
|
|
- <Cell v-if="userInfo" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-edit.png" title="我的投稿" showArrow touchable @click="navTo('/pages/dig/forms/submits', {
|
|
|
|
|
- villageVolunteerId: volunteerInfoLoader.content.value?.id || 0
|
|
|
|
|
- })" />
|
|
|
|
|
- <Cell v-if="userInfo" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-profile.png" title="编辑资料" showArrow touchable @click="goUserProfile" />
|
|
|
|
|
- <Cell v-if="userInfo && !isBindWx" icon="wechat" title="绑定微信" showArrow touchable @click="navTo('/pages/dig/sharereg/bind-wx')" />
|
|
|
|
|
- <Cell icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-function.png" title="关于我们" showArrow touchable @click="navTo('/pages/home/about/about')" />
|
|
|
|
|
- <button open-type="contact" class="remove-button-style">
|
|
|
|
|
- <Cell icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-service.png" title="联系客服" showArrow touchable />
|
|
|
|
|
- </button>
|
|
|
|
|
- <Cell icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-chat.png" title="商务合作" showArrow touchable @click="navTo('/pages/home/about/contract')" />
|
|
|
|
|
- <Cell v-if="userInfo" icon="https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/icon-quit.png" title="退出登录" showArrow touchable @click="doLogout" />
|
|
|
|
|
- </CellGroup>
|
|
|
|
|
|
|
+ <ProvideVar :vars="{
|
|
|
|
|
+ GridItemIconSize: 90,
|
|
|
|
|
+ GridItemBackgroundColor: 'transparent',
|
|
|
|
|
+ GridItemPaddingHorizontal: 0,
|
|
|
|
|
+ }">
|
|
|
|
|
+ <Grid :borderGrid="false" :mainAxisCount="4">
|
|
|
|
|
+ <GridItem title="乡源等级" icon="/static/images/mine/IconLevel.png" touchable />
|
|
|
|
|
+ <GridItem title="我的成就" icon="/static/images/mine/IconArchive.png" touchable />
|
|
|
|
|
+ <GridItem title="任务中心" icon="/static/images/mine/IconTask.png" touchable />
|
|
|
|
|
+ <GridItem title="积分商城" icon="/static/images/mine/IconShop.png" touchable />
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </ProvideVar>
|
|
|
|
|
+ <ProvideVar :vars="{
|
|
|
|
|
+ CellBackground: 'background.tertiary',
|
|
|
|
|
+ CellBottomBorder: false,
|
|
|
|
|
+ }">
|
|
|
|
|
+ <CellGroup round>
|
|
|
|
|
+ <Cell v-if="userInfo" icon="/static/images/mine/IconMyArticle.png" title="我的投稿" showArrow touchable @click="navTo('/pages/dig/forms/submits', {
|
|
|
|
|
+ villageVolunteerId: volunteerInfoLoader.content.value?.id || 0
|
|
|
|
|
+ })" />
|
|
|
|
|
+ <Cell icon="/static/images/mine/IconMyRecord.png" title="福泽记录" showArrow touchable />
|
|
|
|
|
+ <Cell icon="/static/images/mine/IconMyReward.png" title="兑换记录" showArrow touchable />
|
|
|
|
|
+ <Cell icon="/static/images/mine/IconAbout.png" title="关于我们" showArrow touchable @click="navTo('/pages/home/about/about')" />
|
|
|
|
|
+ <button open-type="contact" class="remove-button-style">
|
|
|
|
|
+ <Cell icon="/static/images/mine/IconContract.png" title="联系客服" showArrow touchable />
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <Cell v-if="userInfo" icon="/static/images/mine/IconQuit.png" title="退出登录" showArrow touchable @click="doLogout" />
|
|
|
|
|
+ </CellGroup>
|
|
|
|
|
+ </ProvideVar>
|
|
|
<DebugButton />
|
|
<DebugButton />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
</template>
|
|
</template>
|
|
@@ -57,12 +77,17 @@ import FlexCol from '@/components/layout/FlexCol.vue';
|
|
|
import AppCofig from '@/common/config/AppCofig';
|
|
import AppCofig from '@/common/config/AppCofig';
|
|
|
import VillageApi from '@/api/inhert/VillageApi';
|
|
import VillageApi from '@/api/inhert/VillageApi';
|
|
|
import DebugButton from './debug/DebugButton.vue';
|
|
import DebugButton from './debug/DebugButton.vue';
|
|
|
|
|
+import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
|
|
+import Icon from '@/components/basic/Icon.vue';
|
|
|
|
|
+import HomeLargeTitle from '@/common/components/parts/HomeLargeTitle.vue';
|
|
|
|
|
+import ProvideVar from '@/components/theme/ProvideVar.vue';
|
|
|
|
|
+import Grid from '@/components/layout/grid/Grid.vue';
|
|
|
|
|
+import GridItem from '@/components/layout/grid/GridItem.vue';
|
|
|
|
|
|
|
|
const UserHead = 'https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/avatar.png';
|
|
const UserHead = 'https://mncdn.wenlvti.net/app_static/xiangyuan/images/user/avatar.png';
|
|
|
|
|
|
|
|
const authStore = useAuthStore();
|
|
const authStore = useAuthStore();
|
|
|
const userInfo = computed(() => authStore.isLogged ? authStore.userInfo : null);
|
|
const userInfo = computed(() => authStore.isLogged ? authStore.userInfo : null);
|
|
|
-const isBindWx = computed(() => Boolean(userInfo.value?.openId));
|
|
|
|
|
const volunteerInfoLoader = useSimpleDataLoader(async () => await VillageApi.getVolunteerInfo(), true);
|
|
const volunteerInfoLoader = useSimpleDataLoader(async () => await VillageApi.getVolunteerInfo(), true);
|
|
|
|
|
|
|
|
function goUserProfile() {
|
|
function goUserProfile() {
|