Blame view

ceres-uniapp-master/pages_category_page1/homeModule/special.vue 3.99 KB
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
10
  <template>
  	<view>
      <global-loading />
  
      <!-- 专题 -->
  		<swiper class="banner" indicator-dots indicator-color="#FFFFFF" indicator-active-color="#FF7911" autoplay>
  			<swiper-item class="banner-item" v-for="(item,index) in bannerList">
  				<image :src="item" mode="widthFix" class="bannerImg"></image>
  			</swiper-item>
  		</swiper>
ba37c587   杨鑫   '最新版本'
11
  
3f535f30   杨鑫   '初始'
12
13
14
15
16
17
18
19
20
21
  		<view>
  			<!-- {{goodsList.productVOList}} -->
  		</view>
  		<view v-if="goodsList.productVOList.length>0">
  			<view v-for="(item, index) in goodsList.productVOList" :key="item.id" class="goodsDetails-box flex-display flex-column mar-left-30"
  			 @click="goodsDateils(item.id)">
  				<view class="goodsDetails flex-items-plus flex-row mar-top-30">
  					<image class="goodsImg" :src="item.imgs[0]"></image>
  					<view class="mar-left-30">
  						<view class="goodsName-box overflowNoDot">
ba37c587   杨鑫   '最新版本'
22
  							
3f535f30   杨鑫   '初始'
23
24
25
26
27
28
29
30
31
32
  							<label class="goodsName fs26 mar-left-20">{{item.productName}}</label>
  						</view>
  						<view class="priceBuyNum-box mar-top-20">
  							<label class="fs24 font-color-C5AA7B">¥</label>
  							<label class="fs36 font-color-C5AA7B mar-left-10">{{item.price}}</label>
  							<label class="fs24 font-color-999 mar-left-10" v-if="item.buyCount != null">{{item.buyCount}}人付款</label>
  							<label class="fs24 font-color-999 mar-left-10" v-else>0人付款</label>
  						</view>
  						<view class="flex-display flex-sp-between flex-row mar-top-10 flex-items">
  							<label class="fs22 font-color-999">{{item.storeDTO.storeName}}</label>
844aa73a   杨鑫   '最新'
33
  							<image class="arrowImg" src="https://jy.scjysm.asia:18086/cdwlMall/questionnaire/file/static/img//user/arrow.png"></image>
3f535f30   杨鑫   '初始'
34
35
36
37
38
39
40
41
  						</view>
  					</view>
  				</view>
  			</view>
  		</view>
  
  		<!-- 为空 -->
  		<view v-else class="emptyOrder-box flex-items-plus flex-column">
844aa73a   杨鑫   '最新'
42
  			<image class="emptyOrder-img" src="https://jy.scjysm.asia:18086/cdwlMall/questionnaire/file/static/img//bgnull.png"></image>
3f535f30   杨鑫   '初始'
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
  			<label class="font-color-999 fs26 mar-top-30">专题商品为空哦~</label>
  		</view>
  	</view>
  </template>
  
  <script>
  	const NET = require('../../utils/request')
  	const API = require('../../config/api')
  	export default {
  		data() {
  			return {
  				key: '',
  				bannerList: [],
  				goodsList: {
  					productVOList:[]
  				},
  				subject:{},
  				current: 1,
  				size: 10,
  			}
  		},
  		onLoad(options) {
  			this.key = options.key
  			this.getSubjectDetailByKeyList();
  		},
  		methods: {
  			getSubjectDetailByKeyList() {
  				let _this = this
  				// uni.showLoading({
          //   mask: true,
  				// 	title: '加载中...'
  				// })
  				NET.request(API.SubjectWithProduct + this.key, {
  					current: this.current,
  					map: {},
  					model: {},
  					order: 'descending',
  					size: this.size,
  					sort: 'id'
  
  				}, 'POST').then(res => {
  					uni.hideLoading()
  					_this.bannerList.push(res.data.subject.banner)
  					_this.goodsList = res.data.productPageVO
  					_this.subject = res.data.subject
  					uni.setNavigationBarTitle({
  					  title:res.data.subject.title
  					})
  
  				}).catch(res => {
  					uni.hideLoading()
  				})
  			},
  			goodsDateils(id){
  				uni.navigateTo({
  					url:`../goodsModule/goodsDetails?id=${id}`
  				})
  
  			}
  		}
  	}
  </script>
  
  <style lang="scss">
  	page {
  		background-color: #FBE7E0;
  	}
  
  	.bannerImg {
  		height: 300upx;
  		width: 100%;
  	}
  
  	.choiceness {
  		height: 60upx;
  		width: 300upx;
  	}
  
  	.goodsDetails-box {
  		width: 690upx;
  		background: #fff;
  		margin-top: 10upx;
  		border-radius: 10upx;
  		padding: 0 20upx;
  		box-sizing: border-box;
  
  		.goodsDetails {
  			padding-bottom: 30upx;
  
  			.goodsName-box {
  				width: 389upx;
  				height: 85upx;
  
  				.img618-cion {
  					width: 70upx;
  					height: 36upx;
  				}
  			}
  
  			.goodsImg {
  				width: 260upx;
  				height: 260upx;
  			}
  
  			.discounts-box {
  				margin-left: -10upx;
  				margin-top: 20upx;
  
  				.discounts-text {
  					margin-left: 10upx;
  					color: #C5AA7B;
  					background-color: #FFE4CC;
  					padding: 6upx 12upx;
  					border-radius: 4upx;
  				}
  			}
  
  			.arrowImg {
  				width: 20upx;
  				height: 20upx;
  			}
  		}
  	}
    .emptyOrder-box {
      .emptyOrder-img {
        width: 113rpx;
        height: 98rpx;
      }
    }
  </style>