Browse Source

首页所有商品

undefined
xubinxcode 4 years ago
parent
commit
0856601b36
8 changed files with 45 additions and 5 deletions
  1. +38
    -1
      addons/unishop/uniapp/uni-shop/pages/index/index.vue
  2. +3
    -0
      addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue
  3. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html
  4. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.c3cfa27e.js
  5. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.1d143e4a.js
  6. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.5daa9fee.js
  7. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.3210eb1d.js
  8. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.cb38decd.js

+ 38
- 1
addons/unishop/uniapp/uni-shop/pages/index/index.vue View File

@@ -30,6 +30,17 @@
<text>{{item.name}}</text>
</view>
</view>
<view class="seckill-section">
<view class="floor-list-whitelist">
<view v-for="(item, index) in cateList" :key="index" class="floor-item" @click="navToDetailPages(item)">
<view style="width:100%;text-align: center;">
<image :src="item.image" mode="aspectFill"></image>
</view>
<text class="title clamp">{{item.title }}</text>
<text class="price">¥{{item.sales_price }}</text>
</view>
</view>
</view>
<!-- 秒杀楼层 -->
<view class="seckill-section" v-if="flashSale && flashSale.product.length > 0">
<!-- <view class="s-header" @click="navTo('/pages/flash/list')"> -->
@@ -42,6 +53,18 @@
<!-- <text class="yticon icon-you"></text> -->
<!-- </view> -->
<view class="floor-list-whitelist">
<view v-for="item in cateList" :key="item.id">
<view class="cate-item b-b two" :class="{active: item.id==fId}" @click="changeFirst(item.id)">{{item.name}}</view>
<view
v-for="tItem in item.child" :key="tItem.id"
class="cate-item b-b"
:class="{active: tItem.id==sId}"
@click="changeSecond(tItem)">
{{tItem.name}}
</view>
</view>
</view>
<!-- <view class="floor-list-whitelist">
<view v-for="(item, index) in flashSale.product" :key="index" class="floor-item" @click="navToDetailPage({ product_id: item.flash_product_id }, flashSale.flash_id)">
<view style="width:100%;text-align: center;">
<image :src="item.image" mode="aspectFill"></image>
@@ -49,7 +72,7 @@
<text class="title clamp">{{item.title }}</text>
<text class="price">¥{{item.sales_price }}</text>
</view>
</view>
</view> -->
<!-- <scroll-view class="floor-list" scroll-x>
<view class="scoll-wrapper">
<view v-for="(item, index) in flashSale.product" :key="index" class="floor-item" @click="navToDetailPage({ product_id: item.flash_product_id }, flashSale.flash_id)">
@@ -218,6 +241,7 @@
goodsList: [],
menu: [],
flashSale: '',
cateList: [],
page: 1,
pageSize: 16,
day: 0,
@@ -230,6 +254,7 @@

},
onLoad() {
this.loadCateList();
this.loadData();
},
onShow() {
@@ -244,6 +269,7 @@
}
this.goodsList = [];
this.page = 1;
this.loadCateList();
this.loadData();
},
onShareAppMessage(e) {
@@ -303,6 +329,11 @@
}
}
},
async loadCateList(fid, sid){
const that = this;
//let list = await this.$api.json('cateList');
this.cateList = await this.$api.request('/product/lists', 'GET', {fid:"",sid:0,page:this.page,by:'weigh',desc:'desc'});
},
// 获取限时秒杀数据
async getFlash() {
let data = await this.$api.request('/flash/index');
@@ -322,6 +353,12 @@
this.swiperCurrent = index;
this.titleNViewBackground = this.carouselList[index].background;
},
//详情
navToDetailPages(item){
uni.navigateTo({
url: `/pages/product/product?id=${item.product_id}`
});
},
// 商品详情页
navToDetailPage(item, flash_id = 0) {
let id = item.product_id;


+ 3
- 0
addons/unishop/uniapp/uni-shop/pages/order/createOrder.vue View File

@@ -694,7 +694,10 @@

.footer {
position: fixed;
max-width: 750px !important;
left: 0;
right: 0;
margin: auto;
bottom: 0;
z-index: 995;
display: flex;


+ 1
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html View File

@@ -1,3 +1,3 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>宜家自购商城</title><script>document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.445a3e90.js></script><script src=/h5/static/js/index.4258edce.js></script></body></html>
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.445a3e90.js></script><script src=/h5/static/js/index.c3cfa27e.js></script></body></html>

addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.c3cfa27e.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.1d143e4a.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.5daa9fee.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.3210eb1d.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-createOrder.cb38decd.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save