绿满眶商城微信小程序-uniapp
zxl
2025-08-04 6c7fecf52405e132e3573b43a7206f99026a1fd8
商家入驻同意协议,优惠卷领取状态
6个文件已修改
58 ■■■■■ 已修改文件
api/promotions.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/coupon/couponCenter.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/coupon/myCoupon.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/help/tips.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/passport/entry/seller/entry.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/passport/entry/seller/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/promotions.js
@@ -104,6 +104,8 @@
  });
}
/**
 * 分页获取砍价商品
 * @param params
pages/cart/coupon/couponCenter.vue
@@ -32,7 +32,7 @@
                                <view v-if="item.endTime">有效期至:{{ item.endTime.split(" ")[0] }}</view>
                            </view>
                            <view class="receive" @click="receive(item)">
                                <text>点击</text><br />
                                <text>{{item.owned ? '已' : '点击'}}</text><br />
                                <text>领取</text>
                            </view>
                            <view class="bg-quan"> 券 </view>
@@ -50,6 +50,7 @@
    import {
        receiveCoupons
    } from "@/api/members.js";
    import { getMemberCoupons } from "@/api/members.js";
    import {
        getAllCoupons
    } from "@/api/promotions.js";
@@ -116,6 +117,7 @@
                    .catch((err) => {
                         if (this.$store.state.isShowToast){ uni.hideLoading() };
                    });
                    console.log(this.couponList)
            },
            /**
             * 领取优惠券
@@ -124,12 +126,13 @@
                this.$u.throttle(()=>{
                    this.fetchCoupon(val)
                }, 1500)
            },
            fetchCoupon(val){
                receiveCoupons(val.id).then((res) => {
                    if (res.data.code == 200) {
                        //修改点击的优惠卷当前的领取状态
                        val.owned = true;
                        uni.showToast({
                            title: "领取成功",
                            icon: "none",
pages/cart/coupon/myCoupon.vue
@@ -204,6 +204,7 @@
        title: "加载中",
      });
      let index = this.tabCurrentIndex;
      console.log(this.navList[index].params)
      getMemberCoupons(this.navList[index].params).then((res) => {
        uni.stopPullDownRefresh();
        if (res.data.success) {
pages/mine/help/tips.vue
@@ -1,7 +1,7 @@
<template>
  <div class="wrapper">
    <u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse>
    <button class="submit" @click="agreed()">同意协议</button>
  </div>
</template>
<script>
@@ -44,9 +44,14 @@
      title: this.way[option.type].title,
    });
    this.init(option);
  },
  methods: {
      agreed(){
          uni.setStorageSync('agreed', true); // 存储同意状态
        uni.navigateBack(); // 返回原页面
      },
    init(option) {
      getArticleDetailByType(this.way[option.type].type).then((res) => {
        if (res.data.success) {
@@ -59,6 +64,11 @@
};
</script>
<style lang="scss" scoped>
    .submit {
      color: #fff;
      margin-top: 120rpx;
      background: rgba($light-color, 0.8);
    }
.wrapper {
  padding: 16rpx;
}
pages/passport/entry/seller/entry.scss
@@ -3,6 +3,7 @@
    font-weight: bold;
}
.submit,
.noSubmit,
.notice {
  font-weight: bold;
  font-size: 28rpx;
pages/passport/entry/seller/index.vue
@@ -13,8 +13,16 @@
          {{ item.title }}
        </div>
      </div>
      <div class="submit" @click="keepOn()">开始填写</div>
      <div class="notice" @click="getEntryNotice">查看店铺入驻协议</div>
      <div :class="isAgreed ? 'submit' : 'noSubmit'" @click="keepOn()" :disabled="!isAgreed">开始填写</div>
      <div class="agreement-container"  >
        <label class="agreement-label">
          <checkbox :checked="isAgreed" class="agreement-checkbox" :disabled="isDisabled" />
          <text class="agreement-text" @click="getEntryNotice">
            查看店铺<text class="agreement-link">《入驻协议》</text>
          </text>
        </label>
      </div>
    </div>
  </div>
</template>
@@ -27,6 +35,8 @@
  data() {
    return {
        isDisabled:true,
        isAgreed:false,
      current: 999,
      entrySteps: [
        {
@@ -60,6 +70,10 @@
  onShow() {
    if(this.$options.filters.tipsToLogin()){
        this.init();
    }
    if (uni.getStorageSync('agreed')) {
      this.isAgreed = true; // 自动勾选
      uni.removeStorageSync('agreed'); // 清除标记
    }
  },
@@ -96,7 +110,9 @@
        },
      ];
      const res = await getCompanyDetail();
      console.log(res)
      if (res.data.success) {
        this.companyData = res.data.result;
        if (this.companyData) {
@@ -124,6 +140,16 @@
}
</style>
<style lang="scss" scoped>
    .agreement-container {
      display: flex;
      justify-content: center;
      margin-top: 20rpx;
    }
    /* 勾选框和文字对齐 */
    .agreement-label {
      display: flex;
      align-items: center;
    }
@import url("./entry.scss");
.wrapper {
  padding: 0 80rpx;
@@ -153,6 +179,11 @@
  background: rgba($color: $light-color, $alpha: 0.1);
  border-radius: 20rpx;
}
.noSubmit{
    color: #fff;
    margin-top: 120rpx;
    background: rgba(204, 204, 204, 0.8);;
}
.submit {
  color: #fff;
  margin-top: 120rpx;