Files
gxtyzx-uniapp/dist/dev/mp-weixin/package/user/ic-card.js
T

224 lines
6.9 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const store_modules_user = require("../../store/modules/user.js");
require("../../utils/request.js");
const utils_common = require("../../utils/common.js");
const store_modules_tenant = require("../../store/modules/tenant.js");
store_modules_tenant.useTenantStore();
const userStore = store_modules_user.useUserStore();
const _sfc_main = {
data() {
return {
list: [],
statusBarHeight: 104,
isLogin: false,
form: {
name: "",
phone: ""
},
// 表单数据
formData: {},
fields: {},
logo: "",
bookingUser: {},
server: [],
order: []
};
},
onLoad() {
this.reload();
},
methods: {
async reload(e) {
const app = this;
const userInfo = await userStore.fetchUserInfo();
if (Object.keys(userInfo).length > 0) {
app.isLogin = true;
app.userInfo = userInfo;
} else {
app.isLogin = false;
}
},
navTo(item) {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
utils_common.openUrl(item);
},
// 弹出登录提示框
openLogin() {
if (!this.isLogin) {
this.$refs.login.open("bottom");
return false;
}
},
add() {
this.$refs.addForm.open("center");
},
onDel(item) {
const app = this;
common_vendor.index.showModal({
title: "确定要删除吗?",
success(o) {
if (o.confirm) {
common_vendor.index.showLoading({
title: "请求中."
});
app.reload();
}
}
});
},
// 触发提交表单
submit() {
this.$refs.form.validate().then((res) => {
}).catch((err) => {
console.log("表单错误信息:", err);
});
}
}
};
if (!Array) {
const _easycom_uv_input2 = common_vendor.resolveComponent("uv-input");
const _easycom_uni_forms_item2 = common_vendor.resolveComponent("uni-forms-item");
const _easycom_uni_forms2 = common_vendor.resolveComponent("uni-forms");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
const _component_uv_form_item = common_vendor.resolveComponent("uv-form-item");
const _component_uv_form = common_vendor.resolveComponent("uv-form");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uv_input2 + _easycom_uni_forms_item2 + _easycom_uni_forms2 + _easycom_uni_card2 + _easycom_uv_button2 + _easycom_ws_login2 + _component_uv_form_item + _component_uv_form + _easycom_uni_popup2)();
}
const _easycom_uv_input = () => "../../uni_modules/uv-input/components/uv-input/uv-input.js";
const _easycom_uni_forms_item = () => "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js";
const _easycom_uni_forms = () => "../../uni_modules/uni-forms/components/uni-forms/uni-forms.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uv_input + _easycom_uni_forms_item + _easycom_uni_forms + _easycom_uni_card + _easycom_uv_button + _easycom_ws_login + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => $data.formData.careId = $event),
b: common_vendor.p({
placeholder: "请输入您的IC卡号",
maxlength: "20",
modelValue: $data.formData.careId
}),
c: common_vendor.p({
label: "卡号",
name: "careId",
required: true
}),
d: common_vendor.o(($event) => $data.formData.name = $event),
e: common_vendor.p({
placeholder: "请输入您的姓名",
maxlength: "6",
modelValue: $data.formData.name
}),
f: common_vendor.p({
label: "姓名",
name: "name",
required: true
}),
g: common_vendor.o(($event) => $data.formData.phone = $event),
h: common_vendor.p({
placeholder: "请输入您的手机号码",
maxlength: "11",
modelValue: $data.formData.phone
}),
i: common_vendor.p({
label: "手机号码",
name: "phone",
required: true
}),
j: common_vendor.sr("form", "edb143a6-1,edb143a6-0"),
k: common_vendor.p({
modelValue: $data.formData,
rules: _ctx.rules,
["label-width"]: 80
}),
l: common_vendor.p({
title: "卡片信息",
border: false,
["is-shadow"]: false,
padding: "10px 6px"
}),
m: common_vendor.o($options.submit),
n: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "立即激活"
}),
o: common_vendor.sr("login", "edb143a6-9"),
p: common_vendor.o($options.reload),
q: common_vendor.p({
logo: $data.logo
}),
r: common_vendor.o(($event) => $data.form.name = $event),
s: common_vendor.p({
placeholder: "请输入姓名",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.name
}),
t: common_vendor.p({
label: "姓名",
prop: "userInfo.name",
borderBottom: true
}),
v: common_vendor.o(($event) => $data.form.phone = $event),
w: common_vendor.p({
placeholder: "请输入手机号码",
maxlength: "11",
customStyle: {
margin: "10px 0"
},
modelValue: $data.form.phone
}),
x: common_vendor.o(_ctx.showSexSelect),
y: common_vendor.p({
label: "性别",
prop: "userInfo.sex",
borderBottom: true
}),
z: common_vendor.o(_ctx.save),
A: common_vendor.p({
customStyle: {
background: "linear-gradient(to right, #70b915, #008e04)",
borderRadius: "30px",
color: "#ffffff"
},
text: "保存"
}),
B: common_vendor.sr("form", "edb143a6-12,edb143a6-11"),
C: common_vendor.p({
labelPosition: "left",
model: $data.form,
rules: _ctx.rules
}),
D: common_vendor.p({
title: "添加联系人",
border: false,
["is-shadow"]: false,
padding: 0
}),
E: common_vendor.sr("addForm", "edb143a6-10"),
F: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/user/ic-card.vue"]]);
wx.createPage(MiniProgramPage);