增加新模块
This commit is contained in:
+161
-103
@@ -4,9 +4,9 @@
|
||||
<view class="home_header_warp"></view>
|
||||
<view class="home_content_z_warp">
|
||||
<view class="header_title_warp">
|
||||
<up-image src="/static/home/logo.png" width="114" height="42" bgColor="#f1f6ff00"></up-image>
|
||||
<up-image src="/static/home/logo.png" width="86" height="30" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="header_right_warp">
|
||||
<view class="language_warp" style="width: 200rpx;justify-content: flex-start;" @click="jumpSearch">
|
||||
<view class="language_warp" style="width: 100%;justify-content: flex-start;" @click="jumpSearch">
|
||||
<up-image src="/static/home/search.png" width="18" height="18" bgColor="#f1f6ff00"></up-image>
|
||||
<text class="search_msg_warp">搜索</text>
|
||||
</view>
|
||||
@@ -50,25 +50,25 @@
|
||||
<!-- 带灰色背景的内容 -->
|
||||
<view class="home_content_warp">
|
||||
<!-- 转盘 -->
|
||||
<up-image src="/static/home/turntable.png" width="100%" height="134" bgColor="#f1f6ff00" @click="jumpTurntable"></up-image>
|
||||
<!-- <up-image src="/static/home/turntable.png" width="100%" height="128" bgColor="#f1f6ff00" @click="jumpTurntable"></up-image> -->
|
||||
|
||||
<!-- 爆款专区-->
|
||||
<view class="product_comm hx_warp" v-if="faddishProduct && faddishProduct.length!==0">
|
||||
<view class="product_title">
|
||||
<view class="product_title_left">
|
||||
<text class="product_title_z">德商汇优品</text>
|
||||
<text class="product_title_yp">德商汇优品</text>
|
||||
<up-image src="/static/home/youxuan.png" width="10" height="10" bgColor="#f1f6ff00" ></up-image>
|
||||
<text style="margin-left: 6rpx;">品牌5折秒杀福利</text>
|
||||
<text style="margin-left: 6rpx;color: #FFFFFF;">品牌5折秒杀福利</text>
|
||||
</view>
|
||||
<view class="product_title_f" style="font-weight: bold;" @click="jumpWelcome">
|
||||
<text style="margin-right: 10rpx;">立即抢购</text>
|
||||
<view style="margin-top: 10rpx;"><up-image src="/static/common/right_y_st2.png" width="12" height="12" bgColor="#f1f6ff00"></up-image></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product_content">
|
||||
<view :class="faddishProduct && faddishProduct.length > 2 ? 'product_content product_content2':'product_content'">
|
||||
<up-loading-icon :show="productLoading"></up-loading-icon>
|
||||
<view class="product_item" v-for="item in faddishProduct" :key="item.id" @click="jumpInfo(item)">
|
||||
<up-image :src="item.url" width="100%" height="100" bgColor="#f1f6ff00" shape="square" radius='16'></up-image>
|
||||
<view :class="faddishProduct && faddishProduct.length > 2 ? 'product_item2':'product_item'" v-for="item in faddishProduct" :key="item.id" @click="jumpInfo(item)">
|
||||
<up-image :src="item.url" width="100%" height="130" bgColor="#f1f6ff00" shape="square" radius='15'></up-image>
|
||||
<view class="product_f_item">
|
||||
<view class="product_f_item_name">{{item.title}}</view>
|
||||
<view class="product_f_item_price product_f_item_price_hx">优选价{{item.adPrice}}元</view>
|
||||
@@ -76,64 +76,58 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 好物优选 -->
|
||||
<view class="product_comm yx_warp" v-if="yxProduct && yxProduct.length!==0">
|
||||
<view class="product_title">
|
||||
<view class="product_title_left">
|
||||
<text class="product_title_z">德商汇优选</text>
|
||||
<text>品牌5折秒杀福利</text>
|
||||
</view>
|
||||
<view class="product_title_f" style="font-weight: bold;" @click="jumpPrdference">
|
||||
<text style="margin-right: 10rpx;">立即抢购</text>
|
||||
<view style="margin-top: 10rpx;"><up-image src="/static/common/right_y_st2.png" width="12" height="12" bgColor="#f1f6ff00"></up-image></view>
|
||||
<!-- 积分兑换,红包抽奖 -->
|
||||
<view class="min_card_warp">
|
||||
<!-- 积分兑换 -->
|
||||
<view class="min_card_item min_card_item_jf" @click="jumpPrdference">
|
||||
<up-image src="/static/home/min_card_jfdh.png" width="60" height="14" bgColor="#f1f6ff00" ></up-image>
|
||||
<view class="min_card_item_content">
|
||||
<view class="content_msg">
|
||||
<view>好礼随心兑</view>
|
||||
<view style="display: flex;align-items: center;">
|
||||
兑换
|
||||
<view style="margin-top: 6rpx;margin-left: 4rpx;"><up-image src="/static/common/right_y.png" width="10" height="10" bgColor="#f1f6ff00"></up-image></view>
|
||||
</view>
|
||||
</view>
|
||||
<up-image src="/static/home/min_card_jfdh_2.png" width="66" height="46" bgColor="#f1f6ff00" ></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product_content">
|
||||
<up-loading-icon :show="productLoading"></up-loading-icon>
|
||||
<view class="product_item" v-for="item in yxProduct" :key="item.id" @click="jumpInfo(item)">
|
||||
<up-image :src="item.url" width="100%" height="100" bgColor="#f1f6ff00" shape="square" radius='16'></up-image>
|
||||
<view class="product_f_item">
|
||||
<view class="product_f_item_name">{{item.title}}</view>
|
||||
<view class="product_f_item_price product_f_item_price_yx">优选价{{item.adPrice}}元</view>
|
||||
<!-- 红包抽奖 -->
|
||||
<view class="min_card_item min_card_item_cj" @click="jumpTurntable">
|
||||
<up-image src="/static/home/min_card_hbcj.png" width="60" height="14" bgColor="#f1f6ff00" ></up-image>
|
||||
<view class="min_card_item_content">
|
||||
<view class="content_msg">
|
||||
<view>现金红包等你拿!</view>
|
||||
<view style="display: flex;align-items: center;">
|
||||
抽奖
|
||||
<view style="margin-top: 6rpx;margin-left: 4rpx;"><up-image src="/static/common/right_y.png" width="10" height="10" bgColor="#f1f6ff00"></up-image></view>
|
||||
</view>
|
||||
</view>
|
||||
<up-image src="/static/home/min_card_hbcj_2.png" width="66" height="46" bgColor="#f1f6ff00" ></up-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 热门榜 -->
|
||||
<!-- <view class="hot_warp">
|
||||
<view class="hot_title_warp">
|
||||
<view class="title_warp">
|
||||
<text class="title_">热门榜</text>
|
||||
<view class="good_warp">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image src="/static/home/hot.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="good__msg_warp">精选好货</view>
|
||||
</view>
|
||||
<!-- 好物优选 -->
|
||||
<view class="product_comm yx_warp" v-if="yxProduct && yxProduct.length!==0" @click="jumpPrdference">
|
||||
<view class="product_title">
|
||||
<view class="product_title_left">
|
||||
<text class="product_title_z">德商汇优选</text>
|
||||
<text class="product_title_zk">4折起 ></text>
|
||||
</view>
|
||||
<view class="more_warp">
|
||||
<text style="margin-right: 10rpx;">更多</text>
|
||||
<up-image src="/static/common/right_y_st.png" width="12" height="12" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="product_title_f" style="font-weight: bold; color: #999999FF;">
|
||||
<text style="margin-right: 4rpx;">立即抢购</text>
|
||||
<view style="margin-top: 10rpx;"><up-image src="/static/common/right.png" width="12" height="12" bgColor="#f1f6ff00"></up-image></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hot_content_warp">
|
||||
<view v-for="item in hotList" :key="item.id" class="hot_item">
|
||||
<up-image :src="item.url" width="100%" height="100" bgColor="#f1f6ff00"></up-image>
|
||||
<view class="hot_item_name">{{item.name}}</view>
|
||||
<view class="hot_item_price">
|
||||
<up-image src="/static/home/hot_price.png" width="12" height="12" bgColor="#f1f6ff00"></up-image>
|
||||
<view >¥{{item.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 哈希商学院 -->
|
||||
<view class="business_school_warp" @click="openShow=true;">
|
||||
<view>
|
||||
<view class="title">德商汇商学院</view>
|
||||
<view class="msg">
|
||||
<text>带你快速入门</text>
|
||||
<view style="margin-top: 10rpx;"><up-image src="/static/common/right_b.png" width="10" height="10" bgColor="#f1f6ff00"></up-image></view>
|
||||
<view class="product_tips">平价专区 抢到就是赚到!</view>
|
||||
<view :class="yxProduct && yxProduct.length > 3 ? 'product_content_yx product_content2':'product_content_yx'">
|
||||
<up-loading-icon :show="productLoading"></up-loading-icon>
|
||||
<view :class="yxProduct && yxProduct.length < 4 ? 'product_item_yx product_item_yx2':'product_item_yx'" v-for="item in yxProduct" :key="item.id">
|
||||
<up-image :src="item.url" width="100%" height="80" bgColor="#f1f6ff00" shape="square" radius='10'></up-image>
|
||||
<!-- <view class="product_f_item">
|
||||
<view class="product_f_item_name">{{item.title}}</view>
|
||||
<view class="product_f_item_price product_f_item_price_yx">优选价{{item.adPrice}}元</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -188,10 +182,11 @@
|
||||
<script>
|
||||
import choiceness from '@/components/choiceness/choiceness.vue';
|
||||
import { searchList } from '@/api/product.js';
|
||||
import { getCascadeCategory } from '@/api/common.js';
|
||||
import { getCascadeCategory,checkAppVersion } from '@/api/common.js';
|
||||
import { SEARCH_TYPE } from '@/utils/enumUtils.js'
|
||||
import CustomTabBar from '@/components/custom-tab-bar.vue'; // 引入自定义组件路径可能需要根据项目结构调整
|
||||
import dayjs from 'dayjs';
|
||||
import { comparisonVersionHandler } from '@/utils/index.js';
|
||||
|
||||
export default {
|
||||
components:{choiceness,CustomTabBar},
|
||||
@@ -265,6 +260,7 @@
|
||||
const time2 = dayjs();
|
||||
const diff = time2.diff(time1);
|
||||
if(!versionUpdateTime || diff > 5 * 60 * 1000){
|
||||
console.log("进来了...");
|
||||
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
|
||||
this.checkUpdate(); // 判断是否需要更新
|
||||
}else{
|
||||
@@ -290,7 +286,6 @@
|
||||
versionCode:localAppVerson,
|
||||
}
|
||||
checkAppVersion(params).then(res => {
|
||||
console.log("res",res);
|
||||
if(res && res.bizcode === 100){
|
||||
const data = res.data || {};
|
||||
// app大版本更新,versionName:1.0.1 versionCode:102
|
||||
@@ -314,7 +309,6 @@
|
||||
if (platformType == 'ANDROID') {
|
||||
// 弹出系统等待对话框
|
||||
var dtask = plus.downloader.createDownload(updateApkObj.downloadUrl, {}, function(d, status) {
|
||||
console.log("d, status",d, status);
|
||||
// 下载完成
|
||||
if (status == 200) {
|
||||
plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), {force: true}, function(resp){
|
||||
@@ -400,7 +394,7 @@
|
||||
const params = {
|
||||
type,
|
||||
page:1,
|
||||
pageSize:3,
|
||||
pageSize:type === SEARCH_TYPE.SOMETHING ? 4 : 3,
|
||||
}
|
||||
const resp = await searchList(params);
|
||||
if(resp && resp.bizcode === 100){
|
||||
@@ -446,22 +440,23 @@
|
||||
position: relative;
|
||||
}
|
||||
.home_header_warp{
|
||||
background-color: $app-bt-bj;
|
||||
background-color: #AC2A29FF;
|
||||
// background: linear-gradient(0deg, $app-bj, #AC2A29FF);
|
||||
height: 500rpx;
|
||||
padding: 100rpx 30rpx 0rpx;
|
||||
}
|
||||
.home_content_z_warp{
|
||||
position: absolute;
|
||||
top:70rpx;
|
||||
top:90rpx;
|
||||
.header_title_warp{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.header_right_warp{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: calc(100% - 140rpx);
|
||||
}
|
||||
.language_warp{
|
||||
display: flex;
|
||||
@@ -470,7 +465,7 @@
|
||||
width: 100rpx;
|
||||
background: #EEEEEEFF;
|
||||
border-radius: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.search_msg_warp{
|
||||
@@ -517,10 +512,11 @@
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.yx_warp{
|
||||
background: linear-gradient(0deg, #FD2724,#FEA600);
|
||||
// background: linear-gradient(0deg, #ffe0ccFF,#fff7f2FF);
|
||||
background: linear-gradient(0deg, #ff8830ad,#fff7f2FF);
|
||||
}
|
||||
.hx_warp{
|
||||
background: linear-gradient(0deg, #FD6C24, #F24A00);
|
||||
background: linear-gradient(0deg, #ff3d3aFF, #ff8830FF);
|
||||
}
|
||||
.product_title{
|
||||
display: flex;
|
||||
@@ -528,15 +524,26 @@
|
||||
align-items: center;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.product_title_z{
|
||||
.product_title_yp{
|
||||
font-weight: 800;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.product_title_z{
|
||||
font-weight: 800;
|
||||
font-size: 36rpx;
|
||||
color: #333333FF;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.product_title_zk{
|
||||
border-radius: 15px;
|
||||
border: 1px solid #F68103;
|
||||
color: #F68103;
|
||||
padding: 4rpx 20rpx;
|
||||
}
|
||||
.product_title_left{
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -547,52 +554,103 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.product_content_yx {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.product_content{
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
.product_item{
|
||||
width: 32%;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.product_content2 {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.product_item{
|
||||
width: 32%;
|
||||
position: relative;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.product_item2{
|
||||
width: 32%;
|
||||
position: relative;
|
||||
}
|
||||
.product_item_yx{
|
||||
width: 23%;
|
||||
position: relative;
|
||||
}
|
||||
.product_item_yx2{
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.product_f_item{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: calc(100% - 40rpx);
|
||||
height: 66rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 24rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
font-size: 18rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.product_f_item_name{
|
||||
width: 172rpx;
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏溢出的文本 */
|
||||
text-overflow: ellipsis; /* 使用省略号表示溢出的内容 */
|
||||
font-weight: bold;
|
||||
}
|
||||
.product_f_item_price{
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
margin-top: 10rpx;
|
||||
padding: 2rpx 0;
|
||||
}
|
||||
.product_f_item_price_yx{
|
||||
background: #FFBA41;
|
||||
}
|
||||
.product_f_item_price_hx{
|
||||
background: #FD6C24;
|
||||
}
|
||||
.product_tips{
|
||||
font-size: 24rpx;
|
||||
color: #F68103;
|
||||
line-height: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
// 积分兑换,红包
|
||||
.min_card_warp{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20rpx;
|
||||
.min_card_item{
|
||||
padding: 20rpx;
|
||||
width: 43%;
|
||||
border-radius: 30rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.product_f_item{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: calc(100% - 40rpx);
|
||||
height: 66rpx;
|
||||
background: #F5F5F5;
|
||||
border-radius: 24rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
font-size: 18rpx;
|
||||
color: #000000;
|
||||
.min_card_item_jf{
|
||||
// background: linear-gradient(0deg,#FEF7EA, #FFFDFA);
|
||||
background: linear-gradient(0deg,#fdeccd, #FFFDFA);
|
||||
}
|
||||
.product_f_item_name{
|
||||
width: 172rpx;
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏溢出的文本 */
|
||||
text-overflow: ellipsis; /* 使用省略号表示溢出的内容 */
|
||||
font-weight: bold;
|
||||
.min_card_item_cj{
|
||||
// background: linear-gradient(0deg, #FFE5DC,#FFF9F6);
|
||||
background: linear-gradient(0deg, #f5d5c9,#FFF9F6);
|
||||
}
|
||||
.product_f_item_price{
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
.min_card_item_content{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
padding: 2rpx 0;
|
||||
}
|
||||
.product_f_item_price_yx{
|
||||
background: #FFBA41;
|
||||
}
|
||||
.product_f_item_price_hx{
|
||||
background: #FD6C24;
|
||||
.content_msg{
|
||||
font-size: 20rpx;
|
||||
color: #808080;
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 热门榜
|
||||
.hot_warp{
|
||||
background: #FFFFFF;
|
||||
|
||||
Reference in New Issue
Block a user