调整微信小程序的报错。

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,132 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uniIdPages_config = require("../../config.js");
let retryFun = () => common_vendor.index.__f__("log", "at uni_modules/uni-id-pages/components/uni-id-pages-agreements/uni-id-pages-agreements.vue:34", "为定义");
const _sfc_main = {
name: "uni-agreements",
computed: {
agreements() {
if (!uni_modules_uniIdPages_config.config.agreements) {
return [];
}
let { serviceUrl, privacyUrl } = uni_modules_uniIdPages_config.config.agreements;
return [
{
url: serviceUrl,
title: "用户服务协议"
},
{
url: privacyUrl,
title: "隐私政策条款"
}
];
}
},
props: {
scope: {
type: String,
default() {
return "register";
}
}
},
methods: {
popupConfirm() {
this.isAgree = true;
retryFun();
},
popup(Fun) {
this.needPopupAgreements = true;
this.$nextTick(() => {
if (Fun) {
retryFun = Fun;
}
this.$refs.popupAgreement.open();
});
},
navigateTo({
url,
title
}) {
common_vendor.index.navigateTo({
url: "/uni_modules/uni-id-pages/pages/common/webview/webview?url=" + url + "&title=" + title,
success: (res) => {
},
fail: () => {
},
complete: () => {
}
});
},
hasAnd(agreements, index) {
return agreements.length - 1 > index;
},
setAgree(e) {
this.isAgree = !this.isAgree;
this.$emit("setAgree", this.isAgree);
}
},
created() {
var _a, _b;
this.needAgreements = (((_b = (_a = uni_modules_uniIdPages_config.config) == null ? void 0 : _a.agreements) == null ? void 0 : _b.scope) || []).includes(this.scope);
},
data() {
return {
isAgree: false,
needAgreements: true,
needPopupAgreements: false
};
}
};
if (!Array) {
const _easycom_uni_popup_dialog2 = common_vendor.resolveComponent("uni-popup-dialog");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uni_popup_dialog2 + _easycom_uni_popup2)();
}
const _easycom_uni_popup_dialog = () => "../../../uni-popup/components/uni-popup-dialog/uni-popup-dialog.js";
const _easycom_uni_popup = () => "../../../uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uni_popup_dialog + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $options.agreements.length
}, $options.agreements.length ? common_vendor.e({
b: $data.needAgreements
}, $data.needAgreements ? {
c: $data.isAgree,
d: common_vendor.o((...args) => $options.setAgree && $options.setAgree(...args)),
e: common_vendor.f($options.agreements, (agreement, index, i0) => {
return common_vendor.e({
a: common_vendor.t(agreement.title),
b: common_vendor.o(($event) => $options.navigateTo(agreement), index),
c: $options.hasAnd($options.agreements, index)
}, $options.hasAnd($options.agreements, index) ? {} : {}, {
d: index
});
})
} : {}, {
f: $data.needAgreements || $data.needPopupAgreements
}, $data.needAgreements || $data.needPopupAgreements ? {
g: common_vendor.f($options.agreements, (agreement, index, i0) => {
return common_vendor.e({
a: common_vendor.t(agreement.title),
b: common_vendor.o(($event) => $options.navigateTo(agreement), index),
c: $options.hasAnd($options.agreements, index)
}, $options.hasAnd($options.agreements, index) ? {} : {}, {
d: index
});
}),
h: common_vendor.o($options.popupConfirm),
i: common_vendor.p({
confirmText: "同意"
}),
j: common_vendor.sr("popupAgreement", "40b82fe9-0"),
k: common_vendor.p({
type: "center"
})
} : {}) : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-40b82fe9"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-id-pages/components/uni-id-pages-agreements/uni-id-pages-agreements.js.map

View File

@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"uni-popup-dialog": "../../../uni-popup/components/uni-popup-dialog/uni-popup-dialog",
"uni-popup": "../../../uni-popup/components/uni-popup/uni-popup"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="root data-v-40b82fe9"><block wx:if="{{b}}"><checkbox-group class="data-v-40b82fe9" bindchange="{{d}}"><label class="checkbox-box data-v-40b82fe9"><checkbox class="data-v-40b82fe9" checked="{{c}}" style="transform:scale(0.5);margin-right:-6px"/><text class="text data-v-40b82fe9">同意</text></label></checkbox-group><view class="content data-v-40b82fe9"><view wx:for="{{e}}" wx:for-item="agreement" wx:key="d" class="item data-v-40b82fe9"><text class="agreement text data-v-40b82fe9" bindtap="{{agreement.b}}">{{agreement.a}}</text><text wx:if="{{agreement.c}}" class="text and data-v-40b82fe9" space="nbsp"> 和 </text></view></view></block><uni-popup wx:if="{{f}}" class="r data-v-40b82fe9" u-s="{{['d']}}" u-r="popupAgreement" u-i="40b82fe9-0" bind:__l="__l" u-p="{{k}}"><uni-popup-dialog wx:if="{{i}}" class="data-v-40b82fe9" u-s="{{['d']}}" bindconfirm="{{h}}" u-i="40b82fe9-1,40b82fe9-0" bind:__l="__l" u-p="{{i}}"><view class="content data-v-40b82fe9"><text class="text data-v-40b82fe9">请先阅读并同意</text><view wx:for="{{g}}" wx:for-item="agreement" wx:key="d" class="item data-v-40b82fe9"><text class="agreement text data-v-40b82fe9" bindtap="{{agreement.b}}">{{agreement.a}}</text><text wx:if="{{agreement.c}}" class="text and data-v-40b82fe9" space="nbsp"> 和 </text></view></view></uni-popup-dialog></uni-popup></view>

View File

@@ -0,0 +1,66 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
view.data-v-40b82fe9 {
display: flex;
box-sizing: border-box;
flex-direction: column;
}
.root.data-v-40b82fe9 {
flex-direction: row;
align-items: center;
font-size: 12px;
color: #8a8f8b;
}
.checkbox-box.data-v-40b82fe9, .uni-label-pointer.data-v-40b82fe9 {
align-items: center;
display: flex;
flex-direction: row;
}
.item.data-v-40b82fe9 {
flex-direction: row;
}
.text.data-v-40b82fe9 {
line-height: 26px;
}
.agreement.data-v-40b82fe9 {
color: #04498c;
cursor: pointer;
}
.checkbox-box.data-v-40b82fe9 .uni-checkbox-input {
border-radius: 100%;
}
.checkbox-box.data-v-40b82fe9 .uni-checkbox-input.uni-checkbox-input-checked {
border-color: #007aff;
color: #FFFFFF !important;
background-color: #007aff;
}
.content.data-v-40b82fe9 {
flex-wrap: wrap;
flex-direction: row;
}
.root.data-v-40b82fe9 .uni-popup__error {
color: #333333;
}