爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

84 lines
3.0 KiB

"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
props: {
needPhone: {
type: Boolean,
default: false
}
},
methods: {
getrealtimephonenumber(e) {
common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:46", e.detail.code, "11");
common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:47", e.detail.errMsg, "22");
common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:48", e.detail.errno);
common_vendor.index.reLaunch({
url: "/pages/wxUserInfo"
});
this.$api("bindPhone", { code: e.detail.code }, (res) => {
common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:53", res, "res-phone");
if (res.code == 200) {
common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:55", JSON.parse(res.result), "phone");
getApp().globalData.phone = JSON.parse(res.result).phone_info.phoneNumber;
}
});
},
// 打开弹窗
open() {
this.$refs.popup.open();
},
// 关闭弹窗
close() {
this.$refs.popup.close();
},
// 同意处理
handleAgree() {
this.$emit("agree");
this.close();
},
// 拒绝处理
handleReject() {
this.$emit("reject");
this.close();
},
// 打开协议
openProtocol(type) {
this.$emit("open-protocol", type);
},
// 允许外部动态设置 needPhone
setNeedPhone(val) {
this.$emit("update:needPhone", val);
}
}
};
if (!Array) {
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
_easycom_uni_popup2();
}
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_uni_popup();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o(($event) => $options.openProtocol("service")),
b: common_vendor.o(($event) => $options.openProtocol("privacy")),
c: common_vendor.o((...args) => $options.handleReject && $options.handleReject(...args)),
d: $props.needPhone
}, $props.needPhone ? {
e: common_vendor.o((...args) => $options.getrealtimephonenumber && $options.getrealtimephonenumber(...args)),
f: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args))
} : {
g: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args))
}, {
h: common_vendor.sr("popup", "6e1ab13b-0"),
i: common_vendor.p({
type: "bottom",
["background-color"]: "#fff",
["mask-click"]: false
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6e1ab13b"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/wxcomponents/privacy-popup/privacy-popup.js.map