优化页面
This commit is contained in:
@@ -23,6 +23,8 @@ import contentList from "../../components/contentList/contentList";
|
||||
import tabBar from "../../components/tabBar/tabBar";
|
||||
import TUIlogin from "../../components/TUILogin.js";
|
||||
import TencentCloudChat from "@tencentcloud/chat";
|
||||
import { useCounterStore } from '@/stores/counter'
|
||||
const counter = useCounterStore()
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
@@ -37,6 +39,7 @@ export default {
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.info = res.data;
|
||||
counter.$patch({ myitem:this.info})
|
||||
uni.getStorage({
|
||||
key: "myuserSig",
|
||||
success: (res) => {
|
||||
|
||||
@@ -12,10 +12,20 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view class="logout" @click="pkInformation">pk信息</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="logout" @click="pkRecord">我的pk记录</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="logout" @click="contact">联系客服</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="logout" @click="logout">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="copyright">版权所有 © 2025 ...................</view>
|
||||
<view class="tabBar">
|
||||
<tabBar></tabBar>
|
||||
</view>
|
||||
@@ -38,6 +48,22 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
pkInformation() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/pkInformation",
|
||||
});
|
||||
},
|
||||
pkRecord() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/pkRecord",
|
||||
});
|
||||
},
|
||||
contact() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mine/minecomponents/contact",
|
||||
});
|
||||
},
|
||||
|
||||
goSetting() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/Setting/Setting",
|
||||
@@ -106,4 +132,25 @@ export default {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.logout{
|
||||
margin-top: 20rpx;
|
||||
width: 100vw;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
color: #000000;
|
||||
font-size: 36rpx;
|
||||
background: #ffffff;
|
||||
border-top: 1px solid #000000;
|
||||
border-bottom: 1px solid #000000;
|
||||
text-align: center;
|
||||
}
|
||||
.copyright{
|
||||
position: absolute;
|
||||
bottom: 250rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
|
||||
31
pages/Mine/minecomponents/contact.vue
Normal file
31
pages/Mine/minecomponents/contact.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<view class="contact">
|
||||
<h1>联系方式</h1>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// 页面加载时执行
|
||||
},
|
||||
methods: {
|
||||
// 方法定义
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.contact{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
237
pages/Mine/minecomponents/pkInformation.vue
Normal file
237
pages/Mine/minecomponents/pkInformation.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<view class="pkRecord">
|
||||
<view>返回</view>
|
||||
<view>pk信息</view>
|
||||
<view></view>
|
||||
</view>
|
||||
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
refresher-threshold="40"
|
||||
@refresherrefresh="onRefresherRefresh"
|
||||
lower-threshold="100"
|
||||
@scrolltolower="onScrollToLower"
|
||||
>
|
||||
<uni-card v-for="(item, index) in list">
|
||||
<view class="content-list" @click="goDetail(item)">
|
||||
<!-- `````````````````````````` -->
|
||||
<image class="headShot" :src="item.anchorIcon" mode="scaleToFill" />
|
||||
<!-- `````````````````````````````````````` -->
|
||||
<view class="content-list-title">
|
||||
<view class="cardname">{{ item.anchorId }}</view>
|
||||
<view class="content-list-info">
|
||||
<view
|
||||
:class="{ Gendermale: item.sex === '1', Genderfemale: item.sex === '2' }"
|
||||
>
|
||||
<image
|
||||
v-if="item.sex === '2'"
|
||||
class="Genderimg"
|
||||
src="../../../static/female.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
class="Genderimg"
|
||||
src="../../../static/male.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view class="age">性别</view>
|
||||
</view>
|
||||
<view class="RoomID">PK时间: {{ formatDate(item.pkTime) }}</view>
|
||||
<view>国家</view>
|
||||
<view>性别</view>
|
||||
<view class="Charm">金币:</view>
|
||||
<view class="charmValue"> {{ item.coin + "K" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- `````````````````````````````````````````````````````` -->
|
||||
</view>
|
||||
</uni-card>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../../components/request.js";
|
||||
import formatDate from "../../../components/formatDate.js";
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
page: 0, //页码
|
||||
size: 10, //每页条数
|
||||
list: [], // 列表数据
|
||||
detailsdata: {}, //详情数据
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完成后请求数据
|
||||
this.pkList();
|
||||
},
|
||||
methods: {
|
||||
onRefresherRefresh() {
|
||||
this.page = 0;
|
||||
this.list = [];
|
||||
this.pkList();
|
||||
},
|
||||
async goDetail(item) {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
mask: true,
|
||||
});
|
||||
console.log("id", item.id);
|
||||
const res = await request({
|
||||
url: "pk/pkInfoDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: item.id,
|
||||
},
|
||||
userInfo: true,
|
||||
});
|
||||
console.log("res", res);
|
||||
this.detailsdata = res.data;
|
||||
if (res.code === 200) {
|
||||
if (res.data.length !== 0) {
|
||||
uni.hideLoading();
|
||||
console.log("res.data", res.data);
|
||||
uni.navigateTo({
|
||||
url: "/pages/pkDetail/pkDetail",
|
||||
success: (res) => {
|
||||
res.eventChannel.emit("itemDetail", {
|
||||
item: this.detailsdata,
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
this.openPopupQuantity();
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "加载失败",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
},
|
||||
formatDate: formatDate,
|
||||
async pkList() {
|
||||
const res = await request({
|
||||
url: "pk/pkList",
|
||||
method: "POST",
|
||||
data: {
|
||||
status: 0,
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.list.push(...res.data);
|
||||
console.log(this.list);
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pkRecord{
|
||||
width: 100vw;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #ffffff;
|
||||
padding-top: 40rpx;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
.scroll {
|
||||
height: 90%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.content-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 712rpx;
|
||||
height: 161rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 12rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.headShot {
|
||||
width: 101rpx;
|
||||
height: 101rpx;
|
||||
border-radius: 50rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 33rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
.content-list-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.cardname {
|
||||
font-size: 31rpx;
|
||||
color: #161616;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.Genderimg {
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.age {
|
||||
color: #ffffff;
|
||||
font-size: 14rpx;
|
||||
}
|
||||
|
||||
.Gendermale {
|
||||
background: url(../../static/maleimg.png) no-repeat center;
|
||||
width: 56.3rpx;
|
||||
height: 29.58rpx;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.Genderfemale {
|
||||
background: url(../../static/femaleimg.png) no-repeat center;
|
||||
width: 56.3rpx;
|
||||
height: 29.58rpx;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.RoomID {
|
||||
font-size: 23rpx;
|
||||
color: #a3a3a3;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.Charm {
|
||||
font-size: 23rpx;
|
||||
color: #a3a3a3;
|
||||
line-height: 38rpx;
|
||||
margin-right: 12rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.charmValue {
|
||||
font-size: 23rpx;
|
||||
color: #161616;
|
||||
line-height: 38rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
125
pages/Mine/minecomponents/pkRecord.vue
Normal file
125
pages/Mine/minecomponents/pkRecord.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view class="pkRecord">
|
||||
<view>返回</view>
|
||||
<view>pk记录</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="Navigation">
|
||||
<view class="PkPosted">我发布的PK</view>
|
||||
<view>我邀请的PK</view>
|
||||
</view>
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
class="scroll"
|
||||
refresher-enabled="true"
|
||||
refresher-threshold="40"
|
||||
@refresherrefresh="onRefresherRefresh"
|
||||
lower-threshold="100"
|
||||
@scrolltolower="onScrollToLower"
|
||||
>
|
||||
<uni-card v-for="(item, index) in list">
|
||||
<view class="content">
|
||||
<view class="Anchor">
|
||||
<view class="avatar">主播1头像(赢方头像框王冠)</view>
|
||||
<view class="AnchorInfo">
|
||||
<view>主播昵称</view>
|
||||
<view>pk时间</view>
|
||||
<view>实际打了多少金币</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
VS
|
||||
</view>
|
||||
<view class="Anchor">
|
||||
<view class="AnchorInfo">
|
||||
<view>主播昵称</view>
|
||||
<view>pk时间</view>
|
||||
<view>实际打了多少金币</view>
|
||||
</view>
|
||||
<view class="avatar">主播1头像</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</uni-card>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// 页面加载时执行
|
||||
},
|
||||
methods: {
|
||||
// 方法定义
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pkRecord{
|
||||
width: 100vw;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #ffffff;
|
||||
padding-top: 40rpx;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
.content{
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.avatar{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
font-size: 20rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
.Anchor{
|
||||
display: flex;
|
||||
}
|
||||
.AnchorInfo{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 10rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.PkPosted{
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
width: 45%;
|
||||
border-right: 1px solid #000000;
|
||||
}
|
||||
.Navigation{
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
</style>
|
||||
@@ -106,7 +106,18 @@
|
||||
>请选择日期</view
|
||||
>
|
||||
</view>
|
||||
|
||||
<!-- ···············································标记2············································ -->
|
||||
<view class="goldCoin">
|
||||
<view class="number-box">
|
||||
<view class="number-box-title">选择场数:</view>
|
||||
<uni-number-box background="#2bff001e" v-model="numberCoins"></uni-number-box>
|
||||
<view class="number-box-title">次</view>
|
||||
</view>
|
||||
<view v-if="numberCoins === '' && Hint === true" class="Hint"
|
||||
>请填写场数</view
|
||||
>
|
||||
</view>
|
||||
<!-- ··························································································· -->
|
||||
<view class="Remarkscss">
|
||||
<uni-easyinput
|
||||
:styles="styles"
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
import request from "../../components/request.js";
|
||||
import postFile from "../../components/postFile.js";
|
||||
import generateFileName from "../../components/generateFileName.js";
|
||||
import { useCounterStore } from '@/stores/counter'
|
||||
const counter = useCounterStore()
|
||||
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
@@ -102,6 +104,7 @@ export default {
|
||||
icon: "success",
|
||||
});
|
||||
uni.setStorageSync("userinfo", res.data.info);
|
||||
counter.$patch({ myitem:this.info.data.info })
|
||||
uni.hideLoading();
|
||||
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||
uni.reLaunch({
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
import request from "../../components/request.js";
|
||||
import genTestUserSig from "../../components/debug/GenerateTestUserSig.js";
|
||||
import TUIlogin from "../../components/TUILogin.js";
|
||||
import { useCounterStore } from '@/stores/counter'
|
||||
const counter = useCounterStore()
|
||||
// const genTestUserSig = require('../../components/debug/GenerateTestUserSig.js');
|
||||
export default {
|
||||
inject: ['$global'],
|
||||
@@ -77,6 +79,7 @@ export default {
|
||||
uni.setStorageSync("chatInfo", this.info.data.chatInfo)
|
||||
uni.setStorageSync("userSig", this.userSig)
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
counter.$patch({ myitem:this.info.data.info })
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
uni.reLaunch({
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
<view> 国家{{ item.country }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>pk场数:3场</view>
|
||||
<view>金币{{ item.coin }}</view>
|
||||
<view>PK时间{{ formatDate(item.pkTime) }}</view>
|
||||
<view>pk场数</view>
|
||||
|
||||
<view>主播备注{{ item.remark }}</view>
|
||||
<button @click="openChat()">聊了个天</button>
|
||||
|
||||
Reference in New Issue
Block a user