v2.28.1 抖音团购优化

This commit is contained in:
磷叶 2026-02-27 11:29:31 +08:00
parent 2a8c98fbea
commit 739b8e0310
6 changed files with 63 additions and 14 deletions

View File

@ -1,9 +1,9 @@
const install = (Vue, vm) => {
uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
baseUrl: 'http://192.168.1.3:4101', //键辉本地
// baseUrl: 'http://192.168.1.3:4101', //键辉本地
// baseUrl: 'http://192.168.2.221:4101', //景森本地
// baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid wx8a05cf95418a6859 小兔骑骑appidwx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid wx8a05cf95418a6859 小兔骑骑appidwx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上
// baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appidwx4d178f8c80348214
loadingText: '努力加载中~',

View File

@ -102,11 +102,15 @@
areaId:'',
channelId:'',
zfflag:true,
area: {}
area: {},
redirectUrl: '',
redirectRemark: ''
}
},
onLoad(option) {
this.areaId = option.areaId
this.redirectUrl = option.redirectUrl
this.redirectRemark = option.redirectRemark
this.getAreaDetail()
this.gethuiyuan()
this.getchannelid()
@ -219,7 +223,7 @@
},
goVerify() {
uni.navigateTo({
url: '/page_user/verify/index?areaId=' + this.areaId,
url: `/page_user/verify/index?areaId=${this.areaId}&redirectUrl=${this.redirectUrl}&redirectRemark=${this.redirectRemark}`,
})
}
}

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<u-navbar title="我的会员" :border-bottom="false" :background="bgc" back-icon-color="#111827" title-color="#111827"
<u-navbar title="我的卡包" :border-bottom="false" :background="bgc" back-icon-color="#111827" title-color="#111827"
title-size="34" title-bold height="44" :custom-back="btnfh">
</u-navbar>
@ -69,13 +69,21 @@ export default {
bgc: {
backgroundColor: "#F7F8FA",
},
type:''
type: '',
redirectUrl: '',
redirectRemark: ''
}
},
onLoad(e) {
if(e.type){
this.type = e.type
}
if (e.type) {
this.type = e.type
}
if (e.redirectUrl) {
this.redirectUrl = decodeURIComponent(e.redirectUrl)
}
if (e.redirectRemark) {
this.redirectRemark = decodeURIComponent(e.redirectRemark)
}
},
onShow() {
this.getlist()
@ -133,12 +141,14 @@ page {
padding: 16rpx 24rpx;
background: #FFFFFF;
margin-bottom: 2rpx;
display: flex;
justify-content: flex-end;
gap: 32rpx;
}
.jilu {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 28rpx;
color: #4297F3;
font-weight: 500;

View File

@ -1423,8 +1423,10 @@
},
//
btnhuiyuan(){
let redirectUrl = encodeURIComponent('/page_fenbao/storedlist/trueorder');
let redirectRemark = '前往下单';
uni.navigateTo({
url:'/page_fenbao/huiyuan/index?areaId=' + this.bikeobj.areaId
url:`/page_fenbao/huiyuan/index?areaId=${this.bikeobj.areaId}&redirectUrl=${redirectUrl}&redirectRemark=${redirectRemark}`
})
},
//

View File

@ -7,7 +7,8 @@
<text class="success-title">核销成功</text>
<text class="success-coupon-name">{{ couponName }}</text>
<view class="success-btns">
<view class="success-btn primary" @click="onViewCard">查看卡券</view>
<view v-if="redirectUrl && redirectRemark" class="success-btn primary" @click="onRedirect">{{ redirectRemark }}</view>
<view v-else class="success-btn primary" @click="onViewCard">查看卡券</view>
<view class="success-btn secondary" @click="onContinueVerify">继续核销</view>
</view>
</view>
@ -18,6 +19,7 @@
/**
* 核销成功弹窗
* 展示核销成功的卡券名称提供查看卡券继续核销两个操作
* 若传入 redirectUrlredirectRemark则额外显示重定向按钮按钮文字为 redirectRemark
*/
export default {
name: 'VerifySuccessPopup',
@ -29,6 +31,14 @@ export default {
couponName: {
type: String,
default: ''
},
redirectUrl: {
type: String,
default: ''
},
redirectRemark: {
type: String,
default: ''
}
},
computed: {
@ -47,6 +57,9 @@ export default {
},
onContinueVerify() {
this.$emit('continueVerify')
},
onRedirect() {
this.$emit('redirect')
}
}
}

View File

@ -96,8 +96,11 @@
<verify-success-popup
v-model="successPopupVisible"
:coupon-name="successCouponName"
:redirect-url="redirectUrl"
:redirect-remark="redirectRemark"
@viewCard="onViewCard"
@continueVerify="onContinueVerify"
@redirect="onRedirect"
/>
</view>
</template>
@ -151,7 +154,9 @@ export default {
appId: '1',
areaId: null,
successPopupVisible: false,
successCouponName: ''
successCouponName: '',
redirectUrl: '',
redirectRemark: ''
}
},
computed: {
@ -162,6 +167,10 @@ export default {
onLoad(options) {
this.appId = this.$store.state.appid || '1'
this.areaId = options.areaId
if (options.redirectUrl) {
this.redirectUrl = decodeURIComponent(options.redirectUrl)
}
this.redirectRemark = options.redirectRemark
this.initDefaultArea()
},
methods: {
@ -259,7 +268,7 @@ export default {
})
uni.hideLoading()
if (res.code === 200) {
this.successCouponName = item.skuTitle || (item.vip && item.vip.name) || '卡券'
this.successCouponName = item?.vip?.name
this.successPopupVisible = true
this.couponCode = ''
this.preparePayload = null
@ -282,6 +291,17 @@ export default {
this.couponCode = ''
this.preparePayload = null
this.prepareItemList = []
},
/** 重定向redirectRemark 按钮点击) */
onRedirect() {
this.successPopupVisible = false
if (this.redirectUrl) {
if (this.redirectUrl.startsWith('http')) {
uni.redirectTo({ url: '/page_fenbao/webview?url=' + encodeURIComponent(this.redirectUrl) })
} else {
uni.redirectTo({ url: this.redirectUrl.startsWith('/') ? this.redirectUrl : '/' + this.redirectUrl })
}
}
}
}
}