main
15004070936 4 weeks ago
parent 95e91728a0
commit 3a8228ac4f

@ -47,11 +47,11 @@
</view> </view>
<!-- 1待上课2预约中3待评价 4已完成 5已取消--> <!-- 1待上课2预约中3待评价 4已完成 5已取消-->
<!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; --> <!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; -->
<button type="primary" class="conbtn" @click="gototeacher(item)"></button> <button class="conbtn" @click="gototeacher(item)"></button>
<!-- <button v-if="item.bookStatus==2||item.bookStatus==1" type="primary" class="cancelbtn" :data-id="item.courseTimeId" @click="cancelkcdo"></button>--> <!-- <button v-if="item.bookStatus==2||item.bookStatus==1" type="primary" class="cancelbtn" :data-id="item.courseTimeId" @click="cancelkcdo"></button>-->
<button v-if="'0,1,2'.includes(item.bookStatus)" type="primary" class="cancelbtn" :data-id="item.courseTimeId" @click="cancelyydo"></button> <button v-if="'0,1,2'.includes(item.bookStatus)" class="cancelbtn" :data-id="item.courseTimeId" @click="cancelyydo"></button>
<!-- <button v-if="item.bookStatus==0" type="primary" class="paybtn" :data-id="item.courseTimeId" @click="checkdo($event,item)"></button>--> <!-- <button v-if="item.bookStatus==0" type="primary" class="paybtn" :data-id="item.courseTimeId" @click="checkdo($event,item)"></button>-->
<button v-if="item.bookStatus==4" type="primary" class="viewbtn" :data-id="item.courseTimeId" @click="orderdo($event,item)"></button> <button v-if="item.bookStatus==4" class="viewbtn" :data-id="item.courseTimeId" @click="orderdo($event,item)"></button>
<!-- <button v-if="item.bookStatus==4" type="primary" class="gzbtn" :data-id="item.courseTimeId" @click="gotoevaluate($event,item)"></button>--> <!-- <button v-if="item.bookStatus==4" type="primary" class="gzbtn" :data-id="item.courseTimeId" @click="gotoevaluate($event,item)"></button>-->
</view> </view>
@ -514,7 +514,7 @@ import { mapState, mapGetters, mapActions } from 'vuex';
// //
let chat = { let chat = {
type: 'PRIVATE', type: 'PRIVATE',
targetId: this.userid, targetId: item.teacherAppId,
showName: item.teacherName, showName: item.teacherName,
headImage: item.pic?item.pic:'/static/image/kf.png', headImage: item.pic?item.pic:'/static/image/kf.png',
}; };

@ -345,7 +345,7 @@
let socketTask = null; let socketTask = null;
socketTask=uni.connectSocket({ socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -519,7 +519,7 @@
socketinit(){ socketinit(){
var that = this; var that = this;
this.socketTask=uni.connectSocket({ this.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -474,7 +474,7 @@
var that = this; var that = this;
if (!this.isConnected) { if (!this.isConnected) {
uni.connectSocket({ uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -538,7 +538,7 @@
var that = this; var that = this;
if (!this.isConnected) { if (!this.isConnected) {
this.socketTask=uni.connectSocket({ this.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -671,7 +671,7 @@
var that = this; var that = this;
if (!this.isConnected) { if (!this.isConnected) {
this.socketTask=uni.connectSocket({ this.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -162,6 +162,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
// Vuex state // Vuex state
this.chat = this.chats[options.chatIdx]; this.chat = this.chats[options.chatIdx];
const size = this.messageSize; const size = this.messageSize;
@ -1115,17 +1116,17 @@ export default {
} }
.scroll-to-bottom { .scroll-to-bottom {
//position: absolute; position: absolute;
// //
//right: 30rpx; right: 30rpx;
//bottom: 30rpx; //bottom: 30rpx;
font-size: $im-font-size; font-size: $im-font-size;
color: $im-color-primary; color: $im-color-primary;
font-weight: 600; font-weight: 600;
background: white; background: white;
//padding: 10rpx 30rpx; padding: 10rpx 30rpx;
border-radius: 25rpx; border-radius: 25rpx;
//box-shadow: $im-box-shadow-dark; box-shadow: $im-box-shadow-dark;
} }
} }

@ -157,7 +157,7 @@
var that = this; var that = this;
let socketTask = null; let socketTask = null;
socketTask=uni.connectSocket({ socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -132,9 +132,9 @@
socketinit(){ socketinit(){
var that = this; var that = this;
if (!that.isConnected) { if (!that.isConnected) {
console.log("ws://192.168.13.9:8528/im") console.log("wss://www.sanduolantoyoga.com/yoga-imserver")
this.socketTask=uni.connectSocket({ this.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -169,7 +169,7 @@
// if (!that.isConnected) { // if (!that.isConnected) {
that.socketTask=uni.connectSocket({ that.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -171,7 +171,7 @@
socketinit(){ socketinit(){
var that = this; var that = this;
that.socketTask=uni.connectSocket({ that.socketTask=uni.connectSocket({
url: "ws://192.168.13.9:8528/im", url: "wss://www.sanduolantoyoga.com/yoga-imserver",
header: { header: {
// 'content-type': 'application/json', // 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"), Authorization: uni.getStorageSync("token"),

@ -796,7 +796,7 @@
// //
let chat = { let chat = {
type: 'PRIVATE', type: 'PRIVATE',
targetId: this.product.instructor, targetId: this.product.customerService?this.product.customerService:this.product.instructor,
showName: nickName, showName: nickName,
headImage: headImage, headImage: headImage,
}; };

@ -662,6 +662,7 @@ import { mapState, mapGetters, mapActions } from 'vuex';
uni.showLoading({ uni.showLoading({
title: '会话创建中...' title: '会话创建中...'
}); });
const {data: res} = await uni.$http.get("/api/friend/find/"+this.product.customerService); const {data: res} = await uni.$http.get("/api/friend/find/"+this.product.customerService);
if(res.data){ if(res.data){
// //
@ -679,15 +680,16 @@ import { mapState, mapGetters, mapActions } from 'vuex';
// 线 // 线
// //
// //
let chat = { let chat = {
type: 'PRIVATE', type: 'PRIVATE',
targetId: this.userid, targetId: this.product.customerService,
showName: nickName, showName: nickName,
headImage: headImage?headImage:'/static/image/kf.png', headImage: headImage?headImage:'/static/image/kf.png',
}; };
this.openChat(chat); this.openChat(chat);
let chatIdx = this.findChatIdx(chat); let chatIdx = this.findChatIdx(chat);
uni.navigateTo({ url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}` }); uni.navigateTo({ url: `/pages/chatbox/chat-box?chatIdx=${chatIdx}` });
// var timestamp = new Date().getTime(); // var timestamp = new Date().getTime();
// var chatid="privatechat-" + this.userid +"-"+ this.product.customerService; // var chatid="privatechat-" + this.userid +"-"+ this.product.customerService;
// var info={ // var info={

Loading…
Cancel
Save