Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1a3a11781 | |||
|
|
80e3a721a1 | ||
|
|
31474f482f | ||
|
|
df1bad0a31 | ||
| ec2bbcdc29 | |||
| e9f0b1ba78 | |||
|
|
61756ac875 | ||
| c5e16abbc2 | |||
|
2d7ed292c0
|
|||
|
30451e2767
|
|||
| cde4e7db87 | |||
| 59df1ed10f | |||
|
385653d391
|
|||
|
|
3e45c9350a | ||
| 2ed7b6798b | |||
| f6e4562ce2 | |||
|
|
22ea59f5c5 | ||
| b9e15c1b02 | |||
|
5520e7ab7c
|
|||
|
1d9edefd7f
|
|||
|
|
5094efd41e | ||
|
|
70e848cbbb | ||
|
b605f68e72
|
|||
| 2525db391c | |||
| dbffca53c8 | |||
|
519ec0abe8
|
|||
|
|
243e1f93bd | ||
|
74fbd629d6
|
|||
| e71a43eb85 | |||
|
|
fef56d1b52 | ||
|
|
cc7a293e18 | ||
|
|
8660e95d02 | ||
|
96adf9e6a9
|
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.vscode
|
.vscode
|
||||||
node_modules
|
node_modules
|
||||||
|
unpackage
|
||||||
26
App.vue
@@ -1,18 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch')
|
console.log('App Launch');
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show')
|
console.log('App Show');
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "uview-ui/index.scss";
|
@import 'uview-ui/index.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,12 +4,14 @@
|
|||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此处没有使用传入的params参数
|
// 此处没有使用传入的params参数
|
||||||
let api = {
|
let api = {
|
||||||
|
// 获取标签
|
||||||
getLiveSpec(){
|
getLiveSpec(){
|
||||||
return vm.$u.get("Streaming/getLiveSpec")
|
return vm.$u.get("Streaming/getLiveSpec")
|
||||||
},
|
},
|
||||||
login({member_name,member_password}){
|
login({member_name,member_password}){
|
||||||
return vm.$u.post("Login/login",{member_name,member_password})
|
return vm.$u.get("/Login/expertLogin",{member_name,member_password})
|
||||||
},
|
},
|
||||||
|
// 创建标签
|
||||||
createLivesp({spec_name}){
|
createLivesp({spec_name}){
|
||||||
return vm.$u.post("Streaming/createLivesp",{spec_name})
|
return vm.$u.post("Streaming/createLivesp",{spec_name})
|
||||||
},
|
},
|
||||||
@@ -21,7 +23,118 @@ const install = (Vue, vm) => {
|
|||||||
},
|
},
|
||||||
liveStreamList(){
|
liveStreamList(){
|
||||||
return vm.$u.post("Streaming/liveStreamList")
|
return vm.$u.post("Streaming/liveStreamList")
|
||||||
}
|
},
|
||||||
|
// 获取订单列表
|
||||||
|
getorderlist({type,page}){
|
||||||
|
return vm.$u.get("/Order/orderList",{type,page})
|
||||||
|
},
|
||||||
|
// 获取试穿订单列表
|
||||||
|
getshiftlist(){
|
||||||
|
return vm.$u.get("/order/goodsTryOrderList")
|
||||||
|
},
|
||||||
|
// 获取轮播图列表
|
||||||
|
getswiper(){
|
||||||
|
return vm.$u.get("/Order/orderList")
|
||||||
|
},
|
||||||
|
// 商家登陆
|
||||||
|
shoplogin({member_name,member_password}){
|
||||||
|
return vm.$u.get("/Login/storeLogin",{member_name,member_password})
|
||||||
|
},
|
||||||
|
// 获取个人信息
|
||||||
|
getshopinfo(){
|
||||||
|
return vm.$u.post("/member/memberInfo")
|
||||||
|
},
|
||||||
|
// 获取粉丝列表
|
||||||
|
myfanlist(){
|
||||||
|
return vm.$u.post("/member/myFansList")
|
||||||
|
},
|
||||||
|
// 修改个人信息
|
||||||
|
changeinfo({nickname,avatar,signature}){
|
||||||
|
return vm.$u.post("/Member/changeMemberInfo",{nickname,avatar,signature})
|
||||||
|
},
|
||||||
|
// 获取内容列表
|
||||||
|
articlelist({type,page}){
|
||||||
|
return vm.$u.post("/Article/articleList",{type,page})
|
||||||
|
},
|
||||||
|
// 删除文章
|
||||||
|
delarticle({article_id}){
|
||||||
|
return vm.$u.post("/article/articleDelete",{article_id})
|
||||||
|
},
|
||||||
|
// 骑手列表
|
||||||
|
takeawayerlist(){
|
||||||
|
return vm.$u.get("/Order/getTakeawayerList")
|
||||||
|
},
|
||||||
|
// 投诉列表
|
||||||
|
reportlist(){
|
||||||
|
return vm.$u.post("/takeawayer/complaintTKList")
|
||||||
|
},
|
||||||
|
// 投诉详情
|
||||||
|
reportdetail({id}){
|
||||||
|
return vm.$u.post("/takeawayer/complaintInfo",{id})
|
||||||
|
},
|
||||||
|
// 可以投诉的订单
|
||||||
|
canreportorder(){
|
||||||
|
return vm.$u.post("/Takeawayer/tryOrderSnList")
|
||||||
|
},
|
||||||
|
// 投诉骑手
|
||||||
|
|
||||||
|
reportorder({order_id,takeawayer_id,order_list,content}){
|
||||||
|
return vm.$u.post("/takeawayer/complaintTakeawayer",{order_id,takeawayer_id,order_list,content})
|
||||||
|
},
|
||||||
|
// 文章详情
|
||||||
|
getdetail({article_id}){
|
||||||
|
return vm.$u.post("/article/articleInfo",{article_id})
|
||||||
|
},
|
||||||
|
// 回复评论
|
||||||
|
reply({article_id,pid,content}){
|
||||||
|
return vm.$u.post("/article/articleAddComment",{article_id,pid,content})
|
||||||
|
},
|
||||||
|
// 达人是否可以直播
|
||||||
|
canlive(){
|
||||||
|
return vm.$u.post("/Streaming/expt_live")
|
||||||
|
},
|
||||||
|
// 可选择直播商品列表
|
||||||
|
canselectgood(){
|
||||||
|
return vm.$u.post("/article/getStoreGoodsList")
|
||||||
|
},
|
||||||
|
// 发布图文
|
||||||
|
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;
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此为自定义配置参数,具体参数见上方说明
|
// 此为自定义配置参数,具体参数见上方说明
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com//storeapi',
|
baseUrl: 'https://dmmall.sdbairui.com/storeapi',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
// 设置自定义头部content-type
|
originalData: true,
|
||||||
// header: {
|
|
||||||
// "Authorization" : "122"
|
|
||||||
// }
|
|
||||||
// ......
|
|
||||||
});
|
});
|
||||||
Vue.prototype.$u.http.interceptor.request = (config) => {
|
Vue.prototype.$u.http.interceptor.request = (config) => {
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
config.header.Authorization = 'Bearer' + " " + token;
|
config.header.Authorization = 'Bearer' + " " + token;
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||||
|
// todo 判断状态码
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content-item">
|
<view class="content-item">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image class="cover"></image>
|
<image class="cover" :src="info.article_pic" alt="没有图片"></image>
|
||||||
<image src="/static/image/user/5.png" class="play-icon" v-if="cur==1"></image>
|
<image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="right" @click="toDetailsPage">
|
<view class="right" >
|
||||||
<u-icon name="close" color="#999999" size="27" @click.stop="showPopup"></u-icon>
|
<u-icon name="close" color="#999999" size="27" @click="showPopup(info.article_id)"></u-icon>
|
||||||
<view class="tags u-line-2">#配饰就该这么搭#</view>
|
<view class="tags u-line-2" @click="toDetailsPage">{{info.article_title}}</view>
|
||||||
<view class="data">
|
<view class="data">
|
||||||
<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"></image>
|
<image src="/static/image/user/3.png"></image>
|
||||||
<text>2.5w</text>
|
<text>{{info.collect_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<image src="/static/image/user/4.png"></image>
|
<image src="/static/image/user/4.png"></image>
|
||||||
<text>2.5w</text>
|
<text>{{info.like_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,19 +30,27 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
cur: [Number, String],
|
info:{
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
delItem: {
|
delItem: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showPopup() {
|
showPopup(id) {
|
||||||
this.delItem();
|
console.log(12345,id)
|
||||||
|
this.$emit("del",id)
|
||||||
},
|
},
|
||||||
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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -61,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 {
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="fans-item">
|
<view class="fans-item">
|
||||||
<image></image>
|
<image :src="info.friend_frommavatar"></image>
|
||||||
<view class="name">兽兽</view>
|
<view class="name">{{info.fromMemberNickname}}</view>
|
||||||
<view class="date">2017-10-14</view>
|
<view class="date">{{info.fromMemberFriendAddtime}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {}
|
||||||
}
|
},
|
||||||
|
props: {
|
||||||
|
info: Object
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,12 +1,23 @@
|
|||||||
<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="status" v-if="cur==4">待处理订单</view>
|
<view class="box">
|
||||||
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view>
|
<view class="">
|
||||||
|
编号:{{info.order_sn}}
|
||||||
|
</view>
|
||||||
|
<!-- 1待处理 2已发货 3已完成 4申请退款 5已退款 6拒绝退款 -->
|
||||||
|
<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 class="status" v-else-if="info.view_type==6">拒绝退款订单</view>
|
||||||
|
</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>
|
||||||
@@ -17,12 +28,13 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
cur: [Number, String]
|
cur: [Number, String],
|
||||||
|
info: Object
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/details?current=' + this.cur
|
url: '/pages/index/details?id=' + this.info.order_id+"&type="+this.info.view_type
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -43,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;
|
||||||
}
|
}
|
||||||
|
|||||||
98
components/order-item/testlist.vue
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<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() {
|
||||||
|
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({
|
||||||
|
url: '/pages/index/otherdetails?id=' + this.info.goods_try_id+"&type="+type
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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>
|
||||||
5
package-lock.json
generated
@@ -6,13 +6,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uview-ui": {
|
"uview-ui": {
|
||||||
"version": "1.5.2",
|
"version": "1.5.2",
|
||||||
<<<<<<< HEAD
|
|
||||||
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.2.tgz",
|
||||||
"integrity": "sha512-FV9G+gZTAZKEE2m85ahIbIRiC/fdzTl+eNXDIMBoyc9b+fQWQhEtmAfu6huu7AtKuTI6gfqaYn6WGcmqYvr76w=="
|
"integrity": "sha512-FV9G+gZTAZKEE2m85ahIbIRiC/fdzTl+eNXDIMBoyc9b+fQWQhEtmAfu6huu7AtKuTI6gfqaYn6WGcmqYvr76w=="
|
||||||
=======
|
|
||||||
"resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.5.2.tgz?cache=0&sync_timestamp=1594781920423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuview-ui%2Fdownload%2Fuview-ui-1.5.2.tgz",
|
|
||||||
"integrity": "sha1-4jDud0TIBjMJe74GU+IyvJSyAwk="
|
|
||||||
>>>>>>> fa383397b331ec0091096becf886f978cc1277fc
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
133
pages.json
@@ -2,8 +2,7 @@
|
|||||||
"easycom": {
|
"easycom": {
|
||||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [{
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
@@ -31,9 +30,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "消息",
|
"navigationBarTitleText": "消息",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,9 +42,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "德铭阳光在线",
|
"navigationBarTitleText": "德铭阳光在线",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,11 +54,22 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/otherdetails",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "试穿订单详情",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/release/video",
|
"path": "pages/release/video",
|
||||||
@@ -86,17 +96,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/user/index",
|
"path": "pages/user/index",
|
||||||
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人中心",
|
"navigationBarTitleText": "个人中心",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/user/myinfo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "达人中心",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,9 +141,15 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人资料",
|
"navigationBarTitleText": "个人资料",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333",
|
||||||
|
"buttons": [ //原生标题栏按钮配置,
|
||||||
|
{
|
||||||
|
"text": "保存",
|
||||||
|
"fontSize":"14px"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,9 +159,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "修改密码",
|
"navigationBarTitleText": "修改密码",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,9 +171,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的粉丝",
|
"navigationBarTitleText": "我的粉丝",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,9 +183,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "内容管理",
|
"navigationBarTitleText": "内容管理",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,9 +194,9 @@
|
|||||||
"path": "pages/user/contentDetails",
|
"path": "pages/user/contentDetails",
|
||||||
"style": {
|
"style": {
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,9 +206,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "骑手投诉",
|
"navigationBarTitleText": "骑手投诉",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,9 +218,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "骑手投诉详情",
|
"navigationBarTitleText": "骑手投诉详情",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,9 +230,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择商品",
|
"navigationBarTitleText": "选择商品",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#2D2D2D",
|
"backgroundColor": "#2D2D2D",
|
||||||
"titleColor": "#FFFFFF"
|
"titleColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,28 +255,34 @@
|
|||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"backgroundColor": "#F8F8F8"
|
"backgroundColor": "#F8F8F8"
|
||||||
},
|
},
|
||||||
"tabBar":{
|
"tabBar": {
|
||||||
"color": "#7A7E83",
|
"color": "#7A7E83",
|
||||||
"selectedColor": "#3cc51f",
|
"selectedColor": "#3cc51f",
|
||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"height": "50px",
|
"height": "50px",
|
||||||
"fontSize": "10px",
|
"fontSize": "10px",
|
||||||
"iconWidth": "24px",
|
"iconWidth": "24px",
|
||||||
"spacing": "3px",
|
"spacing": "3px",
|
||||||
"list": [{
|
"list": [{
|
||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/index",
|
||||||
"iconPath": "",
|
"iconPath": "",
|
||||||
"selectedIconPath": "",
|
"selectedIconPath": "",
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"selectedColor":"#FBFBFB"
|
"selectedColor": "#FBFBFB"
|
||||||
}, {
|
}, {
|
||||||
"pagePath": "pages/user/index",
|
"pagePath": "pages/messages/messagesList",
|
||||||
"iconPath": "",
|
"iconPath": "",
|
||||||
"selectedIconPath": "",
|
"selectedIconPath": "",
|
||||||
|
"text": "消息",
|
||||||
|
"selectedColor": "#FBFBFB"
|
||||||
|
}, {
|
||||||
|
"pagePath": "pages/user/index",
|
||||||
|
"iconPath": "",
|
||||||
|
"selectedIconPath": "",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"selectedColor":"#FBFBFB"
|
"selectedColor": "#FBFBFB"
|
||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,45 +72,272 @@
|
|||||||
<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" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
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>
|
||||||
@@ -110,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;
|
||||||
@@ -123,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 {
|
||||||
@@ -137,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;
|
||||||
@@ -176,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,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;
|
||||||
@@ -215,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 {
|
||||||
@@ -229,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;
|
||||||
@@ -243,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 {
|
||||||
@@ -255,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 {
|
||||||
@@ -291,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;
|
||||||
}
|
}
|
||||||
@@ -321,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>
|
||||||
|
|||||||
@@ -1,379 +1,561 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="home">
|
<view class="home">
|
||||||
<view class="image-swiper">
|
<view class="image-swiper"><u-swiper :list="imageList" mode="dot" border-radius="20"></u-swiper></view>
|
||||||
<u-swiper :list="imageList" mode="dot" border-radius="20"></u-swiper>
|
<view class="tab-swiper">
|
||||||
</view>
|
<u-tabs-swiper
|
||||||
<view class="tab-swiper">
|
ref="uTabs"
|
||||||
<u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" active-color="#FF780F" inactive-color="#333333" font-size="26" height="98" :show-bar="false" swiperWidth="750" gutter="52"></u-tabs-swiper>
|
:list="list"
|
||||||
</view>
|
:current="current"
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
@change="tabsChange"
|
||||||
<swiper-item class="swiper-item">
|
active-color="#FF780F"
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" class="order-list">
|
inactive-color="#333333"
|
||||||
<view v-for="(item, index) in 5" :key="index">
|
font-size="26"
|
||||||
<OrderItem :cur="current"></OrderItem>
|
height="98"
|
||||||
</view>
|
:show-bar="false"
|
||||||
</scroll-view>
|
swiperWidth="750"
|
||||||
</swiper-item>
|
gutter="52"
|
||||||
<swiper-item class="swiper-item">
|
></u-tabs-swiper>
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
</view>
|
||||||
<view v-for="(item, index) in 5" :key="index">
|
<view class="order-list" v-if="current == 0">
|
||||||
<OrderItem :cur="current"></OrderItem>
|
<view v-for="(item, index) in allorder" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
<view v-else-if="current == 1">
|
||||||
</swiper-item>
|
<view v-for="(item, index) in testlist" :key="index"><testList :info="item"></testList></view>
|
||||||
<swiper-item class="swiper-item">
|
</view>
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
<view v-else-if="current == 2">
|
||||||
<view v-for="(item, index) in 5" :key="index">
|
<view v-for="(item, index) in worklist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
<OrderItem :cur="current"></OrderItem>
|
</view>
|
||||||
</view>
|
<view v-else-if="current == 3">
|
||||||
</scroll-view>
|
<view v-for="(item, index) in translist" :key="index"><OrderItem :info="item"></OrderItem></view>
|
||||||
</swiper-item>
|
</view>
|
||||||
<swiper-item class="swiper-item">
|
<view v-else-if="current == 4">
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
<view class="complaint">
|
||||||
<view class="complaint">
|
<view class="select-container">
|
||||||
<view class="select-container">
|
<view class="title">选择订单号</view>
|
||||||
<view class="title">选择骑手</view>
|
<view class="worker" v-if="JSON.stringify(worker) != '{}'">
|
||||||
<view class="worker" v-if="JSON.stringify(worker) != '{}'">
|
<view>{{ worker.name }}</view>
|
||||||
<view>{{ worker.company + " " + worker.name }}</view>
|
<u-icon name="edit-pen" @click="worker = {}"></u-icon>
|
||||||
<u-icon name="edit-pen" @click="worker={}"></u-icon>
|
</view>
|
||||||
</view>
|
<view v-else class="select" @click="showSelect = true">
|
||||||
<view v-else class="select" @click="showSelect=true">
|
<view>请选择</view>
|
||||||
<view>请选择</view>
|
<image src="/static/image/home/5.png"></image>
|
||||||
<image src="/static/image/home/5.png"></image>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="textarea">
|
||||||
<view class="textarea">
|
<view class="title">投诉简介</view>
|
||||||
<view class="title">投诉简介</view>
|
<textarea placeholder-style="color:#999999" placeholder="请输入内容" v-model="reportcontent" />
|
||||||
<textarea placeholder-style="color:#999999" placeholder="请输入内容" />
|
</view>
|
||||||
</view>
|
<!-- 事件 -->
|
||||||
<!-- 事件 -->
|
<view class="btn" @click="reportcar">确定</view>
|
||||||
<view class="btn" @click="showComplaint=true">确定</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
<view v-else-if="current == 5">
|
||||||
</swiper-item>
|
<view v-for="(item, index) in finshlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
|
||||||
<swiper-item class="swiper-item">
|
</view>
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
<view v-else-if="current == 6">
|
||||||
<view v-for="(item, index) in 5" :key="index">
|
<view v-for="(item, index) in badlist" :key="index"><OrderItem :cur="current"></OrderItem></view>
|
||||||
<OrderItem :cur="current"></OrderItem>
|
</view>
|
||||||
</view>
|
<view class="release-btn" @click="publish">
|
||||||
</scroll-view>
|
<image src="../../static/image/index/publish.png"></image>
|
||||||
</swiper-item>
|
<view class="text">发布</view>
|
||||||
<swiper-item class="swiper-item">
|
</view>
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
<u-select v-model="showSelect" :list="carlist" @confirm="setWorker" confirm-color="#FF780F"></u-select>
|
||||||
<view v-for="(item, index) in 15" :key="index">
|
<u-popup v-model="showComplaint" mode="center" border-radius="10">
|
||||||
<OrderItem :cur="current"></OrderItem>
|
<view class="confirm-complaint">
|
||||||
</view>
|
<view class="text">
|
||||||
</scroll-view>
|
<view>投诉成功</view>
|
||||||
</swiper-item>
|
<view>请等待审核结果</view>
|
||||||
</swiper>
|
</view>
|
||||||
<view class="release-btn" @click="publish">
|
<view class="btn" @click="showComplaint = false">确认</view>
|
||||||
<image src="/static/home/1.png"></image>
|
</view>
|
||||||
<view class="text" @click="release()">发布</view>
|
</u-popup>
|
||||||
</view>
|
<u-popup v-model="publishstate" mode="bottom">
|
||||||
<u-select v-model="showSelect" mode="mutil-column-auto" :list="workerList" @confirm="setWorker"></u-select>
|
<view class="publish">
|
||||||
<u-popup v-model="showComplaint" mode="center" border-radius="10">
|
<view class="list">
|
||||||
<view class="confirm-complaint">
|
<view @click="navto('release/tosign')">
|
||||||
<view class="text">
|
<image src="../../static/image/index/live.png"></image>
|
||||||
<view>投诉成功</view>
|
<text>直播</text>
|
||||||
<view>请等待审核结果</view>
|
</view>
|
||||||
</view>
|
<view @click="navto('release/index')">
|
||||||
<view class="btn" @click="showComplaint = false">确认</view>
|
<image src="../../static/image/index/photo.png"></image>
|
||||||
</view>
|
<text>图文</text>
|
||||||
</u-popup>
|
</view>
|
||||||
<u-popup v-model="publishstate" mode="bottom">
|
<view @click="navto('release/video')">
|
||||||
<view class="publish">
|
<image src="../../static/image/index/video.png"></image>
|
||||||
<view class="list">
|
<text>视频</text>
|
||||||
<view @click="navto('release/tosign')">
|
</view>
|
||||||
<image></image>
|
</view>
|
||||||
<text>直播</text>
|
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
|
||||||
</view>
|
</view>
|
||||||
<view @click="navto('release/index')">
|
</u-popup>
|
||||||
<image></image>
|
<u-toast ref="uToast" />
|
||||||
<text>图文</text>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
<view @click="navto('release/video')">
|
|
||||||
<image></image>
|
<script>
|
||||||
<text>视频</text>
|
import OrderItem from '@/components/order-item/index';
|
||||||
</view>
|
import testList from '@/components/order-item/testlist.vue';
|
||||||
</view>
|
export default {
|
||||||
<image class="off"></image>
|
components: {
|
||||||
</view>
|
OrderItem,
|
||||||
</u-popup>
|
testList
|
||||||
</view>
|
},
|
||||||
</template>
|
data() {
|
||||||
|
return {
|
||||||
<script>
|
list: [
|
||||||
import OrderItem from '@/components/order-item/index'
|
{
|
||||||
export default {
|
name: '全部订单'
|
||||||
data() {
|
},
|
||||||
return {
|
{
|
||||||
list: [{
|
name: '试穿订单'
|
||||||
name: '全部订单'
|
},
|
||||||
}, {
|
{
|
||||||
name: '试穿订单'
|
name: '待处理订单'
|
||||||
}, {
|
},
|
||||||
name: '待处理订单'
|
{
|
||||||
}, {
|
name: '已发货订单'
|
||||||
name: '投诉骑手'
|
},
|
||||||
}, {
|
{
|
||||||
name: '已完成订单'
|
name: '投诉骑手'
|
||||||
}, {
|
},
|
||||||
name: '退货订单'
|
{
|
||||||
}],
|
name: '已完成订单'
|
||||||
imageList: [
|
},
|
||||||
{}, {}, {}
|
{
|
||||||
],
|
name: '退货订单'
|
||||||
showSelect: false,
|
}
|
||||||
current: 0,
|
],
|
||||||
swiperCurrent: 0,
|
imageList: [],
|
||||||
showComplaint: false,
|
showSelect: false,
|
||||||
worker: {},
|
current: 0,
|
||||||
workerList: [
|
swiperCurrent: 0,
|
||||||
{
|
showComplaint: false,
|
||||||
label: '百世快递公司',
|
worker: {},
|
||||||
children: [
|
publishstate: false,
|
||||||
{
|
clickstate:false,//投诉骑手按钮点击状态
|
||||||
label: '小米'
|
num: 1,
|
||||||
},
|
allorder: [], //所有订单
|
||||||
{
|
testlist: [], //试穿列表
|
||||||
label: '小亮'
|
worklist: [], //待处理列表
|
||||||
}
|
translist: [], //已发货列表
|
||||||
]
|
finshlist: [], //已完成列表
|
||||||
},
|
badlist: [], //退货列表
|
||||||
{
|
carlist: [], //可投诉订单列表
|
||||||
label: '中通快递公司',
|
reportinfo: null, //投诉信息
|
||||||
children: [
|
reportcontent: '' //投诉内容
|
||||||
{
|
};
|
||||||
label: '小红'
|
},
|
||||||
}
|
onLoad() {
|
||||||
]
|
// 初始化轮播图
|
||||||
},
|
this.getswiper();
|
||||||
{
|
// 获取可投诉列表
|
||||||
label: '申通快递公司',
|
this.getcarlist();
|
||||||
children: [
|
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货 6拒绝退款/退货
|
||||||
{
|
},
|
||||||
label: '小蓝'
|
onShow() {
|
||||||
}
|
this.current=0
|
||||||
]
|
// 初始化数据
|
||||||
}
|
this.resetarr()
|
||||||
],
|
// 所有订单
|
||||||
publishstate:true
|
this.getallorder(0);
|
||||||
}
|
this.publishstate = false;
|
||||||
},
|
},
|
||||||
components: {
|
onReachBottom() {
|
||||||
OrderItem
|
this.num++;
|
||||||
},
|
this.reset();
|
||||||
onLoad() {
|
},
|
||||||
|
methods: {
|
||||||
},
|
// 初始化数组
|
||||||
methods: {
|
resetarr() {
|
||||||
release(){
|
this.allorder = [];
|
||||||
this.publishstate = true
|
this.worklist = [];
|
||||||
},
|
this.translist = [];
|
||||||
publish(){
|
this.finshlist = [];
|
||||||
|
this.badlist = [];
|
||||||
},
|
this.badlist = [];
|
||||||
setWorker(e) {
|
this.testlist = [];
|
||||||
// console.log(e);
|
},
|
||||||
this.worker = {
|
// 根据current请求不同的接口
|
||||||
company: e[0].label,
|
reset() {
|
||||||
name: e[1].label
|
let current = this.current;
|
||||||
}
|
if (current == 0) {
|
||||||
},
|
// 所有订单
|
||||||
tabsChange(index) {
|
this.getallorder(0);
|
||||||
this.swiperCurrent = index;
|
} else if (current == 1) {
|
||||||
},
|
// 试穿订单
|
||||||
animationfinish(e) {
|
this.getshiftlist();
|
||||||
let current = e.detail.current;
|
} else if (current == 2) {
|
||||||
// this.$refs.uTabs.setFinishCurrent(current);
|
// 待处理订单
|
||||||
this.swiperCurrent = current;
|
this.getallorder(1);
|
||||||
this.current = current;
|
} else if (current == 3) {
|
||||||
},
|
// 已发货订单
|
||||||
navto(url){
|
this.getallorder(2);
|
||||||
this.$u.route({
|
} else if (current == 4) {
|
||||||
url:`/pages/${url}`
|
// 投诉
|
||||||
})
|
} else if (current == 5) {
|
||||||
// console.log(`/pages/${url}`)
|
// 已完成订单
|
||||||
// uni.navigateTo({
|
this.getallorder(3);
|
||||||
// url: `/pages/${url}`
|
} else if (current == 6) {
|
||||||
// });
|
// 退货订单
|
||||||
}
|
this.getallorder(5);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
</script>
|
// 关闭发布弹窗
|
||||||
<style lang="scss" scoped>
|
close() {
|
||||||
.home {
|
this.publishstate = false;
|
||||||
min-height: calc(100vh - var(--window-top));
|
},
|
||||||
background-color: #ECECEC;
|
// 投诉骑手
|
||||||
display: flex;
|
reportcar(type) {
|
||||||
flex-direction: column;
|
let that = this;
|
||||||
// padding-bottom: 100rpx;
|
if(this.clickstate==false){
|
||||||
> uni-swiper {
|
this.clickstate=true
|
||||||
flex: 1;
|
}else{
|
||||||
}
|
this.$refs.uToast.show({
|
||||||
.image-swiper {
|
title: "不能重复提交",
|
||||||
background-color: #ffffff;
|
type: 'error'
|
||||||
padding: 0 30rpx 16rpx;
|
});
|
||||||
}
|
return
|
||||||
.tab-swiper {
|
}
|
||||||
margin: 2rpx 0 20rpx 0;
|
if (that.reportcontent == '') {
|
||||||
}
|
this.$refs.uToast.show({
|
||||||
.swiper-item {
|
title: "投诉内容不能为空",
|
||||||
.complaint {
|
type: 'error'
|
||||||
margin: 0 30rpx;
|
});
|
||||||
padding: 75rpx 30rpx;
|
return;
|
||||||
background-color: #ffffff;
|
}
|
||||||
.select-container {
|
|
||||||
display: flex;
|
this.$u.api.reportorder({
|
||||||
align-items: center;
|
order_id: that.reportinfo.order_id,
|
||||||
margin-bottom: 60rpx;
|
takeawayer_id: that.reportinfo.takeawayer_id,
|
||||||
.title {
|
order_list: that.reportinfo.order_list,
|
||||||
font-size: 30rpx;
|
content: that.reportcontent
|
||||||
color: rgba(51,51,51,1);
|
}).then(res => {
|
||||||
margin-right: 20rpx;
|
// 恢复可点击状态
|
||||||
}
|
this.clickstate=false
|
||||||
.select {
|
if (res.errCode != 0) {
|
||||||
padding: 18rpx 20rpx;
|
this.$refs.uToast.show({
|
||||||
width: 490rpx;
|
title: res.message,
|
||||||
height: 60rpx;
|
type: 'error'
|
||||||
background: rgba(236,236,236,1);
|
});
|
||||||
border-radius: 6rpx;
|
} else {
|
||||||
display: flex;
|
// 提交后清空选择信息
|
||||||
align-items: center;
|
that.reportinfo=null
|
||||||
justify-content: space-between;
|
// 清空投诉评价
|
||||||
> view {
|
that.reportcontent = ""
|
||||||
font-size: 26rpx;
|
// 清空选择器返回信息
|
||||||
color: #999999;
|
that.worker = {}
|
||||||
}
|
// 重新获取可投诉列表
|
||||||
> image {
|
that.getcarlist();
|
||||||
width: 24rpx;
|
// 提示修改成功
|
||||||
height: 13rpx;
|
that.showComplaint = true;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
.worker {
|
},
|
||||||
display: flex;
|
// 获取可投诉列表
|
||||||
align-items: center;
|
getcarlist() {
|
||||||
> view {
|
let that = this;
|
||||||
font-size: 30rpx;
|
this.$u.api.canreportorder({}).then(res => {
|
||||||
color: rgba(51,51,51,1);
|
console.log(res);
|
||||||
margin-right: 20rpx;
|
if (res.errCode != 0) {
|
||||||
}
|
this.$refs.uToast.show({
|
||||||
}
|
title: res.message,
|
||||||
}
|
type: 'error'
|
||||||
.textarea {
|
});
|
||||||
box-sizing: border-box;
|
} else {
|
||||||
display: flex;
|
let arr = res.data.order_normal;
|
||||||
.title {
|
// {
|
||||||
font-size: 30rpx;
|
// value: 2,
|
||||||
color: rgba(51,51,51,1);
|
// label: '广东',
|
||||||
margin-right: 20rpx;
|
// children: [
|
||||||
}
|
// {
|
||||||
> textarea {
|
// value: 3,
|
||||||
padding: 20rpx;
|
// label: '深圳'
|
||||||
width: 430rpx;
|
// },
|
||||||
height: 220rpx;
|
// {
|
||||||
border: 1rpx solid #999999;
|
// value: 4,
|
||||||
font-size: 26rpx;
|
// label: '广州'
|
||||||
}
|
// }
|
||||||
}
|
// ]
|
||||||
.btn {
|
// },
|
||||||
margin: 90rpx auto 0;
|
for (let index in arr) {
|
||||||
width: 630rpx;
|
arr[index].value = arr[index].takeawayer_id;
|
||||||
height: 88rpx;
|
let newarr = arr[index].order_list.split('-');
|
||||||
background: rgba(255,120,15,1);
|
arr[index].label = newarr[0] + ' ' + newarr[1];
|
||||||
border-radius: 44rpx;
|
}
|
||||||
font-size: 36rpx;
|
this.carlist = arr;
|
||||||
color: rgba(255,255,255,1);
|
}
|
||||||
line-height: 88rpx;
|
});
|
||||||
text-align: center;
|
},
|
||||||
}
|
// 获取试穿列表
|
||||||
}
|
getshiftlist() {
|
||||||
}
|
let that = this;
|
||||||
.release-btn {
|
this.$u.api.getshiftlist({}).then(res => {
|
||||||
position: fixed;
|
console.log(res);
|
||||||
bottom: 475rpx;
|
if (res.errCode != 0) {
|
||||||
right: 30rpx;
|
this.$refs.uToast.show({
|
||||||
width: 100rpx;
|
title: res.message,
|
||||||
height: 100rpx;
|
type: 'error'
|
||||||
background: rgba(255,120,15,1);
|
});
|
||||||
box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(255,120,15,0.22);
|
} else {
|
||||||
border-radius: 50%;
|
this.testlist = res.data.orderList;
|
||||||
display: flex;
|
}
|
||||||
flex-direction: column;
|
});
|
||||||
align-items: center;
|
},
|
||||||
justify-content: center;
|
// 获取订单列表
|
||||||
> image {
|
getallorder(type) {
|
||||||
width: 36rpx;
|
let that = this;
|
||||||
height: 36rpx;
|
this.$u.api.getorderlist({
|
||||||
flex-shrink: 0;
|
type: type,
|
||||||
margin-bottom: 2rpx;
|
page: that.num
|
||||||
}
|
}).then(res => {
|
||||||
.text {
|
if (res.errCode != 0) {
|
||||||
font-size: 20rpx;
|
this.$refs.uToast.show({
|
||||||
color: rgba(255,255,255,1);
|
title: res.message,
|
||||||
}
|
type: 'error'
|
||||||
}
|
});
|
||||||
.confirm-complaint {
|
} else {
|
||||||
text-align: center;
|
let arr = res.data;
|
||||||
padding-bottom: 20rpx;
|
for (let index in arr) {
|
||||||
.text {
|
if (type == 0) {
|
||||||
text-align: center;
|
this.allorder.push(arr[index]);
|
||||||
width: 420rpx;
|
} else if (type == 1) {
|
||||||
padding: 55rpx 112rpx;
|
this.worklist.push(arr[index]);
|
||||||
font-size: 28rpx;
|
} else if (type == 2) {
|
||||||
color: rgba(51,51,51,1);
|
this.translist.push(arr[index]);
|
||||||
line-height: 4r2px;
|
} else if (type == 3) {
|
||||||
> view:first-child {
|
this.finshlist.push(arr[index]);
|
||||||
margin-bottom: 20rpx;
|
} else if (type == 4) {
|
||||||
}
|
this.badlist.push(arr[index]);
|
||||||
}
|
} else if (type == 5) {
|
||||||
.btn {
|
this.badlist.push(arr[index]);
|
||||||
width: 200rpx;
|
}
|
||||||
height: 60rpx;
|
}
|
||||||
background: rgba(255,120,15,1);
|
}
|
||||||
border-radius: 30rpx;
|
});
|
||||||
text-align: center;
|
},
|
||||||
line-height: 60rpx;
|
// 获取轮播图
|
||||||
font-size: 28rpx;
|
getswiper() {
|
||||||
color: rgba(255,255,255,1);
|
this.imageList = [
|
||||||
margin: 0 auto;
|
{
|
||||||
}
|
image: '../../static/image/index/swiper.png'
|
||||||
}
|
},
|
||||||
.publish{
|
{
|
||||||
display: flex;
|
image: '../../static/image/index/swiper.png'
|
||||||
flex-direction: column;
|
},
|
||||||
justify-content: space-between;
|
{
|
||||||
align-items: center;
|
image: '../../static/image/index/swiper.png'
|
||||||
padding: 50rpx 84rpx 31rpx 78rpx;
|
}
|
||||||
image{
|
];
|
||||||
background-color: #0f0;
|
},
|
||||||
}
|
// 打开发布弹窗
|
||||||
.list{
|
publish() {
|
||||||
display: flex;
|
this.publishstate = true;
|
||||||
align-items: center;
|
},
|
||||||
justify-content: space-between;
|
// 骑手投诉点击确定
|
||||||
width: 100%;
|
setWorker(e) {
|
||||||
>view{
|
let arr = this.carlist;
|
||||||
display: flex;
|
for (let index in arr) {
|
||||||
flex-direction: column;
|
if (arr[index].takeawayer_id == e[0].value) {
|
||||||
align-items: center;
|
this.reportinfo = arr[index];
|
||||||
>image{
|
}
|
||||||
width: 94rpx;
|
}
|
||||||
height: 80rpx;
|
this.worker = {
|
||||||
}
|
name: e[0].label,
|
||||||
>text{
|
id: e[0].value
|
||||||
margin-top: 10rpx;
|
};
|
||||||
font-size: 28rpx;
|
},
|
||||||
color: #333;
|
// 导航栏点击事件
|
||||||
font-weight: 400;
|
tabsChange(index) {
|
||||||
}
|
this.swiperCurrent = index;
|
||||||
}
|
this.current = index;
|
||||||
}
|
this.num = 1;
|
||||||
.off{
|
this.resetarr();
|
||||||
margin-top: 81rpx;
|
if (index == 6) {
|
||||||
width: 37rpx;
|
this.getallorder(4);
|
||||||
height: 37rpx;
|
}
|
||||||
}
|
this.reset();
|
||||||
}
|
},
|
||||||
}
|
// 发布内容跳转页面
|
||||||
</style>
|
navto(url) {
|
||||||
|
this.publishstate = false;
|
||||||
|
this.$u.route({
|
||||||
|
url: `/pages/${url}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.home {
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
background-color: #ececec;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.image-swiper {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0 30rpx 16rpx;
|
||||||
|
}
|
||||||
|
.tab-swiper {
|
||||||
|
margin: 2rpx 0 20rpx 0;
|
||||||
|
}
|
||||||
|
.complaint {
|
||||||
|
margin: 0 30rpx;
|
||||||
|
padding: 75rpx 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
.select-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
.title {
|
||||||
|
width: 180rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.select {
|
||||||
|
padding: 18rpx 20rpx;
|
||||||
|
width: 490rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: rgba(236, 236, 236, 1);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
> view {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
> image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 13rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.worker {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #ececec;
|
||||||
|
> view {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.textarea {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
.title {
|
||||||
|
width: 180rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: right;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
> textarea {
|
||||||
|
padding: 20rpx;
|
||||||
|
width: 430rpx;
|
||||||
|
height: 220rpx;
|
||||||
|
border: 1rpx solid #999999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
margin: 90rpx auto 0;
|
||||||
|
width: 630rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
background: rgba(255, 120, 15, 1);
|
||||||
|
border-radius: 44rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
line-height: 88rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.release-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 475rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background: rgba(255, 120, 15, 1);
|
||||||
|
box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(255, 120, 15, 0.22);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
> image {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.confirm-complaint {
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
.text {
|
||||||
|
text-align: center;
|
||||||
|
width: 420rpx;
|
||||||
|
padding: 55rpx 112rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
line-height: 4r2px;
|
||||||
|
> view:first-child {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: rgba(255, 120, 15, 1);
|
||||||
|
border-radius: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.publish {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 50rpx 84rpx 31rpx 78rpx;
|
||||||
|
image {
|
||||||
|
}
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
> image {
|
||||||
|
width: 94rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
> text {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.off {
|
||||||
|
margin-top: 81rpx;
|
||||||
|
width: 37rpx;
|
||||||
|
height: 37rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
434
pages/index/otherdetails.vue
Normal 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>
|
||||||
@@ -2,353 +2,438 @@
|
|||||||
<!-- login页面 -->
|
<!-- login页面 -->
|
||||||
<view>
|
<view>
|
||||||
<view class="login">
|
<view class="login">
|
||||||
<image class="images" src=""></image>
|
<image class="images" :src="url"></image>
|
||||||
<view class="backes"></view>
|
<view class="backes"></view>
|
||||||
|
<view class="title_top">德铭阳光在线-商家端</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title_top">德铭阳光在线-商家端</view>
|
<view class="title">
|
||||||
<view class="title">账号登录</view>
|
<view v-bind:class="[state==0 ? 'show' : '']" @click="changetab(0)">
|
||||||
<view class="labales">
|
商家登录
|
||||||
<image src=""></image>
|
</view>
|
||||||
<input v-model="zhanghao" type="tel" placeholder="请输入账号" />
|
<view v-bind:class="[state==1 ? 'show' : '']" @click="changetab(1)">
|
||||||
|
达人登录
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="" v-if="state==0">
|
||||||
<image src=""></image>
|
<view class="labales">
|
||||||
<input v-model="mima" type="password" placeholder="请输入密码" />
|
<image src="../../static/image/login/login(3).png"></image>
|
||||||
|
<input v-model="zhanghao" type="text" placeholder="请输入账号" />
|
||||||
|
</view>
|
||||||
|
<view class="labales">
|
||||||
|
<image src="../../static/image/login/login(1).png"></image>
|
||||||
|
<input v-model="mima" type="password" placeholder="请输入密码" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="" v-else>
|
||||||
|
<view class="labales">
|
||||||
|
<image src="../../static/image/login/login(3).png"></image>
|
||||||
|
<input v-model="zhanghaoA" type="text" placeholder="请输入账号" />
|
||||||
|
</view>
|
||||||
|
<view class="labales">
|
||||||
|
<image src="../../static/image/login/login(1).png"></image>
|
||||||
|
<input v-model="mimaA" type="password" placeholder="请输入密码" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- denglu QQ weixin -->
|
<!-- denglu QQ weixin -->
|
||||||
<u-button @click="logins">{{login}}</u-button>
|
<button @click="logins">{{ login }}</button>
|
||||||
|
<!-- <u-button :custom-style="customStyle" ></u-button> -->
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
checked: false,
|
checked: false,
|
||||||
disabled: false
|
disabled: false
|
||||||
}],
|
}
|
||||||
value: '',
|
],
|
||||||
login: '登录',
|
value: '',
|
||||||
show: false,
|
login: '登录',
|
||||||
zhanghao:"",
|
show: false,
|
||||||
mima:""
|
zhanghao: 'seller',
|
||||||
|
mima: '123456',
|
||||||
};
|
zhanghaoA: '18953829598 ',
|
||||||
|
mimaA: '123456',
|
||||||
|
url: '',
|
||||||
|
state:0,
|
||||||
|
clickstate:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 改变登陆类型
|
||||||
|
changetab(num){
|
||||||
|
this.state = num
|
||||||
},
|
},
|
||||||
methods: {
|
// 选中某个复选框时,由checkbox时触发
|
||||||
// 选中某个复选框时,由checkbox时触发
|
checkboxChange(e) {
|
||||||
checkboxChange(e) {
|
//console.log(e);
|
||||||
//console.log(e);
|
},
|
||||||
},
|
// 选中任一checkbox时,由checkbox-group触发
|
||||||
// 选中任一checkbox时,由checkbox-group触发
|
checkboxGroupChange(e) {
|
||||||
checkboxGroupChange(e) {
|
// console.log(e);
|
||||||
// console.log(e);
|
},
|
||||||
},
|
mask_u() {
|
||||||
mask_u(){
|
this.show = !this.show;
|
||||||
this.show = !this.show
|
},
|
||||||
},
|
// 获取验证码倒计时
|
||||||
// 获取验证码倒计时
|
getCode() {
|
||||||
getCode(){
|
console.log('11');
|
||||||
console.log("11")
|
this.loading();
|
||||||
this.loading()
|
},
|
||||||
},
|
loading() {},
|
||||||
loading(){
|
logins() {
|
||||||
|
// 判断是否可以点击
|
||||||
},
|
if(this.clickstate==false){
|
||||||
logins(){
|
this.clickstate=true
|
||||||
this.$u.api.login({member_name:this.zhanghao,member_password:this.mima}).then((res)=>{
|
}else{
|
||||||
console.log(res)
|
this.$refs.uToast.show({
|
||||||
if(res.errCode != 0){
|
title: "不能重复提交",
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 清除本地存储才可以正常登陆(具体原因没有仔细检查)
|
||||||
|
uni.clearStorage();
|
||||||
|
// 账号登录1达人0商家
|
||||||
|
if(this.state==1){
|
||||||
|
this.$u.api.login({ member_name: this.zhanghaoA, member_password: this.mimaA }).then(res => {
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
// 恢复按钮可点击状态
|
||||||
|
this.clickstate=false
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
});
|
||||||
}else{
|
} else {
|
||||||
uni.setStorageSync("token",res.data.token)
|
|
||||||
uni.setStorageSync("userinfo",res.data)
|
|
||||||
uni.setStorageSync('rongyun',res.data.rongcloud_token)
|
|
||||||
this.$u.route({
|
|
||||||
url:"/pages/index/index",
|
|
||||||
type:"switchTab"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(){
|
|
||||||
let token = uni.getStorageSync('token');
|
|
||||||
|
|
||||||
if(token != undefined && token){
|
uni.setStorageSync('token', res.data.token);
|
||||||
this.$u.route({
|
uni.setStorageSync('userinfo', res.data);
|
||||||
url:"/pages/index/index"
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
})
|
this.$u.route({
|
||||||
|
url: '/pages/user/myinfo'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
// 恢复按钮可点击状态
|
||||||
|
this.clickstate=false
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync('token', res.data.token);
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
type: 'switchTab'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
onLoad() {
|
||||||
|
let token = uni.getStorageSync('token');
|
||||||
|
|
||||||
|
if (token != undefined && token) {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.login {
|
||||||
.login {
|
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
|
||||||
|
.images {
|
||||||
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
|
position: fixed;
|
||||||
.images {
|
width: 100%;
|
||||||
position: fixed;
|
height: 100%;
|
||||||
width: 100%;
|
top: 0;
|
||||||
height: 100%;
|
left: 0;
|
||||||
top: 0;
|
z-index: -1;
|
||||||
left: 0;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.backes {
|
|
||||||
background: rgba(0, 0, 0, 0.4);
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: -1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
text {
|
|
||||||
z-index: 9;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more_Login {
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
width: 630rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more_Login text {
|
|
||||||
display: inline-block;
|
|
||||||
width: 50%;
|
|
||||||
float: left;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: rgba(255, 255, 255, 1);
|
|
||||||
line-height: 36px;
|
|
||||||
margin: 97rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more_Login .other {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.backes {
|
||||||
font-size: 36rpx;
|
background: rgba(0, 0, 0, 0.4);
|
||||||
font-weight: bold;
|
position: fixed;
|
||||||
margin-bottom: 150rpx;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
z-index: 9;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
letter-spacing: 3rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.more_Login {
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
z-index: 99999;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-top: 300rpx;
|
|
||||||
|
|
||||||
.labales text {
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.labales {
|
|
||||||
border-bottom: 1px #fff solid;
|
|
||||||
margin-bottom: 180rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
line-height: 70rpx;
|
|
||||||
position: relative;
|
|
||||||
input{
|
|
||||||
width: 80%;
|
|
||||||
margin-left: 60rpx;
|
|
||||||
color: #fff;
|
|
||||||
letter-spacing: 2rpx;
|
|
||||||
background-color: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.labales image{
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 39rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
}
|
|
||||||
.labales:nth-child(3) {
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 60rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identifying {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
margin: auto;
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: rgba(255, 120, 15, 1);
|
|
||||||
line-height: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.uni-input-input, .uni-input-placeholder{
|
|
||||||
color:#fff!important;
|
|
||||||
letter-spacing: 2rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pact text {
|
.more_Login text {
|
||||||
font-size: 22rpx;
|
display: inline-block;
|
||||||
font-weight: 400;
|
width: 50%;
|
||||||
|
float: left;
|
||||||
|
font-size: 30rpx;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
margin: 97rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pact_text {
|
.more_Login .other {
|
||||||
font-size: 22px;
|
text-align: right;
|
||||||
font-weight: 400;
|
}
|
||||||
color: rgba(129, 188, 253, 1) !important;
|
}
|
||||||
line-height: 36px;
|
|
||||||
|
.title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 150rpx;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.title view{
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.title .show{
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 630rpx;
|
||||||
|
z-index: 99999;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-top: 300rpx;
|
||||||
|
|
||||||
|
.labales text {
|
||||||
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
//单选框的样式
|
.labales {
|
||||||
.pact {
|
border-bottom: 1px #fff solid;
|
||||||
|
margin-bottom: 180rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 40rpx;
|
input {
|
||||||
overflow:hidden; //超出的文本隐藏
|
width: 80%;
|
||||||
text-overflow:ellipsis; //溢出用省略号显示
|
margin-left: 60rpx;
|
||||||
white-space:nowrap; //溢出不换行
|
color: #fff;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
background-color: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.labales image {
|
||||||
.u-checkbox-group {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin: auto;
|
width: 39rpx;
|
||||||
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
.labales:nth-child(3) {
|
||||||
.u-checkbox__icon--square {
|
|
||||||
border-radius: 50rpx !important;
|
|
||||||
width: 22rpx;
|
|
||||||
height: 22rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-btn {
|
|
||||||
width: 628rpx;
|
|
||||||
height: 98rpx;
|
|
||||||
background: rgba(255, 120, 15, 1) !important;
|
|
||||||
border-radius: 49rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: rgba(255, 255, 255, 1) !important;
|
|
||||||
line-height: 36px;
|
|
||||||
border: 1px #ff780f solid;
|
|
||||||
outline: none;
|
|
||||||
border-color: rgba(255, 120, 15, 1) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warp {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rect {
|
|
||||||
width: 558rpx;
|
|
||||||
height: 300rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
margin-bottom: 60rpx;
|
||||||
flex-wrap:wrap;
|
}
|
||||||
display: -webkit-flex; /* Safari */
|
|
||||||
.rect_view{
|
.identifying {
|
||||||
width: 100rpx;
|
position: absolute;
|
||||||
height: 100rpx;
|
right: 0;
|
||||||
.image{
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgba(255, 120, 15, 1);
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.uni-input-input,
|
||||||
|
.uni-input-placeholder {
|
||||||
|
color: #fff !important;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pact text {
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
line-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pact_text {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(129, 188, 253, 1) !important;
|
||||||
|
line-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
//单选框的样式
|
||||||
|
.pact {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 40rpx;
|
||||||
|
overflow: hidden; //超出的文本隐藏
|
||||||
|
text-overflow: ellipsis; //溢出用省略号显示
|
||||||
|
white-space: nowrap; //溢出不换行
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-checkbox-group {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-checkbox__icon--square {
|
||||||
|
border-radius: 50rpx !important;
|
||||||
|
width: 22rpx;
|
||||||
|
height: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-btn {
|
||||||
|
width: 628rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255, 120, 15, 1) !important;
|
||||||
|
border-radius: 49rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255, 255, 255, 1) !important;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px #ff780f solid;
|
||||||
|
outline: none;
|
||||||
|
border-color: rgba(255, 120, 15, 1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warp {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rect {
|
||||||
|
width: 558rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
display: -webkit-flex; /* Safari */
|
||||||
|
.rect_view {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
.image {
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 53rpx;
|
height: 53rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
}
|
|
||||||
flex:1;
|
|
||||||
margin-top: 77rpx;
|
|
||||||
}
|
|
||||||
.rect_view:nth-child(2) image{
|
|
||||||
width: 57rpx;
|
|
||||||
height: 45rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rect_butoon{
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
height: 85rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 85rpx;
|
|
||||||
border-top: 1px #999999 solid;
|
|
||||||
}
|
|
||||||
view{
|
|
||||||
color: #666;
|
|
||||||
font-size:24rpx;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
flex: 1;
|
||||||
|
margin-top: 77rpx;
|
||||||
}
|
}
|
||||||
.rect_view:nth-child(1) image,.rect_view:nth-child(1) view{
|
.rect_view:nth-child(2) image {
|
||||||
float: right;
|
width: 57rpx;
|
||||||
|
height: 45rpx;
|
||||||
}
|
}
|
||||||
.rect_view:nth-child(1) image{
|
|
||||||
margin-right: 20rpx;
|
.rect_butoon {
|
||||||
}
|
width: 100%;
|
||||||
.rect_view:nth-child(1){
|
|
||||||
position: relative;
|
|
||||||
margin-right: 79rpx;
|
|
||||||
}
|
|
||||||
.rect_view:nth-child(1) view{
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
height: 85rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 85rpx;
|
||||||
|
border-top: 1px #999999 solid;
|
||||||
}
|
}
|
||||||
.rect_view:nth-child(2) image,.rect_view:nth-child(2) view{
|
view {
|
||||||
float: left;
|
color: #666;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
.rect_view:nth-child(2) image{
|
}
|
||||||
margin-left: 20rpx;
|
.rect_view:nth-child(1) image,
|
||||||
}
|
.rect_view:nth-child(1) view {
|
||||||
.rect_view:nth-child(2){
|
float: right;
|
||||||
position: relative;
|
}
|
||||||
}
|
.rect_view:nth-child(1) image {
|
||||||
.rect_view:nth-child(2) view{
|
margin-right: 20rpx;
|
||||||
position: absolute;
|
}
|
||||||
bottom: 0;
|
.rect_view:nth-child(1) {
|
||||||
left: 0;
|
position: relative;
|
||||||
}
|
margin-right: 79rpx;
|
||||||
.title_top {
|
}
|
||||||
position: fixed;
|
.rect_view:nth-child(1) view {
|
||||||
top: 36rpx;
|
position: absolute;
|
||||||
left: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: auto;
|
}
|
||||||
font-size:36rpx;
|
.rect_view:nth-child(2) image,
|
||||||
color:rgba(255,255,255,1);
|
.rect_view:nth-child(2) view {
|
||||||
text-align: center;
|
float: left;
|
||||||
width: 100%;
|
}
|
||||||
/* 如果您想让slot内容占满整个导航栏的宽度 */
|
.rect_view:nth-child(2) image {
|
||||||
/* flex: 1; */
|
margin-left: 20rpx;
|
||||||
/* 如果您想让slot内容与导航栏左右有空隙 */
|
}
|
||||||
/* padding: 0 30rpx; */
|
.rect_view:nth-child(2) {
|
||||||
background: none;
|
position: relative;
|
||||||
letter-spacing: 4rpx;
|
}
|
||||||
}
|
.rect_view:nth-child(2) view {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.title_top {
|
||||||
|
position: fixed;
|
||||||
|
top: calc(var(--status-bar-height) + 18px);
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: auto;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
/* 如果您想让slot内容占满整个导航栏的宽度 */
|
||||||
|
/* flex: 1; */
|
||||||
|
/* 如果您想让slot内容与导航栏左右有空隙 */
|
||||||
|
/* padding: 0 30rpx; */
|
||||||
|
background: none;
|
||||||
|
letter-spacing: 4rpx;
|
||||||
|
}
|
||||||
|
button{
|
||||||
|
width: 670rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
background-color: #ff780f;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -1,370 +1,499 @@
|
|||||||
<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="请输入标题" />
|
<!-- form-data -->
|
||||||
</u-form-item>
|
<view class="titles">封面</view>
|
||||||
|
<u-upload
|
||||||
|
:form-data="coverformdata"
|
||||||
|
:max-count="1"
|
||||||
|
:header="header"
|
||||||
|
name="article_cover"
|
||||||
|
:action="action"
|
||||||
|
del-color="#ececec"
|
||||||
|
upload-text="选择图片"
|
||||||
|
del-bg-color="#fff"
|
||||||
|
:file-list="fileListA"
|
||||||
|
@on-success="uploadcover"
|
||||||
|
></u-upload>
|
||||||
<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
|
||||||
|
:form-data="imgformdata"
|
||||||
|
name="article_image"
|
||||||
|
:header="header"
|
||||||
|
:action="action"
|
||||||
|
@on-success="uploadphoto"
|
||||||
|
del-color="#ececec"
|
||||||
|
upload-text="选择图片"
|
||||||
|
del-bg-color="#fff"
|
||||||
|
:max-count="5"
|
||||||
|
:file-list="fileListB"
|
||||||
|
></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="[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>
|
<view class="titles">简介</view>
|
||||||
<view class="titles_border">
|
<view class="titles_border"><textarea placeholder="请输入内容..." v-model="form.intro"></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-for="list in shoplist">
|
||||||
<view>
|
<view><image :src="list.goods_image" mode="scaleToFill"></image></view>
|
||||||
<image src="../../static/image/tosign/tosigin(5).png" mode="scaleToFill"></image>
|
<view>{{ list.goods_name }}</view>
|
||||||
</view>
|
<view><image src="../../static/image/tosign/delete.png" mode="widthFix" @click="delarr(list.goods_id)"></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" @click="publish">发表</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="tagcontent" /></view>
|
||||||
</view>
|
<u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
||||||
<view class="u-inputes">
|
|
||||||
<u-input v-model="form.name" />
|
|
||||||
</view>
|
|
||||||
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
|
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</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: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
||||||
fileList: [],
|
coverformdata: {
|
||||||
fileListes: ["美妆", "博主穿搭", "美妆", "美妆", "美妆", "美妆", "美妆", "博主穿搭"],
|
name: 'article_cover'
|
||||||
show: false,
|
},
|
||||||
show_two: false,
|
imgformdata: {
|
||||||
filesList: [],
|
name: 'article_image'
|
||||||
arres_list : [],
|
},
|
||||||
checked: false,
|
fileListA: [],
|
||||||
list: [{
|
fileListB: [],
|
||||||
name: 'apple',
|
imgarrA: [],
|
||||||
checked: false,
|
imgarrB: [],
|
||||||
disabled: false,
|
header: {
|
||||||
content: "木糖少女小紫薯西装领连衣裙夏季新款女装装领连衣裙夏季装领连衣裙夏季装领连衣裙夏季夏收腰格子格纹裙子",
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
url: '../../static/image/tosign/tosigin(5).png',
|
},
|
||||||
id : '1'
|
fileListes: [],
|
||||||
},
|
show: false,
|
||||||
{
|
show_two: false,
|
||||||
name: 'apple2',
|
filesList: [],
|
||||||
checked: false,
|
arres_list: [],
|
||||||
disabled: false,
|
shoplist: [],
|
||||||
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
|
checked: false,
|
||||||
url: '../../static/image/tosign/tosigin(5).png',
|
list: [],
|
||||||
id : '2'
|
List_tosign: [],
|
||||||
},
|
scrollTop: 0,
|
||||||
{
|
imgarr: [], //上传图片数组
|
||||||
name: 'appl3e',
|
cover: '', //图文封面
|
||||||
checked: false,
|
selectarr: [], //选中标签
|
||||||
disabled: false,
|
tagcontent: ''
|
||||||
content: "木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子",
|
};
|
||||||
url: '../../static/image/tosign/tosigin(5).png',
|
},
|
||||||
id : '3'
|
onLoad() {
|
||||||
},
|
// 缓存取选择好的数据
|
||||||
],
|
this.tosign();
|
||||||
List_tosign : []
|
this.getLiveSpec();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
publish() {
|
||||||
|
let arr = this.imgarrB;
|
||||||
|
let newarr = [];
|
||||||
|
for (let index in arr) {
|
||||||
|
newarr.push(arr[index].file_id);
|
||||||
}
|
}
|
||||||
|
this.$u.api.publishphoto({
|
||||||
},
|
article_title: this.form.name,
|
||||||
onLoad(){
|
article_content: this.form.intro,
|
||||||
// 缓存取选择好的数据
|
article_pic: this.imgarrA[0].file_name,
|
||||||
this.tosign()
|
file_id: newarr,
|
||||||
},
|
goods_id_arr: this.arres_list,
|
||||||
methods: {
|
label_arr: this.selectarr
|
||||||
changes() {
|
}).then(res => {
|
||||||
let that = this;
|
if (res.errCode != 0) {
|
||||||
that.show_two = false;
|
this.$refs.uToast.show({
|
||||||
console.log(that.arres_list);
|
title: res.message,
|
||||||
// 过滤数组
|
type: 'error'
|
||||||
that.arres_list = [...new Set(that.arres_list)];
|
});
|
||||||
console.log(that.arres_list)
|
} else {
|
||||||
},
|
this.$refs.uToast.show({
|
||||||
show_add() {
|
title: res.message,
|
||||||
console.log(this.show)
|
type: 'success'
|
||||||
this.show = !this.show
|
});
|
||||||
},
|
setTimeout(function(){
|
||||||
// 选中某个复选框时,由checkbox时触发
|
uni.navigateBack({
|
||||||
checkboxChange(e) {
|
delta:1
|
||||||
console.log(e);
|
})
|
||||||
if(e.value == true){
|
},1000)
|
||||||
let id = e.name;
|
|
||||||
this.pushes(id)
|
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
pushes(id){
|
},
|
||||||
var that = this;
|
// 获取商品数组变化
|
||||||
console.log(id)
|
getshoplist() {
|
||||||
if(id == ''){
|
let arr = this.arres_list;
|
||||||
console.log("为空")
|
let newarr = this.list;
|
||||||
}else{
|
this.shoplist = [];
|
||||||
that.arres_list.push(id);
|
for (let index in arr) {
|
||||||
}
|
for (let i in newarr) {
|
||||||
},
|
if (arr[index] == newarr[i].goods_id) {
|
||||||
// 选中任一checkbox时,由checkbox-group触发
|
this.shoplist.push(newarr[i]);
|
||||||
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 改变选中状态
|
||||||
|
changeselect(num) {
|
||||||
|
if (this.fileListes[num].state == true) {
|
||||||
|
this.fileListes[num].state = false;
|
||||||
|
let index = this.selectarr.indexOf(this.fileListes[num].id);
|
||||||
|
this.selectarr.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
this.fileListes[num].state = true;
|
||||||
|
this.selectarr.push(this.fileListes[num].id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取标签
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 创建标签
|
||||||
|
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'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 上传封面
|
||||||
|
uploadcover(data) {
|
||||||
|
let obj = data.data;
|
||||||
|
obj.url = obj.file_path;
|
||||||
|
this.imgarrA.push(obj);
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
uploadphoto(data) {
|
||||||
|
let obj = data.data;
|
||||||
|
obj.url = obj.file_path;
|
||||||
|
this.imgarrB.push(obj);
|
||||||
|
},
|
||||||
|
changes() {
|
||||||
|
let that = this;
|
||||||
|
that.show_two = false;
|
||||||
|
},
|
||||||
|
show_add() {
|
||||||
|
this.show = !this.show;
|
||||||
|
},
|
||||||
|
// 选中某个复选框时,由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();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tosign() {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.active {
|
||||||
.u-mode-center-box {
|
background: red;
|
||||||
padding: 120rpx;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
font-size: 30rpx;
|
|
||||||
margin-top: 74rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.scroll {
|
||||||
.titles_border,
|
width: 100%;
|
||||||
.uni-textarea-compute {
|
height: 400px;
|
||||||
border: 1px #BABABA solid !important;
|
|
||||||
padding: 10rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
.titles {
|
||||||
.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>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<!-- 标签的引入 -->
|
<!-- 标签的引入 -->
|
||||||
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
|
<tap_tosign :fileListes="fileListes" @chuangjian="chuangjian" @qiehuan="qiehuan"></tap_tosign>
|
||||||
<view class="titles">直播封面图</view>
|
<view class="titles">直播封面图</view>
|
||||||
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :max-count="1" :show-progress="false" @on-change="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
|
<u-upload :form-data="{'name':'article_cover'}" action='https://dmmall.sdbairui.com/storeapi/Upload/uploadFile' name="article_cover" :header="{'Authorization' : 'Bearer' + ' ' + token}" :max-count="1" :show-progress="true" @on-change="tupian" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-uview">
|
<view class="button-uview">
|
||||||
<u-button @click="kaibo">{{relerest}}</u-button>
|
<u-button @click="kaibo">{{relerest}}</u-button>
|
||||||
@@ -60,7 +60,8 @@
|
|||||||
relerest: '开始直播',
|
relerest: '开始直播',
|
||||||
fileListes:[],
|
fileListes:[],
|
||||||
rSelect:[],
|
rSelect:[],
|
||||||
image:""
|
image:"",
|
||||||
|
token:""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
tupian(a){
|
tupian(a){
|
||||||
console.log(JSON.parse(a.data).data)
|
console.log(JSON.parse(a.data))
|
||||||
this.image = JSON.parse(a.data).data.file_name
|
this.image = JSON.parse(a.data).data.file_name
|
||||||
},
|
},
|
||||||
navto(url){
|
navto(url){
|
||||||
@@ -111,7 +112,8 @@
|
|||||||
url:"/pages/release/zhibo",
|
url:"/pages/release/zhibo",
|
||||||
params:{
|
params:{
|
||||||
url:res.data.url.replace("&","*"),
|
url:res.data.url.replace("&","*"),
|
||||||
id:res.data.chat_id
|
id:res.data.chat_id,
|
||||||
|
live_id: res.data.live_id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -137,6 +139,14 @@
|
|||||||
onLoad(){
|
onLoad(){
|
||||||
this.init()
|
this.init()
|
||||||
uni.removeStorageSync('gouwudai')
|
uni.removeStorageSync('gouwudai')
|
||||||
|
//
|
||||||
|
|
||||||
|
this.token = uni.getStorageSync('token');
|
||||||
|
var config = {
|
||||||
|
appkey: 'mgb7ka1',
|
||||||
|
debug:true
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -472,5 +482,6 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,70 +1,440 @@
|
|||||||
<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"
|
||||||
<!-- 标签 -->
|
:header="header"
|
||||||
<view>
|
name="article_cover"
|
||||||
<view class="titles">标签</view>
|
:action="action"
|
||||||
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
del-color="#ececec"
|
||||||
<view class="form-view" v-for="(item,index) in fileListes" :key="index">{{item}}</view>
|
upload-text="选择图片"
|
||||||
|
del-bg-color="#fff"
|
||||||
|
: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>
|
||||||
<u-button class="custom-style" shape="circle" size="default">发表</u-button>
|
<view class="show_two">
|
||||||
</u-form>
|
<u-popup v-model="show_two" mode="bottom" :closeable="true">
|
||||||
<!-- 添加标签的按钮 -->
|
<view class="title"><text>选择商品</text></view>
|
||||||
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
<!-- 商品列表 -->
|
||||||
<view class="text">
|
<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>
|
||||||
<view class="u-inputes">
|
<!-- 选择后的列表 -->
|
||||||
<u-input v-model="form.name" />
|
<view class="List_tosign" v-for="list in shoplist">
|
||||||
|
<view><image :src="list.goods_image" mode="scaleToFill"></image></view>
|
||||||
|
<view>{{ list.goods_name }}</view>
|
||||||
|
<view><image src="../../static/image/tosign/delete.png" mode="widthFix" @click="delarr(list.goods_id)"></image></view>
|
||||||
</view>
|
</view>
|
||||||
<u-button class="custom-style-button" shape="circle" size="default">确定</u-button>
|
</view>
|
||||||
</u-popup>
|
<!-- 提交 -->
|
||||||
|
<u-button class="custom-style" shape="circle" size="default" @click="publish">发表</u-button>
|
||||||
|
</u-form>
|
||||||
|
<!-- 添加标签的按钮 -->
|
||||||
|
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
||||||
|
<view class="text">创建属于你的标签吧</view>
|
||||||
|
<view class="u-inputes"><u-input v-model="tagcontent" /></view>
|
||||||
|
<u-button class="custom-style-button" shape="circle" size="default" @click="addLiveSpec">确定</u-button>
|
||||||
|
</u-popup>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</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',
|
|
||||||
fileList: [],
|
|
||||||
fileListes:["美妆","博主穿搭","美妆","美妆","美妆","美妆","美妆","博主穿搭"],
|
|
||||||
show: false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods:{
|
coverformdata: {
|
||||||
show_add(){
|
name: 'article_cover'
|
||||||
console.log(this.show)
|
|
||||||
this.show = !this.show
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
header: {
|
||||||
}
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
|
// 演示地址,请勿直接使用
|
||||||
|
action: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 发布短视频
|
||||||
|
publish() {
|
||||||
|
this.$u.api.publishvideo({
|
||||||
|
article_title: this.form.name,
|
||||||
|
article_content: this.form.intro,
|
||||||
|
article_pic: this.imgarrA[0].file_name,
|
||||||
|
video_path: this.videopath,
|
||||||
|
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() {
|
||||||
|
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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 改变选中状态
|
||||||
|
changeselect(num) {
|
||||||
|
if (this.fileListes[num].state == true) {
|
||||||
|
this.fileListes[num].state = false;
|
||||||
|
let index = this.selectarr.indexOf(this.fileListes[num].id);
|
||||||
|
this.selectarr.splice(index, 1);
|
||||||
|
} 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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 上传封面
|
||||||
|
uploadcover(data) {
|
||||||
|
let obj = data.data;
|
||||||
|
obj.url = obj.file_path;
|
||||||
|
this.imgarrA.push(obj);
|
||||||
|
},
|
||||||
|
// 上传视频
|
||||||
|
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;
|
||||||
.form-view{
|
.titles_border,
|
||||||
background:rgba(255,120,15,1);
|
.uni-textarea-compute {
|
||||||
border-radius:6rpx;
|
border: 1px #bababa solid !important;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.show_two {
|
||||||
|
padding: 30rpx 0 70rpx 0;
|
||||||
|
}
|
||||||
|
.scroll {
|
||||||
|
width: 100%;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
.u-button {
|
||||||
|
background: #ff780f;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
line-height: 98rpx;
|
||||||
|
background: rgba(255, 120, 15, 1);
|
||||||
|
border-radius: 49px;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto 20rpx;
|
||||||
|
}
|
||||||
|
.show_two .title {
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: solid 1px #ececec;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show_two .title > text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.show_two > view {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.show_two .images {
|
||||||
|
width: 22rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
float: right;
|
||||||
|
top: 14rpx;
|
||||||
|
}
|
||||||
|
.List_tosign {
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
margin-top: 21rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.List_tosign > view {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.List_tosign > view:nth-child(1) {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
image {
|
||||||
|
border-radius: 15rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.List_tosign > view:nth-child(2) {
|
||||||
|
width: 420rpx;
|
||||||
|
height: 76rpx;
|
||||||
|
margin: 43rpx 43rpx 0 21rpx;
|
||||||
|
}
|
||||||
|
.List_tosign > view:nth-child(3) {
|
||||||
|
width: 26rpx;
|
||||||
|
height: 27rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listes_shoping {
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listes_shoping > view {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listes_shoping > view:nth-child(1) {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin-top: 62rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listes_shoping > view:nth-child(2) {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
margin: 0 31rpx 0 19rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listes_shoping > view:nth-child(2) image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listes_shoping > view:nth-child(3) {
|
||||||
|
width: 425rpx;
|
||||||
|
margin-top: 43rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
.form-view {
|
||||||
|
background: rgba(255, 120, 15, 1);
|
||||||
|
border-radius: 6rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding: 8rpx 20rpx;
|
padding: 8rpx 20rpx;
|
||||||
@@ -72,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;
|
||||||
@@ -96,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;
|
||||||
@@ -106,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;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"
|
<live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"
|
||||||
mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2"
|
mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="meiyan + 1" whiteness="2"
|
||||||
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
|
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
|
||||||
:style="{'height':height + 'px'}"
|
:style="{'height':height + 'px'}"
|
||||||
></live-pusher>
|
></live-pusher>
|
||||||
@@ -41,9 +41,37 @@
|
|||||||
<image class="userhead" :src="info.member_avatar"></image>
|
<image class="userhead" :src="info.member_avatar"></image>
|
||||||
<div class="userinfo">
|
<div class="userinfo">
|
||||||
<text class="username">{{info.member_name}}</text>
|
<text class="username">{{info.member_name}}</text>
|
||||||
<text class="username" style="font-size:20rpx">asdasdsa | sadasdas</text>
|
<text class="username" style="font-size:20rpx">{{time}} | sadasdas</text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<image class="closeimg" src="../../static/image/close.png" @click="closes"></image>
|
||||||
|
<image class="menuimg" src="../../static/image/menu.png" @click="tool = true"></image>
|
||||||
|
<image class="shoptapimg" @click="xianshi" src="../../static/image/shop.png"></image>
|
||||||
|
<text style="font-size:26rpx;color:#fff;width:512rpx;position:fixed;left:30rpx;top:793rpx">德铭阳光在线绿色直播,请遵循相关法律法规,警察叔叔24小时巡查哦。为了保障直播系统稳定,现将全局开放防主播沉迷功能。主播积累直播16小时将自动下播休息2小时后方可继续开播。请大家注意休息/避免空播。
|
||||||
|
</text>
|
||||||
|
<div class="danmulist">
|
||||||
|
<text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bottom" :style="{'height':height + 'px'}" v-if="tool" @click="tool = false">
|
||||||
|
<view class="menu" @click="zuzhi">
|
||||||
|
<view class="menuback"></view>
|
||||||
|
<text class="menutitle">直播工具</text>
|
||||||
|
<view class="menutool">
|
||||||
|
<view class="menutoolitem" @click="switchCamera">
|
||||||
|
<image class="menutoolitemimg"></image>
|
||||||
|
<text class="menutoolitemtitle">翻转</text>
|
||||||
|
</view>
|
||||||
|
<picker @change="bindPickerChange" :value="meiyan" :range="[1,2,3,4,5,6,7,8,9]">
|
||||||
|
<view class="menutoolitem">
|
||||||
|
<image class="menutoolitemimg"></image>
|
||||||
|
<text class="menutoolitemtitle">美颜</text>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</div>
|
||||||
<!-- <button class="btn" @click="start">开始推流1</button>
|
<!-- <button class="btn" @click="start">开始推流1</button>
|
||||||
<button class="btn" @click="pause">暂停推流</button>
|
<button class="btn" @click="pause">暂停推流</button>
|
||||||
<button class="btn" @click="resume">resume</button>
|
<button class="btn" @click="resume">resume</button>
|
||||||
@@ -56,6 +84,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.shoptapimg{
|
||||||
|
width: 65rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
position: fixed;
|
||||||
|
right: 26rpx;
|
||||||
|
bottom: 24rpx;
|
||||||
|
}
|
||||||
|
.menuimg{
|
||||||
|
width: 60rpx;
|
||||||
|
height: 55rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 26rpx;
|
||||||
|
bottom: 24rpx;
|
||||||
|
}
|
||||||
|
.closeimg{
|
||||||
|
position: fixed;
|
||||||
|
top: 70rpx;
|
||||||
|
right: 31rpx;
|
||||||
|
width: 31rpx;
|
||||||
|
height: 31rpx;
|
||||||
|
}
|
||||||
.username{
|
.username{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -97,7 +146,6 @@
|
|||||||
.shopimg{
|
.shopimg{
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
background-color: #0f0;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -164,18 +212,83 @@
|
|||||||
z-index: 20;
|
z-index: 20;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.menu{
|
||||||
|
width: 750rpx;
|
||||||
|
height: 335rpx;
|
||||||
|
border-top-left-radius: 20rpx;
|
||||||
|
border-top-right-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.menuback{
|
||||||
|
background-color: #000;
|
||||||
|
opacity: 0.8;
|
||||||
|
position: absolute;
|
||||||
|
border-top-left-radius: 20rpx;
|
||||||
|
border-top-right-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.menutitle{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
.menutool{
|
||||||
|
flex-direction: row;
|
||||||
|
margin-top: 59rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
.menutoolitem{
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 60rpx;
|
||||||
|
}
|
||||||
|
.menutoolitemtitle{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.menutoolitemimg{
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
.danmulist{
|
||||||
|
position: fixed;
|
||||||
|
left: 30rpx;
|
||||||
|
bottom: 118rpx;
|
||||||
|
}
|
||||||
|
.danmuitem{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
}
|
||||||
|
.livePusher{
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
const RongIMLib = require('../../static/rongyun.js');
|
const ChatRoomService =require('../../static/chatservice');
|
||||||
export default {
|
export default {
|
||||||
data: {
|
data: {
|
||||||
fil: true,
|
fil: true,
|
||||||
url:'',
|
url:'',
|
||||||
height:0,
|
height:0,
|
||||||
show:true,
|
show:false,
|
||||||
list:[],
|
list:[],
|
||||||
info:{},
|
info:{},
|
||||||
im:{}
|
im:{},
|
||||||
|
chatroom_id:0,
|
||||||
|
live_id:0,
|
||||||
|
tool:false,
|
||||||
|
meiyan:0,
|
||||||
|
time:'00:00:00',
|
||||||
|
room:{},
|
||||||
|
chatRoomService:{},
|
||||||
|
danmulist:[]
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
// 注意:需要在onReady中 或 onLoad 延时
|
// 注意:需要在onReady中 或 onLoad 延时
|
||||||
@@ -191,14 +304,18 @@ const RongIMLib = require('../../static/rongyun.js');
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(a){
|
onLoad(a){
|
||||||
this.url = a.url.replace("*","&")
|
this.url = a.url.replace("*","&")
|
||||||
let that = this
|
let that = this
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
|
console.log('Bearer' + " " + token)
|
||||||
|
this.chatroom_id = a.id
|
||||||
|
this.live_id = a.live_id
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
headers:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
@@ -209,56 +326,168 @@ const RongIMLib = require('../../static/rongyun.js');
|
|||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
headers:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
console.log(res.data.data.memberInfo)
|
console.log(res.data)
|
||||||
that.info = res.data.data.memberInfo
|
that.info = res.data.data.memberInfo
|
||||||
|
|
||||||
|
console.log(uni.getStorageSync('userinfo'),123)
|
||||||
|
//当前用户
|
||||||
|
var currentUser = {
|
||||||
|
id : res.data.data.memberInfo.member_id + "",
|
||||||
|
nickname : res.data.data.memberInfo.member_nickname + "",
|
||||||
|
avatar: res.data.data.memberInfo.member_avatar
|
||||||
|
};
|
||||||
|
|
||||||
|
var room = {
|
||||||
|
id : a.id + "",
|
||||||
|
name : a.id + ""
|
||||||
|
};
|
||||||
|
console.log(room)
|
||||||
|
//构造chatRoomService
|
||||||
|
that.chatRoomService = new ChatRoomService(room, currentUser);
|
||||||
|
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||||
|
that.chatRoomService.connectGoEasyIM();
|
||||||
|
//获取当前聊天室数据
|
||||||
|
that.room = that.chatRoomService.room;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var config = {
|
let shi = 0;
|
||||||
appkey: 'mgb7ka1',
|
let fen = 0;
|
||||||
debug:true
|
let miao = 0;
|
||||||
};
|
setInterval(() => {
|
||||||
var im = RongIMLib.init(config);
|
shi = parseInt(shi)
|
||||||
var conversationList = []; // 当前已存在的会话列表
|
fen = parseInt(fen)
|
||||||
im.watch({
|
miao = parseInt(miao)
|
||||||
conversation: function(event){
|
miao = miao + 1
|
||||||
var updatedConversationList = event.updatedConversationList; // 更新的会话列表
|
// console.log(miao)
|
||||||
console.log('更新会话汇总:', updatedConversationList);
|
if(miao == 60){
|
||||||
console.log('最新会话列表:', im.Conversation.merge({
|
miao = 0;
|
||||||
conversationList,
|
fen +=1
|
||||||
updatedConversationList
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
message: function(event){
|
|
||||||
var message = event.message;
|
|
||||||
console.log('收到新消息:', message);
|
|
||||||
},
|
|
||||||
status: function(event){
|
|
||||||
var status = event.status;
|
|
||||||
console.log('连接状态码:', status);
|
|
||||||
}
|
}
|
||||||
});
|
if(fen == 60){
|
||||||
var user = {
|
shi += 1
|
||||||
token: uni.getStorageSync('rongyun')
|
fen = 0
|
||||||
};
|
}
|
||||||
im.connect(user).then(function(user) {
|
if(shi < 10){
|
||||||
console.log('链接成功, 链接用户 id 为: ', user.id);
|
shi = '0' + shi
|
||||||
}).catch(function(error) {
|
}
|
||||||
console.log('链接失败: ', error.code, error.msg);
|
if(fen < 10){
|
||||||
});
|
fen = '0' + fen
|
||||||
var chatRoom = im.ChatRoom.get({
|
}
|
||||||
id: a.id
|
if(miao < 10){
|
||||||
});
|
miao = '0' + miao
|
||||||
chatRoom.join({
|
}
|
||||||
count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
|
that.time = shi + ":" + fen + ":" + miao
|
||||||
}).then(function() {
|
}, 1000);
|
||||||
console.log('加入聊天室成功');
|
// var roomToken = JSON.parse(options.roomToken);
|
||||||
});
|
|
||||||
|
|
||||||
|
// //获取当前聊天室数据
|
||||||
|
// this.room = this.chatRoomService.room;
|
||||||
|
// var config = {
|
||||||
|
// appkey: 'mgb7ka1',
|
||||||
|
// debug:true
|
||||||
|
// };
|
||||||
|
// var im = RongIMLib.init(config);
|
||||||
|
// var conversationList = []; // 当前已存在的会话列表
|
||||||
|
// im.watch({
|
||||||
|
// conversation: function(event){
|
||||||
|
// var updatedConversationList = event.updatedConversationList; // 更新的会话列表
|
||||||
|
// console.log('更新会话汇总:', updatedConversationList);
|
||||||
|
// console.log('最新会话列表:', im.Conversation.merge({
|
||||||
|
// conversationList,
|
||||||
|
// updatedConversationList
|
||||||
|
// }));
|
||||||
|
// },
|
||||||
|
// message: function(event){
|
||||||
|
// var message = event.message;
|
||||||
|
// console.log('收到新消息:', message);
|
||||||
|
// },
|
||||||
|
// status: function(event){
|
||||||
|
// var status = event.status;
|
||||||
|
// console.log('连接状态码:', status);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// var user = {
|
||||||
|
// token: uni.getStorageSync('rongyun')
|
||||||
|
// };
|
||||||
|
// console.log(user,123)
|
||||||
|
// im.connect(user).then(function(user) {
|
||||||
|
// console.log('链接成功, 链接用户 id 为: ', user.id);
|
||||||
|
// }).catch(function(error) {
|
||||||
|
// console.log('链接失败: ', error.code, error);
|
||||||
|
// });
|
||||||
|
// var chatRoom = im.ChatRoom.get({
|
||||||
|
// id: a.id
|
||||||
|
// })
|
||||||
|
// chatRoom.join({
|
||||||
|
// count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
|
||||||
|
// }).then(function() {
|
||||||
|
// console.log('加入聊天室成功');
|
||||||
|
// }).catch((err)=>{
|
||||||
|
// console.log(err,262)
|
||||||
|
// })
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
whenNewMessage (message) {//新消息监听
|
||||||
|
// if(message.type == this.room.MessageType.PROP){
|
||||||
|
// this.propAnimation(parseInt(message.content))
|
||||||
|
// }
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.contentPosition = 'message-box'+(this.room.messages.length-1);
|
||||||
|
// }, 300)
|
||||||
|
console.log(message)
|
||||||
|
this.danmulist.push(message)
|
||||||
|
if(this.danmulist.length > 7){
|
||||||
|
this.danmulist = this.danmulist.slice(this.danmulist.length - 7)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bindPickerChange(a){
|
||||||
|
console.log(a.detail.value)
|
||||||
|
this.meiyan = a.detail.value
|
||||||
|
uni.showToast({
|
||||||
|
title: '切换成功',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closes(){
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
let that = this
|
||||||
|
console.log(that.url)
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否关闭直播',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/storeapi/Streaming/destroyChatRoom",
|
||||||
|
data:{
|
||||||
|
chatroom_id:that.chatroom_id,
|
||||||
|
live_id:that.live_id,
|
||||||
|
url: that.url
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
// that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
statechange(e) {
|
statechange(e) {
|
||||||
console.log("statechange:" + JSON.stringify(e));
|
console.log("statechange:" + JSON.stringify(e));
|
||||||
},
|
},
|
||||||
@@ -338,6 +567,10 @@ const RongIMLib = require('../../static/rongyun.js');
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
xianshi(){
|
||||||
|
this.show = true;
|
||||||
|
console.log(111)
|
||||||
|
},
|
||||||
guanbi(){
|
guanbi(){
|
||||||
this.show = false
|
this.show = false
|
||||||
console.log(123)
|
console.log(123)
|
||||||
@@ -361,7 +594,7 @@ const RongIMLib = require('../../static/rongyun.js');
|
|||||||
data:{
|
data:{
|
||||||
goods_id:arr.join(',')
|
goods_id:arr.join(',')
|
||||||
},
|
},
|
||||||
headers:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
@@ -369,7 +602,7 @@ const RongIMLib = require('../../static/rongyun.js');
|
|||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
headers:{
|
header:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
|
|||||||
@@ -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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -1,94 +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" @animationfinish="animationfinish">
|
|
||||||
<swiper-item class="swiper-item">
|
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" class="list">
|
|
||||||
<view v-for="(item, index) in 5" :key="index">
|
|
||||||
<ContentItem :cur="current" :delItem="showPopup"></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 5" :key="index">
|
|
||||||
<ContentItem :cur="current" :delItem="showPopup"></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: '视频'
|
},
|
||||||
}],
|
{
|
||||||
}
|
name: '视频'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
type: 1,
|
||||||
|
num: 1,
|
||||||
|
newlist: [],
|
||||||
|
delid:null,
|
||||||
|
msg:""
|
||||||
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ContentItem
|
ContentItem
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.num++;
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showPopup() {
|
getlist() {
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.articlelist({
|
||||||
|
type: that.type,
|
||||||
|
page: that.num
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let arr = res.data.articleList;
|
||||||
|
for (let index in arr) {
|
||||||
|
that.newlist.push(arr[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
del(e) {
|
||||||
|
// 提示是否删除弹窗
|
||||||
|
if(this.type==1){
|
||||||
|
this.msg="确定要删除该图文吗?"
|
||||||
|
}else{
|
||||||
|
this.msg="确定要删除该视频吗?"
|
||||||
|
}
|
||||||
this.show = true;
|
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;
|
||||||
animationfinish(e) {
|
this.num = 0;
|
||||||
let current = e.detail.current;
|
this.newlist = [];
|
||||||
// this.$refs.uTabs.setFinishCurrent(current);
|
this.getlist();
|
||||||
this.swiperCurrent = current;
|
}
|
||||||
this.current = current;
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</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;
|
||||||
@@ -98,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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -3,29 +3,54 @@
|
|||||||
<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 3" :key="index">
|
<view v-for="(item, index) in newfans" :key="index">
|
||||||
<FansItem></FansItem>
|
<FansItem :info="item"></FansItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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 13" :key="index">
|
<view v-for="(item, index) in myfans" :key="index">
|
||||||
<FansItem></FansItem>
|
<FansItem :info="item"></FansItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import FansItem from '@/components/fans-item/index'
|
import FansItem from '@/components/fans-item/index'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
myfans:[],
|
||||||
|
newfans:[]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
FansItem
|
FansItem
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.fans()
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
fans(){
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.myfanlist({}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
that.myfans = res.data.fans
|
||||||
|
that.newfans = res.data.fansNewest
|
||||||
|
console.log(that.myfans,that.newfans)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<view class="user">
|
<view class="user">
|
||||||
<view class="head" @click="toOthersPage('info')">
|
<view class="head" @click="toOthersPage('info')">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<image></image>
|
<image :src="info.member_avatar"></image>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text>萨大赛</text>
|
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
||||||
<text>账号:123456789</text>
|
<text>账号:{{info.member_name}}</text>
|
||||||
<text>个性签名:为梦努力</text>
|
<text>个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
@@ -23,12 +23,36 @@
|
|||||||
<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>
|
||||||
export default {
|
export default {
|
||||||
name:"user",
|
name:"user",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getmyinfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取个人信息
|
||||||
|
getmyinfo(){
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.getshopinfo({}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.info = res.data.memberInfo
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
toOthersPage(url) {
|
toOthersPage(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/user/' + url
|
url: '/pages/user/' + url
|
||||||
@@ -57,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;
|
||||||
|
|||||||
@@ -1,45 +1,105 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="head" @click="showImage=true">
|
<view class="head" @click="chooseImage">
|
||||||
<image></image>
|
<image :src="fileurl" :key="num"></image>
|
||||||
<text>更换头像</text>
|
<text>更换头像</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
|
||||||
<text class="title">用户名</text>
|
|
||||||
<text class="value">兽兽</text>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="title">个性签名</text>
|
<text class="title">用户名</text>
|
||||||
<text class="value">变瘦变高变有钱</text>
|
<input type="text" value="" v-model="info.member_nickname" placeholder="请输入用户名"/>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="title">个性签名</text>
|
||||||
|
<input type="text" value="" v-model="info.signature" placeholder="请输入个性签名"/>
|
||||||
|
</view>
|
||||||
<view class="password" @click="updatePwd">
|
<view class="password" @click="updatePwd">
|
||||||
<text>修改密码</text>
|
<text>修改密码</text>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<u-popup v-model="showImage" mode="bottom">
|
<u-toast ref="uToast" />
|
||||||
<view class="image-popup">
|
</view>
|
||||||
<view @click="chooseImage('camera')">拍摄新照片</view>
|
|
||||||
<view @click="chooseImage('album')">从相册选取</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:"info",
|
name: 'info',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showImage: false
|
fileurl: "",
|
||||||
}
|
filename:"",
|
||||||
|
info:{},
|
||||||
|
num:0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getmyinfo()
|
||||||
|
},
|
||||||
|
onNavigationBarButtonTap() {
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.changeinfo({
|
||||||
|
nickname:that.info.member_nickname,
|
||||||
|
avatar:that.filename,
|
||||||
|
signature:that.info.signature
|
||||||
|
}).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'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取个人信息
|
||||||
|
getmyinfo(){
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.getshopinfo({}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.info = res.data.memberInfo
|
||||||
|
this.fileurl = res.data.memberInfo.member_avatar
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取图片,上传图片
|
||||||
chooseImage(sourceType) {
|
chooseImage(sourceType) {
|
||||||
|
let that = this
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: [sourceType],
|
success: function(res) {
|
||||||
success: function (res) {
|
|
||||||
console.log(JSON.stringify(res.tempFilePaths));
|
console.log(JSON.stringify(res.tempFilePaths));
|
||||||
|
const tempFilePaths = res.tempFilePaths;
|
||||||
|
that.fileurl = tempFilePaths[0]
|
||||||
|
uni.uploadFile({
|
||||||
|
url: 'https://dmmall.sdbairui.com/storeapi/Upload/uploadFile',
|
||||||
|
filePath: tempFilePaths[0],
|
||||||
|
name: 'avatar',
|
||||||
|
formData:{
|
||||||
|
name:"avatar"
|
||||||
|
},
|
||||||
|
header:{
|
||||||
|
Authorization:'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success: uploadFileRes => {
|
||||||
|
let obj = JSON.parse(uploadFileRes.data)
|
||||||
|
that.fileurl = obj.data.file_path
|
||||||
|
that.filename = obj.data.file_name
|
||||||
|
that.num++
|
||||||
|
console.log(that.fileurl,that.filename)
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -48,50 +108,49 @@ export default {
|
|||||||
url: '/pages/user/updatePassword'
|
url: '/pages/user/updatePassword'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.info{
|
.info {
|
||||||
min-height: calc(100vh - var(--window-top));
|
min-height: calc(100vh - var(--window-top));
|
||||||
background: #ececec;
|
background: #ececec;
|
||||||
.head{
|
.head {
|
||||||
height: 202rpx;
|
height: 202rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-bottom: 2rpx;
|
margin-bottom: 2rpx;
|
||||||
>image{
|
> image {
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: #0f0;
|
}
|
||||||
}
|
> text {
|
||||||
>text{
|
font-size: 24rpx;
|
||||||
font-size: 24rpx;
|
color: #ff780f;
|
||||||
color: #FF780F;
|
margin-top: 20rpx;
|
||||||
margin-top: 20rpx;
|
}
|
||||||
}
|
margin-bottom: 2rpx;
|
||||||
margin-bottom: 2rpx;
|
}
|
||||||
}
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255, 255, 255, 1);
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
margin-bottom: 2rpx;
|
margin-bottom: 2rpx;
|
||||||
.title {
|
.title {
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51, 51, 51, 1);
|
||||||
margin-right: 120rpx;
|
margin-right: 120rpx;
|
||||||
}
|
}
|
||||||
.value {
|
.value {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(101,101,101,1);
|
color: rgba(101, 101, 101, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.password {
|
.password {
|
||||||
@@ -101,10 +160,10 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255, 255, 255, 1);
|
||||||
> text {
|
> text {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51, 51, 51, 1);
|
||||||
}
|
}
|
||||||
> image {
|
> image {
|
||||||
width: 11rpx;
|
width: 11rpx;
|
||||||
@@ -114,14 +173,14 @@ export default {
|
|||||||
.image-popup {
|
.image-popup {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
> view {
|
> view {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51, 51, 51, 1);
|
||||||
line-height: 98rpx;
|
line-height: 98rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-bottom: 2rpx solid #EBEBEB;
|
border-bottom: 2rpx solid #ebebeb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
244
pages/user/myinfo.vue
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
<template>
|
||||||
|
<view class="user">
|
||||||
|
<view class="head" @click="toOthersPage('info')">
|
||||||
|
<view class="info">
|
||||||
|
<image :src="info.member_avatar"></image>
|
||||||
|
<view class="name">
|
||||||
|
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
||||||
|
<text>账号:{{info.member_name}}</text>
|
||||||
|
<text>个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="toOthersPage('fans')">
|
||||||
|
<text>我的粉丝</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="nav" @click="toOthersPage('content')">
|
||||||
|
<text>内容管理</text>
|
||||||
|
<image src="/static/image/user/1.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="release-btn" @click="publish">
|
||||||
|
<image src="../../static/image/index/publish.png"></image>
|
||||||
|
<view class="text">发布</view>
|
||||||
|
</view>
|
||||||
|
<u-popup v-model="publishstate" mode="bottom">
|
||||||
|
<view class="publish">
|
||||||
|
<view class="list">
|
||||||
|
<view @click="navto('release/tosign')">
|
||||||
|
<image src="../../static/image/index/live.png"></image>
|
||||||
|
<text>直播</text>
|
||||||
|
</view>
|
||||||
|
<view @click="navto('release/index')">
|
||||||
|
<image src="../../static/image/index/photo.png"></image>
|
||||||
|
<text>图文</text>
|
||||||
|
</view>
|
||||||
|
<view @click="navto('release/video')">
|
||||||
|
<image src="../../static/image/index/video.png"></image>
|
||||||
|
<text>视频</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image src="../../static/image/index/close.png" class="off" @click="close"></image>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:"user",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
publishstate:false,
|
||||||
|
info:{},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getmyinfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取个人信息
|
||||||
|
getmyinfo(){
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.getshopinfo({
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.info = res.data.memberInfo
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toOthersPage(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/user/' + url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 打开发布弹窗
|
||||||
|
publish() {
|
||||||
|
this.publishstate = true;
|
||||||
|
},
|
||||||
|
// 关闭发布弹窗
|
||||||
|
close() {
|
||||||
|
this.publishstate = false;
|
||||||
|
},
|
||||||
|
// 跳转发布页面
|
||||||
|
navto(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}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user{
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
background: #ececec;
|
||||||
|
.head{
|
||||||
|
width: 100%;
|
||||||
|
height: 220rpx;
|
||||||
|
background-color: #FF780F;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.info{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
>image{
|
||||||
|
width: 110rpx;
|
||||||
|
height: 110rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #0f0;
|
||||||
|
}
|
||||||
|
.name{
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 26rpx;
|
||||||
|
>text{
|
||||||
|
margin-top: 14rpx;
|
||||||
|
}
|
||||||
|
>text:first-child{
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
>image{
|
||||||
|
width: 12rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.nav{
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
padding: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
color:#333;
|
||||||
|
background-color: #fff;
|
||||||
|
>image{
|
||||||
|
width: 13rpx;
|
||||||
|
height: 25rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -15,7 +15,8 @@
|
|||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<text class="tips">密码必须是8-16位,至少含数字/字母/字符两种组合</text>
|
<text class="tips">密码必须是8-16位,至少含数字/字母/字符两种组合</text>
|
||||||
<view class="btn">确定</view>
|
<view class="btn" @click="update">确定</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -28,6 +29,29 @@ export default {
|
|||||||
rePassword: ''
|
rePassword: ''
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
update(){
|
||||||
|
let that = this;
|
||||||
|
this.$u.api.editpassword({
|
||||||
|
old_password:that.model.password,
|
||||||
|
password:that.model.newPassword,
|
||||||
|
repassword:that.model.rePassword
|
||||||
|
}).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'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
276
static/chatservice.js
Normal file
@@ -0,0 +1,276 @@
|
|||||||
|
/*
|
||||||
|
* @Author: jack.lu
|
||||||
|
* @Date: 2020-4-21 10:10:20
|
||||||
|
* @Last Modified by: jack.lu
|
||||||
|
* @Last Modified time: 2020-4-21 15:01:41
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import GoEasyIM from './goeasy-im-1.0.9.js'
|
||||||
|
|
||||||
|
//用户
|
||||||
|
function User(id, nickname, avatar) {
|
||||||
|
this.id = id;
|
||||||
|
this.nickname = nickname;
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
//消息
|
||||||
|
function Message(senderUserId, senderNickname, content, type) {
|
||||||
|
this.senderNickname = senderNickname;
|
||||||
|
this.senderUserId = senderUserId;
|
||||||
|
this.content = content;
|
||||||
|
this.type = type
|
||||||
|
}
|
||||||
|
|
||||||
|
//聊天室
|
||||||
|
function Room(id, name, currentUser) {
|
||||||
|
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
this.currentUser = currentUser;
|
||||||
|
|
||||||
|
this.onlineUsers = {
|
||||||
|
count: 0,
|
||||||
|
users: []
|
||||||
|
};
|
||||||
|
|
||||||
|
this.messages = [];
|
||||||
|
|
||||||
|
this.MessageType = {
|
||||||
|
CHAT: 0,//文字聊天
|
||||||
|
PROP: 1//道具
|
||||||
|
};
|
||||||
|
|
||||||
|
this.Prop = {
|
||||||
|
HEART: 0,//桃心
|
||||||
|
ROCKET: 1//火箭
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function ChatRoomService(room, user) {
|
||||||
|
this.room = new Room(room.id, room.name, user);
|
||||||
|
this.whenNewMessage = function () {
|
||||||
|
|
||||||
|
};
|
||||||
|
this.whenOnlineUserChange = function () {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取实例
|
||||||
|
ChatRoomService.prototype.connectGoEasyIM = function () {
|
||||||
|
this.im = GoEasyIM.getInstance({
|
||||||
|
appkey: 'BC-453aa755c4ea48148abefc55a86df283',
|
||||||
|
host: 'hangzhou.goeasy.io'
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听网络连接成功
|
||||||
|
this.im.on(GoEasyIM.EVENT.CONNECTED, () => {
|
||||||
|
console.log('GoEasyIM网络连接成功');
|
||||||
|
//连接成功后,更新在线用户数和用户头像
|
||||||
|
this.initialOnlineUsers(this.room.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听网络连接断开
|
||||||
|
this.im.on(GoEasyIM.EVENT.DISCONNECTED, () => {
|
||||||
|
console.log('GoEasyIM网络断开')
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听上下线提醒
|
||||||
|
this.listenerGroupPresence();
|
||||||
|
|
||||||
|
//监听新消息
|
||||||
|
this.listenerNewMessage();
|
||||||
|
|
||||||
|
var currentUser = this.room.currentUser;
|
||||||
|
//连接GoEasyIM
|
||||||
|
this.im.connect({
|
||||||
|
id: currentUser.id,
|
||||||
|
data: {
|
||||||
|
avatar: currentUser.avatar,
|
||||||
|
nickname: currentUser.nickname
|
||||||
|
}
|
||||||
|
}).then(() => {
|
||||||
|
console.log('连接成功');
|
||||||
|
this.initialChatHistory(this.room.id);
|
||||||
|
|
||||||
|
//订阅用户上下线事件
|
||||||
|
this.subscribePresence(this.room.id);
|
||||||
|
//订阅聊天室消息
|
||||||
|
this.subscribeRoomMessage(this.room.id);
|
||||||
|
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e);
|
||||||
|
console.log('连接失败');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ChatRoomService.prototype.initialWhenNewMessage = function (whenNewMessage) {
|
||||||
|
this.whenNewMessage = whenNewMessage;
|
||||||
|
};
|
||||||
|
|
||||||
|
ChatRoomService.prototype.initialWhenOnlineUserChange = function (whenOnlineUserChange) {
|
||||||
|
this.whenOnlineUserChange = whenOnlineUserChange;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//监听新消息
|
||||||
|
ChatRoomService.prototype.listenerNewMessage = function () {
|
||||||
|
|
||||||
|
this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
|
||||||
|
var content = JSON.parse(message.payload.text);
|
||||||
|
this.addNewMessage(message);
|
||||||
|
this.whenNewMessage(content);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatRoomService.prototype.addNewMessage = function (message) {
|
||||||
|
var content = JSON.parse(message.payload.text);
|
||||||
|
let messageContent = "";
|
||||||
|
//聊天消息
|
||||||
|
if (content.type == this.room.MessageType.CHAT) {
|
||||||
|
messageContent = content.content;
|
||||||
|
}
|
||||||
|
//道具消息
|
||||||
|
if (content.type == this.room.MessageType.PROP) {
|
||||||
|
if (content.content == this.room.Prop.ROCKET) {
|
||||||
|
messageContent = "送出了一枚大火箭";
|
||||||
|
}
|
||||||
|
if (content.content == this.room.Prop.HEART) {
|
||||||
|
messageContent = "送出了一个大大的比心";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//添加消息
|
||||||
|
let newMessage = new Message(message.senderId, content.senderNickname, messageContent);
|
||||||
|
this.room.messages.push(newMessage);
|
||||||
|
};
|
||||||
|
|
||||||
|
//监听用户上下线
|
||||||
|
ChatRoomService.prototype.listenerGroupPresence = function () {
|
||||||
|
this.im.on(GoEasyIM.EVENT.GROUP_PRESENCE, (event) => {
|
||||||
|
//更新在线用户数
|
||||||
|
this.room.onlineUsers.count = event.groupOnlineCount;
|
||||||
|
|
||||||
|
if (event.action == 'join' || event.action == 'online') {
|
||||||
|
let userData = JSON.parse(event.userData);
|
||||||
|
//添加新用户
|
||||||
|
let user = new User(event.userId, userData.nickname, userData.avatar);
|
||||||
|
|
||||||
|
//添加在线用户,避免用户重复
|
||||||
|
if (!this.room.onlineUsers.users.find(item => item.id == event.userId)) {
|
||||||
|
this.room.onlineUsers.users.push(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加进入房间的消息
|
||||||
|
let message = new Message(event.userId, userData.nickname, " 进入房间", this.room.MessageType.CHAT);
|
||||||
|
this.room.messages.push(message);
|
||||||
|
} else {
|
||||||
|
let offlineUserIndex = this.room.onlineUsers.users.findIndex(item => item.id == event.userId);
|
||||||
|
if (offlineUserIndex > -1) {
|
||||||
|
//将离开的用户从onlineUsers中删掉
|
||||||
|
let offlineUser = Object.assign(this.room.onlineUsers.users[offlineUserIndex]);
|
||||||
|
this.room.onlineUsers.users.splice(offlineUserIndex, 1);
|
||||||
|
//添加离开消息
|
||||||
|
let message = new Message(offlineUser.id, offlineUser.nickname, " 离开房间", this.room.MessageType.CHAT)
|
||||||
|
this.room.messages.push(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.whenOnlineUserChange(this.room.onlineUsers);
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
//查询和初始化在线用户列表和在线用户数
|
||||||
|
ChatRoomService.prototype.initialOnlineUsers = function (roomId) {
|
||||||
|
let self = this;
|
||||||
|
|
||||||
|
//查询最新上线的用户列表
|
||||||
|
this.im.groupHereNow(roomId)
|
||||||
|
.then(result => {
|
||||||
|
if (result.code == 200) {
|
||||||
|
let users = [];
|
||||||
|
result.content && result.content.map(function (onlineUser) {
|
||||||
|
let userData = JSON.parse(onlineUser.userData);
|
||||||
|
let user = new User(onlineUser.userId, userData.nickname, userData.avatar);
|
||||||
|
users.push(user);
|
||||||
|
});
|
||||||
|
self.room.onlineUsers = {
|
||||||
|
users: users
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
if (e.code == 401) {
|
||||||
|
console.log("您还没有开通用户在线状态提醒,登录goeasy->我的应用->查看详情->高级功能,自助开通.");
|
||||||
|
} else {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//获取聊天室在线用户数
|
||||||
|
this.im.groupOnlineCount(roomId)
|
||||||
|
.then(result => {
|
||||||
|
this.room.onlineUsers.count = result.content.onlineCount;
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
//订阅聊天室成员上下线
|
||||||
|
ChatRoomService.prototype.subscribePresence = function (roomId) {
|
||||||
|
this.im.subscribeGroupPresence([roomId])
|
||||||
|
.then(() => {
|
||||||
|
console.log('成员上下线订阅成功')
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//订阅聊天室消息
|
||||||
|
ChatRoomService.prototype.subscribeRoomMessage = function (roomId) {
|
||||||
|
this.im.subscribeGroup([roomId])
|
||||||
|
.then(result => {
|
||||||
|
console.log('消息订阅成功')
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//历史消息
|
||||||
|
ChatRoomService.prototype.initialChatHistory = function (roomId) {
|
||||||
|
var self = this;
|
||||||
|
this.im.history({
|
||||||
|
groupId: roomId
|
||||||
|
}).then(res => {
|
||||||
|
res.content.forEach(function (message) {
|
||||||
|
self.addNewMessage(message);
|
||||||
|
})
|
||||||
|
}).catch(function (error) {
|
||||||
|
if (error.code == 401) {
|
||||||
|
console.log("您还没有开通历史消息的权限,登录goeasy->我的应用->查看详情->高级功能,自助开通.");
|
||||||
|
} else {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
//发送消息
|
||||||
|
ChatRoomService.prototype.sendMessages = function (roomId, content) {
|
||||||
|
var contentMessage = {
|
||||||
|
text: JSON.stringify(content)
|
||||||
|
};
|
||||||
|
let message = this.im.createTextMessage(contentMessage);
|
||||||
|
this.im.sendGroupMessage(roomId, message)
|
||||||
|
.then(() => {
|
||||||
|
console.log('消息发送成功')
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
//退出聊天室
|
||||||
|
ChatRoomService.prototype.quitRoom = function (roomId) {
|
||||||
|
this.im.disconnect()
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = ChatRoomService;
|
||||||
2
static/goeasy-im-1.0.9.js
Normal file
BIN
static/image/close.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/image/index/close.png
Normal file
|
After Width: | Height: | Size: 753 B |
BIN
static/image/index/live.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
static/image/index/photo.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/image/index/publish.png
Normal file
|
After Width: | Height: | Size: 234 B |
BIN
static/image/index/swiper.png
Normal file
|
After Width: | Height: | Size: 280 KiB |
BIN
static/image/index/video.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/image/menu.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/image/shop.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |