|
|
|
@ -18,7 +18,15 @@
|
|
|
|
<image mode="aspectFill" :src="userInfo.avatar_pic" :alt="userInfo.name"
|
|
|
|
<image mode="aspectFill" :src="userInfo.avatar_pic" :alt="userInfo.name"
|
|
|
|
style="width: 60px;height: 60px;border-radius: 4px; margin-right: 12px;" />
|
|
|
|
style="width: 60px;height: 60px;border-radius: 4px; margin-right: 12px;" />
|
|
|
|
<view>
|
|
|
|
<view>
|
|
|
|
<view style="color: rgba(0,0,0,0.85); font-size: 16px;">{{ userInfo.nickname }}
|
|
|
|
<view style="color: rgba(0,0,0,0.85); font-size: 16px;">
|
|
|
|
|
|
|
|
{{ userInfo.nickname }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<wd-tag v-if="userInfo.user_merge" class="mx-1" size="small" type="success">
|
|
|
|
|
|
|
|
v {{ userInfo.user_merge.member_level }}
|
|
|
|
|
|
|
|
</wd-tag>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<wd-button type="warning" @click="showLv = true" size="small" style="margin-left: 10px;">修改等级</wd-button>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style="color: rgba(0,0,0,0.25); font-size: 12px;">
|
|
|
|
<view style="color: rgba(0,0,0,0.25); font-size: 12px;">
|
|
|
|
|
|
|
|
|
|
|
|
@ -116,6 +124,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<wd-toast />
|
|
|
|
<wd-toast />
|
|
|
|
<wd-action-sheet v-model="showAc" :actions="actions" @select="select" />
|
|
|
|
<wd-action-sheet v-model="showAc" :actions="actions" @select="select" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<wd-action-sheet v-model="showLv" :actions="actionsLv" @select="changeLevel" />
|
|
|
|
|
|
|
|
|
|
|
|
<wd-message-box></wd-message-box>
|
|
|
|
<wd-message-box></wd-message-box>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -125,9 +136,11 @@
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import utils from '@/utils/utils.js';
|
|
|
|
import utils from '@/utils/utils.js';
|
|
|
|
import user from '@/api/store/user.js';
|
|
|
|
import user from '@/api/store/user.js';
|
|
|
|
|
|
|
|
import userMembers from '@/api/store/userMembers.js';
|
|
|
|
import yList from "/components/yList/index.vue";
|
|
|
|
import yList from "/components/yList/index.vue";
|
|
|
|
import kevyloading from "@/components/kevy-loading/kevy-loading";
|
|
|
|
import kevyloading from "@/components/kevy-loading/kevy-loading";
|
|
|
|
import { useMessage } from '@/uni_modules/wot-design-uni'
|
|
|
|
import { useMessage } from '@/uni_modules/wot-design-uni'
|
|
|
|
|
|
|
|
import { useApi } from "@/hooks/useApi.js"
|
|
|
|
const message = useMessage()
|
|
|
|
const message = useMessage()
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
@ -255,6 +268,43 @@ onLoad(async (e) => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showLv = ref(false);
|
|
|
|
|
|
|
|
const actionsLv = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const changeLevel = e => {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
user.UpdateLevel({
|
|
|
|
|
|
|
|
user_merge_id: userInfo.value.user_merge.id,
|
|
|
|
|
|
|
|
level: e.item.level,
|
|
|
|
|
|
|
|
}).then(async (res) => {
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
const data = await user.userItem({ id: userInfo.value.id });
|
|
|
|
|
|
|
|
userInfo.value = data.data
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取数据的函数
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
const getmemberList = async () => {
|
|
|
|
|
|
|
|
const { fetchData } = await useApi(userMembers.LevelShow, { loading })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchData().then(res => {
|
|
|
|
|
|
|
|
actionsLv.value = res.data.map(item => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
subname: `等级 ${item.level}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
actionsLv.value.ok = true;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getmemberList()
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|