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") 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(){
return vm.$u.get("/order/goodsTryOrderList")
}, },
// 获取轮播图列表 // 获取轮播图列表
getswiper(){ getswiper(){
return vm.$u.get("/Order/orderList") return vm.$u.get("/Order/orderList")
}, },
// 商家登陆 // 商家登陆
shoplogin(obj){ shoplogin({member_name,member_password}){
return vm.$u.get("/Login/storeLogin",obj) return vm.$u.get("/Login/storeLogin",{member_name,member_password})
}, },
// 获取个人信息 // 获取个人信息
getshopinfo(obj){ getshopinfo(){
return vm.$u.post("/member/memberInfo",obj) return vm.$u.post("/member/memberInfo")
}, },
// 获取粉丝列表 // 获取粉丝列表
myfanlist(obj){ myfanlist(){
return vm.$u.post("/member/myFansList",obj) return vm.$u.post("/member/myFansList")
},
// 商家登陆
getshopinfo(obj){
return vm.$u.post("/member/memberInfo",obj)
}, },
// 修改个人信息 // 修改个人信息
changeinfo(obj){ changeinfo({nickname,avatar,signature}){
return vm.$u.post("/Member/changeMemberInfo",obj) return vm.$u.post("/Member/changeMemberInfo",{nickname,avatar,signature})
}, },
// 获取内容列表 // 获取内容列表
articlelist(obj){ articlelist({type,page}){
return vm.$u.post("/Article/articleList",obj) 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(因为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

@ -1,7 +1,7 @@
<template> <template>
<view class="content-item"> <view class="content-item">
<view class="image"> <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> <image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
</view> </view>
<view class="right" > <view class="right" >
@ -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
}); });
} }
}, },
@ -69,7 +69,7 @@ export default {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: aqua; // background-color: aqua;
flex-shrink: 0; flex-shrink: 0;
} }
.play-icon { .play-icon {

View File

@ -1,12 +1,17 @@
<template> <template>
<view class="item" @click="toDetailsPage"> <view class="item" @click="toDetailsPage">
<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>
@ -28,9 +33,8 @@ export default {
}, },
methods: { methods: {
toDetailsPage() { toDetailsPage() {
console.log(this.info)
uni.navigateTo({ 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; 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

@ -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 class="determine">确定</view>
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>

View File

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

View File

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

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,23 +1,47 @@
<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" />
</view> </view>
</template> </template>
<script> <script>
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,28 +12,51 @@
<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" />
</view> </view>
</template> </template>
<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

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

View File

@ -1,77 +1,179 @@
<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>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
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 {
@ -89,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 {
@ -109,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;
@ -136,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;
@ -159,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;
@ -170,4 +272,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@ -3,7 +3,7 @@
<view class="lately"> <view class="lately">
<view class="title">最新</view> <view class="title">最新</view>
<view class="items"> <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> <FansItem :info="item"></FansItem>
</view> </view>
</view> </view>
@ -11,11 +11,12 @@
<view class="before"> <view class="before">
<view class="title">早前</view> <view class="title">早前</view>
<view class="items"> <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> <FansItem :info="item"></FansItem>
</view> </view>
</view> </view>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@ -36,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

@ -23,6 +23,7 @@
<text>骑手投诉</text> <text>骑手投诉</text>
<image src="/static/image/user/1.png"></image> <image src="/static/image/user/1.png"></image>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@ -40,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({
@ -81,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

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

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