|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
<n-descriptions-item label="昵称">
|
|
|
<n-space>
|
|
|
- <span class="default_text_value" type="info">{{ user.nickname }}</span>
|
|
|
+ <span class="default_text_value" type="info">{{ userInfo.nick }}</span>
|
|
|
</n-space>
|
|
|
</n-descriptions-item>
|
|
|
|
|
@@ -39,7 +39,7 @@
|
|
|
</n-space>
|
|
|
</n-descriptions-item>
|
|
|
|
|
|
- <n-descriptions-item label="近90天登录">
|
|
|
+ <!-- <n-descriptions-item label="近90天登录">
|
|
|
<n-space>
|
|
|
<span class="default_text_value">{{ attr.loginCount ?? 0 }}次</span>
|
|
|
</n-space>
|
|
@@ -55,8 +55,8 @@
|
|
|
<n-space>
|
|
|
<span class="default_text_value">{{ attr.onlineDuration ?? '' }}</span>
|
|
|
</n-space>
|
|
|
- </n-descriptions-item>
|
|
|
-
|
|
|
+ </n-descriptions-item>-->
|
|
|
+
|
|
|
<n-descriptions-item label="注册时间(当前服)">
|
|
|
<n-space>
|
|
|
<span class="default_text_value">{{ user.createtime }}</span>
|
|
@@ -67,7 +67,6 @@
|
|
|
<span class="default_text_value">{{ attr.lastlogintick ?? '' }}</span>
|
|
|
</n-space>
|
|
|
</n-descriptions-item>
|
|
|
-
|
|
|
</n-descriptions>
|
|
|
</template>
|
|
|
</n-card>
|
|
@@ -86,7 +85,7 @@
|
|
|
size="large"
|
|
|
v-show="!showModifyBase"
|
|
|
>
|
|
|
- <n-descriptions-item label="玩家金币">
|
|
|
+ <n-descriptions-item label="玩家等级">
|
|
|
<!-- --><!-- <template #label>玩家等级</template> -->
|
|
|
<n-space>
|
|
|
<span class="default_text_value">{{ userInfo.userLevel }}</span>
|
|
@@ -94,18 +93,18 @@
|
|
|
</n-descriptions-item>
|
|
|
<n-descriptions-item label="玩家金币">
|
|
|
<n-space>
|
|
|
- <span class="default_text_value">{{ userInfo.coin }}</span>
|
|
|
+ <span class="default_text_value">{{ materials.coin }}</span>
|
|
|
</n-space>
|
|
|
</n-descriptions-item>
|
|
|
<n-descriptions-item label="玩家钻石">
|
|
|
<n-space>
|
|
|
- <span class="default_text_value">{{ userInfo.diamond }}</span>
|
|
|
+ <span class="default_text_value">{{ materials.diamond }}</span>
|
|
|
</n-space>
|
|
|
</n-descriptions-item>
|
|
|
</n-descriptions>
|
|
|
</n-card>
|
|
|
|
|
|
- <n-card
|
|
|
+ <!-- <n-card
|
|
|
:bordered="true"
|
|
|
title="充值与消费 (消费数据统计时间从2022年9月1日开始)"
|
|
|
class="proCard mt-2"
|
|
@@ -126,7 +125,7 @@
|
|
|
</n-descriptions-item>
|
|
|
</n-descriptions>
|
|
|
</template>
|
|
|
- </n-card>
|
|
|
+ </n-card>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -137,20 +136,19 @@
|
|
|
import { timestampToTime } from '@/utils/dateUtil';
|
|
|
import {
|
|
|
getPlayerAttr,
|
|
|
- getSigninCount,
|
|
|
+ // getSigninCount,
|
|
|
getUserAccountInfo,
|
|
|
- orderStatistics,
|
|
|
+ // orderStatistics,
|
|
|
} from '@/api/account/list';
|
|
|
import { UtilsTool } from '@/utils/macd/UtilsTool';
|
|
|
import { RetrofitGroupOptions } from '@/api/echarts/rechargeList';
|
|
|
//import { useRouter } from 'vue-router';
|
|
|
import { getServerName } from '@/utils/admin';
|
|
|
|
|
|
-
|
|
|
const singleBan = reactive({
|
|
|
ban: false,
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
const paySwitch = reactive({
|
|
|
pay: false,
|
|
|
});
|
|
@@ -169,14 +167,12 @@
|
|
|
userInfo: userInfoObj,
|
|
|
});
|
|
|
|
|
|
-
|
|
|
//const router = useRouter();
|
|
|
const retrofitOptions = ref([]);
|
|
|
const message = useMessage();
|
|
|
const loading = ref(false);
|
|
|
const showModifyBase = ref(false);
|
|
|
|
|
|
-
|
|
|
let user = reactive({
|
|
|
openid: '',
|
|
|
nickname: '',
|
|
@@ -188,10 +184,10 @@
|
|
|
let attr = reactive({
|
|
|
lastlogintick: '',
|
|
|
lastlogouttick: '',
|
|
|
- location: '',
|
|
|
- signinCount: 0,
|
|
|
- advCount: 0,
|
|
|
- onlineDuration: '',
|
|
|
+ // location: '',
|
|
|
+ // signinCount: 0,
|
|
|
+ // advCount: 0,
|
|
|
+ // onlineDuration: '',
|
|
|
serverId: 0,
|
|
|
accId: 0,
|
|
|
openId: '',
|
|
@@ -210,11 +206,16 @@
|
|
|
rechargeAmount: 0,
|
|
|
});
|
|
|
|
|
|
+ const materials = reactive({
|
|
|
+ coin: 0,
|
|
|
+ diamond: 0,
|
|
|
+ });
|
|
|
|
|
|
function loadBaseInfo() {
|
|
|
new Promise((_resolve, _reject) => {
|
|
|
getUserAccountInfo({ playerid: props.userId })
|
|
|
.then((res) => {
|
|
|
+ console.log('getUserAccountInfo res::', res);
|
|
|
// 用户信息
|
|
|
// user.openid = res.openid;
|
|
|
// user.nickname = res.nickname;
|
|
@@ -232,23 +233,27 @@
|
|
|
new Promise((_resolve, _reject) => {
|
|
|
getPlayerAttr({ playerid: props.userId })
|
|
|
.then((res) => {
|
|
|
+ console.log('getPlayerAttr res::', res);
|
|
|
// 属性
|
|
|
attr.lastlogintick = res.lastlogintick > 0 ? timestampToTime(res.lastlogintick) : '';
|
|
|
attr.lastlogouttick = res.lastlogouttick > 0 ? timestampToTime(res.lastlogouttick) : '';
|
|
|
- if (res.location !== null && res.location !== '') {
|
|
|
- attr.location = res.location.slice(0, -2);
|
|
|
- }
|
|
|
+ // if (res.location !== null && res.location !== '') {
|
|
|
+ // attr.location = res.location.slice(0, -2);
|
|
|
+ // }
|
|
|
|
|
|
- attr.advCount = res.advCount;
|
|
|
- attr.onlineDuration = res.onlineDuration;
|
|
|
+ // attr.advCount = res.advCount;
|
|
|
+ // attr.onlineDuration = res.onlineDuration;
|
|
|
attr.accId = res.accId;
|
|
|
- attr.serverId = res.serverId;
|
|
|
+ attr.serverId = res.line;
|
|
|
attr.openId = res.openId;
|
|
|
user.nickname = res.nickName;
|
|
|
user.createtime = res.create_time > 0 ? timestampToTime(res.create_time) : '';
|
|
|
|
|
|
paySwitch.pay = res.paySwitch == 1;
|
|
|
-
|
|
|
+ const userMaterials = JSON.parse(res.materials);
|
|
|
+ console.log('userMaterials::', userMaterials);
|
|
|
+ materials.coin = userMaterials[3001];
|
|
|
+ materials.diamond = userMaterials[3002];
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
// message.error(error.toString());
|
|
@@ -256,41 +261,41 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- new Promise((_resolve, _reject) => {
|
|
|
- orderStatistics({ playerid: props.userId })
|
|
|
- .then((res) => {
|
|
|
- if (res.orderPlatform == 1) {
|
|
|
- order.orderPlatform = '安卓';
|
|
|
- } else {
|
|
|
- order.orderPlatform = '苹果';
|
|
|
- }
|
|
|
-
|
|
|
- order.rechargeCount = res.rechargeCount;
|
|
|
- order.rechargeDiamondCount = res.rechargeDiamondCount;
|
|
|
- order.rechargeAmount = res.rechargeAmount;
|
|
|
- order.firstChargeAt = res.firstChargeAt > 0 ? timestampToTime(res.firstChargeAt) : '';
|
|
|
- order.lastChargeAt = res.lastChargeAt > 0 ? timestampToTime(res.lastChargeAt) : '';
|
|
|
-
|
|
|
- order.consumptionCoinCount = UtilsTool.unitConversion(res.consumptionCoinCount);
|
|
|
- order.consumptionDiamondCount = UtilsTool.unitConversion(res.consumptionDiamondCount);
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- // message.error(error.toString());
|
|
|
- console.log('error:' + error.toString());
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- new Promise((_resolve, _reject) => {
|
|
|
- getSigninCount({ playerid: props.userId })
|
|
|
- .then((res) => {
|
|
|
- attr.signinCount = res.signinCount;
|
|
|
- attr.loginCount = res.loginCount;
|
|
|
- })
|
|
|
- .catch((e: Error) => {
|
|
|
- // message.error(e.message ?? '操作失败');
|
|
|
- console.log('error:' + e.message);
|
|
|
- });
|
|
|
- });
|
|
|
+ // new Promise((_resolve, _reject) => {
|
|
|
+ // orderStatistics({ playerid: props.userId })
|
|
|
+ // .then((res) => {
|
|
|
+ // if (res.orderPlatform == 1) {
|
|
|
+ // order.orderPlatform = '安卓';
|
|
|
+ // } else {
|
|
|
+ // order.orderPlatform = '苹果';
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // order.rechargeCount = res.rechargeCount;
|
|
|
+ // order.rechargeDiamondCount = res.rechargeDiamondCount;
|
|
|
+ // order.rechargeAmount = res.rechargeAmount;
|
|
|
+ // order.firstChargeAt = res.firstChargeAt > 0 ? timestampToTime(res.firstChargeAt) : '';
|
|
|
+ // order.lastChargeAt = res.lastChargeAt > 0 ? timestampToTime(res.lastChargeAt) : '';
|
|
|
+ //
|
|
|
+ // order.consumptionCoinCount = UtilsTool.unitConversion(res.consumptionCoinCount);
|
|
|
+ // order.consumptionDiamondCount = UtilsTool.unitConversion(res.consumptionDiamondCount);
|
|
|
+ // })
|
|
|
+ // .catch((error) => {
|
|
|
+ // // message.error(error.toString());
|
|
|
+ // console.log('error:' + error.toString());
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ // new Promise((_resolve, _reject) => {
|
|
|
+ // getSigninCount({ playerid: props.userId })
|
|
|
+ // .then((res) => {
|
|
|
+ // attr.signinCount = res.signinCount;
|
|
|
+ // attr.loginCount = res.loginCount;
|
|
|
+ // })
|
|
|
+ // .catch((e: Error) => {
|
|
|
+ // // message.error(e.message ?? '操作失败');
|
|
|
+ // console.log('error:' + e.message);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
watch(props, (_newVal, _oldVal) => {
|
|
@@ -298,7 +303,7 @@
|
|
|
});
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- console.log(props)
|
|
|
+ console.log(props);
|
|
|
if (props.userId < 1) {
|
|
|
console.log('传入用户信息不正确,props.userId:', props.userId);
|
|
|
return;
|
|
@@ -320,7 +325,6 @@
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|