45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const api_intergral = require("../../api/intergral.js");
|
|
const common_js_util = require("../../common/js/util.js");
|
|
const _sfc_main = {
|
|
__name: "beInvited",
|
|
setup(__props) {
|
|
const user = common_vendor.ref({
|
|
header: "",
|
|
userId: "",
|
|
userNickname: ""
|
|
});
|
|
common_vendor.onLoad((options) => {
|
|
if (options !== null) {
|
|
user.value = options;
|
|
user.value.header = common_js_util.util.format_url(user.value.header, "img");
|
|
}
|
|
});
|
|
function nickname(hide) {
|
|
api_intergral.intergral.nickname({
|
|
query: {
|
|
hide
|
|
}
|
|
}).then((rs) => {
|
|
common_js_util.util.alert({
|
|
content: rs.msg,
|
|
showCancel: false
|
|
});
|
|
common_vendor.index.navigateBack({
|
|
delta: 1
|
|
});
|
|
});
|
|
}
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: user.value.header,
|
|
b: common_vendor.t(user.value.userNickname),
|
|
c: common_vendor.o$1(($event) => nickname(1)),
|
|
d: common_vendor.o$1(($event) => nickname(0))
|
|
};
|
|
};
|
|
}
|
|
};
|
|
wx.createPage(_sfc_main);
|