|
@@ -7,8 +7,10 @@ const cityPicker = () => "../../components/cityPicker.js";
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "index",
|
|
__name: "index",
|
|
setup(__props) {
|
|
setup(__props) {
|
|
- var _a;
|
|
|
|
|
|
+ var _a, _b, _c;
|
|
const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
|
+ (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
|
|
|
|
+ const $apifile = (_c = common_vendor.getCurrentInstance()) == null ? void 0 : _c.appContext.config.globalProperties.$apifile;
|
|
const openid = common_vendor.computed(() => {
|
|
const openid = common_vendor.computed(() => {
|
|
return common_vendor.index.getStorageSync("openid");
|
|
return common_vendor.index.getStorageSync("openid");
|
|
});
|
|
});
|
|
@@ -76,33 +78,58 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
if (data)
|
|
if (data)
|
|
form.value.place = data.dictLabel;
|
|
form.value.place = data.dictLabel;
|
|
};
|
|
};
|
|
|
|
+ const Preview = (file) => {
|
|
|
|
+ common_vendor.index.chooseImage({
|
|
|
|
+ count: 1,
|
|
|
|
+ sizeType: ["original", "compressed"],
|
|
|
|
+ sourceType: ["album", "camera"],
|
|
|
|
+ success: async function(res) {
|
|
|
|
+ let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
|
|
|
|
+ const arr = await $apifile(
|
|
|
|
+ `/common/upload`,
|
|
|
|
+ "file",
|
|
|
|
+ tempFile[0],
|
|
|
|
+ "file"
|
|
|
|
+ );
|
|
|
|
+ if (arr.code == 200) {
|
|
|
|
+ form.value.icon = arr.url;
|
|
|
|
+ } else {
|
|
|
|
+ common_vendor.index.showToast({
|
|
|
|
+ title: arr.msg,
|
|
|
|
+ icon: "none"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ };
|
|
return (_ctx, _cache) => {
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
return {
|
|
a: form.value.icon || config.value.logoUrl,
|
|
a: form.value.icon || config.value.logoUrl,
|
|
- b: form.value.name,
|
|
|
|
- c: form.value.nickname,
|
|
|
|
- d: common_vendor.t(form.value.sex || "请选择性别"),
|
|
|
|
- e: common_vendor.o(sexChange),
|
|
|
|
- f: _ctx.index,
|
|
|
|
- g: sexList.value,
|
|
|
|
- h: form.value.phone,
|
|
|
|
- i: common_vendor.o(onSelected),
|
|
|
|
- j: common_vendor.p({
|
|
|
|
|
|
+ b: common_vendor.o(($event) => Preview(form.value.icon || config.value.logoUrl)),
|
|
|
|
+ c: form.value.name,
|
|
|
|
+ d: form.value.nickname,
|
|
|
|
+ e: common_vendor.t(form.value.sex || "请选择性别"),
|
|
|
|
+ f: common_vendor.o(sexChange),
|
|
|
|
+ g: _ctx.index,
|
|
|
|
+ h: sexList.value,
|
|
|
|
+ i: form.value.phone,
|
|
|
|
+ j: common_vendor.o(onSelected),
|
|
|
|
+ k: common_vendor.p({
|
|
showSheetView: showSheetView.value,
|
|
showSheetView: showSheetView.value,
|
|
defaultIndexs: [0, 0, 0]
|
|
defaultIndexs: [0, 0, 0]
|
|
}),
|
|
}),
|
|
- k: form.value.height,
|
|
|
|
- l: form.value.weight,
|
|
|
|
- m: common_vendor.t(form.value.type || "请选择主要项目"),
|
|
|
|
- n: common_vendor.o(typeChange),
|
|
|
|
- o: _ctx.index,
|
|
|
|
- p: typeList.value,
|
|
|
|
- q: form.value.ballYears,
|
|
|
|
- r: common_vendor.t(form.value.place || "请选择队内位置"),
|
|
|
|
- s: common_vendor.o(placeChange),
|
|
|
|
- t: _ctx.index,
|
|
|
|
- v: placeList.value,
|
|
|
|
- w: common_vendor.o(
|
|
|
|
|
|
+ l: form.value.height,
|
|
|
|
+ m: form.value.weight,
|
|
|
|
+ n: common_vendor.t(form.value.type || "请选择主要项目"),
|
|
|
|
+ o: common_vendor.o(typeChange),
|
|
|
|
+ p: _ctx.index,
|
|
|
|
+ q: typeList.value,
|
|
|
|
+ r: form.value.ballYears,
|
|
|
|
+ s: common_vendor.t(form.value.place || "请选择队内位置"),
|
|
|
|
+ t: common_vendor.o(placeChange),
|
|
|
|
+ v: _ctx.index,
|
|
|
|
+ w: placeList.value,
|
|
|
|
+ x: common_vendor.o(
|
|
//@ts-ignore
|
|
//@ts-ignore
|
|
(...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
|
|
(...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
|
|
)
|
|
)
|