update about api

This commit is contained in:
cmxdd 2020-07-30 19:49:12 +08:00
parent 5094efd41e
commit 22ea59f5c5
16 changed files with 1298 additions and 809 deletions

View File

@ -23,8 +23,8 @@ const install = (Vue, vm) => {
return vm.$u.post("Streaming/liveStreamList") return vm.$u.post("Streaming/liveStreamList")
}, },
// 获取订单列表 // 获取订单列表
getorderlist(){ getorderlist({type,page}){
return vm.$u.get("/Order/orderList") return vm.$u.get("/Order/orderList",{type,page})
}, },
// 获取试穿订单列表 // 获取试穿订单列表
getshiftlist(){ getshiftlist(){
@ -62,6 +62,39 @@ const install = (Vue, vm) => {
takeawayerlist(){ takeawayerlist(){
return vm.$u.get("/Order/getTakeawayerList") return vm.$u.get("/Order/getTakeawayerList")
}, },
// 投诉列表
reportlist(){
return vm.$u.post("/takeawayer/complaintTKList")
},
// 投诉详情
reportdetail({id}){
return vm.$u.post("/takeawayer/complaintInfo",{id})
},
// 可以投诉的订单
canreportorder(){
return vm.$u.post("/Takeawayer/tryOrderSnList")
},
// 投诉骑手
reportorder({order_id,takeawayer_id,order_list,content}){
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
},
// 文章详情
getdetail({article_id}){
return vm.$u.post("/article/articleInfo",{article_id})
},
// 回复评论
reply({article_id,pid,content}){
return vm.$u.post("/article/articleAddComment",{article_id,pid,content})
},
// 达人是否可以直播
canlive(){
return vm.$u.post("/Streaming/expt_live")
},
// 可选择直播商品列表
canselectgood(){
return vm.$u.post("/article/getStoreGoodsList")
},
} }
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下 // 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = api; vm.$u.api = api;

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="item"> <view class="item">
<image></image> <image :src="info.complain_goods_image"></image>
<view class="people"> <view class="people">
<view class="status">已受理</view> <view class="status">{{info.complain_status==0?"未受理":"已审核"}}</view>
<view class="goods-name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view> <view class="goods-name u-line-1">{{info.complain_goods_name}}</view>
<view class="info"> <view class="info">
<view class="name">骑手李先生</view> <view class="name">骑手{{info.takeawayer_name}}</view>
<view class="price">199.9</view> <view class="price">{{info.complain_goods_price*info.complain_goods_num}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -16,8 +16,14 @@ export default {
data() { data() {
return {} return {}
}, },
methods: { props: {
info:{
type: Object,
default: null
}
}, },
methods: {
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -35,7 +41,6 @@ export default {
height: 160rpx; height: 160rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 25rpx; margin-right: 25rpx;
background-color: aqua;
} }
.people { .people {
.status { .status {

View File

@ -50,7 +50,7 @@ export default {
}, },
toDetailsPage() { toDetailsPage() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/user/contentDetails?current=' + this.cur url: '/pages/user/contentDetails?current=' + this.type+'&id=' + this.info.article_id
}); });
} }
}, },

View File

@ -2,11 +2,16 @@
<view class="item" @click="toDetailsPage"> <view class="item" @click="toDetailsPage">
<image :src="info.extend_order_goods[0].goods_image"></image> <image :src="info.extend_order_goods[0].goods_image"></image>
<view class="goods"> <view class="goods">
<view class=""> <view class="box">
<view class=""> <view class="">
编号{{info.order_sn}} 编号{{info.order_sn}}
</view> </view>
<view class="status" v-if="cur==4">待处理订单</view> <!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 -->
<view class="status" v-if="info.view_type==1">待处理订单</view>
<view class="status" v-else-if="info.view_type==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</view>
<view class="status" v-else-if="info.view_type==4">申请退款订单</view>
<view class="status" v-else-if="info.view_type==5">已退款订单</view>
</view> </view>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view> <view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
@ -50,16 +55,22 @@ export default {
height: 160rpx; height: 160rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 25rpx; margin-right: 25rpx;
background-color: aqua;
} }
.goods { .goods {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
.box{
width: 100%;
display: flex;
justify-content: space-between;
font-size: 24rpx;
}
.status { .status {
width: 120rpx;
align-self: flex-end; align-self: flex-end;
font-size: 26rpx; font-size: 24rpx;
color: rgba(255,49,49,1); color: rgba(255,49,49,1);
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }

View File

@ -3,13 +3,17 @@
<image :src="info.goods_pic"></image> <image :src="info.goods_pic"></image>
<view class="goods"> <view class="goods">
<view class=""> <view class="">
<view class="status" v-if="cur==4">待处理订单</view> <!-- 0:待处理订单 20:同意 40:拒绝此订单 -->
<view class="status" v-if="info.goods_try_order_status==0">待处理订单</view>
<view class="status" v-if="info.goods_try_order_status==20">已接单订单</view>
<view class="status" v-if="info.goods_try_order_status==40">已拒绝订单</view>
<view class="status" v-if="info.goods_try_order_status==50">已完成订单</view>
</view> </view>
<view class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view> <view class="name u-line-1">{{info.goods_name}}</view>
<view class="info"> <view class="info">
<view class="num">{{info.extend_order_goods[0].goods_num}}件商品</view> <view class="num">{{info.goods_try_num}}件商品</view>
<view class="price">实付<span>{{info.extend_order_goods[0].goods_pay_price}}</span></view> <view class="price">实付<span>{{info.price}}</span></view>
</view> </view>
</view> </view>
</view> </view>
@ -47,7 +51,6 @@ export default {
height: 160rpx; height: 160rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 25rpx; margin-right: 25rpx;
background-color: aqua;
} }
.goods { .goods {
display: flex; display: flex;

View File

@ -1,202 +1,285 @@
<template> <template>
<view class="home"> <view class="home">
<view class="image-swiper"><u-swiper :list="imageList" mode="dot" border-radius="20"></u-swiper></view> <view class="image-swiper"><u-swiper :list="imageList" mode="dot" border-radius="20"></u-swiper></view>
<view class="tab-swiper"> <view class="tab-swiper">
<u-tabs-swiper <u-tabs-swiper
ref="uTabs" ref="uTabs"
:list="list" :list="list"
:current="current" :current="current"
@change="tabsChange" @change="tabsChange"
active-color="#FF780F" active-color="#FF780F"
inactive-color="#333333" inactive-color="#333333"
font-size="26" font-size="26"
height="98" height="98"
:show-bar="false" :show-bar="false"
swiperWidth="750" swiperWidth="750"
gutter="52" gutter="52"
></u-tabs-swiper> ></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish"> <view class="order-list" v-if="current == 0">
<swiper-item class="swiper-item"> <view v-for="(item, index) in allorder" :key="index"><OrderItem :info="item"></OrderItem></view>
<scroll-view scroll-y style="height: 100%;width: 100%;" class="order-list"> </view>
<view v-for="(item, index) in allorder" :key="index"> <view v-else-if="current == 1">
<OrderItem :info="item"></OrderItem> <view v-for="(item, index) in testlist" :key="index"><testList :info="item"></testList></view>
</view> </view>
</scroll-view> <view v-else-if="current == 2">
</swiper-item> <view v-for="(item, index) in worklist" :key="index"><OrderItem :info="item"></OrderItem></view>
<swiper-item class="swiper-item"> </view>
<scroll-view scroll-y style="height: 100%;width: 100%;"> <view v-else-if="current == 3">
<view v-for="(item, index) in testlist" :key="index"> <view v-for="(item, index) in translist" :key="index"><OrderItem :info="item"></OrderItem></view>
<testList :info="item"></testList> </view>
</view> <view v-else-if="current == 4">
</scroll-view> <view class="complaint">
</swiper-item> <view class="select-container">
<swiper-item class="swiper-item"> <view class="title">选择订单号</view>
<scroll-view scroll-y style="height: 100%;width: 100%;"> <view class="worker" v-if="JSON.stringify(worker) != '{}'">
<view v-for="(item, index) in 5" :key="index"><OrderItem :cur="current"></OrderItem></view> <view>{{ worker.name }}</view>
</scroll-view> <u-icon name="edit-pen" @click="worker = {}"></u-icon>
</swiper-item> </view>
<swiper-item class="swiper-item"> <view v-else class="select" @click="showSelect = true">
<scroll-view scroll-y style="height: 100%;width: 100%;"> <view>请选择</view>
<view class="complaint"> <image src="/static/image/home/5.png"></image>
<view class="select-container"> </view>
<view class="title">选择骑手</view> </view>
<view class="worker" v-if="JSON.stringify(worker) != '{}'"> <view class="textarea">
<view>{{ worker.company + ' ' + worker.name }}</view> <view class="title">投诉简介</view>
<u-icon name="edit-pen" @click="worker = {}"></u-icon> <textarea placeholder-style="color:#999999" placeholder="请输入内容" v-model="reportcontent" />
</view> </view>
<view v-else class="select" @click="showSelect = true"> <!-- 事件 -->
<view>请选择</view> <view class="btn" @click="reportcar">确定</view>
<image src="/static/image/home/5.png"></image> </view>
</view> </view>
</view> <view v-else-if="current == 5">
<view class="textarea"> <view v-for="(item, index) in finshlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
<view class="title">投诉简介</view> </view>
<textarea placeholder-style="color:#999999" placeholder="请输入内容" /> <view v-else-if="current == 6">
</view> <view v-for="(item, index) in badlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
<!-- 事件 --> </view>
<view class="btn" @click="showComplaint = true">确定</view> <view class="release-btn" @click="publish">
</view> <image src="../../static/image/index/publish.png"></image>
</scroll-view> <view class="text">发布</view>
</swiper-item> </view>
<swiper-item class="swiper-item"> <u-select v-model="showSelect" :list="carlist" @confirm="setWorker" confirm-color="#FF780F"></u-select>
<scroll-view scroll-y style="height: 100%;width: 100%;"> <u-popup v-model="showComplaint" mode="center" border-radius="10">
<view v-for="(item, index) in 5" :key="index"><OrderItem :cur="current"></OrderItem></view> <view class="confirm-complaint">
</scroll-view> <view class="text">
</swiper-item> <view>投诉成功</view>
<swiper-item class="swiper-item"> <view>请等待审核结果</view>
<scroll-view scroll-y style="height: 100%;width: 100%;"> </view>
<view v-for="(item, index) in 15" :key="index"><OrderItem :cur="current"></OrderItem></view> <view class="btn" @click="showComplaint = false">确认</view>
</scroll-view> </view>
</swiper-item>
</swiper>
<view class="release-btn" @click="publish">
<image src="../../static/image/index/publish.png"></image>
<view class="text">发布</view>
</view>
<u-select v-model="showSelect" mode="mutil-column-auto" :list="workerList" @confirm="setWorker"></u-select>
<u-popup v-model="showComplaint" mode="center" border-radius="10">
<view class="confirm-complaint">
<view class="text">
<view>投诉成功</view>
<view>请等待审核结果</view>
</view>
<view class="btn" @click="showComplaint = false">确认</view>
</view>
</u-popup>
<u-popup v-model="publishstate" mode="bottom">
<view class="publish">
<view class="list">
<view @click="navto('release/tosign')">
<image src="../../static/image/index/live.png"></image>
<text>直播</text>
</view>
<view @click="navto('release/index')">
<image src="../../static/image/index/photo.png"></image>
<text>图文</text>
</view>
<view @click="navto('release/video')">
<image src="../../static/image/index/video.png"></image>
<text>视频</text>
</view>
</view>
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
</view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-popup v-model="publishstate" mode="bottom">
</view> <view class="publish">
</template> <view class="list">
<view @click="navto('release/tosign')">
<script> <image src="../../static/image/index/live.png"></image>
<text>直播</text>
</view>
<view @click="navto('release/index')">
<image src="../../static/image/index/photo.png"></image>
<text>图文</text>
</view>
<view @click="navto('release/video')">
<image src="../../static/image/index/video.png"></image>
<text>视频</text>
</view>
</view>
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
import OrderItem from '@/components/order-item/index'; import OrderItem from '@/components/order-item/index';
import testList from '@/components/order-item/testlist.vue'; import testList from '@/components/order-item/testlist.vue';
export default { export default {
components: { components: {
OrderItem, OrderItem,
testList testList
}, },
data() { data() {
return { return {
list: [ list: [
{ {
name: '全部订单' name: '全部订单'
}, },
{ {
name: '试穿订单' name: '试穿订单'
}, },
{ {
name: '待处理订单' name: '待处理订单'
}, },
{ {
name: '投诉骑手' name: '已发货订单'
}, },
{ {
name: '已完成订单' name: '投诉骑手'
}, },
{ {
name: '退货订单' name: '已完成订单'
} },
], {
imageList: [], name: '退货订单'
showSelect: false, }
current: 0, ],
swiperCurrent: 0, imageList: [],
showComplaint: false, showSelect: false,
worker: {}, current: 0,
workerList: [ swiperCurrent: 0,
{ showComplaint: false,
label: '百世快递公司', worker: {},
children: [ publishstate: false,
{ num: 1,
label: '小米' allorder: [], //
}, testlist: [], //穿
{ worklist: [], //
label: '小亮' translist: [], //
} finshlist: [], //
] badlist: [], //退
}, carlist: [], //
{ reportinfo: null, //
label: '中通快递公司', reportcontent: '' //
children: [ };
{ },
label: '小红' onLoad() {
} //
] this.getswiper();
}, //
{
label: '申通快递公司',
children: [
{
label: '小蓝'
}
]
}
],
publishstate: false,
num: 0,
allorder:[],//
testlist:[],//穿
};
},
onLoad() {
this.getswiper();
this.getallorder(0); this.getallorder(0);
this.getshiftlist() //
// 0: 1 2 3 4退/退 5退/退 this.getcarlist();
// 0: 1 2 3 4退/退 5退/退
}, },
onReachBottom() { onReachBottom() {
this.num++ this.num++;
}, this.reset();
methods: { },
// methods: {
close() { //
this.publishstate = false; resetarr() {
this.allorder = [];
this.worklist = [];
this.translist = [];
this.finshlist = [];
this.badlist = [];
this.badlist = [];
this.testlist = [];
},
// current
reset() {
let current = this.current;
if (current == 0) {
//
this.getallorder(0);
} else if (current == 1) {
// 穿
this.getshiftlist();
} else if (current == 2) {
//
this.getallorder(1);
} else if (current == 3) {
//
this.getallorder(2);
} else if (current == 4) {
//
} else if (current == 5) {
//
this.getallorder(3);
} else if (current == 6) {
// 退
this.getallorder(5);
}
},
//
close() {
this.publishstate = false;
},
//
reportcar(type) {
let that = this;
if (that.reportcontent == '') {
this.$refs.uToast.show({
title: "投诉内容不能为空",
type: 'error'
});
return;
}
console.log(that.reportinfo)
this.$u.api.reportorder({
order_id: that.reportinfo.order_id,
takeawayer_id: that.reportinfo.takeawayer_id,
order_list: that.reportinfo.order_list,
content: that.reportcontent
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
that.showComplaint = true;
}
});
},
//
getcarlist() {
let that = this;
this.$u.api.canreportorder({}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
let arr = res.data.order_normal;
// {
// value: 2,
// label: '广',
// children: [
// {
// value: 3,
// label: ''
// },
// {
// value: 4,
// label: '广'
// }
// ]
// },
for (let index in arr) {
arr[index].value = arr[index].takeawayer_id;
let newarr = arr[index].order_list.split('-');
arr[index].label = newarr[0] + ' ' + newarr[1];
}
this.carlist = arr;
}
});
}, },
// 穿 // 穿
getshiftlist(){ getshiftlist() {
let that = this; let that = this;
this.$u.api.getshiftlist({ this.$u.api.getshiftlist({}).then(res => {
type:type, console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.testlist = res.data.orderList;
}
});
},
//
getallorder(type) {
let that = this;
this.$u.api.getorderlist({
type: type,
page: that.num page: that.num
}).then(res => { }).then(res => {
console.log(res); console.log(res);
@ -206,245 +289,247 @@ export default {
type: 'error' type: 'error'
}); });
} else { } else {
this.testlist = res.data.orderList let arr = res.data;
for (let index in arr) {
if (type == 0) {
this.allorder.push(arr[index]);
} else if (type == 1) {
this.worklist.push(arr[index]);
} else if (type == 2) {
this.translist.push(arr[index]);
} else if (type == 3) {
this.finshlist.push(arr[index]);
} else if (type == 4) {
this.badlist.push(arr[index]);
} else if (type == 5) {
this.badlist.push(arr[index]);
}
}
} }
}); });
}, },
// //
getallorder(type) { getswiper() {
let that = this; this.imageList = [
this.$u.api.getorderlist({ {
type:type, image: '../../static/image/index/swiper.png'
page: that.num },
}).then(res => { {
console.log(res); image: '../../static/image/index/swiper.png'
if (res.errCode != 0) { },
this.$refs.uToast.show({ {
title: res.message, image: '../../static/image/index/swiper.png'
type: 'error' }
}); ];
} else { },
this.allorder = res.data //
} publish() {
}); this.publishstate = true;
}, },
// //
getswiper() { setWorker(e) {
this.imageList =[{ let arr = this.carlist;
image: '../../static/image/index/swiper.png' for (let index in arr) {
}, if (arr[index].takeawayer_id == e[0].value) {
{ this.reportinfo = arr[index];
image: '../../static/image/index/swiper.png' }
}, }
{ this.worker = {
image: '../../static/image/index/swiper.png' name: e[0].label,
} id: e[0].value
] };
}, },
// //
publish() { tabsChange(index) {
this.publishstate = true; this.swiperCurrent = index;
}, this.current = index;
setWorker(e) { this.num = 1;
// console.log(e); this.resetarr();
this.worker = { if (index == 6) {
company: e[0].label, this.getallorder(4);
name: e[1].label }
}; this.reset();
}, },
tabsChange(index) { //
this.swiperCurrent = index; navto(url) {
}, this.$u.route({
animationfinish(e) { url: `/pages/${url}`
let current = e.detail.current; });
// this.$refs.uTabs.setFinishCurrent(current); }
this.swiperCurrent = current; }
this.current = current; };
}, </script>
navto(url) { <style lang="scss" scoped>
this.$u.route({ .home {
url: `/pages/${url}` min-height: calc(100vh - var(--window-top));
}); background-color: #ececec;
// console.log(`/pages/${url}`) display: flex;
// uni.navigateTo({ flex-direction: column;
// url: `/pages/${url}` .image-swiper {
// }); background-color: #ffffff;
} padding: 0 30rpx 16rpx;
} }
}; .tab-swiper {
</script> margin: 2rpx 0 20rpx 0;
<style lang="scss" scoped> }
.home { .complaint {
min-height: calc(100vh - var(--window-top)); margin: 0 30rpx;
background-color: #ececec; padding: 75rpx 30rpx;
display: flex; background-color: #ffffff;
flex-direction: column; .select-container {
// padding-bottom: 100rpx; display: flex;
> uni-swiper { align-items: center;
flex: 1; margin-bottom: 60rpx;
} .title {
.image-swiper { width: 180rpx;
background-color: #ffffff; font-size: 30rpx;
padding: 0 30rpx 16rpx; color: rgba(51, 51, 51, 1);
} margin-right: 20rpx;
.tab-swiper { text-align: right;
margin: 2rpx 0 20rpx 0; }
} .select {
.swiper-item { padding: 18rpx 20rpx;
.complaint { width: 490rpx;
margin: 0 30rpx; height: 60rpx;
padding: 75rpx 30rpx; background: rgba(236, 236, 236, 1);
background-color: #ffffff; border-radius: 6rpx;
.select-container { display: flex;
display: flex; align-items: center;
align-items: center; justify-content: space-between;
margin-bottom: 60rpx; > view {
.title { font-size: 26rpx;
font-size: 30rpx; color: #999999;
color: rgba(51, 51, 51, 1); }
margin-right: 20rpx; > image {
} width: 24rpx;
.select { height: 13rpx;
padding: 18rpx 20rpx; }
width: 490rpx; }
height: 60rpx; .worker {
background: rgba(236, 236, 236, 1); display: flex;
border-radius: 6rpx; align-items: center;
display: flex; background-color: #ececec;
align-items: center; > view {
justify-content: space-between; font-size: 26rpx;
> view { color: rgba(51, 51, 51, 1);
font-size: 26rpx; margin-right: 20rpx;
color: #999999; }
} }
> image { }
width: 24rpx; .textarea {
height: 13rpx; box-sizing: border-box;
} display: flex;
} .title {
.worker { width: 180rpx;
display: flex; font-size: 30rpx;
align-items: center; text-align: right;
> view { color: rgba(51, 51, 51, 1);
font-size: 30rpx; margin-right: 20rpx;
color: rgba(51, 51, 51, 1); }
margin-right: 20rpx; > textarea {
} padding: 20rpx;
} width: 430rpx;
} height: 220rpx;
.textarea { border: 1rpx solid #999999;
box-sizing: border-box; font-size: 26rpx;
display: flex; }
.title { }
font-size: 30rpx; .btn {
color: rgba(51, 51, 51, 1); margin: 90rpx auto 0;
margin-right: 20rpx; width: 630rpx;
} height: 88rpx;
> textarea { background: rgba(255, 120, 15, 1);
padding: 20rpx; border-radius: 44rpx;
width: 430rpx; font-size: 36rpx;
height: 220rpx; color: rgba(255, 255, 255, 1);
border: 1rpx solid #999999; line-height: 88rpx;
font-size: 26rpx; text-align: center;
} }
} }
.btn { .release-btn {
margin: 90rpx auto 0; position: fixed;
width: 630rpx; bottom: 475rpx;
height: 88rpx; right: 30rpx;
background: rgba(255, 120, 15, 1); width: 100rpx;
border-radius: 44rpx; height: 100rpx;
font-size: 36rpx; background: rgba(255, 120, 15, 1);
color: rgba(255, 255, 255, 1); box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(255, 120, 15, 0.22);
line-height: 88rpx; border-radius: 50%;
text-align: center; display: flex;
} flex-direction: column;
} align-items: center;
} justify-content: center;
.release-btn { > image {
position: fixed; width: 36rpx;
bottom: 475rpx; height: 36rpx;
right: 30rpx; flex-shrink: 0;
width: 100rpx; margin-bottom: 2rpx;
height: 100rpx; }
background: rgba(255, 120, 15, 1); .text {
box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(255, 120, 15, 0.22); font-size: 20rpx;
border-radius: 50%; color: rgba(255, 255, 255, 1);
display: flex; }
flex-direction: column; }
align-items: center; .confirm-complaint {
justify-content: center; text-align: center;
> image { padding-bottom: 20rpx;
width: 36rpx; .text {
height: 36rpx; text-align: center;
flex-shrink: 0; width: 420rpx;
margin-bottom: 2rpx; padding: 55rpx 112rpx;
} font-size: 28rpx;
.text { color: rgba(51, 51, 51, 1);
font-size: 20rpx; line-height: 4r2px;
color: rgba(255, 255, 255, 1); > view:first-child {
} margin-bottom: 20rpx;
} }
.confirm-complaint { }
text-align: center; .btn {
padding-bottom: 20rpx; width: 200rpx;
.text { height: 60rpx;
text-align: center; background: rgba(255, 120, 15, 1);
width: 420rpx; border-radius: 30rpx;
padding: 55rpx 112rpx; text-align: center;
font-size: 28rpx; line-height: 60rpx;
color: rgba(51, 51, 51, 1); font-size: 28rpx;
line-height: 4r2px; color: rgba(255, 255, 255, 1);
> view:first-child { margin: 0 auto;
margin-bottom: 20rpx; }
} }
} .publish {
.btn { display: flex;
width: 200rpx; flex-direction: column;
height: 60rpx; justify-content: space-between;
background: rgba(255, 120, 15, 1); align-items: center;
border-radius: 30rpx; padding: 50rpx 84rpx 31rpx 78rpx;
text-align: center; image {
line-height: 60rpx; }
font-size: 28rpx; .list {
color: rgba(255, 255, 255, 1); display: flex;
margin: 0 auto; align-items: center;
} justify-content: space-between;
} width: 100%;
.publish { > view {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; align-items: center;
align-items: center; > image {
padding: 50rpx 84rpx 31rpx 78rpx; width: 94rpx;
image { height: 80rpx;
} }
.list { > text {
display: flex; margin-top: 10rpx;
align-items: center; font-size: 28rpx;
justify-content: space-between; color: #333;
width: 100%; font-weight: 400;
> view { }
display: flex; }
flex-direction: column; }
align-items: center; .off {
> image { margin-top: 81rpx;
width: 94rpx; width: 37rpx;
height: 80rpx; height: 37rpx;
} }
> text { }
margin-top: 10rpx; }
font-size: 28rpx;
color: #333;
font-weight: 400;
}
}
}
.off {
margin-top: 81rpx;
width: 37rpx;
height: 37rpx;
}
}
}
</style> </style>

View File

@ -1,370 +1,357 @@
<template> <template>
<view id="release"> <view id="release">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<u-form-item label="标题" label-position="right"> <u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
<u-input v-model="form.name" placeholder="请输入标题" />
</u-form-item>
<view class="titles">图片</view> <view class="titles">图片</view>
<u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList"></u-upload> <u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList"></u-upload>
<!-- 标签 --> <!-- 标签 -->
<view> <view>
<view class="titles">标签</view> <view class="titles">标签</view>
<view class="form-view" @click="show_add()">+ 新建标签</view> <view class="form-view" @click="show_add()">+ 新建标签</view>
<view class="form-view" v-for="(item,index) in fileListes" :key="index">{{item}}</view> <view class="form-view" v-for="(item, index) in fileListes" :key="index">{{ item }}</view>
</view> </view>
<!-- 简介 --> <!-- 简介 -->
<view class="titles">简介</view> <view class="titles">简介</view>
<view class="titles_border"> <view class="titles_border"><textarea placeholder="请输入内容..."></textarea></view>
<textarea placeholder="请输入内容..."></textarea>
</view>
<!-- 底部弹框 商品选择 --> <!-- 底部弹框 商品选择 -->
<view class="show_two"> <view class="show_two">
<u-popup v-model="show_two" mode="bottom" :closeable="true"> <u-popup v-model="show_two" mode="bottom" :closeable="true">
<view class="title"> <view class="title"><text>选择商品</text></view>
<text>选择商品</text>
</view>
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="listes_shoping" v-for="(item, index) in list" :key="index"> <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll" >
<view> <view class="listes_shoping" v-for="(item, index) in list" :key="index">
<u-checkbox-group @change="checkboxGroupChange"> <view>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.id"></u-checkbox> <u-checkbox-group>
</u-checkbox-group> <u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
<view class="contentes">{{ item.goods_name }}</view>
</view> </view>
<view> </scroll-view>
<image :src="item.url" mode="widthFix"></image>
</view>
<view class="contentes">{{item.content}}</view>
</view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="u-button" @click="changes()">确定</view> <view class="u-button" @click="changes()">确定</view>
</u-popup> </u-popup>
<!-- 底部选择商品列表 --> <!-- 底部选择商品列表 -->
<view @click="show_two = true">选择商品 <view @click="show_two = true">
选择商品
<image class="images" src="../../static/image/tosign/bhottom.png"></image> <image class="images" src="../../static/image/tosign/bhottom.png"></image>
</view> </view>
<!-- 选择后的列表 --> <!-- 选择后的列表 -->
<view class="List_tosign" v-if="List_tosign != ''"> <view class="List_tosign" v-if="List_tosign != ''">
<view> <view><image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image></view>
<image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image> <view>木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
</view> <view><image src="../../static/image/tosign/delete.png" mode="widthFix"></image></view>
<view>
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
</view>
<view>
<image src="../../static/image/tosign/delete.png" mode="widthFix"></image>
</view>
</view> </view>
</view> </view>
<!-- 提交 --> <!-- 提交 -->
<u-button class="custom-style" shape="circle" size="default">发表</u-button> <u-button class="custom-style" shape="circle" size="default">发表</u-button>
</u-form> </u-form>
<!-- 添加标签的按钮 --> <!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14"> <u-popup v-model="show" mode="center" border-radius="14">
<view class="text"> <view class="text">创建属于你的标签吧</view>
创建属于你的标签吧 <view class="u-inputes"><u-input v-model="form.name" /></view>
</view>
<view class="u-inputes">
<u-input v-model="form.name" />
</view>
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button> <u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
form: { form: {
name: '', name: '',
intro: '', intro: '',
sex: '' sex: ''
}, },
// 使 // 使
action: 'http://www.example.com/upload', action: 'http://www.example.com/upload',
fileList: [], fileList: [],
fileListes: ["美妆", "博主穿搭", "美妆", "美妆", "美妆", "美妆", "美妆", "博主穿搭"], fileListes: ['美妆', '博主穿搭', '美妆', '美妆', '美妆', '美妆', '美妆', '博主穿搭'],
show: false, show: false,
show_two: false, show_two: false,
filesList: [], filesList: [],
arres_list : [], arres_list: [],
checked: false, checked: false,
list: [{ list: [],
name: 'apple', List_tosign: [],
checked: false, scrollTop: 0
disabled: false, };
content: "木糖少女小紫薯西装领连衣裙夏季新款女装装领连衣裙夏季装领连衣裙夏季装领连衣裙夏季夏收腰格子格纹裙子", },
url: '../../static/image/tosign/tosigin(5).png', onLoad() {
id : '1' //
}, Array.prototype.remove = function(val) {
{ var index = this.indexOf(val);
name: 'apple2', if (index > -1) {
checked: false, this.splice(index, 1);
disabled: false, }
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子", };
url: '../../static/image/tosign/tosigin(5).png', //
id : '2' this.tosign();
}, },
{ methods: {
name: 'appl3e', changes() {
checked: false, let that = this;
disabled: false, that.show_two = false;
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子", console.log(that.arres_list);
url: '../../static/image/tosign/tosigin(5).png', //
id : '3' that.arres_list = [...new Set(that.arres_list)];
}, console.log(that.arres_list);
], },
List_tosign : [] show_add() {
console.log(this.show);
this.show = !this.show;
},
// checkbox
checkboxChange(e) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
}else{
this.delarr(id)
} }
console.log(this.arres_list)
}, },
onLoad(){ //
// delarr(id) {
this.tosign() var that = this;
}, if (id == '') {
methods: { console.log('为空');
changes() { } else {
let that = this; that.arres_list.remove(id);
that.show_two = false;
console.log(that.arres_list);
//
that.arres_list = [...new Set(that.arres_list)];
console.log(that.arres_list)
},
show_add() {
console.log(this.show)
this.show = !this.show
},
// checkbox
checkboxChange(e) {
console.log(e);
if(e.value == true){
let id = e.name;
this.pushes(id)
}
},
pushes(id){
var that = this;
console.log(id)
if(id == ''){
console.log("为空")
}else{
that.arres_list.push(id);
}
},
// checkboxcheckbox-group
checkboxGroupChange(e) {
console.log(e);
},
tosign(){
console.log("111")
this.$u.api.documentInfo({
document_code: 'privacy'
}).then((res)=>{
console.log(res)
})
try {
const value = uni.getStorageSync('list_tosign');
if (value) {
console.log(value);
}
} catch (e) {
// error
}
} }
},
//
pushes(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.push(id);
}
},
tosign() {
console.log('111');
this.$u.api.canselectgood({}).then(res => {
console.log(res);
if(res.data.live_stataes==0){
this.$u.route({
url: `/pages/${url}`
});
}else{
let arr = res.data.list
for(let index in arr){
arr[index].checked=false
}
this.list = arr
}
});
// try {
// const value = uni.getStorageSync('list_tosign');
// if (value) {
// console.log(value);
// }
// } catch (e) {
// // error
// }
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#release { #release {
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
.form-view { .form-view {
background: rgba(255, 120, 15, 1); background: rgba(255, 120, 15, 1);
border-radius: 6rpx; border-radius: 6rpx;
margin-right: 20rpx; margin-right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
display: inline-block; display: inline-block;
margin-bottom: 28rpx; margin-bottom: 28rpx;
color: #fff; color: #fff;
}
.titles {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
margin: 30rpx 0;
}
textarea {
font-size: 26rpx;
}
.custom-style {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 36rpx;
}
.custom-style-button {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 28rpx;
width: 200rpx;
margin-bottom: 23rpx;
line-height: 60rpx;
height: 60rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ECECEC;
margin-bottom: 30rpx;
}
.show_two .title>text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.listes_shoping {
overflow: hidden;
zoom: 1;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.listes_shoping>view {
float: left;
}
.listes_shoping>view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping>view:nth-child(2) {
width: 180rpx;
height: 160rpx;
margin: 0 31rpx 0 19rpx;
}
.listes_shoping>view:nth-child(2) image {
width: 100%;
}
.listes_shoping>view:nth-child(3) {
width: 425rpx;
margin-top: 43rpx;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.u-button {
background: #FF780F;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #FFFFFF;
text-align: center;
margin: 0 auto 20rpx;
}
} }
.scroll {
.u-mode-center-box { width: 100%;
padding: 120rpx; height: 400px;
.text {
font-size: 30rpx;
margin-top: 74rpx;
text-align: center;
font-weight: 500;
color: #333;
}
} }
.titles {
.titles_border,
.uni-textarea-compute {
border: 1px #BABABA solid !important;
padding: 10rpx;
border-radius: 10rpx;
}
.u-inputes {
margin: 30rpx 0;
border: 1px #ececec solid;
padding-left: 14rpx;
width: 420rpx;
}
.show_two {
padding: 30rpx 0 70rpx 0;
}
.show_two>view {
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
margin: 30rpx 0;
} }
.show_two .images { textarea {
width: 22rpx; font-size: 26rpx;
height: 12rpx;
float: right;
top: 14rpx;
} }
.List_tosign {
.custom-style {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 36rpx;
}
.custom-style-button {
background: rgba(255, 120, 15, 1) !important;
color: #fff !important;
font-size: 28rpx;
width: 200rpx;
margin-bottom: 23rpx;
line-height: 60rpx;
height: 60rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ececec;
margin-bottom: 30rpx;
}
.show_two .title > text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.listes_shoping {
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
margin-top: 21rpx; margin-bottom: 30rpx;
height: 160rpx;
position: relative; position: relative;
} }
.List_tosign > view{
.listes_shoping > view {
float: left; float: left;
} }
.List_tosign> view:nth-child(1) {
.listes_shoping > view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping > view:nth-child(2) {
width: 180rpx; width: 180rpx;
height: 160rpx; height: 160rpx;
margin-bottom: 30rpx; margin: 0 31rpx 0 19rpx;
image{
border-radius: 15rpx;
width: 100%;
height: 100%;
}
} }
.List_tosign> view:nth-child(2) {
width: 420rpx; .listes_shoping > view:nth-child(2) image {
height: 76rpx; width: 100%;
margin: 43rpx 43rpx 0 21rpx;
} }
.List_tosign> view:nth-child(3) {
width: 26rpx; .listes_shoping > view:nth-child(3) {
height: 27rpx; width: 425rpx;
position: absolute; margin-top: 43rpx;
top: 0; overflow: hidden;
right: 0; overflow: hidden;
bottom: 0; text-overflow: ellipsis;
margin: auto; display: -webkit-box;
image{ -webkit-box-orient: vertical;
width: 100%; -webkit-line-clamp: 2;
height: 100%;
display: block;
}
} }
.u-button {
background: #ff780f;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #ffffff;
text-align: center;
margin: 0 auto 20rpx;
}
}
.u-mode-center-box {
padding: 120rpx;
.text {
font-size: 30rpx;
margin-top: 74rpx;
text-align: center;
font-weight: 500;
color: #333;
}
}
.titles_border,
.uni-textarea-compute {
border: 1px #bababa solid !important;
padding: 10rpx;
border-radius: 10rpx;
}
.u-inputes {
margin: 30rpx 0;
border: 1px #ececec solid;
padding-left: 14rpx;
width: 420rpx;
}
.show_two {
padding: 30rpx 0 70rpx 0;
}
.show_two > view {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
}
.List_tosign {
overflow: hidden;
zoom: 1;
margin-top: 21rpx;
position: relative;
}
.List_tosign > view {
float: left;
}
.List_tosign > view:nth-child(1) {
width: 180rpx;
height: 160rpx;
margin-bottom: 30rpx;
image {
border-radius: 15rpx;
width: 100%;
height: 100%;
}
}
.List_tosign > view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
}
.List_tosign > view:nth-child(3) {
width: 26rpx;
height: 27rpx;
position: absolute;
top: 0;
right: 0;
bottom: 0;
margin: auto;
image {
width: 100%;
height: 100%;
display: block;
}
}
</style> </style>

View File

@ -15,6 +15,37 @@
<!-- 简介 --> <!-- 简介 -->
<view class="titles">正文</view> <view class="titles">正文</view>
<textarea placeholder="请输入内容..."></textarea> <textarea placeholder="请输入内容..."></textarea>
<view class="show_two">
<u-popup v-model="show_two" mode="bottom" :closeable="true">
<view class="title"><text>选择商品</text></view>
<!-- 商品列表 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll" >
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group>
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.goods_id"></u-checkbox>
</u-checkbox-group>
</view>
<view><image :src="item.goods_image" mode="widthFix"></image></view>
<view class="contentes">{{ item.goods_name }}</view>
</view>
</scroll-view>
<!-- 提交按钮 -->
<view class="u-button" @click="changes()">确定</view>
</u-popup>
<!-- 底部选择商品列表 -->
<view @click="show_two = true">
选择商品
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
</view>
<!-- 选择后的列表 -->
<view class="List_tosign">
<view><image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image></view>
<view>木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
<view><image src="../../static/image/tosign/delete.png" mode="widthFix"></image></view>
</view>
</view>
<!-- 提交 --> <!-- 提交 -->
<u-button class="custom-style" shape="circle" size="default">发表</u-button> <u-button class="custom-style" shape="circle" size="default">发表</u-button>
</u-form> </u-form>
@ -44,17 +75,65 @@
action: 'http://www.example.com/upload', action: 'http://www.example.com/upload',
fileList: [], fileList: [],
fileListes:["美妆","博主穿搭","美妆","美妆","美妆","美妆","美妆","博主穿搭"], fileListes:["美妆","博主穿搭","美妆","美妆","美妆","美妆","美妆","博主穿搭"],
show: false show: false,
show_two: false,
arres_list: [],
list: [],
scrollTop: 0
} }
}, },
onLoad() {
//
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
},
methods:{ methods:{
show_add(){ show_add(){
console.log(this.show) console.log(this.show)
this.show = !this.show this.show = !this.show
} },
//
changes() {
let that = this;
that.show_two = false;
console.log(that.arres_list);
},
// checkbox
checkboxChange(e) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
}else{
this.delarr(id)
}
console.log(this.arres_list)
},
//
delarr(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.remove(id);
}
},
//
pushes(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.push(id);
}
},
}, },
components: { components: {
} }
} }
</script> </script>
@ -62,6 +141,125 @@
#release{ #release{
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
.show_two {
padding: 30rpx 0 70rpx 0;
}
.scroll {
width: 100%;
height: 400px;
}
.u-button {
background: #ff780f;
width: 690rpx;
height: 98rpx;
line-height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49px;
font-size: 36rpx;
color: #ffffff;
text-align: center;
margin: 0 auto 20rpx;
}
.show_two .title {
width: 100%;
border-bottom: solid 1px #ececec;
margin-bottom: 30rpx;
}
.show_two .title > text {
font-size: 30rpx;
padding: 30rpx;
display: block;
}
.show_two > view {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
}
.List_tosign {
overflow: hidden;
zoom: 1;
margin-top: 21rpx;
position: relative;
}
.List_tosign > view {
float: left;
}
.List_tosign > view:nth-child(1) {
width: 180rpx;
height: 160rpx;
margin-bottom: 30rpx;
image {
border-radius: 15rpx;
width: 100%;
height: 100%;
}
}
.List_tosign > view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
}
.List_tosign > view:nth-child(3) {
width: 26rpx;
height: 27rpx;
position: absolute;
top: 0;
right: 0;
bottom: 0;
margin: auto;
image {
width: 100%;
height: 100%;
display: block;
}
}
.listes_shoping {
overflow: hidden;
zoom: 1;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.listes_shoping > view {
float: left;
}
.listes_shoping > view:nth-child(1) {
width: 36rpx;
height: 36rpx;
margin-top: 62rpx;
margin-left: 30rpx;
}
.listes_shoping > view:nth-child(2) {
width: 180rpx;
height: 160rpx;
margin: 0 31rpx 0 19rpx;
}
.listes_shoping > view:nth-child(2) image {
width: 100%;
}
.listes_shoping > view:nth-child(3) {
width: 425rpx;
margin-top: 43rpx;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.form-view{ .form-view{
background:rgba(255,120,15,1); background:rgba(255,120,15,1);
border-radius:6rpx; border-radius:6rpx;

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="complaint"> <view class="complaint">
<view class="complaint-item" v-for="(item, index) in 4" :key="index" @click="toDetailsPage"> <view class="complaint-item" v-for="(item, index) in list" :key="index" @click="toDetailsPage(item.complain_id)">
<ComplaintItem></ComplaintItem> <ComplaintItem :info="item"></ComplaintItem>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
@ -10,15 +10,38 @@
import ComplaintItem from '@/components/complaint-item/index' import ComplaintItem from '@/components/complaint-item/index'
export default { export default {
data() { data() {
return {} return {
list:[]
}
}, },
components: { components: {
ComplaintItem ComplaintItem
}, },
onLoad() {
this.getlist()
},
methods: { 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({ uni.navigateTo({
url: '/pages/user/complaintDetails' url: '/pages/user/complaintDetails?id='+id
}); });
} }
}, },

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="details"> <view class="details">
<view class="goods-info"> <view class="goods-info">
<image></image> <image :src="info.complain_goods_image"></image>
<view class="text"> <view class="text">
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款dlk...</view> <view class="name u-line-1">{{info.complain_goods_name}}</view>
<view class="num">件商品</view> <view class="num">{{info.complain_goods_num}}件商品</view>
</view> </view>
</view> </view>
<view class="worker-info"> <view class="worker-info">
@ -12,21 +12,21 @@
<view class="item"> <view class="item">
<view> <view>
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="value">李先生</view> <view class="value">{{info.takeawayer_name}}</view>
</view> </view>
<view> <view>
<view class="item-title">手机号</view> <view class="item-title">手机号</view>
<view class="value">1561</view> <view class="value">{{info.takeawayer_mobile}}</view>
</view> </view>
<view> <view>
<view class="item-title">公司名称</view> <view class="item-title">公司名称</view>
<view class="value">申通快递公司</view> <view class="value">{{info.company}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="reason"> <view class="reason">
<view class="title">投诉原因</view> <view class="title">投诉原因</view>
<view class="value u-line-4">太慢了太慢了</view> <view class="value u-line-4">{{info.complain_desc}}</view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
@ -34,7 +34,29 @@
<script> <script>
export default { export default {
data() { 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> </script>

View File

@ -70,8 +70,7 @@ export default {
this.$u.api.articlelist({ this.$u.api.articlelist({
type: that.type, type: that.type,
page: that.num page: that.num
}) }).then(res => {
.then(res => {
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
@ -101,8 +100,7 @@ export default {
that.show = false; that.show = false;
this.$u.api.delarticle({ this.$u.api.delarticle({
article_id: that.delid article_id: that.delid
}) }).then(res => {
.then(res => {
console.log(res) console.log(res)
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -115,6 +113,7 @@ export default {
type: 'success' type: 'success'
}); });
// //
this.delid = null
this.newlist = []; this.newlist = [];
that.num=1 that.num=1
that.getlist() that.getlist()

View File

@ -1,41 +1,51 @@
<template> <template>
<view class="details"> <view class="details">
<view class="main"></view> <view class="main">
<view></view> <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 class="data-list">
<view> <view>
<image src="/static/image/user/2.png"></image> <image src="/static/image/user/2.png"></image>
<text>2.5w</text> <text>{{ info.comment_num }}</text>
</view> </view>
<view> <view>
<image src="/static/image/user/3.png" v-if="0"></image> <image src="/static/image/user/3.png" v-if="0"></image>
<image src="/static/image/user/7.png" v-else></image> <image src="/static/image/user/7.png" v-else></image>
<text>2.5w</text> <text>{{ info.collect_num }}</text>
</view> </view>
<view> <view>
<image src="/static/image/user/4.png" v-if="0"></image> <image src="/static/image/user/4.png" v-if="0"></image>
<image src="/static/image/user/6.png" v-else></image> <image src="/static/image/user/6.png" v-else></image>
<text>2.5w</text> <text>{{ info.like_num }}</text>
</view> </view>
</view> </view>
<view class="comment-list"> <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"> <view class="info">
<image></image> <image></image>
<view class="center"> <view class="center">
<view class="name">用户1</view> <view class="name">{{item.member_nickname}}</view>
<view class="time">6小时前</view> <view class="time">{{item.create_time}}</view>
</view> </view>
<view class="btn" @click="showChat=true">回复</view> <view class="btn" @click="showreply(item.id)">回复</view>
</view> </view>
<view class="content u-line-1">德铭阳光赞德铭阳光赞德铭阳光赞</view> <view class="content u-line-1">{{item.content}}</view>
</view> </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="chat">
<view class="input-box"> <view class="input-box">
<input type="text"> <input type="text" v-model="content"/>
<view class="btn">发送</view> <view class="btn" @click="reply">发送</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
@ -46,33 +56,124 @@
export default { export default {
data() { data() {
return { return {
showChat: false showChat: false,
} id: 0,
info: {
article_image: []
},
type:1,
content:"",
pid:null
};
}, },
onLoad(option) { onLoad(option) {
this.setNavTitle(option.current); this.setNavTitle(option.current);
this.type = option.current
this.id = option.id;
this.getdetail();
}, },
methods: { 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) { setNavTitle(current) {
uni.setNavigationBarTitle({ 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.details { .details {
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background-color: #ECECEC; background-color: #ececec;
.main { .main {
height: 740rpx; margin: 2rpx 0rpx 0;
margin: 2rpx 0rpx; 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; background-color: #FFFFFF;
image {
width: 210rpx;
height: 210rpx;
margin: 10rpx 15rpx;
}
video {
width: 210rpx;
height: 210rpx;
margin: 10rpx 15rpx;
}
} }
.comment-list { .comment-list {
.item { .item {
background-color: #FFFFFF; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
margin-bottom: 2rpx; margin-bottom: 2rpx;
.info { .info {
@ -90,17 +191,17 @@ export default {
margin-right: auto; margin-right: auto;
.name { .name {
font-size: 26rpx; font-size: 26rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
margin-bottom: auto; margin-bottom: auto;
} }
.time { .time {
font-size: 22rpx; font-size: 22rpx;
color: rgba(153,153,153,1); color: rgba(153, 153, 153, 1);
} }
} }
.btn { .btn {
font-size: 26rpx; font-size: 26rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
} }
} }
.content { .content {
@ -110,7 +211,7 @@ export default {
} }
} }
.data-list { .data-list {
background-color: #FFFFFF; background-color: #ffffff;
display: flex; display: flex;
height: 88rpx; height: 88rpx;
padding: 0 30rpx; padding: 0 30rpx;
@ -137,20 +238,20 @@ export default {
} }
> text { > text {
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
} }
} }
} }
.chat { .chat {
background-color: #ECECEC; background-color: #ececec;
width: 100%; width: 100%;
height: 98rpx; height: 98rpx;
padding: 19rpx 30rpx; padding: 19rpx 30rpx;
.input-box { .input-box {
background-color: #FFFFFF; background-color: #ffffff;
width: 690rpx; width: 690rpx;
height: 60rpx; height: 60rpx;
background: rgba(255,255,255,1); background: rgba(255, 255, 255, 1);
border-radius: 30rpx; border-radius: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -160,10 +261,10 @@ export default {
} }
.btn { .btn {
width: 90rpx; width: 90rpx;
background: rgba(255,120,15,1); background: rgba(255, 120, 15, 1);
border-radius: 25rpx; border-radius: 25rpx;
font-size: 26rpx; font-size: 26rpx;
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
line-height: 50rpx; line-height: 50rpx;
text-align: center; text-align: center;
margin-right: 5rpx; margin-right: 5rpx;
@ -171,4 +272,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@ -37,8 +37,7 @@ export default {
methods:{ methods:{
fans(){ fans(){
let that = this; let that = this;
this.$u.api.myfanlist({ this.$u.api.myfanlist({}).then(res => {
}).then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({

View File

@ -41,8 +41,7 @@ export default {
// //
getmyinfo(){ getmyinfo(){
let that = this; let that = this;
this.$u.api.getshopinfo({ this.$u.api.getshopinfo({}).then(res => {
}).then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -82,7 +81,6 @@ export default {
width: 110rpx; width: 110rpx;
height: 110rpx; height: 110rpx;
border-radius: 50%; border-radius: 50%;
background-color: #0f0;
} }
.name{ .name{
font-size: 24rpx; font-size: 24rpx;

View File

@ -58,8 +58,7 @@ export default {
// //
getmyinfo(){ getmyinfo(){
let that = this; let that = this;
this.$u.api.getshopinfo({ this.$u.api.getshopinfo({}).then(res => {
}).then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({

View File

@ -89,9 +89,35 @@ export default {
}, },
// //
navto(url) { 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}`
});
}
} }
}, },
} }