Merge pull request 'cmx' (#15) from cmx into master

Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/15
This commit is contained in:
cmx 2020-07-30 19:52:16 +08:00
commit f6e4562ce2
18 changed files with 1529 additions and 880 deletions

View File

@ -23,38 +23,78 @@ const install = (Vue, vm) => {
return vm.$u.post("Streaming/liveStreamList")
},
// 获取订单列表
getorderlist(){
return vm.$u.get("/Order/orderList")
getorderlist({type,page}){
return vm.$u.get("/Order/orderList",{type,page})
},
// 获取试穿订单列表
getshiftlist(){
return vm.$u.get("/order/goodsTryOrderList")
},
// 获取轮播图列表
getswiper(){
return vm.$u.get("/Order/orderList")
},
// 商家登陆
shoplogin(obj){
return vm.$u.get("/Login/storeLogin",obj)
shoplogin({member_name,member_password}){
return vm.$u.get("/Login/storeLogin",{member_name,member_password})
},
// 获取个人信息
getshopinfo(obj){
return vm.$u.post("/member/memberInfo",obj)
getshopinfo(){
return vm.$u.post("/member/memberInfo")
},
// 获取粉丝列表
myfanlist(obj){
return vm.$u.post("/member/myFansList",obj)
},
// 商家登陆
getshopinfo(obj){
return vm.$u.post("/member/memberInfo",obj)
myfanlist(){
return vm.$u.post("/member/myFansList")
},
// 修改个人信息
changeinfo(obj){
return vm.$u.post("/Member/changeMemberInfo",obj)
changeinfo({nickname,avatar,signature}){
return vm.$u.post("/Member/changeMemberInfo",{nickname,avatar,signature})
},
// 获取内容列表
articlelist(obj){
return vm.$u.post("/Article/articleList",obj)
articlelist({type,page}){
return vm.$u.post("/Article/articleList",{type,page})
},
// 删除文章
delarticle({article_id}){
return vm.$u.post("/article/articleDelete",{article_id})
},
// 骑手列表
takeawayerlist(){
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 = api;

View File

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

View File

@ -1,7 +1,7 @@
<template>
<view class="content-item">
<view class="image">
<image class="cover" :src="info.article_pic"></image>
<image class="cover" :src="info.article_pic" alt="没有图片"></image>
<image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
</view>
<view class="right" >
@ -50,7 +50,7 @@ export default {
},
toDetailsPage() {
uni.navigateTo({
url: '/pages/user/contentDetails?current=' + this.cur
url: '/pages/user/contentDetails?current=' + this.type+'&id=' + this.info.article_id
});
}
},
@ -69,7 +69,7 @@ export default {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
background-color: aqua;
// background-color: aqua;
flex-shrink: 0;
}
.play-icon {

View File

@ -1,12 +1,17 @@
<template>
<view class="item" @click="toDetailsPage">
<image></image>
<image :src="info.extend_order_goods[0].goods_image"></image>
<view class="goods">
<view class="">
<view class="box">
<view class="">
编号{{info.order_sn}}
</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 class="name u-line-1">{{info.extend_order_goods[0].goods_name}}</view>
@ -28,9 +33,8 @@ export default {
},
methods: {
toDetailsPage() {
console.log(this.info)
uni.navigateTo({
url: '/pages/index/details?current=' + this.cur
url: '/pages/index/details?id=' + this.info.order_id
});
},
},
@ -51,16 +55,22 @@ export default {
height: 160rpx;
flex-shrink: 0;
margin-right: 25rpx;
background-color: aqua;
}
.goods {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.box{
width: 100%;
display: flex;
justify-content: space-between;
font-size: 24rpx;
}
.status {
width: 120rpx;
align-self: flex-end;
font-size: 26rpx;
font-size: 24rpx;
color: rgba(255,49,49,1);
margin-bottom: 30rpx;
}

View File

@ -0,0 +1,87 @@
<template>
<view class="item" @click="toDetailsPage">
<image :src="info.goods_pic"></image>
<view class="goods">
<view class="">
<!-- 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 class="name u-line-1">{{info.goods_name}}</view>
<view class="info">
<view class="num">{{info.goods_try_num}}件商品</view>
<view class="price">实付<span>{{info.price}}</span></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
cur: [Number, String],
info: Object
},
methods: {
toDetailsPage() {
uni.navigateTo({
url: '/pages/index/details?id=' + this.info.order_id
});
},
},
};
</script>
<style lang="scss" scoped>
.item {
margin: 0 auto 20rpx;
width: 690rpx;
height: 220rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
padding: 30rpx;
display: flex;
align-items: center;
> image {
width: 160rpx;
height: 160rpx;
flex-shrink: 0;
margin-right: 25rpx;
}
.goods {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.status {
align-self: flex-end;
font-size: 26rpx;
color: rgba(255,49,49,1);
margin-bottom: 30rpx;
}
.name {
width: 439rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
margin-bottom: 30rpx;
}
.info {
width: 100%;
display: flex;
align-items: center;
font-size: 26rpx;
color: rgba(102,102,102,1);
.price {
margin-left: 10rpx;
> span {
color: #FF780F;
}
}
}
}
}
</style>

View File

@ -81,6 +81,7 @@
<view class="determine">确定</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>

View File

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

View File

@ -15,6 +15,7 @@
<view class="content">{{item.content}}</view>
<view class="times">{{item.time}}</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>

View File

@ -1,370 +1,357 @@
<template>
<view id="release">
<u-form :model="form" ref="uForm">
<u-form-item label="标题" label-position="right">
<u-input v-model="form.name" placeholder="请输入标题" />
</u-form-item>
<u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
<view class="titles">图片</view>
<u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList"></u-upload>
<!-- 标签 -->
<view>
<view class="titles">标签</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 class="titles">简介</view>
<view class="titles_border">
<textarea placeholder="请输入内容..."></textarea>
</view>
<view class="titles_border"><textarea placeholder="请输入内容..."></textarea></view>
<!-- 底部弹框 商品选择 -->
<view class="show_two">
<u-popup v-model="show_two" mode="bottom" :closeable="true">
<view class="title">
<text>选择商品</text>
</view>
<view class="title"><text>选择商品</text></view>
<!-- 商品列表 -->
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view>
<u-checkbox-group @change="checkboxGroupChange">
<u-checkbox @change="checkboxChange" shape="circle" active-color="#FF780F" v-model="item.checked" :name="item.id"></u-checkbox>
</u-checkbox-group>
<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>
<view>
<image :src="item.url" mode="widthFix"></image>
</view>
<view class="contentes">{{item.content}}</view>
</view>
</scroll-view>
<!-- 提交按钮 -->
<view class="u-button" @click="changes()">确定</view>
</u-popup>
<!-- 底部选择商品列表 -->
<view @click="show_two = true">选择商品
<view @click="show_two = true">
选择商品
<image class="images" src="../../static/image/tosign/bhottom.png"></image>
</view>
<!-- 选择后的列表 -->
<view class="List_tosign" v-if="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><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-form>
<!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14">
<view class="text">
创建属于你的标签吧
</view>
<view class="u-inputes">
<u-input v-model="form.name" />
</view>
<view class="text">创建属于你的标签吧</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-popup>
</view>
</template>
<script>
export default {
data() {
return {
form: {
name: '',
intro: '',
sex: ''
},
// 使
action: 'http://www.example.com/upload',
fileList: [],
fileListes: ["美妆", "博主穿搭", "美妆", "美妆", "美妆", "美妆", "美妆", "博主穿搭"],
show: false,
show_two: false,
filesList: [],
arres_list : [],
checked: false,
list: [{
name: 'apple',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装装领连衣裙夏季装领连衣裙夏季装领连衣裙夏季夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '1'
},
{
name: 'apple2',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '2'
},
{
name: 'appl3e',
checked: false,
disabled: false,
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
url: '../../static/image/tosign/tosigin(5).png',
id : '3'
},
],
List_tosign : []
export default {
data() {
return {
form: {
name: '',
intro: '',
sex: ''
},
// 使
action: 'http://www.example.com/upload',
fileList: [],
fileListes: ['美妆', '博主穿搭', '美妆', '美妆', '美妆', '美妆', '美妆', '博主穿搭'],
show: false,
show_two: false,
filesList: [],
arres_list: [],
checked: false,
list: [],
List_tosign: [],
scrollTop: 0
};
},
onLoad() {
//
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
//
this.tosign();
},
methods: {
changes() {
let that = this;
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) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
}else{
this.delarr(id)
}
console.log(this.arres_list)
},
onLoad(){
//
this.tosign()
},
methods: {
changes() {
let that = this;
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
}
//
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);
}
},
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>
<style lang="scss" scoped>
#release {
width: 690rpx;
margin: 0 auto;
#release {
width: 690rpx;
margin: 0 auto;
.form-view {
background: rgba(255, 120, 15, 1);
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
padding: 8rpx 20rpx;
display: inline-block;
margin-bottom: 28rpx;
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;
}
.form-view {
background: rgba(255, 120, 15, 1);
border-radius: 6rpx;
margin-right: 20rpx;
font-size: 24rpx;
padding: 8rpx 20rpx;
display: inline-block;
margin-bottom: 28rpx;
color: #fff;
}
.u-mode-center-box {
padding: 120rpx;
.text {
font-size: 30rpx;
margin-top: 74rpx;
text-align: center;
font-weight: 500;
color: #333;
}
.scroll {
width: 100%;
height: 400px;
}
.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 {
.titles {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
margin: 30rpx 0;
}
.show_two .images {
width: 22rpx;
height: 12rpx;
float: right;
top: 14rpx;
textarea {
font-size: 26rpx;
}
.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;
zoom: 1;
margin-top: 21rpx;
margin-bottom: 30rpx;
height: 160rpx;
position: relative;
}
.List_tosign > view{
.listes_shoping > view {
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;
height: 160rpx;
margin-bottom: 30rpx;
image{
border-radius: 15rpx;
width: 100%;
height: 100%;
}
margin: 0 31rpx 0 19rpx;
}
.List_tosign> view:nth-child(2) {
width: 420rpx;
height: 76rpx;
margin: 43rpx 43rpx 0 21rpx;
.listes_shoping > view:nth-child(2) image {
width: 100%;
}
.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 > 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;
}
}
.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>

View File

@ -15,6 +15,37 @@
<!-- 简介 -->
<view class="titles">正文</view>
<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-form>
@ -44,17 +75,65 @@
action: 'http://www.example.com/upload',
fileList: [],
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:{
show_add(){
console.log(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: {
}
}
}
</script>
@ -62,6 +141,125 @@
#release{
width: 690rpx;
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{
background:rgba(255,120,15,1);
border-radius:6rpx;

View File

@ -1,23 +1,47 @@
<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>
</template>
<script>
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
});
}
},

View File

@ -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,28 +12,51 @@
<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>
</template>
<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>

View File

@ -1,132 +1,167 @@
<template>
<view class="content">
<view class="tab-swiper">
<u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" active-color="#FF780F" inactive-color="#333333" font-size="30" gutter="317" height="98" :show-bar="false" swiperWidth="750" :is-scroll="false"></u-tabs-swiper>
<u-tabs-swiper
ref="uTabs"
:list="list"
:current="current"
@change="tabsChange"
active-color="#FF780F"
inactive-color="#333333"
font-size="30"
gutter="317"
height="98"
:show-bar="false"
swiperWidth="750"
:is-scroll="false"
></u-tabs-swiper>
</view>
<view class="box">
<view v-for="(item, index) in newlist" :key="index"><ContentItem :info="item" :type="type" @del="del"></ContentItem></view>
</view>
<swiper :current="swiperCurrent" >
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" class="list">
<view v-for="(item, index) in newlist" :key="index">
<ContentItem :info="item" :type="type" del="del"></ContentItem>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" class="video-list">
<view v-for="(item, index) in newlist" :key="index">
<ContentItem :info="item" :type="type" @del="del"></ContentItem>
</view>
</scroll-view>
</swiper-item>
</swiper>
<u-popup v-model="show" mode="center">
<view class="close-popup">
<view class="tips">确定要删除该视频吗</view>
<view class="tips">{{msg}}</view>
<view class="btn">
<view class="cancel" @click="show=false">取消</view>
<view class="confirm">确定</view>
<view class="cancel" @click="show = false">取消</view>
<view class="confirm" @click="delarticle">确定</view>
</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
import ContentItem from '@/components/content-item/index'
import ContentItem from '@/components/content-item/index';
export default {
data() {
return {
show: false,
current: 0,
swiperCurrent: 0,
list: [{
name: '图文'
}, {
name: '视频'
}],
type:1,
num:1,
newlist:[]
}
list: [
{
name: '图文'
},
{
name: '视频'
}
],
type: 1,
num: 1,
newlist: [],
delid:null,
msg:""
};
},
components: {
ContentItem
},
onLoad() {
this.getlist()
this.getlist();
},
onReachBottom() {
this.num++
this.getlist()
this.num++;
this.getlist();
},
methods: {
getlist(){
getlist() {
let that = this;
this.$u.api.articlelist({
type:that.type,
page:that.num
type: that.type,
page: that.num
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
let arr = res.data.articleList
for(let index in arr){
that.newlist.push(arr[index])
let arr = res.data.articleList;
for (let index in arr) {
that.newlist.push(arr[index]);
}
}
});
},
del(e) {
//
this.show=true
console.log(e)
//
if(this.type==1){
this.msg="确定要删除该图文吗?"
}else{
this.msg="确定要删除该视频吗?"
}
this.show = true;
this.delid = e
},
//
delarticle(){
let that = this;
that.show = false;
this.$u.api.delarticle({
article_id: that.delid
}).then(res => {
console.log(res)
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
//
this.delid = null
this.newlist = [];
that.num=1
that.getlist()
}
});
},
tabsChange(index) {
this.swiperCurrent = index;
this.type=index+1;
this.num=0
this.newlist=[]
this.getlist()
},
animationfinish(e) {
console.log(12345666)
let current = e.detail.current;
this.swiperCurrent = current;
this.current = current;
this.type=current+1;
},
},
this.current = index;
this.type = index + 1;
this.num = 0;
this.newlist = [];
this.getlist();
}
}
};
</script>
<style lang="scss" scoped>
.tab-swiper {
width: 100%;
position: fixed;
top: 0;
margin-bottom: 20rpx;
z-index: 1000;
}
.content {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
background-color: #ececec;
display: flex;
flex-direction: column;
> uni-swiper {
flex: 1;
}
.tab-swiper {
margin: 2rpx 0 20rpx 0;
.box{
padding-top: 120rpx;
}
.close-popup {
background:rgba(255,255,255,1);
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
.tips {
width: 420rpx;
font-size: 28rpx;
color: rgba(102,102,102,1);
color: rgba(102, 102, 102, 1);
text-align: center;
padding: 38rpx 0;
}
.btn {
width: 420rpx;
border-top: 2rpx #ECECEC solid;
border-top: 2rpx #ececec solid;
display: flex;
> view {
font-size: 26rpx;
@ -136,12 +171,12 @@ export default {
}
.cancel {
color: #333333;
border-right: 2rpx #ECECEC solid;
border-right: 2rpx #ececec solid;
}
.confirm {
color: #FF780F;
color: #ff780f;
}
}
}
}
</style>
</style>

View File

@ -1,77 +1,179 @@
<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>
<u-toast ref="uToast" />
</view>
</template>
<script>
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 {
@ -89,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 {
@ -109,7 +211,7 @@ export default {
}
}
.data-list {
background-color: #FFFFFF;
background-color: #ffffff;
display: flex;
height: 88rpx;
padding: 0 30rpx;
@ -136,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;
@ -159,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;
@ -170,4 +272,4 @@ export default {
}
}
}
</style>
</style>

View File

@ -3,7 +3,7 @@
<view class="lately">
<view class="title">最新</view>
<view class="items">
<view v-for="(item, index) in myfans" :key="index">
<view v-for="(item, index) in newfans" :key="index">
<FansItem :info="item"></FansItem>
</view>
</view>
@ -11,11 +11,12 @@
<view class="before">
<view class="title">早前</view>
<view class="items">
<view v-for="(item, index) in newfans" :key="index">
<view v-for="(item, index) in myfans" :key="index">
<FansItem :info="item"></FansItem>
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
@ -36,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({

View File

@ -23,6 +23,7 @@
<text>骑手投诉</text>
<image src="/static/image/user/1.png"></image>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
@ -40,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({
@ -81,7 +81,6 @@ export default {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #0f0;
}
.name{
font-size: 24rpx;

View File

@ -6,11 +6,11 @@
</view>
<view class="item">
<text class="title">用户名</text>
<input type="text" :value="info.member_nickname==null?'新用户':info.member_nickname" />
<input type="text" value="" v-model="info.member_nickname" placeholder="请输入用户名"/>
</view>
<view class="item">
<text class="title">个性签名</text>
<input type="text" :value="info.signature==''?'该用户很懒没有签名!':info.signature" />
<input type="text" value="" v-model="info.signature" placeholder="请输入个性签名"/>
</view>
<view class="password" @click="updatePwd">
<text>修改密码</text>
@ -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({

View File

@ -42,6 +42,7 @@
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
@ -88,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}`
});
}
}
},
}