lhl před 20 hodinami
rodič
revize
d6a81289a2
4 změnil soubory, kde provedl 37 přidání a 3 odebrání
  1. 1 1
      manifest.json
  2. 34 0
      pages/index/index.vue
  3. binární
      static/img/in5.png
  4. 2 2
      store/index.js

+ 1 - 1
manifest.json

@@ -113,7 +113,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "https://gcshop.qiniu1314.com/api",
+                    "target" : "https://gcshop.tzhxn.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 34 - 0
pages/index/index.vue

@@ -23,6 +23,7 @@
 		<!-- 分类 ed -->
 		<view class="jg">
 		</view>
+		
 		<image src="/static/img/in4.png" mode="widthFix" class="pb-bg"></image>
 		<!-- 商品列表 start -->
 		<view class="hot-wrap">
@@ -48,7 +49,30 @@
 				</view>
 			</view>
 		</view>
+		<image src="/static/img/in5.png" mode="widthFix" class="pb-bg" v-if="goodLists.length > 0"></image>
+		<view class="hot-wrap">
+			<!-- <image src="../../static/icon/bktj.png" mode="heightFix" class="tit"></image> -->
+			<view class="hot-list">
+				<view class="hotgoods-item" v-for="jfitem in goodLists" :key="jfitem.id"
+					@click="navto('/pages/product/product?id=' + jfitem.id)" style="height: 520rpx;">
+					<view class="image-wrapper">
+						<image class="image" :src="jfitem.image" mode="scaleToFill"></image>
+					</view>
+					<view class="flex"
+						style="flex-direction: column;justify-content: space-between;align-items: flex-start;height: 170rpx;">
+						<view class="title clamp2">{{jfitem.store_name}}</view>
+						<view class="hot-price">
+							<view class="price">
+								<text>¥{{ jfitem.price * 1 }}</text>
+								<!-- <text class="ot-pirce">¥{{jfitem.ot_price}}</text> -->
+							</view>
+							<image src="../../static/icon/gobuy.png" mode="" style="width: 60rpx;height:50rpx;"></image>
+						</view>
+					</view>
 		
+				</view>
+			</view>
+		</view>
 
 		<!-- 商品列表 ed-->
 		<uni-popup ref="popupkf" type="center">
@@ -153,6 +177,7 @@
 				limit: 5,
 				firstList: [],
 				goodList: [], //商品列表
+				goodLists: [],
 				shopList: [],
 				period: 1,
 				shareImage: '',
@@ -239,6 +264,15 @@
 		onShow: function() {
 			this.getGoodList()
 			this.loadData();
+			getProducts({
+				page: 1,
+				limit: 50,
+				is_best: 1,
+				is_type: 0
+			}).then(res => {
+				this.goodLists = res.data
+				
+			})
 		},
 		onHide() {},
 		methods: {

binární
static/img/in5.png


+ 2 - 2
store/index.js

@@ -7,10 +7,10 @@ const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
 		// #ifdef H5
-		baseURL: window.location.protocol + "//" + window.location.host, //请求地址配置 
+		baseURL: process.env.NODE_ENV === 'development'?`https://gcshop.tzhxn.com`: window.location.protocol + "//" + window.location.host,  //请求地址配置 
 		// #endif
 		// #ifndef H5
-		baseURL: 'https://gcshop.qiniu1314.com', //请求地址配置
+		baseURL: 'https://gcshop.tzhxn.com', //请求地址配置
 		// #endif
 		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息