爱简收旧衣按件回收前端代码仓库
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

  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = {
  4. props: {
  5. needPhone: {
  6. type: Boolean,
  7. default: false
  8. }
  9. },
  10. methods: {
  11. getrealtimephonenumber(e) {
  12. common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:46", e.detail.code, "11");
  13. common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:47", e.detail.errMsg, "22");
  14. common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:48", e.detail.errno);
  15. common_vendor.index.reLaunch({
  16. url: "/pages/wxUserInfo"
  17. });
  18. this.$api("bindPhone", { code: e.detail.code }, (res) => {
  19. common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:53", res, "res-phone");
  20. if (res.code == 200) {
  21. common_vendor.index.__f__("log", "at wxcomponents/privacy-popup/privacy-popup.vue:55", JSON.parse(res.result), "phone");
  22. getApp().globalData.phone = JSON.parse(res.result).phone_info.phoneNumber;
  23. }
  24. });
  25. },
  26. // 打开弹窗
  27. open() {
  28. this.$refs.popup.open();
  29. },
  30. // 关闭弹窗
  31. close() {
  32. this.$refs.popup.close();
  33. },
  34. // 同意处理
  35. handleAgree() {
  36. this.$emit("agree");
  37. this.close();
  38. },
  39. // 拒绝处理
  40. handleReject() {
  41. this.$emit("reject");
  42. this.close();
  43. },
  44. // 打开协议
  45. openProtocol(type) {
  46. this.$emit("open-protocol", type);
  47. },
  48. // 允许外部动态设置 needPhone
  49. setNeedPhone(val) {
  50. this.$emit("update:needPhone", val);
  51. }
  52. }
  53. };
  54. if (!Array) {
  55. const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
  56. _easycom_uni_popup2();
  57. }
  58. const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
  59. if (!Math) {
  60. _easycom_uni_popup();
  61. }
  62. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  63. return common_vendor.e({
  64. a: common_vendor.o(($event) => $options.openProtocol("service")),
  65. b: common_vendor.o(($event) => $options.openProtocol("privacy")),
  66. c: common_vendor.o((...args) => $options.handleReject && $options.handleReject(...args)),
  67. d: $props.needPhone
  68. }, $props.needPhone ? {
  69. e: common_vendor.o((...args) => $options.getrealtimephonenumber && $options.getrealtimephonenumber(...args)),
  70. f: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args))
  71. } : {
  72. g: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args))
  73. }, {
  74. h: common_vendor.sr("popup", "6e1ab13b-0"),
  75. i: common_vendor.p({
  76. type: "bottom",
  77. ["background-color"]: "#fff",
  78. ["mask-click"]: false
  79. })
  80. });
  81. }
  82. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6e1ab13b"]]);
  83. wx.createComponent(Component);
  84. //# sourceMappingURL=../../../.sourcemap/mp-weixin/wxcomponents/privacy-popup/privacy-popup.js.map