no message

This commit is contained in:
2025-11-16 18:30:50 +08:00
parent 9b48bd07d9
commit 3fe89ed7ee
22 changed files with 2426 additions and 59 deletions
+74 -2
View File
@@ -201,10 +201,12 @@
</view>
</view>
</up-overlay>
<HomePopup :show="homeShow" :dataObj="curData" @jumpShop="onJumpShop"></HomePopup>
</view>
</template>
<script>
import { getGoodsDetail } from "@/api/product.js";
import choiceness from '@/components/choiceness/choiceness.vue';
import { searchList } from '@/api/product.js';
import { getCascadeCategory, checkAppVersion, getCarouselImage } from '@/api/common.js';
@@ -213,9 +215,14 @@ import CustomTabBar from '@/components/custom-tab-bar.vue'; // 引入自定义
import dayjs from 'dayjs';
import useTabber from "tabber-component";
import { comparisonVersionHandler } from '@/utils/index.js';
import HomePopup from '@/components/common/home-popup.vue'
import {
SHARE_URL,
} from "@/utils/config.js";
export default {
components: { choiceness, CustomTabBar },
components: { choiceness, CustomTabBar,HomePopup },
data() {
return {
swiperList: [
@@ -244,6 +251,10 @@ export default {
updateApkObj: {}, // 后台数据
bannerPercentageShow: false,// 是否显示进度条
bannerPercentage: 0,// 进度条
curId:null,
curData:null,
homeShow:false
}
},
onShow() {
@@ -262,10 +273,11 @@ export default {
const time2 = dayjs();
const diff = time2.diff(time1);
if (!versionUpdateTime || diff > 5 * 60 * 1000) {
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
this.checkUpdate(); // 判断是否需要更新
} else {
console.log("不需要更新...");
this.onClipboard();
}
// #endif
this.getSortList();
@@ -273,9 +285,66 @@ export default {
this.querySearchList(SEARCH_TYPE.EXPLOSIVE);// 爆单专区
this.getCarouselImage();
},
onLoad(){
},
mounted() {
},
methods: {
onJumpShop(){
uni.navigateTo({
url:`/pages/other_package/productInfo/productInfo?id=${this.curId}`
})
this.curId = null;
this.curData = null;
this.homeShow = false;
},
onClipboard(){
let _this = this;
console.log('11111')
uni.getClipboardData({
success: function(res) {
// http://localhost:5173/#/pages/other_package/productInfo/productInfo?id=1038
console.log(res.data); // 剪贴板内容
if(res.data.indexOf(`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=`) != -1){
uni.showModal({
title:'',
content:'当前APP想要粘贴商品详情,是否继续?',
success:(res1=>{
if(res1.confirm){
let arr = res.data.split('?id=');
console.log('arr')
_this.curId = Number(arr[1]);
_this.getShop();
uni.setClipboardData({
data: '',
});
}
}),
fail:(res2=>{
uni.setClipboardData({
data: '',
});
})
})
}
},
fail: function(err) {
console.error('获取剪贴板内容失败', err);
}
});
},
getShop(){
const params = {
id: this.curId,
};
getGoodsDetail(params).then(res=>{
this.curData = res.data;
this.homeShow = true;
});
},
onJumpYou(){
uni.navigateTo({
url:'/pages/rwa_package/shop/you-shop'
@@ -303,6 +372,9 @@ export default {
self.bannerShow = true; // 显示弹窗
return;
} else {
console.log("wgt更新-2")
self.onClipboard();
return;
}
}