提交代码

This commit is contained in:
zpc 2025-04-15 14:35:00 +08:00
parent e1c07a1789
commit d43a691265
6 changed files with 60 additions and 113 deletions

52
App.vue
View File

@ -1,7 +1,6 @@
<script>
import Vue from "vue";
//
import '@/components/detail-preview-popup/index.js';
//
export default {
data() {
@ -14,44 +13,6 @@ export default {
//
this.callLoginRecordApi();
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
//
console.log(res.hasUpdate);
});
updateManager.onUpdateReady(function (res) {
uni.showModal({
title: "更新提示",
content: "新版本已经准备好,是否重启应用?",
success(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate();
}
},
});
});
updateManager.onUpdateFailed(function (res) {
//
});
var that = this;
this.$config.init().then(async (data) => {
//
let src = await that.$config.getAppSettingAsync("win_audio");
if (src == null || src == "") {
src = that.$img("/static/mp3/open.mp3");
}
//
const openBgm = uni.createInnerAudioContext();
Vue.prototype.bgmCtx = {};
Vue.prototype.bgmCtx.openBgm = openBgm;
openBgm.src = src;
});
/* 重置首页公告弹窗状态 */
uni.setStorageSync("_is_this_show", false);
@ -223,14 +184,3 @@ button.hide {
}
</style>
<template>
<view>
<!-- 全局预览组件 -->
<detail-preview-popup></detail-preview-popup>
<!-- 主应用容器 -->
<view>
<slot></slot>
</view>
</view>
</template>

View File

@ -54,7 +54,6 @@ class ConfigManager {
isLoading = true;
loadPromise = new Promise((resolve, reject) => {
RequestManager.get('config')
.then(res => {
if (res.status === 1 && res.data) {
@ -130,19 +129,13 @@ class ConfigManager {
console.warn('配置数据尚未加载,获取本地缓存中。。。');
configData = uni.getStorageSync("configData");
if (configData != null && configData != "") {
return configData;
// 不直接返回configData继续执行下面的代码
} else {
configData = defaultConfig;
}
configData = defaultConfig;
// wx.restartMiniProgram({
// success(res) {
// console.log('重启小程序成功', res);
// },
// fail(err) {
// console.error('重启小程序失败', err);
// }
// });
}
return key in configData ? configData[key] : defaultValue;
return key in configData ? configData[key] : defaultConfig[key];
}
/**

View File

@ -84,10 +84,19 @@ export default {
});
} else {
//
uni.navigateBack({
delta: 1
});
var pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack({
delta: 1,
fail: (err) => {
console.log('返回页面失败2', err);
}
});
} else {
uni.switchTab({
url: '/pages/shouye/index',
});
}
}
}
}

View File

@ -576,11 +576,10 @@
"tabBar": {
"custom": true,
"color": "#CCCCCC",
"selectedColor": "#FFFFFF",
"selectedColor": "#000000",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"iconWidth": "140rpx",
// "iconHeight": "100rpx",
"iconWidth": "48rpx",
"list": [{
"pagePath": "pages/shouye/index",
"iconPath": "static/tabbar/m1.png",
@ -603,7 +602,7 @@
"pagePath": "pages/infinite/index",
"iconPath": "static/tabbar/m2.png",
"selectedIconPath": "static/tabbar/s2.png",
"text": "积分赏"
"text": "福利"
},
{
"pagePath": "pages/user/index",

View File

@ -180,12 +180,16 @@
import OrderConfirmPopup from '@/components/order-confirm-popup/order-confirm-popup.vue'
import DetailListItem from '@/components/detail-list-item/detail-list-item.vue'
import DetailButton from '@/components/detail-button/detail-button.vue'
//
import DetailPreviewPopup from '@/components/detail-preview-popup/detail-preview-popup.vue'
import preview from '@/components/detail-preview-popup/index.js'
export default {
components: {
OrderConfirmPopup,
DetailListItem,
DetailButton
DetailButton,
DetailPreviewPopup //
},
data() {
return {
@ -310,8 +314,8 @@ export default {
methods: {
previewDetail(item) {
console.log(item);
// 使
this.$preview({
// 使
preview({
productType: this.optData.type_text,
dataItem: item,
goods: this.pageData.goods

View File

@ -1,26 +1,14 @@
<template>
<view class="content minHeight100">
<view class="navLeft align-center" :style="{ top: $sys().statusBarHeight + 'px' }" @tap="$c.back(1)">
<uni-icons type="left" color="#000000"></uni-icons>
<!-- <view class="" style="color: #000000; margin-left: 240rpx;">
{{$c.detailPageTitle((pageData && pageData.goods) || '')}}
</view> -->
</view>
<view class="center relative" style="z-index: 10;" :style="{ top: $sys().statusBarHeight + 'px' }">
<text class="" style="padding-top: 20rpx;">{{ $c.detailPageTitle((pageData && pageData.goods) || "")
}}</text>
</view>
<page-container :title="title" :showBack="true">
<view class="content minHeight100">
<view class="header relative" v-if="pageData && pageData.goods"
:style="{ background: 'url(' + pageData.goods.imgurl_detail + ') no-repeat 0 0 / 100% 100%' }">
<view class="header-wuzhe flex" v-if="pageData.goods.is_shou_zhe == 1">
<image class="img100" :src="$img1('common/chouBanjia.png')" mode="aspectFit"></image>
</view>
<view class="header-goodsTitel">{{ pageData.goods.title }}</view>
<view class="header-suoxiang center"
v-if="pageData.goods.lock_is == 1 && pageData.lock_info.goods_lock_surplus_time > 0">
<view class="header-suoxiang center" v-if="pageData.goods.lock_is == 1 && pageData.lock_info.goods_lock_surplus_time > 0">
<image :src="pageData.lock_info.goods_lock_user_headimg" mode="aspectFill"></image>
<view class="hidden ml10">{{ pageData.lock_info.goods_lock_user_nickname }}</view>
<image class="ml20" :src="$img1('index/suoxinag.png')" mode="aspectFit"></image>
@ -60,8 +48,7 @@
</view>
<view class=""
style="display: flex; flex-direction: row; margin-left: 108rpx; margin-top: 26rpx; margin-bottom: 20rpx;">
<view class="" style="display: flex; flex-direction: row; margin-left: 108rpx; margin-top: 26rpx; margin-bottom: 20rpx;">
<view class="" style="width: 160rpx; height: 92rpx;">
<image style="width: 160rpx; height: 92rpx;" @click="$refs.rulePop.getRule(pageData.danye_id, '购买说明')"
:src="$img1('common/gzsm.png')">
@ -139,6 +126,7 @@
<view class="item-price hang1">
<text>售价:<text style="font-size: 22rpx;">{{ a.price }}</text></text>
</view>
<view style="height: 8rpx;"></view>
</view>
</template>
</detail-list-item>
@ -146,6 +134,7 @@
</template>
</view>
</view>
<view style="height: 150rpx;"></view>
</view>
<!-- 中赏记录 -->
<template v-if="tabCur == 2">
@ -224,7 +213,7 @@
x{{ item.doubling }}</view>
<view v-if="item.is_lingzhu > 0" class="yu-tag-text ziti log-lingzhu-tag" style="">
</view>
</view>
<view class="title hang1" style="text-align: center;">
<text> {{ item.goodslist_title }}</text>
@ -411,22 +400,32 @@
<!-- 添加直接引用的预览组件 -->
<detail-preview-popup ref="localPreviewPopup"></detail-preview-popup>
</view>
</page-container>
</template>
<script>
import PageContainer from '@/components/page-container/page-container.vue'
import OrderConfirmPopup from '@/components/order-confirm-popup/order-confirm-popup.vue'
import DetailListItem from '@/components/detail-list-item/detail-list-item.vue'
import DetailButton from '@/components/detail-button/detail-button.vue'
//
import DetailPreviewPopup from '@/components/detail-preview-popup/detail-preview-popup.vue'
import preview from '@/components/detail-preview-popup/index.js'
export default {
components: {
PageContainer,
OrderConfirmPopup,
DetailListItem,
DetailButton
DetailButton,
DetailPreviewPopup //
},
data() {
return {
userCoupon: null,
optData: '',
title:'',
buyNum: 0,
useMoney: true,
useIntegral: true,
@ -518,22 +517,16 @@ export default {
},
onLoad(options) {
this.optData = options
this.optData = options;
console.log(options);
uni.$on('chooseCoupon', data => {
// console.log('data', data)
this.couponData = data
this.confirmSubmit([0, this.buyNum])
})
// uni.getImageInfo({
// src: this.$img('/static/img/animation.png'),
// success: ({ path }) => {
// this.aniSrc = path
// }
// })
//$refs.rulePop.getRule(pageData.danye_id, '')
this.$c.getRule(10).then(res => {
if (res.status == 1) {
@ -548,10 +541,6 @@ export default {
onReady() {
this.tabChange(this.tabCur)
// this.open('resPop')
// this.open('bossPop')
// this.open('playPop')
},
onHide() {
@ -592,8 +581,8 @@ export default {
};
// console.log(a);
// 使
this.$preview({
// 使
preview({
productType: this.optData.type_text,
dataItem: obj,
goods: goods
@ -940,6 +929,9 @@ export default {
res.data.goodslist.forEach(item => {
this.$set(item, 'open', false)
})
if(res.data.goods.type_text){
this.title = res.data.goods.type_text
}
this.pageData = res.data
let goodType = this.$config.getGoodTypeFind(this.pageData.goods.type);
this.useMoney = goodType.pay_balance == 1 ? true : false;
@ -1167,7 +1159,7 @@ export default {
}
.content {
padding: 0 0 300rpx;
padding: 0 0 0rpx;
background-color: #FFFFFF;
.boss-card {
@ -1265,7 +1257,7 @@ export default {
.header {
width: 750rpx;
height: 722rpx;
margin-top: 130rpx;
margin-top: 0rpx;
background-color: #D8D8D8;
&-wuzhe {
@ -2489,7 +2481,7 @@ export default {
.item-title {
padding: 0 2%;
margin: 10rpx 0rpx 0rpx 0rpx;
width: 100%;
width: 96%;
font-size: 21rpx;
text-align: left;
height: 35rpx;