优化页面

This commit is contained in:
pengxiaolong
2025-06-19 22:27:00 +08:00
parent b73ddb0370
commit bcaa54bec8
115 changed files with 1273 additions and 353 deletions

View File

@@ -0,0 +1,131 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
const common_assets = require("../../../../../common/assets.js");
require("../../offlinePushInfoManager/index.js");
const stores_counter = require("../../../../../stores/counter.js");
const components_request = require("../../../../../components/request.js");
if (!Array) {
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
_easycom_uni_popup2();
}
const _easycom_uni_popup = () => "../../../../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(ToolbarItemContainer + _easycom_uni_popup)();
}
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
const _sfc_main = {
__name: "CustomMessage",
emits: ["onDialogPopupShowOrHide"],
setup(__props, { emit: __emit }) {
const counter = stores_counter.useCounterStore();
const evaluateIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.InvitationDark : common_assets.InvitationLight;
const emits = __emit;
const onDialogShow = () => {
emits("onDialogPopupShowOrHide", true);
};
const onDialogClose = () => {
emits("onDialogPopupShowOrHide", false);
};
const currentConversation = common_vendor.ref();
const mylist = common_vendor.ref([]);
const youlist = common_vendor.ref([]);
common_vendor.Jt.watch(common_vendor.o.CONV, {
currentConversation: (conversation) => {
currentConversation.value = conversation;
components_request.request({
url: "pk/queryMyCanUsePkData",
method: "POST",
data: {
userId: counter.myitem.id
},
userInfo: true
}).then((res) => {
if (res.code === 200) {
mylist.value = res.data;
}
});
components_request.request({
url: "pk/listUninvitedPublishedAnchorsByUserId",
method: "POST",
data: {
userId: currentConversation.value.userProfile.userID
},
userInfo: true
}).then((res) => {
if (res.code === 200) {
youlist.value = res.data;
}
});
}
});
const container = common_vendor.ref();
const list = common_vendor.ref([]);
const popup = common_vendor.ref();
function onyourChoose() {
popup.value.open("center");
list.value = youlist.value;
}
function onmyChoose() {
popup.value.open("center");
list.value = mylist.value;
}
const selectedId = common_vendor.ref(null);
function Select(item, index) {
selectedId.value = item;
}
function invite() {
}
function close() {
popup.value.close();
}
const submitEvaluate = () => {
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o$1(onyourChoose),
b: common_vendor.o$1(onmyChoose),
c: common_vendor.o$1(submitEvaluate),
d: common_vendor.sr(container, "241228dc-0", {
"k": "container"
}),
e: common_vendor.o$1(onDialogShow),
f: common_vendor.o$1(onDialogClose),
g: common_vendor.p({
iconFile: common_vendor.unref(evaluateIcon),
title: "邀请",
needBottomPopup: true,
iconWidth: _ctx.isUniFrameWork ? "36px" : "30px",
iconHeight: _ctx.isUniFrameWork ? "36px" : "30px"
}),
h: list.value.length !== 0
}, list.value.length !== 0 ? {
i: common_vendor.f(list.value, (item, index, i0) => {
return {
a: item.anchorIcon,
b: common_vendor.t(item.anchorId),
c: common_vendor.t(item.coin),
d: common_vendor.o$1(($event) => Select(item.id), index),
e: selectedId.value === item.id ? "#b8ff8c74" : "#ffffff",
f: index
};
})
} : {}, {
j: list.value.length === 0
}, list.value.length === 0 ? {} : {}, {
k: common_vendor.o$1(($event) => invite()),
l: common_vendor.o$1(($event) => close()),
m: common_vendor.sr(popup, "241228dc-1", {
"k": "popup"
}),
n: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-241228dc"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/CustomMessage.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"uni-popup": "../../../../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"toolbar-item-container": "../toolbar-item-container/index"
}
}

View File

@@ -0,0 +1 @@
<toolbar-item-container wx:if="{{g}}" class="r data-v-241228dc" u-s="{{['d']}}" u-r="container" bindonDialogShow="{{e}}" bindonDialogClose="{{f}}" u-i="241228dc-0" bind:__l="__l" u-p="{{g}}"><view class="popup data-v-241228dc"><view class="container data-v-241228dc"><view class="title data-v-241228dc">PK邀请</view><view class="yourChoose data-v-241228dc" bindtap="{{a}}"><view class="yourChoose-item data-v-241228dc">选择你要邀请的对手</view></view><view class="vstext data-v-241228dc"><view class="Vtext data-v-241228dc">V</view><view class="Stext data-v-241228dc">S</view></view><view class="myChoose data-v-241228dc" bindtap="{{b}}"><view class="yourChoose-item data-v-241228dc">选择你要参与PK的信息</view></view></view><button class="send-btn data-v-241228dc" bindtap="{{c}}">发送邀请</button></view></toolbar-item-container><uni-popup wx:if="{{n}}" class="r data-v-241228dc" u-s="{{['d']}}" u-r="popup" u-i="241228dc-1" bind:__l="__l" u-p="{{n}}"><view class="popup-content data-v-241228dc"><view class="popup-title data-v-241228dc"><view class="popup-text data-v-241228dc">点击选择您要参与的主播</view><view wx:if="{{h}}" class="data-v-241228dc"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-241228dc"><view wx:for="{{i}}" wx:for-item="item" wx:key="f" class="card data-v-241228dc"><view class="card-content data-v-241228dc" bindtap="{{item.d}}" style="{{'background:' + item.e}}"><view class="Avatarimg data-v-241228dc"><image class="avatar data-v-241228dc" src="{{item.a}}" mode="scaleToFill"/></view><view class="NameMoney data-v-241228dc"><view class="TimeMoney data-v-241228dc"><view class="NameMoney_Name data-v-241228dc">{{item.b}}</view></view><view class="TimeMoney_Time data-v-241228dc"><view class="pkTimeimg data-v-241228dc"><image class="data-v-241228dc" style="width:31.49rpx;height:31.49rpx;margin-top:3rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/time.png" mode="scaleToFill"/></view><view class="goldimg data-v-241228dc"><image class="data-v-241228dc" style="width:31.49rpx;height:31.49rpx;margin-top:4rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/species.png" mode="scaleToFill"/></view><view class="goldnb data-v-241228dc">{{item.c}}K</view></view></view></view></view></scroll-view></view><view wx:if="{{j}}" class="noData data-v-241228dc">您还没有可参与的主播PK快去新建一个吧</view></view><view class="popup-btn data-v-241228dc"><button class="invite data-v-241228dc" type="primary" bindtap="{{k}}">邀请</button><button class="cancel data-v-241228dc" type="default" bindtap="{{l}}">取消</button></view></view></uni-popup>

View File

@@ -0,0 +1,139 @@
.popup.data-v-241228dc{
height: 750rpx;
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
background-position: center;
}
.container.data-v-241228dc {
height: 650rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.title.data-v-241228dc{
font-size: 40rpx;
color: #313131;
text-align: center;
margin-top: 40rpx;
font-weight: bold;
}
.yourChoose.data-v-241228dc{
width: 80%;
height: 150rpx;
margin-top: 40rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10rpx;
background-color: #ffffff;
}
.myChoose.data-v-241228dc{
width: 80%;
height: 150rpx;
margin-top: 40rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 10rpx;
background-color: #ffffff;
}
.yourChoose-item.data-v-241228dc{
font-size: 30rpx;
color: #313131;
font-weight: bold;
}
.vstext.data-v-241228dc {
display: flex;
justify-content: center;
align-items: center;
width: 90%;
margin-top: 40rpx;
}
.Vtext.data-v-241228dc {
font-size: 45.8rpx;
color: #f0836c;
font-weight: bold;
font-style: italic;
}
.Stext.data-v-241228dc {
font-size: 45.8rpx;
color: #58d8db;
font-weight: bold;
font-style: italic;
}
.send-btn.data-v-241228dc {
margin-bottom: 100rpx;
}
.popup-content.data-v-241228dc {
width: 750rpx;
height: 700rpx;
background-repeat: no-repeat;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
background-position: center;
}
.popup-title.data-v-241228dc {
font-size: 30rpx;
margin-top: 50rpx;
text-align: center;
}
.popup-btn.data-v-241228dc {
display: flex;
justify-content: space-around;
margin-top: 50rpx;
}
.popup-text.data-v-241228dc {
color: #161616;
font-size: 36.26rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.card-content.data-v-241228dc {
/* width: 445rpx; */
width: 100%;
height: 100rpx;
background-color: #ffffff;
/* border: 2px solid #afafaf; */
border-radius: 10rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgb(127, 127, 127);
margin-top: 20rpx;
}
.scroll.data-v-241228dc {
width: 500rpx;
height: 400rpx;
border-radius: 10px;
/* background-color: #fff; */
}
.popup-text.data-v-241228dc {
color: #161616;
font-size: 36.26rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.card-content.data-v-241228dc {
/* width: 445rpx; */
width: 100%;
height: 100rpx;
background-color: #ffffff;
/* border: 2px solid #afafaf; */
border-radius: 10rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgb(127, 127, 127);
margin-top: 20rpx;
}
.createModule.data-v-241228dc {
position: fixed;
bottom: 0;
right: 0;
z-index: 998;
width: 100vw;
}