调整微信小程序的报错。

This commit is contained in:
cst61
2026-02-01 09:49:48 +08:00
parent cc01c4dc47
commit 802ffbb2f3
454 changed files with 62476 additions and 45 deletions

View File

@@ -0,0 +1,27 @@
"use strict";
const noData$1 = "No Data";
const noNetwork$1 = "Network error";
const toSet$1 = "Go to settings";
const error$1 = "error";
const en = {
noData: noData$1,
noNetwork: noNetwork$1,
toSet: toSet$1,
error: error$1
};
const noData = "暂无数据";
const noNetwork = "网络异常";
const toSet = "前往设置";
const error = "错误";
const zhHans = {
noData,
noNetwork,
toSet,
error
};
const messages = {
en,
"zh-Hans": zhHans
};
exports.messages = messages;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/components/uni-load-state/i18n/index.js.map

View File

@@ -0,0 +1,119 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_uniLoadState_i18n_index = require("./i18n/index.js");
const common_assets = require("../../common/assets.js");
const {
t
} = common_vendor.initVueI18n(components_uniLoadState_i18n_index.messages);
const _sfc_main = {
name: "uni-load-state",
computed: {
noData() {
return t("noData");
},
noNetwork() {
return t("noNetwork");
},
toSet() {
return t("toSet");
},
error() {
return t("error");
}
},
data() {
return {
"networkType": ""
};
},
props: {
state: {
type: Object,
default() {
return {
"loading": true,
"hasMore": false,
"pagination": {
"pages": 0
},
"data": [],
"error": {}
};
}
}
},
mounted() {
common_vendor.index.onNetworkStatusChange(({
networkType
}) => {
if (this.networkType == "none" && networkType != "none") {
this.$emit("networkResume");
}
this.networkType = networkType;
});
common_vendor.index.getNetworkType({
success: ({
networkType
}) => {
this.networkType = networkType;
}
});
},
methods: {
appear() {
if (!this.state.loading && this.state.hasMore) {
this.$emit("loadMore");
}
},
openSettings() {
if (common_vendor.index.getSystemInfoSync().platform == "ios") {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
var setting2 = NSURL2.URLWithString("App-prefs:root=General");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
} else {
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent(Settings.ACTION_SETTINGS);
mainActivity.startActivity(intent);
}
}
}
};
if (!Array) {
const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
_easycom_uni_load_more2();
}
const _easycom_uni_load_more = () => "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
if (!Math) {
_easycom_uni_load_more();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $props.state.error
}, $props.state.error ? common_vendor.e({
b: $data.networkType == "none"
}, $data.networkType == "none" ? {
c: common_assets._imports_0$3,
d: common_vendor.t($options.noNetwork),
e: common_vendor.t($options.toSet),
f: common_vendor.o((...args) => $options.openSettings && $options.openSettings(...args))
} : {
g: common_vendor.t($options.error),
h: common_vendor.t(JSON.stringify($props.state.error))
}) : {
i: common_vendor.p({
status: $props.state.loading ? "loading" : $props.state.hasMore ? "hasMore" : "noMore"
})
}, {
j: common_vendor.o((...args) => $options.appear && $options.appear(...args))
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-740c4771"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/uni-load-state/uni-load-state.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-load-more": "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more"
}
}

View File

@@ -0,0 +1 @@
<view class="data-v-740c4771" bindappear="{{j}}"><view wx:if="{{a}}" class="data-v-740c4771"><view wx:if="{{b}}" class="box data-v-740c4771"><image class="icon-image data-v-740c4771" src="{{c}}" mode="widthFix"></image><text class="tip-text data-v-740c4771">{{d}}</text><view class="btn btn-default data-v-740c4771" bindtap="{{f}}"><text class="btn-text data-v-740c4771">{{e}}</text></view></view><text wx:else class="error data-v-740c4771">{{g}}{{h}}</text></view><block wx:else><uni-load-more wx:if="{{i}}" class="uni-load-more data-v-740c4771" u-i="740c4771-0" bind:__l="__l" u-p="{{i}}"></uni-load-more></block></view>

View File

@@ -0,0 +1,49 @@
.box.data-v-740c4771 {
flex: 1;
width: 700rpx;
flex-direction: column;
align-items: center;
justify-content: center;
}
.uni-load-more.data-v-740c4771{
align-items: center;
justify-content: center;
}
.state-text.data-v-740c4771 {
text-align: center;
font-size: 26rpx;
width: 690rpx;
padding: 10rpx;
color: #999999;
}
.icon-image.data-v-740c4771 {
width: 300rpx;
}
.tip-text.data-v-740c4771 {
color: #999999;
font-size: 32rpx;
margin-bottom: 30rpx;
}
.btn.data-v-740c4771 {
padding: 5px 10px;
width: 128px;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
}
.btn-text.data-v-740c4771 {
color: #999999;
font-size: 15px;
}
.btn-default.data-v-740c4771 {
border-color: #999999;
border-style: solid;
border-width: 1px;
border-radius: 3px;
}
.error.data-v-740c4771 {
width: 690rpx;
color: #DD524D;
}