1
94
scoring/unpackage/dist/dev/mp-weixin/api/login.js
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const utils_CommonValues = require("../utils/CommonValues.js");
|
||||
const utils_StaticValue = require("../utils/StaticValue.js");
|
||||
const api_user = require("./user.js");
|
||||
var uuid = "";
|
||||
var code = "";
|
||||
const getUserInfo = utils_StaticValue.StaticValue.getUserInfo;
|
||||
const setUserInfo = utils_StaticValue.StaticValue.setUserInfo;
|
||||
async function loginSystem() {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
method: "GET",
|
||||
url: `${utils_CommonValues.BASE_URL}/captchaImage`,
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uuid = res.data.uuid;
|
||||
code = res.data.codeStr;
|
||||
const data = {
|
||||
"username": "admin",
|
||||
"password": "admin123",
|
||||
"uuid": uuid,
|
||||
"code": code
|
||||
};
|
||||
var str = JSON.stringify(data);
|
||||
common_vendor.index.request({
|
||||
method: "POST",
|
||||
url: `${utils_CommonValues.BASE_URL}/login`,
|
||||
header: {
|
||||
"Content-Type": "application/json;charset=UTF-8"
|
||||
},
|
||||
data: str,
|
||||
dataType: "json",
|
||||
success: (res2) => {
|
||||
if (res2.data.code == "200") {
|
||||
resolve(res2.data.token);
|
||||
} else {
|
||||
reject(res2);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(error) {
|
||||
common_vendor.index.__f__("log", "at api/login.js:48", "获取验证码失败", error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
async function getToken() {
|
||||
common_vendor.index.__f__("log", "at api/login.js:56", "获取token被执行了");
|
||||
loginSystem().then((token) => {
|
||||
common_vendor.index.setStorage({
|
||||
key: "APP_TOKEN",
|
||||
data: token,
|
||||
success(res) {
|
||||
common_vendor.index.__f__("log", "at api/login.js:62", "存入token", token, res);
|
||||
},
|
||||
fail(err) {
|
||||
common_vendor.index.__f__("log", "at api/login.js:65", "存入token失败", token, err);
|
||||
}
|
||||
});
|
||||
}).catch((error) => {
|
||||
common_vendor.index.__f__("log", "at api/login.js:69", "获取token失败", error);
|
||||
});
|
||||
setTimeout(() => {
|
||||
getToken();
|
||||
}, 58 * 60 * 1e3);
|
||||
}
|
||||
async function checkLoginStatus() {
|
||||
const userInfo = getUserInfo();
|
||||
if (!userInfo) {
|
||||
return;
|
||||
}
|
||||
const token = await loginSystem();
|
||||
common_vendor.index.__f__("log", "at api/login.js:83", token);
|
||||
if (token.data) {
|
||||
checkLoginStatus();
|
||||
return;
|
||||
}
|
||||
api_user.login(userInfo).then((res) => {
|
||||
const userData = res.data;
|
||||
setUserInfo(userData);
|
||||
common_vendor.index.__f__("log", "at api/login.js:93", "自动登录成功:", userData);
|
||||
}).catch((err) => {
|
||||
common_vendor.index.__f__("log", "at api/login.js:95", "login err: ", err);
|
||||
});
|
||||
}
|
||||
exports.checkLoginStatus = checkLoginStatus;
|
||||
exports.getToken = getToken;
|
||||
exports.loginSystem = loginSystem;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/login.js.map
|
||||
11
scoring/unpackage/dist/dev/mp-weixin/api/user.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
const utils_request = require("../utils/request.js");
|
||||
const register = (userInfo) => {
|
||||
return utils_request.POST("/system/score/user", userInfo);
|
||||
};
|
||||
const login = (userInfo) => {
|
||||
return utils_request.POST("/system/score/user/login", userInfo);
|
||||
};
|
||||
exports.login = login;
|
||||
exports.register = register;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/user.js.map
|
||||
71
scoring/unpackage/dist/dev/mp-weixin/app.js
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
const common_vendor = require("./common/vendor.js");
|
||||
const api_login = require("./api/login.js");
|
||||
const utils_StaticValue = require("./utils/StaticValue.js");
|
||||
if (!Math) {
|
||||
"./pages/index/index.js";
|
||||
"./pages/index/singleplay/singleplay.js";
|
||||
"./pages/history-game/history-game.js";
|
||||
"./pages/my/my.js";
|
||||
"./pages/index/singleplay/change.js";
|
||||
"./pages/index/singleplay/scoring.js";
|
||||
"./pages/my/feedback.js";
|
||||
"./pages/my/setting.js";
|
||||
"./pages/my/favorites.js";
|
||||
}
|
||||
const _sfc_main = {
|
||||
onLaunch: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:4", "App Launch");
|
||||
},
|
||||
onShow: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:7", "App Show");
|
||||
},
|
||||
onHide: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:10", "App Hide");
|
||||
}
|
||||
};
|
||||
let globalUserInfo = null;
|
||||
function initGlobalUserInfo() {
|
||||
try {
|
||||
const storedUserInfo = common_vendor.wx$1.getStorageSync("userInfo");
|
||||
if (storedUserInfo) {
|
||||
globalUserInfo = storedUserInfo;
|
||||
common_vendor.index.__f__("log", "at main.js:15", "初始化全局用户信息:", globalUserInfo);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at main.js:18", "获取本地存储的用户信息失败:", error);
|
||||
}
|
||||
}
|
||||
function updateGlobalUserInfo(userInfo) {
|
||||
try {
|
||||
globalUserInfo = userInfo;
|
||||
common_vendor.wx$1.setStorageSync("userInfo", userInfo);
|
||||
common_vendor.index.__f__("log", "at main.js:27", "全局用户信息已更新:", userInfo);
|
||||
if (common_vendor.wx$1.$emit) {
|
||||
common_vendor.wx$1.$emit("globalUserInfoUpdated", userInfo);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at main.js:33", "更新全局用户信息失败:", error);
|
||||
}
|
||||
}
|
||||
function getGlobalUserInfo() {
|
||||
return globalUserInfo;
|
||||
}
|
||||
function createApp() {
|
||||
const app = common_vendor.createSSRApp(_sfc_main);
|
||||
app.config.globalProperties.$StaticValue = utils_StaticValue.StaticValue;
|
||||
app.config.globalProperties.$updateGlobalUserInfo = updateGlobalUserInfo;
|
||||
app.config.globalProperties.$getGlobalUserInfo = getGlobalUserInfo;
|
||||
return {
|
||||
app
|
||||
};
|
||||
}
|
||||
initGlobalUserInfo();
|
||||
api_login.checkLoginStatus();
|
||||
api_login.getToken();
|
||||
createApp().app.mount("#app");
|
||||
exports.createApp = createApp;
|
||||
exports.getGlobalUserInfo = getGlobalUserInfo;
|
||||
exports.updateGlobalUserInfo = updateGlobalUserInfo;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
|
||||
39
scoring/unpackage/dist/dev/mp-weixin/app.json
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/index/singleplay/singleplay",
|
||||
"pages/history-game/history-game",
|
||||
"pages/my/my",
|
||||
"pages/index/singleplay/change",
|
||||
"pages/index/singleplay/scoring",
|
||||
"pages/my/feedback",
|
||||
"pages/my/setting",
|
||||
"pages/my/favorites"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"text": "首页",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "/static/logo.png"
|
||||
},
|
||||
{
|
||||
"text": "历史记录",
|
||||
"pagePath": "pages/history-game/history-game",
|
||||
"iconPath": "/static/logo.png"
|
||||
},
|
||||
{
|
||||
"text": "个人信息",
|
||||
"pagePath": "pages/my/my",
|
||||
"iconPath": "/static/logo.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"usingComponents": {}
|
||||
}
|
||||
3
scoring/unpackage/dist/dev/mp-weixin/app.wxss
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
/*每个页面公共css */
|
||||
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}
|
||||
16
scoring/unpackage/dist/dev/mp-weixin/common/assets.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
const _imports_0$2 = "/static/add.png";
|
||||
const _imports_1$1 = "/static/transfer.png";
|
||||
const _imports_0$1 = "/static/favorites.png";
|
||||
const _imports_1 = "/static/setting.png";
|
||||
const _imports_2 = "/static/feedback.png";
|
||||
const _imports_3 = "/static/about.png";
|
||||
const _imports_0 = "/static/emile.png";
|
||||
exports._imports_0 = _imports_0$2;
|
||||
exports._imports_0$1 = _imports_0$1;
|
||||
exports._imports_0$2 = _imports_0;
|
||||
exports._imports_1 = _imports_1$1;
|
||||
exports._imports_1$1 = _imports_1;
|
||||
exports._imports_2 = _imports_2;
|
||||
exports._imports_3 = _imports_3;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map
|
||||
8030
scoring/unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
Normal file
79
scoring/unpackage/dist/dev/mp-weixin/pages/history-game/history-game.js
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "history-game",
|
||||
setup(__props) {
|
||||
common_vendor.getCurrentInstance().proxy;
|
||||
const filterActive = common_vendor.ref("all");
|
||||
const filterClick = (type) => {
|
||||
filterActive.value = type;
|
||||
};
|
||||
const userList = common_vendor.ref([
|
||||
{
|
||||
avatar: "https://q3.itc.cn/q_70/images03/20250110/1e71eecf56b34344bcae6a5b85c0bec2.jpeg",
|
||||
name: "赵云",
|
||||
score: 100
|
||||
},
|
||||
{
|
||||
avatar: "https://q1.itc.cn/q_70/images03/20241119/197701bb9ef34b20b6497720081a9972.jpeg",
|
||||
name: "张飞",
|
||||
score: -50
|
||||
},
|
||||
{
|
||||
avatar: "https://img1.baidu.com/it/u=3612220943,2414740890&fm=253&app=138&f=JPEG?w=526&h=500",
|
||||
name: "刘备",
|
||||
score: 30
|
||||
},
|
||||
{
|
||||
avatar: "https://c-ssl.dtstatic.com/uploads/blog/202206/12/20220612135738_992b1.thumb.1000_0.jpg",
|
||||
name: "诸葛亮",
|
||||
score: -80
|
||||
}
|
||||
]);
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => filterClick("all")),
|
||||
b: filterActive.value == "all" ? 1 : "",
|
||||
c: common_vendor.o(($event) => filterClick("win")),
|
||||
d: filterActive.value == "win" ? 1 : "",
|
||||
e: common_vendor.o(($event) => filterClick("lose")),
|
||||
f: filterActive.value == "lose" ? 1 : "",
|
||||
g: common_vendor.f(10, (item, k0, i0) => {
|
||||
return {
|
||||
a: "7f5ca2e3-0-" + i0,
|
||||
b: common_vendor.f(userList.value, (user, index, i1) => {
|
||||
return {
|
||||
a: user.avatar,
|
||||
b: common_vendor.t(user.name),
|
||||
c: common_vendor.t(user.score),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
c: "7f5ca2e3-1-" + i0,
|
||||
d: item
|
||||
};
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
type: "trash",
|
||||
size: "30"
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
type: "right",
|
||||
size: "25",
|
||||
color: "#748cec"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7f5ca2e3"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/history-game/history-game.js.map
|
||||
6
scoring/unpackage/dist/dev/mp-weixin/pages/history-game/history-game.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "历史记录",
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/history-game/history-game.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="history-game data-v-7f5ca2e3"><view class="filter-tab data-v-7f5ca2e3"><view bindtap="{{a}}" class="{{['filter-item', 'data-v-7f5ca2e3', b && 'filter-active']}}">全部</view><view bindtap="{{c}}" class="{{['filter-item', 'data-v-7f5ca2e3', d && 'filter-active']}}">胜场</view><view bindtap="{{e}}" class="{{['filter-item', 'data-v-7f5ca2e3', f && 'filter-active']}}">负场</view></view><view class="game-list data-v-7f5ca2e3"><view wx:for="{{g}}" wx:for-item="item" wx:key="d" class="game-item data-v-7f5ca2e3"><view class="game-info data-v-7f5ca2e3"><view class="game-type data-v-7f5ca2e3">单人-1237房间</view><view class="game-date data-v-7f5ca2e3">2025-06-12 12:00</view><view class="del-btn data-v-7f5ca2e3"><uni-icons wx:if="{{h}}" class="data-v-7f5ca2e3" u-i="{{item.a}}" bind:__l="__l" u-p="{{h}}"></uni-icons></view></view><view class="game-user data-v-7f5ca2e3"><view wx:for="{{item.b}}" wx:for-item="user" wx:key="d" class="game-user-item data-v-7f5ca2e3"><view class="user-avatar data-v-7f5ca2e3"><image class="data-v-7f5ca2e3" src="{{user.a}}" mode="aspectFill"></image></view><view class="user-name data-v-7f5ca2e3">{{user.b}}</view><view class="user-score data-v-7f5ca2e3">{{user.c}}</view></view></view><view class="game-foot data-v-7f5ca2e3"><view class="game-status data-v-7f5ca2e3"> 已结束 </view><view class="check-detail data-v-7f5ca2e3"><uni-icons wx:if="{{i}}" class="data-v-7f5ca2e3" u-i="{{item.c}}" bind:__l="__l" u-p="{{i}}"></uni-icons></view></view></view></view></view>
|
||||
116
scoring/unpackage/dist/dev/mp-weixin/pages/history-game/history-game.wxss
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
.history-game.data-v-7f5ca2e3 {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.filter-tab.data-v-7f5ca2e3 {
|
||||
--filter-height: 80rpx;
|
||||
--filter-color: #748cec;
|
||||
--filter-border: 1rpx;
|
||||
width: 700rpx;
|
||||
height: var(--filter-height);
|
||||
margin: 20rpx auto;
|
||||
display: flex;
|
||||
}
|
||||
.filter-tab .filter-item.data-v-7f5ca2e3 {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: calc(var(--filter-height) - 2 * var(--filter-border));
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
border: var(--filter-border) solid var(--filter-color);
|
||||
}
|
||||
.filter-tab .filter-active.data-v-7f5ca2e3 {
|
||||
background-color: var(--filter-color);
|
||||
color: #ffffff;
|
||||
}
|
||||
.game-list.data-v-7f5ca2e3 {
|
||||
width: 700rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.game-list .game-item.data-v-7f5ca2e3 {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
margin: 20rpx 0;
|
||||
box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.game-list .game-item .game-info.data-v-7f5ca2e3 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.game-list .game-item .game-info .game-type.data-v-7f5ca2e3 {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.game-list .game-item .game-info .game-date.data-v-7f5ca2e3 {
|
||||
font-size: 32rpx;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.game-list .game-item .game-info .del-btn.data-v-7f5ca2e3 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-left: 1rpx solid #cccccc;
|
||||
}
|
||||
.game-list .game-item .game-user.data-v-7f5ca2e3 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
overflow: auto;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item.data-v-7f5ca2e3 {
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-avatar.data-v-7f5ca2e3 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-avatar image.data-v-7f5ca2e3 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-name.data-v-7f5ca2e3 {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-score.data-v-7f5ca2e3 {
|
||||
font-size: 32rpx;
|
||||
color: #fa5d5d;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.game-list .game-item .game-foot.data-v-7f5ca2e3 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.game-list .game-item .game-foot .game-status.data-v-7f5ca2e3 {
|
||||
font-size: 32rpx;
|
||||
color: #57bcef;
|
||||
}
|
||||
.game-list .game-item .game-foot .check-detail.data-v-7f5ca2e3 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
64
scoring/unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const isSinglePlayActive = common_vendor.ref(false);
|
||||
let debounceTimer = null;
|
||||
const debounce = (func, wait = 300) => {
|
||||
return function executedFunction(...args) {
|
||||
const later = () => {
|
||||
clearTimeout(debounceTimer);
|
||||
func(...args);
|
||||
};
|
||||
clearTimeout(debounceTimer);
|
||||
debounceTimer = setTimeout(later, wait);
|
||||
};
|
||||
};
|
||||
const handleSinglePlay = debounce(() => {
|
||||
isSinglePlayActive.value = true;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:65", "进入单人模式");
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/singleplay/singleplay",
|
||||
success: () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:71", "单人模式页面跳转成功");
|
||||
setTimeout(() => {
|
||||
isSinglePlayActive.value = false;
|
||||
}, 200);
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:78", "单人模式页面跳转失败:", err);
|
||||
isSinglePlayActive.value = false;
|
||||
common_vendor.index.showToast({
|
||||
title: "页面跳转失败,请重试",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:91", "首页加载完成");
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
type: "sound",
|
||||
size: "20"
|
||||
}),
|
||||
b: isSinglePlayActive.value ? 1 : "",
|
||||
c: common_vendor.o((...args) => common_vendor.unref(handleSinglePlay) && common_vendor.unref(handleSinglePlay)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|
||||
6
scoring/unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "计分器",
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
@@ -0,0 +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', b && 'active']}}" bindtap="{{c}}" hover-class="function-item-hover"><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>
|
||||
106
scoring/unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
.index.data-v-1cf27b2a {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.notice.data-v-1cf27b2a {
|
||||
width: 80%;
|
||||
margin: 20rpx auto;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 10rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 5rpx 5rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.notice .icon.data-v-1cf27b2a {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
color: #fa5d5d;
|
||||
}
|
||||
.notice .text.data-v-1cf27b2a {
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
}
|
||||
.notice .underline.data-v-1cf27b2a {
|
||||
text-decoration: underline;
|
||||
color: #fa5d5d;
|
||||
}
|
||||
.function-list.data-v-1cf27b2a {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.function-item.data-v-1cf27b2a {
|
||||
--content-height: 100rpx;
|
||||
width: 70%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
margin: 40rpx auto;
|
||||
box-shadow: 5rpx 5rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
gap: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
transition: all 0.2s ease;
|
||||
/* 微信小程序特有样式:条件编译用多行注释包裹 */
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
/* 防止文本选中 */
|
||||
}
|
||||
.function-item .function-icon.data-v-1cf27b2a {
|
||||
width: var(--content-height);
|
||||
height: var(--content-height);
|
||||
border-radius: 10%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.function-item .function-icon image.data-v-1cf27b2a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
/* 新增:防止图片拉伸变形 */
|
||||
}
|
||||
.function-item .function-introduce.data-v-1cf27b2a {
|
||||
flex: 1;
|
||||
height: var(--content-height);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.function-item .function-introduce .function-name.data-v-1cf27b2a {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
/* 微信小程序特有样式:条件编译修复 */
|
||||
pointer-events: none;
|
||||
/* 确保整个区域都可点击 */
|
||||
}
|
||||
.function-item .function-introduce .function-desc.data-v-1cf27b2a {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #a8a8a8;
|
||||
}
|
||||
.function-item-hover.data-v-1cf27b2a {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 2rpx 2rpx 5rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.function-item.active.data-v-1cf27b2a {
|
||||
background-color: #f0f8ff;
|
||||
box-shadow: 3rpx 3rpx 8rpx rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
115
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/change.js
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const app = require("../../../app.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "change",
|
||||
setup(__props) {
|
||||
const userInfo = common_vendor.ref({
|
||||
id: "",
|
||||
nickName: "",
|
||||
avatarUrl: ""
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
if (options.userData) {
|
||||
try {
|
||||
const data = JSON.parse(decodeURIComponent(options.userData));
|
||||
userInfo.value = { ...data };
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/change.vue:55", "解析用户数据失败:", e);
|
||||
}
|
||||
}
|
||||
if (options.from) {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/change.vue:61", "来源页面:", options.from);
|
||||
}
|
||||
});
|
||||
const goBack = () => {
|
||||
if (userInfo.value.nickName.trim()) {
|
||||
app.updateGlobalUserInfo(userInfo.value);
|
||||
}
|
||||
common_vendor.wx$1.navigateBack();
|
||||
};
|
||||
const chooseNewAvatar = () => {
|
||||
common_vendor.wx$1.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ["image"],
|
||||
sourceType: ["album", "camera"],
|
||||
maxDuration: 30,
|
||||
camera: "back",
|
||||
success: (res) => {
|
||||
try {
|
||||
const tempFilePath = res.tempFiles[0].tempFilePath;
|
||||
userInfo.value.avatarUrl = tempFilePath;
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/change.vue:90", "处理头像文件路径失败:", error);
|
||||
common_vendor.wx$1.showToast({
|
||||
title: "头像设置失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/change.vue:98", "选择图片失败:", err);
|
||||
common_vendor.wx$1.showToast({
|
||||
title: "选择图片失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const saveUserInfo = () => {
|
||||
if (!userInfo.value.nickName.trim()) {
|
||||
common_vendor.wx$1.showToast({
|
||||
title: "昵称不能为空",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
app.updateGlobalUserInfo(userInfo.value);
|
||||
const pages = getCurrentPages();
|
||||
const prevPage = pages[pages.length - 2];
|
||||
if (prevPage) {
|
||||
if (prevPage.$vm && prevPage.$vm.updateUserData) {
|
||||
prevPage.$vm.updateUserData(userInfo.value);
|
||||
} else {
|
||||
common_vendor.wx$1.$emit && common_vendor.wx$1.$emit("userDataUpdated", userInfo.value);
|
||||
}
|
||||
}
|
||||
common_vendor.wx$1.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
common_vendor.wx$1.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
type: "left",
|
||||
size: "22",
|
||||
color: "#fff"
|
||||
}),
|
||||
b: common_vendor.o(goBack),
|
||||
c: userInfo.value.nickName,
|
||||
d: common_vendor.o(($event) => userInfo.value.nickName = $event.detail.value),
|
||||
e: userInfo.value.avatarUrl || "/static/logo.png",
|
||||
f: common_vendor.o(chooseNewAvatar),
|
||||
g: common_vendor.o(saveUserInfo)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9c38dc47"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/singleplay/change.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/change.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "用户信息",
|
||||
"navigationBarHidden": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/change.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="container data-v-9c38dc47"><view class="header data-v-9c38dc47"><view class="back-btn data-v-9c38dc47" bindtap="{{b}}"><uni-icons wx:if="{{a}}" class="data-v-9c38dc47" u-i="9c38dc47-0" bind:__l="__l" u-p="{{a}}"/></view><view class="title data-v-9c38dc47">用户信息</view><view class="placeholder data-v-9c38dc47"></view></view><view class="content data-v-9c38dc47"><view class="form-item data-v-9c38dc47"><view class="label data-v-9c38dc47">昵称:</view><input class="input data-v-9c38dc47" placeholder="请输入昵称" value="{{c}}" bindinput="{{d}}"/></view><view class="form-item data-v-9c38dc47"><view class="label data-v-9c38dc47">头像:</view><view class="avatar-wrapper data-v-9c38dc47" bindtap="{{f}}"><image src="{{e}}" mode="aspectFill" class="avatar data-v-9c38dc47"/><view class="avatar-tip data-v-9c38dc47">点击更新头像</view></view></view><button class="save-btn data-v-9c38dc47" bindtap="{{g}}">保存</button></view></view>
|
||||
99
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/change.wxss
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
.container.data-v-9c38dc47 {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 自定义头部 */
|
||||
.header.data-v-9c38dc47 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 44px;
|
||||
background-color: #1989fa;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
/* 适配刘海屏 */
|
||||
padding-top: env(safe-area-inset-top, 0);
|
||||
height: calc(44px + env(safe-area-inset-top, 0));
|
||||
}
|
||||
.back-btn.data-v-9c38dc47 {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.title.data-v-9c38dc47 {
|
||||
color: #fff;
|
||||
font-size: 17px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.placeholder.data-v-9c38dc47 {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.content.data-v-9c38dc47 {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-item.data-v-9c38dc47 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
background-color: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.label.data-v-9c38dc47 {
|
||||
width: 120rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.input.data-v-9c38dc47 {
|
||||
flex: 1;
|
||||
height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* 头像样式 */
|
||||
.avatar-wrapper.data-v-9c38dc47 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.avatar.data-v-9c38dc47 {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.avatar-tip.data-v-9c38dc47 {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 保存按钮 */
|
||||
.save-btn.data-v-9c38dc47 {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background-color: #1989fa;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border-radius: 44rpx;
|
||||
margin-top: 40rpx;
|
||||
/* 去除默认边框和背景 */
|
||||
border: none;
|
||||
}
|
||||
.save-btn.data-v-9c38dc47:active {
|
||||
background-color: #0d75d4;
|
||||
}
|
||||
339
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/scoring.js
vendored
Normal file
@@ -0,0 +1,339 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "scoring",
|
||||
setup(__props) {
|
||||
const players = common_vendor.ref([]);
|
||||
const roundCount = common_vendor.ref(1);
|
||||
const history = common_vendor.ref([]);
|
||||
const selectedPlayerIndex = common_vendor.ref(-1);
|
||||
const showKeyboard = common_vendor.ref(false);
|
||||
const currentInput = common_vendor.ref("");
|
||||
const soundEnabled = common_vendor.ref(true);
|
||||
const loadPlayersData = () => {
|
||||
try {
|
||||
const playersData = common_vendor.index.getStorageSync("currentPlayers");
|
||||
if (playersData) {
|
||||
const parsedPlayers = JSON.parse(playersData).map((player) => ({
|
||||
...player,
|
||||
result: "",
|
||||
// 初始胜负状态为空
|
||||
score: player.score || 0
|
||||
}));
|
||||
players.value = parsedPlayers;
|
||||
saveHistoryState();
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/scoring.vue:142", "加载玩家数据失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "加载数据失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const saveHistoryState = () => {
|
||||
const stateCopy = JSON.parse(JSON.stringify(players.value));
|
||||
history.value.push(stateCopy);
|
||||
if (history.value.length > 50) {
|
||||
history.value.shift();
|
||||
}
|
||||
};
|
||||
const goBack = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "当前分数未保存,确定要返回吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
common_vendor.index.navigateBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const selectPlayer = (index) => {
|
||||
selectedPlayerIndex.value = index;
|
||||
showKeyboard.value = true;
|
||||
currentInput.value = players.value[index].score.toString();
|
||||
};
|
||||
const setPlayerResult = (index, result) => {
|
||||
if (players.value[index].result === result) {
|
||||
players.value[index].result = "";
|
||||
} else {
|
||||
players.value[index].result = result;
|
||||
let currentScore = players.value[index].score;
|
||||
let currentInputValue = currentInput.value;
|
||||
if (result === "win") {
|
||||
if (currentScore !== 0) {
|
||||
if (currentInputValue && currentInputValue !== "-" && parseInt(currentInputValue) !== 0) {
|
||||
currentScore = Math.abs(parseInt(currentInputValue));
|
||||
} else {
|
||||
currentScore = Math.abs(currentScore);
|
||||
}
|
||||
}
|
||||
} else if (result === "lose") {
|
||||
if (currentScore !== 0) {
|
||||
if (currentInputValue && currentInputValue !== "-" && parseInt(currentInputValue) !== 0) {
|
||||
currentScore = -Math.abs(parseInt(currentInputValue));
|
||||
} else {
|
||||
currentScore = -Math.abs(currentScore);
|
||||
}
|
||||
}
|
||||
}
|
||||
players.value[index].score = currentScore;
|
||||
}
|
||||
if (selectedPlayerIndex.value === index && showKeyboard.value) {
|
||||
currentInput.value = players.value[index].score.toString();
|
||||
}
|
||||
saveHistoryState();
|
||||
};
|
||||
const inputNumber = (num) => {
|
||||
if (currentInput.value === "-") {
|
||||
currentInput.value += num.toString();
|
||||
} else if (currentInput.value === "0" && num !== 0) {
|
||||
currentInput.value = num.toString();
|
||||
} else if (currentInput.value.length < 10) {
|
||||
currentInput.value += num.toString();
|
||||
}
|
||||
if (selectedPlayerIndex.value !== -1) {
|
||||
let score = 0;
|
||||
if (currentInput.value && currentInput.value !== "-") {
|
||||
score = parseInt(currentInput.value);
|
||||
if (isNaN(score)) {
|
||||
score = 0;
|
||||
}
|
||||
}
|
||||
players.value[selectedPlayerIndex.value].score = score;
|
||||
saveHistoryState();
|
||||
}
|
||||
};
|
||||
const inputOperation = (op) => {
|
||||
if (op === "-") {
|
||||
if (currentInput.value === "") {
|
||||
currentInput.value = "-";
|
||||
} else if (currentInput.value.startsWith("-")) {
|
||||
currentInput.value = currentInput.value.substring(1);
|
||||
} else {
|
||||
currentInput.value = "-" + currentInput.value;
|
||||
}
|
||||
} else if (op === "+") {
|
||||
if (currentInput.value.startsWith("-")) {
|
||||
currentInput.value = currentInput.value.substring(1);
|
||||
}
|
||||
}
|
||||
if (selectedPlayerIndex.value !== -1) {
|
||||
let score = 0;
|
||||
if (currentInput.value && currentInput.value !== "-") {
|
||||
score = parseInt(currentInput.value);
|
||||
if (isNaN(score)) {
|
||||
score = 0;
|
||||
}
|
||||
}
|
||||
players.value[selectedPlayerIndex.value].score = score;
|
||||
saveHistoryState();
|
||||
}
|
||||
};
|
||||
const deleteLastChar = () => {
|
||||
if (currentInput.value.length > 0) {
|
||||
currentInput.value = currentInput.value.slice(0, -1);
|
||||
if (selectedPlayerIndex.value !== -1) {
|
||||
let score = 0;
|
||||
if (currentInput.value && currentInput.value !== "-") {
|
||||
score = parseInt(currentInput.value);
|
||||
if (isNaN(score)) {
|
||||
score = 0;
|
||||
}
|
||||
}
|
||||
players.value[selectedPlayerIndex.value].score = score;
|
||||
saveHistoryState();
|
||||
}
|
||||
}
|
||||
};
|
||||
const clearInput = () => {
|
||||
currentInput.value = "";
|
||||
if (selectedPlayerIndex.value !== -1) {
|
||||
players.value[selectedPlayerIndex.value].score = 0;
|
||||
saveHistoryState();
|
||||
}
|
||||
};
|
||||
const confirmInput = () => {
|
||||
if (selectedPlayerIndex.value !== -1) {
|
||||
if (soundEnabled.value) {
|
||||
playSound();
|
||||
}
|
||||
showKeyboard.value = false;
|
||||
}
|
||||
};
|
||||
const combineScore = (index) => {
|
||||
const otherPlayersTotal = players.value.reduce((sum, player, i) => {
|
||||
if (i !== index) {
|
||||
return sum + player.score;
|
||||
}
|
||||
return sum;
|
||||
}, 0);
|
||||
players.value[index].score = -otherPlayersTotal;
|
||||
if (selectedPlayerIndex.value === index && showKeyboard.value) {
|
||||
currentInput.value = players.value[index].score.toString();
|
||||
}
|
||||
saveHistoryState();
|
||||
common_vendor.index.showToast({
|
||||
title: "合分成功",
|
||||
icon: "success"
|
||||
});
|
||||
};
|
||||
const nextRound = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "确认",
|
||||
content: "确定要开始下一局吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
saveHistoryState();
|
||||
players.value.forEach((player) => {
|
||||
player.score = 0;
|
||||
player.result = "";
|
||||
});
|
||||
roundCount.value++;
|
||||
common_vendor.index.showToast({
|
||||
title: `第${roundCount.value}局`,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const playSound = () => {
|
||||
const innerAudioContext = common_vendor.index.createInnerAudioContext();
|
||||
innerAudioContext.src = "/static/sound/click.mp3";
|
||||
innerAudioContext.play();
|
||||
innerAudioContext.onEnded(() => {
|
||||
innerAudioContext.destroy();
|
||||
});
|
||||
};
|
||||
const toggleSound = () => {
|
||||
soundEnabled.value = !soundEnabled.value;
|
||||
common_vendor.index.setStorageSync("soundEnabled", soundEnabled.value);
|
||||
};
|
||||
const showMoreOptions = () => {
|
||||
common_vendor.index.showActionSheet({
|
||||
itemList: ["历史记录", "设置", "帮助"],
|
||||
success: (res) => {
|
||||
switch (res.tapIndex) {
|
||||
case 0:
|
||||
common_vendor.index.navigateTo({ url: "/pages/history-game/index" });
|
||||
break;
|
||||
case 1:
|
||||
common_vendor.index.showToast({ title: "设置功能开发中", icon: "none" });
|
||||
break;
|
||||
case 2:
|
||||
common_vendor.index.showToast({ title: "帮助文档开发中", icon: "none" });
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const endGame = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "确认",
|
||||
content: "确定要结束当前对局吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
common_vendor.index.setStorageSync("updatedPlayers", JSON.stringify(players.value));
|
||||
common_vendor.index.$emit("updatePlayers");
|
||||
common_vendor.index.showToast({
|
||||
title: "对局已结束",
|
||||
icon: "success",
|
||||
duration: 1500,
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/scoring.vue:454", "结束对局失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/scoring.vue:467", "计分页面加载完成");
|
||||
loadPlayersData();
|
||||
const savedSound = common_vendor.index.getStorageSync("soundEnabled");
|
||||
if (savedSound !== "") {
|
||||
soundEnabled.value = savedSound;
|
||||
}
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
type: "arrow-left",
|
||||
size: "24",
|
||||
color: "#fff"
|
||||
}),
|
||||
b: common_vendor.o(goBack),
|
||||
c: common_vendor.t(roundCount.value),
|
||||
d: common_vendor.o(showMoreOptions),
|
||||
e: common_vendor.t(soundEnabled.value ? "🔊" : "🔇"),
|
||||
f: common_vendor.o(toggleSound),
|
||||
g: common_vendor.f(players.value, (player, index, i0) => {
|
||||
return {
|
||||
a: player.avatar,
|
||||
b: common_vendor.t(player.name),
|
||||
c: player.result === "win" ? 1 : "",
|
||||
d: common_vendor.o(($event) => setPlayerResult(index, "win"), player.id),
|
||||
e: player.result === "lose" ? 1 : "",
|
||||
f: common_vendor.o(($event) => setPlayerResult(index, "lose"), player.id),
|
||||
g: selectedPlayerIndex.value === index && showKeyboard.value ? currentInput.value : player.score,
|
||||
h: common_vendor.o(() => {
|
||||
}, player.id),
|
||||
i: common_vendor.o(($event) => selectPlayer(index), player.id),
|
||||
j: common_vendor.o(($event) => combineScore(index), player.id),
|
||||
k: !selectedPlayerIndex.value === index,
|
||||
l: player.id,
|
||||
m: selectedPlayerIndex.value === index ? 1 : "",
|
||||
n: common_vendor.o(($event) => selectPlayer(index), player.id)
|
||||
};
|
||||
}),
|
||||
h: showKeyboard.value
|
||||
}, showKeyboard.value ? {
|
||||
i: common_vendor.o(($event) => inputNumber(1)),
|
||||
j: common_vendor.o(($event) => inputNumber(2)),
|
||||
k: common_vendor.o(($event) => inputNumber(3)),
|
||||
l: common_vendor.o(($event) => inputOperation("+")),
|
||||
m: common_vendor.o(deleteLastChar),
|
||||
n: common_vendor.o(($event) => inputNumber(4)),
|
||||
o: common_vendor.o(($event) => inputNumber(5)),
|
||||
p: common_vendor.o(($event) => inputNumber(6)),
|
||||
q: common_vendor.o(($event) => inputOperation("-")),
|
||||
r: common_vendor.o(($event) => inputNumber(7)),
|
||||
s: common_vendor.o(($event) => inputNumber(8)),
|
||||
t: common_vendor.o(($event) => inputNumber(9)),
|
||||
v: common_vendor.o(clearInput),
|
||||
w: common_vendor.o(confirmInput),
|
||||
x: common_vendor.o(($event) => inputNumber(0))
|
||||
} : {}, {
|
||||
y: !showKeyboard.value
|
||||
}, !showKeyboard.value ? {
|
||||
z: common_vendor.o(nextRound),
|
||||
A: common_vendor.o(endGame)
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-94d9c592"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/singleplay/scoring.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/scoring.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "计分中",
|
||||
"navigationBarHidden": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/scoring.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="scoring-page data-v-94d9c592"><view class="header data-v-94d9c592"><view class="back-btn data-v-94d9c592" bindtap="{{b}}"><uni-icons wx:if="{{a}}" class="data-v-94d9c592" u-i="94d9c592-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view><view class="title data-v-94d9c592">第{{c}}局</view><view class="header-right data-v-94d9c592"><view class="more-btn data-v-94d9c592" bindtap="{{d}}">...</view><view class="separator data-v-94d9c592"></view><view class="sound-toggle data-v-94d9c592" bindtap="{{f}}"><text class="sound-icon data-v-94d9c592">{{e}}</text></view></view></view><view class="players-list data-v-94d9c592"><view class="list-header data-v-94d9c592"><view class="col-player data-v-94d9c592">玩家</view><view class="col-result data-v-94d9c592">胜负</view><view class="col-score data-v-94d9c592">得分</view></view><view wx:for="{{g}}" wx:for-item="player" wx:key="l" class="{{['player-row', 'data-v-94d9c592', player.m && 'selected']}}" bindtap="{{player.n}}"><view class="col-player data-v-94d9c592"><image src="{{player.a}}" mode="aspectFill" class="player-avatar data-v-94d9c592"></image><text class="player-name data-v-94d9c592">{{player.b}}</text></view><view class="col-result data-v-94d9c592"><view class="result-buttons data-v-94d9c592"><button class="{{['result-btn', 'win', 'data-v-94d9c592', player.c && 'active']}}" catchtap="{{player.d}}">胜</button><button class="{{['result-btn', 'lose', 'data-v-94d9c592', player.e && 'active']}}" catchtap="{{player.f}}">负</button></view></view><view class="col-score data-v-94d9c592"><view class="score-input-container data-v-94d9c592"><input type="number" class="score-input data-v-94d9c592" value="{{player.g}}" catchfocus="{{player.h}}" catchtap="{{player.i}}" readonly disabled/><button class="combine-btn data-v-94d9c592" catchtap="{{player.j}}" disabled="{{player.k}}">合分</button></view></view></view></view><view wx:if="{{h}}" class="number-keyboard data-v-94d9c592"><view class="keyboard-row data-v-94d9c592"><view class="key data-v-94d9c592" bindtap="{{i}}">1</view><view class="key data-v-94d9c592" bindtap="{{j}}">2</view><view class="key data-v-94d9c592" bindtap="{{k}}">3</view><view class="key operation data-v-94d9c592" bindtap="{{l}}">+</view><view class="key delete data-v-94d9c592" bindtap="{{m}}"><text class="data-v-94d9c592">⌫</text></view></view><view class="keyboard-row data-v-94d9c592"><view class="key data-v-94d9c592" bindtap="{{n}}">4</view><view class="key data-v-94d9c592" bindtap="{{o}}">5</view><view class="key data-v-94d9c592" bindtap="{{p}}">6</view><view class="key operation data-v-94d9c592" bindtap="{{q}}">-</view><view class="key empty data-v-94d9c592"></view></view><view class="keyboard-row data-v-94d9c592"><view class="key data-v-94d9c592" bindtap="{{r}}">7</view><view class="key data-v-94d9c592" bindtap="{{s}}">8</view><view class="key data-v-94d9c592" bindtap="{{t}}">9</view><view class="key operation data-v-94d9c592" bindtap="{{v}}">C</view><view class="key confirm data-v-94d9c592" bindtap="{{w}}">提交</view></view><view class="keyboard-row data-v-94d9c592"><view class="key zero data-v-94d9c592" bindtap="{{x}}">0</view></view></view><view wx:if="{{y}}" class="bottom-actions data-v-94d9c592"><button class="action-btn data-v-94d9c592" type="default" bindtap="{{z}}">下一局</button><button class="action-btn primary data-v-94d9c592" type="primary" bindtap="{{A}}">结束对局</button></view></view>
|
||||
277
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/scoring.wxss
vendored
Normal file
@@ -0,0 +1,277 @@
|
||||
.scoring-page.data-v-94d9c592 {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* 顶部导航栏 */
|
||||
.header.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 90rpx;
|
||||
background-color: #3a68b9;
|
||||
color: white;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.back-btn.data-v-94d9c592 {
|
||||
font-size: 36rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.back-btn.data-v-94d9c592:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.title.data-v-94d9c592 {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.header-right.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.more-btn.data-v-94d9c592,
|
||||
.sound-toggle.data-v-94d9c592 {
|
||||
font-size: 36rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.separator.data-v-94d9c592 {
|
||||
width: 2rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
/* 玩家列表区域 */
|
||||
.players-list.data-v-94d9c592 {
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
margin: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
}
|
||||
/* 列表表头 */
|
||||
.list-header.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 80rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-bottom: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.col-player.data-v-94d9c592,
|
||||
.col-result.data-v-94d9c592,
|
||||
.col-score.data-v-94d9c592 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.col-player.data-v-94d9c592 {
|
||||
flex: 2;
|
||||
justify-content: flex-start;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.col-result.data-v-94d9c592 {
|
||||
flex: 1;
|
||||
}
|
||||
.col-score.data-v-94d9c592 {
|
||||
flex: 1;
|
||||
}
|
||||
/* 玩家行 */
|
||||
.player-row.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
.player-row.data-v-94d9c592:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.player-row.selected.data-v-94d9c592 {
|
||||
background-color: #e6f0ff;
|
||||
}
|
||||
.player-row .col-player.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.player-avatar.data-v-94d9c592 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.player-name.data-v-94d9c592 {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
/* 胜负按钮 */
|
||||
.result-buttons.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.result-btn.data-v-94d9c592 {
|
||||
width: 60rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 24rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
}
|
||||
.result-btn.win.active.data-v-94d9c592 {
|
||||
background-color: #4cd964;
|
||||
color: white;
|
||||
border-color: #4cd964;
|
||||
}
|
||||
.result-btn.lose.active.data-v-94d9c592 {
|
||||
background-color: #ff3b30;
|
||||
color: white;
|
||||
border-color: #ff3b30;
|
||||
}
|
||||
/* 分数输入区域 */
|
||||
.score-input-container.data-v-94d9c592 {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.score-input.data-v-94d9c592 {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 8rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.combine-btn.data-v-94d9c592 {
|
||||
position: absolute;
|
||||
bottom: -40rpx;
|
||||
width: 80rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 20rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #34aadc;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
/* 数字键盘 */
|
||||
.number-keyboard.data-v-94d9c592 {
|
||||
width: 100%;
|
||||
background-color: #f0f0f0;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.keyboard-row.data-v-94d9c592 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.keyboard-row.data-v-94d9c592:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.key.data-v-94d9c592 {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 10rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.key.data-v-94d9c592:active {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
.key.zero.data-v-94d9c592 {
|
||||
flex: 3;
|
||||
}
|
||||
.key.operation.data-v-94d9c592 {
|
||||
background-color: #ff9500;
|
||||
color: white;
|
||||
}
|
||||
.key.delete.data-v-94d9c592 {
|
||||
background-color: #ff3b30;
|
||||
color: white;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 80rpx;
|
||||
/* 确保按钮有足够宽度 */
|
||||
}
|
||||
.key.delete img.data-v-94d9c592 {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
object-fit: contain;
|
||||
transition: transform 0.1s ease, opacity 0.1s ease;
|
||||
pointer-events: none;
|
||||
/* 防止图片在微信小程序中捕获点击事件 */
|
||||
}
|
||||
.key.delete.data-v-94d9c592:active {
|
||||
background-color: #e03024;
|
||||
/* 点击时背景色变深 */
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.key.delete:active img.data-v-94d9c592 {
|
||||
transform: scale(0.9);
|
||||
opacity: 0.85;
|
||||
}
|
||||
.key.delete-icon.data-v-94d9c592 {
|
||||
font-size: 36rpx;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.key.confirm.data-v-94d9c592 {
|
||||
background-color: #34c759;
|
||||
color: white;
|
||||
}
|
||||
.key.empty.data-v-94d9c592 {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
/* 底部操作栏 */
|
||||
.bottom-actions.data-v-94d9c592 {
|
||||
padding: 20rpx;
|
||||
background-color: white;
|
||||
border-top: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.action-btn.data-v-94d9c592 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 15rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
.action-btn.data-v-94d9c592:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.action-btn.primary.data-v-94d9c592 {
|
||||
background-color: #007aff;
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
269
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/singleplay.js
vendored
Normal file
@@ -0,0 +1,269 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
__name: "singleplay",
|
||||
setup(__props) {
|
||||
const voiceBroadcast = common_vendor.ref(false);
|
||||
const tableMode = common_vendor.ref(false);
|
||||
const roomId = common_vendor.ref("");
|
||||
const currentUser = common_vendor.ref({
|
||||
id: "self",
|
||||
name: "玩家50950",
|
||||
avatar: "https://t14.baidu.com/it/u=3165460156,649373630&fm=224&app=112&f=JPEG?w=500&h=500"
|
||||
});
|
||||
const players = common_vendor.ref([
|
||||
{
|
||||
id: "self",
|
||||
name: "玩家50950",
|
||||
avatar: "https://t14.baidu.com/it/u=3165460156,649373630&fm=224&app=112&f=JPEG?w=500&h=500",
|
||||
score: 0
|
||||
}
|
||||
]);
|
||||
const tablePlayer = {
|
||||
id: "table",
|
||||
name: "台板",
|
||||
avatar: "/static/robot.png",
|
||||
score: 0
|
||||
};
|
||||
const displayPlayers = common_vendor.computed(() => {
|
||||
if (tableMode.value) {
|
||||
const hasTablePlayer = players.value.some((player) => player.id === "table");
|
||||
if (hasTablePlayer) {
|
||||
return players.value;
|
||||
}
|
||||
return [...players.value, tablePlayer];
|
||||
} else {
|
||||
return players.value.filter((player) => player.id !== "table");
|
||||
}
|
||||
});
|
||||
const addPlayer = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:130", "添加玩家");
|
||||
const defaultPlayerName = "请输入玩家名称";
|
||||
common_vendor.index.showModal({
|
||||
title: "添加玩家",
|
||||
editable: true,
|
||||
placeholderText: defaultPlayerName,
|
||||
confirmText: "添加",
|
||||
cancelText: "取消",
|
||||
autofocus: true,
|
||||
// 微信小程序下自动聚焦输入框
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
const playerName = res.content && res.content.trim() !== "" ? res.content.trim() : defaultPlayerName;
|
||||
const newPlayer = {
|
||||
id: `player_${Date.now()}`,
|
||||
name: playerName,
|
||||
avatar: "/static/people.png",
|
||||
score: 0
|
||||
};
|
||||
players.value.push(newPlayer);
|
||||
if (voiceBroadcast.value) {
|
||||
common_vendor.index.showToast({
|
||||
title: `已添加玩家 ${newPlayer.name}`,
|
||||
icon: "none"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: `已添加玩家 ${newPlayer.name}`,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/singleplay.vue:177", "添加玩家失败:", err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const transferScorer = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:184", "转让计分员");
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "房间内暂无扫码或分享加入房间的玩家,无法转让计分员。",
|
||||
showCancel: false,
|
||||
confirmText: "确定",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:196", "用户确认提示");
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/singleplay.vue:200", "显示提示失败:", err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const editUserInfo = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:207", "跳转到用户信息编辑页面");
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/index/singleplay/change?userData=${encodeURIComponent(JSON.stringify(currentUser.value))}`
|
||||
});
|
||||
};
|
||||
const editScore = (index) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:246", "编辑分数", index);
|
||||
const player = displayPlayers.value[index];
|
||||
if (player.id === "table") {
|
||||
common_vendor.index.showModal({
|
||||
title: "修改台板分数",
|
||||
content: `当前分数: ${player.score}`,
|
||||
editable: true,
|
||||
placeholderText: "请输入新分数",
|
||||
success: (res) => {
|
||||
if (res.confirm && res.content !== null) {
|
||||
const newScore = parseInt(res.content);
|
||||
if (!isNaN(newScore)) {
|
||||
const tableIndex = players.value.findIndex((p) => p.id === "table");
|
||||
if (tableIndex !== -1) {
|
||||
players.value[tableIndex].score = newScore;
|
||||
} else {
|
||||
tablePlayer.score = newScore;
|
||||
}
|
||||
if (voiceBroadcast.value) {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:272", `语音播报: 台板 分数更新为 ${newScore}`);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入有效的数字",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showModal({
|
||||
title: "修改分数",
|
||||
content: `${player.score}`,
|
||||
editable: true,
|
||||
placeholderText: "请输入新分数",
|
||||
success: (res) => {
|
||||
if (res.confirm && res.content !== null) {
|
||||
const newScore = parseInt(res.content);
|
||||
if (!isNaN(newScore)) {
|
||||
const playerIndex = players.value.findIndex((p) => p.id === player.id);
|
||||
if (playerIndex !== -1) {
|
||||
players.value[playerIndex].score = newScore;
|
||||
}
|
||||
if (voiceBroadcast.value) {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:304", `语音播报: ${player.name} 分数更新为 ${newScore}`);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入有效的数字",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const startScoring = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:319", "开局计分");
|
||||
if (displayPlayers.value.length < 2) {
|
||||
common_vendor.index.showToast({
|
||||
title: "玩家数不超过两个人时无法点击进行开始计分",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
players.value.forEach((player) => {
|
||||
player.score = 0;
|
||||
});
|
||||
if (tableMode.value) {
|
||||
tablePlayer.score = 0;
|
||||
}
|
||||
const playersToPass = [...displayPlayers.value];
|
||||
common_vendor.index.setStorageSync("currentPlayers", JSON.stringify(playersToPass));
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/singleplay/scoring"
|
||||
});
|
||||
};
|
||||
const settleRoom = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:354", "结算房间");
|
||||
let result = "结算结果:\n";
|
||||
displayPlayers.value.forEach((player) => {
|
||||
result += `${player.name}: ${player.score}分
|
||||
`;
|
||||
});
|
||||
common_vendor.index.showModal({
|
||||
title: "结算",
|
||||
content: result,
|
||||
confirmText: "保存记录",
|
||||
cancelText: "关闭",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
common_vendor.index.showToast({
|
||||
title: "记录已保存",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:381", "单人模式页面加载完成");
|
||||
roomId.value = Math.floor(1e3 + Math.random() * 9e3).toString();
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: `单人 - ${roomId.value}号房间`
|
||||
});
|
||||
const updateListener = () => {
|
||||
const updatedPlayers = common_vendor.index.getStorageSync("updatedPlayers");
|
||||
if (updatedPlayers) {
|
||||
try {
|
||||
const parsedPlayers = JSON.parse(updatedPlayers);
|
||||
common_vendor.index.__f__("log", "at pages/index/singleplay/singleplay.vue:399", "收到更新的玩家数据:", parsedPlayers);
|
||||
parsedPlayers.forEach((updatedPlayer) => {
|
||||
const playerIndex = players.value.findIndex((p) => p.id === updatedPlayer.id);
|
||||
if (playerIndex !== -1) {
|
||||
players.value[playerIndex].score = updatedPlayer.score;
|
||||
} else if (updatedPlayer.id === "table") {
|
||||
tablePlayer.score = updatedPlayer.score;
|
||||
}
|
||||
});
|
||||
common_vendor.index.removeStorageSync("updatedPlayers");
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/singleplay/singleplay.vue:417", "解析更新的玩家数据失败:", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
common_vendor.index.$on("updatePlayers", updateListener);
|
||||
common_vendor.index.onShow(() => {
|
||||
updateListener();
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.index.$off("updatePlayers", updateListener);
|
||||
});
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_assets._imports_0,
|
||||
b: common_vendor.o(addPlayer),
|
||||
c: common_assets._imports_1,
|
||||
d: common_vendor.o(transferScorer),
|
||||
e: voiceBroadcast.value,
|
||||
f: common_vendor.o(($event) => voiceBroadcast.value = $event.detail.value),
|
||||
g: tableMode.value,
|
||||
h: common_vendor.o(($event) => tableMode.value = $event.detail.value),
|
||||
i: currentUser.value.avatar,
|
||||
j: common_vendor.t(currentUser.value.name),
|
||||
k: common_vendor.o(editUserInfo),
|
||||
l: common_vendor.t(players.value.length),
|
||||
m: common_vendor.f(displayPlayers.value, (player, index, i0) => {
|
||||
return {
|
||||
a: player.avatar,
|
||||
b: common_vendor.t(player.name),
|
||||
c: common_vendor.t(player.score),
|
||||
d: common_vendor.o(($event) => editScore(index), player.id),
|
||||
e: player.id
|
||||
};
|
||||
}),
|
||||
n: common_vendor.o(startScoring),
|
||||
o: common_vendor.o(settleRoom)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d36a0b1a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/singleplay/singleplay.js.map
|
||||
4
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/singleplay.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "单人计分",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/singleplay.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="singleplay data-v-d36a0b1a"><view class="top-functions data-v-d36a0b1a"><view class="function-btn data-v-d36a0b1a" bindtap="{{b}}"><image src="{{a}}" class="btn-icon data-v-d36a0b1a" mode="aspectFill"></image><text class="data-v-d36a0b1a">添加玩家</text></view><view class="function-btn data-v-d36a0b1a" bindtap="{{d}}"><image src="{{c}}" class="btn-icon data-v-d36a0b1a" mode="aspectFill"></image><text class="data-v-d36a0b1a">转让计分员</text></view><view class="switch-group data-v-d36a0b1a"><text class="data-v-d36a0b1a">语音播报</text><switch class="data-v-d36a0b1a" checked="{{e}}" bindchange="{{f}}" color="#007aff"/></view><view class="switch-group data-v-d36a0b1a"><text class="data-v-d36a0b1a">台板</text><switch class="data-v-d36a0b1a" checked="{{g}}" bindchange="{{h}}" color="#007aff"/></view></view><view class="game-record data-v-d36a0b1a"><view class="record-title data-v-d36a0b1a"> 对局记录 <text class="hint data-v-d36a0b1a">点击对局分数进行修改</text></view><view class="user-section data-v-d36a0b1a"><text class="user-hint data-v-d36a0b1a">点击自己头像编辑用户头像和昵称~</text><view class="user-info data-v-d36a0b1a" bindtap="{{k}}"><image class="user-avatar data-v-d36a0b1a" src="{{i}}" mode="aspectFill"></image><view class="user-details data-v-d36a0b1a"><view class="user-name data-v-d36a0b1a">{{j}} <text class="self-tag data-v-d36a0b1a">自己</text></view></view></view></view><view class="players-section data-v-d36a0b1a"><view class="section-header data-v-d36a0b1a"><text class="header-title data-v-d36a0b1a">玩家</text><text class="player-count data-v-d36a0b1a">({{l}}位)</text></view><view class="players-table data-v-d36a0b1a"><view class="table-header data-v-d36a0b1a"><view class="player-column data-v-d36a0b1a">玩家</view><view class="score-column data-v-d36a0b1a">总分</view></view><view class="table-body data-v-d36a0b1a"><view wx:for="{{m}}" wx:for-item="player" wx:key="e" class="player-row data-v-d36a0b1a"><view class="player-info data-v-d36a0b1a"><image class="data-v-d36a0b1a" src="{{player.a}}" mode="aspectFill"></image><text class="data-v-d36a0b1a">{{player.b}}</text></view><view class="score-display data-v-d36a0b1a" bindtap="{{player.d}}">{{player.c}}</view></view></view></view></view></view><view class="bottom-buttons data-v-d36a0b1a"><button class="start-btn data-v-d36a0b1a" type="primary" bindtap="{{n}}">开局计分</button><button class="settle-btn data-v-d36a0b1a" type="default" bindtap="{{o}}">结算房间</button></view></view>
|
||||
259
scoring/unpackage/dist/dev/mp-weixin/pages/index/singleplay/singleplay.wxss
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
.singleplay.data-v-d36a0b1a {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #f8f8f8;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* 顶部功能区 */
|
||||
.top-functions.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.top-functions .function-btn.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 5rpx;
|
||||
padding: 8rpx 8rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
margin: 0 8rpx;
|
||||
transition: all 0.3s ease;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.top-functions .function-btn .btn-icon.data-v-d36a0b1a {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.top-functions .function-btn text.data-v-d36a0b1a {
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.top-functions .function-btn.data-v-d36a0b1a:active {
|
||||
opacity: 0.8;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
.top-functions .switch-group.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
margin: 0 8rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.top-functions .switch-group text.data-v-d36a0b1a {
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.top-functions .switch-group switch.data-v-d36a0b1a {
|
||||
transform: scale(0.75);
|
||||
}
|
||||
/* 对局记录区域 */
|
||||
.game-record.data-v-d36a0b1a {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 30rpx;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.record-title.data-v-d36a0b1a {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.record-title .hint.data-v-d36a0b1a {
|
||||
font-size: 24rpx;
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 用户信息区域 */
|
||||
.user-section.data-v-d36a0b1a {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.user-section .user-hint.data-v-d36a0b1a {
|
||||
font-size: 24rpx;
|
||||
color: #fa5d5d;
|
||||
margin-bottom: 15rpx;
|
||||
display: block;
|
||||
}
|
||||
.user-section .user-info.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 15rpx;
|
||||
padding: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #f0f8ff;
|
||||
}
|
||||
.user-section .user-info .user-avatar.data-v-d36a0b1a {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-section .user-info .user-details .user-name.data-v-d36a0b1a {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.user-section .user-info .user-details .user-name .self-tag.data-v-d36a0b1a {
|
||||
background-color: #007aff;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
/* 玩家列表区域 */
|
||||
.players-section .section-header.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
.players-section .section-header .header-title.data-v-d36a0b1a {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
.players-section .section-header .player-count.data-v-d36a0b1a {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 玩家表格 */
|
||||
.players-table.data-v-d36a0b1a {
|
||||
border: 1rpx solid #e0e0e0;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.players-table .table-header.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.players-table .table-header .player-column.data-v-d36a0b1a {
|
||||
flex: 2;
|
||||
padding: 15rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
border-right: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.players-table .table-header .score-column.data-v-d36a0b1a {
|
||||
flex: 1;
|
||||
padding: 15rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
.players-table .table-body .player-row.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.players-table .table-body .player-row.data-v-d36a0b1a:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.players-table .table-body .player-row .player-info.data-v-d36a0b1a {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 15rpx;
|
||||
padding: 15rpx;
|
||||
border-right: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.players-table .table-body .player-row .player-info image.data-v-d36a0b1a {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.players-table .table-body .player-row .player-info text.data-v-d36a0b1a {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
.players-table .table-body .player-row .score-display.data-v-d36a0b1a {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #007aff;
|
||||
}
|
||||
.players-table .table-body .player-row .score-display.data-v-d36a0b1a:active {
|
||||
background-color: #f0f8ff;
|
||||
}
|
||||
/* 底部操作按钮 */
|
||||
.bottom-buttons.data-v-d36a0b1a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20rpx;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
.bottom-buttons .start-btn.data-v-d36a0b1a,
|
||||
.bottom-buttons .settle-btn.data-v-d36a0b1a {
|
||||
flex: 1;
|
||||
height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 90rpx;
|
||||
margin: 0;
|
||||
}
|
||||
.bottom-buttons .start-btn.data-v-d36a0b1a {
|
||||
background-color: #007aff;
|
||||
}
|
||||
.bottom-buttons .settle-btn.data-v-d36a0b1a {
|
||||
border: 1rpx solid #007aff;
|
||||
color: #007aff;
|
||||
}
|
||||
/* 适配不同屏幕尺寸 */
|
||||
@media screen and (max-width: 375px) {
|
||||
.singleplay.data-v-d36a0b1a {
|
||||
padding: 15rpx;
|
||||
}
|
||||
.top-functions.data-v-d36a0b1a {
|
||||
gap: 8rpx;
|
||||
}
|
||||
.top-functions .function-btn.data-v-d36a0b1a {
|
||||
padding: 1rpx 1rpx;
|
||||
}
|
||||
.top-functions .function-btn text.data-v-d36a0b1a {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
70
scoring/unpackage/dist/dev/mp-weixin/pages/my/favorites.js
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "favorites",
|
||||
setup(__props) {
|
||||
common_vendor.getCurrentInstance().proxy;
|
||||
common_vendor.ref("all");
|
||||
const userList = common_vendor.ref([
|
||||
{
|
||||
avatar: "https://q3.itc.cn/q_70/images03/20250110/1e71eecf56b34344bcae6a5b85c0bec2.jpeg",
|
||||
name: "赵云",
|
||||
score: 100
|
||||
},
|
||||
{
|
||||
avatar: "https://q1.itc.cn/q_70/images03/20241119/197701bb9ef34b20b6497720081a9972.jpeg",
|
||||
name: "张飞",
|
||||
score: -50
|
||||
},
|
||||
{
|
||||
avatar: "https://img1.baidu.com/it/u=3612220943,2414740890&fm=253&app=138&f=JPEG?w=526&h=500",
|
||||
name: "刘备",
|
||||
score: 30
|
||||
},
|
||||
{
|
||||
avatar: "https://c-ssl.dtstatic.com/uploads/blog/202206/12/20220612135738_992b1.thumb.1000_0.jpg",
|
||||
name: "诸葛亮",
|
||||
score: -80
|
||||
}
|
||||
]);
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(2, (item, k0, i0) => {
|
||||
return {
|
||||
a: "1a2a9709-0-" + i0,
|
||||
b: common_vendor.f(userList.value, (user, index, i1) => {
|
||||
return {
|
||||
a: user.avatar,
|
||||
b: common_vendor.t(user.name),
|
||||
c: common_vendor.t(user.score),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
c: "1a2a9709-1-" + i0,
|
||||
d: item
|
||||
};
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
type: "trash",
|
||||
size: "30"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
type: "right",
|
||||
size: "25",
|
||||
color: "#748cec"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1a2a9709"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/favorites.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/my/favorites.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "收藏的对局",
|
||||
"navigationBarHidden": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/my/favorites.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="history-game data-v-1a2a9709"><view class="game-list data-v-1a2a9709"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" class="game-item data-v-1a2a9709"><view class="game-info data-v-1a2a9709"><view class="game-type data-v-1a2a9709">单人-1237房间</view><view class="game-date data-v-1a2a9709">2025-06-12 12:00</view><view class="del-btn data-v-1a2a9709"><uni-icons wx:if="{{b}}" class="data-v-1a2a9709" u-i="{{item.a}}" bind:__l="__l" u-p="{{b}}"></uni-icons></view></view><view class="game-user data-v-1a2a9709"><view wx:for="{{item.b}}" wx:for-item="user" wx:key="d" class="game-user-item data-v-1a2a9709"><view class="user-avatar data-v-1a2a9709"><image class="data-v-1a2a9709" src="{{user.a}}" mode="aspectFill"></image></view><view class="user-name data-v-1a2a9709">{{user.b}}</view><view class="user-score data-v-1a2a9709">{{user.c}}</view></view></view><view class="game-foot data-v-1a2a9709"><view class="game-status data-v-1a2a9709"> 已结束 </view><view class="check-detail data-v-1a2a9709"><uni-icons wx:if="{{c}}" class="data-v-1a2a9709" u-i="{{item.c}}" bind:__l="__l" u-p="{{c}}"></uni-icons></view></view></view></view></view>
|
||||
116
scoring/unpackage/dist/dev/mp-weixin/pages/my/favorites.wxss
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
.history-game.data-v-1a2a9709 {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.filter-tab.data-v-1a2a9709 {
|
||||
--filter-height: 80rpx;
|
||||
--filter-color: #748cec;
|
||||
--filter-border: 1rpx;
|
||||
width: 700rpx;
|
||||
height: var(--filter-height);
|
||||
margin: 20rpx auto;
|
||||
display: flex;
|
||||
}
|
||||
.filter-tab .filter-item.data-v-1a2a9709 {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: calc(var(--filter-height) - 2 * var(--filter-border));
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
border: var(--filter-border) solid var(--filter-color);
|
||||
}
|
||||
.filter-tab .filter-active.data-v-1a2a9709 {
|
||||
background-color: var(--filter-color);
|
||||
color: #ffffff;
|
||||
}
|
||||
.game-list.data-v-1a2a9709 {
|
||||
width: 700rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.game-list .game-item.data-v-1a2a9709 {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
margin: 20rpx 0;
|
||||
box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.game-list .game-item .game-info.data-v-1a2a9709 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.game-list .game-item .game-info .game-type.data-v-1a2a9709 {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.game-list .game-item .game-info .game-date.data-v-1a2a9709 {
|
||||
font-size: 32rpx;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
.game-list .game-item .game-info .del-btn.data-v-1a2a9709 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-left: 1rpx solid #cccccc;
|
||||
}
|
||||
.game-list .game-item .game-user.data-v-1a2a9709 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
overflow: auto;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item.data-v-1a2a9709 {
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-avatar.data-v-1a2a9709 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-avatar image.data-v-1a2a9709 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-name.data-v-1a2a9709 {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.game-list .game-item .game-user .game-user-item .user-score.data-v-1a2a9709 {
|
||||
font-size: 32rpx;
|
||||
color: #fa5d5d;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.game-list .game-item .game-foot.data-v-1a2a9709 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.game-list .game-item .game-foot .game-status.data-v-1a2a9709 {
|
||||
font-size: 32rpx;
|
||||
color: #57bcef;
|
||||
}
|
||||
.game-list .game-item .game-foot .check-detail.data-v-1a2a9709 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
194
scoring/unpackage/dist/dev/mp-weixin/pages/my/feedback.js
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "feedback",
|
||||
setup(__props) {
|
||||
const expandedIndex = common_vendor.ref(-1);
|
||||
const showSubmitForm = common_vendor.ref(false);
|
||||
const selectedType = common_vendor.ref("");
|
||||
const feedbackContent = common_vendor.ref("");
|
||||
const images = common_vendor.ref([]);
|
||||
const contactInfo = common_vendor.ref("");
|
||||
const faqList = [
|
||||
{
|
||||
question: "如何添加新玩家?",
|
||||
answer: '在游戏开始页面,点击"添加玩家"按钮,输入玩家名称即可添加新玩家。您可以添加多个玩家参与计分。'
|
||||
},
|
||||
{
|
||||
question: "如何修改玩家分数?",
|
||||
answer: '点击玩家对应的分数区域,会弹出数字键盘,输入新的分数后点击"提交"即可更新玩家分数。'
|
||||
},
|
||||
{
|
||||
question: "如何查看历史对局记录?",
|
||||
answer: '在首页点击"历史记录"图标,进入历史记录页面即可查看所有保存的对局记录。'
|
||||
},
|
||||
{
|
||||
question: "如何清除应用缓存?",
|
||||
answer: '在"我的"页面,点击"设置",然后选择"清除缓存"选项即可清除应用缓存数据。'
|
||||
},
|
||||
{
|
||||
question: "计分数据会同步到云端吗?",
|
||||
answer: "目前计分数据仅保存在本地,不会自动同步到云端。如需备份,请定期导出数据。"
|
||||
}
|
||||
];
|
||||
const problemTypes = [
|
||||
{
|
||||
name: "功能建议",
|
||||
img: "/static/advise.png",
|
||||
color: "#ffcc00"
|
||||
},
|
||||
{
|
||||
name: "bug反馈",
|
||||
img: "/static/bug.png",
|
||||
color: "#ff3b30"
|
||||
},
|
||||
{
|
||||
name: "界面优化",
|
||||
img: "/static/optimize.png",
|
||||
color: "#34aadc"
|
||||
},
|
||||
{
|
||||
name: "其他问题",
|
||||
img: "/static/other.png",
|
||||
color: "#999999"
|
||||
}
|
||||
];
|
||||
const toggleFaq = (index) => {
|
||||
expandedIndex.value = expandedIndex.value === index ? -1 : index;
|
||||
};
|
||||
const selectProblemType = (type) => {
|
||||
selectedType.value = type.name;
|
||||
showSubmitForm.value = true;
|
||||
};
|
||||
const chooseImage = () => {
|
||||
common_vendor.index.chooseImage({
|
||||
count: 3 - images.value.length,
|
||||
sizeType: ["compressed"],
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
images.value = [...images.value, ...res.tempFilePaths];
|
||||
}
|
||||
});
|
||||
};
|
||||
const deleteImage = (index) => {
|
||||
images.value.splice(index, 1);
|
||||
};
|
||||
const submitFeedback = () => {
|
||||
if (!feedbackContent.value.trim()) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入反馈内容",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
title: "提交中..."
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "反馈提交成功",
|
||||
icon: "success"
|
||||
});
|
||||
feedbackContent.value = "";
|
||||
images.value = [];
|
||||
contactInfo.value = "";
|
||||
showSubmitForm.value = false;
|
||||
}, 1500);
|
||||
};
|
||||
const copyEmail = () => {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: "support@example.com",
|
||||
success: () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "邮箱已复制",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(faqList, (faq, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(faq.question),
|
||||
b: "8ccffc96-0-" + i0,
|
||||
c: common_vendor.p({
|
||||
type: expandedIndex.value === index ? "up" : "down",
|
||||
size: "24",
|
||||
color: "#999"
|
||||
}),
|
||||
d: expandedIndex.value === index
|
||||
}, expandedIndex.value === index ? {
|
||||
e: common_vendor.t(faq.answer)
|
||||
} : {}, {
|
||||
f: index,
|
||||
g: common_vendor.o(($event) => toggleFaq(index), index)
|
||||
});
|
||||
}),
|
||||
b: !showSubmitForm.value
|
||||
}, !showSubmitForm.value ? {
|
||||
c: common_vendor.f(problemTypes, (type, index, i0) => {
|
||||
return {
|
||||
a: type.img,
|
||||
b: common_vendor.t(type.name),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => selectProblemType(type), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
d: showSubmitForm.value
|
||||
}, showSubmitForm.value ? common_vendor.e({
|
||||
e: feedbackContent.value,
|
||||
f: common_vendor.o(($event) => feedbackContent.value = $event.detail.value),
|
||||
g: common_vendor.t(feedbackContent.value.length),
|
||||
h: images.value.length < 3
|
||||
}, images.value.length < 3 ? {
|
||||
i: common_vendor.p({
|
||||
type: "plus",
|
||||
size: "40",
|
||||
color: "#999"
|
||||
}),
|
||||
j: common_vendor.o(chooseImage)
|
||||
} : {}, {
|
||||
k: common_vendor.f(images.value, (image, index, i0) => {
|
||||
return {
|
||||
a: image,
|
||||
b: "8ccffc96-2-" + i0,
|
||||
c: common_vendor.o(($event) => deleteImage(index), index),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
type: "close",
|
||||
size: "20",
|
||||
color: "white"
|
||||
}),
|
||||
m: contactInfo.value,
|
||||
n: common_vendor.o(($event) => contactInfo.value = $event.detail.value),
|
||||
o: !feedbackContent.value.trim(),
|
||||
p: common_vendor.o(submitFeedback)
|
||||
}) : {}, {
|
||||
q: common_assets._imports_0$2,
|
||||
r: common_vendor.o(copyEmail),
|
||||
s: common_vendor.p({
|
||||
type: "chat",
|
||||
size: "32",
|
||||
color: "#4cd964"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8ccffc96"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/feedback.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/my/feedback.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "帮助与反馈",
|
||||
"navigationBarHidden": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/my/feedback.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="feedback-page data-v-8ccffc96"><view class="feedback-content data-v-8ccffc96"><view class="section data-v-8ccffc96"><view class="section-title data-v-8ccffc96">常见问题</view><view class="faq-list data-v-8ccffc96"><view wx:for="{{a}}" wx:for-item="faq" wx:key="f" class="faq-item data-v-8ccffc96" bindtap="{{faq.g}}"><view class="faq-header data-v-8ccffc96"><text class="faq-question data-v-8ccffc96">{{faq.a}}</text><uni-icons wx:if="{{faq.c}}" class="data-v-8ccffc96" u-i="{{faq.b}}" bind:__l="__l" u-p="{{faq.c}}"></uni-icons></view><view wx:if="{{faq.d}}" class="faq-answer data-v-8ccffc96"><text class="data-v-8ccffc96">{{faq.e}}</text></view></view></view></view><view wx:if="{{b}}" class="section data-v-8ccffc96"><view class="section-title data-v-8ccffc96">问题类型</view><view class="problem-types data-v-8ccffc96"><view wx:for="{{c}}" wx:for-item="type" wx:key="c" class="problem-type data-v-8ccffc96" bindtap="{{type.d}}"><view class="type-icon data-v-8ccffc96"><image src="{{type.a}}" alt="问题类型图标" class="type-icon-image data-v-8ccffc96" mode="aspectFit"></image></view><text class="type-name data-v-8ccffc96">{{type.b}}</text></view></view></view><view wx:if="{{d}}" class="section data-v-8ccffc96"><view class="section-title data-v-8ccffc96">意见反馈</view><view class="form-group data-v-8ccffc96"><view class="form-label data-v-8ccffc96">反馈内容</view><block wx:if="{{r0}}"><textarea class="feedback-textarea data-v-8ccffc96" placeholder="请详细描述您遇到的问题或建议" maxlength="500" rows="6" value="{{e}}" bindinput="{{f}}"></textarea></block><view class="word-count data-v-8ccffc96">{{g}}/500</view></view><view class="form-group data-v-8ccffc96"><view class="form-label data-v-8ccffc96">上传截图(选填)</view><view class="image-upload data-v-8ccffc96"><view wx:if="{{h}}" class="upload-btn data-v-8ccffc96" bindtap="{{j}}"><uni-icons wx:if="{{i}}" class="data-v-8ccffc96" u-i="8ccffc96-1" bind:__l="__l" u-p="{{i}}"></uni-icons></view><view wx:for="{{k}}" wx:for-item="image" wx:key="d" class="image-item data-v-8ccffc96"><image src="{{image.a}}" mode="aspectFill" class="preview-image data-v-8ccffc96"></image><view class="delete-btn data-v-8ccffc96" bindtap="{{image.c}}"><uni-icons wx:if="{{l}}" class="data-v-8ccffc96" u-i="{{image.b}}" bind:__l="__l" u-p="{{l}}"></uni-icons></view></view></view><view class="upload-text data-v-8ccffc96">最多上传3张图片,每张不超过5MB</view></view><view class="form-group data-v-8ccffc96"><view class="form-label data-v-8ccffc96">联系方式(选填)</view><input class="contact-input data-v-8ccffc96" placeholder="请留下您的邮箱或手机号,方便我们联系您" value="{{m}}" bindinput="{{n}}"/></view><button class="submit-btn data-v-8ccffc96" disabled="{{o}}" bindtap="{{p}}">提交反馈</button></view></view><view class="contact-options data-v-8ccffc96"><view class="contact-item data-v-8ccffc96"><view class="contact-icon data-v-8ccffc96"><image src="{{q}}" alt="客服邮箱" class="contact-icon-image data-v-8ccffc96" mode="aspectFit"></image></view><view class="contact-info data-v-8ccffc96"><view class="contact-label data-v-8ccffc96">客服邮箱</view><view class="contact-value data-v-8ccffc96" bindtap="{{r}}">support@example.com</view></view></view><view class="contact-item data-v-8ccffc96"><view class="contact-icon data-v-8ccffc96"><uni-icons wx:if="{{s}}" class="data-v-8ccffc96" u-i="8ccffc96-3" bind:__l="__l" u-p="{{s}}"></uni-icons></view><view class="contact-info data-v-8ccffc96"><view class="contact-label data-v-8ccffc96">在线客服</view><view class="contact-value data-v-8ccffc96">立即联系</view></view></view></view></view>
|
||||
255
scoring/unpackage/dist/dev/mp-weixin/pages/my/feedback.wxss
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
|
||||
.feedback-page.data-v-8ccffc96 {
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
/* 简化的页面标题 */
|
||||
.page-title.data-v-8ccffc96 {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.feedback-content.data-v-8ccffc96 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.section.data-v-8ccffc96 {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.section-title.data-v-8ccffc96 {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
/* 常见问题样式 */
|
||||
.faq-list.data-v-8ccffc96 {
|
||||
width: 100%;
|
||||
}
|
||||
.faq-item.data-v-8ccffc96 {
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.faq-item.data-v-8ccffc96:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.faq-header.data-v-8ccffc96 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 25rpx 0;
|
||||
}
|
||||
.faq-question.data-v-8ccffc96 {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
.faq-answer.data-v-8ccffc96 {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
padding: 0 0 25rpx 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 问题类型样式 */
|
||||
.problem-types.data-v-8ccffc96 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.problem-type.data-v-8ccffc96 {
|
||||
width: 45%;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 15rpx;
|
||||
padding: 30rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.problem-type.data-v-8ccffc96:active {
|
||||
background-color: #e8e8e8;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.type-icon.data-v-8ccffc96 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 15rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.type-name.data-v-8ccffc96 {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 表单样式 */
|
||||
.form-group.data-v-8ccffc96 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.form-label.data-v-8ccffc96 {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin-bottom: 15rpx;
|
||||
display: block;
|
||||
}
|
||||
.feedback-textarea.data-v-8ccffc96 {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
border: 1rpx solid #e0e0e0;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: #fafafa;
|
||||
resize: none;
|
||||
}
|
||||
.word-count.data-v-8ccffc96 {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
/* 优化的图片上传样式 */
|
||||
.image-upload.data-v-8ccffc96 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10rpx;
|
||||
}
|
||||
.upload-btn.data-v-8ccffc96 {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border: 2rpx dashed #007aff;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 10rpx;
|
||||
background-color: #f0f8ff;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.upload-btn.data-v-8ccffc96:active {
|
||||
background-color: #e0e8ff;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.upload-text.data-v-8ccffc96 {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.image-item.data-v-8ccffc96 {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
margin: 10rpx;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.preview-image.data-v-8ccffc96 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
object-fit: cover;
|
||||
}
|
||||
.delete-btn.data-v-8ccffc96 {
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
right: -10rpx;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
background-color: rgba(255, 0, 0, 0.8);
|
||||
border-radius: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.contact-input.data-v-8ccffc96 {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
border: 1rpx solid #e0e0e0;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.submit-btn.data-v-8ccffc96 {
|
||||
margin: 40rpx 30rpx 20rpx;
|
||||
background-color: #007aff;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.submit-btn[disabled].data-v-8ccffc96 {
|
||||
background-color: #cccccc;
|
||||
}
|
||||
|
||||
/* 联系方式样式 */
|
||||
.contact-options.data-v-8ccffc96 {
|
||||
padding: 0 30rpx 30rpx;
|
||||
}
|
||||
.contact-item.data-v-8ccffc96 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.contact-item.data-v-8ccffc96:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.contact-icon.data-v-8ccffc96 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background-color: #f0f8ff;
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.contact-icon-image.data-v-8ccffc96 {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
object-fit: contain;
|
||||
}
|
||||
.contact-info.data-v-8ccffc96 {
|
||||
flex: 1;
|
||||
}
|
||||
.contact-label.data-v-8ccffc96 {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: block;
|
||||
}
|
||||
.contact-value.data-v-8ccffc96 {
|
||||
font-size: 30rpx;
|
||||
color: #007aff;
|
||||
display: block;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
170
scoring/unpackage/dist/dev/mp-weixin/pages/my/my.js
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const utils_wxutils = require("../../utils/wxutils.js");
|
||||
const api_user = require("../../api/user.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "my",
|
||||
setup(__props) {
|
||||
const proxy = common_vendor.getCurrentInstance().proxy;
|
||||
const topHeight = common_vendor.ref(proxy.$StaticValue.getTopHeight());
|
||||
const userInfo = common_vendor.ref({});
|
||||
const totalGames = common_vendor.ref(0);
|
||||
const totalWins = common_vendor.ref(0);
|
||||
const winRate = common_vendor.ref("0%");
|
||||
const unreadCount = common_vendor.ref(0);
|
||||
const version = common_vendor.ref("1.0.0");
|
||||
const getUserInfo = async () => {
|
||||
var _a;
|
||||
userInfo.value = proxy.$StaticValue.getUserInfo();
|
||||
if (!((_a = userInfo.value) == null ? void 0 : _a.userId)) {
|
||||
const openIdRes = await utils_wxutils.getOpenId();
|
||||
const openId = openIdRes.openid;
|
||||
userInfo.value = {
|
||||
openId,
|
||||
nickName: "用户" + openId.substring(0, 6)
|
||||
};
|
||||
api_user.register(userInfo.value).then((res) => {
|
||||
api_user.login(userInfo.value).then((loginRes) => {
|
||||
userInfo.value = loginRes.data;
|
||||
proxy.$StaticValue.setUserInfo(userInfo.value);
|
||||
fetchUserStats();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
fetchUserStats();
|
||||
}
|
||||
};
|
||||
const fetchUserStats = () => {
|
||||
totalGames.value = 42;
|
||||
totalWins.value = 28;
|
||||
winRate.value = "66.7%";
|
||||
unreadCount.value = 2;
|
||||
};
|
||||
const updateAvatar = () => {
|
||||
common_vendor.wx$1.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ["image"],
|
||||
sourceType: ["album", "camera"],
|
||||
sizeType: ["compressed"],
|
||||
success: (res) => {
|
||||
if (res.tempFiles && res.tempFiles.length > 0) {
|
||||
const tempFilePath = res.tempFiles[0].tempFilePath;
|
||||
common_vendor.wx$1.previewImage({
|
||||
urls: [tempFilePath],
|
||||
success: () => {
|
||||
userInfo.value.avatarUrl = tempFilePath;
|
||||
proxy.$StaticValue.setUserInfo(userInfo.value);
|
||||
common_vendor.index.showToast({
|
||||
title: "头像更新成功",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("log", "at pages/my/my.vue:184", "选择头像失败", err);
|
||||
if (err.errMsg !== "chooseMedia:fail cancel") {
|
||||
common_vendor.index.showToast({
|
||||
title: "选择头像失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const navigateToHistory = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/history-game/history-game"
|
||||
});
|
||||
};
|
||||
const navigateToFavorites = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/my/favorites"
|
||||
});
|
||||
};
|
||||
const openSettings = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/my/setting"
|
||||
});
|
||||
};
|
||||
const openFeedback = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/my/feedback"
|
||||
});
|
||||
};
|
||||
const aboutUs = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "关于计分小程序",
|
||||
content: "计分小程序 v" + version.value + "\n\n一款便捷的计分工具,支持多种游戏模式。\n\n© 2023 计分小程序团队",
|
||||
showCancel: false,
|
||||
confirmText: "确定"
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
getUserInfo();
|
||||
const appInfo = common_vendor.wx$1.getAccountInfoSync();
|
||||
version.value = appInfo.miniProgram.version || "1.0.0";
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
fetchUserStats();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.t(userInfo.value.nickName),
|
||||
b: topHeight.value,
|
||||
c: topHeight.value,
|
||||
d: userInfo.value.avatarUrl ? userInfo.value.avatarUrl : "https://pic.rmb.bdstatic.com/bjh/down/1742bc3845cbbcf0c78c01eb59bb1c1a.jpeg",
|
||||
e: common_vendor.o(updateAvatar),
|
||||
f: common_vendor.t(userInfo.value.nickName),
|
||||
g: common_vendor.t(totalGames.value || 0),
|
||||
h: common_vendor.o(navigateToHistory),
|
||||
i: common_vendor.t(totalWins.value || 0),
|
||||
j: common_vendor.o(navigateToHistory),
|
||||
k: common_vendor.t(winRate.value || "0%"),
|
||||
l: common_vendor.o(navigateToHistory),
|
||||
m: common_assets._imports_0$1,
|
||||
n: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#999"
|
||||
}),
|
||||
o: common_vendor.o(navigateToFavorites),
|
||||
p: common_assets._imports_1$1,
|
||||
q: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#999"
|
||||
}),
|
||||
r: common_vendor.o(openSettings),
|
||||
s: common_assets._imports_2,
|
||||
t: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#999"
|
||||
}),
|
||||
v: common_vendor.o(openFeedback),
|
||||
w: common_assets._imports_3,
|
||||
x: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#999"
|
||||
}),
|
||||
y: common_vendor.o(aboutUs),
|
||||
z: common_vendor.t(version.value || "1.0.0")
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f1ef635"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/my.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/my/my.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "个人信息",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/my/my.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="my data-v-2f1ef635"><view class="user-info data-v-2f1ef635"><view class="background data-v-2f1ef635"></view><view class="info-content data-v-2f1ef635"><view class="top-user-name data-v-2f1ef635" style="{{'height:' + b + ';' + ('line-height:' + c)}}">{{a}}</view><view class="avatars data-v-2f1ef635"><image class="avatar-img data-v-2f1ef635" src="{{d}}" bindtap="{{e}}"></image></view><view class="hello-text data-v-2f1ef635"><view class="data-v-2f1ef635">你好,{{f}}</view><view class="data-v-2f1ef635">欢迎使用计分小程序</view></view></view></view><view class="data-section data-v-2f1ef635"><view class="data-item data-v-2f1ef635" bindtap="{{h}}"><text class="data-label data-v-2f1ef635">总对局数</text><text class="data-number data-v-2f1ef635">{{g}}</text></view><view class="data-divider data-v-2f1ef635"></view><view class="data-item data-v-2f1ef635" bindtap="{{j}}"><text class="data-label data-v-2f1ef635">胜利局数</text><text class="data-number data-v-2f1ef635">{{i}}</text></view><view class="data-divider data-v-2f1ef635"></view><view class="data-item data-v-2f1ef635" bindtap="{{l}}"><text class="data-label data-v-2f1ef635">胜率</text><text class="data-number data-v-2f1ef635">{{k}}</text></view></view><view class="menu-section data-v-2f1ef635"><view class="menu-group data-v-2f1ef635"><view class="menu-item data-v-2f1ef635" bindtap="{{o}}"><view class="menu-left data-v-2f1ef635"><image src="{{m}}" alt="收藏的对局" class="menu-icon data-v-2f1ef635" mode="aspectFit"></image><text class="menu-text data-v-2f1ef635">收藏的对局</text></view><uni-icons wx:if="{{n}}" class="data-v-2f1ef635" u-i="2f1ef635-0" bind:__l="__l" u-p="{{n}}"></uni-icons></view></view><view class="menu-group data-v-2f1ef635"><view class="menu-item data-v-2f1ef635" bindtap="{{r}}"><view class="menu-left data-v-2f1ef635"><image src="{{p}}" alt="设置" class="menu-icon data-v-2f1ef635" mode="aspectFit"></image><text class="menu-text data-v-2f1ef635">设置</text></view><uni-icons wx:if="{{q}}" class="data-v-2f1ef635" u-i="2f1ef635-1" bind:__l="__l" u-p="{{q}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" bindtap="{{v}}"><view class="menu-left data-v-2f1ef635"><image src="{{s}}" alt="帮助与反馈" class="menu-icon data-v-2f1ef635" mode="aspectFit"></image><text class="menu-text data-v-2f1ef635">帮助与反馈</text></view><uni-icons wx:if="{{t}}" class="data-v-2f1ef635" u-i="2f1ef635-2" bind:__l="__l" u-p="{{t}}"></uni-icons></view><view class="menu-item data-v-2f1ef635" bindtap="{{y}}"><view class="menu-left data-v-2f1ef635"><image src="{{w}}" alt="关于我们" class="menu-icon data-v-2f1ef635" mode="aspectFit"></image><text class="menu-text data-v-2f1ef635">关于我们</text></view><uni-icons wx:if="{{x}}" class="data-v-2f1ef635" u-i="2f1ef635-3" bind:__l="__l" u-p="{{x}}"></uni-icons></view></view></view><view class="version-info data-v-2f1ef635"><text class="data-v-2f1ef635">版本 {{z}}</text></view></view>
|
||||
188
scoring/unpackage/dist/dev/mp-weixin/pages/my/my.wxss
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
.my.data-v-2f1ef635 {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
/* 用户信息区域样式 */
|
||||
.user-info.data-v-2f1ef635 {
|
||||
--user-height: 500rpx;
|
||||
width: 750rpx;
|
||||
height: var(--user-height);
|
||||
position: relative;
|
||||
}
|
||||
.user-info .background.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: linear-gradient(#57ff57, #90fb90);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.user-info .info-content.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-top: calc(var(--top-margin) + 20rpx);
|
||||
}
|
||||
.user-info .info-content .top-user-name.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
ttext-align: center;
|
||||
}
|
||||
.user-info .info-content .avatars.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.user-info .info-content .avatars .avatar-img.data-v-2f1ef635 {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 75rpx;
|
||||
border: 4rpx solid #ffffff;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.user-info .info-content .avatars .avatar-img.data-v-2f1ef635:active {
|
||||
opacity: 0.8;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
.user-info .info-content .hello-text.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.user-info .info-content .hello-text p.data-v-2f1ef635 {
|
||||
margin: 5rpx 0;
|
||||
}
|
||||
/* 数据统计区域样式 */
|
||||
.data-section.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
background-color: #ffffff;
|
||||
margin-top: -30rpx;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 0 40rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.data-section .data-item.data-v-2f1ef635 {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.data-section .data-item .data-number.data-v-2f1ef635 {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.data-section .data-item .data-label.data-v-2f1ef635 {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
.data-section .data-item.data-v-2f1ef635:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.data-section .data-divider.data-v-2f1ef635 {
|
||||
width: 1rpx;
|
||||
height: 80rpx;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* 功能菜单区域样式 */
|
||||
.menu-section.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.menu-section .menu-group.data-v-2f1ef635 {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 30rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.menu-section .menu-group .menu-item.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 30rpx;
|
||||
height: 100rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
.menu-section .menu-group .menu-item.data-v-2f1ef635:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.menu-section .menu-group .menu-item .menu-left.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.menu-section .menu-group .menu-item .menu-left .menu-icon.data-v-2f1ef635 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.menu-section .menu-group .menu-item .menu-left .menu-text.data-v-2f1ef635 {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.menu-section .menu-group .menu-item .menu-right.data-v-2f1ef635 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.menu-section .menu-group .menu-item .menu-right .menu-badge.data-v-2f1ef635 {
|
||||
background-color: #FF3B30;
|
||||
color: #ffffff;
|
||||
font-size: 20rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
min-width: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.menu-section .menu-group .menu-item.data-v-2f1ef635:active {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
/* 退出登录按钮样式 */
|
||||
.logout-section.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.logout-section .logout-btn.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
font-size: 34rpx;
|
||||
background-color: #ffffff;
|
||||
color: #FF3B30;
|
||||
border: 1rpx solid #FF3B30;
|
||||
}
|
||||
/* 版本信息样式 */
|
||||
.version-info.data-v-2f1ef635 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-bottom: 60rpx;
|
||||
}
|
||||
.version-info text.data-v-2f1ef635 {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
/* 安全区域适配 */
|
||||
.my.data-v-2f1ef635 {
|
||||
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
160
scoring/unpackage/dist/dev/mp-weixin/pages/my/setting.js
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
const _component_uni_switch = common_vendor.resolveComponent("uni-switch");
|
||||
(_easycom_uni_icons2 + _component_uni_switch)();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "setting",
|
||||
setup(__props) {
|
||||
const notificationsEnabled = common_vendor.ref(true);
|
||||
const darkModeEnabled = common_vendor.ref(false);
|
||||
const cacheSize = common_vendor.ref("12.3MB");
|
||||
const appVersion = common_vendor.ref("1.0.0");
|
||||
common_vendor.onMounted(() => {
|
||||
checkCacheSize();
|
||||
});
|
||||
const toggleNotifications = (e) => {
|
||||
notificationsEnabled.value = e.detail.checked || !notificationsEnabled.value;
|
||||
common_vendor.index.showToast({
|
||||
title: notificationsEnabled.value ? "通知已开启" : "通知已关闭",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const toggleDarkMode = (e) => {
|
||||
darkModeEnabled.value = e.detail.checked || !darkModeEnabled.value;
|
||||
common_vendor.index.showToast({
|
||||
title: darkModeEnabled.value ? "深色模式已开启" : "深色模式已关闭",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const checkCacheSize = () => {
|
||||
};
|
||||
const clearCache = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "清除缓存",
|
||||
content: "确定要清除所有缓存数据吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
setTimeout(() => {
|
||||
cacheSize.value = "0KB";
|
||||
common_vendor.index.showToast({
|
||||
title: "缓存清除成功",
|
||||
icon: "success"
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const navigateToProfile = () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "跳转到个人资料页面",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const navigateToSecurity = () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "跳转到账户安全页面",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const navigateToAbout = () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "跳转到关于页面",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const navigateToPrivacy = () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "跳转到隐私政策页面",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const navigateToTerms = () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "跳转到用户协议页面",
|
||||
icon: "none"
|
||||
});
|
||||
};
|
||||
const logout = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "退出登录",
|
||||
content: "确定要退出登录吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
setTimeout(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "已退出登录",
|
||||
icon: "success"
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
b: common_vendor.o(navigateToProfile),
|
||||
c: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
d: common_vendor.o(navigateToSecurity),
|
||||
e: common_vendor.o(toggleNotifications),
|
||||
f: common_vendor.p({
|
||||
checked: notificationsEnabled.value,
|
||||
activeColor: "#007aff"
|
||||
}),
|
||||
g: common_vendor.o(toggleNotifications),
|
||||
h: common_vendor.o(toggleDarkMode),
|
||||
i: common_vendor.p({
|
||||
checked: darkModeEnabled.value,
|
||||
activeColor: "#007aff"
|
||||
}),
|
||||
j: common_vendor.o(toggleDarkMode),
|
||||
k: common_vendor.t(cacheSize.value),
|
||||
l: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
m: common_vendor.o(clearCache),
|
||||
n: common_vendor.t(appVersion.value),
|
||||
o: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
p: common_vendor.o(navigateToAbout),
|
||||
q: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
r: common_vendor.o(navigateToPrivacy),
|
||||
s: common_vendor.p({
|
||||
type: "right",
|
||||
size: "24",
|
||||
color: "#ccc"
|
||||
}),
|
||||
t: common_vendor.o(navigateToTerms),
|
||||
v: common_vendor.o(logout)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5fad43a3"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/setting.js.map
|
||||
7
scoring/unpackage/dist/dev/mp-weixin/pages/my/setting.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "设置",
|
||||
"navigationBarHidden": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
scoring/unpackage/dist/dev/mp-weixin/pages/my/setting.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="setting-page data-v-5fad43a3"><view class="setting-content data-v-5fad43a3"><view class="setting-section data-v-5fad43a3"><view class="section-title data-v-5fad43a3">账户设置</view><view class="setting-list data-v-5fad43a3"><view class="setting-item data-v-5fad43a3" bindtap="{{b}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">个人资料</text></view><view class="item-right data-v-5fad43a3"><text class="item-value data-v-5fad43a3">查看</text><uni-icons wx:if="{{a}}" class="data-v-5fad43a3" u-i="5fad43a3-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view></view><view class="setting-item data-v-5fad43a3" bindtap="{{d}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">账户安全</text></view><view class="item-right data-v-5fad43a3"><text class="item-value data-v-5fad43a3">设置</text><uni-icons wx:if="{{c}}" class="data-v-5fad43a3" u-i="5fad43a3-1" bind:__l="__l" u-p="{{c}}"></uni-icons></view></view></view></view><view class="setting-section data-v-5fad43a3"><view class="section-title data-v-5fad43a3">应用设置</view><view class="setting-list data-v-5fad43a3"><view class="setting-item data-v-5fad43a3" bindtap="{{g}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">消息通知</text></view><view class="item-right data-v-5fad43a3"><uni-switch wx:if="{{f}}" class="data-v-5fad43a3" bindchange="{{e}}" u-i="5fad43a3-2" bind:__l="__l" u-p="{{f}}"></uni-switch></view></view><view class="setting-item data-v-5fad43a3" bindtap="{{j}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">深色模式</text></view><view class="item-right data-v-5fad43a3"><uni-switch wx:if="{{i}}" class="data-v-5fad43a3" bindchange="{{h}}" u-i="5fad43a3-3" bind:__l="__l" u-p="{{i}}"></uni-switch></view></view><view class="setting-item data-v-5fad43a3" bindtap="{{m}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">清除缓存</text></view><view class="item-right data-v-5fad43a3"><text class="item-value data-v-5fad43a3">{{k}}</text><uni-icons wx:if="{{l}}" class="data-v-5fad43a3" u-i="5fad43a3-4" bind:__l="__l" u-p="{{l}}"></uni-icons></view></view></view></view><view class="setting-section data-v-5fad43a3"><view class="section-title data-v-5fad43a3">关于</view><view class="setting-list data-v-5fad43a3"><view class="setting-item data-v-5fad43a3" bindtap="{{p}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">关于我们</text></view><view class="item-right data-v-5fad43a3"><text class="item-value data-v-5fad43a3">{{n}}</text><uni-icons wx:if="{{o}}" class="data-v-5fad43a3" u-i="5fad43a3-5" bind:__l="__l" u-p="{{o}}"></uni-icons></view></view><view class="setting-item data-v-5fad43a3" bindtap="{{r}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">隐私政策</text></view><view class="item-right data-v-5fad43a3"><uni-icons wx:if="{{q}}" class="data-v-5fad43a3" u-i="5fad43a3-6" bind:__l="__l" u-p="{{q}}"></uni-icons></view></view><view class="setting-item data-v-5fad43a3" bindtap="{{t}}"><view class="item-left data-v-5fad43a3"><text class="item-title data-v-5fad43a3">用户协议</text></view><view class="item-right data-v-5fad43a3"><uni-icons wx:if="{{s}}" class="data-v-5fad43a3" u-i="5fad43a3-7" bind:__l="__l" u-p="{{s}}"></uni-icons></view></view></view></view><view class="logout-section data-v-5fad43a3"><button class="logout-btn data-v-5fad43a3" bindtap="{{v}}">退出登录</button></view></view></view>
|
||||
135
scoring/unpackage/dist/dev/mp-weixin/pages/my/setting.wxss
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
|
||||
.setting-page.data-v-5fad43a3 {
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
/* 页面标题 */
|
||||
.page-title.data-v-5fad43a3 {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.setting-content.data-v-5fad43a3 {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
/* 设置分组 */
|
||||
.setting-section.data-v-5fad43a3 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
/* 分组标题 */
|
||||
.section-title.data-v-5fad43a3 {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx 10rpx;
|
||||
}
|
||||
|
||||
/* 设置列表 */
|
||||
.setting-list.data-v-5fad43a3 {
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
margin: 0 30rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 设置项 */
|
||||
.setting-item.data-v-5fad43a3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
.setting-item.data-v-5fad43a3:active {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.setting-item.data-v-5fad43a3:not(:last-child)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
height: 1rpx;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* 左侧内容 */
|
||||
.item-left.data-v-5fad43a3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 图标容器 */
|
||||
.item-icon.data-v-5fad43a3 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #f0f8ff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
/* 标题文本 */
|
||||
.item-title.data-v-5fad43a3 {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 右侧内容 */
|
||||
.item-right.data-v-5fad43a3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 值文本 */
|
||||
.item-value.data-v-5fad43a3 {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
/* 退出登录区域 */
|
||||
.logout-section.data-v-5fad43a3 {
|
||||
padding: 40rpx 30rpx 0;
|
||||
}
|
||||
|
||||
/* 退出登录按钮 */
|
||||
.logout-btn.data-v-5fad43a3 {
|
||||
background-color: #fff;
|
||||
color: #ff3b30;
|
||||
border-radius: 80rpx;
|
||||
font-size: 32rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.logout-btn.data-v-5fad43a3:active {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* 微信小程序特定样式优化 */
|
||||
.setting-item.data-v-5fad43a3 {
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.item-icon.data-v-5fad43a3 {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.setting-list.data-v-5fad43a3 {
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
25
scoring/unpackage/dist/dev/mp-weixin/project.config.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"setting": {
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"uglifyFileName": false,
|
||||
"enhance": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"useCompilerPlugins": false,
|
||||
"minifyWXML": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"appid": "wxf6e5e042f0e38c19",
|
||||
"editorSetting": {}
|
||||
}
|
||||
14
scoring/unpackage/dist/dev/mp-weixin/project.private.config.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"libVersion": "3.11.1",
|
||||
"projectname": "scoring",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"coverView": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
"preloadBackgroundData": false,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"compileHotReLoad": true
|
||||
}
|
||||
}
|
||||
BIN
scoring/unpackage/dist/dev/mp-weixin/static/about.png
vendored
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/add.png
vendored
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/advise.png
vendored
Normal file
|
After Width: | Height: | Size: 498 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/bug.png
vendored
Normal file
|
After Width: | Height: | Size: 699 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/delete.png
vendored
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/emile.png
vendored
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/favorites.png
vendored
Normal file
|
After Width: | Height: | Size: 852 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/feedback.png
vendored
Normal file
|
After Width: | Height: | Size: 731 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/history.png
vendored
Normal file
|
After Width: | Height: | Size: 750 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/logo.png
vendored
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/optimize.png
vendored
Normal file
|
After Width: | Height: | Size: 766 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/other.png
vendored
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/people.png
vendored
Normal file
|
After Width: | Height: | Size: 645 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/robot.png
vendored
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/setting.png
vendored
Normal file
|
After Width: | Height: | Size: 886 B |
BIN
scoring/unpackage/dist/dev/mp-weixin/static/transfer.png
vendored
Normal file
|
After Width: | Height: | Size: 766 B |
73
scoring/unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
const uni_modules_uniIcons_components_uniIcons_uniicons_file_vue = require("./uniicons_file_vue.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const getVal = (val) => {
|
||||
const reg = /^[0-9]*$/g;
|
||||
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||||
};
|
||||
const _sfc_main = {
|
||||
name: "UniIcons",
|
||||
emits: ["click"],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "#333333"
|
||||
},
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 16
|
||||
},
|
||||
customPrefix: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
fontFamily: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icons: uni_modules_uniIcons_components_uniIcons_uniicons_file_vue.fontData
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
unicode() {
|
||||
let code = this.icons.find((v) => v.font_class === this.type);
|
||||
if (code) {
|
||||
return code.unicode;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
iconSize() {
|
||||
return getVal(this.size);
|
||||
},
|
||||
styleObj() {
|
||||
if (this.fontFamily !== "") {
|
||||
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
|
||||
}
|
||||
return `color: ${this.color}; font-size: ${this.iconSize};`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_onClick(e) {
|
||||
this.$emit("click", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.styleObj),
|
||||
b: common_vendor.n("uniui-" + $props.type),
|
||||
c: common_vendor.n($props.customPrefix),
|
||||
d: common_vendor.n($props.customPrefix ? $props.type : ""),
|
||||
e: common_vendor.o((...args) => $options._onClick && $options._onClick(...args))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<text style="{{a}}" class="{{['uni-icons', b, c, d]}}" bindtap="{{e}}"><slot></slot></text>
|
||||
532
scoring/unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
vendored
Normal file
649
scoring/unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
vendored
Normal file
@@ -0,0 +1,649 @@
|
||||
"use strict";
|
||||
const fontData = [
|
||||
{
|
||||
"font_class": "arrow-down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-left",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-right",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "auth",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "auth-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "back",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "bars",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "calendar",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "calendar-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "camera",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "camera-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cart",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cart-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chat",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chat-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkmarkempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "circle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "circle-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "clear",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "close",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "closeempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "color",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "color-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "compose",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "contact",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "contact-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "bottom",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "download",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "download-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "email",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "email-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "fire",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "fire-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "flag",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "flag-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "font",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "forward",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gear",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gear-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gift",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gift-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "headphones",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "heart",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "heart-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "help",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "help-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "home",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "home-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "image",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "image-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "images",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "images-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "info",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "info-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "left",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "link",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "list",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "location",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "location-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "locked",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "locked-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "loop",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin-ellipse",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "medal",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "medal-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mic",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mic-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "micoff",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "micoff-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "minus",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "minus-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "more",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "more-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "navigate",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "navigate-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "notification",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "notification-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperclip",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "person",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "person-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled-copy",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "phone",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "phone-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plus",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plus-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plusempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "pulldown",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "pyq",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "qq",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "redo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "redo-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refresh",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refresh-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refreshempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "reload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "right",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "scan",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "search",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "settings",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "settings-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "shop",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "shop-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "sound",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "sound-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "spinner-cycle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "staff",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "staff-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "star",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "star-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "starhalf",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "trash",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "trash-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "tune",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "tune-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "undo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "undo-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "top",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "upload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "upload-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "videocam",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "videocam-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "vip",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "vip-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "wallet",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "wallet-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "weibo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "weixin",
|
||||
"unicode": ""
|
||||
}
|
||||
];
|
||||
exports.fontData = fontData;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js.map
|
||||
4
scoring/unpackage/dist/dev/mp-weixin/utils/CommonValues.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const BASE_URL = "http://172.20.10.2:8080";
|
||||
exports.BASE_URL = BASE_URL;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/CommonValues.js.map
|
||||
31
scoring/unpackage/dist/dev/mp-weixin/utils/StaticValue.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const userInfoKey = "SCORE_SAFE_LOGIN";
|
||||
const getUserInfo = () => {
|
||||
var userInfo = common_vendor.index.getStorageSync(userInfoKey);
|
||||
if (userInfo != "") {
|
||||
userInfo = JSON.parse(userInfo);
|
||||
return userInfo;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const setUserInfo = (userInfo) => {
|
||||
common_vendor.index.setStorageSync(userInfoKey, JSON.stringify(userInfo));
|
||||
};
|
||||
const getTopHeight = () => {
|
||||
const systemInfo = common_vendor.index.getSystemInfoSync();
|
||||
const menuButtonInfo = common_vendor.index.getMenuButtonBoundingClientRect();
|
||||
const statusBarHeight = systemInfo.statusBarHeight;
|
||||
const menuButtonHeight = menuButtonInfo.height;
|
||||
const calculatedTopHeight = statusBarHeight + menuButtonHeight + 20;
|
||||
return `${calculatedTopHeight * (750 / systemInfo.windowWidth)}rpx`;
|
||||
};
|
||||
const StaticValue = {
|
||||
getTopHeight,
|
||||
userInfoKey,
|
||||
getUserInfo,
|
||||
setUserInfo
|
||||
};
|
||||
exports.StaticValue = StaticValue;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/StaticValue.js.map
|
||||
72
scoring/unpackage/dist/dev/mp-weixin/utils/request.js
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const utils_CommonValues = require("./CommonValues.js");
|
||||
const api_login = require("../api/login.js");
|
||||
function GET_TOKEN(url, data, token) {
|
||||
return SIMPLE_TOKEN(url, data, token, "GET");
|
||||
}
|
||||
function POST(url, data) {
|
||||
return SIMPLE(url, data, "POST");
|
||||
}
|
||||
let requestTime = 0;
|
||||
async function SIMPLE(url, data, method) {
|
||||
if (requestTime == 0) {
|
||||
token = await api_login.loginSystem();
|
||||
if (token.data) {
|
||||
SIMPLE(url, data, method);
|
||||
return;
|
||||
}
|
||||
requestTime += 1;
|
||||
} else {
|
||||
var token = common_vendor.index.getStorageSync("APP_TOKEN");
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
url: `${utils_CommonValues.BASE_URL}${url}`,
|
||||
method,
|
||||
header: {
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
"Authorization": token
|
||||
},
|
||||
dataType: "json",
|
||||
data,
|
||||
success: (res) => {
|
||||
if (res.data.code == "200" || res.data.statusCode == "200") {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function SIMPLE_TOKEN(url, data, token, method) {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
url: `${utils_CommonValues.BASE_URL}${url}`,
|
||||
method,
|
||||
header: {
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
"Authorization": token
|
||||
},
|
||||
dataType: "json",
|
||||
data,
|
||||
success: (res) => {
|
||||
if (res.data.code == "200" || res.data.statusCode == "200") {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.GET_TOKEN = GET_TOKEN;
|
||||
exports.POST = POST;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/request.js.map
|
||||
38
scoring/unpackage/dist/dev/mp-weixin/utils/wxutils.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const utils_request = require("./request.js");
|
||||
const api_login = require("../api/login.js");
|
||||
function getOpenId() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
var token = await api_login.loginSystem();
|
||||
common_vendor.wx$1.login({
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
utils_request.GET_TOKEN(`/wx/openid/${res.code}`, null, token).then((response) => {
|
||||
response.data.openid;
|
||||
resolve({
|
||||
status: 200,
|
||||
openid: response.data.openid,
|
||||
message: "获取openid成功"
|
||||
});
|
||||
}).catch((error) => {
|
||||
common_vendor.index.__f__("log", "at utils/wxutils.js:20", error);
|
||||
reject({
|
||||
status: 400,
|
||||
openid: null,
|
||||
message: "获取openid失败"
|
||||
});
|
||||
});
|
||||
} else {
|
||||
reject({
|
||||
status: 400,
|
||||
openid: null,
|
||||
message: "获取微信信息失败"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.getOpenId = getOpenId;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/wxutils.js.map
|
||||