优化返回页面
This commit is contained in:
@@ -14,6 +14,7 @@ const _sfc_main = {
|
||||
},
|
||||
methods: {
|
||||
goAdvertisement() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/pkDetail/pkDetail" });
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -11,7 +11,8 @@ const _sfc_main = {
|
||||
name: "",
|
||||
id: "",
|
||||
info: {},
|
||||
userSig: ""
|
||||
userSig: "",
|
||||
lastPage: ""
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -27,6 +28,15 @@ const _sfc_main = {
|
||||
this.userSig = res.data;
|
||||
}
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "lastPage",
|
||||
success: (res) => {
|
||||
this.lastPage = "/" + res.data;
|
||||
},
|
||||
fail: () => {
|
||||
this.lastPage = "/pages/Home/Home";
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 输入昵称
|
||||
@@ -54,7 +64,7 @@ const _sfc_main = {
|
||||
}).then((res) => {
|
||||
this.userinfo = res;
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:76", err);
|
||||
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:86", err);
|
||||
});
|
||||
if (this.userinfo) {
|
||||
const res = await components_request.request({
|
||||
@@ -77,8 +87,7 @@ const _sfc_main = {
|
||||
common_vendor.index.setStorageSync("userinfo", res.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home"
|
||||
// 默认页
|
||||
url: this.lastPage
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
|
||||
@@ -9,7 +9,8 @@ const _sfc_main = {
|
||||
return {
|
||||
userInfo: {},
|
||||
info: {},
|
||||
userSig: ""
|
||||
userSig: "",
|
||||
lastPage: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -19,6 +20,16 @@ const _sfc_main = {
|
||||
this.userInfo = res.userInfo;
|
||||
}
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "lastPage",
|
||||
success: (res) => {
|
||||
this.lastPage = "/" + res.data;
|
||||
common_vendor.index.__f__("log", "at pages/login/login.vue:37", this.lastPage);
|
||||
},
|
||||
fail: () => {
|
||||
this.lastPage = "/pages/Home/Home";
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 获取手机号
|
||||
@@ -55,9 +66,9 @@ const _sfc_main = {
|
||||
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
components_TUILogin.TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.id, this.userSig.userSig);
|
||||
common_vendor.index.__f__("log", "at pages/login/login.vue:81", "跳的地址", this.lastPage);
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home"
|
||||
// 默认页
|
||||
url: this.lastPage
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_formatDate = require("../../components/formatDate.js");
|
||||
const components_VerifyLogin = require("../../components/VerifyLogin.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
item: {}
|
||||
@@ -10,19 +14,62 @@ const _sfc_main = {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on("itemDetail", (data) => {
|
||||
this.item = data.item;
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:30", "接收到的数据:", this.item);
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:65", "接收到的数据:", this.item);
|
||||
});
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
formatDate: components_formatDate.formatDate,
|
||||
Returnfunc() {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
open() {
|
||||
this.$refs.popup.open("center");
|
||||
},
|
||||
invite() {
|
||||
},
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
openChat() {
|
||||
components_VerifyLogin.VerifyLogin().then(() => {
|
||||
const conversationID = `C2C${this.item.senderId}`;
|
||||
common_vendor.index.redirectTo({
|
||||
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
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 {
|
||||
a: common_vendor.t($data.item.anchorId),
|
||||
b: common_vendor.t($data.item.sex === 1 ? "男" : "女"),
|
||||
c: common_vendor.t($data.item.country),
|
||||
d: common_vendor.t($data.item.coin),
|
||||
e: common_vendor.t($data.item.remark),
|
||||
f: common_vendor.t($data.item.pkTime)
|
||||
a: common_assets._imports_0,
|
||||
b: common_vendor.o$1((...args) => $options.Returnfunc && $options.Returnfunc(...args)),
|
||||
c: common_assets._imports_1,
|
||||
d: common_vendor.t($data.item.anchorId),
|
||||
e: common_vendor.t($data.item.sex === 1 ? "男" : "女"),
|
||||
f: common_vendor.t($data.item.country),
|
||||
g: common_vendor.t($data.item.coin),
|
||||
h: common_vendor.t($options.formatDate($data.item.pkTime)),
|
||||
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({
|
||||
type: "center",
|
||||
["border-radius"]: "10px 10px 0 0"
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9639f721"]]);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "PK详情",
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view class="container data-v-9639f721"><view class="data-v-9639f721">主播名称{{a}}</view><view class="data-v-9639f721">主播性别{{b}}</view><view class="data-v-9639f721"> 国家{{c}}</view><view class="data-v-9639f721">金币{{d}}</view><view class="data-v-9639f721">主播备注{{e}}</view><view class="data-v-9639f721">PK时间{{f}}</view></view>
|
||||
<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>
|
||||
@@ -1,2 +1,74 @@
|
||||
|
||||
/* 样式定义 */
|
||||
.Navigation.data-v-9639f721 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 200rpx;
|
||||
}
|
||||
.Navigationimg.data-v-9639f721 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.Return.data-v-9639f721 {
|
||||
position: absolute;
|
||||
left: 60rpx;
|
||||
bottom: 40rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
.container.data-v-9639f721 {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.individual.data-v-9639f721 {
|
||||
display: flex;
|
||||
/* justify-content: center; */
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.anchor.data-v-9639f721 {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background-color: rgba(0, 0, 255, 0.369);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.popup-content.data-v-9639f721 {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.popup-title.data-v-9639f721 {
|
||||
font-size: 30rpx;
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.popup-btn.data-v-9639f721 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.invite.data-v-9639f721 {
|
||||
width: 200rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #1aff0087;
|
||||
}
|
||||
.cancel.data-v-9639f721 {
|
||||
width: 200rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
margin-left: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user