|
@@ -28,7 +28,7 @@
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 分类 -->
|
|
<!-- 分类 -->
|
|
|
- <view class="cate-section" >
|
|
|
|
|
|
|
+ <view class="cate-section">
|
|
|
<view v-for="menus in menusList" class="cate-item" @click="navToTab(menus.url)">
|
|
<view v-for="menus in menusList" class="cate-item" @click="navToTab(menus.url)">
|
|
|
<image :src="menus.pic"></image>
|
|
<image :src="menus.pic"></image>
|
|
|
<text>{{menus.name}}</text>
|
|
<text>{{menus.name}}</text>
|
|
@@ -105,33 +105,67 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="store-wrapper">
|
|
|
|
|
+ <view class="title-wrapper flex">
|
|
|
|
|
+ <image src="/static/icon/t3.png" mode=""></image>
|
|
|
|
|
+ <view class="">会员礼包</view>
|
|
|
|
|
+ <view class="title-b">享受多重优惠</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="goods-wrapper flex">
|
|
|
|
|
+
|
|
|
|
|
+ <view class="good" v-if="userInfo.uid && userInfo.level<=1" v-show="auth ==0"
|
|
|
|
|
+ @click="navTo('/pages/store/apply')">
|
|
|
|
|
+ <image src="../../static/img/daili.jpg" class="good-img"></image>
|
|
|
|
|
+ <view class="good-name clamp">加盟代理</view>
|
|
|
|
|
+ <view class="good-info clamp">纯植物无香精</view>
|
|
|
|
|
+ <view class="good-price">
|
|
|
|
|
+ <text class="new-price">568.00</text>
|
|
|
|
|
+
|
|
|
|
|
+ <text class="old-price">755.00</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="good" v-for="item in vip"
|
|
|
|
|
+ @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
|
|
|
|
|
+ <image :src="item.image" mode="" class="good-img"></image>
|
|
|
|
|
+ <view class="good-name clamp">{{ item.store_name }}</view>
|
|
|
|
|
+ <!-- <view class="good-info clamp">纯植物无香精</view> -->
|
|
|
|
|
+ <view class="good-price">
|
|
|
|
|
+ <text class="new-price">{{ item.price }}</text>
|
|
|
|
|
+ <text class="old-price">{{ item.ot_price }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<!-- 好货推荐 -->
|
|
<!-- 好货推荐 -->
|
|
|
<view class="store-wrapper">
|
|
<view class="store-wrapper">
|
|
|
<view class="title-wrapper flex">
|
|
<view class="title-wrapper flex">
|
|
|
<image src="/static/icon/t3.png" mode=""></image>
|
|
<image src="/static/icon/t3.png" mode=""></image>
|
|
|
- <view class="">好货推荐</view>
|
|
|
|
|
|
|
+ <view class="">爆单专区</view>
|
|
|
<view class="title-b">优选商品低价入手</view>
|
|
<view class="title-b">优选商品低价入手</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<view class="goods-wrapper flex">
|
|
<view class="goods-wrapper flex">
|
|
|
-
|
|
|
|
|
- <view class="good" v-if="userInfo.uid && userInfo.level<=1"
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <view class="good" v-if="userInfo.uid && userInfo.level<=1"
|
|
|
v-show="auth ==0"
|
|
v-show="auth ==0"
|
|
|
@click="navTo('/pages/store/apply')">
|
|
@click="navTo('/pages/store/apply')">
|
|
|
<image src="../../static/img/daili.jpg" class="good-img"></image>
|
|
<image src="../../static/img/daili.jpg" class="good-img"></image>
|
|
|
<view class="good-name clamp">加盟代理</view>
|
|
<view class="good-name clamp">加盟代理</view>
|
|
|
<!-- <view class="good-info clamp">纯植物无香精</view> -->
|
|
<!-- <view class="good-info clamp">纯植物无香精</view> -->
|
|
|
- <view class="good-price">
|
|
|
|
|
|
|
+ <!-- <view class="good-price">
|
|
|
<text class="new-price">568.00</text>
|
|
<text class="new-price">568.00</text>
|
|
|
|
|
|
|
|
<text class="old-price">755.00</text>
|
|
<text class="old-price">755.00</text>
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <!-- </view> -->
|
|
|
|
|
+
|
|
|
<view class="good" v-for="item in bastList"
|
|
<view class="good" v-for="item in bastList"
|
|
|
- @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id" >
|
|
|
|
|
|
|
+ @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
|
|
|
<image :src="item.image" mode="" class="good-img"></image>
|
|
<image :src="item.image" mode="" class="good-img"></image>
|
|
|
<view class="good-name clamp">{{ item.store_name }}</view>
|
|
<view class="good-name clamp">{{ item.store_name }}</view>
|
|
|
<!-- <view class="good-info clamp">纯植物无香精</view> -->
|
|
<!-- <view class="good-info clamp">纯植物无香精</view> -->
|
|
@@ -140,9 +174,10 @@
|
|
|
<text class="old-price">{{ item.ot_price }}</text>
|
|
<text class="old-price">{{ item.ot_price }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
<view class="Mask" v-show="shareShow">
|
|
<view class="Mask" v-show="shareShow">
|
|
|
<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
|
|
<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
|
|
|
<view class="Toshare" @click="Toshare"></view>
|
|
<view class="Toshare" @click="Toshare"></view>
|
|
@@ -155,6 +190,7 @@
|
|
|
<view>长按关注公众号</view>
|
|
<view>长按关注公众号</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
+ <p>{{laji | filter}}</p>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -193,6 +229,7 @@
|
|
|
} from '@/utils/wxAuthorized';
|
|
} from '@/utils/wxAuthorized';
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
// seckill
|
|
// seckill
|
|
@@ -217,8 +254,10 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- shop:[],
|
|
|
|
|
- isAuth:0,
|
|
|
|
|
|
|
+ laji: ['吃藕垃圾', '我不是垃圾'],
|
|
|
|
|
+ vip: [], //会员礼包
|
|
|
|
|
+ shop: [],
|
|
|
|
|
+ isAuth: 0,
|
|
|
wechat_qrcode: '', //公众号二维码
|
|
wechat_qrcode: '', //公众号二维码
|
|
|
storeList: [], //门店列表
|
|
storeList: [], //门店列表
|
|
|
shareShow: false, //分享海报
|
|
shareShow: false, //分享海报
|
|
@@ -263,24 +302,34 @@
|
|
|
...mapState(['loginInterceptor', 'baseURL', 'urlFile']),
|
|
...mapState(['loginInterceptor', 'baseURL', 'urlFile']),
|
|
|
...mapState('user', ['hasLogin', 'userInfo']),
|
|
...mapState('user', ['hasLogin', 'userInfo']),
|
|
|
...mapState('latlon', ['lat', 'lon']),
|
|
...mapState('latlon', ['lat', 'lon']),
|
|
|
- auth(){
|
|
|
|
|
- loadIndexs({}).then(({data})=>{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ auth() {
|
|
|
|
|
+ loadIndexs({}).then(({
|
|
|
|
|
+ data
|
|
|
|
|
+ }) => {
|
|
|
this.isAuth = data.is_auth
|
|
this.isAuth = data.is_auth
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
return this.isAuth
|
|
return this.isAuth
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ filters: {
|
|
|
|
|
+ filter(laji) {
|
|
|
|
|
+ return laji[0]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
onShareAppMessage() {
|
|
onShareAppMessage() {
|
|
|
// 设置菜单中的转发按钮触发转发事件时的转发内容
|
|
// 设置菜单中的转发按钮触发转发事件时的转发内容
|
|
|
let pages = getCurrentPages(); //获取加载的页面
|
|
let pages = getCurrentPages(); //获取加载的页面
|
|
|
let currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
|
let currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
|
|
- console.log(currentPage,'1919');
|
|
|
|
|
|
|
+ console.log(currentPage, '1919');
|
|
|
let url = currentPage.route; //当前页面url
|
|
let url = currentPage.route; //当前页面url
|
|
|
let item = currentPage.options; //如果要获取url中所带的参数可以查看options
|
|
let item = currentPage.options; //如果要获取url中所带的参数可以查看options
|
|
|
- addJifen({}).then(({data})=>{
|
|
|
|
|
- console.log(data,'fenxiang');
|
|
|
|
|
|
|
+ addJifen({}).then(({
|
|
|
|
|
+ data
|
|
|
|
|
+ }) => {
|
|
|
|
|
+ console.log(data, 'fenxiang');
|
|
|
})
|
|
})
|
|
|
console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
|
|
console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
|
|
|
let shareObj = {
|
|
let shareObj = {
|
|
@@ -288,13 +337,13 @@
|
|
|
path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
|
// imageUrl: ,
|
|
// imageUrl: ,
|
|
|
success: function(res) {
|
|
success: function(res) {
|
|
|
- console.log(res,'xuhaolan');
|
|
|
|
|
|
|
+ console.log(res, 'xuhaolan');
|
|
|
// 转发成功之后的回调
|
|
// 转发成功之后的回调
|
|
|
if (res.errMsg == 'shareAppMessage:ok') {
|
|
if (res.errMsg == 'shareAppMessage:ok') {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//token
|
|
//token
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
fail: function() {
|
|
fail: function() {
|
|
|
// 转发失败之后的回调
|
|
// 转发失败之后的回调
|
|
@@ -309,7 +358,7 @@
|
|
|
return shareObj;
|
|
return shareObj;
|
|
|
},
|
|
},
|
|
|
onLoad: function(option) {
|
|
onLoad: function(option) {
|
|
|
- console.log(this.userInfo.uid,'111222');
|
|
|
|
|
|
|
+ console.log(this.userInfo.uid, '111222');
|
|
|
// #ifndef MP
|
|
// #ifndef MP
|
|
|
if (option.spread) {
|
|
if (option.spread) {
|
|
|
// 存储其他邀请人
|
|
// 存储其他邀请人
|
|
@@ -332,7 +381,7 @@
|
|
|
// this.getaddress();
|
|
// this.getaddress();
|
|
|
},
|
|
},
|
|
|
onShow: function() {
|
|
onShow: function() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 判断是否强制登录
|
|
// 判断是否强制登录
|
|
|
// if (this.loginInterceptor && !this.hasLogin) {
|
|
// if (this.loginInterceptor && !this.hasLogin) {
|
|
|
// // 登录拦截
|
|
// // 登录拦截
|
|
@@ -346,10 +395,10 @@
|
|
|
this.loadData();
|
|
this.loadData();
|
|
|
this.getBargainList();
|
|
this.getBargainList();
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
- this.IndexShare()
|
|
|
|
|
|
|
+ this.IndexShare()
|
|
|
// #endif
|
|
// #endif
|
|
|
-
|
|
|
|
|
- // this.getProducts()
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.getVip()
|
|
|
},
|
|
},
|
|
|
//下拉刷新
|
|
//下拉刷新
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -382,6 +431,17 @@
|
|
|
},
|
|
},
|
|
|
// #endif
|
|
// #endif
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getVip() {
|
|
|
|
|
+ let obj = this
|
|
|
|
|
+ getProducts({
|
|
|
|
|
+ is_gift: 1
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+
|
|
|
|
|
+ obj.vip = res.data
|
|
|
|
|
+ console.log(obj.vip, '21312');
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
IndexShare() {
|
|
IndexShare() {
|
|
|
let obj = this;
|
|
let obj = this;
|
|
@@ -410,7 +470,7 @@
|
|
|
this.$refs.popup.open()
|
|
this.$refs.popup.open()
|
|
|
},
|
|
},
|
|
|
navTo(url) {
|
|
navTo(url) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: url
|
|
url: url
|
|
|
})
|
|
})
|
|
@@ -560,7 +620,7 @@
|
|
|
.then(({
|
|
.then(({
|
|
|
data
|
|
data
|
|
|
}) => {
|
|
}) => {
|
|
|
- console.log(data,'8989')
|
|
|
|
|
|
|
+ console.log(data, '8989')
|
|
|
let goods = data.info;
|
|
let goods = data.info;
|
|
|
this.carouselList = data.banner;
|
|
this.carouselList = data.banner;
|
|
|
this.swiperLength = this.carouselList.length;
|
|
this.swiperLength = this.carouselList.length;
|
|
@@ -568,14 +628,13 @@
|
|
|
this.goodsList = goods.firstList; //最新商品
|
|
this.goodsList = goods.firstList; //最新商品
|
|
|
let bast = goods.bastList; //精品推荐
|
|
let bast = goods.bastList; //精品推荐
|
|
|
let arr = []
|
|
let arr = []
|
|
|
- bast.forEach(item =>{
|
|
|
|
|
- if(item.store_name =='加盟会员'){
|
|
|
|
|
- // this.shop.push(item.store_name)
|
|
|
|
|
- if(this.userInfo.uid && this.userInfo.level>1){
|
|
|
|
|
- }else {
|
|
|
|
|
- arr.push(item)
|
|
|
|
|
- }
|
|
|
|
|
- }else {
|
|
|
|
|
|
|
+ bast.forEach(item => {
|
|
|
|
|
+ if (item.store_name == '加盟会员') {
|
|
|
|
|
+ // this.shop.push(item.store_name)
|
|
|
|
|
+ if (this.userInfo.uid && this.userInfo.level > 1) {} else {
|
|
|
|
|
+ arr.push(item)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
arr.push(item)
|
|
arr.push(item)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -849,7 +908,7 @@
|
|
|
height: var(--status-bar-height);
|
|
height: var(--status-bar-height);
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100rpx;
|
|
height: 100rpx;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.input-box {
|
|
.input-box {
|
|
@@ -890,7 +949,7 @@
|
|
|
padding-left: 20rpx;
|
|
padding-left: 20rpx;
|
|
|
font-size: $font-lg;
|
|
font-size: $font-lg;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -900,11 +959,11 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.input-box {
|
|
.input-box {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
padding: 25rpx;
|
|
padding: 25rpx;
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
height: 44px;
|
|
height: 44px;
|
|
|
|
|
|
|
|
.iconsearch {
|
|
.iconsearch {
|