解决微信小程序首页空白问题。
This commit is contained in:
@@ -1,106 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
props: {
|
||||
modelValue: String,
|
||||
value: String,
|
||||
scene: {
|
||||
type: String,
|
||||
default() {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
val: {
|
||||
get() {
|
||||
return this.value || this.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
focusCaptchaInput: false,
|
||||
captchaBase64: "",
|
||||
loging: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
scene: {
|
||||
handler(scene) {
|
||||
if (scene) {
|
||||
this.getImageCaptcha(this.focus);
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "scene不能为空",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getImageCaptcha(focus = true) {
|
||||
this.loging = true;
|
||||
if (focus) {
|
||||
this.val = "";
|
||||
this.focusCaptchaInput = true;
|
||||
}
|
||||
const uniIdCo = common_vendor.tr.importObject("uni-captcha-co", {
|
||||
customUI: true
|
||||
});
|
||||
uniIdCo.getImageCaptcha({
|
||||
scene: this.scene
|
||||
}).then((result) => {
|
||||
this.captchaBase64 = result.captchaBase64;
|
||||
}).catch((e) => {
|
||||
common_vendor.index.showToast({
|
||||
title: e.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).finally((e) => {
|
||||
this.loging = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.loging
|
||||
}, $data.loging ? {
|
||||
b: common_vendor.p({
|
||||
size: "20px",
|
||||
color: "#BBB",
|
||||
type: "spinner-cycle"
|
||||
})
|
||||
} : {}, {
|
||||
c: $data.loging ? 1 : "",
|
||||
d: common_vendor.o((...args) => $options.getImageCaptcha && $options.getImageCaptcha(...args)),
|
||||
e: $data.captchaBase64,
|
||||
f: common_vendor.o(($event) => $data.focusCaptchaInput = false),
|
||||
g: $data.focusCaptchaInput,
|
||||
h: $options.val,
|
||||
i: common_vendor.o(($event) => $options.val = $event.detail.value)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a00179ae"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.js.map
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<view class="captcha-box data-v-a00179ae"><view class="captcha-img-box data-v-a00179ae"><uni-icons wx:if="{{a}}" class="loding data-v-a00179ae" u-i="a00179ae-0" bind:__l="__l" u-p="{{b}}"></uni-icons><image class="{{['captcha-img', 'data-v-a00179ae', c && 'opacity']}}" bindtap="{{d}}" src="{{e}}" mode="widthFix"></image></view><input bindblur="{{f}}" focus="{{g}}" type="text" class="captcha data-v-a00179ae" inputBorder="{{false}}" maxlength="4" placeholder="请输入验证码" value="{{h}}" bindinput="{{i}}"></input></view>
|
||||
@@ -1,77 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.captcha-box.data-v-a00179ae {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex: 1;
|
||||
}
|
||||
.captcha-img-box.data-v-a00179ae,
|
||||
.captcha.data-v-a00179ae {
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
}
|
||||
.captcha-img-box.data-v-a00179ae {
|
||||
position: relative;
|
||||
background-color: #FEFAE7;
|
||||
}
|
||||
.captcha.data-v-a00179ae {
|
||||
background-color: #F8F8F8;
|
||||
font-size: 14px;
|
||||
flex: 1;
|
||||
padding: 0 20rpx;
|
||||
margin-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.captcha-img-box.data-v-a00179ae,
|
||||
.captcha-img.data-v-a00179ae,
|
||||
.loding.data-v-a00179ae {
|
||||
height: 44px !important;
|
||||
width: 100px;
|
||||
}
|
||||
.captcha-img.data-v-a00179ae {
|
||||
cursor: pointer;
|
||||
}
|
||||
.loding.data-v-a00179ae {
|
||||
z-index: 9;
|
||||
color: #bbb;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 45px;
|
||||
animation: rotate-a00179ae 1s linear infinite;
|
||||
}
|
||||
.opacity.data-v-a00179ae {
|
||||
opacity: 0.5;
|
||||
}
|
||||
@keyframes rotate-a00179ae {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
focus: false
|
||||
};
|
||||
},
|
||||
props: {
|
||||
modelValue: String,
|
||||
value: String,
|
||||
scene: {
|
||||
type: String,
|
||||
default() {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
val: {
|
||||
get() {
|
||||
return this.value || this.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.focus = true;
|
||||
this.val = "";
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
close() {
|
||||
this.focus = false;
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
confirm() {
|
||||
if (!this.val) {
|
||||
return common_vendor.index.showToast({
|
||||
title: "请填写验证码",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
this.close();
|
||||
this.$emit("confirm");
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_captcha2 = common_vendor.resolveComponent("uni-captcha");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_uni_captcha2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_uni_captcha = () => "../uni-captcha/uni-captcha.js";
|
||||
const _easycom_uni_popup = () => "../../../uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_captcha + _easycom_uni_popup)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.t($props.title),
|
||||
b: common_vendor.o(($event) => $options.val = $event),
|
||||
c: common_vendor.p({
|
||||
focus: $data.focus,
|
||||
scene: $props.scene,
|
||||
modelValue: $options.val
|
||||
}),
|
||||
d: common_vendor.o((...args) => $options.close && $options.close(...args)),
|
||||
e: common_vendor.o((...args) => $options.confirm && $options.confirm(...args)),
|
||||
f: common_vendor.sr("popup", "d021b99b-0"),
|
||||
g: common_vendor.p({
|
||||
type: "center"
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d021b99b"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-captcha/components/uni-popup-captcha/uni-popup-captcha.js.map
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-captcha": "../uni-captcha/uni-captcha",
|
||||
"uni-popup": "../../../uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<uni-popup wx:if="{{g}}" class="r data-v-d021b99b" u-s="{{['d']}}" u-r="popup" u-i="d021b99b-0" bind:__l="__l" u-p="{{g}}"><view class="popup-captcha data-v-d021b99b"><view class="content data-v-d021b99b"><text class="title data-v-d021b99b">{{a}}</text><uni-captcha wx:if="{{c}}" class="data-v-d021b99b" u-i="d021b99b-1,d021b99b-0" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"></uni-captcha></view><view class="button-box data-v-d021b99b"><view bindtap="{{d}}" class="btn data-v-d021b99b">取消</view><view bindtap="{{e}}" class="btn confirm data-v-d021b99b">确认</view></view></view></uni-popup>
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
view.data-v-d021b99b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.popup-captcha.data-v-d021b99b {
|
||||
display: flex;
|
||||
max-width: 600px;
|
||||
width: 600rpx;
|
||||
padding-bottom: 0;
|
||||
background-color: #FFF;
|
||||
border-radius: 10px;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
.popup-captcha .content.data-v-d021b99b {
|
||||
padding: 1.3em 0.8em;
|
||||
}
|
||||
.popup-captcha .title.data-v-d021b99b {
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #111;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.button-box.data-v-d021b99b {
|
||||
height: 44px;
|
||||
border-top: solid 1px #eee;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.button-box.data-v-d021b99b, .btn.data-v-d021b99b {
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
}
|
||||
.button-box .btn.data-v-d021b99b {
|
||||
flex: 1;
|
||||
margin: 1px;
|
||||
text-align: center;
|
||||
}
|
||||
.button-box .confirm.data-v-d021b99b {
|
||||
color: #007aff;
|
||||
border-left: solid 1px #eee;
|
||||
}
|
||||
Reference in New Issue
Block a user