优化页面
This commit is contained in:
@@ -2,18 +2,28 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_formatDate = require("../../components/formatDate.js");
|
||||
const components_VerifyLogin = require("../../components/VerifyLogin.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const NewAddedPk = () => "../NewAddedPk/NewAddedPk2.js";
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
item: {}
|
||||
item: {},
|
||||
id: 0,
|
||||
list: []
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on("itemDetail", (data) => {
|
||||
this.item = data.item;
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:64", "接收到的数据:", this.item);
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:79", "接收到的数据:", this.item);
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@@ -25,6 +35,7 @@ const _sfc_main = {
|
||||
},
|
||||
open() {
|
||||
this.$refs.popup.open("center");
|
||||
this.userlist();
|
||||
},
|
||||
invite() {
|
||||
},
|
||||
@@ -38,12 +49,50 @@ const _sfc_main = {
|
||||
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
|
||||
});
|
||||
});
|
||||
},
|
||||
async userlist() {
|
||||
common_vendor.index.showLoading({
|
||||
title: "加载中...",
|
||||
mask: true
|
||||
});
|
||||
const res = await components_request.request({
|
||||
url: "pk/queryMyPkData",
|
||||
method: "POST",
|
||||
data: {
|
||||
userId: this.id
|
||||
},
|
||||
userInfo: true
|
||||
});
|
||||
if (res.code === 200) {
|
||||
if (res.data.length !== 0) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:133", "res.data", res.data);
|
||||
this.list = res.data;
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
this.openPopupQuantity();
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "加载失败",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
},
|
||||
openPopupQuantity() {
|
||||
this.$refs.createModule.open();
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NewAddedPk
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
_easycom_uni_popup2();
|
||||
const _component_NewAddedPk = common_vendor.resolveComponent("NewAddedPk");
|
||||
(_easycom_uni_popup2 + _component_NewAddedPk)();
|
||||
}
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
@@ -62,13 +111,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
i: common_vendor.t($data.item.remark),
|
||||
j: common_vendor.o$1(($event) => $options.openChat()),
|
||||
k: common_vendor.o$1(($event) => $options.open()),
|
||||
l: common_vendor.o$1(($event) => $options.invite()),
|
||||
m: common_vendor.o$1(($event) => $options.close()),
|
||||
n: common_vendor.sr("popup", "9639f721-0"),
|
||||
o: common_vendor.p({
|
||||
l: common_vendor.f($data.list, (item, index, i0) => {
|
||||
return {};
|
||||
}),
|
||||
m: common_vendor.o$1(($event) => $options.invite()),
|
||||
n: common_vendor.o$1(($event) => $options.close()),
|
||||
o: common_vendor.sr("popup", "9639f721-0"),
|
||||
p: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
})
|
||||
}),
|
||||
q: common_vendor.sr("createModule", "9639f721-1")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9639f721"]]);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "PK详情",
|
||||
"usingComponents": {
|
||||
"new-added-pk": "../NewAddedPk/NewAddedPk",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="Navigation data-v-9639f721"><image src="{{a}}" mode="scaleToFill" class="Navigationimg data-v-9639f721"/><image bindtap="{{b}}" src="{{c}}" mode="scaleToFill" class="Return data-v-9639f721"/></view><view class="container data-v-9639f721"><view class="individual data-v-9639f721"><view class="anchor data-v-9639f721"></view><view class="data-v-9639f721"><view class="data-v-9639f721">主播名称{{d}}</view><view class="data-v-9639f721">主播性别{{e}}</view><view class="data-v-9639f721"> 国家{{f}}</view></view></view><view class="data-v-9639f721">金币{{g}}</view><view class="data-v-9639f721">PK时间{{h}}</view><view class="data-v-9639f721">主播备注{{i}}</view><button class="data-v-9639f721" bindtap="{{j}}">聊了个天</button><button class="data-v-9639f721" bindtap="{{k}}">立即邀请PK</button></view><uni-popup wx:if="{{o}}" class="r data-v-9639f721" u-s="{{['d']}}" u-r="popup" u-i="9639f721-0" bind:__l="__l" u-p="{{o}}"><view class="popup-content data-v-9639f721"><view class="popup-title data-v-9639f721">您确定要邀请主播PK吗?</view><view class="popup-btn data-v-9639f721"><button class="invite data-v-9639f721" type="primary" bindtap="{{l}}">邀请</button><button class="cancel data-v-9639f721" type="default" bindtap="{{m}}">取消</button></view></view></uni-popup>
|
||||
<view class="Navigation data-v-9639f721"><image src="{{a}}" mode="scaleToFill" class="Navigationimg data-v-9639f721"/><image bindtap="{{b}}" src="{{c}}" mode="scaleToFill" class="Return data-v-9639f721"/></view><view class="container data-v-9639f721"><view class="individual data-v-9639f721"><view class="anchor data-v-9639f721"></view><view class="data-v-9639f721"><view class="data-v-9639f721">主播名称{{d}}</view><view class="data-v-9639f721">主播性别{{e}}</view><view class="data-v-9639f721"> 国家{{f}}</view></view></view><view class="data-v-9639f721">金币{{g}}</view><view class="data-v-9639f721">PK时间{{h}}</view><view class="data-v-9639f721">主播备注{{i}}</view><button class="data-v-9639f721" bindtap="{{j}}">聊了个天</button><button class="data-v-9639f721" bindtap="{{k}}">立即邀请PK</button></view><uni-popup wx:if="{{p}}" class="r data-v-9639f721" u-s="{{['d']}}" u-r="popup" u-i="9639f721-0" bind:__l="__l" u-p="{{p}}"><view class="popup-content data-v-9639f721"><view class="popup-title data-v-9639f721"><scroll-view scroll-y="true" class="scroll data-v-9639f721"><view wx:for="{{l}}" wx:for-item="item" class="card data-v-9639f721"><view class="card-content data-v-9639f721"></view></view></scroll-view></view><view class="popup-btn data-v-9639f721"><button class="invite data-v-9639f721" type="primary" bindtap="{{m}}">邀请</button><button class="cancel data-v-9639f721" type="default" bindtap="{{n}}">取消</button></view></view></uni-popup><new-added-pk class="createModule r data-v-9639f721" u-r="createModule" u-i="9639f721-1" bind:__l="__l"></new-added-pk>
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
.popup-content.data-v-9639f721 {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
height: 700rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
@@ -72,3 +72,30 @@
|
||||
margin-left: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.scroll.data-v-9639f721 {
|
||||
width: 470rpx;
|
||||
height: 500rpx;
|
||||
border: 1px solid #afafaf;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.card.data-v-9639f721 {
|
||||
margin-top: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.card-content.data-v-9639f721 {
|
||||
width: 445rpx;
|
||||
height: 70rpx;
|
||||
border: 1px solid #afafaf;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.createModule.data-v-9639f721{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 998;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user