2.2提交
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
|
||||
<!-- 轮播图横幅 -->
|
||||
<view class="banner-section">
|
||||
<view class="swipemask">
|
||||
<view class="banner-subtitle" v-if="bannerList.length > 0">{{
|
||||
<view class="swipemask" v-if="bannerList.length > 0">
|
||||
<view class="banner-subtitle" >{{
|
||||
bannerList[currentBannerIndex].title
|
||||
}}</view>
|
||||
<view class="dotbox">
|
||||
@@ -50,10 +50,11 @@
|
||||
</view>
|
||||
<swiper
|
||||
class="banner-swiper"
|
||||
:indicator-dots="true"
|
||||
:autoplay="true"
|
||||
:indicator-dots="bannerList.length > 0 ? true : false"
|
||||
:autoplay="bannerList.length > 0 ? true : false"
|
||||
:interval="3000"
|
||||
:duration="500"
|
||||
:circular="true"
|
||||
indicator-active-color="#8B2316"
|
||||
@change="onSwiperChange"
|
||||
>
|
||||
@@ -74,10 +75,10 @@
|
||||
<view class="banner-item">
|
||||
<image
|
||||
class="banner-image"
|
||||
src="/static/banner-bg.jpg"
|
||||
:src="rewardImg"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="banner-content">
|
||||
<!-- <view class="banner-content">
|
||||
<view class="banner-text green"
|
||||
>第二届京津冀感染肝病高峰论坛&</view
|
||||
>
|
||||
@@ -86,7 +87,7 @@
|
||||
>
|
||||
<view class="banner-text orange">2016.10.14-2016.10.16</view>
|
||||
<view class="banner-text orange">河北•石家庄</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -209,10 +210,12 @@
|
||||
import { ref, onMounted } from "vue";
|
||||
import goods_api from "@/api/goods_api";
|
||||
import docUrl from "@/utils/docUrl";
|
||||
import { onBackPress,onLoad } from "@dcloudio/uni-app";
|
||||
import pointImg from "@/static/integralticket.png";
|
||||
import buyPointImg from "@/static/buy_points.png";
|
||||
import filter from "@/static/triangle_normal.png";
|
||||
import filterOn from "@/static/triangle_green_theme.png";
|
||||
import rewardImg from "@/static/reward.png";
|
||||
// 轮播图数据
|
||||
const bannerList = ref([]);
|
||||
const currentBannerIndex = ref(0);
|
||||
@@ -244,10 +247,32 @@ const sortOptions = ref([
|
||||
{ label: "兑换从多到少", value: 5 },
|
||||
{ label: "兑换从少到多", value: 6 },
|
||||
]);
|
||||
|
||||
const from=ref('');
|
||||
const name=ref('');
|
||||
onBackPress(() => {
|
||||
if(!from.vlaue){
|
||||
plus.runtime.quit();
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
onLoad((opts) => {
|
||||
if(opts.from){
|
||||
from.value = opts.from;
|
||||
}
|
||||
if(opts.name){
|
||||
name.value = opts.name;
|
||||
}
|
||||
});
|
||||
// 方法
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
if(!from.vlaue){
|
||||
plus.runtime.quit();
|
||||
|
||||
}else{
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const goToSearch = () => {
|
||||
@@ -321,7 +346,7 @@ const goToBannerDetail = (banner) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/webview/webview?url=${encodeURIComponent(
|
||||
docUrl+banner.path
|
||||
)}&title=${banner.title}`,
|
||||
)}&title=积分商城`,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -361,7 +386,7 @@ const getGoodsList = () => {
|
||||
const sortParam = selectedSortValue.value ? selectedSortValue.value : 1;
|
||||
goods_api
|
||||
.goodsList({
|
||||
name: "",
|
||||
name: name.value,
|
||||
page: page.value,
|
||||
sort: sortParam,
|
||||
tag_type: tagParam,
|
||||
@@ -606,8 +631,8 @@ onMounted(() => {
|
||||
|
||||
.dropdown-item {
|
||||
padding: 12px 16px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
@@ -625,8 +650,8 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.filter-text {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@@ -662,9 +687,13 @@ onMounted(() => {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 16px;
|
||||
gap: 16px;
|
||||
|
||||
|
||||
// gap: 16px;
|
||||
}
|
||||
.grid-wrap .product-item:nth-child(2n+1){
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.list-footer {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
@@ -678,6 +707,7 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.2s ease;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.product-item:active {
|
||||
@@ -702,7 +732,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.product-title {
|
||||
font-size: 12px;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 8px;
|
||||
|
||||
Reference in New Issue
Block a user