|
|
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
- const _sfc_main = {
- mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
- data() {
- return {
- statusBarHeight: 0,
- navBarHeight: 44,
- navBarTotalHeight: 44,
- featureTags: ["收益高", "品类全", "到账快", "城市多"],
- formData: {
- name: "",
- phone: "",
- userTime: ""
- },
- showPickerPopup: false,
- currentPickerIndex: 0,
- indicatorStyle: "height: 88rpx; border: none;",
- pickerOptions: ["2小时", "3小时", "4小时", "5小时", "6小时"]
- };
- },
- onLoad() {
- const sysInfo = common_vendor.index.getSystemInfoSync();
- this.statusBarHeight = sysInfo.statusBarHeight;
- this.navBarHeight = 44;
- this.navBarTotalHeight = this.statusBarHeight + this.navBarHeight;
- this.getMyPromotionInfo();
- },
- methods: {
- async onRefresh() {
- await new Promise((resolve) => setTimeout(resolve, 1e3));
- common_vendor.index.stopPullRefresh();
- },
- navigateBack() {
- common_vendor.index.navigateBack();
- },
- contactService() {
- common_vendor.index.navigateTo({ url: "/pages/subcomponent/admin_faq" });
- },
- showPicker() {
- this.showPickerPopup = true;
- },
- hidePicker() {
- this.showPickerPopup = false;
- },
- onPickerChange(e) {
- const index = e.detail.value[0];
- this.currentPickerIndex = index;
- },
- confirmPicker() {
- this.formData.userTime = this.pickerOptions[this.currentPickerIndex];
- this.hidePicker();
- },
- resetPicker() {
- this.currentPickerIndex = 0;
- },
- submitForm() {
- this.$api("apply", this.formData, (res) => {
- if (res && res.success) {
- common_vendor.index.showToast({ title: "提交成功", icon: "success" });
- common_vendor.index.navigateBack();
- }
- });
- },
- getMyPromotionInfo() {
- this.$api("getMyPromotionInfo", {}, (res) => {
- if (res && res.success && res.result) {
- this.formData = res.result;
- }
- });
- }
- }
- };
- if (!Array) {
- const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
- _easycom_uni_icons2();
- }
- const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
- if (!Math) {
- _easycom_uni_icons();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.p({
- type: "left",
- size: "22",
- color: "#222"
- }),
- b: common_vendor.o((...args) => $options.navigateBack && $options.navigateBack(...args)),
- c: common_vendor.p({
- type: "more-filled",
- size: "22",
- color: "#222"
- }),
- d: $data.navBarTotalHeight + "px",
- e: $data.statusBarHeight + "px",
- f: common_vendor.f($data.featureTags, (t, i, i0) => {
- return {
- a: common_vendor.t(t),
- b: i
- };
- }),
- g: $data.navBarTotalHeight + "px",
- h: common_vendor.p({
- type: "headphones",
- size: "22",
- color: "#df8155"
- }),
- i: common_vendor.o((...args) => $options.contactService && $options.contactService(...args)),
- j: $data.formData.name,
- k: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
- l: $data.formData.phone,
- m: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
- n: common_vendor.t($data.formData.userTime || "请选择"),
- o: !$data.formData.userTime ? 1 : "",
- p: common_vendor.p({
- type: "right",
- size: "18",
- color: "#bbb"
- }),
- q: common_vendor.o(($event) => $options.showPicker("userTime")),
- r: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args)),
- s: $data.showPickerPopup
- }, $data.showPickerPopup ? {
- t: common_vendor.o((...args) => $options.hidePicker && $options.hidePicker(...args)),
- v: common_vendor.o((...args) => $options.resetPicker && $options.resetPicker(...args)),
- w: common_vendor.f($data.pickerOptions, (item, index, i0) => {
- return {
- a: common_vendor.t(item),
- b: index,
- c: index === $data.currentPickerIndex ? 1 : ""
- };
- }),
- x: [$data.currentPickerIndex],
- y: common_vendor.o((...args) => $options.onPickerChange && $options.onPickerChange(...args)),
- z: $data.indicatorStyle,
- A: common_vendor.o((...args) => $options.confirmPicker && $options.confirmPicker(...args))
- } : {});
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a0c82533"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/upgrad.js.map
|