Compare commits
4 Commits
merge/tmp-
...
fix/popup-
| Author | SHA1 | Date | |
|---|---|---|---|
| 5703405598 | |||
| e19fef785f | |||
| 92ae114c5c | |||
| b25c366a5b |
@@ -41,7 +41,15 @@ const localDevConfig = ({
|
|||||||
'local-2': { // 测试平台
|
'local-2': { // 测试平台
|
||||||
uniacid: 2,
|
uniacid: 2,
|
||||||
domain: 'http://localhost:8050/',
|
domain: 'http://localhost:8050/',
|
||||||
},
|
},
|
||||||
})['1']; // 选择要使用的环境配置
|
'47': { // 修改弹窗
|
||||||
|
uniacid: 47,
|
||||||
|
domain: 'https://5g.aigc-quickapp.com/',
|
||||||
|
},
|
||||||
|
'2075': { //
|
||||||
|
uniacid: 2075,
|
||||||
|
domain: 'https://xcx.aigc-quickapp.com/',
|
||||||
|
},
|
||||||
|
})['47']; // 选择要使用的环境配置
|
||||||
|
|
||||||
export default localDevConfig;
|
export default localDevConfig;
|
||||||
@@ -17,10 +17,6 @@
|
|||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
|
||||||
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
||||||
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
||||||
<template v-slot:components>
|
<template v-slot:components>
|
||||||
@@ -43,35 +39,17 @@
|
|||||||
<view @touchmove.prevent.stop>
|
<view @touchmove.prevent.stop>
|
||||||
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
||||||
<view class="small-bot">
|
<view class="small-bot">
|
||||||
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
|
|
||||||
<view bindtap="adverclose">跳过</view>
|
|
||||||
<view class="time">{{clock}}s</view>
|
|
||||||
</view>
|
|
||||||
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
|
|
||||||
<view class="time" style="line-height: 64rpx;">{{clock}}s</view>
|
|
||||||
</view> -->
|
|
||||||
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
||||||
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
||||||
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
||||||
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
||||||
:src="$util.img(item.imageUrl)" width="100%"></image>
|
:src="$util.img(item.imageUrl)" width="100%"></image>
|
||||||
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
|
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
|
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
|
||||||
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="image-wrap">
|
|
||||||
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
|
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
|
|
||||||
<view class="item">
|
|
||||||
<image :src="$util.img(item.imageUrl)" mode="aspectFit" :show-menu-by-longpress="true"/>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
|
||||||
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> -->
|
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -101,7 +79,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
<!-- 选择门店弹出框,定位当前位置,展示最近的一个门店 -->
|
<!-- 选择门店弹出框 -->
|
||||||
<view @touchmove.prevent.stop class="choose-store">
|
<view @touchmove.prevent.stop class="choose-store">
|
||||||
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
||||||
<view class="choose-store-popup">
|
<view class="choose-store-popup">
|
||||||
@@ -136,8 +114,27 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<hover-nav :need="true"></hover-nav>
|
<hover-nav :need="true"></hover-nav>
|
||||||
<!-- 隐私协议 -->
|
|
||||||
|
<!-- 隐私协议弹窗 UI (新增) -->
|
||||||
|
<view v-if="showPrivacyModal" class="privacy-modal-mask" @touchmove.prevent>
|
||||||
|
<view class="privacy-modal-container">
|
||||||
|
<view class="modal-header">用户隐私保护提示</view>
|
||||||
|
<view class="modal-body">
|
||||||
|
<text>感谢您使用本应用,在使用前您应当阅读并同意</text>
|
||||||
|
<text class="link" @click="viewPrivacy('privacy')">《隐私条款》</text>
|
||||||
|
<text class="link" @click="viewPrivacy('agreement')">《用户服务协议》</text>
|
||||||
|
<text>,当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用相关功能。</text>
|
||||||
|
</view>
|
||||||
|
<view class="modal-footer">
|
||||||
|
<view class="btn btn-disagree" @click="handleDisagree">不同意</view>
|
||||||
|
<view class="btn btn-agree" @click="handleAgree">同意并继续</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 隐私协议组件 (原有) -->
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||||
<ns-login ref="login"></ns-login>
|
<ns-login ref="login"></ns-login>
|
||||||
@@ -146,14 +143,132 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
import diyJs from '@/common/js/diy.js';
|
import diyJs from '@/common/js/diy.js';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
import indexJs from './public/js/index.js';
|
import indexJs from './public/js/index.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [diyJs, scroll, indexJs]
|
mixins: [diyJs, scroll, indexJs],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
minScrollTop: 100,
|
||||||
|
wechatQrcode: '',
|
||||||
|
diyRoute: '/pages/index/index',
|
||||||
|
showPrivacyModal: false // 新增:控制隐私弹窗显示
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// #ifdef H5
|
||||||
|
if (option.module && option.module == 'locationPicker') {
|
||||||
|
option.name = '';
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
this.name = option.name || 'DIY_VIEW_INDEX';
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getFollowQrcode();
|
||||||
|
// 页面显示时检查隐私设置
|
||||||
|
this.checkPrivacySetting();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.unsubscribe = this.$eventBus?.onMany([
|
||||||
|
'rubik-cube-tap',
|
||||||
|
'picture-tap',
|
||||||
|
'text-tap',
|
||||||
|
'goods-list-tap',
|
||||||
|
'presale-tap',
|
||||||
|
'notes-tap',
|
||||||
|
'merch-list-tap',
|
||||||
|
'map-tap',
|
||||||
|
'img-ads-tap',
|
||||||
|
'many-goods-list-tap',
|
||||||
|
'search-tap',
|
||||||
|
], this._handleDiyGroupInteractionEvent);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (this.unsubscribe) this.unsubscribe();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 检查隐私弹窗逻辑
|
||||||
|
checkPrivacySetting() {
|
||||||
|
// 模拟检查本地存储,看用户是否已经同意过
|
||||||
|
// 实际项目中请替换为你真实的存储逻辑
|
||||||
|
const hasAgreed = uni.getStorageSync('HAS_AGREED_PRIVACY');
|
||||||
|
if (!hasAgreed) {
|
||||||
|
// 延迟显示,防止遮挡页面渲染
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showPrivacyModal = true;
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 用户点击同意
|
||||||
|
handleAgree() {
|
||||||
|
// 保存同意状态
|
||||||
|
uni.setStorageSync('HAS_AGREED_PRIVACY', true);
|
||||||
|
this.showPrivacyModal = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 用户点击不同意
|
||||||
|
handleDisagree() {
|
||||||
|
// 微信小程序环境下,不同意通常退出小程序
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
uni.exitMiniProgram();
|
||||||
|
// #endif
|
||||||
|
// H5 或 App 下可以提示或直接不显示内容
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
uni.showToast({
|
||||||
|
title: '您已拒绝协议,无法使用',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
// 这里可以选择关闭页面或保持弹窗
|
||||||
|
// this.showPrivacyModal = false;
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查看具体条款(可选功能)
|
||||||
|
viewPrivacy(type) {
|
||||||
|
// 这里可以跳转到具体的条款页面,或者使用你现有的 privacy-popup 组件
|
||||||
|
// 假设你有现成的组件逻辑:
|
||||||
|
if (this.$refs.privacyPopup) {
|
||||||
|
// 假设 privacy-popup 组件有一个 show 方法
|
||||||
|
// this.$refs.privacyPopup.show(type);
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '请在此处实现查看条款逻辑',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getFollowQrcode() {
|
||||||
|
if (!this.$util.isWeiXin()) return;
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/wechat/api/wechat/followqrcode',
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0 && res.data) {
|
||||||
|
this.wechatQrcode = res.data.qrcode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
officialAccountsOpen() {
|
||||||
|
this.$refs.officialAccountsPopup.open();
|
||||||
|
},
|
||||||
|
officialAccountsClose() {
|
||||||
|
this.$refs.officialAccountsPopup.close();
|
||||||
|
},
|
||||||
|
_handleDiyGroupInteractionEvent(payload) {
|
||||||
|
// #ifdef H5
|
||||||
|
return true;
|
||||||
|
// #endif
|
||||||
|
if (this.storeToken) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
this.$refs.login?.open();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -199,6 +314,74 @@ export default {
|
|||||||
.small-bot-close i {
|
.small-bot-close i {
|
||||||
font-size: 60rpx;
|
font-size: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 新增:隐私弹窗样式 */
|
||||||
|
.privacy-modal-mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.6); // 半透明背景
|
||||||
|
z-index: 9999; // 确保层级最高
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy-modal-container {
|
||||||
|
width: 80%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 40rpx 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
line-height: 1.6;
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: #007aff; // 蓝色链接
|
||||||
|
margin: 0 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
flex: 1;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-disagree {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-agree {
|
||||||
|
background-color: #07c160; // 微信绿
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.swiper ::v-deep .uni-swiper-dots-horizontal {
|
.swiper ::v-deep .uni-swiper-dots-horizontal {
|
||||||
|
|||||||
@@ -1,82 +1,119 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离
|
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离
|
||||||
wechatQrcode: '', // 公众号二维码
|
wechatQrcode: '', // 公众号二维码
|
||||||
diyRoute: '/pages/index/index'
|
diyRoute: '/pages/index/index',
|
||||||
};
|
showPrivacyModal: false // 新增:控制隐私弹窗显示的变量
|
||||||
},
|
};
|
||||||
onLoad(option) {
|
},
|
||||||
// #ifdef H5
|
onLoad(option) {
|
||||||
// H5地图选择位置回调数据
|
// #ifdef H5
|
||||||
if (option.module && option.module == 'locationPicker') {
|
// H5地图选择位置回调数据
|
||||||
option.name = ''; // 清空地址
|
if (option.module && option.module == 'locationPicker') {
|
||||||
}
|
option.name = ''; // 清空地址
|
||||||
// #endif
|
}
|
||||||
this.name = option.name || 'DIY_VIEW_INDEX'; // 根据店铺运营模式,打开平台(shop)或者连锁门店(stroe)页面,接口会自行判断
|
// #endif
|
||||||
|
this.name = option.name || 'DIY_VIEW_INDEX'; // 根据店铺运营模式,打开平台(shop)或者连锁门店(stroe)页面,接口会自行判断
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// 获取关注公众号二维码
|
// 获取关注公众号二维码
|
||||||
this.getFollowQrcode();
|
this.getFollowQrcode();
|
||||||
},
|
|
||||||
mounted() {
|
// 打开隐私弹窗
|
||||||
// 监听图片、文字、商品列表等组件的点击事件
|
this.openPrivacyModal();
|
||||||
this.unsubscribe = this.$eventBus?.onMany([
|
},
|
||||||
'rubik-cube-tap',
|
mounted() {
|
||||||
'picture-tap',
|
// 监听图片、文字、商品列表等组件的点击事件
|
||||||
'text-tap',
|
this.unsubscribe = this.$eventBus?.onMany([
|
||||||
'goods-list-tap',
|
'rubik-cube-tap',
|
||||||
'presale-tap',
|
'picture-tap',
|
||||||
'notes-tap',
|
'text-tap',
|
||||||
'merch-list-tap',
|
'goods-list-tap',
|
||||||
'map-tap',
|
'presale-tap',
|
||||||
'img-ads-tap',
|
'notes-tap',
|
||||||
'many-goods-list-tap',
|
'merch-list-tap',
|
||||||
'search-tap',
|
'map-tap',
|
||||||
], this._handleDiyGroupInteractionEvent);
|
'img-ads-tap',
|
||||||
},
|
'many-goods-list-tap',
|
||||||
beforeDestroy() {
|
'search-tap',
|
||||||
// 移除图片点击事件监听
|
], this._handleDiyGroupInteractionEvent);
|
||||||
if (this.unsubscribe) this.unsubscribe();
|
},
|
||||||
},
|
beforeDestroy() {
|
||||||
methods: {
|
// 移除图片点击事件监听
|
||||||
// 关注公众号
|
if (this.unsubscribe) this.unsubscribe();
|
||||||
getFollowQrcode() {
|
},
|
||||||
if (!this.$util.isWeiXin()) return;
|
methods: {
|
||||||
this.$api.sendRequest({
|
// 检查隐私设置(保留原有逻辑,如果不需要可删除)
|
||||||
url: '/wechat/api/wechat/followqrcode',
|
checkPrivacySetting() {
|
||||||
success: res => {
|
setTimeout(() => {
|
||||||
if (res.code >= 0 && res.data) {
|
if (this.$refs.privacyPopup) {
|
||||||
this.wechatQrcode = res.data.qrcode;
|
this.$refs.privacyPopup.proactive();
|
||||||
}
|
}
|
||||||
}
|
}, 100);
|
||||||
});
|
},
|
||||||
},
|
|
||||||
officialAccountsOpen() {
|
|
||||||
this.$refs.officialAccountsPopup.open();
|
|
||||||
},
|
|
||||||
officialAccountsClose() {
|
|
||||||
this.$refs.officialAccountsPopup.close();
|
|
||||||
},
|
|
||||||
// 统一处理点击及触摸事件
|
|
||||||
_handleDiyGroupInteractionEvent(payload) {
|
|
||||||
// #ifdef H5
|
|
||||||
// 如果是 H5 环境,直接返回 true 继续传播
|
|
||||||
return true;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// 如果已登录,直接返回 true 继续传播
|
// 新增:打开隐私弹窗的方法
|
||||||
if (this.storeToken) {
|
openPrivacyModal() {
|
||||||
return true;
|
// 延迟一点执行,防止页面加载卡顿
|
||||||
}
|
setTimeout(() => {
|
||||||
|
this.showPrivacyModal = true;
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
|
||||||
// 打开登录弹窗
|
// 新增:处理用户点击“同意并继续”
|
||||||
// console.log('==> _handleDiyGroupInteractionEvent, 未登录,打开登录弹窗', { payload })
|
handlePrivacyAgree() {
|
||||||
this.$refs.login?.open();
|
this.showPrivacyModal = false;
|
||||||
|
// 这里可以添加保存到本地存储的逻辑,表示用户已同意
|
||||||
|
uni.setStorageSync('hasAgreedPrivacy', true);
|
||||||
|
},
|
||||||
|
|
||||||
// 阻止事件继续传播
|
// 新增:处理用户点击“不同意”
|
||||||
return false;
|
handlePrivacyDisagree() {
|
||||||
}
|
this.showPrivacyModal = false;
|
||||||
}
|
// 如果不同意,通常退出小程序或关闭页面
|
||||||
}
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 关注公众号
|
||||||
|
getFollowQrcode() {
|
||||||
|
if (!this.$util.isWeiXin()) return;
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/wechat/api/wechat/followqrcode',
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0 && res.data) {
|
||||||
|
this.wechatQrcode = res.data.qrcode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
officialAccountsOpen() {
|
||||||
|
this.$refs.officialAccountsPopup.open();
|
||||||
|
},
|
||||||
|
officialAccountsClose() {
|
||||||
|
this.$refs.officialAccountsPopup.close();
|
||||||
|
},
|
||||||
|
// 统一处理点击及触摸事件
|
||||||
|
_handleDiyGroupInteractionEvent(payload) {
|
||||||
|
// #ifdef H5
|
||||||
|
// 如果是 H5 环境,直接返回 true 继续传播
|
||||||
|
return true;
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// 如果已登录,直接返回 true 继续传播
|
||||||
|
if (this.storeToken) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开登录弹窗
|
||||||
|
// console.log('==> _handleDiyGroupInteractionEvent, 未登录,打开登录弹窗', { payload })
|
||||||
|
this.$refs.login?.open();
|
||||||
|
|
||||||
|
// 阻止事件继续传播
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
17
readme.md
17
readme.md
@@ -78,20 +78,23 @@
|
|||||||
1. 使用 HBuilderX 打开项目
|
1. 使用 HBuilderX 打开项目
|
||||||
2. 打开项目根目录的 `manifest.json` 文件,切换至可视化配置界面:
|
2. 打开项目根目录的 `manifest.json` 文件,切换至可视化配置界面:
|
||||||
1. 依次点击「Web 配置」→「运行的基础配置」
|
1. 依次点击「Web 配置」→「运行的基础配置」
|
||||||
2. 修改路径中的客户编号
|
2. 根据情况查看是否修改路径中/hwappx/????/的客户编号
|
||||||
3. 📌 **通用版**保留原有 `/hwappx/common/`
|
📌 **通用版**保留原有 `/hwappx/common/`
|
||||||
|
📌 **测试版**保留原有 `/hwappx/test/`
|
||||||
💡 **示例**:`/hwappx/2811/`,其中 2811 为定制化版客户编号
|
💡 **个性化定制示例**:`/hwappx/2811/`,其中 2811 为定制化版客户编号
|
||||||
|
|
||||||
3. 选择菜单栏「发行」 → 「自定义发行」 →「H5-xcx.aigc-quickapp.com」,修改以下配置:
|
3. 选择菜单栏「发行」 → 「自定义发行」 →(「H5-xcx.aigc-quickapp.com」查看.local.config.js中站点的网址前缀,站点的网址前缀是什么就选自定义发行中相同的格式)
|
||||||
|
例如:网址是5g.aigc-quickapp.com,自定义发行就选H5-5g.aigc-quickapp.com
|
||||||
|
网址是dev.aigc-quickapp.com,自定义发行就选H5-xcx.aigc-quickapp.com
|
||||||
|
4. 修改以下配置:
|
||||||
1. **网站标题**:快应用
|
1. **网站标题**:快应用
|
||||||
2. **网站域名**:当前客户域名(示例:xcx.aigc-quickapp.com)
|
2. **网站域名**:当前客户域名(示例:xcx.aigc-quickapp.com或者5g.aigc-quickapp.com)
|
||||||
3. 确认后点击「发行」等待构建完成
|
3. 确认后点击「发行」等待构建完成
|
||||||
|
|
||||||
⚠️ **注意**:底部控制台弹出“项目 lucky_shop 导出Web成功,路径为:D:\项目文件\项目根目录\unpackage\dist\build\web”后再执行下一步
|
⚠️ **注意**:底部控制台弹出“项目 lucky_shop 导出Web成功,路径为:D:\项目文件\项目根目录\unpackage\dist\build\web”后再执行下一步
|
||||||
💡 **示例**:`项目 lucky_shop 导出Web成功,路径为:D:\0.项目源码\lucky_shop\unpackage\dist\build\web`
|
💡 **示例**:`项目 lucky_shop 导出Web成功,路径为:D:\0.项目源码\lucky_shop\unpackage\dist\build\web`
|
||||||
|
|
||||||
4. 按控制台提示的路径找到 `web` 目录,将该目录下所有文件手动打包成一个 `.zip` 压缩包
|
5. 按控制台提示的路径找到 `web` 目录,将该目录下所有文件手动打包成一个 `.zip` 压缩包
|
||||||
*仅打包文件,不包含外层 web 目录*
|
*仅打包文件,不包含外层 web 目录*
|
||||||
|
|
||||||
##### 4.2.1.2 【重命名】
|
##### 4.2.1.2 【重命名】
|
||||||
|
|||||||
Reference in New Issue
Block a user