mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-20 17:35:54 +08:00
修改看到的一些问题
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
<template>
|
||||
<view class="myTracks">
|
||||
<empty v-if="whetherEmpty"></empty>
|
||||
<view v-else v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="changeChecked(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="changeChecked(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-price">
|
||||
¥{{ item.price | unitPrice }}
|
||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
</view>
|
||||
<view class="myTracks-item-price">
|
||||
¥{{ item.price | unitPrice }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="myTracks-divider"></view>
|
||||
|
||||
</view>
|
||||
<view class="myTracks-divider"></view>
|
||||
</view>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</div>
|
||||
<view v-if="editFlag">
|
||||
<view class="myTracks-action-placeholder"></view>
|
||||
<view class="myTracks-action">
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
async onShow() {
|
||||
//获取顶级分类
|
||||
let response = await getPointsCategory();
|
||||
if (response.data.success) {
|
||||
|
||||
@@ -1,325 +0,0 @@
|
||||
<template>
|
||||
<view class="selected-store">
|
||||
<!-- 点击搜索出现搜索框 -->
|
||||
<!-- <div v-show="searchHandle" class="searchBox">
|
||||
<u-search placeholder="请输入关键字" :clearabled="true" :show-action="false" v-model="pageParams.name" @blur="searchStore()" @clear="clearSearch()" @confirm="searchStore()" ></u-search>
|
||||
</div> -->
|
||||
<div>
|
||||
<empty v-if="nomsg"></empty>
|
||||
<div class="swiper-item">
|
||||
<scroll-view class="scroll-v" enableBackToTop="true" scroll-with-animation scroll-y>
|
||||
<view class="index-item" v-for="(store,storeIndex) in stores" :key="storeIndex" @click.prevent="storeDetail(store.id)">
|
||||
<div class="item-goods">
|
||||
<u-image width="51px" height="51px" class="item-title-img" :src="store.storeLogo || noLogo">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
<view class="item-content">
|
||||
<view>
|
||||
<span>{{ store.storeName }}</span><span class="self-store" v-if="store.selfOperated">自营</span>
|
||||
</view>
|
||||
<view>
|
||||
<u-rate size="24" :count="5" :disabled="true" v-model="store.descriptionScore"></u-rate>
|
||||
</view>
|
||||
<view>{{ store.store_collect }} 关注</view>
|
||||
<button v-if="store.is_connect==0" @click.stop="collectstore(store.id)" class="collect btn-mini">
|
||||
<u-icon name="plus"></u-icon>关注
|
||||
</button>
|
||||
<button v-if="store.is_connect==1" @click.stop="collectstore(store.id)" class="collect btn-mini"></u-icon>已关注</button>
|
||||
</view>
|
||||
<view class="store-num">
|
||||
<!-- <view> {{store.goods_num}}</view> -->
|
||||
<view>进店逛逛</view>
|
||||
</view>
|
||||
|
||||
</div>
|
||||
</view>
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</scroll-view>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { collectionStore } from "@/api/members.js";
|
||||
import { getstoreList } from "@/api/store.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
currentLeft: 0,
|
||||
stores: [],
|
||||
pageParams: {
|
||||
pageNumber: 1, //页码
|
||||
pageSize: 10, //分页大小
|
||||
category_id: 0, //分类
|
||||
key_words: "", //搜索关键字
|
||||
name: "", //店铺名字
|
||||
},
|
||||
loadStatus: "more",
|
||||
nomsg: false,
|
||||
noLogo: require("@/static/logo.png"),
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.searchStore();
|
||||
},
|
||||
watch: {
|
||||
tabIndex(val) {
|
||||
this.pageParams.pageNumber = 1;
|
||||
this.stores = [];
|
||||
this.loadStatus = "more";
|
||||
this.searchStore();
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
this.pageParams.pageNumber++;
|
||||
this.searchStore();
|
||||
},
|
||||
methods: {
|
||||
// 清空店铺
|
||||
clearSearch() {
|
||||
(this.pageParams = {
|
||||
pageNumber: 1, //页码
|
||||
pageSize: 10, //分页大小
|
||||
category_id: 0, //分类
|
||||
key_words: "", //搜索关键字
|
||||
name: "", //店铺名字
|
||||
}),
|
||||
this.searchStore();
|
||||
},
|
||||
|
||||
async searchStore() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
|
||||
//获取商品数据
|
||||
let response = await getstoreList(this.pageParams);
|
||||
uni.hideLoading();
|
||||
if (this.pageParams.name) {
|
||||
this.stores = [];
|
||||
}
|
||||
|
||||
this.stores = this.stores.concat(response.data.result.records);
|
||||
uni.hideLoading();
|
||||
if (
|
||||
response.data.result.total <=
|
||||
response.data.result.current * response.data.result.size
|
||||
) {
|
||||
this.loadStatus = "noMore";
|
||||
} else {
|
||||
this.loadStatus = "loadmore";
|
||||
}
|
||||
if (this.stores.length == 0) {
|
||||
this.nomsg = true;
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
collectstore(id) {
|
||||
//收藏店铺
|
||||
collectionStore(id).then((res) => {
|
||||
if (res.statusCode == 200) {
|
||||
this.$api.msg("收藏成功");
|
||||
this.pageParams.pageNumber = 1;
|
||||
this.stores = [];
|
||||
this.searchStore();
|
||||
}
|
||||
});
|
||||
},
|
||||
storeDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/shopPage?id=" + id,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.searchBox {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.selected-store {
|
||||
height: 100%;
|
||||
|
||||
.list-scroll-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
|
||||
.tab-item {
|
||||
width: 160rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 2px solid #ffffff;
|
||||
broder-width: 60rpx;
|
||||
font-size: 30rpx;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: calc(100% - 80rpx);
|
||||
|
||||
.scroll-v {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.index-item {
|
||||
// height: 535rpx;
|
||||
margin: 20rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.item-goods {
|
||||
height: 170rpx;
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx 0;
|
||||
// border-bottom: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.item-title-img {
|
||||
width: 102rpx !important;
|
||||
height: 102rpx !important;
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
line-height: 2em;
|
||||
font-size: $font-sm;
|
||||
position: relative;
|
||||
.collect {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
bottom: 20rpx;
|
||||
right: 30rpx;
|
||||
padding: 0;
|
||||
line-height: 40rpx;
|
||||
text-align: right;
|
||||
padding-right: 14rpx;
|
||||
.u-icon {
|
||||
font-size: 26rpx;
|
||||
position: absolute;
|
||||
top: 7rpx;
|
||||
left: 10rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
> view:first-child {
|
||||
font-size: $font-base;
|
||||
color: #333333;
|
||||
font-weight: 700;
|
||||
position: relative;
|
||||
|
||||
span:nth-child(2) {
|
||||
position: absolute;
|
||||
font-weight: 400;
|
||||
top: 12rpx;
|
||||
font-size: 18rpx;
|
||||
margin-left: 20rpx;
|
||||
height: 26rpx;
|
||||
width: 50rpx;
|
||||
line-height: 26rpx;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
background-color: #ff6262;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
color: #999;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.store-num {
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
border-left: 1px solid #eeeeee;
|
||||
|
||||
:nth-child(1) {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
:nth-child(2) {
|
||||
font-size: 18rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-in-store {
|
||||
height: 364rpx;
|
||||
white-space: nowrap;
|
||||
padding: 20rpx 0 20rpx 20rpx;
|
||||
|
||||
.goods-item {
|
||||
width: 195rpx;
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
margin-right: 20rpx;
|
||||
font-size: $font-sm;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
image {
|
||||
width: 195rpx;
|
||||
height: 195rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
> view {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.goods-item-img {
|
||||
width: 195rpx !important;
|
||||
height: 195rpx !important;
|
||||
border-radius: 8rpx !important;
|
||||
}
|
||||
|
||||
> view:nth-child(2) {
|
||||
color: #ff5a10;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -252,7 +252,6 @@ export default {
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
|
||||
/**
|
||||
* 发票收据类型
|
||||
*/
|
||||
@@ -403,73 +402,72 @@ export default {
|
||||
/**
|
||||
* 提交订单准备支付
|
||||
*/
|
||||
submit() {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// 创建订单
|
||||
let client;
|
||||
// #ifdef H5
|
||||
client = "H5";
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
client = "WECHAT_MP";
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
client = "APP";
|
||||
// #endif
|
||||
|
||||
let submit = {
|
||||
client,
|
||||
way: this.routerVal.way,
|
||||
remark: this.remarkVal,
|
||||
parentOrderSn: "",
|
||||
};
|
||||
// 如果是拼团并且当前用户不是团长
|
||||
this.routerVal.parentOrder && this.routerVal.parentOrder.orderSn
|
||||
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
|
||||
: delete submit.parentOrderSn;
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
*/
|
||||
API_Trade.createTrade(submit).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "创建订单成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 微信小程序中点击创建订单直接开始支付
|
||||
this.pay(res.data.result.sn);
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.navigateTo(
|
||||
`/pages/cart/payment/payOrder?trade_sn=${res.data.result.sn}`
|
||||
);
|
||||
// #endif
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "创建订单有误!请稍后重试",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 创建订单
|
||||
createTradeFun() {
|
||||
// 防抖
|
||||
this.$u.debounce(this.submit(), 3000);
|
||||
this.$u.throttle(() => {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// 创建订单
|
||||
let client;
|
||||
// #ifdef H5
|
||||
client = "H5";
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
client = "WECHAT_MP";
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
client = "APP";
|
||||
// #endif
|
||||
|
||||
let submit = {
|
||||
client,
|
||||
way: this.routerVal.way,
|
||||
remark: this.remarkVal,
|
||||
parentOrderSn: "",
|
||||
};
|
||||
// 如果是拼团并且当前用户不是团长
|
||||
this.routerVal.parentOrder && this.routerVal.parentOrder.orderSn
|
||||
? (submit.parentOrderSn = this.routerVal.parentOrder.orderSn)
|
||||
: delete submit.parentOrderSn;
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
*/
|
||||
API_Trade.createTrade(submit).then((res) => {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "创建订单成功!",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 微信小程序中点击创建订单直接开始支付
|
||||
this.pay(res.data.result.sn);
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.navigateTo(
|
||||
`/pages/cart/payment/payOrder?trade_sn=${res.data.result.sn}`
|
||||
);
|
||||
// #endif
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "创建订单有误!请稍后重试",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)">
|
||||
<!-- 空白页 -->
|
||||
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
||||
<u-empty text="暂无订单" mode="list" v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
|
||||
<!-- 订单列表 -->
|
||||
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
|
||||
<!-- 店铺名称 -->
|
||||
@@ -67,10 +67,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nodata" v-if="tabItem.loadStatus === 'noMore'">
|
||||
|
||||
</view>
|
||||
|
||||
<uni-load-more :status="tabItem.loadStatus"></uni-load-more>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -100,14 +96,12 @@
|
||||
|
||||
<script>
|
||||
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
|
||||
import empty from "@/components/empty";
|
||||
import { getOrderList, cancelOrder, confirmReceipt } from "@/api/order.js";
|
||||
import { getClearReason } from "@/api/after-sale.js";
|
||||
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
|
||||
export default {
|
||||
components: {
|
||||
uniLoadMore,
|
||||
empty,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 评价 -->
|
||||
<Evaluation id="main5" :goodsDetail="goodsDetail" v-if="goodsDetail.id" />
|
||||
<Evaluation id="main5" :goodsDetail="goodsDetail" />
|
||||
|
||||
<!-- 店铺推荐 -->
|
||||
<storeLayout id="main7" :storeDetail="storeDetail" :goodsDetail="goodsDetail" :res="recommendList" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<view class="evaluate-title">评价</view>
|
||||
<text class="evaluate-num">{{ commDetail.total || '0' }}+</text>
|
||||
<text class="tip">好评率 {{ goodsDetail.grade || '100' }}%</text>
|
||||
<text class="tip">好评率 {{ grade || '100' }}%</text>
|
||||
</view>
|
||||
<div v-if="commDetail && commDetail.records && commDetail.records.length > 0">
|
||||
<view class="eva-box" v-for="(commItem,commIndex) in commDetail.records.slice(0,2)" :key="commIndex">
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
lightColor: this.$lightColor,
|
||||
// 评论集合
|
||||
commDetail: [],
|
||||
grade: "",
|
||||
// 评论分页提交数据
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
@@ -59,9 +60,25 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
props: ["goodsDetail"],
|
||||
props: {
|
||||
goodsDetail: {
|
||||
default: {},
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
goodsDetail: {
|
||||
handler(val) {
|
||||
this.grade = val.grade;
|
||||
this.getGoodsComments();
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getGoodsComments();
|
||||
// this.getGoodsComments();
|
||||
},
|
||||
methods: {
|
||||
parseLoaded() {
|
||||
|
||||
@@ -13,33 +13,32 @@
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- 直播中 全部 直播回放 -->
|
||||
<div class="live-list">
|
||||
<div class="live-item" :class="{'invalid':item.status == 'END'}" v-for="(item,index) in liveList" :key="index" @click="handleLivePlayer(item)">
|
||||
<div class="live-cover-img">
|
||||
<div class="tips">
|
||||
<div class="live-box">
|
||||
<image class="live-gif" src="./static/live.gif"></image>
|
||||
</div>
|
||||
<span> 直播中</span>
|
||||
<span>{{item.status == 'END' ? '已结束' : item.status =='NEW' ? '未开始' : '直播中'}}</span>
|
||||
</div>
|
||||
<div class="bg"></div>
|
||||
<image class="zan" src="./static/zan.gif" mode="" />
|
||||
<u-image width="326" height="354" src="https://lilishop-oss.oss-cn-beijing.aliyuncs.com/fe5b8167b0264c53836d08a6a7003cf0.jpeg" />
|
||||
<u-image width="326" height="354" :src="item.shareImg" />
|
||||
</div>
|
||||
<div class="live-goods">
|
||||
<image src="./static/live.png" class="live-icon" mode="" />
|
||||
<div class="live-goods-name">
|
||||
甄选家电好物,尽在超值5月
|
||||
{{item.name}}
|
||||
</div>
|
||||
<div class="live-store">
|
||||
<u-image shape="circle" width="50" height="50" src="https://gfs14.gomein.net.cn/T11wElB7Cv1RCvBVdK_360.jpg?v=1" />
|
||||
|
||||
<span class="wes">lilishop</span>
|
||||
</div>
|
||||
|
||||
<div class="live-goods-list">
|
||||
<div class="live-goods-item">
|
||||
<u-image border-radius="20" height="140"></u-image>
|
||||
<u-image border-radius="20" :src="item.roomGoodsList.length !=0 ? item.roomGoodsList[0] : ''" height="140"></u-image>
|
||||
</div>
|
||||
<div class="live-goods-item">
|
||||
<u-image border-radius="20" height="140"></u-image>
|
||||
<u-image border-radius="20" :src="item.roomGoodsList.length !=0 ? item.roomGoodsList[1] : ''" height="140"></u-image>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -50,11 +49,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLiveList } from "@/api/promotions.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeColor: this.$lightColor,
|
||||
|
||||
keyword: "",
|
||||
// 标签栏
|
||||
tabs: [
|
||||
{
|
||||
@@ -72,6 +72,8 @@ export default {
|
||||
background: {
|
||||
background: "#ff9f28",
|
||||
},
|
||||
// 直播间列表
|
||||
liveList: "",
|
||||
//轮播图滚动的图片
|
||||
swiperImg: [
|
||||
{
|
||||
@@ -89,6 +91,46 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getLives();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async getLives() {
|
||||
let res = await getLiveList();
|
||||
if (res.data.success) {
|
||||
this.liveList = res.data.result.records;
|
||||
|
||||
this.liveList.forEach((item) => {
|
||||
console.log();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 推荐直播间
|
||||
*/
|
||||
async getStarLive() {},
|
||||
|
||||
/**
|
||||
* 进入直播间
|
||||
*/
|
||||
handleLivePlayer(val) {
|
||||
let roomId = val.roomId; // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取
|
||||
let customParams = encodeURIComponent(
|
||||
JSON.stringify({ path: "pages/index/index", pid: 1 })
|
||||
); // 开发者在直播间页面路径上携带自定义参数,后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断)
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=" +
|
||||
roomId +
|
||||
"&custom_params=" +
|
||||
customParams,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -96,16 +138,18 @@ export default {
|
||||
.slot-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
/* 如果您想让slot内容占满整个导航栏的宽度 */
|
||||
flex: 1;
|
||||
/* 如果您想让slot内容与导航栏左右有空隙 */
|
||||
/* padding: 0 30rpx; */
|
||||
}
|
||||
.invalid {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
.wrapper {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
.live-list {
|
||||
.live-item {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
@@ -138,10 +182,6 @@ export default {
|
||||
margin: 20rpx 0;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 50rpx);
|
||||
> span {
|
||||
color: #999;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
.live-gif {
|
||||
width: 20rpx;
|
||||
@@ -168,6 +208,7 @@ export default {
|
||||
padding-right: 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.live-icon,
|
||||
.zan {
|
||||
position: absolute;
|
||||
|
||||
@@ -69,22 +69,7 @@
|
||||
this.goods = response.data;
|
||||
},
|
||||
onBackPress() {
|
||||
// uni.preloadPage({
|
||||
// url: '/pages/tabbar/home/index',
|
||||
// success: function(res) {
|
||||
// // 通过eventChannel向被打开页面传送数据
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
// //莫名其妙的,无法后退,尝试追加参数解决缓存问题
|
||||
// uni.switchTab({
|
||||
// url: '/pages/tabbar/home/index?' + new Date().getTime(),
|
||||
// success: function(res) {
|
||||
// // 通过eventChannel向被打开页面传送数据
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 跳转
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
</template>
|
||||
<script>
|
||||
import tpl from "@/pages/tabbar/home/views.vue";
|
||||
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
background: {
|
||||
|
||||
Reference in New Issue
Block a user