9043 lines
338 KiB
JavaScript
9043 lines
338 KiB
JavaScript
if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
|
||
Promise.prototype.finally = function(callback) {
|
||
const promise = this.constructor;
|
||
return this.then(
|
||
(value) => promise.resolve(callback()).then(() => value),
|
||
(reason) => promise.resolve(callback()).then(() => {
|
||
throw reason;
|
||
})
|
||
);
|
||
};
|
||
}
|
||
;
|
||
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
|
||
const global = uni.requireGlobal();
|
||
ArrayBuffer = global.ArrayBuffer;
|
||
Int8Array = global.Int8Array;
|
||
Uint8Array = global.Uint8Array;
|
||
Uint8ClampedArray = global.Uint8ClampedArray;
|
||
Int16Array = global.Int16Array;
|
||
Uint16Array = global.Uint16Array;
|
||
Int32Array = global.Int32Array;
|
||
Uint32Array = global.Uint32Array;
|
||
Float32Array = global.Float32Array;
|
||
Float64Array = global.Float64Array;
|
||
BigInt64Array = global.BigInt64Array;
|
||
BigUint64Array = global.BigUint64Array;
|
||
}
|
||
;
|
||
if (uni.restoreGlobal) {
|
||
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
|
||
}
|
||
(function(vue) {
|
||
"use strict";
|
||
const ON_SHOW = "onShow";
|
||
const ON_LOAD = "onLoad";
|
||
const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
|
||
function formatAppLog(type, filename, ...args) {
|
||
if (uni.__log__) {
|
||
uni.__log__(type, filename, ...args);
|
||
} else {
|
||
console[type].apply(console, [...args, filename]);
|
||
}
|
||
}
|
||
function resolveEasycom(component, easycom) {
|
||
return typeof component === "string" ? easycom : component;
|
||
}
|
||
const createLifeCycleHook = (lifecycle, flag = 0) => (hook, target = vue.getCurrentInstance()) => {
|
||
!vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
|
||
};
|
||
const onShow = /* @__PURE__ */ createLifeCycleHook(
|
||
ON_SHOW,
|
||
1 | 2
|
||
/* HookFlags.PAGE */
|
||
);
|
||
const onLoad = /* @__PURE__ */ createLifeCycleHook(
|
||
ON_LOAD,
|
||
2
|
||
/* HookFlags.PAGE */
|
||
);
|
||
const onPullDownRefresh = /* @__PURE__ */ createLifeCycleHook(
|
||
ON_PULL_DOWN_REFRESH,
|
||
2
|
||
/* HookFlags.PAGE */
|
||
);
|
||
const base_url = "https://www.focusnu.com/opeapi";
|
||
const timeout$1 = 5e3;
|
||
const request = (params) => {
|
||
let url2 = params.url;
|
||
let method = params.method || "get";
|
||
let data = params.data || {};
|
||
let header = {
|
||
"X-Access-Token": uni.getStorageSync("token") || "",
|
||
"Content-Type": "application/json;charset=UTF-8",
|
||
"Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
|
||
...params.header
|
||
};
|
||
return new Promise((resolve, reject) => {
|
||
uni.request({
|
||
url: base_url + url2,
|
||
method,
|
||
header,
|
||
data,
|
||
timeout: timeout$1,
|
||
success(response) {
|
||
const res = response;
|
||
if (res.statusCode == 200) {
|
||
resolve(res.data);
|
||
} else {
|
||
uni.clearStorageSync();
|
||
switch (res.statusCode) {
|
||
case 401:
|
||
uni.showModal({
|
||
title: "登录过期",
|
||
content: "请登录",
|
||
showCancel: false,
|
||
success() {
|
||
setTimeout(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/callback"
|
||
});
|
||
}, 1e3);
|
||
}
|
||
});
|
||
break;
|
||
case 404:
|
||
uni.showToast({
|
||
title: "请求地址不存在...",
|
||
duration: 2e3
|
||
});
|
||
break;
|
||
default:
|
||
uni.showToast({
|
||
title: "请重试...",
|
||
duration: 2e3
|
||
});
|
||
break;
|
||
}
|
||
}
|
||
},
|
||
fail(err) {
|
||
if (err.errMsg.indexOf("request:fail") !== -1) {
|
||
uni.showToast({
|
||
title: "网络异常",
|
||
icon: "error",
|
||
duration: 2e3
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "未知异常",
|
||
duration: 2e3
|
||
});
|
||
}
|
||
reject(err);
|
||
}
|
||
});
|
||
}).catch(() => {
|
||
});
|
||
};
|
||
function getHkCode(data) {
|
||
return request({
|
||
url: `/sys/getHkCode`,
|
||
method: "post",
|
||
data
|
||
});
|
||
}
|
||
function smsCode(data) {
|
||
return request({
|
||
url: `/sys/smsCode`,
|
||
method: "post",
|
||
data
|
||
});
|
||
}
|
||
function checkPhoneCode(data) {
|
||
return request({
|
||
url: `/sys/checkPhoneCode`,
|
||
method: "post",
|
||
data
|
||
});
|
||
}
|
||
function getOpenid(code2) {
|
||
return request({
|
||
url: `/weixin/wechat/callback?code=${code2}`,
|
||
method: "get"
|
||
});
|
||
}
|
||
function getMessage(openId) {
|
||
return request({
|
||
url: `/admin/h5Api/nuBizAdvisoryInfo/queryWeixinInfo?openId=${openId}`,
|
||
method: "get"
|
||
});
|
||
}
|
||
const _export_sfc = (sfc, props) => {
|
||
const target = sfc.__vccOpts || sfc;
|
||
for (const [key, val] of props) {
|
||
target[key] = val;
|
||
}
|
||
return target;
|
||
};
|
||
const _sfc_main$A = {
|
||
__name: "callback",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const superLogin = () => {
|
||
uni.login({
|
||
provider: "weixin",
|
||
success(res) {
|
||
getOpenid(res.code).then((res2) => {
|
||
let openid = res2.data.openid;
|
||
uni.setStorageSync("openid", openid);
|
||
getMessage(openid).then((res3) => {
|
||
uni.setStorageSync("tel", res3.result.tel);
|
||
uni.setStorageSync("token", res3.result.token);
|
||
uni.setStorageSync("serverUrl", res3.result.serverUrl);
|
||
uni.setStorageSync("platId", res3.result.platId);
|
||
uni.setStorageSync("izJg", res3.result.izJg);
|
||
uni.setStorageSync("izJs", res3.result.izJs);
|
||
uni.setStorageSync("izYg", res3.result.izYg);
|
||
if (!res3.result.tel) {
|
||
uni.redirectTo({
|
||
url: `/pages/login/xuanchuan`
|
||
});
|
||
} else {
|
||
if (uni.getStorageSync("special")) {
|
||
uni.redirectTo({
|
||
url: `/pages/login/specialloginafther`
|
||
});
|
||
} else {
|
||
switch (res3.result.advisoryType) {
|
||
case `1`:
|
||
uni.redirectTo({
|
||
url: `/pages/login/threeselectone`
|
||
});
|
||
break;
|
||
case 2:
|
||
break;
|
||
case `3`:
|
||
uni.redirectTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
break;
|
||
default:
|
||
uni.redirectTo({
|
||
url: `/pages/login/threeselectone`
|
||
});
|
||
}
|
||
}
|
||
}
|
||
});
|
||
});
|
||
},
|
||
fail(err) {
|
||
formatAppLog("error", "at pages/login/callback.vue:76", "获取 code 失败:", err);
|
||
}
|
||
});
|
||
};
|
||
onLoad((options) => {
|
||
if (options.type) {
|
||
uni.setStorageSync("special", true);
|
||
} else {
|
||
uni.setStorageSync("special", false);
|
||
}
|
||
superLogin();
|
||
});
|
||
const __returned__ = { superLogin, get onLoad() {
|
||
return onLoad;
|
||
}, reactive: vue.reactive, ref: vue.ref, get getOpenid() {
|
||
return getOpenid;
|
||
}, get getMessage() {
|
||
return getMessage;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "login-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/loading.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
})
|
||
]);
|
||
}
|
||
const PagesLoginCallback = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-47aa4dce"], ["__file", "D:/hldy_xcx/pages/login/callback.vue"]]);
|
||
const _sfc_main$z = {
|
||
__name: "index",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const isTarget = vue.ref(false);
|
||
const isFadingOut = vue.ref(false);
|
||
const maskColor = vue.ref("rgba(0, 0, 0, 0.5)");
|
||
function closeModal() {
|
||
isFadingOut.value = false;
|
||
}
|
||
const getCode = () => {
|
||
uni.login({
|
||
provider: "weixin",
|
||
success(res) {
|
||
getOpenid(res.code).then((res2) => {
|
||
let openid = res2.data.openid;
|
||
uni.setStorageSync("openid", openid);
|
||
uni.navigateTo({
|
||
url: `/pages/login/phonebumber`
|
||
});
|
||
});
|
||
},
|
||
fail(err) {
|
||
formatAppLog("error", "at pages/login/index.vue:122", "获取 code 失败:", err);
|
||
}
|
||
});
|
||
};
|
||
const loginIt = () => {
|
||
if (!isTarget.value) {
|
||
isFadingOut.value = true;
|
||
} else {
|
||
getCode();
|
||
}
|
||
};
|
||
const jumpToPro = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/protocol"
|
||
});
|
||
};
|
||
const userInfo = vue.ref(null);
|
||
const isallow = vue.ref(false);
|
||
function getUserProfile() {
|
||
uni.getUserProfile({
|
||
desc: "用于完善会员资料",
|
||
// 必填,弹窗提示语
|
||
lang: "zh_CN",
|
||
success: (res) => {
|
||
userInfo.value = res.userInfo;
|
||
formatAppLog("log", "at pages/login/index.vue:151", "用户信息:", res.userInfo);
|
||
isallow.value = true;
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("warn", "at pages/login/index.vue:155", "用户拒绝了授权", err);
|
||
}
|
||
});
|
||
}
|
||
vue.onMounted(() => {
|
||
});
|
||
const __returned__ = { isTarget, isFadingOut, maskColor, closeModal, getCode, loginIt, jumpToPro, userInfo, isallow, getUserProfile, reactive: vue.reactive, ref: vue.ref, onMounted: vue.onMounted, get getOpenid() {
|
||
return getOpenid;
|
||
}, get getMessage() {
|
||
return getMessage;
|
||
}, get onLoad() {
|
||
return onLoad;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/icon.png"
|
||
}),
|
||
vue.createElementVNode("image", {
|
||
class: "photo-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/bgc.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "under-container" }, [
|
||
vue.createCommentVNode(' <button \r\n open-type="getUserProfile" \r\n class="button-blue" \r\n @getuserinfo="fetchProfile"\r\n >\r\n 一键登录\r\n </button> '),
|
||
vue.createElementVNode("button", {
|
||
class: "button-blue",
|
||
onClick: $setup.loginIt
|
||
}, " 一键登录 "),
|
||
vue.createElementVNode("view", { class: "under-container-title" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass($setup.isTarget ? "radio-circle-target" : "radio-circle"),
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $setup.isTarget = !$setup.isTarget)
|
||
},
|
||
null,
|
||
2
|
||
/* CLASS */
|
||
),
|
||
vue.createElementVNode("view", {
|
||
style: { "margin-left": "17rpx" },
|
||
class: "radio-circle-font",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.isTarget = !$setup.isTarget)
|
||
}, "同意护理单元"),
|
||
vue.createElementVNode("view", {
|
||
class: "radio-circle-blue",
|
||
onClick: $setup.jumpToPro
|
||
}, " 《使用条款》 "),
|
||
vue.createElementVNode("view", {
|
||
class: "radio-circle-font",
|
||
onClick: _cache[2] || (_cache[2] = ($event) => $setup.isTarget = !$setup.isTarget)
|
||
}, "并授权NU获取本机号码")
|
||
])
|
||
]),
|
||
vue.createCommentVNode(" 遮罩 "),
|
||
vue.createVNode(vue.Transition, { name: "fade" }, {
|
||
default: vue.withCtx(() => [
|
||
$setup.isFadingOut ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "overlay",
|
||
onClick: $setup.closeModal,
|
||
style: vue.normalizeStyle({ backgroundColor: $setup.maskColor })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}),
|
||
vue.createCommentVNode(" 底部弹窗 "),
|
||
vue.createVNode(vue.Transition, { name: "slide-up" }, {
|
||
default: vue.withCtx(() => [
|
||
$setup.isFadingOut ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "modal"
|
||
}, [
|
||
vue.createElementVNode("view", { class: "modal-title" }, "使用条款"),
|
||
vue.createElementVNode("view", { class: "model-p" }, [
|
||
vue.createElementVNode("text", null, " 为了更好地保障您的合法权益,请阅读并同意以下协议护理单元"),
|
||
vue.createElementVNode("text", {
|
||
style: { "color": "rgb(0,141,255)" },
|
||
onClick: $setup.jumpToPro
|
||
}, "《使用条款》"),
|
||
vue.createElementVNode("text", null, ",同意后将自动登录。")
|
||
]),
|
||
vue.createElementVNode("view", { class: "model-down" }, [
|
||
vue.createCommentVNode(' <view class="model-white" @click="closeModal">\r\n 不同意\r\n </view> '),
|
||
vue.createElementVNode("view", {
|
||
class: "model-blue",
|
||
onClick: _cache[3] || (_cache[3] = ($event) => {
|
||
$setup.closeModal();
|
||
$setup.isTarget = true;
|
||
})
|
||
}, " 同意 ")
|
||
])
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
})
|
||
]);
|
||
}
|
||
const PagesLoginIndex = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-d08ef7d4"], ["__file", "D:/hldy_xcx/pages/login/index.vue"]]);
|
||
const pieceSize = 50;
|
||
const tolerance = 20;
|
||
const _sfc_main$y = {
|
||
__name: "huakuai",
|
||
emits: ["success"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
__expose();
|
||
const emit = __emit;
|
||
const containerWidth = vue.ref(0);
|
||
const containerHeight = vue.ref(0);
|
||
const originX = vue.ref(0);
|
||
const originY = vue.ref(0);
|
||
const offsetX = vue.ref(0);
|
||
const dragging = vue.ref(false);
|
||
const startX = vue.ref(0);
|
||
const bgImage = vue.ref("");
|
||
const instance = vue.getCurrentInstance();
|
||
function getPuzzlePiecePath(size) {
|
||
const s = size;
|
||
return `
|
||
M${10} 0
|
||
h${s / 3 - 10}
|
||
a${10} ${10} 0 0 1 0 ${20}
|
||
h${s / 3}
|
||
a${10} ${10} 0 0 0 0 -${20}
|
||
h${s / 3 - 10}
|
||
v${s / 3 - 10}
|
||
a${10} ${10} 0 0 1 -${20} 0
|
||
v${s / 3}
|
||
a${10} ${10} 0 0 0 ${20} 0
|
||
v${s / 3 - 10}
|
||
h-${s / 3 - 10}
|
||
a${10} ${10} 0 0 1 0 -${20}
|
||
h-${s / 3}
|
||
a${10} ${10} 0 0 0 0 ${20}
|
||
h-${s / 3 - 10}
|
||
z
|
||
`;
|
||
}
|
||
const clipPath = `path('${getPuzzlePiecePath(pieceSize)}')`;
|
||
function init() {
|
||
vue.nextTick(() => {
|
||
if (!instance) {
|
||
formatAppLog("error", "at compontent/public/huakuai.vue:106", "无法获取组件实例");
|
||
return;
|
||
}
|
||
uni.createSelectorQuery().in(instance.proxy).select(".bg-image").boundingClientRect((data) => {
|
||
if (!data) {
|
||
formatAppLog("error", "at compontent/public/huakuai.vue:114", "无法获取图片尺寸");
|
||
return;
|
||
}
|
||
containerWidth.value = data.width;
|
||
containerHeight.value = data.height;
|
||
originX.value = Math.random() * (containerWidth.value - pieceSize) + pieceSize / 2;
|
||
originX.value = Math.max(pieceSize / 2, Math.min(originX.value, containerWidth.value - pieceSize / 2));
|
||
originY.value = containerHeight.value / 2;
|
||
offsetX.value = 0;
|
||
}).exec();
|
||
});
|
||
}
|
||
function onStart(e) {
|
||
dragging.value = true;
|
||
startX.value = e.touches[0].clientX;
|
||
}
|
||
function onMove(e) {
|
||
if (!dragging.value)
|
||
return;
|
||
const clientX = e.touches[0].clientX;
|
||
let dx = clientX - startX.value;
|
||
dx = Math.max(0, Math.min(dx, containerWidth.value - pieceSize));
|
||
offsetX.value = dx;
|
||
}
|
||
function onEnd() {
|
||
dragging.value = false;
|
||
if (Math.abs(offsetX.value - originX.value) < tolerance) {
|
||
uni.showToast({
|
||
title: "验证成功",
|
||
icon: "none",
|
||
duration: 2e3
|
||
});
|
||
emit("success");
|
||
} else {
|
||
offsetX.value全員 = 0;
|
||
uni.showToast({
|
||
title: "验证失败",
|
||
icon: "none",
|
||
duration: 2e3
|
||
});
|
||
}
|
||
}
|
||
vue.onMounted(() => {
|
||
const images = [
|
||
"https://www.focusnu.com/media/directive/login/0.png",
|
||
"https://www.focusnu.com/media/directive/login/1.png",
|
||
"https://www.focusnu.com/media/directive/login/2.png"
|
||
// 'https://www.focusnu.com/media/directive/login/3.png'
|
||
];
|
||
bgImage.value = images[Math.floor(Math.random() * images.length)];
|
||
});
|
||
const __returned__ = { emit, pieceSize, tolerance, containerWidth, containerHeight, originX, originY, offsetX, dragging, startX, bgImage, instance, getPuzzlePiecePath, clipPath, init, onStart, onMove, onEnd, ref: vue.ref, onMounted: vue.onMounted, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
class: "captcha-container",
|
||
id: "container"
|
||
}, [
|
||
vue.createElementVNode("view", { class: "font-title" }, "请通过滑块验证"),
|
||
vue.createElementVNode("view", {
|
||
class: "captcha-image",
|
||
style: { "position": "relative", "width": "100%", "height": "400rpx", "overflow": "hidden" }
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
src: $setup.bgImage,
|
||
class: "bg-image",
|
||
mode: "widthFix",
|
||
onLoad: $setup.init
|
||
}, null, 40, ["src"]),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "overlay",
|
||
style: vue.normalizeStyle({ width: $setup.containerWidth + "px", height: $setup.containerHeight + "px" })
|
||
},
|
||
[
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "hole",
|
||
style: vue.normalizeStyle({
|
||
top: $setup.originY + "px",
|
||
left: $setup.originX + "px",
|
||
width: $setup.pieceSize + "px",
|
||
height: $setup.pieceSize + "px",
|
||
clipPath: $setup.clipPath,
|
||
transform: "translate(-50%, -50%)",
|
||
backgroundColor: "rgba(0,0,0,0.6)"
|
||
})
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "piece",
|
||
style: vue.normalizeStyle({
|
||
top: $setup.originY + "px",
|
||
left: $setup.offsetX + "px",
|
||
width: $setup.pieceSize + "px",
|
||
height: $setup.pieceSize + "px",
|
||
backgroundImage: `url(${$setup.bgImage})`,
|
||
backgroundSize: $setup.containerWidth + "px " + $setup.containerHeight + "px",
|
||
backgroundPosition: `-${$setup.originX}px -${$setup.originY}px`,
|
||
clipPath: $setup.clipPath,
|
||
transform: "translate(-50%, -50%)"
|
||
})
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { class: "slider-bar" }, [
|
||
vue.createElementVNode("view", { class: "slider-bar-font" }, "向右滑动滑块填充拼图"),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "slider-button",
|
||
ref: "btn",
|
||
onTouchstart: $setup.onStart,
|
||
onTouchmove: $setup.onMove,
|
||
onTouchend: $setup.onEnd,
|
||
style: vue.normalizeStyle({ left: $setup.offsetX + "px", maxWidth: $setup.containerWidth - $setup.pieceSize + "px" })
|
||
},
|
||
[
|
||
vue.createElementVNode("image", {
|
||
src: "https://www.focusnu.com/media/directive/login/right.png",
|
||
style: { "width": "50rpx", "height": "50rpx" },
|
||
mode: "widthFix"
|
||
})
|
||
],
|
||
36
|
||
/* STYLE, NEED_HYDRATION */
|
||
)
|
||
])
|
||
]);
|
||
}
|
||
const huakuai = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-2ca77e4c"], ["__file", "D:/hldy_xcx/compontent/public/huakuai.vue"]]);
|
||
const _sfc_main$x = {
|
||
__name: "phonebumber",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const huakuaiOpen = vue.ref(false);
|
||
const jumpto = () => {
|
||
huakuaiOpen.value = true;
|
||
};
|
||
const codeIsOk = () => {
|
||
huakuaiOpen.value = false;
|
||
getHkCode({
|
||
mobile: phonenumber.value
|
||
}).then((res) => {
|
||
if (res.success) {
|
||
uni.navigateTo({
|
||
url: `/pages/login/code?mobile=${phonenumber.value}&hkcode=${res.message}`
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: res.message,
|
||
icon: "none",
|
||
// 不显示图标(提示信息)
|
||
duration: 2e3
|
||
// 显示时长(毫秒)
|
||
});
|
||
}
|
||
});
|
||
};
|
||
function is11DigitNumber(value) {
|
||
return /^\d{11}$/.test(value.toString());
|
||
}
|
||
const phonenumber = vue.ref("");
|
||
const canClick = vue.ref(false);
|
||
const isRight = (res) => {
|
||
if (is11DigitNumber(res.detail.value)) {
|
||
phonenumber.value = res.detail.value;
|
||
canClick.value = true;
|
||
} else {
|
||
canClick.value = false;
|
||
}
|
||
};
|
||
const goback = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const __returned__ = { huakuaiOpen, jumpto, codeIsOk, is11DigitNumber, phonenumber, canClick, isRight, goback, reactive: vue.reactive, ref: vue.ref, onMounted: vue.onMounted, huakuai, get getHkCode() {
|
||
return getHkCode;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createCommentVNode(' <image class="back-imge" src="https://www.focusnu.com/media/directive/login/back.png" @click="goback" /> '),
|
||
vue.createElementVNode("image", {
|
||
class: "title-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/icon.png"
|
||
}),
|
||
vue.createElementVNode("image", {
|
||
class: "photo-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/bgc.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "under-container" }, [
|
||
vue.createElementVNode("view", { class: "under-container-title" }, [
|
||
vue.createElementVNode("view", { class: "under-container-input" }, [
|
||
vue.createElementVNode("view", { class: "input-left" }, "+86"),
|
||
vue.createElementVNode(
|
||
"input",
|
||
{
|
||
type: "number",
|
||
style: { "width": "600rpx", "font-size": "33rpx" },
|
||
maxlength: "11",
|
||
placeholder: "请输入手机号",
|
||
onInput: $setup.isRight
|
||
},
|
||
null,
|
||
32
|
||
/* NEED_HYDRATION */
|
||
)
|
||
])
|
||
]),
|
||
$setup.canClick ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "button-blue",
|
||
onClick: $setup.jumpto
|
||
}, " 获取验证码 ")) : vue.createCommentVNode("v-if", true),
|
||
!$setup.canClick ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "button-gray"
|
||
}, " 获取验证码 ")) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
$setup.huakuaiOpen ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "bg-mask",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.huakuaiOpen = false)
|
||
}, [
|
||
vue.createVNode($setup["huakuai"], {
|
||
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
||
}, ["stop"])),
|
||
onSuccess: $setup.codeIsOk
|
||
})
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
]);
|
||
}
|
||
const PagesLoginPhonebumber = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-94511ff7"], ["__file", "D:/hldy_xcx/pages/login/phonebumber.vue"]]);
|
||
const _sfc_main$w = {
|
||
__name: "threeselectone",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const itemTarget = vue.ref(0);
|
||
const fontArray = [
|
||
"护理院日常护理涵盖生活照料、健康监测、康复护理及心理关怀,为长者提供贴心照护。",
|
||
"护理员日常为长者提供饮食起居照料、协助康复训练监测健康状况,陪伴交流并做好环境清洁。",
|
||
"护理员日常为长者提供饮食起居照料、协助康复训练监测健康状况,陪伴交流并做好环境清洁。"
|
||
];
|
||
const changePhoto = (index) => {
|
||
itemTarget.value = index;
|
||
};
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const ceshi = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/xuanchuan`
|
||
});
|
||
};
|
||
const jumpToindex = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
};
|
||
const gotowork = (number2) => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/workjoin?type=${number2}`
|
||
});
|
||
};
|
||
const gotoadd = () => {
|
||
uni.setStorageSync("specicalid", "");
|
||
uni.setStorageSync("baddata", "");
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const close = () => {
|
||
uni.exitMiniProgram({});
|
||
};
|
||
const phone = vue.ref("");
|
||
const op0 = vue.ref(false);
|
||
const op1 = vue.ref(false);
|
||
const op2 = vue.ref(false);
|
||
onLoad(() => {
|
||
phone.value = uni.getStorageSync("tel");
|
||
op0.value = uni.getStorageSync("izJs");
|
||
op1.value = uni.getStorageSync("izYg");
|
||
op2.value = uni.getStorageSync("izJg");
|
||
});
|
||
const __returned__ = { itemTarget, fontArray, changePhoto, goBack, ceshi, jumpToindex, gotowork, gotoadd, close, phone, op0, op1, op2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
|
||
return onLoad;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createCommentVNode(' <view class="title">\r\n <image class="title-imge" src="https://www.focusnu.com/media/directive/index/nu.png" @click="ceshi" />\r\n <view class="title-font">\r\n <view class="">您好,</view>\r\n <view class="">欢迎使用护理单元~</view>\r\n </view>\r\n </view> '),
|
||
vue.createElementVNode("image", {
|
||
class: "photo-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/indexgif.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
}),
|
||
vue.createCommentVNode(' <view class="title-back">\r\n <view class="left-father" @click="goBack">\r\n <image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />\r\n \r\n </view>\r\n </view> '),
|
||
vue.createCommentVNode(' <image class="photo-imge" src="https://www.focusnu.com/media/directive/index/bgc.png" /> '),
|
||
vue.createCommentVNode(' <image class="old-imge" src="https://www.focusnu.com/media/directive/index/old.png" /> '),
|
||
vue.createCommentVNode(' <view class="under-container">\r\n <three style="width: 90%;margin-left: 5%;" @updateCenterIndex="changePhoto" />\r\n <view class="font-father">\r\n <view class="font">\r\n {{fontArray[itemTarget]}}\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==0">\r\n <view class="button-blue" @click="jumpToindex">\r\n 绑定单元\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==2">\r\n <view class="button-blue" style="margin-right: 30rpx;" @click="gotowork(0)">\r\n 审核详情\r\n </view>\r\n <view class="button-blue" @click="">\r\n 申请入驻\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==1">\r\n <view class="button-blue" style="margin-right: 30rpx;" @click="gotowork(1)">\r\n 审核详情\r\n </view>\r\n <view class="button-blue" @click="gotoadd">\r\n 申请加盟\r\n </view>\r\n </view>\r\n </view> '),
|
||
vue.createCommentVNode(' <view class="card-title">\r\n 恭喜您已成功绑定手机 <text style="color: #01A9FF ;">{{phone}}</text>,现在您可以:\r\n </view> '),
|
||
vue.createElementVNode("view", {
|
||
class: "card",
|
||
style: { "margin-top": "550rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 长者入住 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 护理单元日常护理涵盖生活照料、健康监测、康复护理及心理关怀,为长者提供贴心照护服务。 "),
|
||
vue.createElementVNode("view", { class: "white-button" }, " 申请入住 ")
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/old.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card" }, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 员工入驻 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 护理员严格按标准流程,定时为失能长者开展床旁照护,用专业与温情守护长者生活与健康。 "),
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
vue.createCommentVNode(' <view class="white-button" style="margin-right: 30rpx;">\r\n 审核列表\r\n </view> '),
|
||
vue.createElementVNode("view", { class: "white-button" }, " 申请入驻 ")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/yuangong.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "card",
|
||
style: { "height": "340rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 机构加盟 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 加盟我们,共享银发经济红利!依托成熟运营体系,标准化服务流程降低人力成本及管理开支,背靠品牌资源,助力企业快速实现营收增长。 "),
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
$setup.op2 == `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "white-button",
|
||
onClick: $setup.jumpToindex
|
||
}, " 进入机构 ")) : vue.createCommentVNode("v-if", true),
|
||
$setup.op2 != `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "white-button",
|
||
onClick: $setup.gotoadd
|
||
}, " 申请加盟 ")) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/gongsi.png",
|
||
onClick: $setup.ceshi
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "blue-button",
|
||
onClick: $setup.close
|
||
}, " 关闭 ")
|
||
]);
|
||
}
|
||
const PagesLoginThreeselectone = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-83beea56"], ["__file", "D:/hldy_xcx/pages/login/threeselectone.vue"]]);
|
||
const _sfc_main$v = {
|
||
__name: "threeselectonespec",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const itemTarget = vue.ref(0);
|
||
const fontArray = [
|
||
"护理院日常护理涵盖生活照料、健康监测、康复护理及心理关怀,为长者提供贴心照护。",
|
||
"护理员日常为长者提供饮食起居照料、协助康复训练监测健康状况,陪伴交流并做好环境清洁。",
|
||
"护理员日常为长者提供饮食起居照料、协助康复训练监测健康状况,陪伴交流并做好环境清洁。"
|
||
];
|
||
const changePhoto = (index) => {
|
||
itemTarget.value = index;
|
||
};
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const ceshi = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/phonebumber`
|
||
});
|
||
};
|
||
const jumpToindex = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
};
|
||
const gotowork = (number2) => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/workjoin?type=${number2}`
|
||
});
|
||
};
|
||
const gotoadd = () => {
|
||
uni.setStorageSync("specicalid", "");
|
||
uni.setStorageSync("baddata", "");
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const close = () => {
|
||
uni.exitMiniProgram({});
|
||
};
|
||
const phone = vue.ref("");
|
||
const op0 = vue.ref(false);
|
||
const op1 = vue.ref(false);
|
||
const op2 = vue.ref(false);
|
||
onLoad(() => {
|
||
phone.value = uni.getStorageSync("tel");
|
||
op0.value = uni.getStorageSync("izJs");
|
||
op1.value = uni.getStorageSync("izYg");
|
||
op2.value = uni.getStorageSync("izJg");
|
||
});
|
||
const __returned__ = { itemTarget, fontArray, changePhoto, goBack, ceshi, jumpToindex, gotowork, gotoadd, close, phone, op0, op1, op2, reactive: vue.reactive, ref: vue.ref, get onLoad() {
|
||
return onLoad;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createCommentVNode(' <view class="title">\r\n <image class="title-imge" src="https://www.focusnu.com/media/directive/index/nu.png" @click="ceshi" />\r\n <view class="title-font">\r\n <view class="">您好,</view>\r\n <view class="">欢迎使用护理单元~</view>\r\n </view>\r\n </view> '),
|
||
vue.createElementVNode("image", {
|
||
class: "photo-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/indexgif.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
}),
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createCommentVNode(' <image class="photo-imge" src="https://www.focusnu.com/media/directive/index/bgc.png" /> '),
|
||
vue.createCommentVNode(' <image class="old-imge" src="https://www.focusnu.com/media/directive/index/old.png" /> '),
|
||
vue.createCommentVNode(' <view class="under-container">\r\n <three style="width: 90%;margin-left: 5%;" @updateCenterIndex="changePhoto" />\r\n <view class="font-father">\r\n <view class="font">\r\n {{fontArray[itemTarget]}}\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==0">\r\n <view class="button-blue" @click="jumpToindex">\r\n 绑定单元\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==2">\r\n <view class="button-blue" style="margin-right: 30rpx;" @click="gotowork(0)">\r\n 审核详情\r\n </view>\r\n <view class="button-blue" @click="">\r\n 申请入驻\r\n </view>\r\n </view>\r\n <view class="button-father" v-if="itemTarget==1">\r\n <view class="button-blue" style="margin-right: 30rpx;" @click="gotowork(1)">\r\n 审核详情\r\n </view>\r\n <view class="button-blue" @click="gotoadd">\r\n 申请加盟\r\n </view>\r\n </view>\r\n </view> '),
|
||
vue.createCommentVNode(' <view class="card-title">\r\n 恭喜您已成功绑定手机 <text style="color: #01A9FF ;">{{phone}}</text>,现在您可以:\r\n </view> '),
|
||
vue.createElementVNode("view", {
|
||
class: "card",
|
||
style: { "margin-top": "550rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 长者入住 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 护理单元日常护理涵盖生活照料、健康监测、康复护理及心理关怀,为长者提供贴心照护服务。 "),
|
||
vue.createElementVNode("view", { class: "white-button" }, " 申请入住 ")
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/old.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card" }, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 员工入驻 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 护理员严格按标准流程,定时为失能长者开展床旁照护,用专业与温情守护长者生活与健康。 "),
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
vue.createCommentVNode(' <view class="white-button" style="margin-right: 30rpx;">\r\n 审核列表\r\n </view> '),
|
||
vue.createElementVNode("view", { class: "white-button" }, " 申请入驻 ")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/yuangong.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "card",
|
||
style: { "height": "340rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "card-left" }, [
|
||
vue.createElementVNode("view", { class: "card-weight" }, " 机构加盟 "),
|
||
vue.createElementVNode("view", { class: "card-text" }, " 加盟我们,共享银发经济红利!依托成熟运营体系,标准化服务流程降低人力成本及管理开支,背靠品牌资源,助力企业快速实现营收增长。 "),
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
$setup.op2 == `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "white-button",
|
||
onClick: $setup.jumpToindex
|
||
}, " 进入机构 ")) : vue.createCommentVNode("v-if", true),
|
||
$setup.op2 != `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "white-button",
|
||
onClick: $setup.gotoadd
|
||
}, " 申请加盟 ")) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "card-right" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "right-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/gongsi.png",
|
||
onClick: $setup.ceshi
|
||
})
|
||
])
|
||
]),
|
||
vue.createCommentVNode(' <view class="blue-button" @click="close">\r\n 关闭\r\n </view> ')
|
||
]);
|
||
}
|
||
const PagesLoginThreeselectonespec = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-f4bd7fdd"], ["__file", "D:/hldy_xcx/pages/login/threeselectonespec.vue"]]);
|
||
function changemessage(data) {
|
||
return request({
|
||
url: `/api/orgApplyInfo/save`,
|
||
method: "post",
|
||
data
|
||
});
|
||
}
|
||
function getMessageList(id) {
|
||
return request({
|
||
url: `/api/orgApplyInfo/queryAuditInfo?openId=${id}&status=1,2,3`,
|
||
method: "get"
|
||
});
|
||
}
|
||
function getMessageListsuccess(id) {
|
||
return request({
|
||
url: `/api/orgApplyInfo/queryAuditInfo?status=0,2,4,5&openId=${id}`,
|
||
method: "get"
|
||
});
|
||
}
|
||
function getdate(id) {
|
||
return request({
|
||
url: `/api/common/queryAreaDict?id=${id}`,
|
||
method: "get"
|
||
});
|
||
}
|
||
function getrel(id) {
|
||
return request({
|
||
url: `/api/common/queryAreaNameById?id=${id}`,
|
||
method: "get"
|
||
});
|
||
}
|
||
const _sfc_main$u = {
|
||
__name: "workjoin",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const type = vue.ref(0);
|
||
const workArray = vue.ref([]);
|
||
const special = vue.ref(false);
|
||
const statusarray = ["loading", "success", "fail"];
|
||
onLoad((options) => {
|
||
uni.getStorage({
|
||
key: "openid",
|
||
success: function(res) {
|
||
getMessageList(res.data).then((res2) => {
|
||
workArray.value = res2.result;
|
||
});
|
||
}
|
||
});
|
||
});
|
||
onPullDownRefresh(() => {
|
||
uni.getStorage({
|
||
key: "openid",
|
||
success: function(res) {
|
||
getMessageList(res.data).then((res2) => {
|
||
workArray.value = res2.result;
|
||
});
|
||
}
|
||
});
|
||
uni.stopPullDownRefresh();
|
||
});
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const again = (item) => {
|
||
formatAppLog("log", "at pages/login/workjoin.vue:100", "????", item);
|
||
uni.setStorageSync("baddata", item);
|
||
uni.setStorageSync("specicalid", item.id);
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const jumpToAll = (element) => {
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/all?element=${JSON.stringify(element)}`
|
||
});
|
||
};
|
||
const __returned__ = { type, workArray, special, statusarray, goBack, again, jumpToAll, reactive: vue.reactive, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
|
||
return onLoad;
|
||
}, get onPullDownRefresh() {
|
||
return onPullDownRefresh;
|
||
}, get getMessageList() {
|
||
return getMessageList;
|
||
}, get getMessageListsuccess() {
|
||
return getMessageListsuccess;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "加盟审核")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "index-up" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "index-up-img",
|
||
src: "https://www.focusnu.com/media/directive/index/indexgif.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "bgc-card" }, [
|
||
vue.createElementVNode("view", { class: "under-scroll" }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.workArray, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", { key: index }, [
|
||
vue.createElementVNode("view", {
|
||
class: "white-small",
|
||
onClick: ($event) => $setup.jumpToAll(item)
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ style: { "font-size": "32rpx" } },
|
||
vue.toDisplayString(item.comName),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(' <image class="enter-img" src="https://www.focusnu.com/media/directive/index/right.png" /> '),
|
||
vue.createElementVNode("view", { class: "bottom-father" }, [
|
||
vue.createElementVNode("view", { style: { "margin-top": "45rpx" } }, [
|
||
vue.createElementVNode("view", { class: "" }, [
|
||
item.franchiseTime ? (vue.openBlock(), vue.createElementBlock("text", {
|
||
key: 0,
|
||
style: { "color": "#999" }
|
||
}, " 加盟日期:")) : vue.createCommentVNode("v-if", true),
|
||
item.franchiseTime ? (vue.openBlock(), vue.createElementBlock(
|
||
"text",
|
||
{ key: 1 },
|
||
vue.toDisplayString(item.franchiseTime),
|
||
1
|
||
/* TEXT */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
!item.franchiseTime ? (vue.openBlock(), vue.createElementBlock("text", {
|
||
key: 2,
|
||
style: { "color": "#999" }
|
||
}, " 申请日期:")) : vue.createCommentVNode("v-if", true),
|
||
!item.franchiseTime ? (vue.openBlock(), vue.createElementBlock(
|
||
"text",
|
||
{ key: 3 },
|
||
vue.toDisplayString(item.commitTime),
|
||
1
|
||
/* TEXT */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
vue.createElementVNode("view", { style: { "margin-top": "10rpx" } }, [
|
||
vue.createElementVNode("text", { style: { "color": "#999" } }, " 审核日期:"),
|
||
vue.createTextVNode(
|
||
vue.toDisplayString(item.auditTime),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "" }),
|
||
vue.createElementVNode("image", {
|
||
class: "bottom-img",
|
||
src: `https://www.focusnu.com/media/directive/index/${$setup.statusarray[Number(item.status) - 1]}.png`
|
||
}, null, 8, ["src"])
|
||
])
|
||
], 8, ["onClick"])
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]);
|
||
}
|
||
const PagesLoginWorkjoin = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-808c8183"], ["__file", "D:/hldy_xcx/pages/login/workjoin.vue"]]);
|
||
const _sfc_main$t = {
|
||
__name: "workjoinsuccess",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const type = vue.ref(0);
|
||
const workArray = vue.ref([]);
|
||
const special = vue.ref(false);
|
||
const statusarray = ["success", "loading", "success", "fail", "loading", "fail"];
|
||
const namearraay = ["审核通过", "审核中", "审核通过", "审核不通过", "审核中", "审核不通过"];
|
||
const getData = () => {
|
||
uni.getStorage({
|
||
key: "openid",
|
||
success: function(res) {
|
||
getMessageListsuccess(res.data).then((res2) => {
|
||
const counts = {};
|
||
res2.result.forEach((item) => {
|
||
counts[item.pkId] = (counts[item.pkId] || 0) + 1;
|
||
});
|
||
const seenFirst = {};
|
||
const seenCount = {};
|
||
workArray.value = res2.result.map((item) => {
|
||
const {
|
||
pkId
|
||
} = item;
|
||
if (counts[pkId] > 1) {
|
||
if (!seenFirst[pkId]) {
|
||
item.ischange = true;
|
||
seenFirst[pkId] = true;
|
||
} else {
|
||
item.ischange = false;
|
||
}
|
||
} else {
|
||
item.ischange = true;
|
||
}
|
||
seenCount[pkId] = (seenCount[pkId] || 0) + 1;
|
||
item.isend = seenCount[pkId] === counts[pkId];
|
||
return item;
|
||
});
|
||
}).catch((err) => {
|
||
formatAppLog("error", "at pages/login/workjoinsuccess.vue:131", err);
|
||
});
|
||
}
|
||
});
|
||
};
|
||
onLoad((options) => {
|
||
getData();
|
||
});
|
||
onPullDownRefresh(() => {
|
||
getData();
|
||
uni.stopPullDownRefresh();
|
||
});
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const again = (item) => {
|
||
let trans = item;
|
||
trans.id = null;
|
||
uni.setStorageSync("baddata", trans);
|
||
uni.setStorageSync("specicalid", trans.id);
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const jumpToAll = (element) => {
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/all?element=${JSON.stringify(element)}&special=1`
|
||
});
|
||
};
|
||
const __returned__ = { type, workArray, special, statusarray, namearraay, getData, goBack, again, jumpToAll, reactive: vue.reactive, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
|
||
return onLoad;
|
||
}, get onPullDownRefresh() {
|
||
return onPullDownRefresh;
|
||
}, get getMessageListsuccess() {
|
||
return getMessageListsuccess;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "机构信息")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "index-up" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "index-up-img",
|
||
src: "https://www.focusnu.com/media/directive/index/indexgif.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "bgc-card" }, [
|
||
vue.createCommentVNode(' <view class="title-card">\r\n <view class="big-weight">机构加盟</view>\r\n <view class="title-other">\r\n 加盟我们,共享银发经济红利!依托成熟运营体系,标准化服务流程降低人力成本及管理开支,背靠品牌资源,助力企业快速实现营收增长。\r\n </view>\r\n </view> '),
|
||
!$setup.workArray.length ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "none"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
style: { "width": "300rpx", "height": "300rpx" },
|
||
src: "https://www.focusnu.com/media/directive/index/none.png",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
}),
|
||
vue.createElementVNode("view", { class: "" }, "暂无机构信息")
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("view", { class: "under-scroll" }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.workArray, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", { key: index }, [
|
||
vue.createElementVNode("view", {
|
||
class: "white-small",
|
||
onClick: ($event) => $setup.jumpToAll(item)
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ style: { "font-size": "32rpx" } },
|
||
vue.toDisplayString(item.comName),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("view", { class: "bottom-father" }, [
|
||
vue.createElementVNode("view", { style: { "margin-top": "45rpx" } }, [
|
||
vue.createElementVNode("view", { class: "" }, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
{ style: { "color": "#999" } },
|
||
vue.toDisplayString(item.isend ? `申请` : `变更`) + "日期:",
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createTextVNode(
|
||
vue.toDisplayString(item.commitTime),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { style: { "margin-top": "10rpx" } }, [
|
||
vue.createElementVNode("text", { style: { "color": "#999" } }, " 审核日期:"),
|
||
vue.createTextVNode(
|
||
vue.toDisplayString(item.auditTime),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "" }),
|
||
vue.createElementVNode("image", {
|
||
class: "bottom-img",
|
||
src: `https://www.focusnu.com/media/directive/index/${$setup.statusarray[Number(item.status)]}.png`
|
||
}, null, 8, ["src"])
|
||
]),
|
||
vue.createCommentVNode(' <image class="enter-img" src="https://www.focusnu.com/media/directive/index/right.png" /> '),
|
||
vue.createCommentVNode(' <view class="bottom-father">\r\n <view style="font-weight: 600;margin-top: 5rpx;" :style="item.status==`5`?{color:`red`}:{}">\r\n {{ item.status ? namearraay[Number(item.status)] :"" }}\r\n </view>\r\n \r\n </view> '),
|
||
item.modifyStatus === `0` && item.ischange ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "blue-button",
|
||
onClick: vue.withModifiers(($event) => $setup.again(item), ["stop"])
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "blue-button-img",
|
||
src: "https://www.focusnu.com/media/directive/change.png",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
})
|
||
], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(' <view style="height: 30rpx;">\r\n \r\n </view> ')
|
||
], 8, ["onClick"])
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]);
|
||
}
|
||
const PagesLoginWorkjoinsuccess = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-c1509caf"], ["__file", "D:/hldy_xcx/pages/login/workjoinsuccess.vue"]]);
|
||
const _sfc_main$s = {
|
||
name: "u-message-input",
|
||
emits: ["update:modelValue", "input", "change", "finish"],
|
||
props: {
|
||
// 预置值
|
||
value: {
|
||
type: [String, Number],
|
||
default: ""
|
||
},
|
||
modelValue: {
|
||
type: [String, Number],
|
||
default: ""
|
||
},
|
||
// 最大输入长度
|
||
maxlength: {
|
||
type: [Number, String],
|
||
default: 4
|
||
},
|
||
// 是否用圆点填充
|
||
dotFill: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 显示模式,box-盒子模式,bottomLine-横线在底部模式,middleLine-横线在中部模式
|
||
mode: {
|
||
type: String,
|
||
default: "box"
|
||
},
|
||
// 当前激活输入item,是否带有呼吸效果
|
||
breathe: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 是否自动获取焦点
|
||
focus: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 字体是否加粗
|
||
bold: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 字体大小
|
||
fontSize: {
|
||
type: [String, Number],
|
||
default: 60
|
||
},
|
||
// 激活样式
|
||
activeColor: {
|
||
type: String,
|
||
default: "#2979ff"
|
||
},
|
||
// 未激活的样式
|
||
inactiveColor: {
|
||
type: String,
|
||
default: "#606266"
|
||
},
|
||
// 输入框的大小,单位rpx,宽等于高
|
||
width: {
|
||
type: [Number, String],
|
||
default: "80"
|
||
},
|
||
// 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
|
||
disabledKeyboard: {
|
||
type: Boolean,
|
||
default: false
|
||
}
|
||
},
|
||
watch: {
|
||
// maxlength: {
|
||
// // 此值设置为true,会在组件加载后无需maxlength变化就会执行一次本监听函数,无需再created生命周期中处理
|
||
// immediate: true,
|
||
// handler(val) {
|
||
// this.maxlength = Number(val);
|
||
// }
|
||
// },
|
||
valueCom: {
|
||
immediate: true,
|
||
handler(val) {
|
||
val = String(val);
|
||
this.valueModel = val.substring(0, Number(this.maxlength));
|
||
}
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
valueModel: ""
|
||
};
|
||
},
|
||
computed: {
|
||
valueCom() {
|
||
return this.modelValue;
|
||
},
|
||
// 是否显示呼吸灯效果
|
||
animationClass() {
|
||
return (index) => {
|
||
if (this.breathe && this.charArr.length == index)
|
||
return "u-breathe";
|
||
else
|
||
return "";
|
||
};
|
||
},
|
||
// 用于显示字符
|
||
charArr() {
|
||
return this.valueModel.split("");
|
||
},
|
||
charArrLength() {
|
||
return this.charArr.length;
|
||
},
|
||
// 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
|
||
loopCharArr() {
|
||
return new Array(Number(this.maxlength));
|
||
}
|
||
},
|
||
methods: {
|
||
getVal(e) {
|
||
let {
|
||
value
|
||
} = e.detail;
|
||
this.valueModel = value;
|
||
if (String(value).length > Number(this.maxlength))
|
||
return;
|
||
this.$emit("change", value);
|
||
this.$emit("input", value);
|
||
this.$emit("update:modelValue", value);
|
||
if (String(value).length == Number(this.maxlength)) {
|
||
this.$emit("finish", value);
|
||
}
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "u-char-box" }, [
|
||
vue.createElementVNode("view", { class: "u-char-flex" }, [
|
||
vue.createElementVNode("input", {
|
||
disabled: $props.disabledKeyboard,
|
||
value: $data.valueModel,
|
||
type: "number",
|
||
focus: $props.focus,
|
||
maxlength: $props.maxlength,
|
||
class: "u-input",
|
||
onInput: _cache[0] || (_cache[0] = (...args) => $options.getVal && $options.getVal(...args))
|
||
}, null, 40, ["disabled", "value", "focus", "maxlength"]),
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($options.loopCharArr, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", { key: index }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass([
|
||
$props.breathe && $options.charArrLength == index ? "u-breathe" : "",
|
||
"u-char-item",
|
||
$options.charArrLength === index && $props.mode == "box" ? "u-box-active" : "",
|
||
$props.mode === "box" ? "u-box" : ""
|
||
]),
|
||
style: vue.normalizeStyle({
|
||
fontWeight: $props.bold ? "bold" : "normal",
|
||
fontSize: $props.fontSize + "rpx",
|
||
width: $props.width + "rpx",
|
||
height: $props.width + "rpx",
|
||
color: $props.inactiveColor,
|
||
borderColor: $options.charArrLength === index && $props.mode == "box" ? $props.activeColor : $props.inactiveColor
|
||
})
|
||
},
|
||
[
|
||
$props.mode !== "middleLine" ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "u-placeholder-line",
|
||
style: vue.normalizeStyle({
|
||
display: $options.charArrLength === index ? "block" : "none",
|
||
height: $props.width * 0.5 + "rpx"
|
||
})
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
$props.mode === "middleLine" && $options.charArrLength <= index ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 1,
|
||
class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index ? "u-breathe" : "", $options.charArrLength === index ? "u-middle-line-active" : ""], "u-middle-line"]),
|
||
style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index ? $props.activeColor : $props.inactiveColor })
|
||
},
|
||
null,
|
||
6
|
||
/* CLASS, STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
$props.mode === "bottomLine" ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 2,
|
||
class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index ? "u-breathe" : "", $options.charArrLength === index ? "u-bottom-line-active" : ""], "u-bottom-line"]),
|
||
style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index ? $props.activeColor : $props.inactiveColor })
|
||
},
|
||
null,
|
||
6
|
||
/* CLASS, STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
!$props.dotFill ? (vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
{ key: 3 },
|
||
[
|
||
vue.createTextVNode(
|
||
vue.toDisplayString($options.charArr[index] ? $options.charArr[index] : ""),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
)) : (vue.openBlock(), vue.createElementBlock(
|
||
"text",
|
||
{
|
||
key: 4,
|
||
class: "u-dot"
|
||
},
|
||
vue.toDisplayString($options.charArr[index] ? "●" : ""),
|
||
1
|
||
/* TEXT */
|
||
))
|
||
],
|
||
6
|
||
/* CLASS, STYLE */
|
||
)
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
]);
|
||
}
|
||
const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-d917afbe"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-message-input/u-message-input.vue"]]);
|
||
const _sfc_main$r = {
|
||
__name: "code",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const mobile2 = vue.ref("");
|
||
const hkcode = vue.ref("");
|
||
const captcha = vue.ref(["", "", "", ""]);
|
||
const focusedIndex = vue.ref(-1);
|
||
const isFadingOut = vue.ref(false);
|
||
const maskColor = vue.ref("rgba(0, 0, 0, 0.5)");
|
||
function closeModal() {
|
||
isFadingOut.value = false;
|
||
}
|
||
function filterToSingleDigit(number2) {
|
||
if (typeof number2 === "number") {
|
||
return number2 % 10;
|
||
}
|
||
return number2;
|
||
}
|
||
function isLength4(str) {
|
||
return typeof str === "string" && str.length === 4;
|
||
}
|
||
const finshinput = (res) => {
|
||
if (isLength4(res)) {
|
||
submitCaptcha(res);
|
||
}
|
||
};
|
||
const handleInput = (index, event) => {
|
||
const val = event.detail.value || "";
|
||
captcha.value[index] = val;
|
||
if (val.length == 4) {
|
||
const codeStr = event.detail.value.toString().padStart(4, "0");
|
||
captcha.value = codeStr.split("");
|
||
focusedIndex.value = 3;
|
||
vue.nextTick(() => {
|
||
submitCaptcha();
|
||
});
|
||
} else if (val.length == 2) {
|
||
captcha.value[index] = filterToSingleDigit(captcha.value[index]);
|
||
if (captcha.value[index]) {
|
||
if (index < 3) {
|
||
focusedIndex.value = index + 1;
|
||
}
|
||
}
|
||
let isFour = true;
|
||
captcha.value.forEach((number2) => {
|
||
if (!number2) {
|
||
isFour = false;
|
||
}
|
||
});
|
||
vue.nextTick(() => {
|
||
if (isFour) {
|
||
submitCaptcha();
|
||
}
|
||
});
|
||
} else {
|
||
if (captcha.value[index]) {
|
||
if (index < 3) {
|
||
focusedIndex.value = index + 1;
|
||
}
|
||
}
|
||
let isFour = true;
|
||
captcha.value.forEach((number2) => {
|
||
if (!number2) {
|
||
isFour = false;
|
||
}
|
||
});
|
||
vue.nextTick(() => {
|
||
if (isFour) {
|
||
submitCaptcha();
|
||
}
|
||
});
|
||
}
|
||
};
|
||
const handleKeydown = (index, event) => {
|
||
if (event.key === "Backspace" && !captcha.value[index]) {
|
||
if (index > 0) {
|
||
focusedIndex.value = index - 1;
|
||
}
|
||
}
|
||
};
|
||
const rightCode = vue.ref("");
|
||
const submitCaptcha = (res0) => {
|
||
const code2 = res0;
|
||
if (code2.length === 4) {
|
||
let openid = uni.getStorageSync("openid");
|
||
if (rightCode.value != code2) {
|
||
rightCode.value = code2;
|
||
checkPhoneCode({
|
||
mobile: mobile2.value,
|
||
openId: openid,
|
||
smscode: code2
|
||
}).then((res) => {
|
||
if (res.success) {
|
||
getMessage(openid).then((res2) => {
|
||
uni.setStorageSync("tel", res2.result.tel);
|
||
uni.setStorageSync("token", res2.result.token);
|
||
uni.setStorageSync("serverUrl", res2.result.serverUrl);
|
||
uni.redirectTo({
|
||
url: `/pages/login/specialloginafther`
|
||
});
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: res.message,
|
||
icon: "none",
|
||
// 不显示图标(提示信息)
|
||
duration: 2e3
|
||
// 显示时长(毫秒)
|
||
});
|
||
}
|
||
});
|
||
}
|
||
} else {
|
||
formatAppLog("log", "at pages/login/code.vue:194", "验证码未输入完整");
|
||
}
|
||
};
|
||
const getcode = () => {
|
||
smsCode({
|
||
mobile: mobile2.value,
|
||
hkcode: hkcode.value,
|
||
smsmode: 1
|
||
}).then((res) => {
|
||
if (res.success) {
|
||
uni.showToast({
|
||
title: "发送成功",
|
||
icon: "none",
|
||
// 不显示图标(提示信息)
|
||
duration: 2e3
|
||
// 显示时长(毫秒)
|
||
});
|
||
focusedIndex.value = 0;
|
||
countdown.value = 60;
|
||
timerId = setInterval(() => {
|
||
if (countdown.value > 0) {
|
||
countdown.value--;
|
||
} else {
|
||
clearInterval(timerId);
|
||
timerId = null;
|
||
}
|
||
}, 1e3);
|
||
} else {
|
||
uni.showToast({
|
||
title: res.message,
|
||
icon: "none",
|
||
// 不显示图标(提示信息)
|
||
duration: 2e3
|
||
// 显示时长(毫秒)
|
||
});
|
||
}
|
||
});
|
||
};
|
||
const goback = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const countdown = vue.ref(0);
|
||
let timerId = null;
|
||
vue.onUnmounted(() => {
|
||
if (timerId) {
|
||
clearInterval(timerId);
|
||
}
|
||
});
|
||
onLoad((options) => {
|
||
mobile2.value = options.mobile;
|
||
hkcode.value = options.hkcode;
|
||
getcode();
|
||
});
|
||
const __returned__ = { mobile: mobile2, hkcode, captcha, focusedIndex, isFadingOut, maskColor, closeModal, filterToSingleDigit, isLength4, finshinput, handleInput, handleKeydown, rightCode, submitCaptcha, getcode, goback, countdown, get timerId() {
|
||
return timerId;
|
||
}, set timerId(v) {
|
||
timerId = v;
|
||
}, nextTick: vue.nextTick, reactive: vue.reactive, ref: vue.ref, onUnmounted: vue.onUnmounted, get onLoad() {
|
||
return onLoad;
|
||
}, get smsCode() {
|
||
return smsCode;
|
||
}, get checkPhoneCode() {
|
||
return checkPhoneCode;
|
||
}, get getMessage() {
|
||
return getMessage;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_message_input = resolveEasycom(vue.resolveDynamicComponent("u-message-input"), __easycom_0$3);
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/bgc.png"
|
||
}),
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/login/back.png",
|
||
onClick: $setup.goback
|
||
}),
|
||
vue.createElementVNode("view", { class: "under-container-title" }, [
|
||
vue.createElementVNode("view", { class: "code-title" }, " 请输入验证码 "),
|
||
vue.createElementVNode("view", { class: "code-number" }, [
|
||
vue.createTextVNode(" 验证码已发送到 "),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "code-font" },
|
||
vue.toDisplayString($setup.mobile),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "captcha-container" }, [
|
||
vue.createVNode(_component_u_message_input, {
|
||
"active-color": "#333333",
|
||
"inactive-color": "rgb(175,179,189)",
|
||
width: "150",
|
||
focus: true,
|
||
mode: "bottomLine",
|
||
onChange: $setup.finshinput
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "under-view",
|
||
style: { "z-index": "1" }
|
||
}, [
|
||
!$setup.countdown ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "right-blue",
|
||
onClick: $setup.getcode
|
||
}, " 重新发送 ")) : vue.createCommentVNode("v-if", true),
|
||
$setup.countdown ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "right-white"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
{ style: { "color": "#0096FF" } },
|
||
vue.toDisplayString($setup.countdown) + "秒",
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createTextVNode("后重新发送 ")
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("view", {
|
||
class: "right-black",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $setup.isFadingOut = true)
|
||
}, " 收不到验证码? ")
|
||
]),
|
||
vue.createCommentVNode(" 遮罩 "),
|
||
vue.createCommentVNode(' <transition name="fade"> '),
|
||
$setup.isFadingOut ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "overlay",
|
||
onClick: $setup.closeModal,
|
||
style: vue.normalizeStyle({ backgroundColor: $setup.maskColor })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </transition>\r\n\r\n <!-- 底部弹窗 "),
|
||
vue.createCommentVNode(' <transition name="slide-up"> '),
|
||
$setup.isFadingOut ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "modal"
|
||
}, [
|
||
vue.createElementVNode("view", { class: "modal-title" }, "收不到验证码"),
|
||
vue.createElementVNode("view", { class: "model-p" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "text-view",
|
||
style: { "font-weight": "600" }
|
||
}, "手机号可正常使用:"),
|
||
vue.createElementVNode("view", { class: "text-view" }, "1 是否输错手机号"),
|
||
vue.createElementVNode("view", { class: "text-view" }, "2 手机是否设置短信拦截/欠费/信号不好"),
|
||
vue.createElementVNode("view", { class: "text-view" }, "3 手机内存是否满了"),
|
||
vue.createElementVNode("view", { class: "text-view" }, "4 手机卡是否为物联卡,而非SIM卡")
|
||
])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </transition> ")
|
||
]);
|
||
}
|
||
const PagesLoginCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-7f72106f"], ["__file", "D:/hldy_xcx/pages/login/code.vue"]]);
|
||
const _sfc_main$q = {
|
||
__name: "protocol",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const goback = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const __returned__ = { goback };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "font-father" }, [
|
||
vue.createElementVNode("view", { class: "title-font" }, " NU 护理单元使用条款 "),
|
||
vue.createElementVNode("view", { class: "font-qian" }, " 一、总则 "),
|
||
vue.createElementVNode("view", { class: "font-normal" }, [
|
||
vue.createElementVNode("p", null, " 为规范长者及家属在 NU 护理单元的行为,保障长者得到优质护理服务,维护护理单元正常秩序,鉴于每个护理单元均为独立空间,特制定本使用条款。本条款是所有进入NU 护理单元的长者、家属必须遵守的准则,违反者将根据情节承担相应责任。")
|
||
]),
|
||
vue.createElementVNode("view", { class: "font-qian" }, " 二、长者及家属使用条款 "),
|
||
vue.createElementVNode("view", { class: "font-ri" }, " (一)日常行为规范 "),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "1.遵守作息时间:"),
|
||
vue.createTextVNode("严格遵守护理单元规定的作息时间,保持安静,不得大声喧哗、播放音乐或进行其他影响他人休息的活动。各独立护理单元之间应相互保持安静,避免噪音干扰其他单元长者。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "2.维护环境卫生:"),
|
||
vue.createTextVNode("保持所在护理单元病房及公共区域的整洁卫生,不随地吐痰、乱扔垃圾。生活垃圾应分类投放到指定垃圾桶内,医疗废物交由护理人员统一处理,不得随意丢弃。不得将垃圾放置在护理单元外公共通道,以免影响其他单元环境。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "3.爱护公共设施:"),
|
||
vue.createTextVNode("妥善使用本护理单元病房内的床铺、桌椅、呼叫器、卫生间设备等公共设施,不得故意损坏。如因使用不当造成设施设备损坏,需照价赔偿。禁止在病房内私自拆卸、改装任何设施设备。严禁将本护理单元设施设备挪至其他单元使用。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "4.规范用电安全:"),
|
||
vue.createTextVNode(":严禁在病房内使用电炉、热得快、电暖器等大功率电器,不得私拉乱接电线,防止发生用电安全事故。手机、充电器等小型电器使用完毕后及时拔除电源。各护理单元应独立检查用电安全,不得因用电不当影响其他单元供电。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "5.禁止吸烟:"),
|
||
vue.createTextVNode("NU 护理单元为无烟区域,长者及家属严禁在病房、走廊、卫生间等任何区域吸烟,违者将按照医院相关规定进行处罚。尤其要注意,在独立护理单元周边区域也严禁吸烟避免烟雾飘散影响其他单元长者健康。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-ri",
|
||
style: { "margin-top": "50rpx" }
|
||
}, " (二)安全与沟通 "),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "1.长者安全管理:")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("p", null, " 长者不得擅自离开所在护理单元。确需外出时,须向主管护士提出书面请假申请,经医生评估同意并签署意见后,方可离院。外出期间长者的安全由家属负责,如因擅自外出导致病情加重或其他意外情况,后果自行承担。")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("p", null, " 主动与医护人员保持良好沟通,及时反馈长者的病情变化、不适症状及心理状态。积极参与长者的护理计划和治疗方案制定,提出合理的意见和建议。家属如需了解其他护理单元类似病例情况,应通过医护人员正规渠道咨询,不得私自打听。")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("p", null, " 妥善保管长者的贵重物品,医护人员不承担长者财物保管责任。如需帮助,可与护理单元管理人员协商解决。不得在护理单元公共区域随意堆放个人物品,影响通行及空间使用。")
|
||
]),
|
||
vue.createElementVNode("view", { class: "font-qian" }, " 三、独立空间管理细则 "),
|
||
vue.createElementVNode("view", { class: "font-normal" }, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "1.空间使用规范:"),
|
||
vue.createTextVNode("各护理单元为独立封闭空间,未经允许,长者、家属及医护人员不得随意进入其他护理单元。护理单元之间设置明显标识及隔离设施,防止人员误闯。在紧急情况下,如需跨单元调配资源,需遵循医院统一指挥,按照既定应急流程执行。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "2.设施设备管理:"),
|
||
vue.createTextVNode("每个护理单元配备独立的仪器设备,设备专人专用,定期维护保养。设备标识明确所属护理单元,不得自挪用至其他单元。如设备出现故障,及时报修,并在本单元内做好备用设备调配,确保护理工作不受影响。定期对护理单元内设施设备进行安全检查,包括电气设备、医疗器械等,保障长者使用安全。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "3.环境清洁与消毒:"),
|
||
vue.createTextVNode("各护理单元安排专人负责日常清洁与消毒工作,保持空间内环境整洁卫生。按照医院感染防控要求,制定独立的消毒计划,对病房、走廊、卫生间、护士站等区域定期消毒。消毒用品独立存放于本护理单元,妥善保管,防止误用。在传染病流行期间,加强本护理单元的防控措施,严格限制人员进出,确保不发生交又感染。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("text", { style: { "font-weight": "600" } }, "4.物资管理:"),
|
||
vue.createTextVNode("护理单元内物资独立储备,包括药品、耗材、办公用品等。建立物资管理台账,定期盘点,确保物资充足且在有效期内。物资领取、使用严格登记,避免浪费及流失。特殊物资(如急救药品、贵重耗材)单独存放,专人负责管理,保障紧急情况下物资供应。若物资短缺需跨单元调配,需经上级部门协调,遵循先急后缓原则。 ")
|
||
]),
|
||
vue.createElementVNode("view", { class: "font-qian" }, " 四、附则 "),
|
||
vue.createElementVNode("view", { class: "font-normal" }, " 1.本使用条款由[制定部门]负责解释和修订。 "),
|
||
vue.createElementVNode("view", {
|
||
class: "font-normal",
|
||
style: { "margin-top": "50rpx" }
|
||
}, " 2.本使用条款自发布之日起施行。如有与本条款相抵触的规定,以本条款为准。 "),
|
||
vue.createElementVNode("view", {
|
||
class: "back-button",
|
||
onClick: $setup.goback
|
||
}, " 关闭 ")
|
||
]);
|
||
}
|
||
const PagesLoginProtocol = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-d224a900"], ["__file", "D:/hldy_xcx/pages/login/protocol.vue"]]);
|
||
const _sfc_main$p = {
|
||
__name: "special",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const cardarray = [
|
||
{
|
||
title: "日常照料:专业规范,细致周全",
|
||
content: "提供专业日常、饮食、清洁、睡眠、排泄等照料服务,长者舒适安心。"
|
||
},
|
||
{
|
||
title: " 健康监测:实时监测、精准应对",
|
||
content: "7*24小时生命体征监测,专业方案提前防控,健康风险提早化解。"
|
||
},
|
||
{
|
||
title: " 医护照料:多专联合,专业护航",
|
||
content: "医疗、护理团队协同合作,守护长者身体安康。"
|
||
},
|
||
{
|
||
title: "康复护理:科学规划,有效复健",
|
||
content: "量身定制护理流程,科学手段实施精准干预,为长者健康保驾护航。"
|
||
},
|
||
{
|
||
title: "贴心关怀:温暖陪伴、心灵慰藉",
|
||
content: "护理员床前陪伴、耐心疏导,让长者感受家的温暖与关怀。"
|
||
}
|
||
];
|
||
const phonenumber = vue.ref("");
|
||
const jumpto = () => {
|
||
getMessage(uni.getStorageSync("openid")).then((res) => {
|
||
if (!res.result.tel) {
|
||
uni.redirectTo({
|
||
url: `/pages/login/index`
|
||
});
|
||
} else {
|
||
uni.setStorageSync("tel", res.result.tel);
|
||
uni.setStorageSync("token", res.result.token);
|
||
uni.setStorageSync("serverUrl", res.result.serverUrl);
|
||
uni.setStorageSync("platId", res.result.platId);
|
||
uni.setStorageSync("izJg", res.result.izJg);
|
||
uni.setStorageSync("izJs", res.result.izJs);
|
||
uni.setStorageSync("izYg", res.result.izYg);
|
||
switch (res.result.advisoryType) {
|
||
case `1`:
|
||
uni.redirectTo({
|
||
url: `/pages/login/threeselectone`
|
||
});
|
||
break;
|
||
case `2`:
|
||
break;
|
||
case `3`:
|
||
uni.redirectTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
break;
|
||
default:
|
||
uni.redirectTo({
|
||
url: `/pages/login/threeselectone`
|
||
});
|
||
}
|
||
}
|
||
});
|
||
};
|
||
const no = vue.ref(false);
|
||
function maskPhone(phone) {
|
||
return phone.replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2");
|
||
}
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
onLoad((options) => {
|
||
if (!options.type) {
|
||
phonenumber.value = uni.getStorageSync("tel");
|
||
}
|
||
if (options.no) {
|
||
no.value = true;
|
||
}
|
||
});
|
||
const __returned__ = { cardarray, phonenumber, jumpto, no, maskPhone, goBack, get onLoad() {
|
||
return onLoad;
|
||
}, reactive: vue.reactive, ref: vue.ref, get getMessage() {
|
||
return getMessage;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "font-father" }, [
|
||
$setup.no ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "title-back"
|
||
}, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "宣传页")
|
||
])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
!$setup.no ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "fixed"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/introduce/selectbgc.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { class: "font-title" }, [
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
vue.createElementVNode("text", null, "尊敬的用户,您的手机"),
|
||
vue.createElementVNode(
|
||
"text",
|
||
{ style: { "color": "#259AFB" } },
|
||
vue.toDisplayString($setup.maskPhone($setup.phonenumber)),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { class: "big-font" }, " 已成功绑定 "),
|
||
vue.createElementVNode("view", { class: "" }, " 欢迎加入护理单元大家庭! ")
|
||
]),
|
||
vue.createCommentVNode(' <view class="font-title" v-if="!phonenumber">\r\n 尊敬的用户,您的机构{{ special?`变更信息申请`:`加盟申请` }}已成功提交,请耐心等待审核结果,期待您早日加入护理单元大家庭!\r\n </view> '),
|
||
vue.createElementVNode("view", { style: { "width": "100%" } }, [
|
||
vue.createElementVNode("view", {
|
||
class: "bottom-button",
|
||
onClick: $setup.jumpto
|
||
}, " 进入机构 ")
|
||
])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "white-father-spec",
|
||
style: vue.normalizeStyle($setup.no ? { marginTop: `0rpx` } : {})
|
||
},
|
||
[
|
||
vue.createElementVNode("image", {
|
||
class: "white-imge-spec",
|
||
src: "https://www.focusnu.com/media/directive/login/introduce/oldman.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "weight-font" }, " 长者入住 ")
|
||
],
|
||
4
|
||
/* STYLE */
|
||
),
|
||
vue.createElementVNode("view", null, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.cardarray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
style: { "width": "100%" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "white-card" }, [
|
||
vue.createElementVNode("view", { class: "white-left" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "white-title" },
|
||
vue.toDisplayString(item.title),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "white-text" },
|
||
vue.toDisplayString(item.content),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "white-right",
|
||
src: `https://www.focusnu.com/media/directive/login/introduce/${index}.png`
|
||
}, null, 8, ["src"])
|
||
])
|
||
]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-father" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/introduce/nurse.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "weight-font" }, " 员工入驻 "),
|
||
vue.createElementVNode("view", { class: "gray-font" }, " 入驻护理单元,遵循标准护理流程,提供长者床旁照护用专业技能与人文关怀共同守护长者健康。依托物联设备优化服务流程,依托员工培训提升照护能力,确保服务精准高效。 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-father",
|
||
style: { "margin-bottom": "50rpx" }
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-imge",
|
||
src: "https://www.focusnu.com/media/directive/login/introduce/jigou.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "weight-font" }, " 机构加盟 "),
|
||
vue.createElementVNode("view", { class: "gray-font" }, " 加盟护理单元,坐拥成熟运营体系,精简人力配置,降低运营成本。优质资源共享,多重优势协同发力,全方位拓宽利润空间,助力占领银发赛道。 ")
|
||
])
|
||
]);
|
||
}
|
||
const PagesLoginSpecial = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-aaa5af2f"], ["__file", "D:/hldy_xcx/pages/login/special.vue"]]);
|
||
const _sfc_main$o = {
|
||
__name: "specialsmall",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const special = vue.ref(false);
|
||
const jumpto = () => {
|
||
getMessage(uni.getStorageSync("openid")).then((res) => {
|
||
uni.setStorageSync("tel", res.result.tel);
|
||
uni.setStorageSync("token", res.result.token);
|
||
uni.setStorageSync("serverUrl", res.result.serverUrl);
|
||
uni.setStorageSync("platId", res.result.platId);
|
||
uni.setStorageSync("izJg", res.result.izJg);
|
||
uni.setStorageSync("izJs", res.result.izJs);
|
||
uni.setStorageSync("izYg", res.result.izYg);
|
||
uni.redirectTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
});
|
||
};
|
||
onLoad((options) => {
|
||
if (options.special == `true`) {
|
||
special.value = true;
|
||
}
|
||
});
|
||
const __returned__ = { special, jumpto, get onLoad() {
|
||
return onLoad;
|
||
}, reactive: vue.reactive, ref: vue.ref, get getMessage() {
|
||
return getMessage;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "font-father" }, [
|
||
vue.createElementVNode("view", { class: "fixed" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/introduce/allbgc.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("image", {
|
||
class: "title-photo",
|
||
src: `https://www.focusnu.com/media/directive/index/bluephoto.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { class: "small-title" }, [
|
||
vue.createTextVNode(
|
||
" 尊敬的用户,您的机构" + vue.toDisplayString($setup.special ? `变更信息` : `加盟`),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("text", { style: { "color": "rgb(1,153,255)" } }, "申请已成功提交")
|
||
]),
|
||
vue.createCommentVNode(' <view class="font-title">\r\n 申请已成功提交\r\n </view> '),
|
||
vue.createElementVNode("view", { class: "normal" }, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
null,
|
||
vue.toDisplayString($setup.special ? `我们将尽快处理并反馈审核结果` : `请耐心等待审核结果`) + "," + vue.toDisplayString($setup.special ? `期待与您继续携手同行` : `期待您早日加入护理单元大家庭`) + " ! ",
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(" <text>\r\n {{ special?`期待与您继续携手同行`:`期待您早日加入护理单元大家庭` }}\r\n !\r\n </text> ")
|
||
]),
|
||
vue.createCommentVNode(' <view class="normal">\r\n\r\n\r\n <text>\r\n {{ special?`期待与您继续携手同行`:`期待您早日加入护理单元大家庭` }}\r\n !\r\n </text>\r\n\r\n </view> '),
|
||
vue.createCommentVNode(' <view class="normal">\r\n\r\n\r\n <text>\r\n \r\n </text>\r\n\r\n </view> ')
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "bottom-button",
|
||
onClick: $setup.jumpto
|
||
}, " 我的机构 ")
|
||
]);
|
||
}
|
||
const PagesLoginSpecialsmall = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-c9ad9bed"], ["__file", "D:/hldy_xcx/pages/login/specialsmall.vue"]]);
|
||
const _sfc_main$n = {
|
||
__name: "specialloginafther",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const jumpto = () => {
|
||
formatAppLog("log", "at pages/login/specialloginafther.vue:33", "???");
|
||
uni.redirectTo({
|
||
url: `/pages/login/threeselectone`
|
||
});
|
||
};
|
||
const phone = vue.ref("");
|
||
onLoad((options) => {
|
||
phone.value = uni.getStorageSync("tel");
|
||
});
|
||
const __returned__ = { jumpto, phone, get onLoad() {
|
||
return onLoad;
|
||
}, reactive: vue.reactive, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "font-father" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/introduce/allbgc.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("image", {
|
||
class: "title-photo",
|
||
src: `https://www.focusnu.com/media/directive/index/bluephoto.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { class: "small-title" }, [
|
||
vue.createTextVNode("尊敬的用户,您的手机"),
|
||
vue.createElementVNode(
|
||
"text",
|
||
{ style: { "color": "rgb(1,153,255)", "font-weight": "600" } },
|
||
vue.toDisplayString($setup.phone),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createCommentVNode(' <view class="small-title"></view> '),
|
||
vue.createElementVNode("view", { class: "font-title" }, " 已成功绑定,期待您早日加入护理单元大家庭! "),
|
||
vue.createCommentVNode(' <view class="normal">\r\n <text style="font-weight: 600;">\r\n 期待您早日加入护理单元大家庭!\r\n </text>\r\n </view> '),
|
||
vue.createElementVNode("view", {
|
||
class: "bottom-button",
|
||
onClick: $setup.jumpto
|
||
}, " 我的机构 ")
|
||
]);
|
||
}
|
||
const PagesLoginSpecialloginafther = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-186dd127"], ["__file", "D:/hldy_xcx/pages/login/specialloginafther.vue"]]);
|
||
const _sfc_main$m = {
|
||
__name: "xuanchuan",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const jumpto = () => {
|
||
uni.redirectTo({
|
||
url: `/pages/login/index`
|
||
});
|
||
};
|
||
const which = vue.ref(0);
|
||
const swiperchange = (res) => {
|
||
which.value = res.detail.current;
|
||
};
|
||
const __returned__ = { jumpto, which, swiperchange, reactive: vue.reactive, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "font-father" }, [
|
||
vue.createCommentVNode(' <image class="title-img" :src="`https://www.focusnu.com/media/directive/login/introduce/allbgc.png`" /> '),
|
||
vue.createElementVNode("swiper", {
|
||
style: vue.normalizeStyle([{ "width": "100%" }, { height: `92vh` }]),
|
||
duration: 150,
|
||
current: $setup.which,
|
||
onChange: $setup.swiperchange
|
||
}, [
|
||
vue.createElementVNode("swiper-item", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/bgc0.jpg`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { style: { "width": "100%", "padding-left": "75rpx", "padding-right": "75rpx", "position": "absolute", "left": "0", "bottom": "100rpx" } }, [
|
||
vue.createElementVNode("view", { class: "title-name" }, [
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> '),
|
||
vue.createElementVNode("view", { class: "font-weight" }, " 长者入住 "),
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> ')
|
||
]),
|
||
vue.createCommentVNode(' <image class="white-imge-spec" src="https://www.focusnu.com/media/directive/login/old1.png" /> '),
|
||
vue.createElementVNode("view", { class: "yuangong-font" }, [
|
||
vue.createTextVNode(" 提供专业照料, 涵盖日常、饮食、清洁、排泄等方面,"),
|
||
vue.createElementVNode("text", { style: { "color": "#2792FC" } }, "7*24 小时生命体征监测,医护团队协同护航 "),
|
||
vue.createTextVNode(" ,量身定制科学的护理流程,护理员贴心床前陪伴,让长者感受家的温暖与关怀。 ")
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("swiper-item", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/bgc1.jpg`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { style: { "width": "100%", "padding-left": "75rpx", "padding-right": "75rpx", "position": "absolute", "left": "0", "bottom": "100rpx" } }, [
|
||
vue.createElementVNode("view", { class: "title-name" }, [
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> '),
|
||
vue.createElementVNode("view", { class: "font-weight" }, " 员工入驻 "),
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> ')
|
||
]),
|
||
vue.createCommentVNode(' <image class="white-imge-spec" src="https://www.focusnu.com/media/directive/login/yuangong1.png" /> '),
|
||
vue.createElementVNode("view", { class: "yuangong-font" }, [
|
||
vue.createTextVNode(" 入驻护理单元,遵循标准护理流程,提供长者床旁照护,用专业技能与人文关怀共同守护长者健康。"),
|
||
vue.createElementVNode("text", { style: { "color": "#2792FC" } }, "依托物联设备优化服务流程,依托员工培训提升照护能力,确保服务精准高效。")
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("swiper-item", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: `https://www.focusnu.com/media/directive/login/bgc2.jpg`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { style: { "width": "100%", "padding-left": "75rpx", "padding-right": "75rpx", "position": "absolute", "left": "0", "bottom": "150rpx" } }, [
|
||
vue.createElementVNode("view", { class: "title-name" }, [
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> '),
|
||
vue.createElementVNode("view", { class: "font-weight" }, " 机构加盟 "),
|
||
vue.createCommentVNode(' <view class="gray-heng"></view> ')
|
||
]),
|
||
vue.createCommentVNode(' <image class="white-imge-spec" src="https://www.focusnu.com/media/directive/login/jigou.png" /> '),
|
||
vue.createElementVNode("view", { class: "yuangong-font" }, [
|
||
vue.createTextVNode(" 加盟护理单元,坐拥成熟运营体系,精简人力配置,降低运营成本。优质资源共享,多重优势协同发力,"),
|
||
vue.createElementVNode("text", { style: { "color": "#2792FC" } }, "全方位拓宽利润空间,助力占领银发赛道。")
|
||
])
|
||
])
|
||
])
|
||
], 40, ["current"]),
|
||
$setup.which != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "dian-father"
|
||
}, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList([1, 2, 3], (item, index) => {
|
||
return vue.createElementVNode(
|
||
"view",
|
||
{
|
||
key: index,
|
||
class: vue.normalizeClass($setup.which === index ? `dian-target` : `dian`)
|
||
},
|
||
null,
|
||
2
|
||
/* CLASS */
|
||
);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
$setup.which == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "bottom-button",
|
||
onClick: $setup.jumpto
|
||
}, " 前往注册 ")) : vue.createCommentVNode("v-if", true)
|
||
]);
|
||
}
|
||
const PagesLoginXuanchuan = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-5699789f"], ["__file", "D:/hldy_xcx/pages/login/xuanchuan.vue"]]);
|
||
const _sfc_main$l = {
|
||
__name: "downmenu",
|
||
props: {
|
||
itemTarget: {
|
||
type: Number,
|
||
required: true
|
||
// 如果必须传
|
||
// default: 0 // 如果您想给默认值
|
||
}
|
||
},
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const props = __props;
|
||
const itemArray = ["NU", "动态", "我的"];
|
||
const jumpto = (index) => {
|
||
if (index != props.itemTarget) {
|
||
switch (index) {
|
||
case 0:
|
||
uni.redirectTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
break;
|
||
case 1:
|
||
break;
|
||
case 2:
|
||
uni.redirectTo({
|
||
url: `/pages/index/mine`
|
||
});
|
||
break;
|
||
}
|
||
}
|
||
};
|
||
const __returned__ = { props, itemArray, jumpto, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
[
|
||
vue.createCommentVNode(" 底部的栏,为啥这样写,是因为要做左右拉动 "),
|
||
vue.createElementVNode("view", { class: "botton-view" }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.itemArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "array-father"
|
||
}, [
|
||
vue.createElementVNode("view", {
|
||
class: vue.normalizeClass($props.itemTarget === index ? `bottom-button-target` : `bottom-button`),
|
||
onClick: ($event) => $setup.jumpto(index)
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "botton-img",
|
||
src: `https://www.focusnu.com/media/directive/index/itemsbutton/${index}${$props.itemTarget === index ? 1 : 0}.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "bottom-text" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 10, ["onClick"])
|
||
]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
const downMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-459e7b51"], ["__file", "D:/hldy_xcx/compontent/public/downmenu.vue"]]);
|
||
const _sfc_main$k = {
|
||
__name: "model",
|
||
props: {
|
||
show: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
content: {
|
||
type: String,
|
||
default: ""
|
||
}
|
||
},
|
||
emits: ["close"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
__expose();
|
||
const props = __props;
|
||
const emit = __emit;
|
||
function handleClose() {
|
||
emit("close");
|
||
}
|
||
const __returned__ = { props, emit, handleClose };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
[
|
||
vue.createCommentVNode(" 通过 v-show 控制显隐,并根据 show 添加 is-active 类触发 CSS 过渡 "),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass(["neuro-wrapper", $props.show ? "is-active" : ""])
|
||
},
|
||
[
|
||
vue.createCommentVNode(" 遮罩层,点击触发关闭 "),
|
||
vue.createElementVNode("view", {
|
||
class: "neuro-mask",
|
||
onClick: $setup.handleClose
|
||
}),
|
||
vue.createCommentVNode(" 拟态框,阻止冒泡点击 "),
|
||
vue.createElementVNode("view", {
|
||
class: "neuro-box",
|
||
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
||
}, ["stop"]))
|
||
}, [
|
||
vue.createCommentVNode(' <view class="tittle-bgc">\n \n </view> '),
|
||
vue.createCommentVNode(' <view class="text">提示</view> '),
|
||
vue.createCommentVNode(' <view class="button" @click="handleClose">确定</view> '),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ style: { "font-size": "25rpx", "line-height": "45rpx" } },
|
||
vue.toDisplayString($props.content),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
],
|
||
2
|
||
/* CLASS */
|
||
), [
|
||
[vue.vShow, $props.show]
|
||
])
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
const model = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-5994d25c"], ["__file", "D:/hldy_xcx/compontent/public/model.vue"]]);
|
||
const tu = "https://www.focusnu.com/media/directive/index/tu.png";
|
||
const _sfc_main$j = {
|
||
__name: "index",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const buttonArray = vue.ref(["单元", "仓库", "后勤", "工区", "办公室 ", "员工", "机构维护"]);
|
||
const statusarray = ["loading", "success", "fail"];
|
||
const which = vue.ref(0);
|
||
const changecard = (e) => {
|
||
which.value = e;
|
||
whichMenu.value = which.value;
|
||
};
|
||
const moveend = () => {
|
||
which.value = menuArray.value.length;
|
||
whichMenu.value = which.value;
|
||
};
|
||
const addjigou = () => {
|
||
uni.setStorageSync("specicalid", "");
|
||
uni.setStorageSync("baddata", "");
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const look = (element) => {
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/all?element=${JSON.stringify(element)}`
|
||
});
|
||
};
|
||
const jumptolist = (res) => {
|
||
if (res) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
const again = (item) => {
|
||
formatAppLog("log", "at pages/index/index.vue:225", "????", item);
|
||
uni.setStorageSync("baddata", item);
|
||
uni.setStorageSync("specicalid", item.id);
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
const jumpTo = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/index`
|
||
});
|
||
};
|
||
const whichMenu = vue.ref(0);
|
||
const swiperchange = (res) => {
|
||
whichMenu.value = res.detail.current;
|
||
which.value = res.detail.current;
|
||
};
|
||
const gotoWindy = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/selectunit/map"
|
||
});
|
||
};
|
||
const goback = () => {
|
||
uni.navigateBack();
|
||
};
|
||
vue.onMounted(async () => {
|
||
});
|
||
vue.onUnmounted(() => {
|
||
});
|
||
const menuArray = vue.ref([]);
|
||
const loadingData = () => {
|
||
uni.getStorage({
|
||
key: "openid",
|
||
success: function(res) {
|
||
getMessageList(res.data).then((res2) => {
|
||
menuArray.value = res2.result;
|
||
menuArray.value.push({
|
||
status: `-1`
|
||
});
|
||
});
|
||
}
|
||
});
|
||
};
|
||
onLoad(() => {
|
||
loadingData();
|
||
});
|
||
const __returned__ = { tu, show, content, buttonArray, statusarray, which, changecard, moveend, addjigou, look, jumptolist, again, jumpTo, whichMenu, swiperchange, gotoWindy, goback, menuArray, loadingData, reactive: vue.reactive, ref: vue.ref, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, get onLoad() {
|
||
return onLoad;
|
||
}, get getMessageList() {
|
||
return getMessageList;
|
||
}, get request() {
|
||
return request;
|
||
}, downMenu, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createCommentVNode(' <u-modal title="驳回原因" v-model="show" :content="content"></u-modal> '),
|
||
vue.createElementVNode("view", { class: "index-up" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "index-up-img",
|
||
src: "https://www.focusnu.com/media/directive/index/indexgif.gif",
|
||
mode: "widthFix",
|
||
"lazy-load": "false"
|
||
})
|
||
]),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createElementVNode("swiper", {
|
||
style: vue.normalizeStyle([{ "width": "100%" }, { height: `100vh` }]),
|
||
duration: 150,
|
||
current: $setup.which,
|
||
onChange: $setup.swiperchange
|
||
}, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.menuArray, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", { key: index }, [
|
||
vue.createElementVNode("swiper-item", null, [
|
||
vue.createElementVNode("view", { class: "white-content-father-time" }, [
|
||
item.comName ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "white-content"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "white-bgc",
|
||
style: { "font-size": "32rpx" }
|
||
},
|
||
vue.toDisplayString(item.comName),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-content-father" }, [
|
||
vue.createCommentVNode(' <image\r\n class="chuo-img" v-if="item.status!=`-1`&&item.status!=`2`"\r\n :src=" `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`"\r\n /> '),
|
||
item.status == `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "chuo-ball",
|
||
onClick: $setup.loadingData
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "ball-img",
|
||
src: `https://www.focusnu.com/media/directive/index/refresh.png`
|
||
}, null, 8, ["src"])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
item.status == `1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "white-content"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-content-img",
|
||
src: `https://www.focusnu.com/media/directive/index/${$setup.statusarray[Number(item.status) - 1]}.png`,
|
||
"lazy-load": "false"
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode("view", { class: "white-font" }, [
|
||
vue.createTextVNode(" 您提交的 "),
|
||
vue.createCommentVNode(' <text style="font-weight: 600;">\r\n "{{item.comName}}"\r\n </text> ')
|
||
]),
|
||
vue.createElementVNode("view", { class: "second-font" }, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
null,
|
||
' "' + vue.toDisplayString(item.comName) + '" ',
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { class: "second-font" }, [
|
||
vue.createTextVNode(" 加盟申请 "),
|
||
vue.createElementVNode("text", { style: { "color": "#fa8622" } }, " 正在审核中 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "button-blue",
|
||
onClick: ($event) => $setup.look(item)
|
||
}, " 查看 ", 8, ["onClick"])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </swiper-item> "),
|
||
vue.createCommentVNode(' <swiper-item v-if="item.status==`3`"> '),
|
||
item.status == `3` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 2,
|
||
class: "white-content"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-content-img",
|
||
src: `https://www.focusnu.com/media/directive/index/${$setup.statusarray[Number(item.status) - 1]}.png`,
|
||
"lazy-load": "false"
|
||
}, null, 8, ["src"]),
|
||
vue.createCommentVNode(' <view class="white-font" style="margin-top: 320rpx;">\r\n 您提交的\r\n </view>\r\n <view class="second-font">\r\n {{item.comName}}\r\n </view>\r\n <view class="second-font">\r\n 加盟申请\r\n <text style="color: #FF7744;">\r\n 审核不通过\r\n </text>\r\n </view> '),
|
||
vue.createElementVNode("view", { class: "white-font" }, " 您提交的 "),
|
||
vue.createElementVNode("view", { class: "second-font" }, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
null,
|
||
' "' + vue.toDisplayString(item.comName) + '" ',
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { class: "second-font" }, [
|
||
vue.createTextVNode(" 加盟申请 "),
|
||
vue.createElementVNode("text", { style: { "color": "#eb2b59" } }, " 审核不通过 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "button-blue-spec",
|
||
onClick: ($event) => $setup.again(item)
|
||
}, " 重新提交 ", 8, ["onClick"]),
|
||
vue.createElementVNode("view", {
|
||
class: "button-white-spec",
|
||
onClick: ($event) => $setup.jumptolist(item.content)
|
||
}, " 驳回原因 ", 8, ["onClick"])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </swiper-item> "),
|
||
vue.createCommentVNode(' <swiper-item v-if="item.status==`2`"> '),
|
||
item.status == `2` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 3,
|
||
style: { "z-index": "1", "width": "100%" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "zhiling-box" }, [
|
||
vue.createElementVNode("view", { class: "" }, " 单元清洁服务指令已执行完毕,点击查看 "),
|
||
vue.createElementVNode("image", {
|
||
class: "zhiling-img",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/more.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-box-father" }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.buttonArray, (item2, index2) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: index2,
|
||
class: "white-box"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "box-img",
|
||
src: `https://www.focusnu.com/media/directive/index/addjiji/${index2}.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "box-font" },
|
||
vue.toDisplayString(item2),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(' <image\r\n class="chuo-img" v-if="item.status!=`-1`&&item.status!=`2`"\r\n :src=" `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`"\r\n /> ')
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)),
|
||
vue.createElementVNode("view", { class: "white-box" }, [
|
||
vue.createElementVNode("view", { style: { "font-weight": "600", "font-size": "80rpx" } }, "+")
|
||
])
|
||
])
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </swiper-item> ")
|
||
]),
|
||
vue.createCommentVNode(" <swiper-item> "),
|
||
item.status == `-1` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "white-content",
|
||
style: { "margin": "0 auto", "margin-top": "110rpx" }
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-content-secondimg",
|
||
src: "https://www.focusnu.com/media/directive/index/addjiji/addjigou.png",
|
||
"lazy-load": "false"
|
||
}),
|
||
vue.createElementVNode("view", {
|
||
class: "button-blue",
|
||
onClick: $setup.addjigou
|
||
}, " 添加机构 ")
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(" </swiper-item> ")
|
||
])
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
], 40, ["current"]),
|
||
vue.createElementVNode("view", { style: { "z-index": "999", "position": "fixed", "bottom": "70rpx", "width": "100%", "display": "flex", "justify-content": "center", "margin-top": "-25rpx", "height": "100rpx" } }, [
|
||
vue.createElementVNode("view", { class: "jia-box" }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.menuArray, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: index,
|
||
onClick: ($event) => $setup.changecard(index)
|
||
}, [
|
||
index != $setup.menuArray.length - 1 ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: vue.normalizeClass($setup.whichMenu == index ? `black-box` : `gray-box`)
|
||
},
|
||
null,
|
||
2
|
||
/* CLASS */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
index == $setup.menuArray.length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "jia",
|
||
onClick: $setup.moveend
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "jia-img",
|
||
src: `https://www.focusnu.com/media/directive/index/bluejia.png`
|
||
}, null, 8, ["src"])
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
]),
|
||
vue.createVNode($setup["downMenu"], { itemTarget: 0 })
|
||
]);
|
||
}
|
||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/hldy_xcx/pages/index/index.vue"]]);
|
||
const _sfc_main$i = {
|
||
__name: "exit",
|
||
props: {
|
||
show: {
|
||
type: Boolean,
|
||
default: true
|
||
}
|
||
},
|
||
emits: ["close"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
__expose();
|
||
const props = __props;
|
||
const emit = __emit;
|
||
function handleClose() {
|
||
emit("close");
|
||
}
|
||
const go = () => {
|
||
uni.exitMiniProgram({});
|
||
};
|
||
const __returned__ = { props, emit, handleClose, go };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
[
|
||
vue.createCommentVNode(" 通过 v-show 控制显隐,并根据 show 添加 is-active 类触发 CSS 过渡 "),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass(["neuro-wrapper", $props.show ? "is-active" : ""])
|
||
},
|
||
[
|
||
vue.createCommentVNode(" 遮罩层,点击触发关闭 "),
|
||
vue.createElementVNode("view", {
|
||
class: "neuro-mask",
|
||
onClick: $setup.handleClose
|
||
}),
|
||
vue.createCommentVNode(" 拟态框,阻止冒泡点击 "),
|
||
vue.createElementVNode("view", {
|
||
class: "neuro-box",
|
||
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
||
}, ["stop"]))
|
||
}, [
|
||
vue.createCommentVNode(' <view class="tittle-bgc">\n \n </view> '),
|
||
vue.createCommentVNode(' <view class="text">提示</view> '),
|
||
vue.createElementVNode("view", { class: "button-father" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "button-white",
|
||
onClick: $setup.handleClose
|
||
}, "取消"),
|
||
vue.createElementVNode("view", {
|
||
class: "button",
|
||
onClick: $setup.go
|
||
}, "确定")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "font-size": "25rpx", "line-height": "45rpx", "margin-top": "-50rpx" } }, "确定要退出登录吗")
|
||
])
|
||
],
|
||
2
|
||
/* CLASS */
|
||
), [
|
||
[vue.vShow, $props.show]
|
||
])
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
const exit = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-843c2bd8"], ["__file", "D:/hldy_xcx/compontent/public/exit.vue"]]);
|
||
const _sfc_main$h = {
|
||
__name: "mine",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const phone = vue.ref("");
|
||
const openid = vue.ref("");
|
||
const platId = vue.ref("");
|
||
const exitshow = vue.ref(false);
|
||
vue.onMounted(() => {
|
||
phone.value = uni.getStorageSync("tel");
|
||
platId.value = uni.getStorageSync("platId");
|
||
});
|
||
const cardMenu = [`机构信息`, `加盟审核`, `宣传页`];
|
||
const change = () => {
|
||
uni.navigateTo({
|
||
url: `/pages/login/threeselectonespec`
|
||
});
|
||
};
|
||
const exitshowopen = () => {
|
||
exitshow.value = true;
|
||
};
|
||
const clickButton = (index) => {
|
||
switch (index) {
|
||
case 0:
|
||
uni.navigateTo({
|
||
url: `/pages/login/workjoinsuccess`
|
||
});
|
||
break;
|
||
case 1:
|
||
uni.navigateTo({
|
||
url: `/pages/login/workjoin`
|
||
});
|
||
break;
|
||
case 2:
|
||
uni.navigateTo({
|
||
url: `/pages/login/special?no=true`
|
||
});
|
||
break;
|
||
}
|
||
};
|
||
const __returned__ = { phone, openid, platId, exitshow, cardMenu, change, exitshowopen, clickButton, reactive: vue.reactive, ref: vue.ref, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, exit, downMenu };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "login-container" }, [
|
||
vue.createVNode($setup["exit"], {
|
||
show: $setup.exitshow,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.exitshow = false)
|
||
}, null, 8, ["show"]),
|
||
vue.createElementVNode("image", {
|
||
class: "bgc-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/bgc.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "ball" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "ball-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/head.png"
|
||
})
|
||
]),
|
||
vue.createCommentVNode(' <view class="upfont">\r\n 迷路往前走\r\n </view> '),
|
||
vue.createElementVNode("view", { style: { "display": "flex", "margin-top": "30rpx" } }, [
|
||
vue.createElementVNode("view", { class: "badid" }, " ID "),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ style: { "z-index": "1", "margin-top": "-3rpx" } },
|
||
vue.toDisplayString($setup.platId),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "phone" },
|
||
vue.toDisplayString($setup.phone),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("view", { class: "white-father" }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.cardMenu, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
class: "white-card",
|
||
key: index,
|
||
onClick: ($event) => $setup.clickButton(index)
|
||
}, [
|
||
vue.createElementVNode("view", { class: "white-left" }, [
|
||
vue.createElementVNode("image", {
|
||
class: "white-left-imge",
|
||
src: `https://www.focusnu.com/media/directive/index/mine/${index}.png`
|
||
}, null, 8, ["src"]),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ style: { "font-size": "32rpx" } },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-right" }, [
|
||
!index ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
style: { "font-size": "30rpx", "margin-top": "-4rpx" }
|
||
}, "变更机构信息")) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("image", {
|
||
class: "white-right-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/more.png"
|
||
})
|
||
])
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "blue-button",
|
||
onClick: $setup.change
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "blue-button-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/change.png"
|
||
}),
|
||
vue.createTextVNode(" 切换账号 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-button",
|
||
onClick: $setup.exitshowopen
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "blue-button-imge",
|
||
src: "https://www.focusnu.com/media/directive/index/mine/exit.png"
|
||
}),
|
||
vue.createTextVNode(" 退出登录 ")
|
||
]),
|
||
vue.createVNode($setup["downMenu"], { itemTarget: 2 })
|
||
]);
|
||
}
|
||
const PagesIndexMine = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-dd3057bc"], ["__file", "D:/hldy_xcx/pages/index/mine.vue"]]);
|
||
const _sfc_main$g = {
|
||
__name: "hukou",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const nameArray = [
|
||
"姓名",
|
||
"户主或与户主关系",
|
||
"曾用名",
|
||
"性别",
|
||
"出生地",
|
||
"民族",
|
||
"籍贯",
|
||
"出生日期",
|
||
"本市(县)其他住址",
|
||
"宗教信仰",
|
||
"公民身份证件编号",
|
||
"身高",
|
||
"血型",
|
||
"文化程度",
|
||
"婚姻状况",
|
||
"兵役状况",
|
||
"服务住所",
|
||
"职业",
|
||
"何时由何地迁来本市(县)",
|
||
"何时由何地迁来本址"
|
||
];
|
||
const tempImagePath = vue.ref("");
|
||
function getMessage2() {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sourceType: ["camera"],
|
||
success: (chooseRes) => {
|
||
tempImagePath.value = chooseRes.tempFilePaths[0];
|
||
uploadImage(tempImagePath.value);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addoldman/hukou.vue:64", "拍照失败:", err);
|
||
}
|
||
});
|
||
}
|
||
function uploadImage(filePath) {
|
||
uni.uploadFile({
|
||
url: `${uni.getStorageSync("serverUrl")}/api/ocr/idCard`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {
|
||
// 可以根据接口需要添加额外表单字段
|
||
// userId: '12345'
|
||
},
|
||
success: (uploadRes) => {
|
||
formatAppLog("log", "at pages/addoldman/hukou.vue:83", "????", JSON.parse(JSON.parse(uploadRes.data).result).data);
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
}
|
||
});
|
||
}
|
||
const goback = () => {
|
||
uni.redirectTo({
|
||
url: `/pages/index/index`
|
||
});
|
||
};
|
||
const __returned__ = { nameArray, tempImagePath, getMessage: getMessage2, uploadImage, goback, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "content-weight" }, "上传户口本本人页"),
|
||
vue.createElementVNode("image", {
|
||
class: "content-img",
|
||
src: "https://www.focusnu.com/media/directive/index/bian.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: $setup.getMessage
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "户口本本人页"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传户口本本人页")
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: "https://www.focusnu.com/media/directive/index/photoID.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", { class: "message-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "message-weight" }, " 确认户口本本人页信息 ")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("view", { class: "one-right" }, "自动获得")
|
||
]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "gray-font" }, [
|
||
vue.createElementVNode("view", { class: "" }, "注意事项:"),
|
||
vue.createElementVNode("view", { class: "" }, "1.所有上传信息均会被妥善保管,不用于其他商业用途或传输给第三方。")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.goback
|
||
}, " 确认提交 ")
|
||
]);
|
||
}
|
||
const PagesAddoldmanHukou = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-d86bf352"], ["__file", "D:/hldy_xcx/pages/addoldman/hukou.vue"]]);
|
||
const _sfc_main$f = {
|
||
__name: "yibao",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const nameArray = ["姓名", "社会保障卡号码", "社会保障卡卡号", "发卡日期"];
|
||
const tempImagePath = vue.ref("");
|
||
function getMessage2() {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sourceType: ["camera"],
|
||
success: (chooseRes) => {
|
||
tempImagePath.value = chooseRes.tempFilePaths[0];
|
||
uploadImage(tempImagePath.value);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addoldman/yibao.vue:74", "拍照失败:", err);
|
||
}
|
||
});
|
||
}
|
||
function uploadImage(filePath) {
|
||
uni.uploadFile({
|
||
url: `${uni.getStorageSync("serverUrl")}/api/ocr/idCard`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {
|
||
// 可以根据接口需要添加额外表单字段
|
||
// userId: '12345'
|
||
},
|
||
success: (uploadRes) => {
|
||
formatAppLog("log", "at pages/addoldman/yibao.vue:93", "????", JSON.parse(JSON.parse(uploadRes.data).result).data);
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
}
|
||
});
|
||
}
|
||
const next = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/addoldman/hukou"
|
||
});
|
||
};
|
||
const __returned__ = { nameArray, tempImagePath, getMessage: getMessage2, uploadImage, next, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "content-weight" }, "医保卡上传"),
|
||
vue.createElementVNode("image", {
|
||
class: "content-img",
|
||
src: "https://www.focusnu.com/media/directive/index/bian.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: $setup.getMessage
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "医保卡正面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证医保卡正面")
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: "https://www.focusnu.com/media/directive/index/yibaocard.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
style: { "margin-top": "30rpx" },
|
||
onClick: $setup.getMessage
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "医保卡背面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证医保卡背面")
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: "https://www.focusnu.com/media/directive/index/backyibaocard.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", { class: "message-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "message-weight" }, " 确认户口本本人页信息 ")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("view", { class: "one-right" }, "自动获得")
|
||
]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "gray-font" }, [
|
||
vue.createElementVNode("view", { class: "" }, "注意事项:"),
|
||
vue.createElementVNode("view", { class: "" }, " 1.同一个医保卡号只能认证一个账号; "),
|
||
vue.createElementVNode("view", { class: "" }, "2.正反面医保卡信息应为同一医保卡信息;"),
|
||
vue.createElementVNode("view", { class: "" }, "3.所有上传照片需清晰且未遮挡,请勿进行美化和修改;"),
|
||
vue.createElementVNode("view", { class: "" }, "4.所有上传信息均会被妥善保管,不会用于其他商业用途或传输给第三方;")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.next
|
||
}, " 下一步 ")
|
||
]);
|
||
}
|
||
const PagesAddoldmanYibao = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-6250a642"], ["__file", "D:/hldy_xcx/pages/addoldman/yibao.vue"]]);
|
||
const _sfc_main$e = {
|
||
__name: "IDcard",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限"];
|
||
const textArray = vue.reactive(["", "", "", "", "", "", "", ""]);
|
||
const tempImagePath = vue.ref("");
|
||
function getMessage2() {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sourceType: ["camera"],
|
||
success: (chooseRes) => {
|
||
tempImagePath.value = chooseRes.tempFilePaths[0];
|
||
uploadImage(tempImagePath.value);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addoldman/IDcard.vue:97", "拍照失败:", err);
|
||
}
|
||
});
|
||
}
|
||
const headImge = vue.ref("");
|
||
const backImge = vue.ref("");
|
||
function uploadImage(filePath) {
|
||
uni.showLoading();
|
||
uni.uploadFile({
|
||
url: `${uni.getStorageSync("serverUrl")}/api/ocr/idCard`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {},
|
||
success: (uploadRes) => {
|
||
if (!JSON.parse(uploadRes.data).success) {
|
||
uni.showToast({
|
||
title: "识别失败",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
return;
|
||
}
|
||
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||
textArray[0] = father.name;
|
||
textArray[1] = father.sex;
|
||
textArray[2] = father.idNumber;
|
||
textArray[3] = father.ethnicity;
|
||
textArray[4] = father.birthDate;
|
||
textArray[5] = father.address;
|
||
uni.showToast({
|
||
title: "识别成功"
|
||
});
|
||
headImge.value = filePath;
|
||
uni.hideLoading();
|
||
} else {
|
||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||
textArray[6] = father.issueAuthority;
|
||
textArray[7] = father.validPeriod;
|
||
uni.showToast({
|
||
title: "识别成功"
|
||
});
|
||
backImge.value = filePath;
|
||
uni.hideLoading();
|
||
}
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
}
|
||
function isAtLeastEightChars(str) {
|
||
return typeof str === "string" && str.length >= 12;
|
||
}
|
||
const openLook = (res) => {
|
||
if (isAtLeastEightChars(res)) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
const next = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/addoldman/yibao"
|
||
});
|
||
};
|
||
const __returned__ = { show, content, nameArray, textArray, tempImagePath, getMessage: getMessage2, headImge, backImge, uploadImage, isAtLeastEightChars, openLook, next, ref: vue.ref, reactive: vue.reactive, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createCommentVNode(' <u-modal v-model="show" :content="content"></u-modal> '),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "content-weight" }, "身份证上传"),
|
||
vue.createElementVNode("image", {
|
||
class: "content-img",
|
||
src: "https://www.focusnu.com/media/directive/index/bian.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: $setup.getMessage
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "人像面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证人像面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.headImge ? $setup.headImge : `https://www.focusnu.com/media/directive/index/IDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.headImge ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
style: { "margin-top": "30rpx" },
|
||
onClick: $setup.getMessage
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "国徽面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证国徽面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.backImge ? $setup.backImge : `https://www.focusnu.com/media/directive/index/backIDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.backImge ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", { class: "message-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "message-weight" }, " 确认户口本本人页信息 ")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(' <view class="one-right">{{textArray[index] ? textArray[index] : "自动获取" }}</view> '),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray[index] ? $setup.textArray[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "gray-font" }, [
|
||
vue.createElementVNode("view", { class: "" }, "注意事项:"),
|
||
vue.createElementVNode("view", { class: "" }, " 同一个身份证号只能认证一个账号国徽而与正面信息应为同一身份证的信息目在有效期内,所有上传照片需清晰且未遮挡,请勿进行美化和修改,所有上传信息均会被妥善保管,不会用于其他商业用途或传输给第三方。")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.next
|
||
}, " 下一步 ")
|
||
]);
|
||
}
|
||
const PagesAddoldmanIDcard = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-5fcb8e22"], ["__file", "D:/hldy_xcx/pages/addoldman/IDcard.vue"]]);
|
||
const _sfc_main$d = {
|
||
__name: "map",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const isRuler = vue.ref(false);
|
||
const isTarget = vue.ref(false);
|
||
const targetIndex = vue.ref(-1);
|
||
const institution = vue.ref([
|
||
{
|
||
name: "护理单元01",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元02",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元03",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元04",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元05",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元06",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元07",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元08",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元09",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元10",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元11",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元12",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
},
|
||
{
|
||
name: "护理单元13",
|
||
width: "30",
|
||
height: "30",
|
||
top: "20",
|
||
left: "0"
|
||
}
|
||
]);
|
||
const jumpToPro = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/protocol"
|
||
});
|
||
};
|
||
const __returned__ = { isRuler, isTarget, targetIndex, institution, jumpToPro, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "select",
|
||
onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
||
}, ["stop"]))
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "select-left",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $setup.isRuler = true),
|
||
style: vue.normalizeStyle(!$setup.isRuler ? { color: `black`, backgroundColor: `#fff` } : {})
|
||
},
|
||
" 列表 ",
|
||
4
|
||
/* STYLE */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "select-right",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.isRuler = false),
|
||
style: vue.normalizeStyle($setup.isRuler ? { color: `black`, backgroundColor: `#fff` } : {})
|
||
},
|
||
" 地图 ",
|
||
4
|
||
/* STYLE */
|
||
)
|
||
]),
|
||
vue.createCommentVNode(' <view style="height: 80rpx;background-color: #E0E2E9;"></view> '),
|
||
!$setup.isRuler ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "title-map"
|
||
}, [
|
||
vue.createElementVNode("view", { class: "right-bad" }, [
|
||
vue.createElementVNode("view", null, "北"),
|
||
vue.createElementVNode("image", {
|
||
class: "right-bad-img",
|
||
src: "https://www.focusnu.com/media/directive/index/zhinan.png"
|
||
}),
|
||
vue.createElementVNode("view", null, "南")
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "title-img",
|
||
src: "https://www.focusnu.com/media/directive/index/map.png"
|
||
})
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("view", { class: "list-father" }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.institution, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: index,
|
||
class: "card-father",
|
||
onClick: ($event) => $setup.targetIndex = index
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass($setup.targetIndex == index ? `card-target` : `card`)
|
||
},
|
||
[
|
||
vue.createElementVNode("image", {
|
||
class: "card-img",
|
||
src: $setup.targetIndex == index ? `https://www.focusnu.com/media/directive/index/jigou/bluewuzi.png` : `https://www.focusnu.com/media/directive/index/jigou/wuzi.png`
|
||
}, null, 8, ["src"]),
|
||
$setup.targetIndex == index ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "abs-father"
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "abs-img",
|
||
src: "https://www.focusnu.com/media/directive/index/jigou/bar.png"
|
||
}),
|
||
vue.createCommentVNode(' <view class="abs-dui"></view> '),
|
||
vue.createElementVNode("image", {
|
||
class: "abs-dui",
|
||
src: "https://www.focusnu.com/media/directive/index/jigou/dui.png"
|
||
})
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
],
|
||
2
|
||
/* CLASS */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "card-name" },
|
||
vue.toDisplayString(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
vue.createElementVNode("view", { class: "under-container-title" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
style: { "margin-left": "60rpx" },
|
||
class: vue.normalizeClass($setup.isTarget ? "radio-circle-target" : "radio-circle"),
|
||
onClick: _cache[3] || (_cache[3] = ($event) => $setup.isTarget = !$setup.isTarget)
|
||
},
|
||
null,
|
||
2
|
||
/* CLASS */
|
||
),
|
||
vue.createElementVNode("view", {
|
||
style: { "margin-left": "17rpx" },
|
||
class: "radio-circle-font",
|
||
onClick: _cache[4] || (_cache[4] = ($event) => $setup.isTarget = !$setup.isTarget)
|
||
}, "阅读并同意"),
|
||
vue.createElementVNode("view", {
|
||
class: "radio-circle-blue",
|
||
onClick: $setup.jumpToPro
|
||
}, " 《护理单元使用条款》 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "button-blue",
|
||
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.loginIt && _ctx.loginIt(...args))
|
||
}, " 一键登录 "),
|
||
vue.createElementVNode("view", { class: "bgc-height" })
|
||
]);
|
||
}
|
||
const PagesSelectunitMap = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-33c0aee6"], ["__file", "D:/hldy_xcx/pages/selectunit/map.vue"]]);
|
||
const _sfc_main$c = {
|
||
__name: "all",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const statusarray = ["loading", "success", "fail"];
|
||
const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限"];
|
||
const textArray = vue.reactive(["", "", "", "", "", "", "", ""]);
|
||
const headImge = vue.ref("");
|
||
const headImge0 = vue.ref("");
|
||
const nameArray0 = ["企业名称", "注册地址", "信用代码", "法人"];
|
||
const textArray0 = vue.reactive(["", "", "", "", "", "", ""]);
|
||
const nameArray1 = ["机构位置", "详细地址", "机构负责人", "机构负责人电话", "房屋性质", "建筑面积"];
|
||
const textArray1 = vue.reactive(["", "", "", "", "", ""]);
|
||
const backImge = vue.ref("");
|
||
const states = ["待提交", "审核中", "审核通过", "审核未通过"];
|
||
const fontphoto = vue.ref("");
|
||
const endphoto = vue.ref("");
|
||
const statesTarget = vue.ref(0);
|
||
const tempImagePath = vue.ref("");
|
||
function getMessage2(url2) {
|
||
uni.previewImage({
|
||
current: url2,
|
||
// 当前显示图片的链接
|
||
urls: [url2],
|
||
// 可以预览的图片列表
|
||
indicator: "default",
|
||
// 显示面板指示点,'default'|'number'|'none'
|
||
loop: true,
|
||
// 是否可循环预览
|
||
longPressActions: {
|
||
itemList: ["保存图片"],
|
||
success: (data) => {
|
||
formatAppLog("log", "at pages/addjigou/all.vue:185", "长按操作成功", data);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addjigou/all.vue:188", "长按操作失败", err);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
const next = () => {
|
||
let trans = alldata.value;
|
||
trans.id = null;
|
||
uni.setStorageSync("baddata", trans);
|
||
uni.setStorageSync("specicalid", trans.id);
|
||
uni.setStorageSync("backhuancun", {});
|
||
uni.navigateTo({
|
||
url: `/pages/addjigou/name`
|
||
});
|
||
};
|
||
function isAtLeastEightChars(str) {
|
||
return typeof str === "string" && str.length >= 12;
|
||
}
|
||
const openLook = (res) => {
|
||
if (isAtLeastEightChars(res)) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
const alldata = vue.ref("");
|
||
const contentred = vue.ref("");
|
||
const special = vue.ref(false);
|
||
onLoad((options) => {
|
||
if (options.special) {
|
||
special.value = true;
|
||
}
|
||
alldata.value = JSON.parse(options.element);
|
||
statesTarget.value = Number(alldata.value.status);
|
||
let data = alldata.value;
|
||
if (data.content) {
|
||
contentred.value = data.content;
|
||
}
|
||
textArray[0] = data.name;
|
||
textArray[1] = data.sex;
|
||
textArray[2] = data.idCard;
|
||
textArray[3] = data.national;
|
||
textArray[4] = data.birthDate;
|
||
textArray[5] = data.idCardAddress;
|
||
textArray[6] = data.issuingAuthority;
|
||
textArray[7] = `${data.startTime}-${data.endTime}`;
|
||
headImge.value = `${base_url}/sys/common/static/${data.cardZmPath}`;
|
||
backImge.value = `${base_url}/sys/common/static/${data.cardFmPath}`;
|
||
textArray0[0] = data.comName;
|
||
textArray0[1] = data.comRegisterAddress;
|
||
textArray0[2] = data.comCreditCode;
|
||
textArray0[3] = data.comLegalPerson;
|
||
headImge0.value = `${base_url}/sys/common/static/${data.comBusinessLicense}`;
|
||
textArray1[0] = (data.orgProvince_dictText || "") + (data.orgCity_dictText != null ? data.orgCity_dictText : ``) + (data.orgDistrict_dictText != null ? data.orgDistrict_dictText : ``);
|
||
textArray1[1] = data.orgAddress;
|
||
textArray1[2] = data.orgLeader;
|
||
textArray1[3] = data.orgLeaderPhone;
|
||
textArray1[4] = data.orgPropertyType;
|
||
if (data.orgBuildingArea) {
|
||
textArray1[5] = data.orgBuildingArea + "平方米";
|
||
}
|
||
});
|
||
const __returned__ = { show, content, statusarray, nameArray, textArray, headImge, headImge0, nameArray0, textArray0, nameArray1, textArray1, backImge, states, fontphoto, endphoto, statesTarget, tempImagePath, getMessage: getMessage2, next, isAtLeastEightChars, openLook, goBack, alldata, contentred, special, ref: vue.ref, reactive: vue.reactive, get onLoad() {
|
||
return onLoad;
|
||
}, get base_url() {
|
||
return base_url;
|
||
}, get getrel() {
|
||
return getrel;
|
||
}, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createCommentVNode(' <u-modal v-model="show" :content="content"></u-modal> '),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createElementVNode("image", {
|
||
class: "greenbgc",
|
||
src: "https://www.focusnu.com/media/directive/index/greenbgc.png"
|
||
}),
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "机构加盟")
|
||
])
|
||
]),
|
||
$setup.statesTarget == 3 || $setup.alldata.status == `5` || $setup.alldata.status == `3` ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "contentred"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "contentred-bgc" },
|
||
" 驳回原因:" + vue.toDisplayString($setup.contentred),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(' <view class="finish-button" @click="next" v-if="special && (alldata.modifyStatus === `0`) && alldata.ischange" >\r\n 修改信息\r\n </view> '),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "content-title",
|
||
style: vue.normalizeStyle([$setup.special ? { height: `100rpx` } : { height: `140rpx` }, { "position": "relative", "margin-bottom": "20rpx", "z-index": "999" }])
|
||
},
|
||
[
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "身份证"),
|
||
vue.createElementVNode("image", {
|
||
class: "shu-img",
|
||
src: !$setup.special ? `https://www.focusnu.com/media/directive/index/${$setup.statusarray[$setup.statesTarget - 1]}.png` : ``
|
||
}, null, 8, ["src"])
|
||
],
|
||
4
|
||
/* STYLE */
|
||
),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.getMessage($setup.headImge))
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "人像面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证人像面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.headImge ? $setup.headImge : `https://www.focusnu.com/media/directive/index/IDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.headImge ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
style: { "margin-top": "30rpx" },
|
||
onClick: _cache[2] || (_cache[2] = ($event) => $setup.getMessage($setup.backImge))
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "国徽面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证国徽面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.backImge ? $setup.backImge : `https://www.focusnu.com/media/directive/index/backIDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.backImge ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "content-title",
|
||
style: { "margin": "20rpx 0" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "确认身份证信息")
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", null, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray[index] ? $setup.textArray[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "content-title",
|
||
style: { "margin-bottom": "30rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "营业执照")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: _cache[3] || (_cache[3] = ($event) => $setup.getMessage($setup.headImge0))
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "营业执照"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传营业执照")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.headImge0 ? $setup.headImge0 : `https://www.focusnu.com/media/directive/index/zhizhao.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.headImge0 ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "content-title",
|
||
style: { "margin-top": "30rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "企业信息")
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", null, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray0, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray0[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(' <view class="one-right">{{textArray[index] ? textArray[index] : "自动获取" }}</view> '),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray0[index] ? $setup.textArray0[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "机构信息")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-content",
|
||
style: { "margin-top": "0rpx" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray1, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray1[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray1[index] ? $setup.textArray1[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { style: { "display": "flex", "width": "100%", "margin-top": "40rpx" } }, [
|
||
vue.createCommentVNode(' <view class="finish-button" v-if="alldata.status!=3 && alldata.status!=0" >\r\n 进入机构端\r\n </view> ')
|
||
])
|
||
]);
|
||
}
|
||
const PagesAddjigouAll = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-9afbabf9"], ["__file", "D:/hldy_xcx/pages/addjigou/all.vue"]]);
|
||
const _sfc_main$b = {
|
||
name: "u-mask",
|
||
emits: ["click"],
|
||
props: {
|
||
// 是否显示遮罩
|
||
show: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 层级z-index
|
||
zIndex: {
|
||
type: [Number, String],
|
||
default: ""
|
||
},
|
||
// 用户自定义样式
|
||
customStyle: {
|
||
type: Object,
|
||
default() {
|
||
return {};
|
||
}
|
||
},
|
||
// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
|
||
zoom: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 遮罩的过渡时间,单位为ms
|
||
duration: {
|
||
type: [Number, String],
|
||
default: 300
|
||
},
|
||
// 是否可以通过点击遮罩进行关闭
|
||
maskClickAble: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 遮罩的模糊度
|
||
blur: {
|
||
type: [Number, String],
|
||
default: 0
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
zoomStyle: {
|
||
transform: ""
|
||
},
|
||
scale: "scale(1.2, 1.2)"
|
||
};
|
||
},
|
||
watch: {
|
||
show(n) {
|
||
if (n && this.zoom) {
|
||
this.zoomStyle.transform = "scale(1, 1)";
|
||
} else if (!n && this.zoom) {
|
||
this.zoomStyle.transform = this.scale;
|
||
}
|
||
}
|
||
},
|
||
computed: {
|
||
maskStyle() {
|
||
let style = {};
|
||
style.backgroundColor = "rgba(0, 0, 0, 0.6)";
|
||
if (this.show)
|
||
style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask;
|
||
else
|
||
style.zIndex = -1;
|
||
style.transition = `all ${this.duration / 1e3}s ease-in-out`;
|
||
if (Object.keys(this.customStyle).length)
|
||
style = {
|
||
...style,
|
||
...this.customStyle
|
||
};
|
||
return style;
|
||
},
|
||
filterStyle() {
|
||
let { blur } = this;
|
||
let style = {};
|
||
if (blur) {
|
||
style.backdropFilter = `blur(${blur}rpx)`;
|
||
}
|
||
return style;
|
||
}
|
||
},
|
||
methods: {
|
||
click() {
|
||
if (!this.maskClickAble)
|
||
return;
|
||
this.$emit("click");
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass(["u-mask", {
|
||
"u-mask-zoom": $props.zoom,
|
||
"u-mask-show": $props.show
|
||
}]),
|
||
"hover-stop-propagation": "",
|
||
style: vue.normalizeStyle([$options.maskStyle, $data.zoomStyle, $options.filterStyle]),
|
||
onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args)),
|
||
onTouchmove: vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])
|
||
},
|
||
[
|
||
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
||
],
|
||
38
|
||
/* CLASS, STYLE, NEED_HYDRATION */
|
||
);
|
||
}
|
||
const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-b3b508a8"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-mask/u-mask.vue"]]);
|
||
const _sfc_main$a = {
|
||
name: "u-icon",
|
||
emits: ["click", "touchstart"],
|
||
props: {
|
||
// 图标类名
|
||
name: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
// 图标颜色,可接受主题色
|
||
color: {
|
||
type: [String, null],
|
||
default: ""
|
||
},
|
||
// 字体大小,单位rpx
|
||
size: {
|
||
type: [Number, String],
|
||
default: "inherit"
|
||
},
|
||
// 是否显示粗体
|
||
bold: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
||
index: {
|
||
type: [Number, String],
|
||
default: ""
|
||
},
|
||
// 触摸图标时的类名
|
||
hoverClass: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
// 自定义扩展前缀,方便用户扩展自己的图标库
|
||
customPrefix: {
|
||
type: String,
|
||
default: "uicon"
|
||
},
|
||
// 图标右边或者下面的文字
|
||
label: {
|
||
type: [String, Number],
|
||
default: ""
|
||
},
|
||
// label的位置,只能右边或者下边
|
||
labelPos: {
|
||
type: String,
|
||
default: "right"
|
||
},
|
||
// label的大小
|
||
labelSize: {
|
||
type: [String, Number],
|
||
default: "28"
|
||
},
|
||
// label的颜色
|
||
labelColor: {
|
||
type: String,
|
||
default: "#606266"
|
||
},
|
||
// label与图标的距离(横向排列)
|
||
marginLeft: {
|
||
type: [String, Number],
|
||
default: "6"
|
||
},
|
||
// label与图标的距离(竖向排列)
|
||
marginTop: {
|
||
type: [String, Number],
|
||
default: "6"
|
||
},
|
||
// label与图标的距离(竖向排列)
|
||
marginRight: {
|
||
type: [String, Number],
|
||
default: "6"
|
||
},
|
||
// label与图标的距离(竖向排列)
|
||
marginBottom: {
|
||
type: [String, Number],
|
||
default: "6"
|
||
},
|
||
// 图片的mode
|
||
imgMode: {
|
||
type: String,
|
||
default: "widthFix"
|
||
},
|
||
// 自定义样式
|
||
customStyle: {
|
||
type: Object,
|
||
default() {
|
||
return {};
|
||
}
|
||
},
|
||
// 用于显示图片小图标时,图片的宽度
|
||
width: {
|
||
type: [String, Number],
|
||
default: ""
|
||
},
|
||
// 用于显示图片小图标时,图片的高度
|
||
height: {
|
||
type: [String, Number],
|
||
default: ""
|
||
},
|
||
// 用于解决某些情况下,让图标垂直居中的用途
|
||
top: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
// 是否为DecimalIcon
|
||
showDecimalIcon: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 背景颜色,可接受主题色,仅Decimal时有效
|
||
inactiveColor: {
|
||
type: String,
|
||
default: "#ececec"
|
||
},
|
||
// 显示的百分比,仅Decimal时有效
|
||
percent: {
|
||
type: [Number, String],
|
||
default: "50"
|
||
}
|
||
},
|
||
computed: {
|
||
customClass() {
|
||
let classes = [];
|
||
let { customPrefix, name } = this;
|
||
let index = name.indexOf("-icon-");
|
||
if (index > -1) {
|
||
customPrefix = name.substring(0, index + 5);
|
||
classes.push(name);
|
||
} else {
|
||
classes.push(`${customPrefix}-${name}`);
|
||
}
|
||
if (customPrefix === "uicon") {
|
||
classes.push("u-iconfont");
|
||
} else {
|
||
classes.push(customPrefix);
|
||
}
|
||
if (this.showDecimalIcon && this.inactiveColor && this.$u.config.type.includes(this.inactiveColor)) {
|
||
classes.push("u-icon__icon--" + this.inactiveColor);
|
||
} else if (this.color && this.$u.config.type.includes(this.color))
|
||
classes.push("u-icon__icon--" + this.color);
|
||
return classes;
|
||
},
|
||
iconStyle() {
|
||
let style = {};
|
||
style = {
|
||
fontSize: this.size == "inherit" ? "inherit" : this.$u.addUnit(this.size),
|
||
fontWeight: this.bold ? "bold" : "normal",
|
||
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
||
top: this.$u.addUnit(this.top)
|
||
};
|
||
if (this.showDecimalIcon && this.inactiveColor && !this.$u.config.type.includes(this.inactiveColor)) {
|
||
style.color = this.inactiveColor;
|
||
} else if (this.color && !this.$u.config.type.includes(this.color))
|
||
style.color = this.color;
|
||
return style;
|
||
},
|
||
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
|
||
isImg() {
|
||
return this.name.indexOf("/") !== -1;
|
||
},
|
||
imgStyle() {
|
||
let style = {};
|
||
style.width = this.width ? this.$u.addUnit(this.width) : this.$u.addUnit(this.size);
|
||
style.height = this.height ? this.$u.addUnit(this.height) : this.$u.addUnit(this.size);
|
||
return style;
|
||
},
|
||
decimalIconStyle() {
|
||
let style = {};
|
||
style = {
|
||
fontSize: this.size == "inherit" ? "inherit" : this.$u.addUnit(this.size),
|
||
fontWeight: this.bold ? "bold" : "normal",
|
||
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
||
top: this.$u.addUnit(this.top),
|
||
width: this.percent + "%"
|
||
};
|
||
if (this.color && !this.$u.config.type.includes(this.color))
|
||
style.color = this.color;
|
||
return style;
|
||
},
|
||
decimalIconClass() {
|
||
let classes = [];
|
||
classes.push(this.customPrefix + "-" + this.name);
|
||
if (this.customPrefix == "uicon") {
|
||
classes.push("u-iconfont");
|
||
} else {
|
||
classes.push(this.customPrefix);
|
||
}
|
||
if (this.color && this.$u.config.type.includes(this.color))
|
||
classes.push("u-icon__icon--" + this.color);
|
||
else
|
||
classes.push("u-icon__icon--primary");
|
||
return classes;
|
||
}
|
||
},
|
||
methods: {
|
||
click() {
|
||
this.$emit("click", this.index);
|
||
},
|
||
touchstart() {
|
||
this.$emit("touchstart", this.index);
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
style: vue.normalizeStyle([$props.customStyle]),
|
||
class: vue.normalizeClass(["u-icon", ["u-icon--" + $props.labelPos]]),
|
||
onClick: _cache[1] || (_cache[1] = (...args) => $options.click && $options.click(...args))
|
||
},
|
||
[
|
||
$options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
class: "u-icon__img",
|
||
src: $props.name,
|
||
mode: $props.imgMode,
|
||
style: vue.normalizeStyle([$options.imgStyle])
|
||
}, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: vue.normalizeClass(["u-icon__icon", $options.customClass]),
|
||
style: vue.normalizeStyle([$options.iconStyle]),
|
||
"hover-class": $props.hoverClass,
|
||
onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.touchstart && $options.touchstart(...args))
|
||
}, [
|
||
$props.showDecimalIcon ? (vue.openBlock(), vue.createElementBlock("text", {
|
||
key: 0,
|
||
style: vue.normalizeStyle([$options.decimalIconStyle]),
|
||
class: vue.normalizeClass([$options.decimalIconClass, "u-icon__decimal"]),
|
||
"hover-class": $props.hoverClass
|
||
}, null, 14, ["hover-class"])) : vue.createCommentVNode("v-if", true)
|
||
], 46, ["hover-class"])),
|
||
vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示,微信小程序不传值默认为null,故需要增加null的判断 '),
|
||
$props.label !== "" && $props.label !== null ? (vue.openBlock(), vue.createElementBlock(
|
||
"text",
|
||
{
|
||
key: 2,
|
||
class: "u-icon__label",
|
||
style: vue.normalizeStyle({
|
||
color: $props.labelColor,
|
||
fontSize: _ctx.$u.addUnit($props.labelSize),
|
||
marginLeft: $props.labelPos == "right" ? _ctx.$u.addUnit($props.marginLeft) : 0,
|
||
marginTop: $props.labelPos == "bottom" ? _ctx.$u.addUnit($props.marginTop) : 0,
|
||
marginRight: $props.labelPos == "left" ? _ctx.$u.addUnit($props.marginRight) : 0,
|
||
marginBottom: $props.labelPos == "top" ? _ctx.$u.addUnit($props.marginBottom) : 0
|
||
})
|
||
},
|
||
vue.toDisplayString($props.label),
|
||
5
|
||
/* TEXT, STYLE */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
],
|
||
6
|
||
/* CLASS, STYLE */
|
||
);
|
||
}
|
||
const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-5de67484"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-icon/u-icon.vue"]]);
|
||
const _sfc_main$9 = {
|
||
name: "u-popup",
|
||
emits: ["update:modelValue", "input", "open", "close"],
|
||
props: {
|
||
value: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
/**
|
||
* 显示状态
|
||
*/
|
||
show: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
/**
|
||
* 弹出方向,left|right|top|bottom|center
|
||
*/
|
||
mode: {
|
||
type: String,
|
||
default: "left"
|
||
},
|
||
/**
|
||
* 是否显示遮罩
|
||
*/
|
||
mask: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto"
|
||
// 或者百分比"50%",表示由内容撑开高度或者宽度
|
||
length: {
|
||
type: [Number, String],
|
||
default: "auto"
|
||
},
|
||
// 是否开启缩放动画,只在mode=center时有效
|
||
zoom: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
|
||
safeAreaInsetBottom: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 是否可以通过点击遮罩进行关闭
|
||
maskCloseAble: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 用户自定义样式
|
||
customStyle: {
|
||
type: Object,
|
||
default() {
|
||
return {};
|
||
}
|
||
},
|
||
// 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件
|
||
// 对v-model双向绑定多层调用造成报错不能修改props值的问题
|
||
popup: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 显示显示弹窗的圆角,单位rpx
|
||
borderRadius: {
|
||
type: [Number, String],
|
||
default: 0
|
||
},
|
||
zIndex: {
|
||
type: [Number, String],
|
||
default: ""
|
||
},
|
||
// 是否显示关闭图标
|
||
closeable: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 关闭图标的名称,只能uView的内置图标
|
||
closeIcon: {
|
||
type: String,
|
||
default: "close"
|
||
},
|
||
// 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
|
||
closeIconPos: {
|
||
type: String,
|
||
default: "top-right"
|
||
},
|
||
// 关闭图标的颜色
|
||
closeIconColor: {
|
||
type: String,
|
||
default: "#909399"
|
||
},
|
||
// 关闭图标的大小,单位rpx
|
||
closeIconSize: {
|
||
type: [String, Number],
|
||
default: "30"
|
||
},
|
||
// 宽度,只对左,右,中部弹出时起作用,单位rpx,或者"auto"
|
||
// 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数
|
||
width: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
// 高度,只对上,下,中部弹出时起作用,单位rpx,或者"auto"
|
||
// 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数
|
||
height: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
// 给一个负的margin-top,往上偏移,避免和键盘重合的情况,仅在mode=center时有效
|
||
negativeTop: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
// 遮罩的样式,一般用于修改遮罩的透明度
|
||
maskCustomStyle: {
|
||
type: Object,
|
||
default() {
|
||
return {};
|
||
}
|
||
},
|
||
// 遮罩打开或收起的动画过渡时间,单位ms
|
||
duration: {
|
||
type: [String, Number],
|
||
default: 250
|
||
},
|
||
// 遮罩的模糊度
|
||
blur: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
backgroundColor: {
|
||
type: String,
|
||
default: "#ffffff"
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
visibleSync: false,
|
||
showDrawer: false,
|
||
timer: null,
|
||
closeFromInner: false
|
||
// value的值改变,是发生在内部还是外部
|
||
};
|
||
},
|
||
computed: {
|
||
valueCom() {
|
||
return this.modelValue;
|
||
},
|
||
// 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)
|
||
style() {
|
||
let style = {};
|
||
if (this.mode == "left" || this.mode == "right") {
|
||
style = {
|
||
width: this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length),
|
||
height: "100%",
|
||
transform: `translate3D(${this.mode == "left" ? "-100%" : "100%"},0px,0px)`
|
||
};
|
||
} else if (this.mode == "top" || this.mode == "bottom") {
|
||
style = {
|
||
width: "100%",
|
||
height: this.height ? this.getUnitValue(this.height) : this.getUnitValue(this.length),
|
||
transform: `translate3D(0px,${this.mode == "top" ? "-100%" : "100%"},0px)`
|
||
};
|
||
}
|
||
style.zIndex = this.uZindex;
|
||
if (this.borderRadius) {
|
||
switch (this.mode) {
|
||
case "left":
|
||
style.borderRadius = `0 ${this.borderRadius}rpx ${this.borderRadius}rpx 0`;
|
||
break;
|
||
case "top":
|
||
style.borderRadius = `0 0 ${this.borderRadius}rpx ${this.borderRadius}rpx`;
|
||
break;
|
||
case "right":
|
||
style.borderRadius = `${this.borderRadius}rpx 0 0 ${this.borderRadius}rpx`;
|
||
break;
|
||
case "bottom":
|
||
style.borderRadius = `${this.borderRadius}rpx ${this.borderRadius}rpx 0 0`;
|
||
break;
|
||
}
|
||
style.overflow = "hidden";
|
||
}
|
||
if (this.duration)
|
||
style.transition = `all ${this.duration / 1e3}s linear`;
|
||
return style;
|
||
},
|
||
// 中部弹窗的特有样式
|
||
centerStyle() {
|
||
let style = {};
|
||
style.width = this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length);
|
||
style.height = this.height ? this.getUnitValue(this.height) : "auto";
|
||
style.zIndex = this.uZindex;
|
||
style.marginTop = `-${this.$u.addUnit(this.negativeTop)}`;
|
||
if (this.borderRadius) {
|
||
style.borderRadius = `${this.borderRadius}rpx`;
|
||
style.overflow = "hidden";
|
||
}
|
||
return style;
|
||
},
|
||
// 计算整理后的z-index值
|
||
uZindex() {
|
||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
||
}
|
||
},
|
||
watch: {
|
||
valueCom: {
|
||
handler(val) {
|
||
if (val) {
|
||
this.open();
|
||
} else if (!this.closeFromInner) {
|
||
this.close();
|
||
}
|
||
this.closeFromInner = false;
|
||
}
|
||
}
|
||
},
|
||
mounted() {
|
||
if (this.valueCom) {
|
||
this.open();
|
||
}
|
||
},
|
||
methods: {
|
||
// 判断传入的值,是否带有单位,如果没有,就默认用rpx单位
|
||
getUnitValue(val) {
|
||
if (/(%|px|rpx|auto)$/.test(val))
|
||
return val;
|
||
else
|
||
return val + "rpx";
|
||
},
|
||
// 遮罩被点击
|
||
maskClick() {
|
||
this.close();
|
||
},
|
||
close() {
|
||
this.closeFromInner = true;
|
||
this.change("showDrawer", "visibleSync", false);
|
||
},
|
||
// 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗
|
||
// 让其只在mode=center时起作用
|
||
modeCenterClose(mode) {
|
||
if (mode != "center" || !this.maskCloseAble)
|
||
return;
|
||
this.close();
|
||
},
|
||
open() {
|
||
this.change("visibleSync", "showDrawer", true);
|
||
},
|
||
// 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件
|
||
// 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用
|
||
change(param1, param2, status) {
|
||
if (this.popup == true) {
|
||
this.$emit("input", status);
|
||
this.$emit("update:modelValue", status);
|
||
}
|
||
this[param1] = status;
|
||
if (status) {
|
||
this.$nextTick(() => {
|
||
this[param2] = status;
|
||
this.$emit(status ? "open" : "close");
|
||
});
|
||
} else {
|
||
this.timer = setTimeout(() => {
|
||
this[param2] = status;
|
||
this.$emit(status ? "open" : "close");
|
||
}, this.duration);
|
||
}
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_mask = resolveEasycom(vue.resolveDynamicComponent("u-mask"), __easycom_0$2);
|
||
const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_1$1);
|
||
return $data.visibleSync ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
style: vue.normalizeStyle([$props.customStyle, {
|
||
zIndex: $options.uZindex - 1,
|
||
"--bgcolor": $props.backgroundColor
|
||
}]),
|
||
class: "u-drawer",
|
||
"hover-stop-propagation": ""
|
||
},
|
||
[
|
||
vue.createVNode(_component_u_mask, {
|
||
blur: $props.blur,
|
||
duration: $props.duration,
|
||
"custom-style": $props.maskCustomStyle,
|
||
maskClickAble: $props.maskCloseAble,
|
||
"z-index": $options.uZindex - 2,
|
||
show: $data.showDrawer && $props.mask,
|
||
onClick: $options.maskClick
|
||
}, null, 8, ["blur", "duration", "custom-style", "maskClickAble", "z-index", "show", "onClick"]),
|
||
vue.createCommentVNode(" 移除 @tap.stop.prevent "),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: vue.normalizeClass(["u-drawer-content", [
|
||
$props.safeAreaInsetBottom ? "safe-area-inset-bottom" : "",
|
||
"u-drawer-" + $props.mode,
|
||
$data.showDrawer ? "u-drawer-content-visible" : "",
|
||
$props.zoom && $props.mode == "center" ? "u-animation-zoom" : ""
|
||
]]),
|
||
onClick: _cache[3] || (_cache[3] = ($event) => $options.modeCenterClose($props.mode)),
|
||
onTouchmove: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])),
|
||
style: vue.normalizeStyle([$options.style])
|
||
},
|
||
[
|
||
$props.mode == "center" ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "u-mode-center-box",
|
||
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])),
|
||
onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])),
|
||
style: vue.normalizeStyle([$options.centerStyle])
|
||
},
|
||
[
|
||
$props.closeable ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
|
||
key: 0,
|
||
onClick: $options.close,
|
||
class: vue.normalizeClass(["u-close", ["u-close--" + $props.closeIconPos]]),
|
||
name: $props.closeIcon,
|
||
color: $props.closeIconColor,
|
||
size: $props.closeIconSize
|
||
}, null, 8, ["onClick", "class", "name", "color", "size"])) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("scroll-view", {
|
||
class: "u-drawer__scroll-view",
|
||
"scroll-y": "true"
|
||
}, [
|
||
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
||
])
|
||
],
|
||
36
|
||
/* STYLE, NEED_HYDRATION */
|
||
)) : (vue.openBlock(), vue.createElementBlock("scroll-view", {
|
||
key: 1,
|
||
class: "u-drawer__scroll-view",
|
||
"scroll-y": "true"
|
||
}, [
|
||
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
||
])),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args)),
|
||
class: vue.normalizeClass(["u-close", ["u-close--" + $props.closeIconPos]])
|
||
},
|
||
[
|
||
$props.mode != "center" && $props.closeable ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
|
||
key: 0,
|
||
name: $props.closeIcon,
|
||
color: $props.closeIconColor,
|
||
size: $props.closeIconSize
|
||
}, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true)
|
||
],
|
||
2
|
||
/* CLASS */
|
||
)
|
||
],
|
||
38
|
||
/* CLASS, STYLE, NEED_HYDRATION */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true);
|
||
}
|
||
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-c93a8fd2"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue"]]);
|
||
const _sfc_main$8 = {
|
||
emits: ["update:modelValue", "input", "confirm"],
|
||
props: {
|
||
// 通过双向绑定控制组件的弹出与收起
|
||
value: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 列数据
|
||
list: {
|
||
type: Array,
|
||
default() {
|
||
return [];
|
||
}
|
||
},
|
||
// 是否显示边框
|
||
border: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// "取消"按钮的颜色
|
||
cancelColor: {
|
||
type: String,
|
||
default: "#606266"
|
||
},
|
||
// "确定"按钮的颜色
|
||
confirmColor: {
|
||
type: String,
|
||
default: "#2979ff"
|
||
},
|
||
// 弹出的z-index值
|
||
zIndex: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
safeAreaInsetBottom: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 是否允许通过点击遮罩关闭Picker
|
||
maskCloseAble: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 提供的默认选中的下标
|
||
defaultValue: {
|
||
type: Array,
|
||
default() {
|
||
return [0];
|
||
}
|
||
},
|
||
// 模式选择,single-column-单列,mutil-column-多列,mutil-column-auto-多列联动
|
||
mode: {
|
||
type: String,
|
||
default: "single-column"
|
||
},
|
||
// 自定义value属性名
|
||
valueName: {
|
||
type: String,
|
||
default: "value"
|
||
},
|
||
// 自定义label属性名
|
||
labelName: {
|
||
type: String,
|
||
default: "label"
|
||
},
|
||
// 自定义多列联动模式的children属性名
|
||
childName: {
|
||
type: String,
|
||
default: "children"
|
||
},
|
||
// 顶部标题
|
||
title: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
// 取消按钮的文字
|
||
cancelText: {
|
||
type: String,
|
||
default: "取消"
|
||
},
|
||
// 确认按钮的文字
|
||
confirmText: {
|
||
type: String,
|
||
default: "确认"
|
||
},
|
||
// 遮罩的模糊度
|
||
blur: {
|
||
type: [Number, String],
|
||
default: 0
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
popupValue: false,
|
||
// 用于列改变时,保存当前的索引,下一次变化时比较得出是哪一列发生了变化
|
||
defaultSelector: [0],
|
||
// picker-view的数据
|
||
columnData: [],
|
||
// 每次队列发生变化时,保存选择的结果
|
||
selectValue: [],
|
||
// 上一次列变化时的index
|
||
lastSelectIndex: [],
|
||
// 列数
|
||
columnNum: 0,
|
||
// 列是否还在滑动中,微信小程序如果在滑动中就点确定,结果可能不准确
|
||
moving: false,
|
||
reset: false
|
||
};
|
||
},
|
||
watch: {
|
||
// 在select弹起的时候,重新初始化所有数据
|
||
valueCom: {
|
||
immediate: true,
|
||
handler(val) {
|
||
if (val) {
|
||
this.reset = true;
|
||
setTimeout(() => this.init(), 10);
|
||
}
|
||
this.popupValue = val;
|
||
}
|
||
}
|
||
},
|
||
computed: {
|
||
uZIndex() {
|
||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
||
},
|
||
valueCom() {
|
||
return this.modelValue;
|
||
},
|
||
// 用来兼容小程序、App、h5
|
||
showColumnCom() {
|
||
return true;
|
||
}
|
||
},
|
||
methods: {
|
||
// 标识滑动开始,只有微信小程序才有这样的事件
|
||
pickstart() {
|
||
},
|
||
// 标识滑动结束
|
||
pickend() {
|
||
},
|
||
init() {
|
||
this.reset = false;
|
||
this.setColumnNum();
|
||
this.setDefaultSelector();
|
||
this.setColumnData();
|
||
this.setSelectValue();
|
||
},
|
||
// 获取默认选中列下标
|
||
setDefaultSelector() {
|
||
this.defaultSelector = this.defaultValue.length == this.columnNum ? this.defaultValue : Array(this.columnNum).fill(0);
|
||
this.lastSelectIndex = this.$u.deepClone(this.defaultSelector);
|
||
},
|
||
// 计算列数
|
||
setColumnNum() {
|
||
if (this.mode == "single-column")
|
||
this.columnNum = 1;
|
||
else if (this.mode == "mutil-column")
|
||
this.columnNum = this.list.length;
|
||
else if (this.mode == "mutil-column-auto") {
|
||
let num = 1;
|
||
let column = this.list;
|
||
while (column[0][this.childName]) {
|
||
column = column[0] ? column[0][this.childName] : {};
|
||
num++;
|
||
}
|
||
this.columnNum = num;
|
||
}
|
||
},
|
||
// 获取需要展示在picker中的列数据
|
||
setColumnData() {
|
||
let data = [];
|
||
this.selectValue = [];
|
||
if (this.mode == "mutil-column-auto") {
|
||
let column = this.list[this.defaultSelector.length ? this.defaultSelector[0] : 0];
|
||
for (let i = 0; i < this.columnNum; i++) {
|
||
if (i == 0) {
|
||
data[i] = this.list;
|
||
column = column[this.childName];
|
||
} else {
|
||
data[i] = column;
|
||
column = column[this.defaultSelector[i]][this.childName];
|
||
}
|
||
}
|
||
} else if (this.mode == "single-column") {
|
||
data[0] = this.list;
|
||
} else {
|
||
data = this.list;
|
||
}
|
||
this.columnData = data;
|
||
},
|
||
// 获取默认选中的值,如果没有设置defaultValue,就默认选中每列的第一个
|
||
setSelectValue() {
|
||
let tmp = null;
|
||
for (let i = 0; i < this.columnNum; i++) {
|
||
tmp = this.columnData[i][this.defaultSelector[i]];
|
||
let data = {
|
||
index: this.defaultSelector[i],
|
||
value: tmp ? tmp[this.valueName] : null,
|
||
label: tmp ? tmp[this.labelName] : null
|
||
};
|
||
if (tmp && tmp.extra !== void 0)
|
||
data.extra = tmp.extra;
|
||
this.selectValue.push(data);
|
||
}
|
||
},
|
||
// 列选项
|
||
columnChange(e) {
|
||
let index = null;
|
||
let columnIndex = e.detail.value;
|
||
this.selectValue = [];
|
||
if (this.mode == "mutil-column-auto") {
|
||
this.lastSelectIndex.map((val, idx) => {
|
||
if (val != columnIndex[idx])
|
||
index = idx;
|
||
});
|
||
this.defaultSelector = columnIndex;
|
||
for (let i = index + 1; i < this.columnNum; i++) {
|
||
this.columnData[i] = this.columnData[i - 1][i - 1 == index ? columnIndex[index] : 0][this.childName];
|
||
this.defaultSelector[i] = 0;
|
||
}
|
||
columnIndex.map((item, index2) => {
|
||
let data = this.columnData[index2][columnIndex[index2]];
|
||
let tmp = {
|
||
index: columnIndex[index2],
|
||
value: data ? data[this.valueName] : null,
|
||
label: data ? data[this.labelName] : null
|
||
};
|
||
if (data && data.extra !== void 0)
|
||
tmp.extra = data.extra;
|
||
this.selectValue.push(tmp);
|
||
});
|
||
this.lastSelectIndex = columnIndex;
|
||
} else if (this.mode == "single-column") {
|
||
let data = this.columnData[0][columnIndex[0]];
|
||
let tmp = {
|
||
index: columnIndex[0],
|
||
value: data ? data[this.valueName] : null,
|
||
label: data ? data[this.labelName] : null
|
||
};
|
||
if (data && data.extra !== void 0)
|
||
tmp.extra = data.extra;
|
||
this.selectValue.push(tmp);
|
||
this.lastSelectIndex = columnIndex;
|
||
} else if (this.mode == "mutil-column") {
|
||
columnIndex.map((item, index2) => {
|
||
let data = this.columnData[index2][columnIndex[index2]];
|
||
let tmp = {
|
||
index: columnIndex[index2],
|
||
value: data ? data[this.valueName] : null,
|
||
label: data ? data[this.labelName] : null
|
||
};
|
||
if (data && data.extra !== void 0)
|
||
tmp.extra = data.extra;
|
||
this.selectValue.push(tmp);
|
||
});
|
||
this.lastSelectIndex = columnIndex;
|
||
}
|
||
},
|
||
close() {
|
||
this.$emit("input", false);
|
||
this.$emit("update:modelValue", false);
|
||
},
|
||
// 点击确定或者取消
|
||
getResult(event = null) {
|
||
if (event)
|
||
this.$emit(event, this.selectValue);
|
||
this.close();
|
||
},
|
||
selectHandler() {
|
||
this.$emit("click");
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_0$1);
|
||
return vue.openBlock(), vue.createElementBlock("view", { class: "u-select" }, [
|
||
vue.createCommentVNode(` <view class="u-select__action" :class="{\r
|
||
'u-select--border': border\r
|
||
}" @tap.stop="selectHandler">\r
|
||
<view class="u-select__action__icon" :class="{\r
|
||
'u-select__action__icon--reverse': value == true\r
|
||
}">\r
|
||
<u-icon name="arrow-down-fill" size="26" color="#c0c4cc"></u-icon>\r
|
||
</view>\r
|
||
</view> `),
|
||
vue.createVNode(_component_u_popup, {
|
||
blur: $props.blur,
|
||
maskCloseAble: $props.maskCloseAble,
|
||
mode: "bottom",
|
||
popup: false,
|
||
modelValue: $data.popupValue,
|
||
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.popupValue = $event),
|
||
length: "auto",
|
||
safeAreaInsetBottom: $props.safeAreaInsetBottom,
|
||
onClose: $options.close,
|
||
"z-index": $options.uZIndex
|
||
}, {
|
||
default: vue.withCtx(() => [
|
||
vue.createElementVNode("view", { class: "u-select" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "u-select__header",
|
||
onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"]))
|
||
},
|
||
[
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "u-select__header__cancel u-select__header__btn",
|
||
style: vue.normalizeStyle({ color: $props.cancelColor }),
|
||
"hover-class": "u-hover-class",
|
||
"hover-stay-time": 150,
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $options.getResult("cancel"))
|
||
},
|
||
vue.toDisplayString($props.cancelText),
|
||
5
|
||
/* TEXT, STYLE */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "u-select__header__title" },
|
||
vue.toDisplayString($props.title),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "u-select__header__confirm u-select__header__btn",
|
||
style: vue.normalizeStyle({ color: $data.moving ? $props.cancelColor : $props.confirmColor }),
|
||
"hover-class": "u-hover-class",
|
||
"hover-stay-time": 150,
|
||
onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
||
}, ["stop"])),
|
||
onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.getResult("confirm"), ["stop"]))
|
||
},
|
||
vue.toDisplayString($props.confirmText),
|
||
37
|
||
/* TEXT, STYLE, NEED_HYDRATION */
|
||
)
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
),
|
||
vue.createElementVNode("view", { class: "u-select__body" }, [
|
||
vue.createElementVNode("picker-view", {
|
||
onChange: _cache[4] || (_cache[4] = (...args) => $options.columnChange && $options.columnChange(...args)),
|
||
class: "u-select__body__picker-view",
|
||
value: $data.defaultSelector,
|
||
onPickstart: _cache[5] || (_cache[5] = (...args) => $options.pickstart && $options.pickstart(...args)),
|
||
onPickend: _cache[6] || (_cache[6] = (...args) => $options.pickend && $options.pickend(...args))
|
||
}, [
|
||
$options.showColumnCom ? (vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
{ key: 0 },
|
||
vue.renderList($data.columnData, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("picker-view-column", { key: index }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList(item, (item1, index1) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
class: "u-select__body__picker-view__item",
|
||
key: index1
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "u-line-1" },
|
||
vue.toDisplayString(item1[$props.labelName]),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
], 40, ["value"])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["blur", "maskCloseAble", "modelValue", "safeAreaInsetBottom", "onClose", "z-index"])
|
||
]);
|
||
}
|
||
const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-2ab5fcb0"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-select/u-select.vue"]]);
|
||
const _sfc_main$7 = {
|
||
__name: "where",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const address = vue.ref([]);
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const jigouweizhi = vue.ref("");
|
||
const popupshow = vue.ref(false);
|
||
const list = vue.ref([]);
|
||
const showselect = vue.ref(false);
|
||
const showlist = vue.reactive(
|
||
// [{
|
||
// value: `租赁`,
|
||
// },
|
||
// {
|
||
// value: `自由产权`,
|
||
// },
|
||
// {
|
||
// value: `合作使用`,
|
||
// } ,{
|
||
// value: `其它`,
|
||
// }
|
||
// ]
|
||
[
|
||
{
|
||
value: 1,
|
||
label: "租赁"
|
||
},
|
||
{
|
||
value: 2,
|
||
label: "自由产权"
|
||
},
|
||
{
|
||
value: 3,
|
||
label: "合作使用"
|
||
},
|
||
{
|
||
value: 4,
|
||
label: "其它"
|
||
}
|
||
]
|
||
);
|
||
function onSelect1(arr) {
|
||
form.orgPropertyType = arr[0].label;
|
||
}
|
||
const form = vue.reactive({
|
||
orgLeader: "",
|
||
orgLeaderPhone: "",
|
||
orgAddress: "",
|
||
orgPropertyType: "",
|
||
orgBuildingArea: "",
|
||
// orgAddress: "",
|
||
orgCoordinateLo: "",
|
||
orgCoordinateLa: "",
|
||
id: uni.getStorageSync("specicalid") || "",
|
||
tel: uni.getStorageSync("tel"),
|
||
status: "1"
|
||
});
|
||
const tempImagePath = vue.ref("");
|
||
const headImge = vue.ref("");
|
||
const backImge = vue.ref("");
|
||
function isAtLeastEightChars(str) {
|
||
return typeof str === "string" && str.length >= 12;
|
||
}
|
||
const openLook = (res) => {
|
||
if (isAtLeastEightChars(res)) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
function takeFirst(arr, num) {
|
||
const count = Math.max(0, Math.min(num, arr.length));
|
||
return arr.slice(0, count);
|
||
}
|
||
const deleteUP = (index) => {
|
||
address.value = takeFirst(address.value, index);
|
||
if (index) {
|
||
list.value = [];
|
||
getdate(address.value[0].id).then((res) => {
|
||
list.value = dedupeFirstLetter(res.result);
|
||
});
|
||
} else {
|
||
list.value = [];
|
||
getdate(`xzqhdm`).then((res) => {
|
||
list.value = dedupeFirstLetter(res.result);
|
||
});
|
||
}
|
||
formatAppLog("log", "at pages/addjigou/where.vue:244", "删除了", index);
|
||
};
|
||
function isValid11DigitNumber(val) {
|
||
return /^(\d{11})$/.test(val);
|
||
}
|
||
const next = () => {
|
||
if (!form.address) {
|
||
uni.showToast({
|
||
title: "请选择机构位置",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!form.orgAddress) {
|
||
uni.showToast({
|
||
title: "请填写详细地址",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!form.orgLeader) {
|
||
uni.showToast({
|
||
title: "请填写机构负责人",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!form.orgLeaderPhone) {
|
||
uni.showToast({
|
||
title: "请填写手机号",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!isValid11DigitNumber(form.orgLeaderPhone)) {
|
||
uni.showToast({
|
||
title: "手机号格式错误",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!form.orgPropertyType) {
|
||
uni.showToast({
|
||
title: "请填写房屋性质",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!form.orgBuildingArea) {
|
||
uni.showToast({
|
||
title: "请填写建筑面积",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
}
|
||
const allNonEmpty = form.orgLeader && form.orgLeaderPhone && form.orgAddress && form.orgPropertyType && form.orgBuildingArea && form.address;
|
||
let data = uni.getStorageSync("backhuancun");
|
||
data.openId = uni.getStorageSync("openid");
|
||
data.address = form.address;
|
||
data.orgProvince = form.orgProvince;
|
||
data.orgCity = form.orgCity;
|
||
data.orgDistrict = form.orgDistrict;
|
||
data.orgAddress = form.orgAddress;
|
||
data.orgLeader = form.orgLeader;
|
||
data.orgLeaderPhone = form.orgLeaderPhone;
|
||
data.orgPropertyType = form.orgPropertyType;
|
||
data.orgBuildingArea = form.orgBuildingArea;
|
||
if (data.id === null) {
|
||
data.status = `4`;
|
||
} else {
|
||
data.status = form.status;
|
||
}
|
||
uni.setStorageSync("backhuancun", data);
|
||
if (allNonEmpty) {
|
||
changemessage(uni.getStorageSync("backhuancun")).then((res) => {
|
||
if (res.success) {
|
||
uni.requestSubscribeMessage({
|
||
// 这里填后台申请好的 templateId 数组
|
||
tmplIds: ["CJ6NDNV4mTTyOdYhbksyA_YjDORVemJRmzEVAUZMBis", "oG6nnLpW3TzCIFPejO2kWtraIPF0NfyGMcZUNhKGM4U"],
|
||
success: (res2) => {
|
||
formatAppLog("log", "at pages/addjigou/where.vue:339", "????", res2);
|
||
uni.setStorageSync("specicalid", "");
|
||
uni.reLaunch({
|
||
url: `/pages/login/specialsmall?type=1&special=${uni.getStorageSync("backhuancun").id === null}`
|
||
});
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addjigou/where.vue:346", "订阅接口调用失败:", err);
|
||
uni.showToast({
|
||
title: "订阅失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: res.message,
|
||
icon: "error"
|
||
});
|
||
}
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "请完善信息",
|
||
icon: "error"
|
||
});
|
||
}
|
||
};
|
||
const goBack = () => {
|
||
if (form.address) {
|
||
let data = uni.getStorageSync("backhuancun");
|
||
data.address = form.address;
|
||
data.orgProvince = form.orgProvince;
|
||
data.orgCity = form.orgCity;
|
||
data.orgDistrict = form.orgDistrict;
|
||
data.orgAddress = form.orgAddress;
|
||
data.orgLeader = form.orgLeader;
|
||
data.orgLeaderPhone = form.orgLeaderPhone;
|
||
data.orgPropertyType = form.orgPropertyType;
|
||
data.orgBuildingArea = form.orgBuildingArea;
|
||
uni.setStorageSync("backhuancun", data);
|
||
}
|
||
uni.navigateBack();
|
||
};
|
||
const jumpToMap = () => {
|
||
uni.navigateTo({
|
||
url: "/pages/map/index"
|
||
});
|
||
};
|
||
const clickcard = (element) => {
|
||
if (address.value.length < 3) {
|
||
list.value = [];
|
||
address.value.push(element);
|
||
getdate(element.id).then((res) => {
|
||
if (res.result.length) {
|
||
list.value = dedupeFirstLetter(res.result);
|
||
} else {
|
||
popupshow.value = false;
|
||
form.address = "";
|
||
address.value.forEach((res2) => {
|
||
form.address += res2.name;
|
||
});
|
||
const keys = ["orgProvince", "orgCity", "orgDistrict"];
|
||
keys.forEach((key, idx) => {
|
||
var _a, _b;
|
||
form[key] = ((_a = address.value[idx]) == null ? void 0 : _a.id) ? (_b = address.value[idx]) == null ? void 0 : _b.id : "";
|
||
});
|
||
address.value = [];
|
||
list.value = [];
|
||
getdate(`xzqhdm`).then((res2) => {
|
||
list.value = dedupeFirstLetter(res2.result);
|
||
});
|
||
}
|
||
});
|
||
}
|
||
};
|
||
const openpopupshow = () => {
|
||
popupshow.value = true;
|
||
};
|
||
onShow(() => {
|
||
const data = uni.getStorageSync("dingwei");
|
||
if (data) {
|
||
formatAppLog("log", "at pages/addjigou/where.vue:441", "data", data);
|
||
jigouweizhi.value = data.name;
|
||
form.orgAddress = data.name;
|
||
form.orgCoordinateLo = data.lng;
|
||
form.orgCoordinateLa = data.lat;
|
||
uni.removeStorageSync("dingwei");
|
||
}
|
||
});
|
||
function dedupeFirstLetter(arr) {
|
||
const seen = /* @__PURE__ */ new Set();
|
||
return arr.map((item) => {
|
||
const letter2 = item.firstLetter;
|
||
if (!letter2 || seen.has(letter2)) {
|
||
return {
|
||
...item,
|
||
firstLetter: ""
|
||
};
|
||
} else {
|
||
seen.add(letter2);
|
||
return item;
|
||
}
|
||
});
|
||
}
|
||
function formatArea() {
|
||
const value = form.orgBuildingArea;
|
||
const firstDot = value.indexOf(".");
|
||
const lastDot = value.lastIndexOf(".");
|
||
let cleaned = value;
|
||
if (firstDot !== lastDot) {
|
||
cleaned = value.slice(0, lastDot);
|
||
}
|
||
if (cleaned.includes(".")) {
|
||
const [intPart, decimalPart] = cleaned.split(".");
|
||
cleaned = intPart + "." + decimalPart.slice(0, 4);
|
||
}
|
||
if (cleaned !== value) {
|
||
vue.nextTick(() => {
|
||
form.orgBuildingArea = cleaned;
|
||
});
|
||
}
|
||
}
|
||
onLoad(() => {
|
||
getdate(`xzqhdm`).then((res) => {
|
||
list.value = dedupeFirstLetter(res.result);
|
||
});
|
||
if (uni.getStorageSync("backhuancun").address) {
|
||
let data = uni.getStorageSync("backhuancun");
|
||
form.address = data.address;
|
||
form.orgProvince = data.orgProvince;
|
||
form.orgCity = data.orgCity;
|
||
form.orgDistrict = data.orgDistrict;
|
||
form.orgAddress = data.orgAddress;
|
||
form.orgLeader = data.orgLeader;
|
||
form.orgLeaderPhone = data.orgLeaderPhone;
|
||
form.orgPropertyType = data.orgPropertyType;
|
||
form.orgBuildingArea = data.orgBuildingArea;
|
||
} else if (uni.getStorageSync("baddata")) {
|
||
let data = uni.getStorageSync("baddata");
|
||
if (data.orgProvince_dictText) {
|
||
form.address = data.orgProvince_dictText + (data.orgCity_dictText != null ? data.orgCity_dictText : ``) + (data.orgDistrict_dictText != null ? data.orgDistrict_dictText : ``);
|
||
}
|
||
form.orgProvince = data.orgProvince;
|
||
form.orgCity = data.orgCity;
|
||
form.orgDistrict = data.orgDistrict;
|
||
form.orgAddress = data.orgAddress;
|
||
form.orgLeader = data.orgLeader;
|
||
form.orgLeaderPhone = data.orgLeaderPhone;
|
||
form.orgPropertyType = data.orgPropertyType;
|
||
form.orgBuildingArea = data.orgBuildingArea;
|
||
}
|
||
});
|
||
const __returned__ = { address, show, content, jigouweizhi, popupshow, list, showselect, showlist, onSelect1, form, tempImagePath, headImge, backImge, isAtLeastEightChars, openLook, takeFirst, deleteUP, isValid11DigitNumber, next, goBack, jumpToMap, clickcard, openpopupshow, dedupeFirstLetter, formatArea, ref: vue.ref, reactive: vue.reactive, nextTick: vue.nextTick, get onLoad() {
|
||
return onLoad;
|
||
}, get onShow() {
|
||
return onShow;
|
||
}, get base_url() {
|
||
return base_url;
|
||
}, get changemessage() {
|
||
return changemessage;
|
||
}, get getdate() {
|
||
return getdate;
|
||
}, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_0$1);
|
||
const _component_u_select = resolveEasycom(vue.resolveDynamicComponent("u-select"), __easycom_1);
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createCommentVNode(' <u-modal v-model="show" :content="content"></u-modal> '),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createVNode(_component_u_popup, {
|
||
modelValue: $setup.popupshow,
|
||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.popupshow = $event),
|
||
mode: "bottom",
|
||
"border-radius": "40",
|
||
height: "600px"
|
||
}, {
|
||
default: vue.withCtx(() => [
|
||
vue.createElementVNode("view", { class: "popup-father" }, [
|
||
vue.createElementVNode("view", { class: "popup-title" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "all-bgc",
|
||
style: { "display": "flex", "justify-content": "center", "align-items": "center", "height": "180rpx", "width": "100%", "position": "relative" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "title-font" }, " 请选择所在地区 "),
|
||
vue.createElementVNode("image", {
|
||
class: "title-imge-title",
|
||
src: "https://www.focusnu.com/media/directive/index/mark.png"
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { style: { "display": "flex" } }, [
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.address, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
class: "button-father",
|
||
style: vue.normalizeStyle(index == $setup.address.length - 1 ? { backgroundColor: `rgb(222, 233, 251)`, color: `rgb(6, 122, 233)` } : {}),
|
||
onClick: ($event) => $setup.deleteUP(index)
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
null,
|
||
vue.toDisplayString(item.name),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode("image", {
|
||
class: "title-imge",
|
||
src: `https://www.focusnu.com/media/directive/index/workjoin/${index == $setup.address.length - 1 ? `x` : `redcha`}.png`
|
||
}, null, 8, ["src"])
|
||
], 12, ["onClick"]);
|
||
}),
|
||
256
|
||
/* UNKEYED_FRAGMENT */
|
||
))
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { style: { "height": "180rpx", "width": "100%" } }),
|
||
$setup.address.length ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
style: { "height": "80rpx", "width": "100%" }
|
||
})) : vue.createCommentVNode("v-if", true),
|
||
vue.createElementVNode("view", { class: "other-title" }, " 选择地区 "),
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.list, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: index,
|
||
onClick: ($event) => $setup.clickcard(item)
|
||
}, [
|
||
vue.createElementVNode("view", { class: "cards" }, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "zimu" },
|
||
vue.toDisplayString(item.firstLetter),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "font" },
|
||
vue.toDisplayString(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
], 8, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["modelValue"]),
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "机构信息")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "机构信息")
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", { onClick: $setup.openpopupshow }, [
|
||
vue.createElementVNode("view", {
|
||
class: "one",
|
||
style: { "position": "relative" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "机构位置"),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
disabled: "",
|
||
style: { "cursor": "not-allowed", "pointer-events": "none" },
|
||
class: "one-right",
|
||
type: "text",
|
||
placeholder: "请选择机构位置",
|
||
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.form.address = $event)
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.address]
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "triangle-down",
|
||
src: "https://www.focusnu.com/media/directive/login/xia.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", null, [
|
||
vue.createElementVNode("view", {
|
||
class: "one",
|
||
style: { "overflow": "hidden" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "详细地址"),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
class: "one-right",
|
||
placeholder: "请输入详细地址",
|
||
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.form.orgAddress = $event)
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.orgAddress]
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", null, [
|
||
vue.createElementVNode("view", { class: "one" }, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "机构负责人"),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
class: "one-right",
|
||
type: "text",
|
||
placeholder: "请输入机构负责人姓名",
|
||
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.form.orgLeader = $event)
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.orgLeader]
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", null, [
|
||
vue.createElementVNode("view", { class: "one" }, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "机构负责人电话"),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
class: "one-right",
|
||
type: "number",
|
||
maxlength: "11",
|
||
placeholder: "请输入机构负责人电话",
|
||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.form.orgLeaderPhone = $event)
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.orgLeaderPhone]
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", null, [
|
||
vue.createElementVNode("view", {
|
||
class: "one",
|
||
style: { "position": "relative" },
|
||
onClick: _cache[7] || (_cache[7] = ($event) => $setup.showselect = true)
|
||
}, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "房屋性质"),
|
||
vue.createCommentVNode(' <input class="one-right-select" type="select" placeholder="请输入房屋性质" v-model="form.orgPropertyType"\r\n @click="showselect=true" /> '),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
disabled: "",
|
||
style: { "cursor": "not-allowed", "pointer-events": "none" },
|
||
class: "one-right",
|
||
type: "text",
|
||
placeholder: "请选择房屋性质",
|
||
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.form.orgPropertyType = $event)
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.orgPropertyType]
|
||
]),
|
||
vue.createElementVNode("image", {
|
||
class: "triangle-down",
|
||
src: "https://www.focusnu.com/media/directive/login/xia.png"
|
||
})
|
||
])
|
||
]),
|
||
vue.createVNode(_component_u_select, {
|
||
style: { "font-size": "35rpx" },
|
||
modelValue: $setup.showselect,
|
||
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.showselect = $event),
|
||
list: $setup.showlist,
|
||
onConfirm: $setup.onSelect1
|
||
}, null, 8, ["modelValue", "list"]),
|
||
vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [
|
||
vue.createElementVNode("view", {
|
||
class: "one",
|
||
style: { "position": "relative" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "one-left" }, "建筑面积"),
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
class: "one-right",
|
||
type: "digit",
|
||
placeholder: "请输入建筑面积",
|
||
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.form.orgBuildingArea = $event),
|
||
onInput: $setup.formatArea
|
||
},
|
||
null,
|
||
544
|
||
/* NEED_HYDRATION, NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.form.orgBuildingArea]
|
||
]),
|
||
vue.createElementVNode("view", { class: "triangle-down-mi" }, " 平方米 ")
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { style: { "display": "flex", "width": "100%", "margin-top": "10rpx", "padding": "0 10%" } }, [
|
||
vue.createElementVNode("view", {
|
||
class: "back-button",
|
||
onClick: $setup.goBack
|
||
}, " 返回上一步 "),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.next
|
||
}, " 确认并提交 ")
|
||
])
|
||
]);
|
||
}
|
||
const PagesAddjigouWhere = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-549d1cee"], ["__file", "D:/hldy_xcx/pages/addjigou/where.vue"]]);
|
||
const _sfc_main$6 = {
|
||
name: "u-action-sheet",
|
||
emits: ["update:modelValue", "input", "click", "close"],
|
||
props: {
|
||
// 通过双向绑定控制组件的弹出与收起
|
||
value: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 点击遮罩是否可以关闭actionsheet
|
||
maskCloseAble: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 按钮的文字数组,可以自定义颜色和字体大小,字体单位为rpx
|
||
list: {
|
||
type: Array,
|
||
default() {
|
||
return [];
|
||
}
|
||
},
|
||
// 顶部的提示文字
|
||
tips: {
|
||
type: Object,
|
||
default() {
|
||
return {
|
||
text: "",
|
||
color: "",
|
||
fontSize: "26"
|
||
};
|
||
}
|
||
},
|
||
// 底部的取消按钮
|
||
cancelBtn: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
|
||
safeAreaInsetBottom: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 弹出的顶部圆角值
|
||
borderRadius: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
// 弹出的z-index值
|
||
zIndex: {
|
||
type: [String, Number],
|
||
default: 0
|
||
},
|
||
// 取消按钮的文字提示
|
||
cancelText: {
|
||
type: String,
|
||
default: "取消"
|
||
},
|
||
// 自定义label属性名
|
||
labelName: {
|
||
type: String,
|
||
default: "text"
|
||
},
|
||
// 遮罩的模糊度
|
||
blur: {
|
||
type: [Number, String],
|
||
default: 0
|
||
}
|
||
},
|
||
computed: {
|
||
valueCom() {
|
||
return this.modelValue;
|
||
},
|
||
// 顶部提示的样式
|
||
tipsStyle() {
|
||
let style = {};
|
||
if (this.tips.color)
|
||
style.color = this.tips.color;
|
||
if (this.tips.fontSize)
|
||
style.fontSize = this.tips.fontSize + "rpx";
|
||
return style;
|
||
},
|
||
// 操作项目的样式
|
||
itemStyle() {
|
||
return (index) => {
|
||
let style = {};
|
||
if (this.list[index].color)
|
||
style.color = this.list[index].color;
|
||
if (this.list[index].fontSize)
|
||
style.fontSize = this.list[index].fontSize + "rpx";
|
||
if (this.list[index].disabled)
|
||
style.color = "#c0c4cc";
|
||
return style;
|
||
};
|
||
},
|
||
uZIndex() {
|
||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
popupValue: false
|
||
};
|
||
},
|
||
watch: {
|
||
valueCom(v1, v2) {
|
||
this.popupValue = v1;
|
||
}
|
||
},
|
||
methods: {
|
||
// 点击取消按钮
|
||
close() {
|
||
this.popupClose();
|
||
this.$emit("close");
|
||
},
|
||
// 弹窗关闭
|
||
popupClose() {
|
||
this.$emit("input", false);
|
||
this.$emit("update:modelValue", false);
|
||
},
|
||
// 点击某一个item
|
||
itemClick(index) {
|
||
if (this.list[index].disabled)
|
||
return;
|
||
this.$emit("click", index);
|
||
this.$emit("input", false);
|
||
this.$emit("update:modelValue", false);
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_0$1);
|
||
return vue.openBlock(), vue.createBlock(_component_u_popup, {
|
||
blur: $props.blur,
|
||
mode: "bottom",
|
||
"border-radius": $props.borderRadius,
|
||
popup: false,
|
||
modelValue: $data.popupValue,
|
||
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.popupValue = $event),
|
||
maskCloseAble: $props.maskCloseAble,
|
||
length: "auto",
|
||
safeAreaInsetBottom: $props.safeAreaInsetBottom,
|
||
onClose: $options.popupClose,
|
||
"z-index": $options.uZIndex
|
||
}, {
|
||
default: vue.withCtx(() => [
|
||
$props.tips.text ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "u-tips u-border-bottom",
|
||
style: vue.normalizeStyle([$options.tipsStyle])
|
||
},
|
||
[
|
||
vue.createElementVNode(
|
||
"text",
|
||
null,
|
||
vue.toDisplayString($props.tips.text),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($props.list, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: index,
|
||
onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])),
|
||
onClick: ($event) => $options.itemClick(index),
|
||
style: vue.normalizeStyle([$options.itemStyle(index)]),
|
||
class: vue.normalizeClass(["u-action-sheet-item u-line-1", [index < $props.list.length - 1 ? "u-border-bottom" : ""]]),
|
||
"hover-stay-time": 150
|
||
}, [
|
||
vue.createElementVNode(
|
||
"text",
|
||
null,
|
||
vue.toDisplayString(item[$props.labelName]),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
item.subText ? (vue.openBlock(), vue.createElementBlock(
|
||
"text",
|
||
{
|
||
key: 0,
|
||
class: "u-action-sheet-item__subtext u-line-1"
|
||
},
|
||
vue.toDisplayString(item.subText),
|
||
1
|
||
/* TEXT */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
], 46, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)),
|
||
$props.cancelBtn ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "u-gab"
|
||
})) : vue.createCommentVNode("v-if", true),
|
||
$props.cancelBtn ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 2,
|
||
onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
||
}, ["stop", "prevent"])),
|
||
class: "u-actionsheet-cancel u-action-sheet-item",
|
||
"hover-class": "u-hover-class",
|
||
"hover-stay-time": 150,
|
||
onClick: _cache[2] || (_cache[2] = (...args) => $options.close && $options.close(...args))
|
||
},
|
||
vue.toDisplayString($props.cancelText),
|
||
33
|
||
/* TEXT, NEED_HYDRATION */
|
||
)) : vue.createCommentVNode("v-if", true)
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["blur", "border-radius", "modelValue", "maskCloseAble", "safeAreaInsetBottom", "onClose", "z-index"]);
|
||
}
|
||
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-cd40cb92"], ["__file", "D:/hldy_xcx/uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.vue"]]);
|
||
const _sfc_main$5 = {
|
||
__name: "name",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const bottomshow = vue.ref(false);
|
||
const bottomlist = [{
|
||
text: "拍摄图片",
|
||
fontSize: 40
|
||
}, {
|
||
text: "图片预览",
|
||
fontSize: 40
|
||
}];
|
||
const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限"];
|
||
const textArray = vue.reactive(["", "", "", "", "", "", "", ""]);
|
||
const states = ["审核中", "审核未通过", "审核通过"];
|
||
const fontphoto = vue.ref("");
|
||
const endphoto = vue.ref("");
|
||
const statesTarget = vue.ref(0);
|
||
const shenhe = () => {
|
||
if (statesTarget.value == 2) {
|
||
statesTarget.value = 0;
|
||
} else {
|
||
statesTarget.value++;
|
||
}
|
||
};
|
||
const photoclick = (element) => {
|
||
if (element) {
|
||
uni.previewImage({
|
||
urls: [headImge.value, backImge.value],
|
||
// 必填,所有要预览的图片地址数组
|
||
current: targetphoto.value ? backImge.value : headImge.value,
|
||
// 可选,当前显示图片的地址,默认是 urls[0]
|
||
indicator: "default",
|
||
// 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||
longPressActions: {
|
||
// 可选,仅 App 支持,长按图片时弹出的操作项
|
||
itemList: ["保存图片到相册"]
|
||
}
|
||
});
|
||
} else {
|
||
getMessage2();
|
||
}
|
||
};
|
||
const tempImagePath = vue.ref("");
|
||
const targetphoto = vue.ref(0);
|
||
const selectphoto = (number2) => {
|
||
if (!uping.value) {
|
||
return;
|
||
}
|
||
if (backImge.value && headImge.value) {
|
||
targetphoto.value = number2;
|
||
bottomshow.value = true;
|
||
} else {
|
||
getMessage2();
|
||
}
|
||
};
|
||
function getMessage2() {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sourceType: ["album", "camera"],
|
||
success: (chooseRes) => {
|
||
tempImagePath.value = chooseRes.tempFilePaths[0];
|
||
uni.navigateTo({
|
||
url: `/compontent/public/camera?url=${chooseRes.tempFilePaths[0]}&type=0`
|
||
});
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addjigou/name.vue:168", "拍照失败:", err);
|
||
}
|
||
});
|
||
}
|
||
const headImge = vue.ref("");
|
||
const backImge = vue.ref("");
|
||
function formatChineseDate(chineseDate) {
|
||
return chineseDate.replace(/(\d+)年(\d+)月(\d+)日/, (_, y, m, d) => {
|
||
return `${y}.${m}.${d}`;
|
||
});
|
||
}
|
||
function toIsoDate(dateStr) {
|
||
return dateStr.replace(
|
||
/(\d{2,4})\.(\d{1,2})\.(\d{1,2})/,
|
||
(_, y, m, d) => {
|
||
const mm = m.padStart(2, "0");
|
||
const dd = d.padStart(2, "0");
|
||
return `${y}-${mm}-${dd}`;
|
||
}
|
||
);
|
||
}
|
||
function uploadImage(filePath) {
|
||
uping.value = false;
|
||
uni.showLoading();
|
||
uni.uploadFile({
|
||
url: `${base_url}/api/ocr/idCard`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {},
|
||
success: (uploadRes) => {
|
||
formatAppLog("log", "at pages/addjigou/name.vue:206", "token", uni.getStorageSync("token"));
|
||
if (!JSON.parse(uploadRes.data).success) {
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title: "识别失败",
|
||
icon: "error",
|
||
duration: 2e3
|
||
});
|
||
uping.value = true;
|
||
return;
|
||
}
|
||
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||
textArray[0] = father.name;
|
||
textArray[1] = father.sex;
|
||
textArray[2] = father.idNumber;
|
||
textArray[3] = father.ethnicity;
|
||
textArray[4] = father.birthDate;
|
||
textArray[5] = father.address;
|
||
headImge.value = filePath;
|
||
savephoto(filePath, 0);
|
||
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back) {
|
||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||
textArray[6] = father.issueAuthority;
|
||
textArray[7] = father.validPeriod;
|
||
backImge.value = filePath;
|
||
savephoto(filePath, 1);
|
||
} else {
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title: "识别失败",
|
||
icon: "error",
|
||
duration: 2e3
|
||
});
|
||
uping.value = true;
|
||
}
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
}
|
||
const uping = vue.ref(true);
|
||
const savephoto = (filePath, type) => {
|
||
uni.uploadFile({
|
||
url: `${base_url}/sys/common/upload`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {
|
||
biz: `temp`
|
||
},
|
||
success: (uploadRes) => {
|
||
if (!type) {
|
||
fontphoto.value = JSON.parse(uploadRes.data).message;
|
||
} else {
|
||
endphoto.value = JSON.parse(uploadRes.data).message;
|
||
}
|
||
uni.hideLoading();
|
||
if (JSON.parse(uploadRes.data).code == 401) {
|
||
uni.uploadFile({
|
||
url: `${base_url}/sys/common/upload`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {
|
||
biz: `temp`
|
||
},
|
||
success: (uploadRes2) => {
|
||
if (!type) {
|
||
fontphoto.value = JSON.parse(uploadRes2.data).message;
|
||
} else {
|
||
endphoto.value = JSON.parse(uploadRes2.data).message;
|
||
}
|
||
uping.value = true;
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
}
|
||
uping.value = true;
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
};
|
||
function isAtLeastEightChars(str) {
|
||
return typeof str === "string" && str.length >= 12;
|
||
}
|
||
const openLook = (res) => {
|
||
if (isAtLeastEightChars(res)) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
const next = () => {
|
||
if (!fontphoto.value) {
|
||
uni.showToast({
|
||
title: "请上传身份证正面",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
} else if (!endphoto.value) {
|
||
uni.showToast({
|
||
title: "请上传身份证背面",
|
||
icon: "error"
|
||
});
|
||
return;
|
||
}
|
||
const allNonEmpty = textArray.every((item) => {
|
||
return item !== "";
|
||
});
|
||
if (!uping.value) {
|
||
return;
|
||
}
|
||
if (allNonEmpty) {
|
||
const range2 = textArray[7];
|
||
const [start, end] = range2.split("-");
|
||
let data = uni.getStorageSync("backhuancun");
|
||
data.tel = uni.getStorageSync("tel");
|
||
data.name = textArray[0];
|
||
data.sex = textArray[1];
|
||
data.idCard = textArray[2];
|
||
data.national = textArray[3];
|
||
data.birthDate = textArray[4];
|
||
data.idCardAddress = textArray[5];
|
||
data.issuingAuthority = textArray[6];
|
||
data.startTime = start;
|
||
data.endTime = end;
|
||
data.cardZmPath = fontphoto.value;
|
||
data.cardFmPath = endphoto.value;
|
||
uni.setStorageSync("backhuancun", data);
|
||
uni.navigateTo({
|
||
url: "/pages/addjigou/card"
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "请上传清晰的身份证",
|
||
icon: "error"
|
||
});
|
||
}
|
||
};
|
||
const goBack = () => {
|
||
uni.navigateBack();
|
||
};
|
||
onLoad(() => {
|
||
if (uni.getStorageSync("baddata")) {
|
||
let data = uni.getStorageSync("baddata");
|
||
textArray[0] = data.name;
|
||
textArray[1] = data.sex;
|
||
textArray[2] = data.idCard;
|
||
textArray[3] = data.national;
|
||
textArray[4] = data.birthDate;
|
||
textArray[5] = data.idCardAddress;
|
||
textArray[6] = data.issuingAuthority;
|
||
textArray[7] = `${data.startTime}-${data.endTime}`;
|
||
headImge.value = `${base_url}/sys/common/static/${data.cardZmPath}`;
|
||
backImge.value = `${base_url}/sys/common/static/${data.cardFmPath}`;
|
||
fontphoto.value = data.cardZmPath;
|
||
endphoto.value = data.cardFmPath;
|
||
}
|
||
});
|
||
onShow(() => {
|
||
const img = uni.getStorageSync("imgkey0");
|
||
if (img) {
|
||
uploadImage(img);
|
||
uni.removeStorageSync("imgkey0");
|
||
}
|
||
});
|
||
const __returned__ = { show, content, bottomshow, bottomlist, nameArray, textArray, states, fontphoto, endphoto, statesTarget, shenhe, photoclick, tempImagePath, targetphoto, selectphoto, getMessage: getMessage2, headImge, backImge, formatChineseDate, toIsoDate, uploadImage, uping, savephoto, isAtLeastEightChars, openLook, next, goBack, ref: vue.ref, reactive: vue.reactive, get onLoad() {
|
||
return onLoad;
|
||
}, get onShow() {
|
||
return onShow;
|
||
}, get base_url() {
|
||
return base_url;
|
||
}, get changemessage() {
|
||
return changemessage;
|
||
}, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_0);
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createCommentVNode(' <u-modal v-model="show" :content="content"></u-modal> '),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "身份证")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "身份证"),
|
||
vue.createCommentVNode(' <view style="font-size: 20rpx;margin: 12rpx 0 0 15rpx;color: red;">(必填)</view> ')
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.selectphoto(0))
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "人像面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证人像面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.fontphoto ? `${$setup.base_url}/sys/common/static/${$setup.fontphoto}` : `https://www.focusnu.com/media/directive/index/IDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.fontphoto ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
style: { "margin-top": "30rpx" },
|
||
onClick: _cache[2] || (_cache[2] = ($event) => $setup.selectphoto(1))
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "国徽面"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传身份证国徽面")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.endphoto ? `${$setup.base_url}/sys/common/static/${$setup.endphoto}` : `https://www.focusnu.com/media/directive/index/backIDcard.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.endphoto ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "content-title",
|
||
style: { "margin": "20rpx 0" }
|
||
}, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "确认身份证信息")
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", null, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray[index] ? $setup.textArray[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "gray-font" }, [
|
||
vue.createElementVNode("view", { style: { "color": "#333333" } }, "注意事项:"),
|
||
vue.createElementVNode("view", { style: { "margin-top": "30rpx", "font-size": "28rpx" } }, [
|
||
vue.createElementVNode("view", { class: "line" }, "1.同一个身份证号只能认证一个账号。"),
|
||
vue.createElementVNode("view", { class: "line" }, "2.国徽与正面信息应为同一身份证的信息且在有效期内。"),
|
||
vue.createElementVNode("view", { class: "line" }, "3.所有上传照片需清晰且未遮挡,请勿进行美化和修改。"),
|
||
vue.createElementVNode("view", { class: "line" }, "4.所有上传信息均会被妥善保管,不会用于其他商业用途或传输给第三方。")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { style: { "display": "flex", "width": "100%" } }, [
|
||
vue.createCommentVNode(' <view class="finish-button" @click="goBack">\r\n 上一步\r\n </view> '),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.next
|
||
}, " 确认并继续 ")
|
||
]),
|
||
vue.createVNode(_component_u_action_sheet, {
|
||
list: $setup.bottomlist,
|
||
onClick: $setup.photoclick,
|
||
modelValue: $setup.bottomshow,
|
||
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.bottomshow = $event)
|
||
}, null, 8, ["modelValue"])
|
||
]);
|
||
}
|
||
const PagesAddjigouName = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-4363d488"], ["__file", "D:/hldy_xcx/pages/addjigou/name.vue"]]);
|
||
const _sfc_main$4 = {
|
||
__name: "card",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const show = vue.ref(false);
|
||
const content = vue.ref("");
|
||
const nameArray = ["企业名称", "注册地址", "信用代码", "法人"];
|
||
const textArray = vue.reactive(["", "", "", ""]);
|
||
const bottomlist = [{
|
||
text: "拍摄图片",
|
||
fontSize: 40
|
||
}, {
|
||
text: "图片预览",
|
||
fontSize: 40
|
||
}];
|
||
const bottomshow = vue.ref(false);
|
||
const tempImagePath = vue.ref("");
|
||
const selectphoto = (number2) => {
|
||
if (!uping.value) {
|
||
return;
|
||
}
|
||
if (headImge.value) {
|
||
bottomshow.value = true;
|
||
} else {
|
||
getMessage2();
|
||
}
|
||
};
|
||
const photoclick = (element) => {
|
||
if (element) {
|
||
uni.previewImage({
|
||
urls: [headImge.value],
|
||
// 必填,所有要预览的图片地址数组
|
||
current: headImge.value,
|
||
// 可选,当前显示图片的地址,默认是 urls[0]
|
||
indicator: "default",
|
||
// 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||
longPressActions: {
|
||
// 可选,仅 App 支持,长按图片时弹出的操作项
|
||
itemList: ["保存图片到相册"]
|
||
}
|
||
});
|
||
} else {
|
||
getMessage2();
|
||
}
|
||
};
|
||
function getMessage2() {
|
||
uni.chooseImage({
|
||
count: 1,
|
||
sourceType: ["album", "camera"],
|
||
success: (chooseRes) => {
|
||
tempImagePath.value = chooseRes.tempFilePaths[0];
|
||
uni.navigateTo({
|
||
url: `/compontent/public/camera?url=${chooseRes.tempFilePaths[0]}&type=0&size=1`
|
||
});
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at pages/addjigou/card.vue:144", "拍照失败:", err);
|
||
}
|
||
});
|
||
}
|
||
const headImge = vue.ref("");
|
||
const backImge = vue.ref("");
|
||
const uping = vue.ref(true);
|
||
function uploadImage(filePath) {
|
||
uping.value = false;
|
||
uni.showLoading();
|
||
uni.uploadFile({
|
||
url: `${base_url}/api/ocr/businessLicense`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {},
|
||
success: (uploadRes) => {
|
||
if (!JSON.parse(uploadRes.data).success) {
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title: "识别失败",
|
||
icon: "error",
|
||
duration: 2e3
|
||
});
|
||
uping.value = true;
|
||
return;
|
||
}
|
||
formatAppLog("log", "at pages/addjigou/card.vue:177", "营业执照", JSON.parse(JSON.parse(uploadRes.data).result.data).data);
|
||
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.companyName) {
|
||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data;
|
||
textArray[0] = father.companyName;
|
||
textArray[1] = father.businessAddress;
|
||
textArray[2] = father.creditCode;
|
||
textArray[3] = father.legalPerson;
|
||
headImge.value = filePath;
|
||
savephoto(filePath);
|
||
} else {
|
||
uni.showToast({
|
||
title: "识别失败",
|
||
icon: "error",
|
||
duration: 2e3
|
||
});
|
||
uping.value = true;
|
||
uni.hideLoading();
|
||
}
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uping.value = true;
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
}
|
||
const fontphoto = vue.ref("");
|
||
const savephoto = (filePath) => {
|
||
uni.uploadFile({
|
||
url: `${base_url}/sys/common/upload`,
|
||
// 替换为您的POST接口地址
|
||
filePath,
|
||
name: "file",
|
||
// 后端接收时的字段名
|
||
header: {
|
||
"X-Access-Token": uni.getStorageSync("token") || ""
|
||
},
|
||
formData: {
|
||
biz: `temp`
|
||
},
|
||
success: (uploadRes) => {
|
||
fontphoto.value = JSON.parse(uploadRes.data).message;
|
||
uping.value = true;
|
||
uni.hideLoading();
|
||
},
|
||
fail: (err) => {
|
||
uni.showToast({
|
||
title: "上传出错",
|
||
icon: "error"
|
||
});
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
};
|
||
function isAtLeastEightChars(str) {
|
||
return typeof str === "string" && str.length >= 12;
|
||
}
|
||
const openLook = (res) => {
|
||
if (isAtLeastEightChars(res)) {
|
||
content.value = res;
|
||
show.value = true;
|
||
}
|
||
};
|
||
const next = () => {
|
||
if (!uping.value) {
|
||
return;
|
||
}
|
||
const allNonEmpty = textArray[0] && textArray[1] && textArray[2] && textArray[3] && fontphoto.value;
|
||
if (allNonEmpty) {
|
||
let data = uni.getStorageSync("backhuancun");
|
||
data.comName = textArray[0];
|
||
data.comRegisterAddress = textArray[1];
|
||
data.comCreditCode = textArray[2];
|
||
data.comLegalPerson = textArray[3];
|
||
data.comBusinessLicense = fontphoto.value;
|
||
uni.setStorageSync("backhuancun", data);
|
||
uni.navigateTo({
|
||
url: "/pages/addjigou/where"
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "请上传清晰的营业执照",
|
||
icon: "error"
|
||
});
|
||
}
|
||
};
|
||
onLoad(() => {
|
||
if (uni.getStorageSync("backhuancun").comName) {
|
||
let data = uni.getStorageSync("backhuancun");
|
||
if (data.comName) {
|
||
textArray[0] = data.comName;
|
||
textArray[1] = data.comRegisterAddress;
|
||
textArray[2] = data.comCreditCode;
|
||
textArray[3] = data.comLegalPerson;
|
||
if (data.comBusinessLicense) {
|
||
headImge.value = `${base_url}/sys/common/static/${data.comBusinessLicense}`;
|
||
fontphoto.value = data.comBusinessLicense;
|
||
}
|
||
}
|
||
} else if (uni.getStorageSync("baddata")) {
|
||
let data = uni.getStorageSync("baddata");
|
||
if (data.comName) {
|
||
textArray[0] = data.comName;
|
||
textArray[1] = data.comRegisterAddress;
|
||
textArray[2] = data.comCreditCode;
|
||
textArray[3] = data.comLegalPerson;
|
||
let data0 = uni.getStorageSync("backhuancun");
|
||
data0.comName = data.id;
|
||
uni.setStorageSync("backhuancun", data);
|
||
if (data.comBusinessLicense) {
|
||
headImge.value = `${base_url}/sys/common/static/${data.comBusinessLicense}`;
|
||
fontphoto.value = data.comBusinessLicense;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
const goBack = () => {
|
||
if (!uping.value) {
|
||
return;
|
||
}
|
||
if (textArray[0]) {
|
||
let data = uni.getStorageSync("backhuancun");
|
||
data.comName = textArray[0];
|
||
data.comRegisterAddress = textArray[1];
|
||
data.comCreditCode = textArray[2];
|
||
data.comLegalPerson = textArray[3];
|
||
data.comBusinessLicense = fontphoto.value;
|
||
uni.setStorageSync("backhuancun", data);
|
||
}
|
||
uni.navigateBack();
|
||
};
|
||
onShow(() => {
|
||
const img = uni.getStorageSync("imgkey0");
|
||
if (img) {
|
||
uploadImage(img);
|
||
uni.removeStorageSync("imgkey0");
|
||
}
|
||
});
|
||
const __returned__ = { show, content, nameArray, textArray, bottomlist, bottomshow, tempImagePath, selectphoto, photoclick, getMessage: getMessage2, headImge, backImge, uping, uploadImage, fontphoto, savephoto, isAtLeastEightChars, openLook, next, goBack, ref: vue.ref, reactive: vue.reactive, get onLoad() {
|
||
return onLoad;
|
||
}, get onShow() {
|
||
return onShow;
|
||
}, get base_url() {
|
||
return base_url;
|
||
}, get changemessage() {
|
||
return changemessage;
|
||
}, model };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_0);
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createCommentVNode(' <u-modal v-model="show" :content="content"></u-modal> '),
|
||
vue.createVNode($setup["model"], {
|
||
show: $setup.show,
|
||
onClose: _cache[0] || (_cache[0] = ($event) => $setup.show = false),
|
||
content: $setup.content
|
||
}, null, 8, ["show", "content"]),
|
||
vue.createElementVNode("view", { class: "title-back" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "left-father",
|
||
onClick: $setup.goBack
|
||
}, [
|
||
vue.createElementVNode("image", {
|
||
class: "back-img",
|
||
src: "https://www.focusnu.com/media/directive/index/left.png"
|
||
}),
|
||
vue.createElementVNode("view", { style: { "font-size": "30rpx" } }, "营业执照")
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-content" }, [
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "营业执照")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
class: "white-photo",
|
||
onClick: $setup.selectphoto
|
||
}, [
|
||
vue.createElementVNode("view", { class: "photo-left" }, [
|
||
vue.createElementVNode("view", { class: "photo-weight" }, "营业执照"),
|
||
vue.createElementVNode("view", { class: "photo-font" }, "请上传营业执照")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "position": "relative" } }, [
|
||
vue.createElementVNode("image", {
|
||
class: "photo",
|
||
src: $setup.headImge ? $setup.headImge : `https://www.focusnu.com/media/directive/index/zhizhao.png`
|
||
}, null, 8, ["src"]),
|
||
!$setup.headImge ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
style: { "position": "absolute", "top": "50%", "left": "50%", "width": "70rpx", "height": "60rpx", "transform": "translate(-50%,-50%)" },
|
||
src: "https://www.focusnu.com/media/directive/index/takephoto.png"
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "content-title" }, [
|
||
vue.createElementVNode("view", { class: "shu" }),
|
||
vue.createElementVNode("view", { class: "content-weight" }, "企业信息")
|
||
]),
|
||
vue.createElementVNode("view", { class: "white-message" }, [
|
||
vue.createElementVNode("view", null, [
|
||
(vue.openBlock(), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($setup.nameArray, (item, index) => {
|
||
return vue.createElementVNode("view", {
|
||
key: index,
|
||
class: "one",
|
||
onClick: ($event) => $setup.openLook($setup.textArray[index])
|
||
}, [
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-left" },
|
||
vue.toDisplayString(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
vue.createCommentVNode(' <view class="one-right">{{textArray[index] ? textArray[index] : "自动获取" }}</view> '),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{ class: "one-right" },
|
||
vue.toDisplayString($setup.textArray[index] ? $setup.textArray[index] : "自动获取"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"]);
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
]),
|
||
vue.createElementVNode("view", { class: "gray-font" }, [
|
||
vue.createElementVNode("view", { style: { "color": "#333333", "margin-bottom": "30rpx" } }, "注意事项:"),
|
||
vue.createElementVNode("view", { class: "gray-text" }, " 1. 运用企业、个体工商户、政府、事业单位、学校、组织等,账号归属企业。 "),
|
||
vue.createElementVNode("view", { class: "gray-text" }, " 2.一个企业信息主体默认可认证1个账号。 "),
|
||
vue.createElementVNode("view", { class: "gray-text" }, " 3.所有上传信息均会被妥善保管,不会用于其他商业用途或传输给其他第三方。 ")
|
||
]),
|
||
vue.createElementVNode("view", { style: { "display": "flex", "width": "100%", "padding": "0 10%", "justify-content": "space-between" } }, [
|
||
vue.createElementVNode("view", {
|
||
class: "back-button",
|
||
onClick: $setup.goBack
|
||
}, " 返回上一步 "),
|
||
vue.createElementVNode("view", {
|
||
class: "finish-button",
|
||
onClick: $setup.next
|
||
}, " 确认并继续 ")
|
||
]),
|
||
vue.createVNode(_component_u_action_sheet, {
|
||
list: $setup.bottomlist,
|
||
onClick: $setup.photoclick,
|
||
modelValue: $setup.bottomshow,
|
||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.bottomshow = $event)
|
||
}, null, 8, ["modelValue"])
|
||
]);
|
||
}
|
||
const PagesAddjigouCard = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-402780bb"], ["__file", "D:/hldy_xcx/pages/addjigou/card.vue"]]);
|
||
const _sfc_main$3 = {
|
||
__name: "index",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const amount2 = vue.ref("");
|
||
const loading = vue.ref(false);
|
||
const statusMessage = vue.ref("");
|
||
const payData = vue.ref({
|
||
timeStamp: "1747983532",
|
||
package: "prepay_id=wx23145806465232c82870c59d2d41cf0000",
|
||
paySign: "0pUqj2JZ77BYchyJuthQyP4yRfqhjvwag78Q4IMnIyQ3/OQP6OyJreZfmj0GFSEMrRsKAHIdBBM7tVnot0aaRhI5qwSOWpzyvJCkYa4eqPgqlV4XYVMqE3zeB/Cx4C9bv4poMXnaGlfFPdkhMYbUcdtsw4gBXXhqUx//9x7eu9cOERRzLquM8Z8rewRpar/kkVKSCV6h8pX19kRj+KEkK5LZB8IUIG995g1lsVFOqdO4mVFBJ1wZCkwJczgVI+jdNGgnR2lpdjwIpJFm+5Hm0y9SwR0UFvgkm95NrmY+Sruty/Zf8ekQwF4+atubW8CE6i8wm2zZpMEnnfS4WFwAwg==",
|
||
appId: "wx8fc3e4305d2fbf0b",
|
||
signType: "RSA",
|
||
nonceStr: "DxpF2uIMl0VM7vPOG7pWnPHk2Dvi3V7K"
|
||
});
|
||
function callWeixinPay(data) {
|
||
const invokePay = () => {
|
||
window.WeixinJSBridge.invoke(
|
||
"getBrandWCPayRequest",
|
||
{
|
||
appId: data.appId,
|
||
timeStamp: data.timeStamp,
|
||
nonceStr: data.nonceStr,
|
||
package: data.package,
|
||
signType: data.signType,
|
||
paySign: data.paySign
|
||
},
|
||
function(res) {
|
||
loading.value = false;
|
||
if (res.err_msg === "get_brand_wcpay_request:ok") {
|
||
statusMessage.value = "支付成功";
|
||
} else {
|
||
statusMessage.value = "支付失败或取消";
|
||
}
|
||
}
|
||
);
|
||
};
|
||
if (typeof window.WeixinJSBridge === "undefined") {
|
||
document.addEventListener("WeixinJSBridgeReady", invokePay, false);
|
||
} else {
|
||
invokePay();
|
||
}
|
||
}
|
||
const diaoqu = () => {
|
||
const urlpost = `https://www.focusnu.com/nursingunit_0010507/weiXinPay/native`;
|
||
const payload = {
|
||
title: "测试订单",
|
||
openId: openid.value,
|
||
amountPrice: amount2.value,
|
||
orgCode: "组织id",
|
||
nursingUnit: "护理单元id",
|
||
customerId: "顾客id",
|
||
orderType: "订单类型",
|
||
price: 1,
|
||
count: 1,
|
||
unit: "单位"
|
||
};
|
||
formatAppLog("log", "at pages/pay/index.vue:77", "???/", payload);
|
||
fetch(urlpost, {
|
||
method: "POST",
|
||
headers: {
|
||
"Content-Type": "application/json"
|
||
},
|
||
body: JSON.stringify(payload)
|
||
}).then((res) => res.json()).then((data) => {
|
||
if (data.appId) {
|
||
callWeixinPay(data);
|
||
} else {
|
||
uni.showToast({
|
||
title: "支付失败",
|
||
icon: "error"
|
||
});
|
||
}
|
||
}).catch((err) => {
|
||
formatAppLog("error", "at pages/pay/index.vue:97", "请求失败:", err);
|
||
});
|
||
};
|
||
const saveurl = vue.ref("");
|
||
const openid = vue.ref("");
|
||
function initiatePayment() {
|
||
if (!amount2.value)
|
||
return;
|
||
loading.value = true;
|
||
statusMessage.value = "拉起微信支付...";
|
||
uni.getStorage({
|
||
key: "serverUrl",
|
||
success: function(res) {
|
||
formatAppLog("log", "at pages/pay/index.vue:109", "读取缓存:", res.data.url);
|
||
saveurl.value = res.data.url;
|
||
}
|
||
});
|
||
uni.getStorage({
|
||
key: "openid",
|
||
success: function(res) {
|
||
formatAppLog("log", "at pages/pay/index.vue:117", "读取缓存:", res.data.openid);
|
||
openid.value = res.data.openid;
|
||
}
|
||
});
|
||
diaoqu();
|
||
}
|
||
const __returned__ = { amount: amount2, loading, statusMessage, payData, callWeixinPay, diaoqu, saveurl, openid, initiatePayment, ref: vue.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("div", { class: "container" }, [
|
||
vue.createElementVNode("div", { class: "input-group" }, [
|
||
vue.withDirectives(vue.createElementVNode(
|
||
"input",
|
||
{
|
||
type: "number",
|
||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.amount = $event),
|
||
placeholder: "请输入金额",
|
||
class: "amount-input"
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
), [
|
||
[vue.vModelText, $setup.amount]
|
||
]),
|
||
vue.createElementVNode("button", {
|
||
onClick: $setup.initiatePayment,
|
||
disabled: $setup.loading || !$setup.amount,
|
||
class: "pay-btn"
|
||
}, " 支付 ", 8, ["disabled"])
|
||
]),
|
||
$setup.statusMessage ? (vue.openBlock(), vue.createElementBlock("div", {
|
||
key: 0,
|
||
class: "status-group"
|
||
}, [
|
||
vue.createElementVNode(
|
||
"p",
|
||
null,
|
||
vue.toDisplayString($setup.statusMessage),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])) : vue.createCommentVNode("v-if", true)
|
||
]);
|
||
}
|
||
const PagesPayIndex = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-d7fd7b38"], ["__file", "D:/hldy_xcx/pages/pay/index.vue"]]);
|
||
const block0 = (Comp) => {
|
||
(Comp.$renderjs || (Comp.$renderjs = [])).push("cropper");
|
||
(Comp.$renderjsModules || (Comp.$renderjsModules = {}))["cropper"] = "c0c7256a";
|
||
};
|
||
const AREA_SIZE = 75;
|
||
const IMG_SIZE = 300;
|
||
const _sfc_main$2 = {
|
||
name: "qf-image-cropper",
|
||
props: {
|
||
/** 图片资源地址 */
|
||
src: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
/** 裁剪宽度,有些平台或设备对于canvas的尺寸有限制,过大可能会导致无法正常绘制 */
|
||
width: {
|
||
type: Number,
|
||
default: IMG_SIZE
|
||
},
|
||
/** 裁剪高度,有些平台或设备对于canvas的尺寸有限制,过大可能会导致无法正常绘制 */
|
||
height: {
|
||
type: Number,
|
||
default: IMG_SIZE
|
||
},
|
||
/** 是否绘制裁剪区域边框 */
|
||
showBorder: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 是否绘制裁剪区域网格参考线 */
|
||
showGrid: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 是否展示四个支持伸缩的角 */
|
||
showAngle: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 裁剪区域最小缩放倍数 */
|
||
areaScale: {
|
||
type: Number,
|
||
default: 0.3
|
||
},
|
||
/** 图片最小缩放倍数 */
|
||
minScale: {
|
||
type: Number,
|
||
default: 0.3
|
||
},
|
||
/** 图片最大缩放倍数 */
|
||
maxScale: {
|
||
type: Number,
|
||
default: 2
|
||
},
|
||
/** 检查图片位置是否超出裁剪边界,如果超出则会矫正位置 */
|
||
checkRange: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
/** 生成图片背景色:如果裁剪区域没有完全包含在图片中时,不设置该属性生成图片存在一定的透明块 */
|
||
backgroundColor: {
|
||
type: String
|
||
},
|
||
/** 是否有回弹效果:当 checkRange 为 true 时有效,拖动时可以拖出边界,释放时会弹回边界 */
|
||
bounce: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 是否支持翻转 */
|
||
rotatable: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 是否支持逆向翻转 */
|
||
reverseRotatable: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
/** 是否支持从本地选择素材 */
|
||
choosable: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
/** 是否开启硬件加速,图片缩放过程中如果出现元素的“留影”或“重影”效果,可通过该方式解决或减轻这一问题 */
|
||
gpu: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
/** 四个角尺寸,单位px */
|
||
angleSize: {
|
||
type: Number,
|
||
default: 20
|
||
},
|
||
/** 四个角边框宽度,单位px */
|
||
angleBorderWidth: {
|
||
type: Number,
|
||
default: 2
|
||
},
|
||
zIndex: {
|
||
type: [Number, String]
|
||
},
|
||
/** 裁剪图片圆角半径,单位px */
|
||
radius: {
|
||
type: Number,
|
||
default: 60
|
||
},
|
||
/** 生成文件的类型,只支持 'jpg' 或 'png'。默认为 'png' */
|
||
fileType: {
|
||
type: String,
|
||
default: "png"
|
||
},
|
||
/**
|
||
* 图片从绘制到生成所需时间,单位ms
|
||
* 微信小程序平台使用 `Canvas 2D` 绘制时有效
|
||
* 如绘制大图或出现裁剪图片空白等情况应适当调大该值,因 `Canvas 2d` 采用同步绘制,需自己把控绘制完成时间
|
||
*/
|
||
delay: {
|
||
type: Number,
|
||
default: 1e3
|
||
}
|
||
},
|
||
emits: ["crop"],
|
||
data() {
|
||
return {
|
||
// 用不同 id 使 v-for key 不重复
|
||
maskList: [
|
||
{
|
||
id: "crop-mask-block-1"
|
||
},
|
||
{
|
||
id: "crop-mask-block-2"
|
||
},
|
||
{
|
||
id: "crop-mask-block-3"
|
||
},
|
||
{
|
||
id: "crop-mask-block-4"
|
||
}
|
||
],
|
||
gridList: [
|
||
{
|
||
id: "crop-grid-1"
|
||
},
|
||
{
|
||
id: "crop-grid-2"
|
||
},
|
||
{
|
||
id: "crop-grid-3"
|
||
},
|
||
{
|
||
id: "crop-grid-4"
|
||
}
|
||
],
|
||
angleList: [
|
||
{
|
||
id: "crop-angle-1"
|
||
},
|
||
{
|
||
id: "crop-angle-2"
|
||
},
|
||
{
|
||
id: "crop-angle-3"
|
||
},
|
||
{
|
||
id: "crop-angle-4"
|
||
}
|
||
],
|
||
/** 本地缓存的图片路径 */
|
||
imgSrc: "",
|
||
/** 图片的裁剪宽度 */
|
||
imgWidth: IMG_SIZE,
|
||
/** 图片的裁剪高度 */
|
||
imgHeight: IMG_SIZE,
|
||
/** 裁剪区域最大宽度所占屏幕宽度百分比 */
|
||
widthPercent: AREA_SIZE,
|
||
/** 裁剪区域最大高度所占屏幕宽度百分比 */
|
||
heightPercent: AREA_SIZE,
|
||
/** 裁剪区域布局信息 */
|
||
area: {},
|
||
/** 未被缩放过的图片宽 */
|
||
oldWidth: 0,
|
||
/** 未被缩放过的图片高 */
|
||
oldHeight: 0,
|
||
/** 系统信息 */
|
||
sys: uni.getSystemInfoSync(),
|
||
scaleWidth: 0,
|
||
scaleHeight: 0,
|
||
rotate: 0,
|
||
offsetX: 0,
|
||
offsetY: 0,
|
||
use2d: false,
|
||
canvansWidth: 0,
|
||
canvansHeight: 0
|
||
// imageStyles: {},
|
||
// maskStylesList: [{}, {}, {}, {}],
|
||
// borderStyles: {},
|
||
// gridStylesList: [{}, {}, {}, {}],
|
||
// angleStylesList: [{}, {}, {}, {}],
|
||
// circleBoxStyles: {},
|
||
// circleStyles: {},
|
||
};
|
||
},
|
||
computed: {
|
||
initData() {
|
||
return {
|
||
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
||
area: {
|
||
...this.area,
|
||
bounce: this.bounce,
|
||
showBorder: this.showBorder,
|
||
showGrid: this.showGrid,
|
||
showAngle: this.showAngle,
|
||
angleSize: this.angleSize,
|
||
angleBorderWidth: this.angleBorderWidth,
|
||
minScale: this.areaScale,
|
||
widthPercent: this.widthPercent,
|
||
heightPercent: this.heightPercent,
|
||
radius: this.radius,
|
||
checkRange: this.checkRange,
|
||
zIndex: +this.zIndex || 0
|
||
},
|
||
sys: this.sys,
|
||
img: {
|
||
minScale: this.minScale,
|
||
maxScale: this.maxScale,
|
||
src: this.imgSrc,
|
||
width: this.oldWidth,
|
||
height: this.oldHeight,
|
||
oldWidth: this.oldWidth,
|
||
oldHeight: this.oldHeight,
|
||
gpu: this.gpu
|
||
}
|
||
};
|
||
},
|
||
imgProps() {
|
||
return {
|
||
width: this.width,
|
||
height: this.height,
|
||
src: this.src
|
||
};
|
||
}
|
||
},
|
||
watch: {
|
||
imgProps: {
|
||
handler(val, oldVal) {
|
||
this.imgWidth = Number(val.width) || IMG_SIZE;
|
||
this.imgHeight = Number(val.height) || IMG_SIZE;
|
||
let use2d = true;
|
||
use2d = false;
|
||
let canvansWidth = this.imgWidth;
|
||
let canvansHeight = this.imgHeight;
|
||
let size = Math.max(canvansWidth, canvansHeight);
|
||
let scalc = 1;
|
||
if (size > 1365) {
|
||
scalc = 1365 / size;
|
||
}
|
||
this.canvansWidth = canvansWidth * scalc;
|
||
this.canvansHeight = canvansHeight * scalc;
|
||
this.use2d = use2d;
|
||
this.initArea();
|
||
const src = val.src || this.imgSrc;
|
||
src && this.initImage(src, oldVal === void 0);
|
||
},
|
||
immediate: true
|
||
}
|
||
},
|
||
methods: {
|
||
/** 提供给wxs调用,用来接收图片变更数据 */
|
||
dataChange(e) {
|
||
this.scaleWidth = e.width;
|
||
this.scaleHeight = e.height;
|
||
this.rotate = e.rotate;
|
||
this.offsetX = e.x;
|
||
this.offsetY = e.y;
|
||
},
|
||
/** 初始化裁剪区域布局信息 */
|
||
initArea() {
|
||
this.sys.offsetBottom = uni.upx2px(100) + this.sys.safeAreaInsets.bottom;
|
||
this.sys.windowTop = 0;
|
||
this.sys.navigation = true;
|
||
let wp = this.widthPercent;
|
||
let hp = this.heightPercent;
|
||
if (this.imgWidth > this.imgHeight) {
|
||
hp = hp * this.imgHeight / this.imgWidth;
|
||
} else if (this.imgWidth < this.imgHeight) {
|
||
wp = wp * this.imgWidth / this.imgHeight;
|
||
}
|
||
const size = this.sys.windowWidth > this.sys.windowHeight ? this.sys.windowHeight : this.sys.windowWidth;
|
||
const width = size * wp / 100;
|
||
const height = size * hp / 100;
|
||
const left = (this.sys.windowWidth - width) / 2;
|
||
const right = left + width;
|
||
const top = (this.sys.windowHeight + this.sys.windowTop - this.sys.offsetBottom - height) / 2;
|
||
const bottom = this.sys.windowHeight + this.sys.windowTop - this.sys.offsetBottom - top;
|
||
this.area = {
|
||
width,
|
||
height,
|
||
left,
|
||
right,
|
||
top,
|
||
bottom
|
||
};
|
||
this.scaleWidth = width;
|
||
this.scaleHeight = height;
|
||
},
|
||
/** 从本地选取图片 */
|
||
chooseImage(options) {
|
||
uni.chooseImage({
|
||
...options,
|
||
count: 1,
|
||
success: (res) => {
|
||
this.resetData();
|
||
this.initImage(res.tempFiles[0].path);
|
||
}
|
||
});
|
||
},
|
||
/** 重置数据 */
|
||
resetData() {
|
||
this.imgSrc = "";
|
||
this.rotate = 0;
|
||
this.offsetX = 0;
|
||
this.offsetY = 0;
|
||
this.initArea();
|
||
},
|
||
/**
|
||
* 初始化图片信息
|
||
* @param {String} url 图片链接
|
||
*/
|
||
initImage(url2, isFirst) {
|
||
uni.getImageInfo({
|
||
src: url2,
|
||
success: async (res) => {
|
||
if (isFirst && this.src === url2)
|
||
await new Promise((resolve) => setTimeout(
|
||
resolve,
|
||
50
|
||
));
|
||
this.imgSrc = res.path;
|
||
let scale = res.width / res.height;
|
||
let areaScale = this.area.width / this.area.height;
|
||
if (scale > 1) {
|
||
if (scale >= areaScale) {
|
||
this.scaleWidth = this.scaleHeight / res.height * this.scaleWidth * (res.width / this.scaleWidth);
|
||
} else {
|
||
this.scaleHeight = res.height * this.scaleWidth / res.width;
|
||
}
|
||
} else {
|
||
if (scale <= areaScale) {
|
||
this.scaleHeight = this.scaleWidth / res.width * this.scaleHeight / (this.scaleHeight / res.height);
|
||
} else {
|
||
this.scaleWidth = res.width * this.scaleHeight / res.height;
|
||
}
|
||
}
|
||
this.oldWidth = +this.scaleWidth.toFixed(2);
|
||
this.oldHeight = +this.scaleHeight.toFixed(2);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue:493", err);
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 剪切图片圆角
|
||
* @param {Object} ctx canvas 的绘图上下文对象
|
||
* @param {Number} radius 圆角半径
|
||
* @param {Number} scale 生成图片的实际尺寸与截取区域比
|
||
* @param {Function} drawImage 执行剪切时所调用的绘图方法,入参为是否执行了剪切
|
||
*/
|
||
drawClipImage(ctx, radius, scale, drawImage) {
|
||
if (radius > 0) {
|
||
ctx.save();
|
||
ctx.beginPath();
|
||
const w = this.canvansWidth;
|
||
const h = this.canvansHeight;
|
||
if (w === h && radius >= w / 2) {
|
||
ctx.arc(w / 2, h / 2, w / 2, 0, 2 * Math.PI);
|
||
} else {
|
||
if (w !== h) {
|
||
radius = Math.min(w / 2, h / 2, radius);
|
||
}
|
||
ctx.moveTo(radius, 0);
|
||
ctx.arcTo(w, 0, w, h, radius);
|
||
ctx.arcTo(w, h, 0, h, radius);
|
||
ctx.arcTo(0, h, 0, 0, radius);
|
||
ctx.arcTo(0, 0, w, 0, radius);
|
||
ctx.closePath();
|
||
}
|
||
ctx.clip();
|
||
drawImage && drawImage(true);
|
||
ctx.restore();
|
||
} else {
|
||
drawImage && drawImage(false);
|
||
}
|
||
},
|
||
/**
|
||
* 旋转图片
|
||
* @param {Object} ctx canvas 的绘图上下文对象
|
||
* @param {Number} rotate 旋转角度
|
||
* @param {Number} scale 生成图片的实际尺寸与截取区域比
|
||
*/
|
||
drawRotateImage(ctx, rotate, scale) {
|
||
if (rotate !== 0) {
|
||
const x = this.scaleWidth * scale / 2;
|
||
const y = this.scaleHeight * scale / 2;
|
||
ctx.translate(x, y);
|
||
ctx.rotate(rotate * Math.PI / 180);
|
||
ctx.translate(-x, -y);
|
||
}
|
||
},
|
||
drawImage(ctx, image2, callback) {
|
||
const scale = this.canvansWidth / this.area.width;
|
||
if (this.backgroundColor) {
|
||
if (ctx.setFillStyle)
|
||
ctx.setFillStyle(this.backgroundColor);
|
||
else
|
||
ctx.fillStyle = this.backgroundColor;
|
||
ctx.fillRect(0, 0, this.canvansWidth, this.canvansHeight);
|
||
}
|
||
this.drawClipImage(ctx, this.radius, scale, () => {
|
||
this.drawRotateImage(ctx, this.rotate, scale);
|
||
const r = this.rotate / 90;
|
||
ctx.drawImage(
|
||
image2,
|
||
[
|
||
this.offsetX - this.area.left,
|
||
this.offsetY - this.area.top,
|
||
-(this.offsetX - this.area.left),
|
||
-(this.offsetY - this.area.top)
|
||
][r] * scale,
|
||
[
|
||
this.offsetY - this.area.top,
|
||
-(this.offsetX - this.area.left),
|
||
-(this.offsetY - this.area.top),
|
||
this.offsetX - this.area.left
|
||
][r] * scale,
|
||
this.scaleWidth * scale,
|
||
this.scaleHeight * scale
|
||
);
|
||
});
|
||
},
|
||
/**
|
||
* 绘图
|
||
* @param {Object} canvas
|
||
* @param {Object} ctx canvas 的绘图上下文对象
|
||
* @param {String} src 图片路径
|
||
* @param {Function} callback 开始绘制时回调
|
||
*/
|
||
draw2DImage(canvas, ctx, src, callback) {
|
||
if (canvas) {
|
||
const image2 = canvas.createImage();
|
||
image2.onload = () => {
|
||
this.drawImage(ctx, image2);
|
||
callback && setTimeout(callback, this.delay);
|
||
};
|
||
image2.onerror = (err) => {
|
||
formatAppLog("error", "at uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue:596", err);
|
||
uni.hideLoading();
|
||
};
|
||
image2.src = src;
|
||
} else {
|
||
this.drawImage(ctx, src);
|
||
setTimeout(() => {
|
||
ctx.draw(false, callback);
|
||
}, 200);
|
||
}
|
||
},
|
||
/**
|
||
* 画布转图片到本地缓存
|
||
* @param {Object} canvas
|
||
* @param {String} canvasId
|
||
*/
|
||
canvasToTempFilePath(canvas, canvasId) {
|
||
uni.canvasToTempFilePath({
|
||
canvas,
|
||
canvasId,
|
||
x: 0,
|
||
y: 0,
|
||
width: this.canvansWidth,
|
||
height: this.canvansHeight,
|
||
destWidth: this.imgWidth,
|
||
// 必要,保证生成图片宽度不受设备分辨率影响
|
||
destHeight: this.imgHeight,
|
||
// 必要,保证生成图片高度不受设备分辨率影响
|
||
fileType: this.fileType,
|
||
// 目标文件的类型,默认png
|
||
success: (res) => {
|
||
this.handleImage(res.tempFilePath);
|
||
},
|
||
fail: (err) => {
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title: "裁剪失败,生成图片异常!",
|
||
icon: "none"
|
||
});
|
||
}
|
||
}, this);
|
||
},
|
||
/** 确认裁剪 */
|
||
cropClick() {
|
||
uni.showLoading({
|
||
title: "裁剪中...",
|
||
mask: true
|
||
});
|
||
if (!this.use2d) {
|
||
const ctx = uni.createCanvasContext("imgCanvas", this);
|
||
ctx.clearRect(0, 0, this.canvansWidth, this.canvansHeight);
|
||
this.draw2DImage(null, ctx, this.imgSrc, () => {
|
||
this.canvasToTempFilePath(null, "imgCanvas");
|
||
});
|
||
return;
|
||
}
|
||
},
|
||
handleImage(tempFilePath) {
|
||
uni.hideLoading();
|
||
this.$emit("crop", {
|
||
tempFilePath
|
||
});
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
class: "image-cropper",
|
||
style: vue.normalizeStyle({ zIndex: $props.zIndex }),
|
||
onWheel: _cache[9] || (_cache[9] = (...args) => _ctx.cropper.mousewheel && _ctx.cropper.mousewheel(...args))
|
||
},
|
||
[
|
||
$data.use2d ? (vue.openBlock(), vue.createElementBlock(
|
||
"canvas",
|
||
{
|
||
key: 0,
|
||
type: "2d",
|
||
id: "imgCanvas",
|
||
class: "img-canvas",
|
||
style: vue.normalizeStyle({
|
||
width: `${$data.canvansWidth}px`,
|
||
height: `${$data.canvansHeight}px`
|
||
})
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)) : (vue.openBlock(), vue.createElementBlock(
|
||
"canvas",
|
||
{
|
||
key: 1,
|
||
id: "imgCanvas",
|
||
"canvas-id": "imgCanvas",
|
||
class: "img-canvas",
|
||
style: vue.normalizeStyle({
|
||
width: `${$data.canvansWidth}px`,
|
||
height: `${$data.canvansHeight}px`
|
||
})
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)),
|
||
vue.createElementVNode("view", { class: "whitefont" }, [
|
||
vue.createElementVNode("view", { class: "action-bar-special" }, [
|
||
vue.createElementVNode("view", {
|
||
class: "rotate-icon",
|
||
onClick: _cache[0] || (_cache[0] = () => {
|
||
})
|
||
})
|
||
]),
|
||
vue.createElementVNode("view", { class: "" }, " 请调整图片尺寸,放入取景框内 ")
|
||
]),
|
||
vue.createElementVNode("view", {
|
||
id: "pic-preview",
|
||
class: "pic-preview",
|
||
"change:init": _ctx.cropper.initObserver,
|
||
init: vue.wp($options.initData),
|
||
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.cropper.touchstart && _ctx.cropper.touchstart(...args)),
|
||
onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.cropper.touchmove && _ctx.cropper.touchmove(...args)),
|
||
onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.cropper.touchend && _ctx.cropper.touchend(...args))
|
||
}, [
|
||
$data.imgSrc ? (vue.openBlock(), vue.createElementBlock("image", {
|
||
key: 0,
|
||
id: "crop-image",
|
||
class: "crop-image",
|
||
style: vue.normalizeStyle(_ctx.cropper.imageStyles),
|
||
src: $data.imgSrc,
|
||
webp: ""
|
||
}, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
|
||
(vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
null,
|
||
vue.renderList($data.maskList, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: item.id,
|
||
id: item.id,
|
||
class: "crop-mask-block",
|
||
style: vue.normalizeStyle(_ctx.cropper.maskStylesList[index])
|
||
}, null, 12, ["id"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)),
|
||
$props.showBorder ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
id: "crop-border",
|
||
class: "crop-border"
|
||
}, [
|
||
vue.createElementVNode("view", { class: "border-son" })
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
$props.radius > 0 ? (vue.openBlock(), vue.createElementBlock(
|
||
"view",
|
||
{
|
||
key: 2,
|
||
id: "crop-circle-box",
|
||
class: "crop-circle-box",
|
||
style: vue.normalizeStyle(_ctx.cropper.circleBoxStyles)
|
||
},
|
||
[
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "crop-circle",
|
||
id: "crop-circle",
|
||
style: vue.normalizeStyle(_ctx.cropper.circleStyles)
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
$props.showGrid ? (vue.openBlock(true), vue.createElementBlock(
|
||
vue.Fragment,
|
||
{ key: 3 },
|
||
vue.renderList($data.gridList, (item, index) => {
|
||
return vue.openBlock(), vue.createElementBlock("view", {
|
||
key: item.id,
|
||
id: item.id,
|
||
class: "crop-grid",
|
||
style: vue.normalizeStyle(_ctx.cropper.gridStylesList[index])
|
||
}, null, 12, ["id"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(' <block v-if="showAngle">\r\n <view v-for="(item, index) in angleList" :key="item.id" :id="item.id" class="crop-angle"\r\n :style="cropper.angleStylesList[index]">\r\n <view :style="[{\r\n width: `${angleSize}px`,\r\n height: `${angleSize}px`\r\n }]"></view>\r\n </view>\r\n </block> ')
|
||
], 40, ["change:init", "init"]),
|
||
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
||
vue.createElementVNode(
|
||
"view",
|
||
{
|
||
class: "fixed-bottom safe-area-inset-bottom",
|
||
style: vue.normalizeStyle({ zIndex: $options.initData.area.zIndex + 99 })
|
||
},
|
||
[
|
||
($props.rotatable || $props.reverseRotatable) && !!$data.imgSrc ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "action-bar"
|
||
}, [
|
||
$props.reverseRotatable ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "rotate-icon",
|
||
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.cropper.rotateImage270 && _ctx.cropper.rotateImage270(...args))
|
||
})) : vue.createCommentVNode("v-if", true),
|
||
$props.rotatable ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "rotate-icon is-reverse",
|
||
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.cropper.rotateImage90 && _ctx.cropper.rotateImage90(...args))
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
($props.rotatable || $props.reverseRotatable) && !!$data.imgSrc ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "action-bar-anther"
|
||
}, [
|
||
$props.reverseRotatable ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 0,
|
||
class: "rotate-icon",
|
||
onClick: _cache[6] || (_cache[6] = (...args) => $options.chooseImage && $options.chooseImage(...args))
|
||
})) : vue.createCommentVNode("v-if", true),
|
||
$props.rotatable ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 1,
|
||
class: "rotate-icon is-reverse",
|
||
onClick: _cache[7] || (_cache[7] = (...args) => $options.chooseImage && $options.chooseImage(...args))
|
||
})) : vue.createCommentVNode("v-if", true)
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
($props.rotatable || $props.reverseRotatable) && !!$data.imgSrc ? (vue.openBlock(), vue.createElementBlock("view", {
|
||
key: 2,
|
||
class: "action-bar-right",
|
||
onClick: _cache[8] || (_cache[8] = (...args) => $options.cropClick && $options.cropClick(...args))
|
||
}, [
|
||
vue.createTextVNode(" 确认 "),
|
||
vue.createCommentVNode(' <view v-if="reverseRotatable" class="rotate-icon" @click="cropper.rotateImage270"></view> '),
|
||
vue.createCommentVNode(' <view v-if="rotatable" class="rotate-icon is-reverse" @click="cropper.rotateImage90"></view> ')
|
||
])) : vue.createCommentVNode("v-if", true),
|
||
vue.createCommentVNode(' <view v-if="!choosable" class="choose-btn" @click="cropClick">确定</view> '),
|
||
vue.createCommentVNode(' <block v-else-if="!!imgSrc">\r\n <view class="rechoose" @click="chooseImage">重选</view>\r\n <button class="button" size="mini" @click="cropClick">确定</button>\r\n </block> '),
|
||
vue.createCommentVNode(' <view v-else class="choose-btn" @click="chooseImage">选择图片</view> ')
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)
|
||
],
|
||
36
|
||
/* STYLE, NEED_HYDRATION */
|
||
);
|
||
}
|
||
if (typeof block0 === "function")
|
||
block0(_sfc_main$2);
|
||
const QfImageCropper = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7129956f"], ["__file", "D:/hldy_xcx/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue"]]);
|
||
const _sfc_main$1 = {
|
||
__name: "camera",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const src = vue.ref("");
|
||
const type = vue.ref(0);
|
||
const width = vue.ref(900);
|
||
const height = vue.ref(600);
|
||
const handleCrop = (e) => {
|
||
uni.setStorageSync(`imgkey${type.value}`, e.tempFilePath);
|
||
uni.navigateBack();
|
||
};
|
||
onLoad((options) => {
|
||
src.value = options.url;
|
||
type.value = options.type;
|
||
if (options.size) {
|
||
width.value = 1500;
|
||
height.value = 1e3;
|
||
}
|
||
});
|
||
const __returned__ = { src, type, width, height, handleCrop, ref: vue.ref, get onLoad() {
|
||
return onLoad;
|
||
}, QfImageCropper };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return vue.openBlock(), vue.createElementBlock("view", null, [
|
||
vue.createCommentVNode(" https://ext.dcloud.net.cn/plugin?id=10333,文档在这里,自己看 "),
|
||
vue.createVNode($setup["QfImageCropper"], {
|
||
src: $setup.src,
|
||
width: $setup.width,
|
||
height: $setup.height,
|
||
radius: 10,
|
||
onCrop: $setup.handleCrop
|
||
}, null, 8, ["src", "width", "height"])
|
||
]);
|
||
}
|
||
const CompontentPublicCamera = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/hldy_xcx/compontent/public/camera.vue"]]);
|
||
__definePage("pages/login/callback", PagesLoginCallback);
|
||
__definePage("pages/login/index", PagesLoginIndex);
|
||
__definePage("pages/login/phonebumber", PagesLoginPhonebumber);
|
||
__definePage("pages/login/threeselectone", PagesLoginThreeselectone);
|
||
__definePage("pages/login/threeselectonespec", PagesLoginThreeselectonespec);
|
||
__definePage("pages/login/workjoin", PagesLoginWorkjoin);
|
||
__definePage("pages/login/workjoinsuccess", PagesLoginWorkjoinsuccess);
|
||
__definePage("pages/login/code", PagesLoginCode);
|
||
__definePage("pages/login/protocol", PagesLoginProtocol);
|
||
__definePage("pages/login/special", PagesLoginSpecial);
|
||
__definePage("pages/login/specialsmall", PagesLoginSpecialsmall);
|
||
__definePage("pages/login/specialloginafther", PagesLoginSpecialloginafther);
|
||
__definePage("pages/login/xuanchuan", PagesLoginXuanchuan);
|
||
__definePage("pages/index/index", PagesIndexIndex);
|
||
__definePage("pages/index/mine", PagesIndexMine);
|
||
__definePage("pages/addoldman/hukou", PagesAddoldmanHukou);
|
||
__definePage("pages/addoldman/yibao", PagesAddoldmanYibao);
|
||
__definePage("pages/addoldman/IDcard", PagesAddoldmanIDcard);
|
||
__definePage("pages/selectunit/map", PagesSelectunitMap);
|
||
__definePage("pages/addjigou/all", PagesAddjigouAll);
|
||
__definePage("pages/addjigou/where", PagesAddjigouWhere);
|
||
__definePage("pages/addjigou/name", PagesAddjigouName);
|
||
__definePage("pages/addjigou/card", PagesAddjigouCard);
|
||
__definePage("pages/pay/index", PagesPayIndex);
|
||
__definePage("compontent/public/camera", CompontentPublicCamera);
|
||
const _sfc_main = {
|
||
onLaunch: function() {
|
||
formatAppLog("log", "at App.vue:4", "App Launch");
|
||
},
|
||
onShow: function() {
|
||
formatAppLog("log", "at App.vue:7", "App Show");
|
||
},
|
||
onHide: function() {
|
||
formatAppLog("log", "at App.vue:10", "App Hide");
|
||
}
|
||
};
|
||
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/hldy_xcx/App.vue"]]);
|
||
const mixin = {
|
||
data() {
|
||
return {};
|
||
},
|
||
onLoad() {
|
||
this.$u.getRect = this.$uGetRect;
|
||
},
|
||
methods: {
|
||
// 查询节点信息
|
||
// 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
|
||
// 解决办法为在组件根部再套一个没有任何作用的view元素
|
||
$uGetRect(selector, all) {
|
||
return new Promise((resolve) => {
|
||
uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
|
||
if (all && Array.isArray(rect) && rect.length) {
|
||
resolve(rect);
|
||
}
|
||
if (!all && rect) {
|
||
resolve(rect);
|
||
}
|
||
}).exec();
|
||
});
|
||
},
|
||
getParentData(parentName = "") {
|
||
if (!this.parent)
|
||
this.parent = false;
|
||
this.parent = this.$u.$parent.call(this, parentName);
|
||
if (this.parent) {
|
||
Object.keys(this.parentData).map((key) => {
|
||
this.parentData[key] = this.parent[key];
|
||
});
|
||
this.parentData.value = this.parent.modelValue;
|
||
}
|
||
},
|
||
// 阻止事件冒泡
|
||
preventEvent(e) {
|
||
e && e.stopPropagation && e.stopPropagation();
|
||
}
|
||
},
|
||
onReachBottom() {
|
||
uni.$emit("uOnReachBottom");
|
||
},
|
||
beforeUnmount() {
|
||
if (this.parent && uni.$u.test.array(this.parent.children)) {
|
||
const childrenList = this.parent.children;
|
||
childrenList.map((child, index) => {
|
||
if (child === this) {
|
||
childrenList.splice(index, 1);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
};
|
||
function isArray(arr) {
|
||
return Object.prototype.toString.call(arr) === "[object Array]";
|
||
}
|
||
function deepClone(obj) {
|
||
if ([null, void 0, NaN, false].includes(obj))
|
||
return obj;
|
||
if (typeof obj !== "object" && typeof obj !== "function") {
|
||
return obj;
|
||
}
|
||
var o = isArray(obj) ? [] : {};
|
||
for (let i in obj) {
|
||
if (obj.hasOwnProperty(i)) {
|
||
o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
|
||
}
|
||
}
|
||
return o;
|
||
}
|
||
function deepMerge(target = {}, source = {}) {
|
||
target = deepClone(target);
|
||
if (typeof target !== "object" || typeof source !== "object")
|
||
return false;
|
||
for (var prop in source) {
|
||
if (!source.hasOwnProperty(prop))
|
||
continue;
|
||
if (prop in target) {
|
||
if (typeof target[prop] !== "object") {
|
||
target[prop] = source[prop];
|
||
} else {
|
||
if (typeof source[prop] !== "object") {
|
||
target[prop] = source[prop];
|
||
} else {
|
||
if (target[prop].concat && source[prop].concat) {
|
||
target[prop] = target[prop].concat(source[prop]);
|
||
} else {
|
||
target[prop] = deepMerge(target[prop], source[prop]);
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
target[prop] = source[prop];
|
||
}
|
||
}
|
||
return target;
|
||
}
|
||
function email(value) {
|
||
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
|
||
}
|
||
function mobile(value) {
|
||
return /^1[23456789]\d{9}$/.test(value);
|
||
}
|
||
function url(value) {
|
||
return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
|
||
}
|
||
function date(value) {
|
||
if (!value)
|
||
return false;
|
||
if (number(value))
|
||
value = +value;
|
||
return !/Invalid|NaN/.test(new Date(value).toString());
|
||
}
|
||
function dateISO(value) {
|
||
return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
|
||
}
|
||
function number(value) {
|
||
return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
|
||
}
|
||
function digits(value) {
|
||
return /^\d+$/.test(value);
|
||
}
|
||
function idCard(value) {
|
||
return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
|
||
value
|
||
);
|
||
}
|
||
function carNo(value) {
|
||
const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
|
||
const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
|
||
if (value.length === 7) {
|
||
return creg.test(value);
|
||
} else if (value.length === 8) {
|
||
return xreg.test(value);
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
function amount(value) {
|
||
return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
|
||
}
|
||
function chinese(value) {
|
||
let reg = /^[\u4e00-\u9fa5]+$/gi;
|
||
return reg.test(value);
|
||
}
|
||
function letter(value) {
|
||
return /^[a-zA-Z]*$/.test(value);
|
||
}
|
||
function enOrNum(value) {
|
||
let reg = /^[0-9a-zA-Z]*$/g;
|
||
return reg.test(value);
|
||
}
|
||
function contains(value, param) {
|
||
return value.indexOf(param) >= 0;
|
||
}
|
||
function range(value, param) {
|
||
return value >= param[0] && value <= param[1];
|
||
}
|
||
function rangeLength(value, param) {
|
||
return value.length >= param[0] && value.length <= param[1];
|
||
}
|
||
function landline(value) {
|
||
let reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
|
||
return reg.test(value);
|
||
}
|
||
function empty(value) {
|
||
switch (typeof value) {
|
||
case "undefined":
|
||
return true;
|
||
case "string":
|
||
if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
|
||
return true;
|
||
break;
|
||
case "boolean":
|
||
if (!value)
|
||
return true;
|
||
break;
|
||
case "number":
|
||
if (0 === value || isNaN(value))
|
||
return true;
|
||
break;
|
||
case "object":
|
||
if (null === value || value.length === 0)
|
||
return true;
|
||
for (var i in value) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
function jsonString(value) {
|
||
if (typeof value == "string") {
|
||
try {
|
||
var obj = JSON.parse(value);
|
||
if (typeof obj == "object" && obj) {
|
||
return true;
|
||
} else {
|
||
return false;
|
||
}
|
||
} catch (e) {
|
||
return false;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function array(value) {
|
||
if (typeof Array.isArray === "function") {
|
||
return Array.isArray(value);
|
||
} else {
|
||
return Object.prototype.toString.call(value) === "[object Array]";
|
||
}
|
||
}
|
||
function object(value) {
|
||
return Object.prototype.toString.call(value) === "[object Object]";
|
||
}
|
||
function code(value, len = 6) {
|
||
return new RegExp(`^\\d{${len}}$`).test(value);
|
||
}
|
||
function func(value) {
|
||
return typeof value === "function";
|
||
}
|
||
function promise(value) {
|
||
return object(value) && func(value.then) && func(value.catch);
|
||
}
|
||
function image(value) {
|
||
const newValue = value.split("?")[0];
|
||
return new RegExp(/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)$/).test(newValue);
|
||
}
|
||
function video(value) {
|
||
const newValue = value.split("?")[0];
|
||
return new RegExp(/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8|3gp)$/).test(newValue);
|
||
}
|
||
function regExp(o) {
|
||
return o && Object.prototype.toString.call(o) === "[object RegExp]";
|
||
}
|
||
function string(value) {
|
||
return typeof value === "string";
|
||
}
|
||
const test = {
|
||
email,
|
||
mobile,
|
||
url,
|
||
date,
|
||
dateISO,
|
||
number,
|
||
digits,
|
||
idCard,
|
||
carNo,
|
||
amount,
|
||
chinese,
|
||
letter,
|
||
enOrNum,
|
||
contains,
|
||
range,
|
||
rangeLength,
|
||
empty,
|
||
isEmpty: empty,
|
||
jsonString,
|
||
landline,
|
||
object,
|
||
array,
|
||
code,
|
||
func,
|
||
promise,
|
||
video,
|
||
image,
|
||
regExp,
|
||
string
|
||
};
|
||
class Request {
|
||
// 设置全局默认配置
|
||
setConfig(customConfig) {
|
||
this.config = deepMerge(this.config, customConfig);
|
||
}
|
||
// 主要请求部分
|
||
request(options = {}) {
|
||
if (this.interceptor.request && typeof this.interceptor.request === "function") {
|
||
let interceptorRequest = this.interceptor.request(options);
|
||
if (interceptorRequest === false) {
|
||
return new Promise(() => {
|
||
});
|
||
}
|
||
this.options = interceptorRequest;
|
||
}
|
||
options.dataType = options.dataType || this.config.dataType;
|
||
options.responseType = options.responseType || this.config.responseType;
|
||
options.url = options.url || "";
|
||
options.params = options.params || {};
|
||
options.header = Object.assign({}, this.config.header, options.header);
|
||
options.method = options.method || this.config.method;
|
||
return new Promise((resolve, reject) => {
|
||
options.complete = (response) => {
|
||
uni.hideLoading();
|
||
clearTimeout(this.config.timer);
|
||
this.config.timer = null;
|
||
if (this.config.originalData) {
|
||
if (this.interceptor.response && typeof this.interceptor.response === "function") {
|
||
let resInterceptors = this.interceptor.response(response);
|
||
if (resInterceptors !== false) {
|
||
resolve(resInterceptors);
|
||
} else {
|
||
reject(response);
|
||
}
|
||
} else {
|
||
resolve(response);
|
||
}
|
||
} else {
|
||
if (response.statusCode == 200) {
|
||
if (this.interceptor.response && typeof this.interceptor.response === "function") {
|
||
let resInterceptors = this.interceptor.response(response.data);
|
||
if (resInterceptors !== false) {
|
||
resolve(resInterceptors);
|
||
} else {
|
||
reject(response.data);
|
||
}
|
||
} else {
|
||
resolve(response.data);
|
||
}
|
||
} else {
|
||
reject(response);
|
||
}
|
||
}
|
||
};
|
||
options.url = test.url(options.url) ? options.url : this.config.baseUrl + (options.url.indexOf("/") == 0 ? options.url : "/" + options.url);
|
||
if (this.config.showLoading && !this.config.timer) {
|
||
this.config.timer = setTimeout(() => {
|
||
uni.showLoading({
|
||
title: this.config.loadingText,
|
||
mask: this.config.loadingMask
|
||
});
|
||
this.config.timer = null;
|
||
}, this.config.loadingTime);
|
||
}
|
||
uni.request(options);
|
||
});
|
||
}
|
||
constructor() {
|
||
this.config = {
|
||
baseUrl: "",
|
||
// 请求的根域名
|
||
// 默认的请求头
|
||
header: {},
|
||
method: "POST",
|
||
// 设置为json,返回后uni.request会对数据进行一次JSON.parse
|
||
dataType: "json",
|
||
// 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
|
||
responseType: "text",
|
||
showLoading: true,
|
||
// 是否显示请求中的loading
|
||
loadingText: "请求中...",
|
||
loadingTime: 800,
|
||
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
|
||
timer: null,
|
||
// 定时器
|
||
originalData: false,
|
||
// 是否在拦截器中返回服务端的原始数据,见文档说明
|
||
loadingMask: true
|
||
// 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
|
||
};
|
||
this.interceptor = {
|
||
// 请求前的拦截
|
||
request: null,
|
||
// 请求后的拦截
|
||
response: null
|
||
};
|
||
this.get = (url2, data = {}, header = {}) => {
|
||
return this.request({
|
||
method: "GET",
|
||
url: url2,
|
||
header,
|
||
data
|
||
});
|
||
};
|
||
this.post = (url2, data = {}, header = {}) => {
|
||
return this.request({
|
||
url: url2,
|
||
method: "POST",
|
||
header,
|
||
data
|
||
});
|
||
};
|
||
this.put = (url2, data = {}, header = {}) => {
|
||
return this.request({
|
||
url: url2,
|
||
method: "PUT",
|
||
header,
|
||
data
|
||
});
|
||
};
|
||
this.delete = (url2, data = {}, header = {}) => {
|
||
return this.request({
|
||
url: url2,
|
||
method: "DELETE",
|
||
header,
|
||
data
|
||
});
|
||
};
|
||
}
|
||
}
|
||
const http = new Request();
|
||
function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
|
||
let prefix = isPrefix ? "?" : "";
|
||
let _result = [];
|
||
if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
|
||
arrayFormat = "brackets";
|
||
for (let key in data) {
|
||
let value = data[key];
|
||
if (["", void 0, null].indexOf(value) >= 0) {
|
||
continue;
|
||
}
|
||
if (value.constructor === Array) {
|
||
switch (arrayFormat) {
|
||
case "indices":
|
||
for (let i = 0; i < value.length; i++) {
|
||
_result.push(key + "[" + i + "]=" + value[i]);
|
||
}
|
||
break;
|
||
case "brackets":
|
||
value.forEach((_value) => {
|
||
_result.push(key + "[]=" + _value);
|
||
});
|
||
break;
|
||
case "repeat":
|
||
value.forEach((_value) => {
|
||
_result.push(key + "=" + _value);
|
||
});
|
||
break;
|
||
case "comma":
|
||
let commaStr = "";
|
||
value.forEach((_value) => {
|
||
commaStr += (commaStr ? "," : "") + _value;
|
||
});
|
||
_result.push(key + "=" + commaStr);
|
||
break;
|
||
default:
|
||
value.forEach((_value) => {
|
||
_result.push(key + "[]=" + _value);
|
||
});
|
||
}
|
||
} else {
|
||
_result.push(key + "=" + value);
|
||
}
|
||
}
|
||
return _result.length ? prefix + _result.join("&") : "";
|
||
}
|
||
class Router {
|
||
constructor() {
|
||
this.config = {
|
||
type: "navigateTo",
|
||
url: "",
|
||
delta: 1,
|
||
// navigateBack页面后退时,回退的层数
|
||
params: {},
|
||
// 传递的参数
|
||
animationType: "pop-in",
|
||
// 窗口动画,只在APP有效
|
||
animationDuration: 300,
|
||
// 窗口动画持续时间,单位毫秒,只在APP有效
|
||
intercept: false
|
||
// 是否需要拦截
|
||
};
|
||
this.route = this.route.bind(this);
|
||
}
|
||
// 判断url前面是否有"/",如果没有则加上,否则无法跳转
|
||
addRootPath(url2) {
|
||
return url2[0] === "/" ? url2 : `/${url2}`;
|
||
}
|
||
// 整合路由参数
|
||
mixinParam(url2, params) {
|
||
url2 = url2 && this.addRootPath(url2);
|
||
let query = "";
|
||
if (/.*\/.*\?.*=.*/.test(url2)) {
|
||
query = uni.$u.queryParams(params, false);
|
||
return url2 += "&" + query;
|
||
} else {
|
||
query = uni.$u.queryParams(params);
|
||
return url2 += query;
|
||
}
|
||
}
|
||
// 对外的方法名称
|
||
async route(options = {}, params = {}) {
|
||
let mergeConfig = {};
|
||
if (typeof options === "string") {
|
||
mergeConfig.url = this.mixinParam(options, params);
|
||
mergeConfig.type = "navigateTo";
|
||
} else {
|
||
mergeConfig = uni.$u.deepClone(options, this.config);
|
||
mergeConfig.url = this.mixinParam(options.url, options.params);
|
||
}
|
||
if (params.intercept) {
|
||
this.config.intercept = params.intercept;
|
||
}
|
||
mergeConfig.params = params;
|
||
mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
|
||
if (typeof uni.$u.routeIntercept === "function") {
|
||
const isNext = await new Promise((resolve, reject) => {
|
||
uni.$u.routeIntercept(mergeConfig, resolve);
|
||
});
|
||
isNext && this.openPage(mergeConfig);
|
||
} else {
|
||
this.openPage(mergeConfig);
|
||
}
|
||
}
|
||
// 执行路由跳转
|
||
openPage(config2) {
|
||
const {
|
||
url: url2,
|
||
type,
|
||
delta,
|
||
animationType,
|
||
animationDuration
|
||
} = config2;
|
||
if (config2.type == "navigateTo" || config2.type == "to") {
|
||
uni.navigateTo({
|
||
url: url2,
|
||
animationType,
|
||
animationDuration
|
||
});
|
||
}
|
||
if (config2.type == "redirectTo" || config2.type == "redirect") {
|
||
uni.redirectTo({
|
||
url: url2
|
||
});
|
||
}
|
||
if (config2.type == "switchTab" || config2.type == "tab") {
|
||
uni.switchTab({
|
||
url: url2
|
||
});
|
||
}
|
||
if (config2.type == "reLaunch" || config2.type == "launch") {
|
||
uni.reLaunch({
|
||
url: url2
|
||
});
|
||
}
|
||
if (config2.type == "navigateBack" || config2.type == "back") {
|
||
uni.navigateBack({
|
||
delta
|
||
});
|
||
}
|
||
}
|
||
}
|
||
const route = new Router().route;
|
||
if (!String.prototype.padStart) {
|
||
String.prototype.padStart = function(maxLength, fillString = " ") {
|
||
if (Object.prototype.toString.call(fillString) !== "[object String]")
|
||
throw new TypeError(
|
||
"fillString must be String"
|
||
);
|
||
let str = this;
|
||
if (str.length >= maxLength)
|
||
return String(str);
|
||
let fillLength = maxLength - str.length, times = Math.ceil(fillLength / fillString.length);
|
||
while (times >>= 1) {
|
||
fillString += fillString;
|
||
if (times === 1) {
|
||
fillString += fillString;
|
||
}
|
||
}
|
||
return fillString.slice(0, fillLength) + str;
|
||
};
|
||
}
|
||
function timeFormat(dateTime = null, fmt = "yyyy-mm-dd") {
|
||
if (!dateTime)
|
||
dateTime = Number(/* @__PURE__ */ new Date());
|
||
if (dateTime.toString().length == 10)
|
||
dateTime *= 1e3;
|
||
let date2 = new Date(dateTime);
|
||
let ret;
|
||
let opt = {
|
||
"y+": date2.getFullYear().toString(),
|
||
// 年
|
||
"m+": (date2.getMonth() + 1).toString(),
|
||
// 月
|
||
"d+": date2.getDate().toString(),
|
||
// 日
|
||
"h+": date2.getHours().toString(),
|
||
// 时
|
||
"M+": date2.getMinutes().toString(),
|
||
// 分
|
||
"s+": date2.getSeconds().toString()
|
||
// 秒
|
||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||
};
|
||
for (let k in opt) {
|
||
ret = new RegExp("(" + k + ")").exec(fmt);
|
||
if (ret) {
|
||
fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
|
||
}
|
||
}
|
||
return fmt;
|
||
}
|
||
function timeFrom(dateTime = null, format = "yyyy-mm-dd") {
|
||
if (!dateTime)
|
||
dateTime = Number(/* @__PURE__ */ new Date());
|
||
if (dateTime.toString().length == 10)
|
||
dateTime *= 1e3;
|
||
let timestamp = +new Date(Number(dateTime));
|
||
let timer = (Number(/* @__PURE__ */ new Date()) - timestamp) / 1e3;
|
||
let tips = "";
|
||
switch (true) {
|
||
case timer < 300:
|
||
tips = "刚刚";
|
||
break;
|
||
case (timer >= 300 && timer < 3600):
|
||
tips = parseInt(timer / 60) + "分钟前";
|
||
break;
|
||
case (timer >= 3600 && timer < 86400):
|
||
tips = parseInt(timer / 3600) + "小时前";
|
||
break;
|
||
case (timer >= 86400 && timer < 2592e3):
|
||
tips = parseInt(timer / 86400) + "天前";
|
||
break;
|
||
default:
|
||
if (format === false) {
|
||
if (timer >= 2592e3 && timer < 365 * 86400) {
|
||
tips = parseInt(timer / (86400 * 30)) + "个月前";
|
||
} else {
|
||
tips = parseInt(timer / (86400 * 365)) + "年前";
|
||
}
|
||
} else {
|
||
tips = timeFormat(timestamp, format);
|
||
}
|
||
}
|
||
return tips;
|
||
}
|
||
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
|
||
let startRGB = hexToRgb(startColor, false);
|
||
let startR = startRGB[0];
|
||
let startG = startRGB[1];
|
||
let startB = startRGB[2];
|
||
let endRGB = hexToRgb(endColor, false);
|
||
let endR = endRGB[0];
|
||
let endG = endRGB[1];
|
||
let endB = endRGB[2];
|
||
let sR = (endR - startR) / step;
|
||
let sG = (endG - startG) / step;
|
||
let sB = (endB - startB) / step;
|
||
let colorArr = [];
|
||
for (let i = 0; i < step; i++) {
|
||
let hex = rgbToHex("rgb(" + Math.round(sR * i + startR) + "," + Math.round(sG * i + startG) + "," + Math.round(sB * i + startB) + ")");
|
||
colorArr.push(hex);
|
||
}
|
||
return colorArr;
|
||
}
|
||
function hexToRgb(sColor, str = true) {
|
||
let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||
sColor = sColor.toLowerCase();
|
||
if (sColor && reg.test(sColor)) {
|
||
if (sColor.length === 4) {
|
||
let sColorNew = "#";
|
||
for (let i = 1; i < 4; i += 1) {
|
||
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
|
||
}
|
||
sColor = sColorNew;
|
||
}
|
||
let sColorChange = [];
|
||
for (let i = 1; i < 7; i += 2) {
|
||
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
|
||
}
|
||
if (!str) {
|
||
return sColorChange;
|
||
} else {
|
||
return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
|
||
}
|
||
} else if (/^(rgb|RGB)/.test(sColor)) {
|
||
let arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||
return arr.map((val) => Number(val));
|
||
} else {
|
||
return sColor;
|
||
}
|
||
}
|
||
function rgbToHex(rgb) {
|
||
let _this = rgb;
|
||
let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||
if (/^(rgb|RGB)/.test(_this)) {
|
||
let aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||
let strHex = "#";
|
||
for (let i = 0; i < aColor.length; i++) {
|
||
let hex = Number(aColor[i]).toString(16);
|
||
hex = String(hex).length == 1 ? "0" + hex : hex;
|
||
if (hex === "0") {
|
||
hex += hex;
|
||
}
|
||
strHex += hex;
|
||
}
|
||
if (strHex.length !== 7) {
|
||
strHex = _this;
|
||
}
|
||
return strHex;
|
||
} else if (reg.test(_this)) {
|
||
let aNum = _this.replace(/#/, "").split("");
|
||
if (aNum.length === 6) {
|
||
return _this;
|
||
} else if (aNum.length === 3) {
|
||
let numHex = "#";
|
||
for (let i = 0; i < aNum.length; i += 1) {
|
||
numHex += aNum[i] + aNum[i];
|
||
}
|
||
return numHex;
|
||
}
|
||
} else {
|
||
return _this;
|
||
}
|
||
}
|
||
function colorToRgba(color2, alpha = 0.3) {
|
||
color2 = rgbToHex(color2);
|
||
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||
let sColor = color2.toLowerCase();
|
||
if (sColor && reg.test(sColor)) {
|
||
if (sColor.length === 4) {
|
||
var sColorNew = "#";
|
||
for (let i = 1; i < 4; i += 1) {
|
||
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
|
||
}
|
||
sColor = sColorNew;
|
||
}
|
||
var sColorChange = [];
|
||
for (let i = 1; i < 7; i += 2) {
|
||
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
|
||
}
|
||
return "rgba(" + sColorChange.join(",") + "," + alpha + ")";
|
||
} else {
|
||
return sColor;
|
||
}
|
||
}
|
||
const colorGradient$1 = {
|
||
colorGradient,
|
||
hexToRgb,
|
||
rgbToHex,
|
||
colorToRgba
|
||
};
|
||
function guid(len = 32, firstU = true, radix = null) {
|
||
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
||
let uuid = [];
|
||
radix = radix || chars.length;
|
||
if (len) {
|
||
for (let i = 0; i < len; i++)
|
||
uuid[i] = chars[0 | Math.random() * radix];
|
||
} else {
|
||
let r;
|
||
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
|
||
uuid[14] = "4";
|
||
for (let i = 0; i < 36; i++) {
|
||
if (!uuid[i]) {
|
||
r = 0 | Math.random() * 16;
|
||
uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
|
||
}
|
||
}
|
||
}
|
||
if (firstU) {
|
||
uuid.shift();
|
||
return "u" + uuid.join("");
|
||
} else {
|
||
return uuid.join("");
|
||
}
|
||
}
|
||
let color = {
|
||
primary: "#2979ff",
|
||
primaryDark: "#2b85e4",
|
||
primaryDisabled: "#a0cfff",
|
||
primaryLight: "#ecf5ff",
|
||
bgColor: "#f3f4f6",
|
||
info: "#909399",
|
||
infoDark: "#82848a",
|
||
infoDisabled: "#c8c9cc",
|
||
infoLight: "#f4f4f5",
|
||
warning: "#ff9900",
|
||
warningDark: "#f29100",
|
||
warningDisabled: "#fcbd71",
|
||
warningLight: "#fdf6ec",
|
||
error: "#fa3534",
|
||
errorDark: "#dd6161",
|
||
errorDisabled: "#fab6b6",
|
||
errorLight: "#fef0f0",
|
||
success: "#19be6b",
|
||
successDark: "#18b566",
|
||
successDisabled: "#71d5a1",
|
||
successLight: "#dbf1e1",
|
||
mainColor: "#303133",
|
||
contentColor: "#606266",
|
||
tipsColor: "#909399",
|
||
lightColor: "#c0c4cc",
|
||
borderColor: "#e4e7ed"
|
||
};
|
||
function type2icon(type = "success", fill = false) {
|
||
if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
|
||
type = "success";
|
||
let iconName = "";
|
||
switch (type) {
|
||
case "primary":
|
||
iconName = "info-circle";
|
||
break;
|
||
case "info":
|
||
iconName = "info-circle";
|
||
break;
|
||
case "error":
|
||
iconName = "close-circle";
|
||
break;
|
||
case "warning":
|
||
iconName = "error-circle";
|
||
break;
|
||
case "success":
|
||
iconName = "checkmark-circle";
|
||
break;
|
||
default:
|
||
iconName = "checkmark-circle";
|
||
}
|
||
if (fill)
|
||
iconName += "-fill";
|
||
return iconName;
|
||
}
|
||
function randomArray(array2 = []) {
|
||
return array2.sort(() => Math.random() - 0.5);
|
||
}
|
||
const addUnit = function(value = "auto", unit = "rpx") {
|
||
value = String(value);
|
||
return test.number(value) ? `${value}${unit}` : value;
|
||
};
|
||
function random(min, max) {
|
||
if (min >= 0 && max > 0 && max >= min) {
|
||
let gab = max - min + 1;
|
||
return Math.floor(Math.random() * gab + min);
|
||
} else {
|
||
return 0;
|
||
}
|
||
}
|
||
function trim$1(str, pos = "both") {
|
||
if (pos == "both") {
|
||
return str.replace(/^\s+|\s+$/g, "");
|
||
} else if (pos == "left") {
|
||
return str.replace(/^\s*/, "");
|
||
} else if (pos == "right") {
|
||
return str.replace(/(\s*$)/g, "");
|
||
} else if (pos == "all") {
|
||
return str.replace(/\s+/g, "");
|
||
} else {
|
||
return str;
|
||
}
|
||
}
|
||
function toast(title, duration = 1500) {
|
||
uni.showToast({
|
||
title,
|
||
icon: "none",
|
||
duration
|
||
});
|
||
}
|
||
function getParent(name, keys) {
|
||
let parent = this.$parent;
|
||
while (parent) {
|
||
if (parent.$options.name !== name) {
|
||
parent = parent.$parent;
|
||
} else {
|
||
let data = {};
|
||
if (Array.isArray(keys)) {
|
||
keys.map((val) => {
|
||
data[val] = parent[val] ? parent[val] : "";
|
||
});
|
||
} else {
|
||
for (let i in keys) {
|
||
if (Array.isArray(keys[i])) {
|
||
if (keys[i].length) {
|
||
data[i] = keys[i];
|
||
} else {
|
||
data[i] = parent[i];
|
||
}
|
||
} else if (keys[i].constructor === Object) {
|
||
if (Object.keys(keys[i]).length) {
|
||
data[i] = keys[i];
|
||
} else {
|
||
data[i] = parent[i];
|
||
}
|
||
} else {
|
||
data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
|
||
}
|
||
}
|
||
}
|
||
return data;
|
||
}
|
||
}
|
||
return {};
|
||
}
|
||
function $parent(name = void 0) {
|
||
let parent = this.$parent;
|
||
while (parent) {
|
||
if (parent.$options && parent.$options.name !== name) {
|
||
parent = parent.$parent;
|
||
} else {
|
||
return parent;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function getSystemInfoSync() {
|
||
return uni.getSystemInfoSync();
|
||
}
|
||
function os() {
|
||
return getSystemInfoSync().platform;
|
||
}
|
||
function sys() {
|
||
return getSystemInfoSync();
|
||
}
|
||
let timeout = null;
|
||
function debounce(func2, wait = 500, immediate = false) {
|
||
if (timeout !== null)
|
||
clearTimeout(timeout);
|
||
if (immediate) {
|
||
var callNow = !timeout;
|
||
timeout = setTimeout(function() {
|
||
timeout = null;
|
||
}, wait);
|
||
if (callNow)
|
||
typeof func2 === "function" && func2();
|
||
} else {
|
||
timeout = setTimeout(function() {
|
||
typeof func2 === "function" && func2();
|
||
}, wait);
|
||
}
|
||
}
|
||
let timeoutArr = [];
|
||
let flagArr = [];
|
||
function throttle(fn, time = 500, isImmediate = true, timeoutName = "default") {
|
||
if (!timeoutArr[timeoutName])
|
||
timeoutArr[timeoutName] = null;
|
||
if (isImmediate) {
|
||
if (!flagArr[timeoutName]) {
|
||
flagArr[timeoutName] = true;
|
||
if (typeof fn === "function")
|
||
fn();
|
||
timeoutArr[timeoutName] = setTimeout(() => {
|
||
flagArr[timeoutName] = false;
|
||
}, time);
|
||
}
|
||
} else {
|
||
if (!flagArr[timeoutName]) {
|
||
flagArr[timeoutName] = true;
|
||
timeoutArr[timeoutName] = setTimeout(() => {
|
||
flagArr[timeoutName] = false;
|
||
if (typeof fn === "function")
|
||
fn();
|
||
}, time);
|
||
}
|
||
}
|
||
}
|
||
function trim(str, pos = "both") {
|
||
str = String(str);
|
||
if (pos == "both") {
|
||
return str.replace(/^\s+|\s+$/g, "");
|
||
}
|
||
if (pos == "left") {
|
||
return str.replace(/^\s*/, "");
|
||
}
|
||
if (pos == "right") {
|
||
return str.replace(/(\s*$)/g, "");
|
||
}
|
||
if (pos == "all") {
|
||
return str.replace(/\s+/g, "");
|
||
}
|
||
return str;
|
||
}
|
||
function addStyle(customStyle, target = "object") {
|
||
if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
|
||
return customStyle;
|
||
}
|
||
if (target === "object") {
|
||
customStyle = trim(customStyle);
|
||
const styleArray = customStyle.split(";");
|
||
const style = {};
|
||
for (let i = 0; i < styleArray.length; i++) {
|
||
if (styleArray[i]) {
|
||
const item = styleArray[i].split(":");
|
||
style[trim(item[0])] = trim(item[1]);
|
||
}
|
||
}
|
||
return style;
|
||
}
|
||
let string2 = "";
|
||
for (const i in customStyle) {
|
||
const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||
string2 += `${key}:${customStyle[i]};`;
|
||
}
|
||
return trim(string2);
|
||
}
|
||
let version = "1.10.1";
|
||
const config = {
|
||
v: version,
|
||
version,
|
||
// 主题名称
|
||
type: [
|
||
"primary",
|
||
"success",
|
||
"info",
|
||
"error",
|
||
"warning"
|
||
]
|
||
};
|
||
const zIndex = {
|
||
toast: 10090,
|
||
noNetwork: 10080,
|
||
// popup包含popup,actionsheet,keyboard,picker的值
|
||
popup: 10075,
|
||
mask: 10070,
|
||
navbar: 980,
|
||
topTips: 975,
|
||
sticky: 970,
|
||
indexListSticky: 965
|
||
};
|
||
function wranning(str) {
|
||
{
|
||
formatAppLog("warn", "at uni_modules/vk-uview-ui/index.js:26", str);
|
||
}
|
||
}
|
||
const $u = {
|
||
queryParams,
|
||
route,
|
||
timeFormat,
|
||
date: timeFormat,
|
||
// 另名date
|
||
timeFrom,
|
||
colorGradient: colorGradient$1.colorGradient,
|
||
colorToRgba: colorGradient$1.colorToRgba,
|
||
guid,
|
||
color,
|
||
sys,
|
||
os,
|
||
type2icon,
|
||
randomArray,
|
||
wranning,
|
||
get: http.get,
|
||
post: http.post,
|
||
put: http.put,
|
||
"delete": http.delete,
|
||
hexToRgb: colorGradient$1.hexToRgb,
|
||
rgbToHex: colorGradient$1.rgbToHex,
|
||
test,
|
||
random,
|
||
deepClone,
|
||
deepMerge,
|
||
getParent,
|
||
$parent,
|
||
addUnit,
|
||
trim: trim$1,
|
||
type: ["primary", "success", "error", "warning", "info"],
|
||
http,
|
||
toast,
|
||
config,
|
||
// uView配置信息相关,比如版本号
|
||
zIndex,
|
||
debounce,
|
||
throttle,
|
||
addStyle,
|
||
getSystemInfoSync
|
||
};
|
||
uni.$u = $u;
|
||
const install = (Vue2) => {
|
||
Vue2.mixin(mixin);
|
||
Vue2.config.globalProperties.$u = $u;
|
||
};
|
||
const uView = {
|
||
install
|
||
};
|
||
function createApp() {
|
||
const app = vue.createVueApp(App);
|
||
app.use(uView);
|
||
return {
|
||
app
|
||
};
|
||
}
|
||
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
|
||
uni.Vuex = __Vuex__;
|
||
uni.Pinia = __Pinia__;
|
||
__app__.provide("__globalStyles", __uniConfig.styles);
|
||
__app__._component.mpType = "app";
|
||
__app__._component.render = () => {
|
||
};
|
||
__app__.mount("#app");
|
||
})(Vue);
|