update about api
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="complaint">
|
||||
<view class="complaint-item" v-for="(item, index) in 4" :key="index" @click="toDetailsPage">
|
||||
<ComplaintItem></ComplaintItem>
|
||||
<view class="complaint-item" v-for="(item, index) in list" :key="index" @click="toDetailsPage(item.complain_id)">
|
||||
<ComplaintItem :info="item"></ComplaintItem>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
@@ -10,15 +10,38 @@
|
||||
import ComplaintItem from '@/components/complaint-item/index'
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
list:[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ComplaintItem
|
||||
},
|
||||
onLoad() {
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
toDetailsPage() {
|
||||
// 获取投诉列表
|
||||
getlist(){
|
||||
this.$u.api.reportlist({}).then(res => {
|
||||
console.log(res)
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
let arr = res.data.dataList
|
||||
for(let index in arr){
|
||||
this.list.push(arr[index])
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/complaintDetails'
|
||||
url: '/pages/user/complaintDetails?id='+id
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="details">
|
||||
<view class="goods-info">
|
||||
<image></image>
|
||||
<image :src="info.complain_goods_image"></image>
|
||||
<view class="text">
|
||||
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款dlk...</view>
|
||||
<view class="num">共一件商品</view>
|
||||
<view class="name u-line-1">{{info.complain_goods_name}}</view>
|
||||
<view class="num">共{{info.complain_goods_num}}件商品</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="worker-info">
|
||||
@@ -12,21 +12,21 @@
|
||||
<view class="item">
|
||||
<view>
|
||||
<view class="item-title">姓名</view>
|
||||
<view class="value">李先生</view>
|
||||
<view class="value">{{info.takeawayer_name}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="item-title">手机号</view>
|
||||
<view class="value">1561</view>
|
||||
<view class="value">{{info.takeawayer_mobile}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="item-title">公司名称</view>
|
||||
<view class="value">申通快递公司</view>
|
||||
<view class="value">{{info.company}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reason">
|
||||
<view class="title">投诉原因</view>
|
||||
<view class="value u-line-4">太慢了太慢了!!!!</view>
|
||||
<view class="value u-line-4">{{info.complain_desc}}</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
@@ -34,7 +34,29 @@
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
info:{}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getinfo(option.id)
|
||||
},
|
||||
methods:{
|
||||
getinfo(id){
|
||||
let that = this;
|
||||
this.$u.api.reportdetail({
|
||||
id: id
|
||||
}).then(res => {
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
this.info = res.data.info;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -70,8 +70,7 @@ export default {
|
||||
this.$u.api.articlelist({
|
||||
type: that.type,
|
||||
page: that.num
|
||||
})
|
||||
.then(res => {
|
||||
}).then(res => {
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
@@ -101,8 +100,7 @@ export default {
|
||||
that.show = false;
|
||||
this.$u.api.delarticle({
|
||||
article_id: that.delid
|
||||
})
|
||||
.then(res => {
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
@@ -115,6 +113,7 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
// 删除后更新页面
|
||||
this.delid = null
|
||||
this.newlist = [];
|
||||
that.num=1
|
||||
that.getlist()
|
||||
|
||||
@@ -1,41 +1,51 @@
|
||||
<template>
|
||||
<view class="details">
|
||||
<view class="main"></view>
|
||||
<view></view>
|
||||
<view class="main">
|
||||
<view class="title">{{ info.article_title }}</view>
|
||||
<view class="detail">{{ info.article_content }}</view>
|
||||
</view>
|
||||
<view class="imgbox">
|
||||
<view v-if="type==1">
|
||||
<image :src="list" mode="" v-for="list in info.article_image"></image>
|
||||
</view>
|
||||
<view v-else>
|
||||
<video :src="info.video_path" controls></video>
|
||||
</view>
|
||||
</view>
|
||||
<view class="data-list">
|
||||
<view>
|
||||
<image src="/static/image/user/2.png"></image>
|
||||
<text>2.5w</text>
|
||||
<text>{{ info.comment_num }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/user/3.png" v-if="0"></image>
|
||||
<image src="/static/image/user/7.png" v-else></image>
|
||||
<text>2.5w</text>
|
||||
<text>{{ info.collect_num }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/user/4.png" v-if="0"></image>
|
||||
<image src="/static/image/user/6.png" v-else></image>
|
||||
<text>2.5w</text>
|
||||
<text>{{ info.like_num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="comment-list">
|
||||
<view class="item" v-for="(item, index) in 4" :key="index">
|
||||
<view class="item" v-for="(item, index) in info.articlecomment" :key="index">
|
||||
<view class="info">
|
||||
<image></image>
|
||||
<view class="center">
|
||||
<view class="name">用户1</view>
|
||||
<view class="time">6小时前</view>
|
||||
<view class="name">{{item.member_nickname}}</view>
|
||||
<view class="time">{{item.create_time}}</view>
|
||||
</view>
|
||||
<view class="btn" @click="showChat=true">回复</view>
|
||||
<view class="btn" @click="showreply(item.id)">回复</view>
|
||||
</view>
|
||||
<view class="content u-line-1">德铭阳光赞德铭阳光赞德铭阳光赞</view>
|
||||
<view class="content u-line-1">{{item.content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup v-model="showChat" mode="bottom" :mask=false>
|
||||
<u-popup v-model="showChat" mode="bottom" :mask="false">
|
||||
<view class="chat">
|
||||
<view class="input-box">
|
||||
<input type="text">
|
||||
<view class="btn">发送</view>
|
||||
<input type="text" v-model="content"/>
|
||||
<view class="btn" @click="reply">发送</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
@@ -46,33 +56,124 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showChat: false
|
||||
}
|
||||
showChat: false,
|
||||
id: 0,
|
||||
info: {
|
||||
article_image: []
|
||||
},
|
||||
type:1,
|
||||
content:"",
|
||||
pid:null
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.setNavTitle(option.current);
|
||||
this.type = option.current
|
||||
this.id = option.id;
|
||||
this.getdetail();
|
||||
},
|
||||
methods: {
|
||||
// 展示回复弹框
|
||||
showreply(id){
|
||||
this.showChat = true
|
||||
this.pid = id
|
||||
},
|
||||
// 回复评论
|
||||
reply(){
|
||||
if(this.content==""){
|
||||
this.$refs.uToast.show({
|
||||
title:"内容不能为空",
|
||||
type: 'error'
|
||||
});
|
||||
return
|
||||
}
|
||||
let that = this;
|
||||
this.$u.api.reply({
|
||||
pid:that.pid,
|
||||
content:that.content,
|
||||
article_id: that.id
|
||||
}).then(res => {
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
this.pid = "";
|
||||
this.content = "";
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置顶部标题
|
||||
setNavTitle(current) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: current == 0 ? "图文详情" : "视频详情"
|
||||
title: current == 1 ? '图文详情' : '视频详情'
|
||||
});
|
||||
},
|
||||
// 获取文章详情
|
||||
getdetail() {
|
||||
let that = this;
|
||||
this.$u.api.getdetail({
|
||||
article_id: that.id
|
||||
}).then(res => {
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
this.info = res.data.article[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.details {
|
||||
min-height: calc(100vh - var(--window-top));
|
||||
background-color: #ECECEC;
|
||||
background-color: #ececec;
|
||||
.main {
|
||||
height: 740rpx;
|
||||
margin: 2rpx 0rpx;
|
||||
margin: 2rpx 0rpx 0;
|
||||
background-color: #ffffff;
|
||||
.title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.detail {
|
||||
width: 100%;
|
||||
text-indent: 40rpx;
|
||||
font-size: 26rpx;
|
||||
text-align: justify;
|
||||
padding: 0 30rpx 85rpx;
|
||||
}
|
||||
}
|
||||
.imgbox {
|
||||
width: 750rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
background-color: #FFFFFF;
|
||||
image {
|
||||
width: 210rpx;
|
||||
height: 210rpx;
|
||||
margin: 10rpx 15rpx;
|
||||
}
|
||||
video {
|
||||
width: 210rpx;
|
||||
height: 210rpx;
|
||||
margin: 10rpx 15rpx;
|
||||
}
|
||||
}
|
||||
.comment-list {
|
||||
.item {
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 2rpx;
|
||||
.info {
|
||||
@@ -90,17 +191,17 @@ export default {
|
||||
margin-right: auto;
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
color: rgba(51, 51, 51, 1);
|
||||
margin-bottom: auto;
|
||||
}
|
||||
.time {
|
||||
font-size: 22rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
color: rgba(153, 153, 153, 1);
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
font-size: 26rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
color: rgba(51, 51, 51, 1);
|
||||
}
|
||||
}
|
||||
.content {
|
||||
@@ -110,7 +211,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.data-list {
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
height: 88rpx;
|
||||
padding: 0 30rpx;
|
||||
@@ -137,20 +238,20 @@ export default {
|
||||
}
|
||||
> text {
|
||||
font-size: 28rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
color: rgba(51, 51, 51, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.chat {
|
||||
background-color: #ECECEC;
|
||||
background-color: #ececec;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
padding: 19rpx 30rpx;
|
||||
.input-box {
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
width: 690rpx;
|
||||
height: 60rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -160,10 +261,10 @@ export default {
|
||||
}
|
||||
.btn {
|
||||
width: 90rpx;
|
||||
background: rgba(255,120,15,1);
|
||||
background: rgba(255, 120, 15, 1);
|
||||
border-radius: 25rpx;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255,255,255,1);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
margin-right: 5rpx;
|
||||
@@ -171,4 +272,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -37,8 +37,7 @@ export default {
|
||||
methods:{
|
||||
fans(){
|
||||
let that = this;
|
||||
this.$u.api.myfanlist({
|
||||
}).then(res => {
|
||||
this.$u.api.myfanlist({}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
|
||||
@@ -41,8 +41,7 @@ export default {
|
||||
// 获取个人信息
|
||||
getmyinfo(){
|
||||
let that = this;
|
||||
this.$u.api.getshopinfo({
|
||||
}).then(res => {
|
||||
this.$u.api.getshopinfo({}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
@@ -82,7 +81,6 @@ export default {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #0f0;
|
||||
}
|
||||
.name{
|
||||
font-size: 24rpx;
|
||||
|
||||
@@ -58,8 +58,7 @@ export default {
|
||||
// 获取个人信息
|
||||
getmyinfo(){
|
||||
let that = this;
|
||||
this.$u.api.getshopinfo({
|
||||
}).then(res => {
|
||||
this.$u.api.getshopinfo({}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
|
||||
@@ -89,9 +89,35 @@ export default {
|
||||
},
|
||||
// 跳转发布页面
|
||||
navto(url) {
|
||||
this.$u.route({
|
||||
url: `/pages/${url}`
|
||||
});
|
||||
// 判断直播权限
|
||||
if(url=="release/tosign"){
|
||||
this.$u.api.canlive({}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode != 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
});
|
||||
} else {
|
||||
if(res.data.live_stataes==0){
|
||||
this.$u.route({
|
||||
url: `/pages/${url}`
|
||||
});
|
||||
}else{
|
||||
this.$refs.uToast.show({
|
||||
title: "当前用户没有直播权限",
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.$u.route({
|
||||
url: `/pages/${url}`
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user