2025.2.11 工作代码提交
This commit is contained in:
parent
28843fa3d3
commit
b56aae7b27
|
@ -207,6 +207,16 @@ export const news = {
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 群聊发消息
|
||||||
|
getMessageList(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/user/chat/getMessageList`,
|
||||||
|
query: param.query,
|
||||||
|
data: param.data,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default news
|
export default news
|
|
@ -422,6 +422,19 @@ const shop = {
|
||||||
url: `/shopify/reviews/findReviewByProductId`,
|
url: `/shopify/reviews/findReviewByProductId`,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询商品评论列表
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
recentOrder(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/shopify/appOrder/recentOrder`,
|
||||||
|
query: param.query,
|
||||||
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,9 @@ const config = {
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
// host: 'http://22vn9z.natappfree.cc',
|
// host: 'http://6t42vi.natappfree.cc',
|
||||||
// host: 'https://63fdb472.r24.cpolar.top',
|
// host: 'http://nrpnpc.natappfree.cc',
|
||||||
|
// host: 'http://6aa4a4c3.r24.cpolar.top',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -209,13 +209,14 @@
|
||||||
|
|
||||||
// 移除加好友监听
|
// 移除加好友监听
|
||||||
function removelistener() {
|
function removelistener() {
|
||||||
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED);
|
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取朋友列表
|
// 获取朋友列表
|
||||||
function getFriendList() {
|
function getFriendList() {
|
||||||
// 验证sdk是否准备完毕
|
// 验证sdk是否准备完毕
|
||||||
let isReady = uni.$chat.isReady();
|
let isReady = uni.$chat.isReady();
|
||||||
|
console.log('getFriendList', isReady)
|
||||||
|
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
@ -223,6 +224,7 @@
|
||||||
}, 500);
|
}, 500);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log('getFriendList')
|
||||||
|
|
||||||
//
|
//
|
||||||
api.news.getFriendList().then(rs => {
|
api.news.getFriendList().then(rs => {
|
||||||
|
|
|
@ -81,10 +81,19 @@
|
||||||
|
|
||||||
// 获取朋友列表
|
// 获取朋友列表
|
||||||
function getList() {
|
function getList() {
|
||||||
uni.$chat.getConversationList().then(rs => {
|
api.news.getMessageList({
|
||||||
// console.log('getConversation', rs)
|
query: {
|
||||||
list.length = 0
|
userId: userinfo.value.id,
|
||||||
list.push(...rs.data.conversationList)
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
//
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +211,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-swipe-action-item> -->
|
</uni-swipe-action-item> -->
|
||||||
<uni-swipe-action-item :right-options="rightOption" v-for="(item, index) in list" :key="index" @click="handleMenu($event,item)">
|
<uni-swipe-action-item :right-options="rightOption" v-for="(item, index) in list" :key="index"
|
||||||
|
@click="handleMenu($event,item)">
|
||||||
<view class="item rows ptb20 plr30" @click="handleChat(item)">
|
<view class="item rows ptb20 plr30" @click="handleChat(item)">
|
||||||
<view class="image wh90 pr">
|
<view class="image wh90 pr">
|
||||||
<template v-if="item.type == 'GROUP'">
|
<template v-if="item.type == 'GROUP'">
|
||||||
|
@ -224,7 +234,8 @@
|
||||||
<text>{{item.userProfile.nick}}</text>
|
<text>{{item.userProfile.nick}}</text>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="datetime c999 f22">{{ util.formatTime('MM-dd HH:mm',item.lastMessage.lastTime) }}</view>
|
<view class="datetime c999 f22">
|
||||||
|
{{ util.formatTime('MM-dd HH:mm',item.lastMessage.lastTime) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc thd mt10 c666 f24">{{item.lastMessage.messageForShow}}</view>
|
<view class="desc thd mt10 c666 f24">{{item.lastMessage.messageForShow}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<scroll-view class="scroll" scroll-x scroll-with-animation :show-scrollbar="false" :scroll-left="scrollLeft">
|
<scroll-view class="scroll" scroll-x scroll-with-animation :show-scrollbar="false" :scroll-left="scrollLeft">
|
||||||
<view class="list" :class="scroll ? '' : 'flex-row-left'" id="tab">
|
<view class="list" :class="scroll ? '' : 'flex-row-left'" id="tab">
|
||||||
<view class="item fmid ptb10 plr20" :class="{'active': index === currentIndex}" :id="'tab-item-' + index"
|
<view class="item fmid ptb10 plr20" :class="{'active': index === currentIndex}" :id="'tab-item-' + index"
|
||||||
v-for="(item, index) in list" :key="index" @click="clickTab(item, index)">
|
v-for="(item, index) in list" :key="index" @click="handleTabClick(item, index)">
|
||||||
{{ item[titalName] }}
|
{{ item[titalName] }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -16,9 +16,7 @@
|
||||||
props: {
|
props: {
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => []
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
titalName: {
|
titalName: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -29,6 +27,21 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
// 支持双向绑定的 prop
|
||||||
|
modelValue: {
|
||||||
|
type: [Number,String],
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
currentIndex: {
|
||||||
|
get() {
|
||||||
|
return this.modelValue;
|
||||||
|
},
|
||||||
|
set(newValue) {
|
||||||
|
this.$emit('update:modelValue', newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -37,78 +50,79 @@
|
||||||
parentLeft: 0, // 父元素(tabs组件)到屏幕左边的距离
|
parentLeft: 0, // 父元素(tabs组件)到屏幕左边的距离
|
||||||
scrollBarLeft: 0, // 移动bar需要通过translateX()移动的距离
|
scrollBarLeft: 0, // 移动bar需要通过translateX()移动的距离
|
||||||
tabItemRectInfo: [],
|
tabItemRectInfo: [],
|
||||||
currentIndex: 0,
|
|
||||||
barFirstTimeMove: true
|
barFirstTimeMove: true
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
list(n, o) {
|
list: {
|
||||||
// list变动时,重制内部索引,否则可能导致超出数组边界的情况
|
deep: true,
|
||||||
if (n.length !== o.length) this.currentIndex = 0;
|
handler(newList, oldList) {
|
||||||
|
if (newList.length !== oldList.length) {
|
||||||
|
this.currentIndex = 0;
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.init();
|
this.initialize();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init()
|
this.initialize();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
initialize() {
|
||||||
this.$nextTick(() => {
|
this.getComponentRect();
|
||||||
uni.createSelectorQuery().in(this).select(`#tab`).fields({
|
this.getTabItemRect();
|
||||||
|
},
|
||||||
|
getComponentRect() {
|
||||||
|
uni.createSelectorQuery().in(this).select('#tab').fields({
|
||||||
size: true,
|
size: true,
|
||||||
rect: true
|
rect: true
|
||||||
}, data => {
|
}, (data) => {
|
||||||
|
if (data) {
|
||||||
this.parentLeft = data.left;
|
this.parentLeft = data.left;
|
||||||
// tabs组件的宽度
|
|
||||||
this.componentWidth = data.width;
|
this.componentWidth = data.width;
|
||||||
|
}
|
||||||
}).exec();
|
}).exec();
|
||||||
this.getTabItemRect()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getTabItemRect() {
|
getTabItemRect() {
|
||||||
let query = uni.createSelectorQuery().in(this);
|
const query = uni.createSelectorQuery().in(this);
|
||||||
for (let i = 0; i < this.list.length; i++) {
|
this.list.forEach((_, index) => {
|
||||||
// 只要size和rect两个参数
|
query.select(`#tab-item-${index}`).fields({
|
||||||
query.select(`#tab-item-${i}`).fields({
|
|
||||||
size: true,
|
size: true,
|
||||||
rect: true
|
rect: true
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
query.exec((data) => {
|
query.exec((data) => {
|
||||||
this.tabItemRectInfo = data
|
if (data) {
|
||||||
this.scrollByIndex()
|
this.tabItemRectInfo = data;
|
||||||
})
|
this.scrollToActiveTab();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
scrollByIndex() {
|
scrollToActiveTab() {
|
||||||
let tabInfo = this.tabItemRectInfo[this.currentIndex]
|
const tabInfo = this.tabItemRectInfo[this.currentIndex];
|
||||||
if (!tabInfo) return
|
if (!tabInfo) return;
|
||||||
// 活动tab的宽度
|
const tabWidth = tabInfo.width;
|
||||||
let tabWidth = tabInfo.width
|
const offsetLeft = tabInfo.left - this.parentLeft;
|
||||||
let offsetLeft = tabInfo.left - this.parentLeft
|
let scrollLeft = offsetLeft - (this.componentWidth - tabWidth) / 2;
|
||||||
// 将活动的tabs-item移动到屏幕正中间,实际上是对scroll-view的移动
|
this.scrollLeft = Math.max(0, scrollLeft);
|
||||||
let scrollLeft = offsetLeft - (this.componentWidth - tabWidth) / 2
|
const left = tabInfo.left + tabWidth / 2 - this.parentLeft;
|
||||||
this.scrollLeft = scrollLeft < 0 ? 0 : scrollLeft;
|
|
||||||
// 计算当前活跃item到组件左边的距离
|
|
||||||
let left = tabInfo.left + tabInfo.width / 2 - this.parentLeft
|
|
||||||
this.scrollBarLeft = left - this.barWidth / 2;
|
this.scrollBarLeft = left - this.barWidth / 2;
|
||||||
if (this.barFirstTimeMove == true) {
|
if (this.barFirstTimeMove) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.barFirstTimeMove = false;
|
this.barFirstTimeMove = false;
|
||||||
}, 100)
|
}, 100);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleTabClick(item, index) {
|
||||||
clickTab(item, index) {
|
if (index === this.currentIndex) return;
|
||||||
// 点击当前活动tab,不触发事件
|
this.currentIndex = index;
|
||||||
if (index === this.currentIndex) return
|
this.$emit('tabItemClick', item, index);
|
||||||
this.currentIndex = index
|
this.scrollToActiveTab();
|
||||||
this.$emit('tabItemClick', item, index)
|
|
||||||
this.scrollByIndex()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -120,40 +134,9 @@
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
scroll-view {
|
.scroll {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep ::-webkit-scrollbar {
|
|
||||||
display: none
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
::-webkit-scrollbar,
|
|
||||||
::-webkit-scrollbar,
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
width: 0 !important;
|
|
||||||
height: 0 !important;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
/* #ifdef H5 */
|
|
||||||
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
|
|
||||||
scroll-view ::v-deep ::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
width: 0 !important;
|
|
||||||
height: 0 !important;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
|
|
||||||
.scroll {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -169,7 +152,6 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #8C8C8C;
|
color: #8C8C8C;
|
||||||
|
|
||||||
//
|
|
||||||
&.active {
|
&.active {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -177,4 +159,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 隐藏滚动条
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -505,7 +505,8 @@
|
||||||
"path": "pages/shop/commodity/evaluate",
|
"path": "pages/shop/commodity/evaluate",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品评价",
|
"navigationBarTitleText": "商品评价",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,6 +277,7 @@
|
||||||
// 获取首页分页视频
|
// 获取首页分页视频
|
||||||
api.video.homeVideo({
|
api.video.homeVideo({
|
||||||
query: {
|
query: {
|
||||||
|
userId: userinfo.value.id || 0,
|
||||||
pageNum: recList.pageNum,
|
pageNum: recList.pageNum,
|
||||||
pageSize: recList.pageSize,
|
pageSize: recList.pageSize,
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10">
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10">
|
||||||
<text>商家明细</text>
|
<text>商家明细</text>
|
||||||
<uni-icons type="right" color="" />
|
<uni-icons type="right" c1olor="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
|
||||||
|
|
|
@ -112,23 +112,23 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="main ptb20 f24">
|
<view class="main ptb20 f24">
|
||||||
<view class="item ver">
|
<view class="item ver" @click="link('/pages/shop/order/index?tabIndex=1')">
|
||||||
<image src="/static/mine-daifukuan.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-daifukuan.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">待付款</text>
|
<text class="txt mt10 wsn">待付款</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ver">
|
<view class="item ver" @click="link('/pages/shop/order/index?tabIndex=2')">
|
||||||
<image src="/static/mine-daifahuo.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-daifahuo.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">待发货</text>
|
<text class="txt mt10 wsn">待发货</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ver">
|
<view class="item ver" @click="link('/pages/shop/order/index?tabIndex=3')">
|
||||||
<image src="/static/mine-daishouhuo.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-daishouhuo.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">待收货</text>
|
<text class="txt mt10 wsn">待收货</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ver">
|
<view class="item ver" @click="link('/pages/shop/order/index?tabIndex=6')">
|
||||||
<image src="/static/mine-daipingjia.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-daipingjia.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">评价</text>
|
<text class="txt mt10 wsn">评价</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ver">
|
<view class="item ver" @click="link('/pages/shop/order/index?tabIndex=6')">
|
||||||
<image src="/static/mine-tuikuan_shouhou.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-tuikuan_shouhou.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">退款/售后</text>
|
<text class="txt mt10 wsn">退款/售后</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -43,11 +43,11 @@
|
||||||
name: '即时消息',
|
name: '即时消息',
|
||||||
load: false,
|
load: false,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 'video',
|
// key: 'video',
|
||||||
name: '视讯消息',
|
// name: '视讯消息',
|
||||||
load: false,
|
// load: false,
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// key: 'video',
|
// key: 'video',
|
||||||
// name: '商城消息',
|
// name: '商城消息',
|
||||||
|
|
|
@ -18,21 +18,37 @@
|
||||||
const more_share_data = ref([])
|
const more_share_data = ref([])
|
||||||
// 分享弹窗
|
// 分享弹窗
|
||||||
const more_share = {
|
const more_share = {
|
||||||
more: [{
|
more: [
|
||||||
icon: '/static/news.png',
|
// {
|
||||||
title: '信息'
|
// icon: '/static/news.png',
|
||||||
},
|
// title: '信息'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
icon: '/static/home.png',
|
icon: '/static/home.png',
|
||||||
title: '回到首页'
|
title: '回到首页',
|
||||||
|
event: () => {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/shop/shop'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: '/static/individual.png',
|
icon: '/static/individual.png',
|
||||||
title: '个人中心'
|
title: '个人中心',
|
||||||
|
event: () => {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/mine/mine'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: '/static/order.png',
|
icon: '/static/order.png',
|
||||||
title: '我的订单'
|
title: '我的订单',
|
||||||
|
event: () => {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/shop/order/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
share: [{
|
share: [{
|
||||||
|
@ -52,6 +68,14 @@
|
||||||
share_more.value.open()
|
share_more.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表项事件
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function handleItem(item) {
|
||||||
|
if (item.event) item.event()
|
||||||
|
}
|
||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
function goBack(url) {
|
function goBack(url) {
|
||||||
// 获取当前页面栈
|
// 获取当前页面栈
|
||||||
|
@ -83,11 +107,13 @@
|
||||||
<view class="side">
|
<view class="side">
|
||||||
<image @click="goBack('/pages/shop/shop')" class="back wh55" src="/static/back.png" />
|
<image @click="goBack('/pages/shop/shop')" class="back wh55" src="/static/back.png" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="main f1 tac">
|
<view class="main f1 tac">
|
||||||
<text>销量: {{detail.sales}}</text>
|
<text>销量: {{detail.sales}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="side df fdr jcr">
|
<view class="side df fdr jcr">
|
||||||
<image @click="open('share')" class="share wh55" src="/static/share1.png" />
|
<!-- <image @click="open('share')" class="share wh55" src="/static/share1.png" /> -->
|
||||||
<image @click="open('more')" class="more wh55 ml20" src="/static/more.png" />
|
<image @click="open('more')" class="more wh55 ml20" src="/static/more.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -97,8 +123,7 @@
|
||||||
<uni-popup ref="share_more" type="bottom">
|
<uni-popup ref="share_more" type="bottom">
|
||||||
<view class="menuAlt popBot">
|
<view class="menuAlt popBot">
|
||||||
<view class="main df ptb40">
|
<view class="main df ptb40">
|
||||||
<view class="item ver" v-for="(item, index) in more_share_data" :key="index"
|
<view class="item ver" v-for="(item, index) in more_share_data" :key="index" @click="handleItem(item)">
|
||||||
@click="handle_share(item)">
|
|
||||||
<image class="wh100" :src="item.icon" />
|
<image class="wh100" :src="item.icon" />
|
||||||
<view class="title mt10">
|
<view class="title mt10">
|
||||||
<text class="txt c666 f8">{{ item.title }}</text>
|
<text class="txt c666 f8">{{ item.title }}</text>
|
||||||
|
|
|
@ -9,85 +9,107 @@
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReady,
|
onReady,
|
||||||
onPageScroll,
|
onPullDownRefresh,
|
||||||
|
onReachBottom
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
//
|
//
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
|
// 接口地址
|
||||||
|
import api from '@/api/index.js'
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
const {
|
const {
|
||||||
userinfo
|
userinfo
|
||||||
} = useStore().state
|
} = useStore().state
|
||||||
|
//
|
||||||
const typeList = ref([{
|
const typeList = ref([{
|
||||||
text: '全部',
|
text: '全部',
|
||||||
icon: null,
|
param: {},
|
||||||
value: 1
|
|
||||||
}, {
|
}, {
|
||||||
text: '最新',
|
text: '最新',
|
||||||
icon: '/static/picture.png',
|
param: {
|
||||||
value: 2
|
isNew: 1,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
text: '图/视频',
|
text: '有图',
|
||||||
icon: '/static/time.png',
|
param: {
|
||||||
value: 3
|
isImage: 1,
|
||||||
|
},
|
||||||
}])
|
}])
|
||||||
// 当前选中
|
// 当前选中
|
||||||
const typeIndex = ref(0)
|
const typeIndex = ref(0)
|
||||||
|
// id
|
||||||
|
const id = ref('')
|
||||||
|
// 评论列表
|
||||||
|
const comment = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 5,
|
||||||
|
list: [],
|
||||||
|
})
|
||||||
|
|
||||||
//
|
onLoad((option) => {
|
||||||
const list = reactive([{
|
if (option.id) id.value = option.id
|
||||||
id: 0,
|
|
||||||
userId: 1,
|
// 获取商品评论
|
||||||
ks: 123,
|
getProComment()
|
||||||
isLike: 1,
|
})
|
||||||
userName: '明月天涯',
|
|
||||||
portrait: 'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
onPullDownRefresh(() => {
|
||||||
time: '2023年10月30日 14:20',
|
refreshList()
|
||||||
content: '明月天涯明月天涯明月天涯明月天涯明月天涯明月天涯明月天涯',
|
})
|
||||||
imageList: [
|
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
onReachBottom(() => {
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
getMoreList()
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
})
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
// 重载
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
function refreshList() {
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
comment.pageNum = 1
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
getProComment()
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg'
|
}
|
||||||
],
|
|
||||||
child: [{
|
// 获取更多
|
||||||
nickname: '用户a',
|
function getMoreList() {
|
||||||
content: '这款产品怎么样?',
|
if (comment.total <= comment.list.length) return
|
||||||
}, {
|
comment.pageNum++
|
||||||
nickname: '用户b',
|
getProComment()
|
||||||
content: '这款产品怎么样?',
|
}
|
||||||
}, ],
|
|
||||||
}, {
|
// 获取商品评论
|
||||||
id: 0,
|
function getProComment() {
|
||||||
userId: 1,
|
api.shop.getProComment({
|
||||||
isLike: 0,
|
query: {
|
||||||
ks: 123,
|
// 产品id
|
||||||
userName: '明月天涯',
|
productId: id.value,
|
||||||
portrait: 'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
pageNum: comment.pageNum,
|
||||||
time: '2023年10月30日 14:20',
|
pageSize: comment.pageSize,
|
||||||
content: '明月天涯明月天涯明月天涯明月天涯明月天涯明月天涯明月天涯',
|
...typeList.value[typeIndex.value].param,
|
||||||
imageList: [
|
}
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
}).then(rs => {
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
if (rs.code == 200) {
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
// 页码
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
if (comment.pageNum == 1) comment.list.length = 0
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
// 列表
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
comment.list.push(...rs.rows.map(item => {
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
if(item.imageUrls) item.imageUrls = item.imageUrls.split(',')
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg',
|
return item
|
||||||
'https://mp-bcaa355d-ec14-4cb2-a10e-482127e7cb48.cdn.bspapp.com/VKCEYUGU-bcaa355d-ec14-4cb2-a10e-482127e7cb48/00412594-656b-4379-a49e-0b381d5f6652.jpg'
|
}))
|
||||||
],
|
// 总数
|
||||||
child: [],
|
comment.total = rs.total
|
||||||
}])
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前评论状态
|
* 当前评论状态
|
||||||
|
@ -96,6 +118,8 @@
|
||||||
function handleTypeIndex(index) {
|
function handleTypeIndex(index) {
|
||||||
if (typeIndex.value === index) return
|
if (typeIndex.value === index) return
|
||||||
typeIndex.value = index
|
typeIndex.value = index
|
||||||
|
// 重载列表
|
||||||
|
refreshList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
|
@ -123,36 +147,36 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="listBox f28">
|
<view class="listBox f28">
|
||||||
<view class="nomore" v-if="!list[0]">暂无评论~</view>
|
<view class="nomore mtb30" v-if="!comment.list[0]">暂无评论~</view>
|
||||||
|
|
||||||
<view class="list df fdc" v-for="(item, index) in list" :key="index">
|
<view class="list df fdc mlr30" v-for="(item, index) in comment.list" :key="index">
|
||||||
<!-- 评论的用户 -->
|
<!-- 评论的用户 -->
|
||||||
<view class="userinfo rows mtb20 mlr20">
|
<view class="userinfo rows mtb20 ">
|
||||||
<image class="wh80 cir" :src="item.portrait" mode="aspectFill" />
|
<image class="wh80 cir" :src="item.avatar" mode="aspectFill" />
|
||||||
<view class="name f1 mlr20 c333 f34">{{ item.userName }}</view>
|
<view class="name f1 mlr20 c333 f34">{{ item.nickname }}</view>
|
||||||
<uni-icons type="more-filled" color="#999" />
|
<!-- <uni-icons type="more-filled" color="#999" /> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content ml40 plr20 bfff br20">
|
<view class="content ml30 plr20 bfff br20">
|
||||||
<!-- 款式日期 -->
|
<!-- 款式日期 -->
|
||||||
<view class="rows mtb20 c999">
|
<view class="rows mtb20 c999">
|
||||||
<view class="">款式:{{ item.ks }}</view>
|
<view class="">款式:{{ item.sku }}</view>
|
||||||
<view class="">{{ item.time }}</view>
|
<view class="">{{ item.commentTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 评论内容 -->
|
<!-- 评论内容 -->
|
||||||
<view class="content mtb20 f30">{{item.content}}</view>
|
<view class="content mtb20 f30">{{item.content}}</view>
|
||||||
|
|
||||||
<!-- 图片 -->
|
<!-- 图片 -->
|
||||||
<view class="images mtb20" v-if="item.imageList[0]">
|
<view class="images mtb20" v-if="item.imageUrls">
|
||||||
<view class="item pr" @click="preview(item.imageList,index)"
|
<view class="item pr" @click="preview(item.imageUrls,secIndex)"
|
||||||
v-for="(image, index) in item.imageList" :key="index">
|
v-for="(image, secIndex) in item.imageUrls" :key="secIndex">
|
||||||
<image class="img pa br10" :src="image" mode="aspectFill" />
|
<image class="img pa br10" :src="image" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 菜单 -->
|
<!-- 菜单 -->
|
||||||
<view class="fn df jcr aic mtb20 c999">
|
<view class="fn df jcr aic mtb20 c999" v-if="0">
|
||||||
<!-- 点赞 -->
|
<!-- 点赞 -->
|
||||||
<view class="ec-item df aic mr20">
|
<view class="ec-item df aic mr20">
|
||||||
<uni-icons type="hand-up-filled" color="#FF0000" v-if="item.isLike == 1" />
|
<uni-icons type="hand-up-filled" color="#FF0000" v-if="item.isLike == 1" />
|
||||||
|
@ -177,7 +201,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="nomore mtb30">暂无更多评论~</view>
|
<view class="nomore mtb30" v-if="comment.list[0]">暂无更多评论~</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
// 商品详情
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
|
@ -40,6 +41,8 @@
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
|
// 最近购买订单列表
|
||||||
|
const recentOrderList = ref([])
|
||||||
// 详情
|
// 详情
|
||||||
const banner = computed(() => {
|
const banner = computed(() => {
|
||||||
let result = []
|
let result = []
|
||||||
|
@ -57,10 +60,12 @@
|
||||||
getDetail()
|
getDetail()
|
||||||
// 添加商品浏览记录
|
// 添加商品浏览记录
|
||||||
addBrowsing()
|
addBrowsing()
|
||||||
// 开启监听
|
|
||||||
addListener()
|
|
||||||
// 获取商品评论
|
// 获取商品评论
|
||||||
getProComment()
|
getProComment()
|
||||||
|
// 获取最近购买
|
||||||
|
getRecentOrder()
|
||||||
|
// 开启监听
|
||||||
|
addListener()
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
|
@ -91,12 +96,39 @@
|
||||||
uni.$off('commodityDetail')
|
uni.$off('commodityDetail')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取最近购买
|
||||||
|
function getRecentOrder() {
|
||||||
|
api.shop.recentOrder({
|
||||||
|
query: {
|
||||||
|
// 产品id
|
||||||
|
productId: id.value,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
// 结果
|
||||||
|
const result = rs.data
|
||||||
|
let list = []
|
||||||
|
//
|
||||||
|
for (let i = 0; i < result.length / 2; i++) {
|
||||||
|
if (!result[i * 2 + 1]) break
|
||||||
|
list.push([result[i * 2], result[i * 2 + 1]])
|
||||||
|
}
|
||||||
|
recentOrderList.value = list
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获取商品评论
|
// 获取商品评论
|
||||||
function getProComment() {
|
function getProComment() {
|
||||||
api.shop.getProComment({
|
api.shop.getProComment({
|
||||||
query: {
|
query: {
|
||||||
// 产品id
|
// 产品id
|
||||||
productionId: id.value,
|
productId: id.value,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 2,
|
pageSize: 2,
|
||||||
}
|
}
|
||||||
|
@ -301,7 +333,7 @@
|
||||||
<!-- 商品名称 -->
|
<!-- 商品名称 -->
|
||||||
<view class="name mtb20 f34 c333 t2hd">{{detail.name}}</view>
|
<view class="name mtb20 f34 c333 t2hd">{{detail.name}}</view>
|
||||||
|
|
||||||
<view class="history mtb20 rows">
|
<view class="history mtb20 rows" v-if="0">
|
||||||
<view class="c666 f28">商品修改历史</view>
|
<view class="c666 f28">商品修改历史</view>
|
||||||
<uni-icons type="right" />
|
<uni-icons type="right" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -327,21 +359,19 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 最近购买 -->
|
<!-- 最近购买 -->
|
||||||
<view class="recently mtb20">
|
<view class="recently mtb20" v-if="recentOrderList[0]">
|
||||||
<swiper class="swiper" :autoplay="true" vertical="true">
|
<swiper class="swiper" :autoplay="true" vertical="true">
|
||||||
<swiper-item v-for="(item, index) in 2" :key="index">
|
<swiper-item v-for="(item, index) in recentOrderList" :key="index">
|
||||||
<view class="list plr10 bfff">
|
<view class="list plr10 bfff">
|
||||||
<view class="item bsb rows plr10" v-for="(item, index) in 2" :key="index">
|
<view class="item bsb rows plr10" v-for="(secItem, secIndex) in item" :key="secIndex">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<image class="avatar wh70 cir"
|
<image class="avatar wh70 cir" :src="secItem.avatar" mode="aspectFill" />
|
||||||
src="https://img30.360buyimg.com/popWareDetail/jfs/t1/124291/22/31317/138753/6449f30dF90683c84/4fee5d1a337f7b90.jpg.avif"
|
|
||||||
mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="name f1 mlr10 f28">用户xxx</view>
|
<view class="name f1 mlr10 f28">{{secItem.nickname}}</view>
|
||||||
<view class="info mlr10 f26 tar">
|
<view class="info mlr10 f26 tar">
|
||||||
<view class="fn">刚刚下单</view>
|
<!-- <view class="fn">刚刚下单</view> -->
|
||||||
<view class="time c999">2014.12.08 18:00</view>
|
<view class="time c999">{{secItem.time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn sm warm plr15">立即购买</view>
|
<view class="btn sm warm plr15">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -352,21 +382,20 @@
|
||||||
|
|
||||||
<!-- 商品评价 -->
|
<!-- 商品评价 -->
|
||||||
<view class="evaluate mtb20 plr25 bfff">
|
<view class="evaluate mtb20 plr25 bfff">
|
||||||
<view class="header rows ptb25" @click="link(util.setUrl('/pages/shop/commodity/evaluate',{id: 1}))">
|
<view class="header rows ptb25"
|
||||||
<text class="modelTitle">商品评价(3)</text>
|
@click="link(util.setUrl('/pages/shop/commodity/evaluate',{id: detail.id}))">
|
||||||
|
<text class="modelTitle">商品评价({{comment.total}})</text>
|
||||||
<uni-icons type="right" />
|
<uni-icons type="right" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 部分评论 -->
|
<!-- 部分评论 -->
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item ptb20" v-for="(item, index) in comment" :key="index">
|
<view class="item ptb20" v-for="(item, index) in comment.list" :key="index">
|
||||||
<view class="userinfo df c666 f28">
|
<view class="userinfo df c666 f28">
|
||||||
<image class="avatar wh45 cir"
|
<image class="avatar wh45 cir" :src="item.avatar" mode="aspectFill" />
|
||||||
src="https://img30.360buyimg.com/popWareDetail/jfs/t1/124291/22/31317/138753/6449f30dF90683c84/4fee5d1a337f7b90.jpg.avif"
|
<view class="name thd f32 f1 ml20">{{item.nickname}}</view>
|
||||||
mode="aspectFill" />
|
|
||||||
<view class="name thd f32 f1 ml20">用户xxx</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content t2hd mt10 c333 f28">这个商品不错</view>
|
<view class="content t2hd mt10 c333 f28">{{item.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -3,14 +3,15 @@
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance
|
getCurrentInstance,
|
||||||
|
watch,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onUnload,
|
onUnload,
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onPullDownRefresh,
|
onPullDownRefresh,
|
||||||
onPageScroll
|
onPageScroll,
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
|
@ -60,6 +61,8 @@
|
||||||
name: '已取消'
|
name: '已取消'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
// 当前tab下标
|
||||||
|
const tabIndex = ref(0)
|
||||||
// 列表
|
// 列表
|
||||||
const list = reactive({
|
const list = reactive({
|
||||||
status: '',
|
status: '',
|
||||||
|
@ -74,8 +77,8 @@
|
||||||
// 当前操作的订单
|
// 当前操作的订单
|
||||||
const orderDetail = reactive({})
|
const orderDetail = reactive({})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((option) => {
|
||||||
// this.params.currentTab = options.currentTab / 1
|
if (option.tabIndex) tabIndex.value = Number(option.tabIndex)
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
getList()
|
getList()
|
||||||
// 开启监听
|
// 开启监听
|
||||||
|
@ -265,7 +268,7 @@
|
||||||
|
|
||||||
<!-- tab选项卡 -->
|
<!-- tab选项卡 -->
|
||||||
<view class="f1 pr">
|
<view class="f1 pr">
|
||||||
<JyShopNavigation :list="tabs" @tabItemClick="itemClick" />
|
<JyShopNavigation v-model="tabIndex" :list="tabs" @tabItemClick="itemClick" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
<!-- 公告 -->
|
<!-- 公告 -->
|
||||||
<swiper class="notice mtb30 mlr30 c333 f28 br20" vertical="true">
|
<swiper class="notice mtb30 mlr30 c333 f28 br20" vertical="true" v-if="0">
|
||||||
<swiper-item class="item bsb rows plr20" v-for="(item, index) in 2" :key="index">
|
<swiper-item class="item bsb rows plr20" v-for="(item, index) in 2" :key="index">
|
||||||
<image class="wh30" src="/static/notice.png" mode="aspectFit" />
|
<image class="wh30" src="/static/notice.png" mode="aspectFit" />
|
||||||
<view class="f1 mlr20">九亿商城上线啦~</view>
|
<view class="f1 mlr20">九亿商城上线啦~</view>
|
||||||
|
@ -127,8 +127,8 @@
|
||||||
|
|
||||||
<!-- 功能区 -->
|
<!-- 功能区 -->
|
||||||
<view class="fn rows mtb30 mlr30">
|
<view class="fn rows mtb30 mlr30">
|
||||||
<uni-icons type="scan" size="48rpx" color="#FF7F37" />
|
<!-- <uni-icons type="scan" class="mr20" size="48rpx" color="#FF7F37" /> -->
|
||||||
<view class="searchBox rows f1 ml20 ptb10 plr20 bar">
|
<view class="searchBox rows f1 ptb10 plr20 bar">
|
||||||
<input type="text" v-model="keyword" class="f1" placeholder="请输入关键字" @blur="handleSearch" />
|
<input type="text" v-model="keyword" class="f1" placeholder="请输入关键字" @blur="handleSearch" />
|
||||||
<uni-icons type="search" size="30rpx" color="#999" />
|
<uni-icons type="search" size="30rpx" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -4,8 +4,8 @@ import {
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
// let target = 'http://22vn9z.natappfree.cc'
|
// let target = 'http://nrpnpc.natappfree.cc'
|
||||||
// let target = 'https://63fdb472.r24.cpolar.top'
|
// let target = 'http://6aa4a4c3.r24.cpolar.top'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue