优化页面

This commit is contained in:
pengxiaolong
2025-06-11 22:16:44 +08:00
parent 3c2d7e5959
commit 931d867c09
806 changed files with 87462 additions and 331 deletions

View File

@@ -8,7 +8,7 @@
</view>
<view class="tabBar">
<tabBar></tabBar>
<tabBar :tabIndex="1"></tabBar>
</view>
</template>

View File

@@ -22,13 +22,13 @@
@scrolltolower="onScrollToLower"
:refresher-triggered="triggered"
>
<uni-card v-if="list.length !== 0" v-for="(item, index) in list">
<uni-card v-if="list.length !== 0" v-for="(item, index) in list" :key="index">
<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="cardname">{{ item.disPlayId }}</view>
<view class="content-list-info">
<view
:class="{ Gendermale: item.sex === '1', Genderfemale: item.sex === '2' }"
@@ -59,7 +59,7 @@
</scroll-view>
</view>
<view class="tabBar">
<tabBar></tabBar>
<tabBar :tabIndex="0"></tabBar>
</view>
</template>
@@ -108,6 +108,7 @@ export default {
key: "chatInfo",
success: (res) => {
this.chatInfo = res.data;
console.log("chatInfo", this.chatInfo);
TUIlogin(this.chatInfo.appId, this.info.id, this.myuserSig.userSig);
},
});
@@ -148,12 +149,14 @@ export default {
title: "加载中...",
mask: true,
});
console.log("id", item.id);
console.log("id", item.id,this.info.id);
//获取详情
const res = await request({
url: "pk/pkInfoDetail",
method: "POST",
data: {
id: item.id,
userId: this.info.id,
},
userInfo: true,
});
@@ -187,6 +190,7 @@ export default {
formatDate: formatDate,
async pkList(condition) {
//获取list
const res = await request({
url: "pk/pkList",
method: "POST",
@@ -195,6 +199,7 @@ export default {
page: this.page,
size: this.size,
condition: condition,
userId: this.info.id,
},
userInfo: false,
});

View File

@@ -109,7 +109,7 @@
<view class="copyright">版权所有 © 2025 ...................</view>
<view class="tabBar">
<tabBar></tabBar>
<tabBar :tabIndex="4"></tabBar>
</view>
</template>
@@ -261,16 +261,20 @@ export default {
.Settings {
width: 46rpx;
height: 46rpx;
margin-left: 360rpx;
margin-left: 30rpx;
}
.SettingsIcon {
width: 100%;
height: 100%;
}
.name {
width: 400rpx;
font-size: 36.26rpx;
font-weight: 500;
color: #161616;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}
.content {
position: absolute;

View File

@@ -127,12 +127,6 @@ export default {
this.page++;
this.getpkList();
},
onRefresherRefres() {
this.page = 0;
this.pkList = [];
this.getpkList();
this.triggered = true;
},
onBack() {
uni.navigateBack({
delta: 1,
@@ -173,12 +167,12 @@ export default {
userInfo: true,
}).then((res) => {
if (res.code == 200) {
this.onRefresherRefresh();
uni.showToast({
title: "删除成功",
icon: "none",
duration: 2000,
});
this.getpkList();
} else {
console.log(res.msg);
}
@@ -273,9 +267,13 @@ export default {
margin-left: 37rpx;
}
.Name {
width: 288.17rpx;
font-size: 30.53rpx;
color: #161616;
font-weight: 500;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}
.time {
margin-top: 13rpx;
@@ -283,6 +281,7 @@ export default {
color: #a3a3a3;
}
.state {
width: 56.3rpx;
height: 30rpx;
background: #f6f6f6;
border-radius: 14rpx;
@@ -290,6 +289,10 @@ export default {
font-size: 17rpx;
color: #666666;
padding: 0 15rpx;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
text-align: center;
}
.Label {
margin-top: 15rpx;

View File

@@ -55,7 +55,7 @@
<view class="AnchorAname"> {{ item.anchorIdA }} </view>
<view class="AnchorATime">{{ formatDate(item.pkTime) }}</view>
<view class="AnchorAICon">
<view class="AnchorAIContext">实际金币:</view>
<view class="AnchorAIContext">实际金币:</view>
<view class="AnchorAIConNum">{{ item.userAcoin }}K</view>
</view>
</view>
@@ -324,9 +324,13 @@ export default {
margin-right: 20rpx;
}
.AnchorAname {
width: 161.26rpx;
font-weight: 500;
font-size: 31rpx;
color: #161616;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}
.AnchorATime {
font-weight: 400;

View File

@@ -1,5 +1,9 @@
<template><view v-if="Display" :class="[Display ? 'create-module' : 'close-animation ', 'Mask']" @click="open()">
<template>
<view
v-if="Display"
:class="[Display ? 'create-module' : 'close-animation ', 'Mask']"
@click="open()"
>
<view @click.stop class="containers">
<view class="container">
<image
@@ -9,11 +13,11 @@
mode="scaleToFill"
/>
<view class="Titlecss">
<view class="Star"></view>
<view class="Star"></view>
<view class="Title"></view>
<view class="Star"></view>
</view>
<!-- <view class="Individual"> -->
<view class="NameAnchor">
<input
@@ -24,105 +28,121 @@
placeholder="主播名称"
:value="nameAnchor"
/>
<view v-if="nameAnchor === ''|| nameAnchor === null && Hint === true" class="Hint"
<view
v-if="nameAnchor === '' || (nameAnchor === null && Hint === true)"
class="Hint"
>请填写主播名称</view
>
</view>
<!-- </view> -->
<view class="Accountnumber">
<view class="Coins country">
<wht-select
style="width: 350rpx"
style="width: 350rpx"
backgroundColor="#ffffff"
placeholderColor="#666666"
textColor="#666666"
borderColor="#ffffff"
@change="country"
:options="Country"
:filterable = "filterable"
:filterable="filterable"
placeholder="请选择国家"
:value="countrys"
/>
<view v-if="countrys === ''|| countrys===null && Hint === true" class="Hint">请选择国家</view>
</view>
<view class="Gender">
<view class="Gendercs">
<view class="Gendercss">
<wht-select
style="width: 300rpx"
backgroundColor="#ffffff"
placeholderColor="#666666"
textColor="#666666"
borderColor="#ffffff"
@change="gender"
:options="Gender"
placeholder="性别"
:value="message.sex === '1'?1:2"
/>
</view>
<view class="Gendericoncss">
<image
v-if="genders === 0 || message.sex === '0'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/ask.png"
mode="scaleToFill"
/>
<image
v-if="genders === 1||message.sex === '1'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/man.png"
mode="scaleToFill"
/>
<image
v-if="genders === 2||message.sex === '2'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/girl.png"
mode="scaleToFill"
/>
</view>
</view>
<view v-if="genders === 0 || genders===null && Hint === true" class="Hintcss">请选择性别</view>
</view>
</view>
<view class="goldCoin">
<view class="number-box">
<view class="number-box-title">金币数量:</view>
<uni-number-box :max="9999999999" background="#03ABA8" v-model="numberCoins" ></uni-number-box>
<view class="number-box-title">单位:</view>
<view class="number-box-unit">K</view>
</view>
<view v-if="numberCoins === ''|| numberCoins === null && Hint === true" class="Hint"
>请填写金币数量</view
<view
v-if="countrys === '' || (countrys === null && Hint === true)"
class="Hint"
>请选择国家</view
>
</view>
<view class="Gender">
<view class="Gendercs">
<view class="Gendercss">
<wht-select
style="width: 300rpx"
backgroundColor="#ffffff"
placeholderColor="#666666"
textColor="#666666"
borderColor="#ffffff"
@change="gender"
:options="Gender"
placeholder="性别"
:value="message.sex === '1' ? 1 : 2"
/>
</view>
<view class="Gendericoncss">
<image
v-if="genders === 0 || message.sex === '0'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/ask.png"
mode="scaleToFill"
/>
<image
v-if="genders === 1 || message.sex === '1'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/man.png"
mode="scaleToFill"
/>
<image
v-if="genders === 2 || message.sex === '2'"
class="Gendericon"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/girl.png"
mode="scaleToFill"
/>
</view>
</view>
<view
v-if="genders === 0 || (genders === null && Hint === true)"
class="Hintcss"
>请选择性别</view
>
</view>
</view>
<view class="goldCoin">
<view class="number-box">
<view class="number-box-title">金币数量:</view>
<uni-number-box
:max="9999999999"
background="#03ABA8"
v-model="numberCoins"
></uni-number-box>
<view class="number-box-title">单位:</view>
<view class="number-box-unit">K</view>
</view>
<view
v-if="numberCoins === '' || (numberCoins === null && Hint === true)"
class="Hint"
>请填写金币数量</view
>
</view>
<view class="time">
<uni-datetime-picker
type="datetime"
hide-second="true"
v-model="datetimesingle"
/>
<view v-if="datetimesingle === ''|| datetimesingle === null && Hint === true" class="Hint"
<view
v-if="datetimesingle === '' || (datetimesingle === null && Hint === true)"
class="Hint"
>请选择日期</view
>
</view>
<!-- ···············································标记2············································ -->
<view class="goldCoin">
<view class="number-box">
<view class="number-box-title">选择场数:</view>
<uni-number-box background="#03ABA8" v-model="session"></uni-number-box>
<view class="number-box-title"></view>
</view>
<view v-if="session === ''|| session === null && Hint === true" class="Hint"
>请填写场数</view
>
<view class="number-box">
<view class="number-box-title">选择场数:</view>
<uni-number-box background="#03ABA8" v-model="session"></uni-number-box>
<view class="number-box-title"></view>
</view>
<!-- ··························································································· -->
<view v-if="session === '' || (session === null && Hint === true)" class="Hint"
>请填写场数</view
>
</view>
<!-- ··························································································· -->
<view class="Remarkscss">
<uni-easyinput
type="textarea"
@@ -139,12 +159,10 @@
</view>
</template>
<script>
import optionsArray from "../../../../components/NationalDictionary.js";
import request from "../../../../components/request.js";
import formatDate from "../../../../components/formatDate.js";
export default {
data() {
return {
@@ -157,20 +175,20 @@ export default {
countrys: "", //国家
nameAnchor: "", //主播名称
numberCoins: "", //金币数量
session: '', //场数
remarks: '', //备注
session: "", //场数
remarks: "", //备注
Display: false,
Hint: false,
datetimesingle: '', //日期
datetimesingle: "", //日期
id: "", //用户id
sendingTime: "", //发送时间
filterable: true, //是否可搜索
};
},
props: {
message:{
message: {
type: Object,
}
},
},
watch: {
message(newQuestion, oldQuestion) {
@@ -182,7 +200,7 @@ export default {
this.nameAnchor = newQuestion.anchorId;
this.countrys = newQuestion.country;
this.genders = newQuestion.sex === "1" ? 1 : 2;
}
},
},
mounted() {
uni.getStorage({
@@ -233,17 +251,26 @@ export default {
async Publish() {
//判断是否为空
if (
this.nameAnchor == "" && this.nameAnchor == null ||
this.genders == 0 && this.genders == null ||
this.numberCoins =="" && this.numberCoins == null ||
this.datetimesingle == "" && this.datetimesingle == null ||
this.countrys == "" && his.countrys == null ||
this.datetimesingle == "" && this.datetimesingle == null ||
this.session == "" && this.session == null
(this.nameAnchor == "" && this.nameAnchor == null) ||
(this.genders == 0 && this.genders == null) ||
(this.numberCoins == "" && this.numberCoins == null) ||
(this.datetimesingle == "" && this.datetimesingle == null) ||
(this.countrys == "" && his.countrys == null) ||
(this.datetimesingle == "" && this.datetimesingle == null) ||
(this.session == "" && this.session == null)
) {
this.Hint = true;
return;
}
//判断备注中是否有特殊字符
if (this.remarks.includes(this.nameAnchor)) {
uni.showToast({
title: "备注中不能包含主播昵称",
icon: "none",
duration: 2000,
});
return;
}
//格式化日期
const isoString = this.datetimesingle.replace(" ", "T");
const timestamp = Date.parse(isoString);
@@ -315,14 +342,26 @@ export default {
/* 定义动画 */
/* 原始进入动画 */
@keyframes slide-in {
from { transform: translateY(100%); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* 新增关闭动画 */
@keyframes slide-out {
from { transform: translateY(0); opacity: 1; }
to { transform: translateY(-100%); opacity: 0; }
from {
transform: translateY(0);
opacity: 1;
}
to {
transform: translateY(-100%);
opacity: 0;
}
}
/* 进入动画类 */
@@ -348,7 +387,7 @@ export default {
margin-left: 30rpx;
margin-top: 10rpx;
}
.Hintcss{
.Hintcss {
color: rgb(255, 0, 0);
font-size: 20rpx;
margin-left: 30rpx;
@@ -375,14 +414,14 @@ export default {
/* margin-bottom: 40rpx; */
margin-left: 90%;
}
.Titlecss{
.Titlecss {
width: 100%;
height: 70rpx;
display: flex;
justify-content: center;
align-items: center;
}
.Star{
.Star {
width: 50rpx;
height: 50rpx;
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);
@@ -414,7 +453,7 @@ export default {
width: 99%;
height: 85rpx;
background-color: #ffffff;
border: 1rpx solid #BFBFBF;
border: 1rpx solid #bfbfbf;
border-radius: 10rpx;
text-align: center;
}
@@ -424,16 +463,16 @@ export default {
flex-direction: column;
justify-content: center;
}
.Gendercs{
.Gendercs {
display: flex;
justify-content: center;
/* align-items: center; */
}
.Gendercss{
.Gendercss {
width: 200rpx;
height: 60rpx;
}
.Gendericoncss{
.Gendericoncss {
display: flex;
justify-content: center;
align-items: center;
@@ -444,7 +483,7 @@ export default {
margin-left: 20rpx;
margin-top: 10rpx;
}
.Gendericon{
.Gendericon {
width: 40rpx;
height: 40rpx;
/* margin-top: 10rpx;
@@ -464,7 +503,7 @@ export default {
/* flex-direction: column; */
}
.country {
margin-left:10rpx;
margin-left: 10rpx;
}
.goldCoin {
width: 100%;
@@ -485,10 +524,10 @@ export default {
margin-left: 17rpx;
}
.number-box-unit {
color: #03ABA8;
color: #03aba8;
width: 48rpx;
height: 48rpx;
border: 1rpx solid #03ABA8;
border: 1rpx solid #03aba8;
border-radius: 50%;
line-height: 48rpx;
text-align: center;
@@ -509,7 +548,7 @@ export default {
margin-left: 5%;
}
.Publishcss {
background-image: linear-gradient(135deg, #4FCACD, #5FDBDE);
background-image: linear-gradient(135deg, #4fcacd, #5fdbde);
/* color: #33ff00; */
color: #ffffff;
font-weight: bold;

View File

@@ -92,7 +92,11 @@
<view class="goldCoin">
<view class="number-box">
<view class="number-box-title">金币数量:</view>
<uni-number-box :max="9999999999" background="#03ABA8" v-model="numberCoins"></uni-number-box>
<uni-number-box
:max="9999999999"
background="#03ABA8"
v-model="numberCoins"
></uni-number-box>
<view class="number-box-title">单位:</view>
<view class="number-box-unit">K</view>
</view>
@@ -126,6 +130,7 @@
type="textarea"
v-model="remarks"
placeholder="备注"
maxlength="-1"
></uni-easyinput>
</view>
@@ -204,43 +209,43 @@ export default {
}
},
//获取主播名称以及头像地址
blur(event){
if(this.nameAnchor !== event.target.value){
blur(event) {
if (this.nameAnchor !== event.target.value) {
this.nameAnchor = event.target.value;
uni.showLoading({
title: "正在验证主播",
mask: true,
});
title: "正在验证主播",
mask: true,
});
uni.request({
url: "https://api.tkpage.yolozs.com/api/"+this.nameAnchor,
success:(res)=>{
if (res.data.code === 200) {
url: "https://python.yolojt.com/api/" + this.nameAnchor,
success: (res) => {
if (res.data.code === 200) {
uni.hideLoading();
uni.showToast({
title: "查询成功",
icon: "none",
duration: 3000,
});
this.AnchorProfilePicture = res.data.data;
} else {
uni.hideLoading();
uni.showToast({
title: "未查询到该主播",
icon: "none",
duration: 3000,
});
}
},
fail: function (res) {
uni.hideLoading();
uni.showToast({
title: "查询成功",
icon: "none",
duration: 3000,
})
this.AnchorProfilePicture = res.data.data;
}else {
uni.hideLoading();
uni.showToast({
title: "未查询到该主播",
icon: "none",
duration: 3000,
})
}
},
fail: function (res) {
uni.hideLoading();
uni.showToast({
uni.showToast({
title: "网络请求失败",
icon: "none",
duration: 3000,
})
},
});
}else{
});
},
});
} else {
return;
}
},
@@ -252,12 +257,21 @@ export default {
this.numberCoins === "" ||
this.countrys === "" ||
this.datetimesingle === "" ||
this.session === ""||
this.session === "" ||
this.AnchorProfilePicture === ""
) {
this.Hint = true;
return;
}
//判断备注中是否有特殊字符
if (this.remarks.includes(this.nameAnchor)) {
uni.showToast({
title: "备注中不能包含主播昵称",
icon: "none",
duration: 2000,
});
return;
}
//格式化日期
const isoString = this.datetimesingle.replace(" ", "T");
const timestamp = Date.parse(isoString);

View File

@@ -133,11 +133,12 @@
</view>
</view>
</view>
<view class="button" v-if="PkIDInfodata.pkStatus === 0">
<!-- 邀请信息 -->
<view class="button" v-if="PkIDInfodata.pkStatus === 0 && ReceiverData.senderId !== id">
<button class="accept" @click="operation(1)">接受邀请</button>
<button class="reject" @click="operation(2)">拒绝邀请</button>
</view>
<view v-if="ReceiverData.senderId === id && PkIDInfodata.pkStatus === 0" class="button buttontext">等待对方接受邀请</view>
<view v-if="PkIDInfodata.pkStatus === 1" class="button buttontext">已接受邀请</view>
<view v-if="PkIDInfodata.pkStatus === 2" class="button buttontext">已拒绝邀请</view>
</view>
@@ -154,9 +155,16 @@ export default {
SenderData: {},
ReceiverData: {},
PkIDInfodata: {},
id: "",
};
},
onLoad(options) {
uni.getStorage({
key: "userinfo",
success: (res) => {
this.id = res.data.id;
},
});
this.customData = JSON.parse(options.customData);
this.getPkyourInfo();
this.getPkmineInfo();

View File

@@ -16,14 +16,14 @@
<script>
import request from "../../components/request.js";
import postFile from "../../components/postFile.js";
import generateFileName from "../../components/generateFileName.js";
import postFile from "../../components/postFile.js";
import generateFileName from "../../components/generateFileName.js";
export default {
inject: ["$global"],
data() {
return {
userinfo:"",
userinfo: "",
name: "",
id: "",
info: {},
@@ -62,54 +62,52 @@ export default {
this.userinfo = avatarUrl;
},
// 微信登录
async wxLogin(e) {
wxLogin(e) {
uni.showLoading({
title: "登录中...",
mask: true,
});
postFile({
path: this.userinfo,
name:generateFileName(),
}).then((res) => {
console.log("上传成功········",res);
this.userinfo = res;
}).catch((err) => {
path: this.userinfo,
name: generateFileName(),
})
.then((res) => {
console.log(res.split("/").pop());
request({
url: "user/updateUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: res.split("/").pop(),
nickName: this.name,
usersig: this.userSig.userSig,
},
userInfo: true,
}).then((ress) => {
if (ress.code === 200) {
uni.showToast({
title: "修改成功",
icon: "success",
});
uni.setStorageSync("userinfo", ress.data.info);
uni.hideLoading();
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
uni.navigateBack({
delta: 1,
});
//````````````````````````````````````````````````````````````````````
} else {
uni.showToast({
title: "修改失败",
icon: "none",
});
}
});
})
.catch((err) => {
console.log(err);
});
if(this.userinfo){
const res = await request({
url: "user/updateUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: this.userinfo,
nickName: this.name,
usersig: this.userSig.userSig,
},
userInfo: true,
});
if (res.code === 200) {
uni.showToast({
title: "修改成功",
icon: "success",
});
uni.setStorageSync("userinfo", res.data.info);
uni.hideLoading();
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
uni.navigateBack({
delta: 1
});
//````````````````````````````````````````````````````````````````````
} else {
uni.showToast({
title: "修改失败",
icon: "none",
});
}
}
},
},
};

View File

@@ -17,15 +17,14 @@
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()
import { useCounterStore } from "@/stores/counter";
const counter = useCounterStore();
export default {
inject: ["$global"],
data() {
return {
userinfo:
"https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0",
userinfo:"",
name: "",
id: "",
info: {},
@@ -72,55 +71,67 @@ export default {
},
// 微信登录
async wxLogin(e) {
uni.showLoading({
title: "登录中...",
mask: true,
});
const { code } = await uni.login({
provider: "weixin",
onlyAuthorize: true,
});
postFile({
path: this.userinfo,
name: this.Filename,
}).then((ress) => {
this.picture = ress;
const res = request({
url: "user/inputUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: this.Filename,
nickName: this.name,
code,
usersig: this.userSig.userSig,
},
userInfo: false,
}).then((res) => {
if (res.code === 200) {
uni.showToast({
title: "登录成功",
icon: "success",
});
uni.setStorageSync("userinfo", res.data.info);
counter.$patch({ myitem:res.data.info })
uni.hideLoading();
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
uni.reLaunch({
url: this.lastPage,
});
//````````````````````````````````````````````````````````````````````
} else {
uni.showToast({
title: "登录失败",
icon: "none",
});
}
});
})
.catch((err) => {
console.log(err);
if (
this.name !== "" &&
this.userinfo !== ""
) {
uni.showLoading({
title: "登录中...",
mask: true,
});
const { code } = await uni.login({
provider: "weixin",
onlyAuthorize: true,
});
postFile({
path: this.userinfo,
name: this.Filename,
})
.then((ress) => {
this.picture = ress;
const res = request({
url: "user/inputUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: this.Filename,
nickName: this.name,
code,
usersig: this.userSig.userSig,
},
userInfo: false,
}).then((res) => {
if (res.code === 200) {
uni.showToast({
title: "登录成功",
icon: "success",
});
uni.setStorageSync("userinfo", res.data.info);
counter.$patch({ myitem: res.data.info });
uni.hideLoading();
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
uni.reLaunch({
url: this.lastPage,
});
//````````````````````````````````````````````````````````````````````
} else {
uni.showToast({
title: "登录失败",
icon: "none",
});
}
});
})
.catch((err) => {
console.log(err);
});
} else {
uni.showToast({
title: "请填写头像昵称",
icon: "success",
duration: 3000,
});
}
},
},
};

View File

@@ -13,14 +13,13 @@
</view>
</view>
<view class="Content">
<!-- 发布者 -->
<view class="sender">
<view class="sengderIcon">
<image class="Icon" :src="item.anchorIcon" mode="scaleToFill" />
</view>
<view class="Individual">
<view class="name">{{ item.anchorId }}</view>
<view class="name">{{ item.disPlayId }}</view>
<view class="GenderAndAge">
<view class="male" v-if="item.sex === '1'">
@@ -73,6 +72,16 @@
</view>
</view>
</view>
<view class="remark">
<uni-easyinput
type="textarea"
v-model="item.remark"
placeholder="备注"
maxlength="-1"
disabled="true"
:style="style"
></uni-easyinput>
</view>
<view class="button" v-if="item.senderId !== id">
<button class="accept" @click="openChat()">聊了个天</button>
<button class="reject" @click="open()">立即邀请</button>
@@ -88,7 +97,7 @@
<view class="popup-title">
<view class="popup-text">请选择您要参与的主播</view>
<scroll-view scroll-y="true" class="scroll">
<view class="card" v-for="(item, index) in list">
<view class="card" v-for="(item, index) in list" :key="index">
<view
class="card-content"
@click="Select(item.id, index)"
@@ -103,14 +112,11 @@
<view class="NameMoney">
<view class="TimeMoney">
<view class="NameMoney_Name">{{ item.anchorId }}</view>
<viewm class="goldnb"
><view class="goldimg"></view>{{ item.coin }}K</viewm
>
</view>
<view class="TimeMoney_Time"
><view class="pkTimeimg"></view
><view>{{ TimeFormatting(item.pkTime) }}</view></view
>
<view class="TimeMoney_Time">
<view class="pkTimeimg"></view><view>{{ TimeFormatting(item.pkTime) }}</view>
<viewm class="goldnb"><view class="goldimg"></view>{{ item.coin }}K</viewm>
</view>
</view>
</view>
</view>
@@ -150,6 +156,9 @@ export default {
chatInfo: {},
currentConversation: null,
// parentMessage: null,
style: {
backgroundColor: "#ffffff",
}
};
},
onLoad(options) {
@@ -318,7 +327,7 @@ export default {
border: 1rpx solid #03aba8;
}
.scroll {
width: 470rpx;
width: 500rpx;
height: 400rpx;
border-radius: 10px;
/* background-color: #fff; */
@@ -329,13 +338,9 @@ export default {
font-weight: bold;
margin-bottom: 30rpx;
}
.card {
margin-top: 10rpx;
margin-left: 10rpx;
}
.card-content {
/* width: 445rpx; */
width: 90%;
width: 100%;
height: 100rpx;
background-color: #ffffff;
/* border: 2px solid #afafaf; */
@@ -398,10 +403,14 @@ export default {
flex-direction: column;
}
.NameMoney_Name {
width: 400rpx;
text-align: left;
font-weight: bold;
font-size: 27rpx;
color: #161616;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
}
.background {
position: fixed;
@@ -470,8 +479,11 @@ export default {
margin-right: 16.22rpx;
}
.nation {
width: 56.3rpx;
/* width: 56.3rpx; */
height: 29.58rpx;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出内容 */
text-overflow: ellipsis; /* 显示省略号 */
font-size: 17.18rpx;
color: #666666;
text-align: center;
@@ -552,11 +564,15 @@ export default {
flex-direction: column;
align-items: center;
}
.remark{
margin-top: 60rpx;
width: 90%;
}
.button {
display: flex;
justify-content: center;
align-items: center;
margin-top: 645rpx;
margin-top: 500rpx;
}
.accept {
width: 325.38rpx;