优化
This commit is contained in:
@@ -1 +1 @@
|
||||
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\n\r\nexport default {\r\n data() {\r\n return {\r\n info: {},\r\n userSig: \"\",\r\n chatInfo: {},\r\n };\r\n },\r\n onLoad(option) {\r\n this.AutomaticCleaning();\r\n uni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n this.info = res.data;\r\n counter.$patch({ myitem: this.info });\r\n },\r\n fail: () => {},\r\n });\r\n },\r\n methods: {\r\n //自动清理缓存\r\n AutomaticCleaning() {\r\n const lastCleanTime = uni.getStorageSync(\"last_clean_time\") || 0;\r\n const now = Date.now();\r\n if (now - lastCleanTime < 7 * 24 * 3600 * 1000) return; // 7 days\r\n uni.clearStorage();\r\n uni.setStorageSync(\"last_clean_time\", now);\r\n },\r\n },\r\n provide() {\r\n return {\r\n $global: {\r\n lastPage: null,\r\n },\r\n };\r\n },\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,\r\nhtml,\r\nbody,\r\npage {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>\r\n","import App from './App'\r\nimport { createSSRApp } from 'vue';\r\nimport * as Pinia from 'pinia';\r\n\r\nexport function createApp() {\r\n\tconst app = createSSRApp(App);\r\n\tapp.use(Pinia.createPinia());\r\n\treturn {\r\n\t\tapp,\r\n\t\tPinia, // 此处必须将 Pinia 返回\r\n\t};\r\n}"],"names":["uni","createSSRApp","App","Pinia.createPinia","Pinia"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,OAAO,QAAQ;AACb,SAAK,kBAAkB;AACvBA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,OAAO,IAAI;AAChB,gBAAQ,OAAO,EAAE,QAAQ,KAAK,KAAM,CAAA;AAAA,MACtC;AAAA,MACA,MAAM,MAAM;AAAA,MAAC;AAAA,IAAA,CACd;AAAA,EACH;AAAA,EACA,SAAS;AAAA;AAAA,IAEP,oBAAoB;AAClB,YAAM,gBAAgBA,cAAA,MAAI,eAAe,iBAAiB,KAAK;AACzD,YAAA,MAAM,KAAK;AACjB,UAAI,MAAM,gBAAgB,IAAI,KAAK,OAAO;AAAM;AAChDA,oBAAA,MAAI,aAAa;AACbA,oBAAAA,MAAA,eAAe,mBAAmB,GAAG;AAAA,IAC3C;AAAA,EACF;AAAA,EACA,UAAU;AACD,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AACF;AC7CO,SAAS,YAAY;AAC3B,QAAM,MAAMC,2BAAaC,SAAG;AAC5B,MAAI,IAAIC,cAAiB,YAAA,CAAE;AAC3B,SAAO;AAAA,IACN;AAAA,IACF,OAAEC,cAAK;AAAA;AAAA,EACP;AACA;AACA,YAAY,IAAI,MAAM,MAAM;;"}
|
||||
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\n\r\n\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\n\r\nexport default {\r\n data() {\r\n return {\r\n info: {},\r\n userSig: \"\",\r\n chatInfo: {},\r\n };\r\n },\r\n onLoad(option) {\r\n },\r\n methods: {\r\n },\r\n provide() {\r\n return {\r\n $global: {\r\n lastPage: null,\r\n },\r\n };\r\n },\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,\r\nhtml,\r\nbody,\r\npage {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>\r\n","import App from './App'\r\nimport { createSSRApp } from 'vue';\r\nimport * as Pinia from 'pinia';\r\n\r\nexport function createApp() {\r\n\tconst app = createSSRApp(App);\r\n\tapp.use(Pinia.createPinia());\r\n\treturn {\r\n\t\tapp,\r\n\t\tPinia, // 此处必须将 Pinia 返回\r\n\t};\r\n}"],"names":["createSSRApp","App","Pinia.createPinia","Pinia"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,OAAO,QAAQ;AAAA,EACf;AAAA,EACA,SAAS,CACT;AAAA,EACA,UAAU;AACD,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AACF;ACzBO,SAAS,YAAY;AAC3B,QAAM,MAAMA,2BAAaC,SAAG;AAC5B,MAAI,IAAIC,cAAiB,YAAA,CAAE;AAC3B,SAAO;AAAA,IACN;AAAA,IACF,OAAEC,cAAK;AAAA;AAAA,EACP;AACA;AACA,YAAY,IAAI,MAAM,MAAM;;"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
22
unpackage/dist/dev/mp-weixin/app.js
vendored
22
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -38,28 +38,8 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.AutomaticCleaning();
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.info = res.data;
|
||||
counter.$patch({ myitem: this.info });
|
||||
},
|
||||
fail: () => {
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//自动清理缓存
|
||||
AutomaticCleaning() {
|
||||
const lastCleanTime = common_vendor.index.getStorageSync("last_clean_time") || 0;
|
||||
const now = Date.now();
|
||||
if (now - lastCleanTime < 7 * 24 * 3600 * 1e3)
|
||||
return;
|
||||
common_vendor.index.clearStorage();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
provide() {
|
||||
return {
|
||||
$global: {
|
||||
|
||||
@@ -8012,7 +8012,7 @@ function isConsoleWritable() {
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.1.112,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_-W7J16";
|
||||
const id = "mp-weixin_zlyBIi";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
11
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
11
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
@@ -76,6 +76,7 @@ const _sfc_main = {
|
||||
this.pkList({ type: 1 });
|
||||
},
|
||||
onLoad() {
|
||||
this.AutomaticCleaning();
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
@@ -98,6 +99,16 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//自动清理
|
||||
AutomaticCleaning() {
|
||||
const lastCleanTime = common_vendor.index.getStorageSync("last_clean_time") || 0;
|
||||
const now = Date.now();
|
||||
if (now - lastCleanTime < 7 * 24 * 3600 * 1e3)
|
||||
return;
|
||||
common_vendor.index.clearStorage();
|
||||
common_vendor.A.logout();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
},
|
||||
//关闭弹窗(取消)
|
||||
closePopup() {
|
||||
this.$refs.popup.close();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,8 @@ const _sfc_main = {
|
||||
title: "Hello",
|
||||
item: {},
|
||||
coinNumlist: [],
|
||||
triggered: false
|
||||
triggered: false,
|
||||
iconNumber: 123457
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -19,6 +20,26 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//金币数量格式化
|
||||
formatCoinNum(coin) {
|
||||
if (coin === null || coin === void 0) {
|
||||
return "";
|
||||
}
|
||||
if (coin < 1e3) {
|
||||
return String(coin);
|
||||
}
|
||||
if (coin >= 1e6) {
|
||||
return "1M+";
|
||||
}
|
||||
const kValue = coin / 1e3;
|
||||
const formattedString = kValue.toFixed(2);
|
||||
const matchResult = formattedString.match(/^\d+\.\d{0,2}/);
|
||||
if (matchResult === null) {
|
||||
return kValue.toFixed(2) + "k";
|
||||
}
|
||||
const formatted = matchResult[0];
|
||||
return `${formatted}k`;
|
||||
},
|
||||
// 下拉刷新
|
||||
onRefresherRefresh() {
|
||||
this.triggered = true;
|
||||
@@ -39,7 +60,7 @@ const _sfc_main = {
|
||||
this.coinNumlist = res.data;
|
||||
this.triggered = false;
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords.vue:141", "获取金币数量失败");
|
||||
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords.vue:180", "获取金币数量失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -64,31 +85,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, $data.item.winnerAnchorId == $data.item.anchorIdA ? {} : {}, {
|
||||
d: common_vendor.t($data.item.anchorIdA),
|
||||
e: common_vendor.t($options.formatDate($data.item.pkTime)),
|
||||
f: $data.item.userACoins !== null
|
||||
}, $data.item.userACoins !== null ? {
|
||||
g: common_vendor.t($data.item.userACoins)
|
||||
} : {}, {
|
||||
h: $data.item.anchorIconB,
|
||||
i: $data.item.winnerAnchorId == $data.item.anchorIdB
|
||||
f: common_vendor.t($options.formatCoinNum($data.iconNumber)),
|
||||
g: $data.item.anchorIconB,
|
||||
h: $data.item.winnerAnchorId == $data.item.anchorIdB
|
||||
}, $data.item.winnerAnchorId == $data.item.anchorIdB ? {} : {}, {
|
||||
j: common_vendor.t($data.item.anchorIdB),
|
||||
k: common_vendor.t($options.formatDate($data.item.pkTime)),
|
||||
l: $data.item.userBCoins !== null
|
||||
i: common_vendor.t($data.item.anchorIdB),
|
||||
j: common_vendor.t($options.formatDate($data.item.pkTime)),
|
||||
k: $data.item.userBCoins !== null
|
||||
}, $data.item.userBCoins !== null ? {
|
||||
m: common_vendor.t($data.item.userBCoins)
|
||||
l: common_vendor.t($options.formatCoinNum($data.item.userBCoins))
|
||||
} : {}, {
|
||||
n: common_vendor.f($data.coinNumlist, (items, index, i0) => {
|
||||
m: common_vendor.f($data.coinNumlist, (items, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(items.anchorCoinA),
|
||||
a: common_vendor.t($options.formatCoinNum(items.anchorCoinA)),
|
||||
b: items.anchorIdA == items.winnerAnchorId ? "#00fbff21" : "#ff000011",
|
||||
c: common_vendor.t(items.anchorCoinB),
|
||||
c: common_vendor.t($options.formatCoinNum(items.anchorCoinB)),
|
||||
d: items.anchorIdB == items.winnerAnchorId ? "#00fbff21" : "#ff000011",
|
||||
e: index,
|
||||
f: "414631de-0-" + i0
|
||||
};
|
||||
}),
|
||||
o: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
|
||||
p: $data.triggered
|
||||
n: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
|
||||
o: $data.triggered
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-414631de"]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="details-pkrecords data-v-414631de"><view class="bg data-v-414631de"><image class="bgImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-414631de" bindtap="{{a}}"><image class="ReturnImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-414631de">PK记录详情</view><view class="pkrecords data-v-414631de"><view class="card data-v-414631de"><view class="AnchorA data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorAImgcss data-v-414631de" src="{{b}}" mode="scaleToFill"/></view><image wx:if="{{c}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorAinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{d}}</view><view class="AnchorATime data-v-414631de">{{e}}</view><view wx:if="{{f}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{g}}K</view></view></view></view><view class="vstext data-v-414631de"><view class="Vtext data-v-414631de">V</view><view class="Stext data-v-414631de">S</view></view><view class="AnchorB data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorBImgcss data-v-414631de" src="{{h}}" mode="scaleToFill"/></view><image wx:if="{{i}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorBinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{j}}</view><view class="AnchorATime data-v-414631de">{{k}}</view><view wx:if="{{l}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{m}}K</view></view></view></view></view><view class="pkrecords-content data-v-414631de"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-414631de" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{o}}" refresher-triggered="{{p}}"><uni-card wx:for="{{n}}" wx:for-item="items" wx:key="e" class="data-v-414631de" u-s="{{['d']}}" u-i="{{items.f}}" bind:__l="__l"><view class="contentcard data-v-414631de"><view class="contentcard-titleA data-v-414631de" style="{{'background-color:' + items.b}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.a}}K</view></view><view class="contentcard-titleB data-v-414631de" style="{{'background-color:' + items.d}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.c}}K</view></view></view></uni-card></scroll-view></view></view></view>
|
||||
<view class="details-pkrecords data-v-414631de"><view class="bg data-v-414631de"><image class="bgImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Return data-v-414631de" bindtap="{{a}}"><image class="ReturnImg data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view><view class="title data-v-414631de">PK记录详情</view><view class="pkrecords data-v-414631de"><view class="card data-v-414631de"><view class="AnchorA data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorAImgcss data-v-414631de" src="{{b}}" mode="scaleToFill"/></view><image wx:if="{{c}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorAinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{d}}</view><view class="AnchorATime data-v-414631de">{{e}}</view><view class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{f}}</view></view></view></view><view class="vstext data-v-414631de"><view class="Vtext data-v-414631de">V</view><view class="Stext data-v-414631de">S</view></view><view class="AnchorB data-v-414631de"><view class="Anchor data-v-414631de"><view class="AnchorAImg data-v-414631de"><image class="AnchorBImgcss data-v-414631de" src="{{g}}" mode="scaleToFill"/></view><image wx:if="{{h}}" class="Crown data-v-414631de" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Crown.png" mode="scaleToFill"/></view><view class="AnchorBinfo data-v-414631de"><view class="AnchorAname data-v-414631de">{{i}}</view><view class="AnchorATime data-v-414631de">{{j}}</view><view wx:if="{{k}}" class="AnchorAICon data-v-414631de"><view class="AnchorAIContext data-v-414631de">实际打金币:</view><view class="AnchorAIConNum data-v-414631de">{{l}}</view></view></view></view></view><view class="pkrecords-content data-v-414631de"><scroll-view show-scrollbar="false" scroll-y="true" class="scroll data-v-414631de" refresher-enabled="true" refresher-threshold="40" bindrefresherrefresh="{{n}}" refresher-triggered="{{o}}"><uni-card wx:for="{{m}}" wx:for-item="items" wx:key="e" class="data-v-414631de" u-s="{{['d']}}" u-i="{{items.f}}" bind:__l="__l"><view class="contentcard data-v-414631de"><view class="contentcard-titleA data-v-414631de" style="{{'background-color:' + items.b}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.a}}</view></view><view class="contentcard-titleB data-v-414631de" style="{{'background-color:' + items.d}}"><view class="ciontext data-v-414631de">金币数量</view><view class="cion data-v-414631de">{{items.c}}</view></view></view></uni-card></scroll-view></view></view></view>
|
||||
@@ -58,7 +58,7 @@
|
||||
align-items: center;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.Anchor.data-v-414631de{
|
||||
.Anchor.data-v-414631de {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -162,21 +162,21 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.scroll.data-v-414631de{
|
||||
.scroll.data-v-414631de {
|
||||
width: 750rpx;
|
||||
height: 1100rpx;
|
||||
}
|
||||
.contentcard.data-v-414631de{
|
||||
.contentcard.data-v-414631de {
|
||||
width: 694.66rpx;
|
||||
height: 161.26rpx;
|
||||
border-radius: 15rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
margin-left:28.55rpx;
|
||||
margin-left: 28.55rpx;
|
||||
margin-top: 25rpx;
|
||||
border: #5ed8db solid 1rpx;
|
||||
}
|
||||
.contentcard-titleA.data-v-414631de{
|
||||
.contentcard-titleA.data-v-414631de {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
@@ -187,7 +187,7 @@
|
||||
border-top-left-radius: 15rpx;
|
||||
border-bottom-left-radius: 15rpx;
|
||||
}
|
||||
.contentcard-titleB.data-v-414631de{
|
||||
.contentcard-titleB.data-v-414631de {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
@@ -197,11 +197,11 @@
|
||||
border-top-right-radius: 15rpx;
|
||||
border-bottom-right-radius: 15rpx;
|
||||
}
|
||||
.ciontext.data-v-414631de{
|
||||
.ciontext.data-v-414631de {
|
||||
font-size: 28rpx;
|
||||
color: #a2a2a2;
|
||||
}
|
||||
.cion.data-v-414631de{
|
||||
.cion.data-v-414631de {
|
||||
font-size: 36rpx;
|
||||
color: #100e0f;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -78,6 +78,8 @@ const _sfc_main = {
|
||||
common_vendor.index.setStorageSync("chatInfo", this.info.data.chatInfo);
|
||||
common_vendor.index.setStorageSync("userSig", this.userSig);
|
||||
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||
const now = Date.now();
|
||||
common_vendor.index.setStorageSync("last_clean_time", now);
|
||||
counter.$patch({ myitem: this.info.data.info });
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
|
||||
Reference in New Issue
Block a user