cmx #21

Merged
cmx merged 4 commits from cmx into master 2020-08-05 12:11:37 +00:00
10 changed files with 1240 additions and 244 deletions

View File

@ -97,6 +97,44 @@ const install = (Vue, vm) => {
canselectgood(){ canselectgood(){
return vm.$u.post("/article/getStoreGoodsList") return vm.$u.post("/article/getStoreGoodsList")
}, },
// 发布图文
publishphoto({article_title,article_content,article_pic,file_id,goods_id_arr,label_arr}){
return vm.$u.post("/article/publishImage",{article_title,article_content,article_pic,file_id,goods_id_arr,label_arr})
},
// 发布视频
publishvideo({article_title,article_content,article_pic,video_path,goods_id_arr,label_arr}){
return vm.$u.post("/article/publishVideo",{article_title,article_content,article_pic,video_path,goods_id_arr,label_arr})
},
// 订单详情
orderdetail({order_id}){
return vm.$u.post("/Order/orderInfo",{order_id})
},
// 试穿订单详情
testorderdetail({goods_try_id}){
return vm.$u.post("/order/goodsTryOrderInfo",{goods_try_id})
},
// 绑定物流订单
bindpushid({order_id,shipping_code,shipping_express_id}){
return vm.$u.post("/order/send",{order_id,shipping_code,shipping_express_id})
},
// 绑定骑手
bindcarer({order_id,takeawayer_id}){
return vm.$u.post("/order/orderRider",{order_id,takeawayer_id})
},
// 发货物流公司
pushcompany(){
return vm.$u.post("/order/getExpress")
},
// 退款退货
refund({refund_id,seller_state,seller_message}){
return vm.$u.post("/order/editRefund",{refund_id,seller_state,seller_message})
},
// 试穿
agreetest({goods_try_id,type,takeawayer_id}){
return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
}
} }
// 将各个定义的接口名称统一放进对象挂载到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

@ -6,14 +6,14 @@
<view class=""> <view class="">
编号{{info.order_sn}} 编号{{info.order_sn}}
</view> </view>
<!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 --> <!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 6拒绝退款 -->
<view class="status" v-if="info.view_type==1">待处理订单</view> <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==2">已发货订单</view>
<view class="status" v-else-if="info.view_type==3">已完成订单</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==4">申请退款订单</view>
<view class="status" v-else-if="info.view_type==5">已退款订单</view> <view class="status" v-else-if="info.view_type==5">已退款订单</view>
<view class="status" v-else-if="info.view_type==6">拒绝退款订单</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>
<view class="info"> <view class="info">
<view class="num">{{info.extend_order_goods[0].goods_num}}件商品</view> <view class="num">{{info.extend_order_goods[0].goods_num}}件商品</view>
@ -34,7 +34,7 @@ export default {
methods: { methods: {
toDetailsPage() { toDetailsPage() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/details?id=' + this.info.order_id url: '/pages/index/details?id=' + this.info.order_id+"&type="+this.info.view_type
}); });
}, },
}, },

View File

@ -29,8 +29,19 @@ export default {
}, },
methods: { methods: {
toDetailsPage() { toDetailsPage() {
let type =0
let info = this.info
if(info.goods_try_order_status==0){
type=1
}else if(info.goods_try_order_status==20){
type=2
}else if(info.goods_try_order_status==40){
type=3
}else if(info.goods_try_order_status==50){
type=4
}
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/details?id=' + this.info.order_id url: '/pages/index/otherdetails?id=' + this.info.goods_try_id+"&type="+type
}); });
}, },
}, },

View File

@ -59,6 +59,17 @@
} }
} }
} }
},
{
"path": "pages/index/otherdetails",
"style": {
"navigationBarTitleText": "试穿订单详情",
"app-plus": {
"titleNView": {
"titleColor": "#333333"
}
}
}
}, },
{ {
"path": "pages/release/video", "path": "pages/release/video",

View File

@ -1,62 +1,70 @@
<template> <template>
<view class="details"> <view class="details">
<view class="goods-info"> <view class="goods-info">
<image></image> <image :src="info.extend_order_goods[0].goods_image"></image>
<view class="info-right"> <view class="info-right">
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view> <view class="name u-line-1">{{ info.extend_order_goods[0].goods_name }}</view>
<view class="info"> <view class="info">
<view class="num">共一件商品</view> <view class="num">{{ info.extend_order_goods[0].goods_num }}件商品</view>
<view class="price">实付<span>199.9</span></view> <view class="price">
实付
<span>{{ info.extend_order_goods[0].goods_pay_price }}</span>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="refunds-user" v-if="status==4 || status==5"> <view class="refunds-user" v-if="type == 2 || type == 3 || type == 4 || type == 5 || type == 6">
<view> <view>
<image src="/static/image/home/2.png"></image> <image src="/static/image/home/2.png"></image>
<view>李先生</view> <view>{{ info.extend_order_common.reciver_name }}</view>
</view> </view>
<view> <view>
<image src="/static/image/home/3.png"></image> <image src="/static/image/home/3.png"></image>
<view>123456789</view> <view>{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view> </view>
<view> <view>
<image src="/static/image/home/4.png"></image> <image src="/static/image/home/4.png"></image>
<view class="address u-line-1">山东省临沂市兰山区XX路XX小区XX楼xx单元</view> <view class="address u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view> </view>
</view> </view>
<view class="user-info" v-if="status == 1 || status == 2"> <view class="user-info" v-if="type == 1">
<view class="info-title">收件人信息</view> <view class="info-title">收件人信息</view>
<view class="info-container"> <view class="info-container">
<view> <view>
<view class="title">姓名</view> <view class="title">姓名</view>
<view class="value">李先生</view> <view class="value">{{ info.extend_order_common.reciver_name }}</view>
</view> </view>
<view> <view>
<view class="title">手机号</view> <view class="title">手机号</view>
<view class="value">123456789</view> <view class="value">{{ info.extend_order_common.reciver_info.mob_phone }}</view>
</view> </view>
<view> <view>
<view class="title">收货地址</view> <view class="title">收货地址</view>
<view class="value u-line-1">山东省临沂市兰山区XX路XX小区XX楼xx单元</view> <view class="value u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="delivery" v-if="status == 1 || status == 2"> <view class="delivery" v-if="type == 1">
<view class="title">派送方式</view> <view class="title">派送方式</view>
<view class="methods" v-if="status == 1"> <view class="methods">
<view :class="{active: cur==0}" @click="cur=0">人工送达</view> <view :class="{ active: cur == 0 }" @click="pushstyleA">快递</view>
<view :class="{active: cur==1}" @click="cur=1;showDelivery=true">指派外部骑手</view> <view :class="{ active: cur == 1 }" @click="pushstyleB">骑手</view>
</view> </view>
<view class="methods" v-if="status == 2"> <view class="btn" @click="confirmpushstyle">确认</view>
<view :class="{active: cur==0}" @click="cur=0;showExpress=true">快递</view> </view>
<view :class="{active: cur==1}" @click="cur=1;showDelivery=true">骑手</view> <view class="pushtimeline" v-if="type == 2">
<view class="timelinetitle">物流信息</view>
<view class="timelineid">订单单号:{{ info.order_sn }}</view>
<view class="timelinebox" v-for="list in info.express_list">
<view class="timelinecontent">{{list.content}}</view>
<view class="timelinetime">{{list.kd_time}}</view>
</view> </view>
<view class="btn">确认</view>
</view> </view>
<view class="refunds-option" v-if="status==5"> <view class="refunds-option" v-if="type == 4">
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view> <view :class="{ active: cur == 0 }" @click="unrefuse">不处理</view>
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view> <view :class="{ active: cur == 1 }" @click="refuse">确定处理</view>
</view> </view>
<view class="refund" v-if="type == 5 || type == 6">退款状态:{{ type == 5 ? '同意退款请注意查收' : '拒绝退款请等待客服联系' }}</view>
<u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup"> <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view> <view class="title">骑手信息</view>
<view class="input-info"> <view class="input-info">
@ -64,21 +72,39 @@
<input type="text" placeholder="请输入您的手机号" v-model="phone" /> <input type="text" placeholder="请输入您的手机号" v-model="phone" />
<input type="text" placeholder="请输入您的公司名称" v-model="company" /> <input type="text" placeholder="请输入您的公司名称" v-model="company" />
</view> </view>
<view class="btn">确认</view> <view class="btn" @click="showDelivery = false">确认</view>
</u-popup> </u-popup>
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
<!-- companylist -->
<u-picker
mode="selector"
v-model="showcompany"
:default-selector="[0]"
:range="companylist"
range-key="express_name"
@confirm="getselectcompany"
title="请选择公司"
confirm-text="下一步"
></u-picker>
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup"> <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
<view class="title">填写快递单号</view> <view class="title">填写快递单号</view>
<view class="input-info"> <view class="input-info"><input type="text" placeholder="请输入快递单号" v-model="pushid" /></view>
<input type="text" placeholder="请输入快递单号" v-model="express" /> <view class="btn" @click="showExpress = false">确认</view>
</view>
<view class="btn">确认</view>
</u-popup> </u-popup>
<u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup"> <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view> <view v-if="cur == 1" class="popup-tips">
<view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view> 确定处理
<br />
平台将进行退款
</view>
<view v-if="cur == 0" class="popup-tips">
确定不处理
<br />
平台将进行联系
</view>
<view class="popup-btn"> <view class="popup-btn">
<view class="cancel" @click="showRefunds=false">取消</view> <view class="cancel" @click="cancel">取消</view>
<view class="determine">确定</view> <view class="determine" @click="confirm">确定</view>
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
@ -88,22 +114,230 @@
export default { export default {
data() { data() {
return { return {
status: Number, // status: 1, //
cur: Number, cur: Number,
showDelivery: false, // showDelivery: false, //
showExpress: false, // showExpress: false, //
showRefunds: false, // 退 showRefunds: false, // 退
showcompany: false, // 退
companylist: [],
show: false, //
name: '', name: '',
phone: '', phone: '',
company: '', company: '',
express: '' express: '',
} type: '',
orderid: 0,
info: {},
list: [],
pushid: null,
pushstate: false, //
selctcar: null, //
companyidA: null, //id
companyidB: null //id
};
}, },
onLoad(option) { onLoad(option) {
this.status = option.current; this.type = option.type;
this.orderid = option.id;
this.resetinfo();
if (this.type == 1) {
this.getcompanyinfo();
}
if (this.type == 2) {
this.getcarinfo();
}
// 0: 1 2 3 4退/退 5退/退 6退/退
}, },
methods: { methods: {
}, //
pushstyleA() {
this.cur = 0;
this.showcompany = true;
},
//
pushstyleB() {
this.cur = 1;
this.show = true;
},
//
getcompanyinfo() {
let that = this;
this.$u.api.pushcompany({}).then(res => {
if (res.errCode != 0) {
} else {
that.companylist = res.data;
}
});
},
// 退
cancel() {
this.showRefunds = false;
// cur
},
//
confirm() {
this.showRefunds = false;
if (this.cur == 0) {
// 退
return;
this.$u.api.refund({
refund_id: this.orderid,
seller_state:2,
seller_message:""
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
console.log(res);
}
});
} else {
// 退
return;
this.$u.api.refund({
refund_id: this.orderid,
seller_state:3,
seller_message:""
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
console.log(res);
}
});
}
},
// 退
refuse() {
this.cur = 1;
this.showRefunds = true;
},
// 退
unrefuse() {
this.cur = 0;
this.showRefunds = true;
},
//
getcarinfo() {
this.$u.api.getpushinfo({
order_id: this.orderid
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
console.log(res);
}
});
},
//
getselectcompany(e) {
let obj = this.companylist[e[0]];
this.companyidA = obj.express_id;
this.showExpress = true;
},
//
confirmpushstyle() {
if (this.cur == 0) {
console.log(this.pushid);
this.$u.api.bindpushid({
order_id: this.orderid,
shipping_code: this.pushid,
shipping_express_id: this.companyidA
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
uni.navigateBack({
delta: 1
});
}
});
} else {
this.$u.api.bindcarer({
order_id: this.orderid,
takeawayer_id: this.selctcar.takeawayer_id
}).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'
});
}
});
}
},
//
getselect(e) {
this.selctcar = this.list[e[0]];
},
//
resetinfo() {
this.$u.api.orderdetail({
order_id: this.orderid
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data;
}
});
this.$u.api.takeawayerlist({}).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) {
arr[index].content = arr[index].company_name + '——' + arr[index].contacts + '——' + arr[index].contact_number;
}
this.list = arr;
}
});
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -111,9 +345,9 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background-color: #ECECEC; background-color: #ececec;
.goods-info { .goods-info {
background-color: #FFFFFF; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -124,13 +358,12 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 26rpx; margin-right: 26rpx;
background-color: aqua;
} }
.info-right { .info-right {
.name { .name {
width: 439rpx; width: 439rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.info { .info {
@ -138,19 +371,19 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 26rpx; font-size: 26rpx;
color: rgba(102,102,102,1); color: rgba(102, 102, 102, 1);
.price { .price {
margin-left: 10rpx; margin-left: 10rpx;
> span { > span {
color: #FF780F; color: #ff780f;
} }
} }
} }
} }
} }
.refunds-user { .refunds-user {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
> view { > view {
display: flex; display: flex;
@ -177,7 +410,7 @@ export default {
} }
> view { > view {
font-size: 26rpx; font-size: 26rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
} }
} }
} }
@ -185,23 +418,23 @@ export default {
.info-title { .info-title {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
height: 88rpx; height: 88rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 2rpx; margin-bottom: 2rpx;
padding: 30rpx; padding: 30rpx;
} }
.info-container { .info-container {
padding: 0 30rpx; padding: 0 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
> view { > view {
height: 88rpx; height: 88rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
&:not(:last-child) { &:not(:last-child) {
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
.title { .title {
width: 150rpx; width: 150rpx;
@ -216,13 +449,13 @@ export default {
} }
.delivery { .delivery {
flex: 1; flex: 1;
background-color: #FFFFFF; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.methods { .methods {
@ -230,11 +463,11 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
> view { > view {
font-size: 30rpx; font-size: 30rpx;
color: rgba(0,0,51,1); color: rgba(0, 0, 51, 1);
width: 335rpx; width: 335rpx;
height: 80rpx; height: 80rpx;
border: 1rpx solid rgba(236,236,236,1); border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236,236,236,1); background: rgba(236, 236, 236, 1);
border-radius: 6rpx; border-radius: 6rpx;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
@ -244,9 +477,9 @@ export default {
} }
} }
.active { .active {
border: 1rpx solid #FF780F; border: 1rpx solid #ff780f;
color: #FF780F; color: #ff780f;
background: #FFF1E6; background: #fff1e6;
} }
} }
.btn { .btn {
@ -256,35 +489,74 @@ export default {
transform: translate(-50%, 0); transform: translate(-50%, 0);
width: 690rpx; width: 690rpx;
height: 98rpx; height: 98rpx;
background: rgba(255,120,15,1); background: rgba(255, 120, 15, 1);
border-radius: 49rpx; border-radius: 49rpx;
font-size: 36rpx; font-size: 36rpx;
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
text-align: center; text-align: center;
line-height: 98rpx; line-height: 98rpx;
} }
} }
.pushtimeline {
width: 100%;
padding: 0 30rpx;
background-color: #ffffff;
.timelinetitle {
margin-top: 20rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
}
.timelineid {
min-height: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: rgba(102, 102, 102, 1);
}
.timelinebox {
margin: 20rpx 0;
}
.timelinecontent {
line-height: 40rpx;
font-size: 26rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
}
.timelinetime {
font-size: 24rpx;
font-weight: 500;
color: rgba(153, 153, 153, 1);
line-height: 40rpx;
}
}
.refund {
padding: 88rpx 30rpx;
background-color: #ffffff;
line-height: 40rpx;
}
.refunds-option { .refunds-option {
flex: 1; flex: 1;
padding: 88rpx 30rpx; padding: 88rpx 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
display: flex; display: flex;
> view { > view {
width: 335rpx; width: 335rpx;
height: 80rpx; height: 80rpx;
border: 1rpx solid rgba(236,236,236,1); border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236,236,236,1); background: rgba(236, 236, 236, 1);
border-radius: 6rpx; border-radius: 6rpx;
font-size: 30rpx; font-size: 30rpx;
color: rgba(0,0,51,1); color: rgba(0, 0, 51, 1);
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 20rpx;
} }
.active { .active {
border: 1rpx solid #FF780F; border: 1rpx solid #ff780f;
color: #FF780F; color: #ff780f;
background: #FFF1E6; background: #fff1e6;
} }
} }
.delivery-popup { .delivery-popup {
@ -292,27 +564,27 @@ export default {
width: 420rpx; width: 420rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
text-align: center; text-align: center;
line-height: 88rpx; line-height: 88rpx;
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
.input-info { .input-info {
> input { > input {
font-size: 26rpx; font-size: 26rpx;
line-height: 88rpx; line-height: 88rpx;
padding: 30rpx; padding: 30rpx;
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
} }
.btn { .btn {
margin: 20rpx auto; margin: 20rpx auto;
width: 200rpx; width: 200rpx;
height: 60rpx; height: 60rpx;
background: rgba(255,120,15,1); background: rgba(255, 120, 15, 1);
border-radius: 30rpx; border-radius: 30rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
} }
@ -322,27 +594,27 @@ export default {
width: 420rpx; width: 420rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: rgba(102,102,102,1); color: rgba(102, 102, 102, 1);
line-height: 42rpx; line-height: 42rpx;
padding: 30rpx 0; padding: 30rpx 0;
} }
.popup-btn { .popup-btn {
width: 420rpx; width: 420rpx;
display: flex; display: flex;
border-top: 2rpx solid #ECECEC; border-top: 2rpx solid #ececec;
> view { > view {
flex: 1; flex: 1;
height: 98rpx; height: 98rpx;
text-align: center; text-align: center;
line-height: 98rpx; line-height: 98rpx;
&:first-child { &:first-child {
border-right: 2rpx solid #ECECEC; border-right: 2rpx solid #ececec;
} }
} }
.determine { .determine {
color: #FF780F; color: #ff780f;
} }
} }
} }
} }
</style> </style>

View File

@ -132,6 +132,7 @@ export default {
showComplaint: false, showComplaint: false,
worker: {}, worker: {},
publishstate: false, publishstate: false,
clickstate:false,//
num: 1, num: 1,
allorder: [], // allorder: [], //
testlist: [], //穿 testlist: [], //穿
@ -147,11 +148,17 @@ export default {
onLoad() { onLoad() {
// //
this.getswiper(); this.getswiper();
//
this.getallorder(0);
// //
this.getcarlist(); this.getcarlist();
// 0: 1 2 3 4退/退 5退/退 // 0: 1 2 3 4退/退 5退/退 6退/退
},
onShow() {
this.current=0
//
this.resetarr()
//
this.getallorder(0);
this.publishstate = false;
}, },
onReachBottom() { onReachBottom() {
this.num++; this.num++;
@ -231,9 +238,14 @@ export default {
type: 'error' type: 'error'
}); });
} else { } else {
// //
that.reportinfo=null that.reportinfo=null
//
that.reportcontent = "" that.reportcontent = ""
//
that.worker = {}
//
that.getcarlist();
// //
that.showComplaint = true; that.showComplaint = true;
} }
@ -365,6 +377,7 @@ export default {
}, },
// //
navto(url) { navto(url) {
this.publishstate = false;
this.$u.route({ this.$u.route({
url: `/pages/${url}` url: `/pages/${url}`
}); });

View File

@ -0,0 +1,434 @@
<template>
<view class="details">
<view class="goods-info">
<image :src="info.goods_image"></image>
<view class="info-right">
<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.goods_price }}</span>
</view>
</view>
</view>
</view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4">
<view>
<image src="/static/image/home/2.png"></image>
<view>{{ info.goods_try_member_name }}</view>
</view>
<view>
<image src="/static/image/home/3.png"></image>
<view>{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view>
<view class="user-info" v-if="type == 1">
<view class="info-title">收件人信息</view>
<view class="info-container">
<view>
<view class="title">姓名</view>
<view class="value">{{ info.goods_try_member_name }}</view>
</view>
<view>
<view class="title">手机号</view>
<view class="value">{{ info.goods_try_member_mobile }}</view>
</view>
<view>
<view class="title">收货地址</view>
<view class="value u-line-1">{{ info.goods_try_area_info }}</view>
</view>
</view>
</view>
<view class="delivery" v-if="type == 1">
<view class="title">派送方式</view>
<view class="methods">
<view :class="{ active: cur == 0 }" @click="people">人工送达</view>
<view :class="{ active: cur == 1 }" @click="carer">指派外部骑手</view>
</view>
<view class="btn" @click="confirmpushstyle">确认</view>
</view>
<!-- <view class="refunds-option" v-if="type==4">
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view>
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view>
</view> -->
<!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view>
<view class="input-info">
<input type="text" placeholder="请输入您的姓名" v-model="name" />
<input type="text" placeholder="请输入您的手机号" v-model="phone" />
<input type="text" placeholder="请输入您的公司名称" v-model="company" />
</view>
<view class="btn">确认</view>
</u-popup> -->
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
<!-- <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
<view class="title" @click="bindpushid">填写快递单号</view>
<view class="input-info">
<input type="text" placeholder="请输入快递单号" v-model="express" />
</view>
<view class="btn">确认</view>
</u-popup> -->
<!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view>
<view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view>
<view class="popup-btn">
<view class="cancel" @click="showRefunds=false">取消</view>
<view class="determine">确定</view>
</view>
</u-popup> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
status: 1, //
cur: Number,
showDelivery: false, //
showExpress: false, //
showRefunds: false, // 退
show: false, //
name: '',
phone: '',
company: '',
express: '',
type: '',
orderid: 0,
info: {},
list: [],
selctcar: null //ID
};
},
onLoad(option) {
this.type = option.type;
this.orderid = option.id;
this.resetinfo();
},
methods: {
//
people() {
this.cur = 0;
},
carer() {
this.cur = 1;
this.show = true;
},
//
confirmpushstyle() {
if (this.cur == 0) {
this.$u.api.agreetest({
goods_try_id: this.orderid,
type: 1,
takeawayer_id: 0
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
}
});
} else {
this.$u.api.agreetest({
goods_try_id: this.orderid,
type: 1,
takeawayer_id: this.selctcar.takeawayer_id
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
}
});
}
},
//
getselect(e) {
this.selctcar = this.list[e[0]];
},
//
resetinfo() {
this.$u.api.testorderdetail({
goods_try_id: this.orderid
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.info = res.data.info;
}
});
//
this.$u.api.takeawayerlist({}).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) {
arr[index].content = arr[index].company_name + '——' + arr[index].contacts + '——' + arr[index].contact_number;
}
this.list = arr;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.details {
display: flex;
flex-direction: column;
min-height: calc(100vh - var(--window-top));
background-color: #ececec;
.goods-info {
background-color: #ffffff;
padding: 30rpx;
display: flex;
align-items: center;
margin: 2rpx 0 20rpx;
> image {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
flex-shrink: 0;
margin-right: 26rpx;
}
.info-right {
.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;
}
}
}
}
}
.refunds-user {
padding: 25rpx 30rpx;
background-color: #ffffff;
margin-bottom: 20rpx;
> view {
display: flex;
align-items: center;
margin-bottom: 30rpx;
@mixin image-class($width, $right) {
> image {
flex-shrink: 0;
width: $width;
height: 40rpx;
margin-right: $right;
}
}
&:first-child {
@include image-class($width: 40rpx, $right: 20rpx);
}
&:nth-child(2) {
margin-left: 4rpx;
@include image-class($width: 32rpx, $right: 24rpx);
}
&:last-child {
margin-left: 2rpx;
@include image-class($width: 36rpx, $right: 22rpx);
}
> view {
font-size: 26rpx;
color: rgba(51, 51, 51, 1);
}
}
}
.user-info {
.info-title {
font-size: 30rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
height: 88rpx;
background-color: #ffffff;
margin-bottom: 2rpx;
padding: 30rpx;
}
.info-container {
padding: 0 30rpx;
background-color: #ffffff;
margin-bottom: 20rpx;
> view {
height: 88rpx;
display: flex;
align-items: center;
color: rgba(51, 51, 51, 1);
&:not(:last-child) {
border-bottom: 2rpx solid #ececec;
}
.title {
width: 150rpx;
font-size: 30rpx;
margin-right: 10rpx;
}
.value {
font-size: 26rpx;
}
}
}
}
.delivery {
flex: 1;
background-color: #ffffff;
padding: 30rpx;
position: relative;
.title {
font-size: 30rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
margin-bottom: 30rpx;
}
.methods {
display: flex;
flex-wrap: wrap;
> view {
font-size: 30rpx;
color: rgba(0, 0, 51, 1);
width: 335rpx;
height: 80rpx;
border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236, 236, 236, 1);
border-radius: 6rpx;
text-align: center;
line-height: 80rpx;
margin-bottom: 20rpx;
&:nth-child(2n-1) {
margin-right: 20rpx;
}
}
.active {
border: 1rpx solid #ff780f;
color: #ff780f;
background: #fff1e6;
}
}
.btn {
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translate(-50%, 0);
width: 690rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1);
border-radius: 49rpx;
font-size: 36rpx;
color: rgba(255, 255, 255, 1);
text-align: center;
line-height: 98rpx;
}
}
.refunds-option {
flex: 1;
padding: 88rpx 30rpx;
background-color: #ffffff;
display: flex;
> view {
width: 335rpx;
height: 80rpx;
border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236, 236, 236, 1);
border-radius: 6rpx;
font-size: 30rpx;
color: rgba(0, 0, 51, 1);
line-height: 80rpx;
text-align: center;
margin-right: 20rpx;
}
.active {
border: 1rpx solid #ff780f;
color: #ff780f;
background: #fff1e6;
}
}
.delivery-popup {
.title {
width: 420rpx;
font-size: 30rpx;
font-weight: 500;
color: rgba(51, 51, 51, 1);
text-align: center;
line-height: 88rpx;
border-bottom: 2rpx solid #ececec;
}
.input-info {
> input {
font-size: 26rpx;
line-height: 88rpx;
padding: 30rpx;
border-bottom: 2rpx solid #ececec;
}
}
.btn {
margin: 20rpx auto;
width: 200rpx;
height: 60rpx;
background: rgba(255, 120, 15, 1);
border-radius: 30rpx;
font-size: 28rpx;
color: rgba(255, 255, 255, 1);
line-height: 60rpx;
text-align: center;
}
}
.refunds-popup {
.popup-tips {
width: 420rpx;
text-align: center;
font-size: 28rpx;
color: rgba(102, 102, 102, 1);
line-height: 42rpx;
padding: 30rpx 0;
}
.popup-btn {
width: 420rpx;
display: flex;
border-top: 2rpx solid #ececec;
> view {
flex: 1;
height: 98rpx;
text-align: center;
line-height: 98rpx;
&:first-child {
border-right: 2rpx solid #ececec;
}
}
.determine {
color: #ff780f;
}
}
}
}
</style>

View File

@ -57,7 +57,7 @@ export default {
login: '登录', login: '登录',
show: false, show: false,
zhanghao: 'seller', zhanghao: 'seller',
mima: '123456789', mima: '123456',
zhanghaoA: '18953829598 ', zhanghaoA: '18953829598 ',
mimaA: '123456', mimaA: '123456',
url: '', url: '',

View File

@ -78,9 +78,10 @@
<!-- 添加标签的按钮 --> <!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14"> <u-popup v-model="show" mode="center" border-radius="14">
<view class="text">创建属于你的标签吧</view> <view class="text">创建属于你的标签吧</view>
<view class="u-inputes"><u-input v-model="form.name" /></view> <view class="u-inputes"><u-input v-model="tagcontent" /></view>
<u-button class="custom-style-button" shape="circle" size="default" @click="creattag">确定</u-button> <u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
</u-popup> </u-popup>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -120,7 +121,8 @@ export default {
scrollTop: 0, scrollTop: 0,
imgarr: [], // imgarr: [], //
cover: '', // cover: '', //
selectarr: [] // selectarr: [], //
tagcontent: ''
}; };
}, },
onLoad() { onLoad() {
@ -129,13 +131,37 @@ export default {
this.getLiveSpec(); this.getLiveSpec();
}, },
methods: { methods: {
publish(){ publish() {
console.log(this.imgarrA) let arr = this.imgarrB;
console.log(this.imgarrB) let newarr = [];
console.log(this.selectarr) for (let index in arr) {
console.log(this.form) newarr.push(arr[index].file_id);
console.log(this.shoplist) }
console.log(this.arres_list) this.$u.api.publishphoto({
article_title: this.form.name,
article_content: this.form.intro,
article_pic: this.imgarrA[0].file_name,
file_id: newarr,
goods_id_arr: this.arres_list,
label_arr: this.selectarr
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
setTimeout(function(){
uni.navigateBack({
delta:1
})
},1000)
}
});
}, },
// //
getshoplist() { getshoplist() {
@ -149,24 +175,22 @@ export default {
} }
} }
} }
console.log(this.shoplist);
}, },
// //
changeselect(num) { changeselect(num) {
if (this.fileListes[num].state == true) { if (this.fileListes[num].state == true) {
this.fileListes[num].state = false; this.fileListes[num].state = false;
that.arres_list.splice(this.fileListes[num].id, 1); let index = this.selectarr.indexOf(this.fileListes[num].id);
this.selectarr.splice(index, 1);
} else { } else {
this.fileListes[num].state = true; this.fileListes[num].state = true;
this.selectarr.push(this.fileListes[num].id); this.selectarr.push(this.fileListes[num].id);
} }
console.log(this.selectarr);
}, },
// //
getLiveSpec() { getLiveSpec() {
let that = this; let that = this;
this.$u.api.getLiveSpec({}).then(res => { this.$u.api.getLiveSpec({}).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,
@ -177,43 +201,47 @@ export default {
for (let index in arr) { for (let index in arr) {
arr[index].state = false; arr[index].state = false;
} }
console.log(arr);
that.fileListes = arr; that.fileListes = arr;
} }
}); });
}, },
// //
addLiveSpec() { addLiveSpec() {
this.$u.api.createLivesp({}).then(res => { this.$u.api.createLivesp({
console.log(res); spec_name: this.tagcontent
if (res.data.live_stataes == 0) { }).then(res => {
this.$u.route({ if (res.errCode != 0) {
url: `/pages/${url}` this.$refs.uToast.show({
title: res.message,
type: 'error'
}); });
} else { } else {
this.tagcontent = '';
this.show = false;
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
} }
}); });
}, },
// //
uploadcover(data) { uploadcover(data) {
let obj = data.data let obj = data.data;
obj.url = obj.file_path obj.url = obj.file_path;
this.imgarrA.push(obj) this.imgarrA.push(obj);
}, },
// //
uploadphoto(data) { uploadphoto(data) {
console.log(data) let obj = data.data;
let obj = data.data obj.url = obj.file_path;
obj.url = obj.file_path this.imgarrB.push(obj);
this.imgarrB.push(obj)
}, },
changes() { changes() {
let that = this; let that = this;
that.show_two = false; that.show_two = false;
console.log(that.arres_list);
}, },
show_add() { show_add() {
console.log(this.show);
this.show = !this.show; this.show = !this.show;
}, },
// checkbox // checkbox
@ -224,7 +252,6 @@ export default {
} else { } else {
this.delarr(id); this.delarr(id);
} }
console.log(this.arres_list);
}, },
// //
delarr(id) { delarr(id) {
@ -248,7 +275,6 @@ export default {
} }
}, },
tosign() { tosign() {
console.log('111');
this.$u.api.canselectgood({}).then(res => { this.$u.api.canselectgood({}).then(res => {
if (res.data.live_stataes == 0) { if (res.data.live_stataes == 0) {
this.$u.route({ this.$u.route({

View File

@ -1,27 +1,42 @@
<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="请输入标题" /> <view class="titles">封面</view>
</u-form-item> <u-upload
<view class="titles">封面</view> :form-data="coverformdata"
<u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList" ></u-upload> :max-count="1"
<view class="titles">图片</view> :header="header"
<u-upload :action="action" del-color="#ececec" upload-text="选择图片" del-bg-color="#fff" :file-list="fileList" ></u-upload> name="article_cover"
<!-- 标签 --> :action="action"
<view> del-color="#ececec"
<view class="titles">标签</view> upload-text="选择图片"
<view class="form-view" @click="show_add()">+ 新建标签</view> del-bg-color="#fff"
<view class="form-view" v-for="(item,index) in fileListes" :key="index">{{item}}</view> :file-list="fileListA"
@on-success="uploadcover"
></u-upload>
<view class="titles">视频</view>
<view class="videobox" v-if="videostate == false" @click="uploadvideo">
<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
<view class="videotext">选择视频</view>
</view>
<view class="videobox" v-else @click="uploadvideo"><video :src="videopath" controls></video></view>
<!-- 标签 -->
<view>
<view class="titles">标签</view>
<view class="form-view" @click="show_add()">+ 新建标签</view>
<view :class="[item.state == true ? 'active' : '', 'form-view']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
{{ item.name }}
</view> </view>
<!-- 简介 --> </view>
<view class="titles">正文</view> <!-- 简介 -->
<textarea placeholder="请输入内容..."></textarea> <view class="titles">正文</view>
<view class="titles_border"><textarea placeholder="请输入内容..." v-model="form.intro"></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"><text>选择商品</text></view> <view class="title"><text>选择商品</text></view>
<!-- 商品列表 --> <!-- 商品列表 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll" > <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll">
<view class="listes_shoping" v-for="(item, index) in list" :key="index"> <view class="listes_shoping" v-for="(item, index) in list" :key="index">
<view> <view>
<u-checkbox-group> <u-checkbox-group>
@ -42,107 +57,262 @@
<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"> <view class="List_tosign" v-for="list in shoplist">
<view><image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image></view> <view><image :src="list.goods_image" mode="scaleToFill"></image></view>
<view>木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view> <view>{{ list.goods_name }}</view>
<view><image src="../../static/image/tosign/delete.png" mode="widthFix"></image></view> <view><image src="../../static/image/tosign/delete.png" mode="widthFix" @click="delarr(list.goods_id)"></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" @click="publish">发表</u-button>
</u-form> </u-form>
<!-- 添加标签的按钮 --> <!-- 添加标签的按钮 -->
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true"> <u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
<view class="text"> <view class="text">创建属于你的标签吧</view>
创建属于你的标签吧 <view class="u-inputes"><u-input v-model="tagcontent" /></view>
</view> <u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
<view class="u-inputes"> </u-popup>
<u-input v-model="form.name" /> <u-toast ref="uToast" />
</view>
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
form: { form: {
name: '', name: '',
intro: '', intro: '',
sex: '' sex: ''
}, },
// 使 coverformdata: {
action: 'http://www.example.com/upload', name: 'article_cover'
fileList: [], },
fileListes:["美妆","博主穿搭","美妆","美妆","美妆","美妆","美妆","博主穿搭"], header: {
show: false, Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
show_two: false, },
arres_list: [], // 使
list: [], action: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
scrollTop: 0 fileListA: [],
imgarrA: [],
videopath: '', //
fileListes: [],
show: false,
show_two: false,
arres_list: [],
shoplist: [], //
list: [],
scrollTop: 0,
selectarr: [], //
tagcontent: '', //
selectvideo: '', //
videostate: false //
};
},
onLoad() {
this.getLiveSpec();
this.resetgood();
},
methods: {
//
resetgood() {
this.$u.api.canselectgood({}).then(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;
} }
}, });
onLoad() { },
// //
Array.prototype.remove = function(val) { publish() {
var index = this.indexOf(val); this.$u.api.publishvideo({
if (index > -1) { article_title: this.form.name,
this.splice(index, 1); article_content: this.form.intro,
} article_pic: this.imgarrA[0].file_name,
}; video_path: this.videopath,
}, goods_id_arr: this.arres_list,
methods:{ label_arr: this.selectarr
show_add(){ }).then(res => {
console.log(this.show) if (res.errCode != 0) {
this.show = !this.show this.$refs.uToast.show({
}, title: res.message,
// type: 'error'
changes() { });
let that = this; } else {
that.show_two = false; this.$refs.uToast.show({
console.log(that.arres_list); title: res.message,
}, type: 'success'
// checkbox });
checkboxChange(e) { setTimeout(function(){
let id = e.name; uni.navigateBack({
if (e.value == true) { delta:1
this.pushes(id); })
}else{ },1000)
this.delarr(id) }
});
},
//
getshoplist() {
let arr = this.arres_list;
let newarr = this.list;
this.shoplist = [];
for (let index in arr) {
for (let i in newarr) {
if (arr[index] == newarr[i].goods_id) {
this.shoplist.push(newarr[i]);
} }
console.log(this.arres_list) }
}
}, },
// //
delarr(id) { changeselect(num) {
var that = this; if (this.fileListes[num].state == true) {
if (id == '') { this.fileListes[num].state = false;
console.log('为空'); let index = this.selectarr.indexOf(this.fileListes[num].id);
} else { this.selectarr.splice(index, 1);
that.arres_list.remove(id); } else {
this.fileListes[num].state = true;
this.selectarr.push(this.fileListes[num].id);
}
},
//
addLiveSpec() {
this.$u.api.createLivesp({
spec_name: this.tagcontent
}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.tagcontent = '';
this.show = false;
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
}
});
},
//
getLiveSpec() {
let that = this;
this.$u.api.getLiveSpec({}).then(res => {
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
let arr = res.data;
for (let index in arr) {
arr[index].state = false;
} }
}, that.fileListes = arr;
// }
pushes(id) { });
var that = this; },
if (id == '') { //
console.log('为空'); uploadcover(data) {
} else { let obj = data.data;
that.arres_list.push(id); obj.url = obj.file_path;
} this.imgarrA.push(obj);
}, },
}, //
components: { uploadvideo() {
} let url = this.action;
let that = this;
uni.chooseVideo({
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
self.src = res.tempFilePath;
const tempFilePaths = res.tempFilePath;
uni.uploadFile({
url: url, //
filePath: tempFilePaths,
name: 'article_video',
formData: {
name: 'article_video'
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: uploadFileRes => {
let obj = JSON.parse(uploadFileRes.data);
that.videopath = obj.data.url;
that.selectvideo = obj.data.key;
that.videostate = true;
},
fail: function(error) {
console.log(error);
}
});
}
});
},
//
show_add() {
this.show = !this.show;
},
//
changes() {
let that = this;
that.show_two = false;
},
// checkbox
checkboxChange(e) {
let id = e.name;
if (e.value == true) {
this.pushes(id);
} else {
this.delarr(id);
}
},
//
delarr(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
let index = that.arres_list.indexOf(id);
that.arres_list.splice(index, 1);
that.getshoplist();
}
},
//
pushes(id) {
var that = this;
if (id == '') {
console.log('为空');
} else {
that.arres_list.push(id);
that.getshoplist();
}
} }
},
components: {}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#release{ #release {
width: 690rpx; width: 690rpx;
margin: 0 auto; margin: 0 auto;
.titles_border,
.uni-textarea-compute {
border: 1px #bababa solid !important;
padding: 10rpx;
border-radius: 10rpx;
}
.show_two { .show_two {
padding: 30rpx 0 70rpx 0; padding: 30rpx 0 70rpx 0;
} }
@ -167,7 +337,7 @@
border-bottom: solid 1px #ececec; border-bottom: solid 1px #ececec;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.show_two .title > text { .show_two .title > text {
font-size: 30rpx; font-size: 30rpx;
padding: 30rpx; padding: 30rpx;
@ -178,7 +348,7 @@
font-weight: 400; font-weight: 400;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
} }
.show_two .images { .show_two .images {
width: 22rpx; width: 22rpx;
height: 12rpx; height: 12rpx;
@ -230,28 +400,28 @@
height: 160rpx; height: 160rpx;
position: relative; position: relative;
} }
.listes_shoping > view { .listes_shoping > view {
float: left; float: left;
} }
.listes_shoping > view:nth-child(1) { .listes_shoping > view:nth-child(1) {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
margin-top: 62rpx; margin-top: 62rpx;
margin-left: 30rpx; margin-left: 30rpx;
} }
.listes_shoping > view:nth-child(2) { .listes_shoping > view:nth-child(2) {
width: 180rpx; width: 180rpx;
height: 160rpx; height: 160rpx;
margin: 0 31rpx 0 19rpx; margin: 0 31rpx 0 19rpx;
} }
.listes_shoping > view:nth-child(2) image { .listes_shoping > view:nth-child(2) image {
width: 100%; width: 100%;
} }
.listes_shoping > view:nth-child(3) { .listes_shoping > view:nth-child(3) {
width: 425rpx; width: 425rpx;
margin-top: 43rpx; margin-top: 43rpx;
@ -262,9 +432,9 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -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;
margin-right: 20rpx; margin-right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
@ -272,23 +442,44 @@
margin-bottom: 28rpx; margin-bottom: 28rpx;
color: #fff; color: #fff;
} }
.titles{ .active {
font-size:30rpx; background: red;
font-weight:400; }
color:rgba(51,51,51,1); .titles {
font-size: 30rpx;
font-weight: 400;
color: rgba(51, 51, 51, 1);
margin: 30rpx 0; margin: 30rpx 0;
} }
textarea{ .videobox {
width: 200rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: #f4f5f6;
margin-left: 10rpx;
border-radius: 10rpx;
}
.videotext {
margin-top: 10rpx;
}
.videobox video {
width: 200rpx;
height: 200rpx;
}
textarea {
font-size: 26rpx; font-size: 26rpx;
} }
.custom-style{ .custom-style {
background:rgba(255,120,15,1)!important; background: rgba(255, 120, 15, 1) !important;
color: #fff!important; color: #fff !important;
font-size: 36rpx; font-size: 36rpx;
} }
.custom-style-button{ .custom-style-button {
background:rgba(255,120,15,1)!important; background: rgba(255, 120, 15, 1) !important;
color: #fff!important; color: #fff !important;
font-size: 28rpx; font-size: 28rpx;
width: 200rpx; width: 200rpx;
margin-bottom: 23rpx; margin-bottom: 23rpx;
@ -296,9 +487,9 @@
height: 60rpx; height: 60rpx;
} }
} }
.u-mode-center-box{ .u-mode-center-box {
padding: 120rpx; padding: 120rpx;
.text{ .text {
font-size: 30rpx; font-size: 30rpx;
margin-top: 74rpx; margin-top: 74rpx;
text-align: center; text-align: center;
@ -306,7 +497,7 @@
color: #333; color: #333;
} }
} }
.u-inputes{ .u-inputes {
margin: 30rpx 0; margin: 30rpx 0;
border: 1px #ececec solid; border: 1px #ececec solid;
padding-left: 14rpx; padding-left: 14rpx;