123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_integral = require("../api/integral.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- imgs: [],
- activeImg: 1,
- goodsId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.goodsId = option.goodsId;
- },
- onShow() {
- this.getIntegralGoodsById();
- },
- methods: {
- submit() {
- common_vendor.index.navigateTo({
- url: "./integralOrderPay?goodsId=" + this.goodsId
- });
- },
- swiperChange(event) {
- this.activeImg = event.detail.current + 1;
- },
- showImg() {
- common_vendor.index.previewImage({
- urls: this.imgs,
- current: this.imgs[0]
- });
- },
- getIntegralGoodsById() {
- let data = { goodsId: this.goodsId };
- api_integral.getIntegralGoodsById(data).then((res) => {
- if (res.code == 200) {
- this.item = res.data;
- if (res.data.images != null) {
- this.imgs = res.data.images.split(",");
- } else {
- this.activeImg = 0;
- }
- console.log(this.imgs);
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: "\u8BF7\u6C42\u5931\u8D25"
- });
- }
- }, (rej) => {
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: common_vendor.f($data.imgs, (item, index, i0) => {
- return {
- a: item,
- b: index
- };
- }),
- b: common_vendor.o((...args) => $options.swiperChange && $options.swiperChange(...args)),
- c: common_vendor.t($data.activeImg),
- d: common_vendor.t($data.imgs.length),
- e: common_vendor.o(($event) => $options.showImg()),
- f: common_vendor.t($data.item.goodsName),
- g: common_vendor.t($data.item.integral),
- h: common_vendor.t($data.item.otPrice.toFixed(2)),
- i: $data.item.descs,
- j: common_vendor.t($data.item.integral),
- k: common_vendor.o(($event) => $options.submit())
- };
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/integralGoodsDetails.vue"]]);
- wx.createPage(MiniProgramPage);
|