页面制作

main
123456 4 weeks ago
parent 122ab40163
commit 983637cae9
  1. 4
      api/request.js
  2. 4
      components/dashan.vue
  3. 11
      main.js
  4. 2
      pages/peiwan/detail.vue
  5. 71
      pages/pipei/shipin/detail.nvue
  6. 8
      pages/pipei/shipin/index.vue
  7. 8
      pages/pipei/yuyin/index.vue
  8. 221
      pages/users/chat/index.vue
  9. 13
      pages/users/edit/index.vue
  10. 2
      pages/users/feedback/index.vue
  11. 2
      pages/users/order/peiwan.vue
  12. 2
      pages/xiaoxi/index.vue
  13. 2
      uni_modules/zego-ZegoExpressUniApp-JS/components/zego-ZegoExpressUniApp-JS/zego-view/ZegoLocalView.nvue
  14. 2
      uni_modules/zego-ZegoExpressUniApp-JS/components/zego-ZegoExpressUniApp-JS/zego-view/ZegoRemoteView.nvue
  15. 1
      unpackage/debug/.roid.ins
  16. 692
      unpackage/dist/dev/app-plus/app-service.js
  17. 1778
      unpackage/dist/dev/app-plus/app-view.js
  18. 133
      unpackage/dist/dev/app-plus/pages/pipei/shipin/detail.js
  19. 2
      unpackage/dist/dev/app-plus/pages/users/renzheng/camera.js

@ -16,8 +16,8 @@ export function request(prams) {
}, },
success: (res) => { success: (res) => {
if (res.data.code == 200 || res.data.code == -1){ if (res.data.code == 200 || res.data.code == -1){
console.log(prams) // console.log(prams)
console.log("返回结果:"+JSON.stringify(res.data)) // console.log("返回结果:"+JSON.stringify(res.data))
resolve(res.data); resolve(res.data);
}else if(res.data.code == 401){ }else if(res.data.code == 401){
uni.showModal({ uni.showModal({

@ -12,13 +12,13 @@
</view> </view>
<view class="b"> <view class="b">
<view class="txt">系统推荐</view> <view class="txt">系统推荐</view>
<view class="list" v-if="list && list.length>0"> <scroll-view scroll-y class="list" v-if="list && list.length>0">
<view class="item" v-for="(a,i) in list" :key="i" :class="tabIndex == i?'item-on':''" > <view class="item" v-for="(a,i) in list" :key="i" :class="tabIndex == i?'item-on':''" >
<view class="text" @click="tabItem(1,i)">{{a.content}}</view> <view class="text" @click="tabItem(1,i)">{{a.content}}</view>
<view class="anniu anniu-on" v-if="a.isDefault == 1">默认</view> <view class="anniu anniu-on" v-if="a.isDefault == 1">默认</view>
<view class="anniu" v-if="total == 0" @click="tabItem(2,i)">设为默认</view> <view class="anniu" v-if="total == 0" @click="tabItem(2,i)">设为默认</view>
</view> </view>
</view> </scroll-view>
</view> </view>
</view> </view>
<view class="fd"> <view class="fd">

@ -99,7 +99,7 @@ uni.$on("openSocket",function(res){
} }
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '来自'+obj.userNickname+"发起的视频匹配,是否同意", content: '来自'+obj.sellerNickname+"发起的视频匹配,是否同意",
cancelText: '拒绝', cancelText: '拒绝',
confirmText: '同意', confirmText: '同意',
success: res => { success: res => {
@ -143,7 +143,7 @@ uni.$on("openSocket",function(res){
} }
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '来自'+obj.userNickname+"发起的语音匹配,是否同意", content: '来自'+obj.sellerNickname+"发起的语音匹配,是否同意",
cancelText: '拒绝', cancelText: '拒绝',
confirmText: '同意', confirmText: '同意',
success: res => { success: res => {
@ -200,6 +200,13 @@ uni.$on("openSocket",function(res){
"topic":"message" "topic":"message"
})}) })})
}) })
uni.$on("showToast",res=>{
uni.showToast({
icon: "none",
position: "bottom",
title: res?'对方已挂断':"对方已拒绝"
})
})
uni.onSocketClose(function (res) { uni.onSocketClose(function (res) {
clearInterval(timer) clearInterval(timer)
uni.closeSocket(); uni.closeSocket();

@ -9,7 +9,7 @@
</view> </view>
<view class="user-hd"> <view class="user-hd">
<view class="a"> <view class="a">
<view class="title">{{userInfo.realname?userInfo.nickname:userInfo.nickname}}</view> <view class="name">{{userInfo.realname?userInfo.nickname:userInfo.nickname}}</view>
<view class="vip" v-if="userInfo.memberflag>=1">VIP{{userInfo.memberflag}}</view> <view class="vip" v-if="userInfo.memberflag>=1">VIP{{userInfo.memberflag}}</view>
<image class="sex" v-if="userInfo.sex ==2" src="@/static/peiwan-nv.png"></image> <image class="sex" v-if="userInfo.sex ==2" src="@/static/peiwan-nv.png"></image>
<image class="sex" v-else src="@/static/peiwan-nan.png"></image> <image class="sex" v-else src="@/static/peiwan-nan.png"></image>

@ -2,29 +2,31 @@
<view class="room" :style="{'width': winWidth+'px', 'height': winHeight+'px'}"> <view class="room" :style="{'width': winWidth+'px', 'height': winHeight+'px'}">
<view class="room-navbar" :style="{'width': winWidth+'px', 'height': (statusBarHeight+44)+'px'}"> <view class="room-navbar" :style="{'width': winWidth+'px', 'height': (statusBarHeight+44)+'px'}">
<view class="navbar" :style="{'width': winWidth+'px', 'margin-top': (statusBarHeight)+'px'}"> <view class="navbar" :style="{'width': winWidth+'px', 'margin-top': (statusBarHeight)+'px'}">
<view class="back" @click="onBack()"> <view class="back" @click="onBack()" :style="{'top': (statusBarHeight)+'px'}">
<image class="img" src="@/static/arrow-left.png"></image> <image class="img" src="@/static/arrow-left.png"></image>
</view> </view>
<view class="title" :style="{'width': winWidth+'px'}"><text class="txt">{{title}}</text></view> <view class="title" :style="{'width': winWidth+'px'}"><text class="txt">{{title}}</text></view>
</view> </view>
</view> </view>
<view v-if="type == 2 || type == 4"> <view v-if="type == 2 || type == 4">
<view class="room-hd" v-if="isToggle"> <view class="room-hd" @click="qiehuan()" v-if="isOpenSocket == false">
<view class="a" v-if="isToggle">
<zego-local-view class="video-view" :style="{'width': winWidth+'px', 'height': winHeight+'px'}"></zego-local-view> <zego-local-view class="video-view" :style="{'width': winWidth+'px', 'height': winHeight+'px'}"></zego-local-view>
<zego-remote-view class="shitu" :streamID="sellerStreamId" :style="{'top': (statusBarHeight+60)+'px'}"></zego-remote-view> <zego-remote-view class="shitu" :streamID="sellerStreamId" :style="{'top': (statusBarHeight+60)+'px'}"></zego-remote-view>
</view> </view>
<view class="room-hd" v-else> <view class="a" v-else>
<zego-remote-view class="video-view" :streamID="sellerStreamId" :style="{'width': winWidth+'px', 'height': winHeight+'px'}"></zego-remote-view> <zego-remote-view class="video-view" :streamID="sellerStreamId" :style="{'width': winWidth+'px', 'height': winHeight+'px'}"></zego-remote-view>
<zego-local-view class="shitu" :style="{'top': (statusBarHeight+60)+'px'}"></zego-local-view> <zego-local-view class="shitu" :style="{'top': (statusBarHeight+60)+'px'}"></zego-local-view>
</view> </view>
</view> </view>
<view class="room-bd" :style="{'width': winWidth+'px', 'height': winHeight+'px'}" v-if="type == 1 || type == 3"> </view>
<view class="room-bd" :style="{'width': winWidth+'px', 'height': winHeight+'px'}" v-if="isOpenSocket">
<image class="pic" :style="{'width': winWidth+'px', 'height': winHeight+'px'}" src="@/static/yuyin-bg.png"></image> <image class="pic" :style="{'width': winWidth+'px', 'height': winHeight+'px'}" src="@/static/yuyin-bg.png"></image>
<view class="dian-on" > <view class="dian-on" >
<view class="info"> <view class="info">
<image class="avatar" :src="userOtherInfo.faceImage?userOtherInfo.faceImage:userOtherInfo.img"></image> <image class="avatar" :src="userOtherInfo.faceImage?userOtherInfo.faceImage:userOtherInfo.img"></image>
<view class="name"><text class="t">{{userOtherInfo.nickname}}</text></view> <view class="name"><text class="t">{{userOtherInfo.nickname}}</text></view>
<view class="txt"><text class="t">{{userOtherInfo.age}}/{{userOtherInfo.height}}</text></view> <view class="txt"><text class="t">{{userOtherInfo.age}}/{{userOtherInfo.height}}</text></view>
</view> </view>
<view class="tag"> <view class="tag">
<view class="titles"><text class="t">个性签名:</text></view> <view class="titles"><text class="t">个性签名:</text></view>
@ -61,14 +63,11 @@
<text class="t">挂断</text> <text class="t">挂断</text>
</view> </view>
</view> </view>
<view class="item"></view> <view class="item" v-if="isStart == false"></view>
<view class="item"> <view class="item" v-if="isStart == false">
<view class="pic" v-if="isStart"> <view class="pic">
<image class="pimg" src="@/static/yuyin-05.png"></image> <image class="pimg" src="@/static/yuyin-05.png"></image>
</view> </view>
<view class="pic" v-else>
<image class="pimg" @click="toJieshou1()" src="@/static/yuyin-05.png"></image>
</view>
<view class="txt"> <view class="txt">
<text class="t">{{isStart?'等待':'接受'}}</text> <text class="t">{{isStart?'等待':'接受'}}</text>
</view> </view>
@ -121,13 +120,10 @@
<text class="t">挂断</text> <text class="t">挂断</text>
</view> </view>
</view> </view>
<view class="item"> <view class="item" v-if="isStart == false" @click="toJieshou1()">
<view class="pic" v-if="isStart"> <view class="pic">
<image class="pimg" src="@/static/yuyin-05.png"></image> <image class="pimg" src="@/static/yuyin-05.png"></image>
</view> </view>
<view class="pic" v-else>
<image class="pimg" @click="toJieshou1()" src="@/static/yuyin-05.png"></image>
</view>
<view class="txt"> <view class="txt">
<text class="t">{{isStart?'等待':'接受'}}</text> <text class="t">{{isStart?'等待':'接受'}}</text>
</view> </view>
@ -169,6 +165,7 @@
}, },
data() { data() {
return { return {
isOpenSocket: true,
isYuyin: true, isYuyin: true,
isGuaduan: true, isGuaduan: true,
isYangshengqi: true, isYangshengqi: true,
@ -215,9 +212,11 @@
async onReady() { async onReady() {
const that = this; const that = this;
uni.$on("watchEvent",function (obj) { uni.$on("watchEvent",function (obj) {
console.log(obj)
if(obj.topic == 'message'){ if(obj.topic == 'message'){
if(obj.type == 12){ if(obj.type == 12){
if(uni.getStorageSync("userInfo").id == obj.sellerId){ if(uni.getStorageSync("userInfo").id == obj.sellerId){
that.isGuaduan = false;
that.toGuaduan(1) that.toGuaduan(1)
} }
} }
@ -230,6 +229,9 @@
if(obj.type == 20){ if(obj.type == 20){
if(uni.getStorageSync("userInfo").id == obj.sellerId){ if(uni.getStorageSync("userInfo").id == obj.sellerId){
that.toJieshou(); that.toJieshou();
this.isOpenSocket = false;
}else{
this.isOpenSocket = false;
} }
} }
} }
@ -245,25 +247,27 @@
if(res == 1 && res1 == 1){ if(res == 1 && res1 == 1){
if(this.type <= 2){ if(this.type <= 2){
this.toPermission(); this.toPermission();
this.getOtherUserInfo()
}else{ }else{
this.getOtherUserInfo()
this.getUserInfo(1); this.getUserInfo(1);
} }
} }
this.getOtherUserInfo()
return ; return ;
} }
// #endif // #endif
if(this.type <= 2){ if(this.type <= 2){
this.toPermission(); this.toPermission();
this.getOtherUserInfo();
}else{ }else{
this.getOtherUserInfo();
this.getUserInfo(1); this.getUserInfo(1);
} }
this.getOtherUserInfo();
}, },
methods: { methods: {
qiehuan() {
this.isToggle = !this.isToggle;
console.log(this.isToggle)
},
toJieshou1() { toJieshou1() {
uni.$emit("jieshouYinship",{ uni.$emit("jieshouYinship",{
"userId": uni.getStorageSync("userInfo").id, "userId": uni.getStorageSync("userInfo").id,
@ -276,7 +280,6 @@
} }
}, },
onBack() { onBack() {
console.log(1111)
const that = this; const that = this;
uni.showModal({ uni.showModal({
title: "温馨提示", title: "温馨提示",
@ -299,9 +302,11 @@
"topic":"message", "topic":"message",
}) })
} }
this.socialConsumption(); if(type == 1){
uni.$emit("showToast",this.isJieshou)
}
// this.socialConsumption();
clearInterval(timer) clearInterval(timer)
uni.$emit("watchSocket")
if(this.toIsBack == false){ if(this.toIsBack == false){
return ; return ;
} }
@ -317,6 +322,8 @@
this.engine?.logoutRoom(this.roomId); this.engine?.logoutRoom(this.roomId);
/** 销毁引擎 */ /** 销毁引擎 */
ZegoExpressEngine.destroyEngine(); ZegoExpressEngine.destroyEngine();
uni.$off("watchEvent")
uni.$off("toJieshouYinship")
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
@ -342,9 +349,6 @@
this.engine.setAudioRouteToSpeaker(this.isCamera) this.engine.setAudioRouteToSpeaker(this.isCamera)
}, },
async toPermission() { async toPermission() {
if(this.type ==3 || this.type==1){
this.getOtherUserInfo();
}
this.getUserInfo(); this.getUserInfo();
}, },
//查询个人信息 //查询个人信息
@ -431,6 +435,7 @@
that.engine.on('publisherStateUpdate', (streamID, state, errorCode, extendedData) => { that.engine.on('publisherStateUpdate', (streamID, state, errorCode, extendedData) => {
console.log("publisherStateUpdate",streamID) console.log("publisherStateUpdate",streamID)
}); });
// 登录房间 // 登录房间
// 开始登录房间 // 开始登录房间
@ -504,7 +509,7 @@
const that = this; const that = this;
console.log("toTuiliu",this.sellerStreamId) console.log("toTuiliu",this.sellerStreamId)
that.engine.startPlayingStream(this.sellerStreamId); that.engine.startPlayingStream(this.sellerStreamId);
that.isOpenSocket = false;
ZegoExpressEngine.instance().on("playerStateUpdate", (streamID, state, errorCode, extendedData) => { ZegoExpressEngine.instance().on("playerStateUpdate", (streamID, state, errorCode, extendedData) => {
/** 调用拉流接口成功后,当拉流器状态发生变更,如出现网络中断导致推流异常等情况,SDK在重试拉流的同时,会通过该回调通知 */ /** 调用拉流接口成功后,当拉流器状态发生变更,如出现网络中断导致推流异常等情况,SDK在重试拉流的同时,会通过该回调通知 */
console.log("playerStateUpdate",streamID) console.log("playerStateUpdate",streamID)
@ -527,7 +532,7 @@
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: 22; z-index: 122;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
.navbar{ .navbar{
@ -551,7 +556,6 @@
height: 44px; height: 44px;
position: fixed; position: fixed;
left: 0; left: 0;
top: 50px;
z-index: 44; z-index: 44;
display: flex; display: flex;
align-items: center; align-items: center;
@ -566,15 +570,16 @@
&-hd{ &-hd{
flex-direction: column; flex-direction: column;
position: relative; position: relative;
z-index: 2;
.shitu{ .shitu{
width: 300rpx; width: 300rpx;
height: 300rpx; height: 380rpx;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
position: absolute; position: fixed;
right: 20rpx; right: 20rpx;
top: 120rpx; top: 120rpx;
z-index: 12; z-index: 212;
} }
} }
&-bd{ &-bd{
@ -679,7 +684,7 @@
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 200rpx; bottom: 200rpx;
z-index: 44; z-index: 122;
flex-direction: row; flex-direction: row;
.item{ .item{
flex: 1; flex: 1;

@ -65,9 +65,9 @@
<view class="item" @click="toPage(1)"> <view class="item" @click="toPage(1)">
<image src="@/static/yuyin-02.png"></image>换一个 <image src="@/static/yuyin-02.png"></image>换一个
</view> </view>
<view class="item"> <!-- <view class="item">
<image src="@/static/yuyin-05.png"></image>{{isSucess == 2?'等待中':'立即进入'}} <image src="@/static/yuyin-05.png"></image>{{isSucess == 2?'等待中':'立即进入'}}
</view> </view> -->
</view> </view>
<!-- <view class="tongcheng-video"> <!-- <view class="tongcheng-video">
<view class="other"></view> <view class="other"></view>
@ -82,7 +82,7 @@
data() { data() {
return { return {
info: {}, info: {},
count: 10, count: 5,
userInfo: {}, userInfo: {},
isJieshou: false, isJieshou: false,
title: "视频速配", title: "视频速配",
@ -100,7 +100,7 @@
}, },
onLoad() { onLoad() {
this.userInfo = uni.getStorageSync("userInfo"); this.userInfo = uni.getStorageSync("userInfo");
this.count = Math.floor(Math.random() * (10 - 1 + 1)) + 1; this.count = Math.floor(Math.random() * (5 - 1 + 1)) + 1;
this.toPage(1) this.toPage(1)
}, },
onReady() { onReady() {

@ -65,9 +65,9 @@
<view class="item" @click="toPage(1)"> <view class="item" @click="toPage(1)">
<image src="@/static/yuyin-02.png"></image>换一个 <image src="@/static/yuyin-02.png"></image>换一个
</view> </view>
<view class="item"> <!-- <view class="item">
<image src="@/static/yuyin-05.png"></image>{{isSucess == 2?'等待中':'立即进入'}} <image src="@/static/yuyin-05.png"></image>{{isSucess == 2?'等待中':'立即进入'}}
</view> </view> -->
</view> </view>
<!-- <view class="tongcheng-video"> <!-- <view class="tongcheng-video">
<view class="other"></view> <view class="other"></view>
@ -82,7 +82,7 @@
data() { data() {
return { return {
info: {}, info: {},
count: 10, count: 5,
userInfo: {}, userInfo: {},
isJieshou: false, isJieshou: false,
title: "语音速配", title: "语音速配",
@ -100,7 +100,7 @@
}, },
onLoad() { onLoad() {
this.userInfo = uni.getStorageSync("userInfo"); this.userInfo = uni.getStorageSync("userInfo");
this.count = Math.floor(Math.random() * (10 - 1 + 1)) + 1; this.count = Math.floor(Math.random() * (5 - 1 + 1)) + 1;
this.toPage(1) this.toPage(1)
}, },
onReady() { onReady() {

@ -18,12 +18,44 @@
:scroll-top="wrapperScrollHeight" :scroll-top="wrapperScrollHeight"
> >
<view id="wrapper1"> <view id="wrapper1">
<!-- 个人信息 -->
<view class="info">
<view class="hd">
<image class="avatar" :src="userInfo.faceImage?userInfo.faceImage:userInfo.img"></image>
<view class="user">
<view class="one">
<view class="title">{{userInfo.realname?userInfo.nickname:userInfo.nickname}}</view>
<view class="vip" v-if="userInfo.memberflag>=1">VIP{{userInfo.memberflag}}</view>
<view class="peiwam" v-if="userInfo.role == 2">陪玩师</view>
<image class="sex" v-if="userInfo.sex ==2" src="@/static/peiwan-nv.png"></image>
<image class="sex" v-else src="@/static/peiwan-nan.png"></image>
</view>
<view class="two">
<view class="tag" v-if="userInfo.age">{{userInfo.age}}</view>
<view class="tag" v-if="userInfo.height">{{userInfo.height}}</view>
<view class="tag" v-if="userInfo.weight">{{userInfo.weight}}</view>
<view class="tag" v-if="userInfo.post">{{userInfo.post}}</view>
</view>
<view class="c" :class="isPlay1?'c-on':''" v-if="userInfo.voice" @click="toToggle1()">
{{userInfo.voiceTime}}
</view>
</view>
</view>
<view class="bd">
<view class="d" v-if="userInfo.declaration">
#交友宣言{{userInfo.declaration}}
</view>
<view class="list" v-if="userInfo.xiangce && userInfo.xiangce.length > 0">
<image v-for="(a,i) in userInfo.xiangce" @click="perviewImages(i)" :key="i" :src="a"></image>
</view>
</view>
</view>
<view class="item" :class="a.sendType == 1?'item-on':''" v-for="(a,index) in chatList" :key="index"> <view class="item" :class="a.sendType == 1?'item-on':''" v-for="(a,index) in chatList" :key="index">
<!-- 增加字段sendType 1我发给你 2你发给我 --> <!-- 增加字段sendType 1我发给你 2你发给我 -->
<template v-if="a.sendType == 1"> <template v-if="a.sendType == 1">
<view class="fr"> <view class="fr">
<view class="desc" v-if="a.type == 6 || a.type==3" v-html="a.message"></view> <view class="desc" v-if="a.type == 6 || a.type==3" v-html="a.message"></view>
<view class="gift" v-if="a.type == 5">送出礼物<image mode="widthFix" :src="a.message"></image>{{a.giftName}}<text>X{{a.num}}</text></view> <view class="gift" v-if="a.type == 5">送出礼物<image mode="widthFix" :src="a.message"></image>{{a.giftname}}<text>X{{a.num}}</text></view>
<view class="yinping" v-if="a.type == 1" @click="toAudio(a.message)"> <view class="yinping" v-if="a.type == 1" @click="toAudio(a.message)">
<image src="@/static/chat-03.png"></image> {{a.num}} <image src="@/static/chat-03.png"></image> {{a.num}}
</view> </view>
@ -34,14 +66,14 @@
<image @click="perviewImage(a.message)" :src="a.message"></image> <image @click="perviewImage(a.message)" :src="a.message"></image>
</view> </view>
</view> </view>
<view class="fl"><image :src="a.leftFaceImage"></image></view> <view class="fl"><image :src="a.leftFaceImage?a.leftFaceImage:a.leftImg"></image></view>
</template> </template>
<template v-else> <template v-else>
<view class="fl"><image :src="a.rightFaceImage"></image></view> <view class="fl"><image :src="a.leftFaceImage?a.leftFaceImage:a.leftImg"></image></view>
<view class="fr"> <view class="fr">
<view class="name">{{a.leftNickname}}<text v-if="a.leftRole == 2">陪玩师</text></view> <view class="name">{{a.leftNickname}}<text v-if="a.leftRole == 2">陪玩师</text></view>
<view class="desc" v-if="a.type == 6 || a.type==3" v-html="a.message"></view> <view class="desc" v-if="a.type == 6 || a.type==3" v-html="a.message"></view>
<view class="gift" v-if="a.type == 5">送出礼物<image mode="widthFix" :src="a.message"></image>{{a.giftName}}<text>X{{a.num}}</text></view> <view class="gift" v-if="a.type == 5">送出礼物<image mode="widthFix" :src="a.message"></image>{{a.giftname}}<text>X{{a.num}}</text></view>
<view class="yinping" v-if="a.type == 1" @click="toAudio(a.message)"> <view class="yinping" v-if="a.type == 1" @click="toAudio(a.message)">
<image src="@/static/chat-03.png"></image> {{a.num}} <image src="@/static/chat-03.png"></image> {{a.num}}
</view> </view>
@ -54,6 +86,8 @@
</view> </view>
</template> </template>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="chat-fd"> <view class="chat-fd">
@ -143,6 +177,7 @@
export default { export default {
data() { data() {
return { return {
isPlay1: false,
videoUrl: "", videoUrl: "",
wrapperScrollHeight: 0, wrapperScrollHeight: 0,
tabIndex: 0, tabIndex: 0,
@ -198,6 +233,21 @@
that.watchSocket(); that.watchSocket();
}, },
methods: { methods: {
toToggle1() {
this.isPlay1 = !this.isPlay1
if(this.isPlay1){
innerAudioContext.src = this.userInfo.voice;
innerAudioContext.play();
}else{
innerAudioContext.pause();
}
},
perviewImages(url){
uni.previewImage({
urls: this.userInfo.xiangce,
count: url
})
},
perviewImage(url){ perviewImage(url){
uni.previewImage({ uni.previewImage({
urls: [url] urls: [url]
@ -358,7 +408,6 @@
const that = this; const that = this;
this.isToggle = !this.isToggle this.isToggle = !this.isToggle
this.isOpen = false; this.isOpen = false;
}, },
// //
async userBalance() { async userBalance() {
@ -614,7 +663,6 @@
message: type == 3?that.content: that.img message: type == 3?that.content: that.img
}) })
if(code == 200){ if(code == 200){
uni.sendSocketMessage({data:JSON.stringify({ uni.sendSocketMessage({data:JSON.stringify({
"userId": uni.getStorageSync("userInfo").id, "userId": uni.getStorageSync("userInfo").id,
sellerId:that.id, sellerId:that.id,
@ -683,6 +731,10 @@
const { code, data , msg } = await this.$api.findOtherUserInfo({userId: uni.getStorageSync("userInfo").id,sellerId: this.id,}); const { code, data , msg } = await this.$api.findOtherUserInfo({userId: uni.getStorageSync("userInfo").id,sellerId: this.id,});
if(code == 200){ if(code == 200){
this.userInfo = data; this.userInfo = data;
this.userInfo.xiangce = [];
if(data.reserved1){
this.userInfo.xiangce = data.reserved1.split(",")
}
this.itemList = ["查看TA的主页", (data.isCare == 0?"关注":"取消关注"), "举报", (data.isBlack == 0?"加入黑名单":"移除黑名单")]; this.itemList = ["查看TA的主页", (data.isCare == 0?"关注":"取消关注"), "举报", (data.isBlack == 0?"加入黑名单":"移除黑名单")];
this.title = data.nickname+(data.isOnline == 1?"_(在线)":"_(离线)"); this.title = data.nickname+(data.isOnline == 1?"_(在线)":"_(离线)");
this.getConfigData(); this.getConfigData();
@ -772,7 +824,7 @@
return ; return ;
} }
} }
that.isToggle = false; that.isToggle = true;
that.isOpen = false; that.isOpen = false;
that.isBiaoqing = false; that.isBiaoqing = false;
uni.sendSocketMessage({data:JSON.stringify({ uni.sendSocketMessage({data:JSON.stringify({
@ -807,7 +859,7 @@
return ; return ;
} }
} }
that.isToggle = false; that.isToggle = true;
that.isOpen = false; that.isOpen = false;
that.isBiaoqing = false; that.isBiaoqing = false;
uni.sendSocketMessage({data:JSON.stringify({ uni.sendSocketMessage({data:JSON.stringify({
@ -855,6 +907,9 @@
console.log(e) console.log(e)
}, },
}, },
destroyed() {
uni.$off("toChatObj")
}
} }
</script> </script>
@ -965,7 +1020,6 @@
} }
} }
.c{ .c{
input{ input{
width: 166rpx; width: 166rpx;
background: #FFFFFF; background: #FFFFFF;
@ -1028,6 +1082,149 @@
&-active1{ &-active1{
height: calc(100vh - 120rpx - 88rpx - 70rpx - 160rpx); height: calc(100vh - 120rpx - 88rpx - 70rpx - 160rpx);
} }
//
.info{
width: 100%;
background: #FFFFFF;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
box-sizing: border-box;
margin-top: 20rpx;
.hd{
display: flex;
align-items: center;
.avatar{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-right: 15rpx;
}
.user{
flex: 1;
position: relative;
.c{
width: 165rpx;
height: 95rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
background: url(@/static/icon-bofang.png) center top no-repeat;
background-size: contain;
line-height: 88rpx;
text-indent: 90rpx;
position: absolute;
right: -20rpx;
top: 0;
z-index: 2;
&-on{
background: url(@/static/icon-zanting.png) center top no-repeat;
background-size: contain;
}
}
.two{
display: flex;
align-items: center;
overflow: hidden;
flex-wrap: wrap;
.tag{
padding: 0 20rpx;
font-weight: 500;
font-size: 22rpx;
color: #666666;
line-height: 40rpx;
border-radius: 40rpx;
background: #F2F2F2;
display: flex;
align-items: center;
margin-right: 20rpx;
margin-top: 20rpx;
}
}
.one{
display: flex;
align-items: center;
.title{
font-weight: 500;
font-size: 36rpx;
color: #222222;
}
.vip{
width: 60rpx;
line-height: 32rpx;
background: url(@/static/vip-bg.png) center top no-repeat;
background-size: contain;
text-align: center;
font-weight: 500;
font-size: 20rpx;
color: #FFFFFF;
overflow: hidden;
margin-left: 20rpx;
}
.peiwam{
width: 100rpx;
line-height: 40rpx;
margin-left: 20rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
border-radius: 20rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FFFFFF;
}
.sex{
margin-left: 20rpx;
width: 30rpx;
height: 30rpx;
image{
width: 30rpx;
height: 30rpx;
}
}
}
}
}
.bd{
margin-top: 20rpx;
.d{
font-weight: 500;
font-size: 24rpx;
color: #222222;
text-align: left;
}
.list{
width: 100%;
display: flex;
align-items: center;
image{
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
margin-left: 20rpx;
margin-top: 20rpx;
&:first-child{
margin-left: 0;
}
}
.tag{
padding: 0 30rpx;
line-height: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
margin-left: 20rpx;
margin-top: 20rpx;
&:first-child{
margin-left: 0;
}
}
}
}
}
.item{ .item{
padding: 20rpx 0; padding: 20rpx 0;
width: 100%; width: 100%;
@ -1267,12 +1464,12 @@
opacity: 0; opacity: 0;
} }
image{ image{
width: 40rpx; width: 70rpx;
height: 40rpx; height: 70rpx;
float: left; float: left;
margin-top: 6rpx; margin-top: 6rpx;
margin-bottom: 6rpx; margin-bottom: 6rpx;
margin-right: 10rpx; margin-right: 5rpx;
} }
} }
} }

@ -277,19 +277,20 @@
const that = this const that = this
uni.chooseImage({ uni.chooseImage({
count: 9-that.userInfo.xiangce.length, count: 9-that.userInfo.xiangce.length,
sizeType: ["original"], // sizeType: ['original', 'compressed'], //
sourceType: ["album", "camera"], sourceType: ["album", "camera"],
success: (res) => { success: (res) => {
console.log(res) console.log(res)
for(var i = 0; i<res.tempFiles.length;i++){ for(var i = 0; i<res.tempFilePaths.length;i++){
// //
uni.uploadFile({ uni.uploadFile({
url: that.$baseUrl+'/prod-api/common/upload', url: that.$baseUrl+'/prod-api/common/upload',
filePath: res.tempFiles[i].tempFilePath, filePath: res.tempFilePaths[i],
name: 'file', name: 'file',
complete: (res) => { complete: (res1) => {
if(res.statusCode == 200){ console.log(res1)
const {code, fileName, url, msg} = JSON.parse(res.data); if(res1.statusCode == 200){
const {code, fileName, url, msg} = JSON.parse(res1.data);
if(code == 200){ if(code == 200){
uni.showToast({ uni.showToast({
title: "上传成功" title: "上传成功"

@ -84,7 +84,7 @@
const that = this const that = this
uni.chooseImage({ uni.chooseImage({
count: 9-that.imgurl.length, count: 9-that.imgurl.length,
sizeType: ["original"], // sizeType: ['original', 'compressed'], //
sourceType: ["album", "camera"], sourceType: ["album", "camera"],
success: (res1) => { success: (res1) => {
console.log(res1) console.log(res1)

@ -10,7 +10,7 @@
<view class="b"> <view class="b">
<image :src="a.img"></image> <image :src="a.img"></image>
<view class="info"> <view class="info">
<view class="name">{{a.nickname}}陪玩师</view> <view class="name">{{a.nickname}}</view>
<view class="desc">约玩项目{{a.playConfigName}}</view> <view class="desc">约玩项目{{a.playConfigName}}</view>
<view class="price">{{a.totalMoney-a.travelExpensesTotal}}/{{a.duration}}小时</view> <view class="price">{{a.totalMoney-a.travelExpensesTotal}}/{{a.duration}}小时</view>
</view> </view>

@ -304,7 +304,7 @@
} }
.info{ .info{
padding: 30rpx 0; padding: 30rpx 0;
flex: 1; width: 550rpx;
border-bottom: 1px solid #EAEAEA; border-bottom: 1px solid #EAEAEA;
.name{ .name{
font-weight: 400; font-weight: 400;

@ -13,7 +13,7 @@
props: { props: {
viewMode: { viewMode: {
type: Number, type: Number,
default: ZegoViewMode.ScaleToFill default: ZegoViewMode.AspectFill
}, },
channel: { channel: {
type: Number, type: Number,

@ -12,7 +12,7 @@
props: { props: {
viewMode: { viewMode: {
type: Number, type: Number,
default: ZegoViewMode.ScaleToFill default: ZegoViewMode.AspectFill
}, },
canvasType: { canvasType: {
type: Number, type: Number,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save