优化页面
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
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 components_generateMsgId = require("../../../../../components/generateMsgId.js");
|
||||
const TUIKit_components_TUIChat_utils_utils = require("../../utils/utils.js");
|
||||
const TUIKit_components_TUIChat_offlinePushInfoManager_index = require("../../offlinePushInfoManager/index.js");
|
||||
const stores_counter = require("../../../../../stores/counter.js");
|
||||
const components_request = require("../../../../../components/request.js");
|
||||
const components_TimeFormatting = require("../../../../../components/TimeFormatting.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
_easycom_uni_popup2();
|
||||
@@ -42,6 +45,7 @@ const _sfc_main = {
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/message-input-toolbar/evaluate/CustomMessage.vue:226", "mylist", res.data);
|
||||
mylist.value = res.data;
|
||||
}
|
||||
});
|
||||
@@ -54,12 +58,12 @@ const _sfc_main = {
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.__f__("log", "at TUIKit/components/TUIChat/message-input-toolbar/evaluate/CustomMessage.vue:240", "youlist", res.data);
|
||||
youlist.value = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
const container = common_vendor.ref();
|
||||
const list = common_vendor.ref([]);
|
||||
const popup = common_vendor.ref();
|
||||
function onyourChoose() {
|
||||
@@ -70,50 +74,217 @@ const _sfc_main = {
|
||||
popup.value.open("center");
|
||||
list.value = mylist.value;
|
||||
}
|
||||
const selectedId = common_vendor.ref(null);
|
||||
const myselectedId = common_vendor.ref(null);
|
||||
const youselectedId = common_vendor.ref(null);
|
||||
const youselectedindex = common_vendor.ref(null);
|
||||
const myselectedindex = common_vendor.ref(null);
|
||||
function Select(item, index) {
|
||||
selectedId.value = item;
|
||||
if (list.value == mylist.value) {
|
||||
myselectedId.value = item;
|
||||
myselectedindex.value = index;
|
||||
} else if (list.value == youlist.value) {
|
||||
youselectedId.value = item;
|
||||
youselectedindex.value = index;
|
||||
}
|
||||
}
|
||||
function close() {
|
||||
popup.value.close();
|
||||
if (list.value == mylist.value) {
|
||||
myselectedId.value = null;
|
||||
myselectedindex.value = null;
|
||||
} else if (list.value == youlist.value) {
|
||||
youselectedId.value = null;
|
||||
youselectedindex.value = null;
|
||||
}
|
||||
}
|
||||
const myinfodata = common_vendor.ref(null);
|
||||
const youselfdata = common_vendor.ref(null);
|
||||
function invite() {
|
||||
if (list.value == mylist.value) {
|
||||
if (myselectedindex.value == null) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择您要邀请的对手",
|
||||
icon: "none",
|
||||
duration: 3e3
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
myinfodata.value = list.value[myselectedindex.value];
|
||||
popup.value.close();
|
||||
}
|
||||
} else if (list.value == youlist.value) {
|
||||
if (youselectedindex.value == null) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择您要参与的PK信息",
|
||||
icon: "none",
|
||||
duration: 3e3
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
youselfdata.value = list.value[youselectedindex.value];
|
||||
popup.value.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
const container = common_vendor.ref();
|
||||
function onClose() {
|
||||
var _a;
|
||||
(_a = container == null ? void 0 : container.value) == null ? void 0 : _a.toggleDialogDisplay(false);
|
||||
}
|
||||
const popups = common_vendor.ref();
|
||||
const submitEvaluate = () => {
|
||||
popups.value.open("center");
|
||||
};
|
||||
function closeHint() {
|
||||
popups.value.close();
|
||||
}
|
||||
const inviteHint = () => {
|
||||
components_request.request({
|
||||
url: "pk/createPkRecord",
|
||||
method: "POST",
|
||||
data: {
|
||||
pkIdA: youselfdata.value.id,
|
||||
pkIdB: myinfodata.value.id,
|
||||
userIdA: youselfdata.value.senderId,
|
||||
userIdB: myinfodata.value.senderId,
|
||||
pkTime: youselfdata.value.pkTime,
|
||||
pkNumber: youselfdata.value.pkNumber,
|
||||
anchorIdA: youselfdata.value.anchorId,
|
||||
anchorIdB: myinfodata.value.anchorId,
|
||||
anchorIconA: youselfdata.value.anchorIcon,
|
||||
anchorIconB: myinfodata.value.anchorIcon,
|
||||
piIdA: youselfdata.value.id,
|
||||
piIdB: myinfodata.value.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
if (res.code === 200) {
|
||||
const keyid = components_generateMsgId.generateMsgId();
|
||||
const payload = {
|
||||
data: JSON.stringify({
|
||||
businessID: "pk",
|
||||
keyid,
|
||||
myitem: myinfodata.value.id,
|
||||
pkIdA: youselfdata.value.id,
|
||||
pkIdB: myinfodata.value.id,
|
||||
userIdA: youselfdata.value.senderId,
|
||||
userIdB: myinfodata.value.senderId,
|
||||
pkTime: youselfdata.value.pkTime,
|
||||
pkNumber: youselfdata.value.pkNumber,
|
||||
id: res.data.id,
|
||||
link: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/pk.png",
|
||||
btnDisplay: true
|
||||
}),
|
||||
description: "邀请参加PK",
|
||||
extension: "邀请参加PK"
|
||||
};
|
||||
const options = {
|
||||
to: ((_b = (_a = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _a.groupProfile) == null ? void 0 : _b.groupID) || ((_d = (_c = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _c.userProfile) == null ? void 0 : _d.userID),
|
||||
conversationType: (_e = currentConversation == null ? void 0 : currentConversation.value) == null ? void 0 : _e.type,
|
||||
payload,
|
||||
needReadReceipt: TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()
|
||||
};
|
||||
const offlinePushInfoCreateParams = {
|
||||
conversation: currentConversation.value,
|
||||
payload: options.payload,
|
||||
messageType: common_vendor.qt.TYPES.MSG_CUSTOM
|
||||
};
|
||||
const sendMessageOptions = {
|
||||
offlinePushInfo: TUIKit_components_TUIChat_offlinePushInfoManager_index.OfflinePushInfoManager.create(offlinePushInfoCreateParams)
|
||||
};
|
||||
common_vendor.Qt.sendCustomMessage(options, sendMessageOptions).then((res2) => {
|
||||
components_request.request({
|
||||
url: "chat/add",
|
||||
method: "POST",
|
||||
data: {
|
||||
messageInfo: JSON.stringify(res2.data.message),
|
||||
keyId: keyid
|
||||
},
|
||||
userInfo: true
|
||||
});
|
||||
});
|
||||
myinfodata.value = null;
|
||||
youselfdata.value = null;
|
||||
currentConversation.value = null;
|
||||
myselectedId.value = null;
|
||||
myselectedindex.value = null;
|
||||
youselectedId.value = null;
|
||||
youselectedindex.value = null;
|
||||
list.value = [];
|
||||
(_f = container == null ? void 0 : container.value) == null ? void 0 : _f.toggleDialogDisplay(false);
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 3e3
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
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", {
|
||||
a: common_vendor.o$1(onClose),
|
||||
b: youselfdata.value == null
|
||||
}, youselfdata.value == null ? {} : {
|
||||
c: youselfdata.value.anchorIcon,
|
||||
d: common_vendor.t(youselfdata.value.anchorId),
|
||||
e: common_vendor.t(common_vendor.unref(components_TimeFormatting.TimeFormatting)(youselfdata.value.pkTime)),
|
||||
f: common_vendor.t(youselfdata.value.coin)
|
||||
}, {
|
||||
g: common_vendor.o$1(onyourChoose),
|
||||
h: myinfodata.value == null
|
||||
}, myinfodata.value == null ? {} : {
|
||||
i: myinfodata.value.anchorIcon,
|
||||
j: common_vendor.t(myinfodata.value.anchorId),
|
||||
k: common_vendor.t(common_vendor.unref(components_TimeFormatting.TimeFormatting)(myinfodata.value.pkTime)),
|
||||
l: common_vendor.t(myinfodata.value.coin)
|
||||
}, {
|
||||
m: common_vendor.o$1(onmyChoose),
|
||||
n: common_vendor.o$1(submitEvaluate),
|
||||
o: common_vendor.sr(container, "241228dc-0", {
|
||||
"k": "container"
|
||||
}),
|
||||
e: common_vendor.o$1(onDialogShow),
|
||||
f: common_vendor.o$1(onDialogClose),
|
||||
g: common_vendor.p({
|
||||
p: common_vendor.o$1(onDialogShow),
|
||||
q: common_vendor.o$1(onDialogClose),
|
||||
r: 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
|
||||
s: list.value.length !== 0
|
||||
}, list.value.length !== 0 ? {
|
||||
i: common_vendor.f(list.value, (item, index, i0) => {
|
||||
t: 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
|
||||
b: common_vendor.t(list.value == mylist.value ? item.anchorId : item.disPlayId),
|
||||
c: common_vendor.t(common_vendor.unref(components_TimeFormatting.TimeFormatting)(item.pkTime)),
|
||||
d: common_vendor.t(item.coin),
|
||||
e: common_vendor.o$1(($event) => Select(item.id, index), index),
|
||||
f: myselectedId.value === item.id || youselectedId.value === item.id ? "#b8ff8c74" : "#ffffff",
|
||||
g: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
j: list.value.length === 0
|
||||
v: list.value.length === 0
|
||||
}, list.value.length === 0 ? {} : {}, {
|
||||
k: common_vendor.o$1(($event) => _ctx.invite()),
|
||||
l: common_vendor.o$1(($event) => _ctx.close()),
|
||||
m: common_vendor.sr(popup, "241228dc-1", {
|
||||
w: common_vendor.o$1(($event) => invite()),
|
||||
x: common_vendor.o$1(($event) => close()),
|
||||
y: common_vendor.sr(popup, "241228dc-1", {
|
||||
"k": "popup"
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
z: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
}),
|
||||
A: common_vendor.o$1(inviteHint),
|
||||
B: common_vendor.o$1(closeHint),
|
||||
C: common_vendor.sr(popups, "241228dc-2", {
|
||||
"k": "popups"
|
||||
}),
|
||||
D: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
})
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
|
||||
.popup.data-v-241228dc{
|
||||
.popup.data-v-241228dc {
|
||||
height: 750rpx;
|
||||
background-image: url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/chard1.png);
|
||||
background-position: center;
|
||||
@@ -10,38 +10,78 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.title.data-v-241228dc{
|
||||
.titlecss.data-v-241228dc{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.title.data-v-241228dc {
|
||||
font-size: 40rpx;
|
||||
color: #313131;
|
||||
text-align: center;
|
||||
margin-top: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.yourChoose.data-v-241228dc{
|
||||
.close.data-v-241228dc{
|
||||
margin-right: 40rpx;
|
||||
margin-top: -30rpx;
|
||||
}
|
||||
.yourChoose.data-v-241228dc {
|
||||
width: 80%;
|
||||
height: 150rpx;
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* justify-content: center; */
|
||||
align-items: center;
|
||||
border-radius: 10rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.myChoose.data-v-241228dc{
|
||||
.myChoose.data-v-241228dc {
|
||||
width: 80%;
|
||||
height: 150rpx;
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* justify-content: center; */
|
||||
align-items: center;
|
||||
border-radius: 10rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.yourChoose-item.data-v-241228dc{
|
||||
.yourChoose-item.data-v-241228dc {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 150rpx;
|
||||
font-size: 30rpx;
|
||||
color: #313131;
|
||||
font-weight: bold;
|
||||
}
|
||||
.Echo.data-v-241228dc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.EchoIcon.data-v-241228dc {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.EchoNameandTime.data-v-241228dc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.EchoName.data-v-241228dc {
|
||||
font-size: 30rpx;
|
||||
color: #313131;
|
||||
margin-left: 20rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.EchoTimeandGold.data-v-241228dc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.vstext.data-v-241228dc {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -62,10 +102,16 @@
|
||||
font-style: italic;
|
||||
}
|
||||
.send-btn.data-v-241228dc {
|
||||
margin-bottom: 100rpx;
|
||||
width: 80%;
|
||||
margin-bottom: 70rpx;
|
||||
border-radius: 50rpx;
|
||||
background-image: linear-gradient(135deg, #4fcacd, #5fdbde);
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.popup-content.data-v-241228dc {
|
||||
width: 750rpx;
|
||||
width: 600rpx;
|
||||
height: 700rpx;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 10px;
|
||||
@@ -158,7 +204,7 @@
|
||||
display: flex;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
.noData.data-v-241228dc{
|
||||
.noData.data-v-241228dc {
|
||||
width: 500rpx;
|
||||
height: 400rpx;
|
||||
border-radius: 10px;
|
||||
@@ -224,3 +270,23 @@
|
||||
border-bottom-right-radius: 50rpx;
|
||||
border: 1rpx solid #03aba8;
|
||||
}
|
||||
.popup-Hintcontent.data-v-241228dc{
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
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-texts.data-v-241228dc{
|
||||
margin-left: 50rpx;
|
||||
color: #7e7e7e;
|
||||
font-size: 26rpx;
|
||||
margin-right: 50rpx;
|
||||
margin-top: 70rpx;
|
||||
margin-bottom: 70rpx;
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello"
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
//确定邀请
|
||||
invite() {
|
||||
},
|
||||
//关闭弹窗
|
||||
close() {
|
||||
popup.value.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
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) {
|
||||
_easycom_uni_popup();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.list.length !== 0
|
||||
}, _ctx.list.length !== 0 ? {
|
||||
b: common_vendor.f(_ctx.list, (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) => _ctx.Select(item.id, index), index),
|
||||
e: _ctx.selectedId === item.id ? "#b8ff8c74" : "#ffffff",
|
||||
f: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
c: _ctx.list.length === 0
|
||||
}, _ctx.list.length === 0 ? {} : {}, {
|
||||
d: common_vendor.o$1(($event) => $options.invite()),
|
||||
e: common_vendor.o$1(($event) => $options.close()),
|
||||
f: common_vendor.sr("popup", "40f5b60d-0"),
|
||||
g: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-40f5b60d"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/popupinvite.js.map
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-popup": "../../../../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<uni-popup wx:if="{{g}}" u-s="{{['d']}}" class="popupcss r data-v-40f5b60d" u-r="popup" u-i="40f5b60d-0" bind:__l="__l" u-p="{{g}}"><view class="popup-content data-v-40f5b60d"><view class="popup-title data-v-40f5b60d"><view class="popup-text data-v-40f5b60d">点击选择您要参与的主播</view><view wx:if="{{a}}" class="data-v-40f5b60d"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-40f5b60d"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="card data-v-40f5b60d"><view class="card-content data-v-40f5b60d" bindtap="{{item.d}}" style="{{'background:' + item.e}}"><view class="Avatarimg data-v-40f5b60d"><image class="avatar data-v-40f5b60d" src="{{item.a}}" mode="scaleToFill"/></view><view class="NameMoney data-v-40f5b60d"><view class="TimeMoney data-v-40f5b60d"><view class="NameMoney_Name data-v-40f5b60d">{{item.b}}</view></view><view class="TimeMoney_Time data-v-40f5b60d"><view class="pkTimeimg data-v-40f5b60d"><image class="data-v-40f5b60d" 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-40f5b60d"><image class="data-v-40f5b60d" 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-40f5b60d">{{item.c}}K</view></view></view></view></view></scroll-view></view><view wx:if="{{c}}" class="noData data-v-40f5b60d">您还没有可参与的主播PK,快去新建一个吧!</view></view><view class="popup-btn data-v-40f5b60d"><button class="invite data-v-40f5b60d" type="primary" bindtap="{{d}}">邀请</button><button class="cancel data-v-40f5b60d" type="default" bindtap="{{e}}">取消</button></view></view></uni-popup>
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
/* 样式定义 */
|
||||
Reference in New Issue
Block a user