Compare commits
No commits in common. "5520e7ab7c4a3c20f092e4aa71ac6ad39af0eb1b" and "519ec0abe86303688cdea3af4dbedeceda505b41" have entirely different histories.
5520e7ab7c
...
519ec0abe8
@ -34,27 +34,6 @@ const install = (Vue, vm) => {
|
|||||||
shoplogin(obj){
|
shoplogin(obj){
|
||||||
return vm.$u.get("/Login/storeLogin",obj)
|
return vm.$u.get("/Login/storeLogin",obj)
|
||||||
},
|
},
|
||||||
// 获取个人信息
|
|
||||||
getshopinfo(obj){
|
|
||||||
return vm.$u.post("/member/memberInfo",obj)
|
|
||||||
},
|
|
||||||
// 获取粉丝列表
|
|
||||||
myfanlist(obj){
|
|
||||||
return vm.$u.post("/member/myFansList",obj)
|
|
||||||
},
|
|
||||||
// 商家登陆
|
|
||||||
getshopinfo(obj){
|
|
||||||
return vm.$u.post("/member/memberInfo",obj)
|
|
||||||
},
|
|
||||||
// 修改个人信息
|
|
||||||
changeinfo(obj){
|
|
||||||
return vm.$u.post("/Member/changeMemberInfo",obj)
|
|
||||||
},
|
|
||||||
// 获取内容列表
|
|
||||||
articlelist(obj){
|
|
||||||
return vm.$u.post("/Article/articleList",obj)
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// 将各个定义的接口名称,统一放进对象挂载到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,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content-item">
|
<view class="content-item">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image class="cover" :src="info.article_pic"></image>
|
<image class="cover"></image>
|
||||||
<image src="/static/image/user/5.png" class="play-icon" v-if="type==2"></image>
|
<image src="/static/image/user/5.png" class="play-icon" v-if="cur==1"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="right" >
|
<view class="right" @click="toDetailsPage">
|
||||||
<u-icon name="close" color="#999999" size="27" @click="showPopup(info.article_id)"></u-icon>
|
<u-icon name="close" color="#999999" size="27" @click.stop="showPopup"></u-icon>
|
||||||
<view class="tags u-line-2" @click="toDetailsPage">{{info.article_title}}</view>
|
<view class="tags u-line-2">#配饰就该这么搭#</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>{{info.comment_num}}</text>
|
<text>2.5w</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<image src="/static/image/user/3.png"></image>
|
<image src="/static/image/user/3.png"></image>
|
||||||
<text>{{info.collect_num}}</text>
|
<text>2.5w</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<image src="/static/image/user/4.png"></image>
|
<image src="/static/image/user/4.png"></image>
|
||||||
<text>{{info.like_num}}</text>
|
<text>2.5w</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -30,23 +30,15 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
info:{
|
cur: [Number, String],
|
||||||
type: Object,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
type:{
|
|
||||||
type: Number,
|
|
||||||
default: 1
|
|
||||||
},
|
|
||||||
delItem: {
|
delItem: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showPopup(id) {
|
showPopup() {
|
||||||
console.log(12345,id)
|
this.delItem();
|
||||||
this.$emit("del",id)
|
|
||||||
},
|
},
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="fans-item">
|
<view class="fans-item">
|
||||||
<image :src="info.friend_frommavatar"></image>
|
<image></image>
|
||||||
<view class="name">{{info.fromMemberNickname}}</view>
|
<view class="name">兽兽</view>
|
||||||
<view class="date">{{info.fromMemberFriendAddtime}}</view>
|
<view class="date">2017-10-14</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>
|
||||||
|
@ -2,17 +2,11 @@
|
|||||||
<view class="item" @click="toDetailsPage">
|
<view class="item" @click="toDetailsPage">
|
||||||
<image></image>
|
<image></image>
|
||||||
<view class="goods">
|
<view class="goods">
|
||||||
<view class="">
|
<view class="status" v-if="cur==4">待处理订单</view>
|
||||||
<view class="">
|
<view class="name u-line-1">心机小黑裙连衣裙赫本风夏季爆款...</view>
|
||||||
编号:{{info.order_sn}}
|
|
||||||
</view>
|
|
||||||
<view class="status" v-if="cur==4">待处理订单</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">共{{info.extend_order_goods[0].goods_num}}件商品</view>
|
<view class="num">共一件商品</view>
|
||||||
<view class="price">实付<span>¥{{info.extend_order_goods[0].goods_pay_price}}</span></view>
|
<view class="price">实付<span>¥199.9</span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -23,12 +17,10 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
cur: [Number, String],
|
cur: [Number, String]
|
||||||
info: Object
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
console.log(this.info)
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/details?current=' + this.cur
|
url: '/pages/index/details?current=' + this.cur
|
||||||
});
|
});
|
||||||
|
122
pages.json
122
pages.json
@ -2,7 +2,8 @@
|
|||||||
"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": "",
|
||||||
@ -30,9 +31,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "消息",
|
"navigationBarTitleText": "消息",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,9 +43,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "德铭阳光在线",
|
"navigationBarTitleText": "德铭阳光在线",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,8 +55,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,30 +86,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,15 +118,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人资料",
|
"navigationBarTitleText": "个人资料",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333",
|
"titleColor": "#333333"
|
||||||
"buttons": [ //原生标题栏按钮配置,
|
|
||||||
{
|
|
||||||
"text": "保存",
|
|
||||||
"fontSize":"14px"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,9 +130,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "修改密码",
|
"navigationBarTitleText": "修改密码",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,9 +142,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的粉丝",
|
"navigationBarTitleText": "我的粉丝",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -172,9 +154,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "内容管理",
|
"navigationBarTitleText": "内容管理",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,9 +165,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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -195,9 +177,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "骑手投诉",
|
"navigationBarTitleText": "骑手投诉",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,9 +189,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "骑手投诉详情",
|
"navigationBarTitleText": "骑手投诉详情",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"titleColor": "#333333"
|
"titleColor": "#333333"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,9 +201,9 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择商品",
|
"navigationBarTitleText": "选择商品",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#2D2D2D",
|
"backgroundColor": "#2D2D2D",
|
||||||
"titleColor": "#FFFFFF"
|
"titleColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,34 +226,28 @@
|
|||||||
"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/messages/messagesList",
|
"pagePath": "pages/user/index",
|
||||||
"iconPath": "",
|
"iconPath": "",
|
||||||
"selectedIconPath": "",
|
"selectedIconPath": "",
|
||||||
"text": "消息",
|
|
||||||
"selectedColor": "#FBFBFB"
|
|
||||||
}, {
|
|
||||||
"pagePath": "pages/user/index",
|
|
||||||
"iconPath": "",
|
|
||||||
"selectedIconPath": "",
|
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"selectedColor": "#FBFBFB"
|
"selectedColor":"#FBFBFB"
|
||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,7 @@
|
|||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" class="order-list">
|
<scroll-view scroll-y style="height: 100%;width: 100%;" class="order-list">
|
||||||
<view v-for="(item, index) in allorder" :key="index">
|
<view v-for="(item, index) in 5" :key="index"><OrderItem :cur="current"></OrderItem></view>
|
||||||
<OrderItem :info="item"></OrderItem>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
@ -165,8 +163,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
publishstate: false,
|
publishstate: false,
|
||||||
num: 0,
|
num: 0
|
||||||
allorder:[],//所有订单
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -174,33 +171,42 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getswiper();
|
this.getswiper();
|
||||||
this.getallorder();
|
this.getallorder();
|
||||||
// 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
|
this.getorderlist();
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
this.num++
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 关闭发布弹窗
|
// 关闭发布弹窗
|
||||||
close() {
|
close() {
|
||||||
this.publishstate = false;
|
this.publishstate = false;
|
||||||
},
|
},
|
||||||
|
// 获取订单列表
|
||||||
|
getorderlist(type) {
|
||||||
|
let that = this;
|
||||||
|
this.$u.api
|
||||||
|
.getorderlist({
|
||||||
|
page: that.num,
|
||||||
|
state_type: type
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode != 0) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 获取全部订单
|
// 获取全部订单
|
||||||
getallorder() {
|
getallorder() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$u.api.getorderlist({
|
this.$u.api
|
||||||
page: that.num
|
.getorderlist({
|
||||||
}).then(res => {
|
page: that.num
|
||||||
console.log(res);
|
})
|
||||||
if (res.errCode != 0) {
|
.then(res => {
|
||||||
this.$refs.uToast.show({
|
console.log(res);
|
||||||
title: res.message,
|
if (res.errCode != 0) {
|
||||||
type: 'error'
|
} else {
|
||||||
});
|
}
|
||||||
} else {
|
});
|
||||||
this.allorder = res.data
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 获取轮播图
|
// 获取轮播图
|
||||||
getswiper() {
|
getswiper() {
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
|||||||
login: '登录',
|
login: '登录',
|
||||||
show: false,
|
show: false,
|
||||||
zhanghao: 'seller',
|
zhanghao: 'seller',
|
||||||
mima: '123456789',
|
mima: '123456',
|
||||||
zhanghaoA: '18953829598 ',
|
zhanghaoA: '18953829598 ',
|
||||||
mimaA: '123456',
|
mimaA: '123456',
|
||||||
url: '',
|
url: '',
|
||||||
@ -103,7 +103,8 @@ export default {
|
|||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo', res.data);
|
||||||
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
uni.setStorageSync('rongyun', res.data.rongcloud_token);
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pages/user/myinfo'
|
url: '/pages/index/index',
|
||||||
|
type: 'switchTab'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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" :header="{'Authorization' : 'Bearer' + ' ' + token}" :max-count="1" :show-progress="true" @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="false" @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>
|
||||||
@ -112,8 +112,7 @@
|
|||||||
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
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -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="false" :enable-camera="true" :auto-focus="true" :beauty="meiyan + 1" whiteness="2"
|
mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="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,33 +41,9 @@
|
|||||||
<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">{{time}} | sadasdas</text>
|
<text class="username" style="font-size:20rpx">asdasdsa | 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="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>
|
||||||
@ -80,27 +56,6 @@
|
|||||||
</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;
|
||||||
@ -142,6 +97,7 @@
|
|||||||
.shopimg{
|
.shopimg{
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
|
background-color: #0f0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -208,50 +164,6 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
const RongIMLib = require('../../static/rongyun.js');
|
const RongIMLib = require('../../static/rongyun.js');
|
||||||
@ -260,15 +172,10 @@
|
|||||||
fil: true,
|
fil: true,
|
||||||
url:'',
|
url:'',
|
||||||
height:0,
|
height:0,
|
||||||
show:false,
|
show:true,
|
||||||
list:[],
|
list:[],
|
||||||
info:{},
|
info:{},
|
||||||
im:{},
|
im:{}
|
||||||
chatroom_id:0,
|
|
||||||
live_id:0,
|
|
||||||
tool:false,
|
|
||||||
meiyan:0,
|
|
||||||
time:'00:00:00'
|
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
// 注意:需要在onReady中 或 onLoad 延时
|
// 注意:需要在onReady中 或 onLoad 延时
|
||||||
@ -289,146 +196,73 @@
|
|||||||
let that = this
|
let that = this
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log('Bearer' + " " + token)
|
console.log('Bearer' + " " + token)
|
||||||
this.chatroom_id = a.id
|
// uni.request({
|
||||||
this.live_id = a.live_id
|
// url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
|
||||||
uni.request({
|
// method:"POST",
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
|
// headers:{
|
||||||
method:"POST",
|
// 'Authorization' : 'Bearer' + " " + token
|
||||||
header:{
|
|
||||||
'Authorization' : 'Bearer' + " " + token
|
|
||||||
},
|
|
||||||
success(res){
|
|
||||||
console.log(res)
|
|
||||||
that.list= res.data.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
uni.request({
|
|
||||||
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
|
||||||
method:"POST",
|
|
||||||
header:{
|
|
||||||
'Authorization' : 'Bearer' + " " + token
|
|
||||||
},
|
|
||||||
success(res){
|
|
||||||
console.log(res.data)
|
|
||||||
that.info = res.data.data.memberInfo
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let shi = 0;
|
|
||||||
let fen = 0;
|
|
||||||
let miao = 0;
|
|
||||||
setInterval(() => {
|
|
||||||
shi = parseInt(shi)
|
|
||||||
fen = parseInt(fen)
|
|
||||||
miao = parseInt(miao)
|
|
||||||
miao = miao + 1
|
|
||||||
console.log(miao)
|
|
||||||
if(miao == 60){
|
|
||||||
miao = 0;
|
|
||||||
fen +=1
|
|
||||||
}
|
|
||||||
if(fen == 60){
|
|
||||||
shi += 1
|
|
||||||
fen = 0
|
|
||||||
}
|
|
||||||
if(shi < 10){
|
|
||||||
shi = '0' + shi
|
|
||||||
}
|
|
||||||
if(fen < 10){
|
|
||||||
fen = '0' + fen
|
|
||||||
}
|
|
||||||
if(miao < 10){
|
|
||||||
miao = '0' + miao
|
|
||||||
}
|
|
||||||
that.time = shi + ":" + fen + ":" + miao
|
|
||||||
}, 1000);
|
|
||||||
// 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){
|
// success(res){
|
||||||
// var message = event.message;
|
// console.log(res)
|
||||||
// console.log('收到新消息:', message);
|
// that.list= res.data.data
|
||||||
// },
|
|
||||||
// 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({
|
// uni.request({
|
||||||
// count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
|
// url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
||||||
// }).then(function() {
|
// method:"POST",
|
||||||
// console.log('加入聊天室成功');
|
// headers:{
|
||||||
// }).catch((err)=>{
|
// 'Authorization' : 'Bearer' + " " + token
|
||||||
// console.log(err,262)
|
// },
|
||||||
|
// success(res){
|
||||||
|
// console.log(res.data.data.memberInfo)
|
||||||
|
// that.info = res.data.data.memberInfo
|
||||||
|
// }
|
||||||
// })
|
// })
|
||||||
|
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: {
|
||||||
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));
|
||||||
},
|
},
|
||||||
@ -508,10 +342,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
xianshi(){
|
|
||||||
this.show = true;
|
|
||||||
console.log(111)
|
|
||||||
},
|
|
||||||
guanbi(){
|
guanbi(){
|
||||||
this.show = false
|
this.show = false
|
||||||
console.log(123)
|
console.log(123)
|
||||||
@ -535,7 +365,7 @@
|
|||||||
data:{
|
data:{
|
||||||
goods_id:arr.join(',')
|
goods_id:arr.join(',')
|
||||||
},
|
},
|
||||||
header:{
|
headers:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
@ -543,7 +373,7 @@
|
|||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
||||||
method:"POST",
|
method:"POST",
|
||||||
header:{
|
headers:{
|
||||||
'Authorization' : 'Bearer' + " " + token
|
'Authorization' : 'Bearer' + " " + token
|
||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<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>
|
||||||
<swiper :current="swiperCurrent" >
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" class="list">
|
<scroll-view scroll-y style="height: 100%;width: 100%;" class="list">
|
||||||
<view v-for="(item, index) in newlist" :key="index">
|
<view v-for="(item, index) in 5" :key="index">
|
||||||
<ContentItem :info="item" :type="type" del="del"></ContentItem>
|
<ContentItem :cur="current" :delItem="showPopup"></ContentItem>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y style="height: 100%;width: 100%;" class="video-list">
|
<scroll-view scroll-y style="height: 100%;width: 100%;" class="video-list">
|
||||||
<view v-for="(item, index) in newlist" :key="index">
|
<view v-for="(item, index) in 5" :key="index">
|
||||||
<ContentItem :info="item" :type="type" @del="del"></ContentItem>
|
<ContentItem :cur="current" :delItem="showPopup"></ContentItem>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -43,61 +43,23 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
name: '视频'
|
name: '视频'
|
||||||
}],
|
}],
|
||||||
type:1,
|
|
||||||
num:1,
|
|
||||||
newlist:[]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
ContentItem
|
ContentItem
|
||||||
},
|
},
|
||||||
onLoad() {
|
|
||||||
this.getlist()
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
this.num++
|
|
||||||
this.getlist()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getlist(){
|
showPopup() {
|
||||||
let that = this;
|
this.show = true;
|
||||||
this.$u.api.articlelist({
|
|
||||||
type:that.type,
|
|
||||||
page:that.num
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.errCode != 0) {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: res.message,
|
|
||||||
type: 'error'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let arr = res.data.articleList
|
|
||||||
for(let index in arr){
|
|
||||||
that.newlist.push(arr[index])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
del(e) {
|
|
||||||
// 删除元素
|
|
||||||
this.show=true
|
|
||||||
console.log(e)
|
|
||||||
},
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
this.type=index+1;
|
|
||||||
this.num=0
|
|
||||||
this.newlist=[]
|
|
||||||
this.getlist()
|
|
||||||
},
|
},
|
||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
console.log(12345666)
|
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
|
// this.$refs.uTabs.setFinishCurrent(current);
|
||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
this.type=current+1;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
<view class="lately">
|
<view class="lately">
|
||||||
<view class="title">最新</view>
|
<view class="title">最新</view>
|
||||||
<view class="items">
|
<view class="items">
|
||||||
<view v-for="(item, index) in myfans" :key="index">
|
<view v-for="(item, index) in 3" :key="index">
|
||||||
<FansItem :info="item"></FansItem>
|
<FansItem></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 newfans" :key="index">
|
<view v-for="(item, index) in 13" :key="index">
|
||||||
<FansItem :info="item"></FansItem>
|
<FansItem></FansItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -22,35 +22,10 @@
|
|||||||
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 :src="info.member_avatar"></image>
|
<image></image>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text>{{info.member_nickname==null?"新用户":info.member_nickname}}</text>
|
<text>萨大赛</text>
|
||||||
<text>账号:{{info.member_name}}</text>
|
<text>账号:123456789</text>
|
||||||
<text>个性签名:{{info.signature==""?"该用户很懒没有签名!":info.signature}}</text>
|
<text>个性签名:为梦努力</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/user/1.png"></image>
|
<image src="/static/image/user/1.png"></image>
|
||||||
@ -28,31 +28,7 @@
|
|||||||
<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
|
||||||
|
@ -1,106 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="head" @click="chooseImage">
|
<view class="head" @click="showImage=true">
|
||||||
<image :src="fileurl" :key="num"></image>
|
<image></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>
|
||||||
<input type="text" :value="info.member_nickname==null?'新用户':info.member_nickname" />
|
<text class="value">变瘦变高变有钱</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
|
||||||
<text class="title">个性签名</text>
|
|
||||||
<input type="text" :value="info.signature==''?'该用户很懒没有签名!':info.signature" />
|
|
||||||
</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-toast ref="uToast" />
|
<u-popup v-model="showImage" mode="bottom">
|
||||||
</view>
|
<view class="image-popup">
|
||||||
|
<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 {
|
||||||
fileurl: "",
|
showImage: false
|
||||||
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'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
success: function(res) {
|
sourceType: [sourceType],
|
||||||
|
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)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -109,49 +48,50 @@ 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 {
|
}
|
||||||
font-size: 24rpx;
|
>text{
|
||||||
color: #ff780f;
|
font-size: 24rpx;
|
||||||
margin-top: 20rpx;
|
color: #FF780F;
|
||||||
}
|
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 {
|
||||||
@ -161,10 +101,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;
|
||||||
@ -174,14 +114,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>
|
@ -1,217 +0,0 @@
|
|||||||
<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>
|
|
||||||
</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) {
|
|
||||||
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,8 +15,7 @@
|
|||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<text class="tips">密码必须是8-16位,至少含数字/字母/字符两种组合</text>
|
<text class="tips">密码必须是8-16位,至少含数字/字母/字符两种组合</text>
|
||||||
<view class="btn" @click="update">确定</view>
|
<view class="btn">确定</view>
|
||||||
<u-toast ref="uToast" />
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -29,29 +28,6 @@ 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>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB |
Loading…
x
Reference in New Issue
Block a user