| | |
| | | { |
| | | "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" |
| | | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | |
| | | "path" : "claim-coupon/claim-coupon", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "优惠券领取", |
| | | "navigationBarTitleText" : "商品兑换券领取", |
| | | "enablePullDownRefresh" : true, |
| | | "componentPlaceholder": { |
| | | "u-image": "view", |
| | |
| | | <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> |
| | |
| | | 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() |
| | |
| | | <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" |
| | |
| | | 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 { |
| | |
| | | flage: false, //是否验证码验证 |
| | | codeForm: { |
| | | mobile: "", //手机号 |
| | | code: "", //验证码 |
| | | code: "111111", //验证码 |
| | | username: "", //用户名 |
| | | }, |
| | | tips: "", //提示 |
| | |
| | | } |
| | | } |
| | | }, |
| | | 'codeForm.mobile': function(newVal, oldVal) { |
| | | // 当手机号变化时,自动去除空格 |
| | | if (newVal && typeof newVal === 'string') { |
| | | this.codeForm.mobile = newVal.replace(/\s/g, ''); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | duration: 2000, |
| | | icon: "none", |
| | | }); |
| | | let userInfo = storage.getUserInfo() |
| | | userInfo.mobile = this.codeForm.mobile; |
| | | storage.setUserInfo(userInfo) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, |
| | |
| | | <view class="container"> |
| | | <!-- 顶部标题 --> |
| | | <view class="header"> |
| | | <text class="title">优惠券领取</text> |
| | | <text class="subtitle">领取您的专属优惠券</text> |
| | | <text class="title">商品兑换券领取</text> |
| | | <text class="subtitle">领取您的专属商品兑换券</text> |
| | | </view> |
| | | |
| | | <!-- 单个优惠券展示 --> |
| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | async claimCoupon() { |
| | | if (!this.couponInfo || this.couponInfo.claimStatus === 'CLAIM') { |
| | | uni.showToast({ |
| | | title: '该优惠券已领取', |
| | | title: '该兑换券已领取', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | |
| | | } |
| | | } catch (err) { |
| | | uni.hideLoading(); |
| | | console.error('领取优惠券失败:', err); |
| | | console.error('领取兑换券失败:', err); |
| | | uni.showToast({ |
| | | title: err.message || '领取失败', |
| | | icon: 'none' |
| | |
| | | shape="circle" |
| | | class="cancel-btn" |
| | | size="mini" |
| | | v-if="order.orderStatus === 'COMPLETED'" |
| | | v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'" |
| | | @click="buyBack(order)" |
| | | > |
| | | 再来一单 |
| | |
| | | @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> |