57 lines
1.7 KiB
JavaScript
57 lines
1.7 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
require("../../store/index.js");
|
|
const api_api = require("../../api/api.js");
|
|
if (!Array) {
|
|
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
|
_easycom_up_image2();
|
|
}
|
|
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
|
if (!Math) {
|
|
_easycom_up_image();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "share",
|
|
setup(__props) {
|
|
let getInfo = common_vendor.ref({});
|
|
let loginTan = common_vendor.ref(true);
|
|
common_vendor.onShow(() => {
|
|
let Authorization = common_vendor.index.getStorageSync("token") || "";
|
|
if (Authorization) {
|
|
getUserInfo();
|
|
loginTan.value = true;
|
|
} else {
|
|
loginTan.value = false;
|
|
}
|
|
});
|
|
let getUserInfo = async () => {
|
|
let _res = await api_api.userInfo();
|
|
getInfo.value = _res;
|
|
};
|
|
let copy = (e) => {
|
|
common_vendor.index.setClipboardData({
|
|
data: e,
|
|
success: function() {
|
|
}
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.unref(getInfo).qrCode
|
|
}, common_vendor.unref(getInfo).qrCode ? {
|
|
b: common_vendor.t(common_vendor.unref(getInfo).shareCode),
|
|
c: common_vendor.o(($event) => common_vendor.unref(copy)(common_vendor.unref(getInfo).shareCode)),
|
|
d: common_vendor.p({
|
|
src: common_vendor.unref(getInfo).qrCode,
|
|
radius: "20rpx",
|
|
width: "440rpx",
|
|
height: "440rpx",
|
|
mode: "widthFix"
|
|
})
|
|
} : {});
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-66f7dc32"]]);
|
|
my.createPage(MiniProgramPage);
|