绿满眶商城微信小程序-uniapp
577042a77ff72607e2cd5de3a06f33a1c9d3f703..00830f0d160943e29999875d13b19edacbf198c6
9 天以前 peng
虚拟商品移除加入购物车入口
00830f 对比 | 目录
9 天以前 peng
虚拟商品订单关闭再来一单的入口
c1189f 对比 | 目录
9 天以前 peng
商品兑换卷调整以及绑定电话号码调整
25ee0f 对比 | 目录
7个文件已修改
97 ■■■■ 已修改文件
pages.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/commodity-square/coups-goods-list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/set/personMsg.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/set/securityCenter/bindMobile.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/claim-coupon/claim-coupon.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/myOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderDetail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -1553,7 +1553,17 @@
        {
          "path": "complain/complain",
          "style": {
            "navigationBarTitleText": "订单商品投诉"
            "navigationBarTitleText": "订单商品投诉",
            "componentPlaceholder": {
              "u-popup": "view",
              "u-icon": "view",
              "u-line": "view",
              "u-image": "view",
              "u-select": "view",
              "u-input": "view",
              "u-upload": "view"
            }
          }
        },
        {
@@ -1803,7 +1813,7 @@
            "path" : "claim-coupon/claim-coupon",
            "style" :
            {
                "navigationBarTitleText" : "优惠券领取",
                "navigationBarTitleText" : "商品兑换券领取",
                "enablePullDownRefresh" : true,
                "componentPlaceholder": {
                  "u-image": "view",
pages/commodity-square/coups-goods-list.vue
@@ -42,7 +42,7 @@
                            <view
                                style="display: flex; justify-content: space-between;align-items:center; 100%;margin-top: 32rpx;width: 100%;">
                                <view class="goodsPrice">¥{{item.price}}</view>
                                <view class="addCard" style="display: flex; align-items: center;">
                                <view class="addCard" style="display: flex; align-items: center;" v-if="item.goodsType !=='VIRTUAL_GOODS'">
                                    <view style="padding: 20rpx 0 20rpx 20rpx;" v-show="item.cardNum && item.cardNum>0"
                                        @click.stop="miousCardNum($event,item.id)">
                                        <uni-icons type="minus" size="30" color="#96a6bc"></uni-icons>
pages/mine/set/personMsg.vue
@@ -124,6 +124,19 @@
                showBirthday: false, //显示生日日期
            };
        },
        onShow() {
        this.form = {
                nickName: storage.getUserInfo().nickName || "",
                birthday: storage.getUserInfo().birthday || "",
                face: storage.getUserInfo().face, //默认头像
                regionId: [], //地址Id
                region: storage.getUserInfo().region || [], //地址
                sex: storage.getUserInfo().sex, //性别
                ___path: storage.getUserInfo().region,
                mobile: storage.getUserInfo().mobile,
                username: storage.getUserInfo().username,
            }
        },
        onLoad() {
            this.initCOS()
            this.getMemberTag()
pages/mine/set/securityCenter/bindMobile.vue
@@ -10,15 +10,15 @@
            <u-form :model="codeForm" ref="validateCodeForm">
                <view v-if="!validateFlage">
                    <u-form-item label-width="120" label="手机号" prop="mobile">
                        <u-input maxlength="11" v-model="codeForm.mobile" placeholder="请输入您的手机号" />
                        <u-input maxlength="15" v-model="codeForm.mobile" placeholder="请输入您的手机号" />
                    </u-form-item>
                    
                    <u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
    <!--                 <u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
                        <u-input v-model="codeForm.code" placeholder="请输入验证码" />
                        <u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
                            ref="uCode" @change="codeChange"></u-verification-code>
                        <view @tap="getCode" class="text-tips">{{ tips }}</view>
                    </u-form-item>
                    </u-form-item> -->
                    <view class="submit" @click="validatePhone">绑定</view>
                    <myVerification keep-running @send="verification" class="verification" ref="verification"
@@ -35,7 +35,7 @@
        sendMobile,
        bindMobile
    } from "@/api/login";
    import storage from "@/utils/storage.js";
    import myVerification from "@/pages/mine/verification/verification.vue"; //验证
    import uuid from "@/utils/uuid.modified.js";
    export default {
@@ -50,7 +50,7 @@
                flage: false, //是否验证码验证
                codeForm: {
                    mobile: "", //手机号
                    code: "", //验证码
                    code: "111111", //验证码
                    username: "", //用户名
                },
                tips: "", //提示
@@ -109,6 +109,12 @@
                    }
                }
            },
              'codeForm.mobile': function(newVal, oldVal) {
                // 当手机号变化时,自动去除空格
                if (newVal && typeof newVal === 'string') {
                  this.codeForm.mobile = newVal.replace(/\s/g, '');
                }
              }
        },
        methods: {
@@ -130,6 +136,9 @@
                                    duration: 2000,
                                    icon: "none",
                                });
                            let userInfo = storage.getUserInfo()
                             userInfo.mobile =  this.codeForm.mobile;
                            storage.setUserInfo(userInfo)
                                setTimeout(() => {
                                    uni.navigateBack({
                                        delta: 1,
pages/order/claim-coupon/claim-coupon.vue
@@ -2,8 +2,8 @@
    <view class="container">
        <!-- 顶部标题 -->
        <view class="header">
            <text class="title">优惠券领取</text>
            <text class="subtitle">领取您的专属优惠券</text>
            <text class="title">商品兑换券领取</text>
            <text class="subtitle">领取您的专属商品兑换券</text>
        </view>
        
        <!-- 单个优惠券展示 -->
@@ -104,15 +104,42 @@
            if (options.id) {
                this.cardId = options.id
                this.loadCouponInfo(options.id);
            } else {
            }else if(options.q) {
                    // 双重解码:微信对URL进行了两次编码
                    const decodedUrl = decodeURIComponent(decodeURIComponent(options.q));
                    console.log('原始URL:', decodedUrl);
                    // 解析URL中的查询参数
                    const params = this.parseUrlParams(decodedUrl);
                    this.cardId =  params.id;
                    this.loadCouponInfo(this.cardId);
                }
             else {
                // 如果没有传递ID,显示空状态
                uni.showToast({
                    title: '缺少优惠券ID参数',
                    title: '缺少兑换券ID参数',
                    icon: 'none'
                });
            }
        },
        methods: {
            // 解析URL参数
            parseUrlParams(url) {
                const params = {};
                // 处理可能存在的hash(如果有的话)
                const cleanUrl = url.split('#')[0];
                const queryStr = cleanUrl.split('?')[1] || '';
                queryStr.split('&').forEach(pair => {
                    const [key, value] = pair.split('=');
                    if (key) {
                        // 如果值存在,则解码,否则设为空字符串
                        params[key] = value ? decodeURIComponent(value) : '';
                    }
                });
                return params;
            },
            // 加载指定ID的优惠券信息
            async loadCouponInfo(id) {
                if (this.loading) return;
@@ -125,12 +152,12 @@
                    if (res.data.code===200) {
                        this.couponInfo = res.data.data;
                    } else {
                        throw new Error(res.message || '获取优惠券失败');
                        throw new Error(res.message || '获取兑换券失败');
                    }
                } catch (err) {
                    console.error('获取优惠券信息失败:', err);
                    console.error('获取兑换券信息失败:', err);
                    uni.showToast({
                        title: err.message || '获取优惠券失败',
                        title: err.message || '获取兑换券失败',
                        icon: 'none'
                    });
                } finally {
@@ -142,7 +169,7 @@
            async claimCoupon() {
                if (!this.couponInfo || this.couponInfo.claimStatus === 'CLAIM') {
                    uni.showToast({
                        title: '该优惠券已领取',
                        title: '该兑换券已领取',
                        icon: 'none'
                    });
                    return;
@@ -174,7 +201,7 @@
                    }
                } catch (err) {
                    uni.hideLoading();
                    console.error('领取优惠券失败:', err);
                    console.error('领取兑换券失败:', err);
                    uni.showToast({
                        title: err.message || '领取失败',
                        icon: 'none'
pages/order/myOrder.vue
@@ -161,7 +161,7 @@
                    shape="circle"
                    class="cancel-btn"
                    size="mini"
                    v-if="order.orderStatus === 'COMPLETED'"
                    v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'"
                    @click="buyBack(order)"
                  >
                    再来一单
pages/order/orderDetail.vue
@@ -149,7 +149,7 @@
            @click="ByUserMessage(order)">查看拼团信息</view>
            <view class="customer-service"
            @click="contact(order.storeId)">联系客服</view>
            <view class="customer-service" v-if="order.orderStatus==='COMPLETED'"
            <view class="customer-service" v-if="order.orderStatus==='COMPLETED' && order.orderType !=='VIRTUAL'"
            @click="buyBack"
            >再来一单</view>
        </view>