three version
This commit is contained in:
@@ -19,16 +19,16 @@ const _sfc_main = {
|
||||
common_vendor.onMounted(() => {
|
||||
const getUserInfo = utils_StaticValue.StaticValue.getUserInfo;
|
||||
roomData.value = getUserInfo();
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:88", "roomData:", roomData.value.userId);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:85", "roomData:", roomData.value.userId);
|
||||
});
|
||||
const gotoNewPage = async () => {
|
||||
const response = await utils_request.GET("/system/room/createUser/" + roomData.value.userId);
|
||||
if (response.code = 200) {
|
||||
const dataArray = response.data;
|
||||
if (dataArray && dataArray.length > 0) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:100", `查询到 ${dataArray.length} 条房间记录`);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:97", `查询到 ${dataArray.length} 条房间记录`);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:104", "未查询到房间记录,新建个人房间");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:101", "未查询到房间记录,新建个人房间");
|
||||
utils_request.POST("/system/room", {
|
||||
createUser: roomData.value.userId,
|
||||
odds: 1,
|
||||
@@ -38,7 +38,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:144", "接口请求失败:", response.msg);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:112", "接口请求失败:", response.msg);
|
||||
common_vendor.index.showToast({
|
||||
title: "查询失败",
|
||||
icon: "none"
|
||||
@@ -48,14 +48,41 @@ const _sfc_main = {
|
||||
url: "/pages/single/single"
|
||||
});
|
||||
};
|
||||
const gotoNewPage1 = async () => {
|
||||
const response = await utils_request.GET("/system/room/createUser/" + roomData.value.userId);
|
||||
if (response.code = 200) {
|
||||
const dataArray = response.data;
|
||||
if (dataArray && dataArray.length > 0) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:131", `查询到 ${dataArray.length} 条房间记录`);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:135", "未查询到房间记录,新建个人房间");
|
||||
utils_request.POST("/system/room", {
|
||||
createUser: roomData.value.userId,
|
||||
odds: 1,
|
||||
roomStatus: 1,
|
||||
bossId: roomData.value.userId,
|
||||
roomName: `${roomData.value.nickName}的房间`
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:146", "接口请求失败:", response.msg);
|
||||
common_vendor.index.showToast({
|
||||
title: "查询失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
common_vendor.wx$1.navigateTo({
|
||||
url: "/pages/multiplayer/multiplayer"
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
type: "sound",
|
||||
size: "20"
|
||||
}),
|
||||
b: common_vendor.o(gotoNewPage),
|
||||
c: common_vendor.t(roomData.value)
|
||||
b: common_vendor.o(gotoNewPage1),
|
||||
c: common_vendor.o(gotoNewPage)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="index data-v-1cf27b2a"><view class="notice data-v-1cf27b2a"><view class="icon data-v-1cf27b2a"><uni-icons wx:if="{{a}}" class="data-v-1cf27b2a" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view><view class="text data-v-1cf27b2a"> 您还有未结束的对局, <text class="underline data-v-1cf27b2a">点击前往</text></view></view><view class="function-list data-v-1cf27b2a"><view class="function-item data-v-1cf27b2a"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://t14.baidu.com/it/u=3165460156,649373630&fm=224&app=112&f=JPEG?w=500&h=500"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 多人模式 </view><view class="function-desc data-v-1cf27b2a"> 所有玩家自己计分 </view></view></view><view class="function-item data-v-1cf27b2a" bindtap="{{b}}"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 单人模式 </view><view class="function-desc data-v-1cf27b2a"> 房主给所有玩家计分 </view></view></view><view class="function-item data-v-1cf27b2a"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 手动进入房间 </view><view class="function-desc data-v-1cf27b2a"> 输入房间id进入房间 </view></view></view><view class="function-item data-v-1cf27b2a"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 扫码加入房间 </view><view class="function-desc data-v-1cf27b2a"> 扫码房间二维码加入房间 </view></view></view><view class=" data-v-1cf27b2a">{{c}}</view></view></view>
|
||||
<view class="index data-v-1cf27b2a"><view class="notice data-v-1cf27b2a"><view class="icon data-v-1cf27b2a"><uni-icons wx:if="{{a}}" class="data-v-1cf27b2a" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view><view class="text data-v-1cf27b2a"> 您还有未结束的对局, <text class="underline data-v-1cf27b2a">点击前往</text></view></view><view class="function-list data-v-1cf27b2a"><view class="function-item data-v-1cf27b2a" bindtap="{{b}}"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://t14.baidu.com/it/u=3165460156,649373630&fm=224&app=112&f=JPEG?w=500&h=500"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 多人模式 </view><view class="function-desc data-v-1cf27b2a"> 所有玩家自己计分 </view></view></view><view class="function-item data-v-1cf27b2a" bindtap="{{c}}"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 单人模式 </view><view class="function-desc data-v-1cf27b2a"> 房主给所有玩家计分 </view></view></view><view class="function-item data-v-1cf27b2a"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 手动进入房间 </view><view class="function-desc data-v-1cf27b2a"> 输入房间id进入房间 </view></view></view><view class="function-item data-v-1cf27b2a"><view class="function-icon data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg"></image></view><view class="function-introduce data-v-1cf27b2a"><view class="function-name data-v-1cf27b2a"> 扫码加入房间 </view><view class="function-desc data-v-1cf27b2a"> 扫码房间二维码加入房间 </view></view></view></view></view>
|
||||
@@ -184,7 +184,7 @@ const _sfc_main = {
|
||||
common_vendor.index.__f__("log", "at pages/single/single.vue:381", "输入的倍率为:", oddvalue.value);
|
||||
const encodedMultiple = encodeURIComponent(JSON.stringify(oddvalue.value));
|
||||
isPopupVisible2.value = false;
|
||||
common_vendor.wx$1.redirectTo({
|
||||
common_vendor.wx$1.reLaunch({
|
||||
url: `/pages/over/over?multiple=${encodedMultiple}`
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user