Compare commits

...

2 Commits

Author SHA1 Message Date
zouyanyan c0f6c1743c upbug
1 month ago
zouyanyan a2cd86fd4e upbug
3 months ago

@ -45,7 +45,7 @@
line-height: 1; line-height: 1;
} }
.tki-tree-bar-confirm { .tki-tree-bar-confirm {
color: #89965f; color: #00a89b;
} }
.tki-tree-view { .tki-tree-view {
position: absolute; position: absolute;
@ -120,7 +120,7 @@
border-bottom-width: 2rpx; border-bottom-width: 2rpx;
border-right-width: 2rpx; border-right-width: 2rpx;
border-style: solid; border-style: solid;
border-color: #89965f; border-color: #00a89b;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -133,7 +133,7 @@
border-top-right-radius: 20%; border-top-right-radius: 20%;
border-bottom-right-radius: 20%; border-bottom-right-radius: 20%;
border-bottom-left-radius: 20%; border-bottom-left-radius: 20%;
background-color: #89965f; background-color: #00a89b;
} }
.tki-tree-check .radio { .tki-tree-check .radio {
border-top-left-radius: 50%; border-top-left-radius: 50%;

@ -19,7 +19,7 @@
<view v-if="ifmore" class="bt-img" @tap="more"> <view v-if="ifmore" class="bt-img" @tap="more">
<image src="../../static/icon/more.png"></image> <image src="../../static/icon/more.png"></image>
</view> </view>
<u-button v-if="!ifmore" @tap="sendMsg" style="background-color: #89965f; width: 88rpx;color: #fff;border-radius: 10rpx;"></u-button> <u-button v-if="!ifmore" @tap="sendMsg" style="background-color: #00a89b; width: 88rpx;color: #fff;border-radius: 10rpx;"></u-button>
</view> </view>
<!-- 表情框 --> <!-- 表情框 -->
@ -227,16 +227,7 @@
// 使 res.tempFilePath // 使 res.tempFilePath
const filePath = res.tempFilePath; const filePath = res.tempFilePath;
console.log(filePath); console.log(filePath);
if(that.checkImageSize(filePath)){ that.checkImageSize(filePath,2);
that.send(filePath, 'video');
}
else{
that.$refs.uToast.show({
title: "视频大小不能超过20M...",
type: "error",
duration: 2000,
});
}
}, },
fail: function (err) { fail: function (err) {
console.error('选择视频失败:', err); console.error('选择视频失败:', err);
@ -245,6 +236,7 @@
}, },
// //
sendImg(e) { sendImg(e) {
var that =this;
let count = 9; let count = 9;
if (e == 'album') { if (e == 'album') {
count = 9; count = 9;
@ -260,40 +252,66 @@
console.log(JSON.stringify(res.tempFilePaths)); console.log(JSON.stringify(res.tempFilePaths));
const filePaths = res.tempFilePaths; const filePaths = res.tempFilePaths;
for (let i = 0; i < filePaths.length; i++) { for (let i = 0; i < filePaths.length; i++) {
if(this.checkImageSize(filePath)){ that.checkImageSize(filePaths[i],1);
this.send(filePaths[i], 'image')
}
else{
this.$refs.uToast.show({
title: "图片大小不能超过20M...",
type: "error",
duration: 2000,
});
}
} }
} }
}); });
}, },
checkImageSize(filePath) { checkImageSize(filePath,type) {
var ifsize= 0; var that = this;
uni.getFileInfo({ uni.getFileInfo({
filePath: filePath, filePath: filePath,
success: function (res) { success: function (res) {
console.log('文件大小(字节):', res.size); console.log('文件大小(字节):', res.size);
if (res.size > 20*1024 * 1024) { // 20MB if(type==1){
console.log('文件过大'); //
// if (res.size > 2*1024*1024) { // 20MB
ifsize=0; console.log('文件过大');
} else { //
console.log('文件大小合适'); that.$refs.uToast.show({
// title: "图片大小不能超过2M...",
ifsize=1; type: "error",
} duration: 2000,
return ifsize; });
} else {
console.log('文件大小合适');
//
that.send(filePath, 'image');
}
}
else if(type==2){
//
if (res.size > 10*1024*1024) { // 20MB
console.log('文件过大');
//
that.$refs.uToast.show({
title: "视频大小不能超过10M...",
type: "error",
duration: 2000,
});
} else {
console.log('文件大小合适');
//
that.send(filePath, 'video');
}
}
}, },
fail: function (err) { fail: function (err) {
console.error('获取文件信息失败:', err); console.error('获取文件信息失败:', err);
return ifsize; if(type==1){
that.$refs.uToast.show({
title: "图片大小不能超过2M...",
type: "error",
duration: 2000,
});
}
else if(type==1){
that.$refs.uToast.show({
title: "视频大小不能超过10M...",
type: "error",
duration: 2000,
});
}
} }
}); });
}, },
@ -377,6 +395,7 @@
}, },
// //
send(msg, type) { send(msg, type) {
console.log("send")
console.log(msg, type) console.log(msg, type)
let date = { let date = {
message: msg, message: msg,
@ -554,7 +573,7 @@
display: inline-block; display: inline-block;
min-width: 120rpx; min-width: 120rpx;
line-height: 84rpx; line-height: 84rpx;
background-color: #89965f; background-color: #00a89b;
border-radius: 42rpx; border-radius: 42rpx;
color:#ffffff; color:#ffffff;
} }

@ -1,9 +1,9 @@
{ {
"name" : "三朵蘭瑜伽", "name" : "瑜伽",
"appid" : "__UNI__4060561", "appid" : "__UNI__B6E0086",
"description" : "三朵蘭瑜伽", "description" : "瑜伽",
"versionName" : "1.0.10", "versionName" : "1.0.9",
"versionCode" : 1010, "versionCode" : 109,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"flexible" : true, "flexible" : true,
@ -151,7 +151,47 @@
} }
} }
}, },
"nativePlugins" : {} "nativePlugins" : {
"JG-JCore" : {
"JPUSH_APPKEY_ANDROID" : "d5edb270e4b1cc29616e1dd5",
"JPUSH_APPKEY_IOS" : "",
"JPUSH_CHANNEL_ANDROID" : "",
"JPUSH_CHANNEL_IOS" : "",
"__plugin_info__" : {
"name" : "极光推送 JCore 官方 SDK",
"description" : "极光推送 JCore 官方 SDK HBuilder 插件版本",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=4028",
"android_package_name" : "com.sdlyoga.app",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "4028",
"parameters" : {
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "JPUSH_APPKEY",
"value" : ""
},
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY",
"value" : ""
},
"JPUSH_CHANNEL_ANDROID" : {
"des" : "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JCore:CHANNEL",
"value" : ""
}
}
}
}
}
}, },
"quickapp" : {}, "quickapp" : {},
"mp-weixin" : { "mp-weixin" : {

@ -161,10 +161,10 @@
} }
}, },
{ {
"path" : "pages/teacher/chat", "path" : "pages/chat/chat",
"style" : "style" :
{ {
"navigationBarTitleText": "咨询", "navigationBarTitleText": "教练咨询",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@ -214,11 +214,25 @@
} }
}, },
{ {
"path" : "pages/product/service", "path" : "pages/chat/groupchat",
"style" : "style" :
{ {
"navigationBarTitleText": "客服", "navigationBarTitleText": "客服",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"buttons": [
{
"fontSrc": "/static/qlfont.ttf",
"text": "\ue68e",
"fontSize": "28",
"color": "#ffffff",
"float": "right",
"background": "rgba(0,0,0,0)"
}
]
}
}
} }
}, },
{ {
@ -311,7 +325,7 @@
"path": "pages/message/group", "path": "pages/message/group",
"style": { "style": {
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#89965f", "navigationBarBackgroundColor": "#00a89b",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false
} }
@ -321,7 +335,7 @@
"path": "pages/message/contact", "path": "pages/message/contact",
"style": { "style": {
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#89965f", "navigationBarBackgroundColor": "#00a89b",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false
} }
@ -359,6 +373,22 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/book/bookteacher",
"style" :
{
"navigationBarTitleText": "预约学员",
"enablePullDownRefresh": false
}
},
{
"path": "pages/book/bookshop",
"style" :
{
"navigationBarTitleText": "预约学员",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/book/book", "path": "pages/book/book",
"style" : "style" :
@ -414,8 +444,8 @@
"pageOrientation": "auto", "pageOrientation": "auto",
"navigationStyle": "default", // "navigationStyle": "custom", "navigationStyle": "default", // "navigationStyle": "custom",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#89965f", "navigationBarBackgroundColor": "#00a89b",
"backgroundColor": "#89965f" "backgroundColor": "#00a89b"
}, },
"tabBar": { "tabBar": {
"color": "#909399", "color": "#909399",

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<view class="tip"> <view class="tip">
<uni-icons type="info" size="20" color="#89965f"></uni-icons> <uni-icons type="info" size="20" color="#00a89b"></uni-icons>
<text style="margin-left: 10rpx;">若所在省市无法选择请在省市区选择其他在详细地址输入即可</text> <text style="margin-left: 10rpx;">若所在省市无法选择请在省市区选择其他在详细地址输入即可</text>
</view> </view>
<view class="example"> <view class="example">
@ -29,7 +29,7 @@
<view class="xcon"> <view class="xcon">
<view class="xcell"> <view class="xcell">
<text class="txt">设置默认地址</text> <text class="txt">设置默认地址</text>
<switch :checked="valiFormData.isDefault" @change="switch1Change" color="#89965f" style="transform:scale(0.7)"/> <switch :checked="valiFormData.isDefault" @change="switch1Change" color="#00a89b" style="transform:scale(0.7)"/>
</view> </view>
<!-- <view class="xright" @click="delDo" >删除地址</view> --> <!-- <view class="xright" @click="delDo" >删除地址</view> -->
</view> </view>
@ -447,7 +447,7 @@
} }
} }
.tip{ .tip{
background: #f3f4ee; background: #e4f9f7;
padding: 20rpx; padding: 20rpx;
font-size: 24rpx; font-size: 24rpx;
color: #303133; color: #303133;
@ -464,7 +464,7 @@
width: 660rpx; width: 660rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -221,7 +221,7 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #FFFFFF;
background: #89965f; background: #00a89b;
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -270,7 +270,7 @@
width: 560rpx; width: 560rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -328,7 +328,7 @@
height: 48rpx; height: 48rpx;
text-align: center; text-align: center;
line-height: 50rpx; line-height: 50rpx;
background: #89965f; background: #00a89b;
border-radius: 24rpx; border-radius: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }

@ -21,9 +21,15 @@
</view> </view>
<view class="osname"> <view class="osname">
<view class="oscell"> <view class="oscell">
<view v-if="item.claName=='团课'" class="txtbg">{{item.claName}}</view> <!-- <view v-if="item.claName=='团课'" class="txtbg">{{item.claName}}</view>
<view v-else class="txtbg1">{{item.claName}}</view> <view v-else class="txtbg1">{{item.claName?item.claName:'--'}}</view> -->
<uni-rate :size="20" :readonly="true" :value="item.star" :max="item.star"/> <view v-if="item.claName" class="txtbg1" :style="{color:item.claColor?item.claColor:'#333'}">
{{item.claName}}
</view>
<view v-if="item.courseTypeName" style="color: #888;font-weight: 500;font-size: 28rpx;">
{{item.courseTypeName}}
</view>
<uni-rate :size="20" :readonly="true" :value="item.star?item.star:5" :max="5"/>
</view> </view>
<view class="oscell" v-if="item.storeName"> <view class="oscell" v-if="item.storeName">
<uni-icons type="shop" size="18" color="#00A99A"></uni-icons> <uni-icons type="shop" size="18" color="#00A99A"></uni-icons>
@ -60,7 +66,8 @@
<!-- 信息 --> <!-- 信息 -->
<view class="yycon tcon"> <view class="yycon tcon">
<view class="olist"> <mp-html v-if="remark" :content="remark" :markdown="true" :lazy-load="true"/>
<!-- <view class="olist">
<view class="ltxt">会籍类型</view> <view class="ltxt">会籍类型</view>
<view class="rtxt">精品团课</view> <view class="rtxt">精品团课</view>
</view> </view>
@ -83,7 +90,7 @@
请至少提前10分钟进教室保持手机静音<br> 请至少提前10分钟进教室保持手机静音<br>
课程中如有特殊情况请及时联系老师 课程中如有特殊情况请及时联系老师
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
@ -95,7 +102,7 @@
</template> </template>
<script> <script>
import { myCache } from '../../utils/utils.js'; import { myCache,getRemoteFile } from '../../utils/utils.js';
import openlogin from "../components/openlogin.vue"; import openlogin from "../components/openlogin.vue";
export default { export default {
components: { components: {
@ -125,7 +132,8 @@
"bookAttendCnt": "1", "bookAttendCnt": "1",
"atClassCnt": "5", "atClassCnt": "5",
"lessCnt": "3", "lessCnt": "3",
} },
remark:null
}; };
}, },
@ -134,6 +142,7 @@
if(options.data){ if(options.data){
this.item = JSON.parse(decodeURIComponent(options.data)); this.item = JSON.parse(decodeURIComponent(options.data));
this.id = this.item.courseTimeId; this.id = this.item.courseTimeId;
this.getinfo();
} }
}, },
onShow(){ onShow(){
@ -157,16 +166,6 @@
return require("@/static/image/theme/p1.jpg") return require("@/static/image/theme/p1.jpg")
} }
}, },
timestampToTime(timestamp) {
const date = new Date(timestamp*1000);
const Y = date.getFullYear() + '-';
const M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
const D = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' ';
const h = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
const m = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
const s = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());
return Y+M+D+h+m+s;
},
getPhoneNumber(e){ getPhoneNumber(e){
if(e.phone){ if(e.phone){
this.phone = e.phone this.phone = e.phone
@ -196,14 +195,17 @@
}); });
}, },
async getinfo() { async getinfo() {
//
uni.showLoading({ uni.showLoading({
title: '数据加载中...' title: '数据加载中...'
}); });
const {data: res} = await uni.$http.post('api/course/bookCourseDetail', {id:this.id}); // const {data: res} = await uni.$http.post('/api/my/courseTimeDetail', {"courseTimeId":this.id}); // this.id
if(res){ const {data: res} = await uni.$http.post('/api/course/getCourseDetail', {"courseTimeId":this.id}); // this.id
if(res&&res.data){
// //
this.info=res; this.item=res.data;
console.log(this.item)
this.remark=res.data.remark;
this.$forceUpdate(); this.$forceUpdate();
} }
}, },
@ -227,30 +229,53 @@
var param={ var param={
"courseTimeId": this.item.courseTimeId "courseTimeId": this.item.courseTimeId
}; };
uni.showToast({ uni.showLoading({
title: '课程预约中...', title: '课程预约中...'
icon: 'success',
duration: 2000
}); });
const {data: res} = await uni.$http.post('/api/course/bookCourse', param); const {data: res} = await uni.$http.post('/api/course/bookCourse', param);
if(res.msg=="successed"){ console.log(res)
uni.showToast({ if(res.success){
title: '课程已预约!', // uni.showToast({
icon: 'success', // title: '',
duration: 2000 // icon: 'success',
}); // duration: 2000
// });
// //
myCache('courserefresh',1); myCache('courserefresh',1);
// uni.showModal({
uni.navigateBack({ title: '提示',
delta: 1 content: '课程已预约!',
cancelText: '返回',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
//
uni.navigateBack({
delta: 1
});
}
else{
//
uni.navigateBack({
delta: 1
});
}
}
}); });
} }
else{ else{
uni.showToast({ uni.showModal({
title: res.msg? res.msg:'课程预约失败!', title: '提示',
icon: 'error', content: res.message? res.message:'课程预约失败!',
duration: 2000 cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
}); });
} }
}, },

@ -7,25 +7,56 @@
<view class="yycon"> <view class="yycon">
<view class="oscon"> <view class="oscon">
<view class="osrcon"> <view class="osrcon">
<view class="osname"> <view class="ostop">
{{info.storeName?info.storeName:''}} <view class="osname">门店{{info.storeName?info.storeName:''}}</view>
<view class="qrimg" v-if="info.qrCode" @click="openQR(info.qrCode)">
<image class="qrimg" :src="'data:image/png;base64,'+info.qrCode" mode="aspectFill"></image>
</view>
</view> </view>
<view class="oscell"> <view class="oscell">
课程 上课课程
<text class="txt">{{info.claName }}</text>
<text class="txt">{{info.courseName }}</text> <text class="txt">{{info.courseName }}</text>
</view> </view>
<view v-if="info.claName" class="oscell">
上课班级
<text class="txt">{{info.claName }}</text>
</view>
<view class="oscell">
预约状态
<view v-if="info.bookStatus==1" class="ztip"></view>
<view v-else-if="info.bookStatus==0" class="jtip">预约中</view>
<view v-else-if="info.bookStatus==2" class="htip">待上课</view>
<view v-else-if="info.bookStatus==4" class="wtip">已完成</view>
<view v-else-if="info.bookStatus==3" class="ctip">已取消</view>
</view>
<view class="oscell"> <view class="oscell">
授课教练 授课教练
<text class="txt">{{info.teacherName }}</text> <text class="txt">{{info.teacherName }}</text>
</view> </view>
<view class="oscell"> <view class="oscell">
上课地点 上课教室
<text class="txt">{{info.roomName }}</text> <text class="txt">{{info.roomName }}</text>
</view> </view>
<view class="oscell"> <view class="oscell">
上课时间 上课时间
<text class="txt">{{ info.claDate+' '+ info.startTime +'-'+ info.endTime }}</text> <text class="txt">{{ (info.claDate?info.claDate:'')+' '+ (info.startTime?info.startTime:'') + (info.endTime?'-'+info.endTime:'') }}</text>
</view>
<view class="oscell" v-if="info.claTimeStatus">
课程状态
<text class="txt">{{info.claTimeStatus=='1'?'待上课':(info.claTimeStatus=='2'?'已上课':'') }}</text>
</view>
<view class="oscell">
创建日期
<text class="txt">{{info.createTime }}</text>
</view>
<view class="oscellqr">
<view class="ordtip">预约二维码(扫码签到)</view>
<view class="ordqr">
<image class="imgqr" :src="'data:image/png;base64,'+info.qrCode" mode="aspectFill"></image>
</view>
<view class="ordno">
<view class="txt"> 预约号 {{ info.code }}</view>
<view class="copy" @click="copydo(info.code)">.</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -33,14 +64,32 @@
<!-- 进度信息 --> <!-- 进度信息 -->
<view class="yycon"> <view class="yycon">
<uni-steps :options="steps" direction="column" :active="2"></uni-steps> <uni-steps v-if="ifshow" :options="steps" direction="column" :active="cur"></uni-steps>
</view> </view>
</view> </view>
<!-- 二维码 -->
<uni-popup ref="pfDialog" :mask-click="false">
<view class="pcon">
<view class="phtxt">预约二维码</view>
<view class="ptxt">
<image class="qrimg" :src="qr" mode="aspectFill"></image>
</view>
<view class="btn" @click="closeDialog">
关闭
</view>
</view>
</uni-popup>
<!-- 是否登录 --> <!-- 是否登录 -->
<openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin> <openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin>
<view v-if="ifscan" class="bottom"></view>
<view v-if="ifscan" class="submitcon">
<button type="primary" class="bbtn" @tap="goSign()"></button>
</view>
</view> </view>
</template> </template>
@ -57,25 +106,24 @@
phone:"", phone:"",
userid:"", userid:"",
id:"", id:"",
info: { qr:'',
"courseTimeId": 1935590110594646018, info: {
"bookId": 1, "claName": "",
"claName": "普拉提A班", "storeName": "",
"storeName": "慢瑜伽-三台子店",
"pic": null, "pic": null,
"claDate": "2025-10-25", "claDate": "",
"weekDay": null, "weekDay": null,
"startTime": "16:00:00", "startTime": "",
"endTime": "17:30:00", "endTime": "",
"roomName": null, "roomName": null,
"claColor": null, "claColor": null,
"claTimeStatus": null, "claTimeStatus": null,
"bookStatus": 3, "bookStatus": null,
"createTime": "2025-08-28 14:46:24", "createTime": "",
"code": null, "code": null,
"courseName": null, "courseName": null,
"teacherId": null, "teacherId": null,
"teacherName": "乐乐老师", "teacherName": "",
"checkIn": 1, "checkIn": 1,
"statusTime": [ "statusTime": [
{ {
@ -96,21 +144,28 @@
} }
] ]
}, },
cur:0,
steps: steps:
[ [
{title:'已付款',desc:'2025-02-05 13:30'}, // {title:'',desc:'2025-02-05 13:30'},
{title:'已预约',desc:'2025-02-05 13:30'}, // {title:'',desc:'2025-02-05 13:30'},
{title:'教练已确认',desc:'2025-02-05 13:30'}, // {title:'',desc:''},
{title:'店长确认,准备上课',desc:''}, // {title:'',desc:''},
{title:'课程结束',desc:''}, // {title:'',desc:''},
], ],
ifshow:false,
ifscan:false,
}; };
}, },
onLoad(options) { onLoad(options) {
if(options.type&&options.type=='qd')
{
this.ifscan=true;
this.$forceUpdate();
}
if(options.id) if(options.id)
{ {
this.id=parseInt(options.id); this.id=options.id;
this.getinfo(); this.getinfo();
} }
}, },
@ -126,15 +181,35 @@
} }
}, },
methods: { methods: {
timestampToTime(timestamp) { copydo(text){
const date = new Date(timestamp*1000); if (!text) {
const Y = date.getFullYear() + '-'; uni.showToast({
const M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; title: '复制内容为空!',
const D = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' '; icon: 'none'
const h = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; })
const m = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; return;
const s = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); }
return Y+M+D+h+m+s; uni.setClipboardData({
data: text,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success'
})
}
})
},
openQR(qr){
console.log("openQR")
this.qr='data:image/png;base64,'+qr;
this.$forceUpdate();
this.openDialog();
},
closeDialog(){
this.$refs.pfDialog.close();
},
openDialog(){
this.$refs.pfDialog.open();
}, },
getPhoneNumber(e){ getPhoneNumber(e){
if(e.phone){ if(e.phone){
@ -168,26 +243,33 @@
uni.showLoading({ uni.showLoading({
title: '数据加载中...' title: '数据加载中...'
}); });
const {data: res} = await uni.$http.post('/api/course/bookCourseDetail', {"bookId":this.id}); const {data: res} = await uni.$http.post('/api/course/bookCourseDetail', {"bookId":this.id});//"2037434363846811650"
if(res){ if(res&&res.data){
// //
this.info=res; this.info=res.data;
this.steps=[]; this.steps=[
// {title:'',desc:''},
// {title:'',desc:''},
// {title:'',desc:''},
// {title:'',desc:''},
// {title:'',desc:''},
];
// 0->1->2->// 3->;4- >/ // 0->1->2->// 3->;4- >/
// {title:'',desc:'2025-02-05 13:30'}, // {title:'',desc:'2025-02-05 13:30'},
// {title:'',desc:'2025-02-05 13:30'}, // {title:'',desc:'2025-02-05 13:30'},
// {title:'',desc:'2025-02-05 13:30'}, // {title:'',desc:'2025-02-05 13:30'},
// {title:'',desc:''}, // {title:'',desc:''},
// {title:'',desc:''}, // {title:'',desc:''},
if(res.statusTime&&res.statusTime.length>0){ var statusTime=res.data.statusTime?res.data.statusTime:[];
res.statusTime.forEach(cell=>{ if(statusTime&&statusTime.length>0){
statusTime.forEach(cell=>{
var ii={ var ii={
title: cell.status==0?'已预约':(cell.status==1?'教练已确认':(cell.status==2?'店长已确认':(cell.status==3?'预约已取消':cell.status==4?'课程已结束':''))), title: cell.status==0?'已预约':(cell.status==1?'教练已确认':(cell.status==2?'店长已确认':(cell.status==3?'预约已取消':cell.status==4?'课程已结束':''))),
desc: cell.time desc: cell.time
} }
this.steps.push(ii); this.steps.push(ii);
}); });
var lastStatus=res.statusTime[res.statusTim.length-1].status; var lastStatus=statusTime[statusTime.length-1].status;
if(lastStatus==0){ if(lastStatus==0){
this.steps.push({ this.steps.push({
title:'教练待确认',desc:'' title:'教练待确认',desc:''
@ -228,10 +310,71 @@
}); });
} }
this.$forceUpdate(); this.$forceUpdate();
this.cur=-1;
this.steps.forEach(cell=>{
if(cell.desc){
this.cur++;
this.$forceUpdate();
}
});
this.ifshow=true;
this.$forceUpdate();
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'预约详情获取失败!请重试!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
//
uni.navigateBack({
delta: 1
});
}
else{
//
uni.navigateBack({
delta: 1
});
}
}
});
}
},
async goSign(){
uni.showLoading({
title: '学员签到中...'
});
const {data: res} = await uni.$http.post('/api/my/checkIn', {"code":this.info.code,"bookId":this.info.bookId});
if(res&&res.success){
uni.showModal({
title: '提示',
content: '学员签到成功!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
//
uni.navigateBack({
delta: 1,
});
}
});
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'学员签到失败!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
} }
}, },
} }
} }
</script> </script>
@ -264,130 +407,6 @@
line-height: 60rpx; line-height: 60rpx;
z-index: 9999; z-index: 9999;
} }
.submitcon{
position: fixed;
display: flex;
bottom: 0;
left: 0;
width: 100%;
height: 140rpx;
background-color: #FFFFFF;
.pcon{
margin-left: 20rpx;
margin-top: 28rpx;
height: 50rpx;
display: flex;
flex:1;
justify-content: flex-start;
align-items: baseline;
.hj{
font-size: 30rpx;
}
.rmb{
font-size: 30rpx;
font-family: smallYuan;
color:#89965f ;
margin-left: 10rpx;
}
.zs{
font-size: 48rpx;
font-weight: 600;
font-family: smallYuan;
color:#89965f ;
}
.xs{
font-size: 28rpx;
font-weight: 600;
font-family: smallYuan;
color:#89965f ;
}
}
.btn{
background-color: #89965f !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width: 180rpx;
font-size: 26rpx;
}
.btn::after{
border:0 !important;
}
.gzbtn{
background-color: #4A4AFF !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width: 180rpx;
font-size: 26rpx;
}
.gzbtn::after{
border:0 !important;
}
.cancelbtn{
background-color: #FFFFFF !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width:180rpx;
font-size: 26rpx;
color:#333;
border:1rpx solid #dddddd;
}
.cancelbtn::after{
border:0 !important;
}
.returnbtn{
background-color: #ff3d0e !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width:180rpx;
font-size: 26rpx;
border:1rpx solid #ff3d0e;
color:#FFF;
}
.returnbtn::after{
border:0 !important;
}
.pjbtn{
background-color: #FFFFFF !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width:170rpx;
font-size: 26rpx;
border:1rpx solid #f5aa00;
color:#f5aa00;
}
.pjbtn::after{
border:0 !important;
}
.wlbtn{
background-color: #FFFFFF !important;
margin: 30rpx 20rpx 0 0;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
width:170rpx;
font-size: 26rpx;
border:1rpx solid #89965f;
color:#89965f;
}
.wlbtn::after{
border:0 !important;
}
}
.signimg{
width: 150rpx;
height: 180rpx;
border-radius: 10rpx;
}
.oscon{ .oscon{
margin:0; margin:0;
background-color: #f3fafa; background-color: #f3fafa;
@ -408,13 +427,23 @@
justify-content: flex-start; justify-content: flex-start;
margin-left: 20rpx; margin-left: 20rpx;
} }
.osname{ .ostop{
line-height: 48rpx; display: flex;
font-size:32rpx; flex-direction: row;
font-weight: 600;
color:#009999;
padding-bottom: 15rpx;
border-bottom: 1rpx dotted #74defb; border-bottom: 1rpx dotted #74defb;
padding-bottom: 15rpx;
.osname{
line-height: 48rpx;
font-size:32rpx;
font-weight: 600;
color:#009999;
display: flex;
flex:1;
}
.qrimg{
width: 50rpx;
height: 50rpx;
}
} }
.oscell{ .oscell{
display: flex; display: flex;
@ -425,21 +454,111 @@
border-bottom: 1rpx dotted #74defb; border-bottom: 1rpx dotted #74defb;
.txt{ .txt{
display: flex; flex: 1; display: flex; flex: 1;
}
}
.oscellqr{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 20rpx 20rpx 10rpx 20rpx;
.ordtip{
font-size: 28rpx;
color:#000;
margin-bottom: 10rpx;
}
.ordqr{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 200rpx;
margin-bottom: 10rpx;
.imgqr{
width: 200rpx;
height: 200rpx;
}
}
.ordno{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.txt{
font-size: 28rpx;
color:#000;
}
.copy{
font-size: 28rpx;
color:#1296db;
margin-left: 6rpx;
}
} }
} }
.ztip{
color:#1296db;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.jtip{
color:#feb467;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.htip{
border-radius: 12rpx;
color:#fc6900;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.hwtip{
color:#FF0000;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.wtip{
color:#43cca4;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.gtip{
color:#0036D6;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ftip{
color:#6A81F1;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ctip{
color:#888;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
} }
.ydcon{
position: relative;
}
.yyright{
position: absolute;
right: 100rpx;
top:50rpx;
}
.oinfo{ .oinfo{
padding:20rpx; padding:20rpx;
position: relative; position: relative;
margin-bottom: 160rpx; margin-bottom: 20rpx;
.ozc{ .ozc{
display: flex; display: flex;
@ -463,7 +582,7 @@
.owc{ .owc{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #89965f ; background-color: #00a89b ;
padding: 20rpx; padding: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
.ozstate{ .ozstate{
@ -577,17 +696,10 @@
} }
} }
} }
.red{
color:#ff3d0e;
}
.green{
color:#00cd00;
}
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f !important; background-color: #00a89b !important;
border-color: #89965f !important; border-color: #00a89b !important;
background-clip: content-box!important; background-clip: content-box!important;
box-sizing: border-box; box-sizing: border-box;
} }
@ -595,4 +707,93 @@
display: none!important; display: none!important;
} }
.pcon{
width: 690rpx;
padding-top:30rpx;
padding-bottom:50rpx;
background: #FCFCFD;
box-shadow: 0rpx 128rpx 128rpx 2rpx rgba(31,47,70,0.12);
border-radius: 16rpx 16rpx 16rpx 16rpx;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.phtxt{
width: 600rpx;
margin: 20rpx auto 10rpx;
font-size: 36rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 600;
color: #23262F;
}
.ptxt
{
width: 620rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx auto;
border-radius: 16rpx 16rpx 16rpx 16rpx;
opacity: 1;
border: 2rpx solid #F7F8FA;
padding: 30rpx;
.qrimg{
width: 400rpx;
height: 400rpx;
}
}
.btn{
width: 520rpx;
height: 80rpx;
line-height: 80rpx;
background: #00A99A;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(0,169,154,0.4);
border-radius: 254rpx 254rpx 254rpx 254rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FCFCFD;
}
}
.bottom{
width: 100%;
margin-bottom: 148rpx;
}
.submitcon{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 148rpx;
background: #FFFFFF;
box-shadow: 0rpx -4rpx 60rpx 2rpx rgba(1,31,63,0.1);
opacity: 1;
display: flex;
flex-direction: row;
}
.bbtn{
margin: 20rpx 50rpx 50rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FCFCFD;
width: 650rpx;
height: 76rpx;
line-height: 76rpx;
background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx;
opacity: 1;
&::after{
border:none;
}
}
</style> </style>

@ -6,13 +6,13 @@
<view class="pline"></view> <view class="pline"></view>
</view> </view>
</scroll-view> </scroll-view>
<swiper class="swiper-box" :duration="300" :current="tabCurrentIndex" @animationfinish="animationfinish"> <swiper class="swiper-box" :duration="300" :current="tabCurrentIndex" @animationfinish="animationfinish" @change="handleChange">
<swiper-item class="swiper-item" v-for="tabItem in list" :key="tabItem.id"> <swiper-item class="swiper-item" v-for="tabItem in list" :key="tabItem.id">
<scroll-view scroll-y style="height: 100%;width: 100%;"> <scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="scell" v-if="tabItem.slist.length>0"> <view class="scell" v-if="tabItem.slist.length>0">
<view v-for="(item, index) in tabItem.slist" :key="index" class="oitem"> <view v-for="(item, index) in tabItem.slist" :key="index" class="oitem">
<view class="otop" @click="gotoInfo(item.courseTimeId)"> <view class="otop" @click="gotoInfo(item.bookId)">
<view class="hleft"> <view class="hleft">
<text>{{item.storeName?item.storeName:'门店'}}</text> <text>{{item.storeName?item.storeName:'门店'}}</text>
</view> </view>
@ -27,19 +27,24 @@
</view> </view>
</view> </view>
<view class="oscon" @click="gotoInfo(item.courseTimeId)"> <view class="oscon" @click="gotoInfo(item.bookId)">
<view class="osimg imgload"> <view class="osimg imgload">
<image class="osimg" v-if="item.pic" :src="getimgRemoteFile(item.pic)" mode="aspectFill"></image> <image class="osimg" v-if="item.pic" :src="getimgRemoteFile(item.pic)" mode="aspectFill"></image>
</view> </view>
<view class="osname"> <view class="osname">
<text class="ntxt">{{item.courseName}} {{item.claName}} </text> <text class="ntxt">{{item.courseName}} {{item.claName}} </text>
<text class="txt"> 教练{{item.teacherName }}</text> <text class="txt"> 教练{{item.teacherName || '-'}}</text>
<text class="txt">上课时间{{ item.claDate+' '+item.startTime+'-'+item.endTime}}</text> <text class="txt"> 上课时间{{ item.claDate+' '+item.startTime+'-'+item.endTime}}</text>
<text class="txt">教室{{item.roomName}}</text> <text class="txt"> 教室{{item.roomName}}</text>
</view> </view>
</view> </view>
<view class="obtn"> <view class="obtn">
<view class="omoney"></view> <view class="qr">
<view class="qrimg" v-if="item.qrCode" @click="openQR(item.qrCode)">
<image class="qrimg" :src="'data:image/png;base64,'+item.qrCode" mode="aspectFill"></image>
</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 type="primary" class="conbtn" @click="gototeacher(item)"></button>
@ -49,6 +54,7 @@
<button v-if="item.orderstate==4" type="primary" class="viewbtn" :data-id="item.courseTimeId" @click="orderdo($event,item)"></button> <button v-if="item.orderstate==4" type="primary" class="viewbtn" :data-id="item.courseTimeId" @click="orderdo($event,item)"></button>
<button v-if="item.orderstate==4" type="primary" class="gzbtn" :data-id="item.courseTimeId" @click="gotoevaluate($event,item)"></button> <button v-if="item.orderstate==4" type="primary" class="gzbtn" :data-id="item.courseTimeId" @click="gotoevaluate($event,item)"></button>
</view> </view>
</view> </view>
</view> </view>
@ -59,6 +65,19 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 二维码 -->
<uni-popup ref="pfDialog" :mask-click="false">
<view class="pcon">
<view class="phtxt">预约二维码</view>
<view class="ptxt">
<image class="qrimg" :src="qr" mode="aspectFill"></image>
</view>
<view class="btn" @click="closeDialog">
关闭
</view>
</view>
</uni-popup>
<!-- 是否登录 --> <!-- 是否登录 -->
<openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin> <openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin>
@ -79,6 +98,7 @@
userid:"", userid:"",
tabCurrentIndex: 0, tabCurrentIndex: 0,
scrollLeft: 0,//tabs scrollLeft: 0,//tabs
qr:'', //
// 123 // 123
list:[ list:[
{ {
@ -370,6 +390,18 @@
},100); },100);
}, },
methods: { methods: {
openQR(qr){
console.log("openQR")
this.qr='data:image/png;base64,'+qr;
this.$forceUpdate();
this.openDialog();
},
closeDialog(){
this.$refs.pfDialog.close();
},
openDialog(){
this.$refs.pfDialog.open();
},
getimgRemoteFile(img){ getimgRemoteFile(img){
if(img){ if(img){
img=img.split(',')[0]; img=img.split(',')[0];
@ -442,17 +474,26 @@
tabSelect(e) { tabSelect(e) {
console.log(e) console.log(e)
this.tabCurrentIndex = e.currentTarget.dataset.id; this.tabCurrentIndex = e.currentTarget.dataset.id;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60; this.$forceUpdate();
// //
// this.list[this.tabCurrentIndex].loadStatus="more"; // this.list[this.tabCurrentIndex].loadStatus="more";
// this.list[this.tabCurrentIndex].slist=[]; // this.list[this.tabCurrentIndex].slist=[];
this.loadData(); // this.loadData();
}, },
animationfinish({ detail: { current } }) { animationfinish({ detail: { current } }) {
this.tabCurrentIndex = current; // this.tabCurrentIndex = current;
// this.loadData();
},
handleChange(e) {
//animationfinish
console.log("handleChange");
this.tabCurrentIndex = e.detail.current;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
this.$forceUpdate();
this.loadData(); this.loadData();
}, },
gotoInfo(id){ gotoInfo(id){
id=id+"";
// //
uni.navigateTo({ uni.navigateTo({
url: `/pages/book/bookinfo?id=${id}` url: `/pages/book/bookinfo?id=${id}`
@ -460,15 +501,41 @@
}, },
// //
gototeacher(item){ gototeacher(item){
var data={ console.log(item);
id:item.id, if(item.teacherId){
name:"教练A" uni.showLoading({
title: '会话创建中...'
});
//
var chatid="privatechat-" + this.userid +"-"+ item.teacherId;
var timestamp = new Date().getTime();
var info={
chatId: "privatechat-" + this.userid +"-"+ item.teacherId,
chatType: "coach",
chatName: item.teacherName,
chatAvatar: item.pic?item.pic:'/static/image/kf.png',
chatTime: timestamp,
userid: this.userid,
friendId: item.teacherId, // userid
minId: "", // id
sort:"privatechat", // privatechat groupchat
from:"yh" // yh message
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
});
}
else{
uni.showModal({
title: '提示',
content: '抱歉!当前预约尚未配置教练在线服务..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
} }
//
var data=encodeURIComponent(JSON.stringify(data));
uni.navigateTo({
url: `/pages/teacher/chat?data=${data}`
})
}, },
// //
gotoevaluate(item){ gotoevaluate(item){
@ -493,7 +560,7 @@
} }
}, },
// //
orderdo(e,item){ // /api/course/bookCourse orderdo(e,item){
console.log(id,item); console.log(id,item);
var that = this; var that = this;
// //
@ -520,7 +587,7 @@
duration: 2000 duration: 2000
}); });
const {data: res} = await uni.$http.post('/api/course/bookCourse', param); const {data: res} = await uni.$http.post('/api/course/bookCourse', param);
if(res.msg=="successed"){ if(res.success){
uni.showToast({ uni.showToast({
title: '上课已预约!', title: '上课已预约!',
icon: 'success', icon: 'success',
@ -530,10 +597,15 @@
this.reset(); this.reset();
} }
else{ else{
uni.showToast({ uni.showModal({
title: res.msg? res.msg:'上课预约失败!', title: '提示',
icon: 'error', content: res.message? res.message:'课程预约失败!',
duration: 2000 cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
}); });
} }
}, },
@ -752,14 +824,14 @@
height: 90rpx; height: 90rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -774,7 +846,7 @@
background-position: center; background-position: center;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
color: #89965f; color: #00a89b;
overflow: hidden; overflow: hidden;
} }
.scell{ .scell{
@ -881,18 +953,16 @@
flex-direction: row; flex-direction: row;
justify-content: flex-end; justify-content: flex-end;
border-top: 1rpx solid #eee; border-top: 1rpx solid #eee;
padding: 20rpx 0 10rpx; padding: 20rpx 0 0;
width: 100%; width: 100%;
.omoney{ .qr{
display: flex; display: flex;
flex:1; flex:1;
height: 60rpx;
width: 100%;
color:#333; color:#333;
align-items: center; align-items: center;
.omtip{ .qrimg{
font-size: 36rpx; width: 50rpx;
color:rgb(252, 105, 0); height: 50rpx;
} }
} }
.cancelbtn{ .cancelbtn{
@ -948,14 +1018,14 @@
line-height: 48rpx; line-height: 48rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
color:#595d4d; color:#595d4d;
} }
.conbtn::after{ .conbtn::after{
border:0 !important; border:0 !important;
} }
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin-left: 20rpx; margin-left: 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
border-radius: 50rpx; border-radius: 50rpx;
@ -963,7 +1033,7 @@
line-height: 48rpx; line-height: 48rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
} }
.paybtn::after{ .paybtn::after{
border:0 !important; border:0 !important;
@ -981,19 +1051,6 @@
.gzbtn::after{ .gzbtn::after{
border:0 !important; border:0 !important;
} }
.gzbtn{
background-color: #f5aa00 !important;
margin-left: 20rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
border:1rpx solid #f5aa00;
}
.gzbtn::after{
border:0 !important;
}
} }
.oscon{ .oscon{
margin:20rpx 0; margin:20rpx 0;
@ -1012,7 +1069,7 @@
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 26rpx; margin-left: 20rpx;
.ntxt{ .ntxt{
font-size: 28rpx; font-size: 28rpx;
color:#000; color:#000;
@ -1089,4 +1146,56 @@
} }
.pcon{
width: 690rpx;
padding-top:30rpx;
padding-bottom:50rpx;
background: #FCFCFD;
box-shadow: 0rpx 128rpx 128rpx 2rpx rgba(31,47,70,0.12);
border-radius: 16rpx 16rpx 16rpx 16rpx;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.phtxt{
width: 600rpx;
margin: 20rpx auto 10rpx;
font-size: 36rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 600;
color: #23262F;
}
.ptxt
{
width: 620rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx auto;
border-radius: 16rpx 16rpx 16rpx 16rpx;
opacity: 1;
border: 2rpx solid #F7F8FA;
padding: 30rpx;
.qrimg{
width: 400rpx;
height: 400rpx;
}
}
.btn{
width: 520rpx;
height: 80rpx;
line-height: 80rpx;
background: #00A99A;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(0,169,154,0.4);
border-radius: 254rpx 254rpx 254rpx 254rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FCFCFD;
}
}
</style> </style>

@ -0,0 +1,630 @@
<template>
<view class="page">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="scell" v-if="list.length>0">
<view v-for="(item, index) in list" :key="index" class="oitem">
<view class="otop">
<view class="hleft">
<view>
<text>姓名{{item.studentName?item.studentName:'-'}}</text>
<text style="margin-left: 30rpx;">性别{{item.sex==2?'男':(item.sex==1?'女':'未知')}}</text>
</view>
<text>电话{{item.phone?item.phone:'-'}}</text>
</view>
<view class="hright">
<!-- 1待上课2预约中3待评价 4已完成 5已取消 -->
<!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; -->
<view v-if="item.bookStatus==1" class="ztip"></view>
<view v-else-if="item.bookStatus==0" class="jtip">预约中</view>
<view v-else-if="item.bookStatus==2" class="htip">待上课</view>
<view v-else-if="item.bookStatus==4" class="wtip">已完成</view>
<view v-else-if="item.bookStatus==3" class="ctip">已取消</view>
</view>
</view>
<view class="oscon">
<view class="osname">
<view>
<text class="txt">课程{{item.courseName}}</text>
<text class="txt" style="margin-left: 30rpx;">班级{{item.claName}} </text>
</view>
<view>
<text class="txt">教练{{item.teacherName }}</text>
<text class="txt" style="margin-left: 30rpx;">教室{{item.roomName}}</text>
</view>
<text class="txt">上课时间{{ item.claDate+' '+item.startTime+(item.endTime?'-'+item.endTime:'')}}</text>
<view>
<text class="txt">预约人数{{item.bookAttendCnt}}</text>
<text class="txt" style="margin-left: 30rpx;">可容纳人数{{item.atClassCnt}} </text>
</view>
</view>
</view>
<view class="obtn">
<view class="omoney"></view>
<!-- 1待上课2预约中3待评价 4已完成 5已取消-->
<!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; -->
<button v-if="item.bookStatus==1" type="primary" class="stopbtn" :data-id="item.courseTimeId" @click="stopdo($event,item)"></button>
<button v-if="item.bookStatus==1" type="primary" class="orderbtn" :data-id="item.courseTimeId" @click="checkdo($event,item)"></button>
</view>
</view>
</view>
<view v-if="list.length==0 && loadStatus=='noMore'" class="nodata"></view>
<uni-load-more v-if="list.length>0" iconType="circle" :status="loadStatus" />
</scroll-view>
<!-- 是否登录 -->
<openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin>
</view>
</template>
<script>
import { myCache,getRemoteFile } from '../../utils/utils.js';
import openlogin from "../components/openlogin.vue";
export default {
components: {
openlogin
},
data() {
return {
openId:"",
phone:"",
userid:"",
loadStatus:"more", // loading noMore
list:[],
};
},
onLoad(option) {
myCache('courserefresh',0);
this.loadData();
},
onShow(option){
//
if(myCache('courserefresh')){
this.loadData();
myCache('courserefresh',0);
}
},
onReady(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.phone = user.userphone;
if(this.userid==""||this.userid=="0"){
uni.navigateTo({
url: `/pages/login/login`
});
}
},
onPullDownRefresh() {
setTimeout(()=>{
uni.stopPullDownRefresh()
},100);
},
methods: {
getimgRemoteFile(img){
if(img){
img=img.split(',')[0];
return getRemoteFile(img)
}
else{
return require("@/static/image/theme/p1.jpg")
}
},
getPhoneNumber(e){
if(e.phone){
this.phone = e.phone
}
if(e.userid){
this.userid = e.userid
}
},
async getOrderList() {
if(this.loadStatus!=="noMore")
{
uni.showLoading({
title: '数据加载中...'
});
const {data: res} = await uni.$http.get('/api/my/appointmentListForManager');
if(res&&res.data){
//
this.loadStatus="noMore";
this.list=res.data;
this.$forceUpdate();
}
else{
this.loadStatus="noMore";
this.$forceUpdate();
}
}
},
loadData(){
//
if(this.loadStatus=="more") {
this.loadStatus="loading";
setTimeout(() => {
this.getOrderList();
}, 300);
}
},
gotoInfo(id){
//
uni.navigateTo({
url: `/pages/book/bookinfo?id=${id}`
});
},
//
gotoevaluate(item){
var data=encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/pages/book/bookpj?data=${data}`
});
},
iflogin(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.phone = user.userphone;
if(this.userid==""||this.userid=="0"||this.phone==""){
uni.navigateTo({
url: `/pages/login/login`
});
return false;
}
else{
return true;
}
},
//
stopdo(e,item){
var that = this;
//
uni.showModal({
title: '提示',
content: '确定禁止预约吗?',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
that.stopdodo(item);
}
}
});
},
//
async stopdodo(item){
var param={
"bookId": item.bookId,
"bookStatus": 2
};
uni.showLoading({
title: '禁止预约中...'
});
const {data: res} = await uni.$http.post('/api/my/checkAppointment', param);
if(res.success){
uni.showToast({
title: '已禁止预约!',
icon: 'success',
duration: 2000
});
//
this.loadStatus="more";
this.$forceUpdate();
this.loadData();
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'禁止预约失败!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
},
//
checkdo(e,item){
console.log(e);
var id= e.currentTarget.dataset.id;
var that = this;
//
uni.showModal({
title: '提示',
content: '确认预约吗?',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
that.checkdodo(item);
}
}
});
},
//
async checkdodo(item){
var param={
"bookId": item.bookId,
"bookStatus": 1
};
uni.showLoading({
title: '确认预约中...'
});
const {data: res} = await uni.$http.post('/api/my/checkAppointment', param);
if(res.success){
uni.showToast({
title: '已确认预约!',
icon: 'success',
duration: 2000
});
//
this.loadStatus="more";
this.$forceUpdate();
this.loadData();
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'确认预约失败!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
},
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 0;
position: relative;
background-image: url('@/static/image/bg.jpg');
background-attachment: fixed;
background-size: cover;
background-position: center center;
min-height: calc(100vh - var(--window-top) - var(--window-bottom));
}
.olistcon{
padding: 0 20rpx 20rpx 20rpx;
.olist{
display: flex;
flex-direction: column;
.ocell{
font-size: 26rpx;
color:#747474;
padding: 10rpx 0;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.red{
color:#ff3d0e;
}
.green{
color:#00cd00;
}
}
}
}
.swiper-box {
flex: 1;
height: calc(100vh - var(--window-top) - 130rpx) !important;
}
.swiper-item {
height: 100%;
}
.scrolllist{
height: 110rpx;
background: #FFF;
white-space: nowrap;
width: 100%;
}
.tabicl{
min-width: 130rpx;
height: 100rpx;
line-height: 100rpx;
position: relative;
display: inline-block;
overflow: hidden;
margin-right: 20rpx;
}
.ptext{
font-size: 30rpx;
text-align: center;
color: #000;
font-weight: 600;
height: 90rpx;
}
.cur .ptext{
color: #00a89b;
font-size: 33rpx;
font-weight: 600;
}
.cur .pline{
width: 40%;
height: 9rpx;
background: #00a89b;
border-radius: 6rpx;
opacity: 1;
margin-left: 30%;
}
.nodata{
width: 100%;
height: calc(100vh - 400rpx) !important;
line-height: calc(100vh) !important;
background-image: url('/static/image/no.png');
background-size: 52% auto;
background-repeat: no-repeat;
background-position: center;
font-size: 28rpx;
text-align: center;
color: #00a89b;
overflow: hidden;
}
.scell{
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx;
.oitem{
display: flex;
flex-direction: column;
background-color: #FFFFFF;
border-radius: 6rpx;
padding: 20rpx 30rpx;
width: 100%;
margin-bottom: 20rpx;
.otop{
display: flex;
flex-direction: row;
width: 100%;
padding: 10rpx 0 10rpx;
border-bottom: 1rpx solid #eee;
.hleft{
display: flex;
flex-direction: column;
flex:1;
justify-content: flex-start;
font-size: 28rpx;
color: #000;
}
.hright{
display: flex;
justify-content: flex-end;
// <!--123 4 56-->
.ztip{
border-radius: 12rpx;
color:#1296db;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.jtip{
border-radius: 12rpx;
color:#feb467;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.htip{
border-radius: 12rpx;
color:#fc6900;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.hwtip{
border-radius: 12rpx;
color:#FF0000;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.wtip{
border-radius: 12rpx;
color:#43cca4;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.gtip{
border-radius: 12rpx;
color:#0036D6;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ftip{
border-radius: 12rpx;
color:#6A81F1;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ctip{
border-radius: 12rpx;
color:#888;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
}
}
.obtn{
display: flex;
flex-direction: row;
justify-content: flex-end;
border-top: 1rpx solid #eee;
padding: 20rpx 0 2rpx;
width: 100%;
.omoney{
display: flex;
flex:1;
width: 100%;
color:#333;
align-items: center;
}
.cancelbtn{
background-color: #FFFFFF !important;
margin-left: 20rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
color:#888;
border:1rpx solid #888;
}
.cancelbtn::after{
border:0 !important;
}
.viewbtn{
background-color: #FFFFFF !important;
margin-left: 20rpx;
border-radius: 50rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
color:#6A81F1;
border:1rpx solid #6A81F1;
}
.viewbtn::after{
border:0 !important;
}
.orderbtn{
background-color: #00a89b !important;
margin-left: 20rpx;
border-radius: 50rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
border:1rpx solid #00a89b;
}
.orderbtn::after{
border:0 !important;
}
.stopbtn{
background-color: #f47fa0 !important;
margin-left: 20rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
border:1rpx solid #f47fa0;
}
.stopbtn::after{
border:0 !important;
}
}
.oscon{
margin:16rpx 0;
border-radius: 16rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.osimg{
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.osname{
display: flex;
flex: 1;
display: flex;
flex-direction: column;
.ntxt{
font-size: 26rpx;
color:#333;
line-height: 36rpx;
margin-bottom: 8rpx;
}
.txt{
font-size: 26rpx;
color:#333;
}
}
}
}
.sitem {
display: flex;
flex-direction: column;
flex: 1;
background-color: #FFFFFF;
/*设置最小宽度,才会让元素排不下,导致换行排列*/
min-width: calc((100% - 20rpx) / 2);
max-width: calc((100% - 20rpx) / 2);
margin-right:5rpx;
margin-left:5rpx;
margin-bottom: 10rpx;
border-radius: 16rpx;
.simg{
width: 100%;
height: 360rpx;
.img{
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
}
}
.sname{
font-size: 30rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 16rpx;
}
.sinfo{
font-size: 26rpx;
color:rgb(116, 116, 116);
padding: 0 16rpx;
height: 60rpx;
line-height: 30rpx;
overflow: hidden;
position: relative;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
.sprices{
padding: 0 16rpx 20rpx 16rpx;
font-size: 36rpx;
color:rgb(252, 105, 0);
border-radius: 0 0 16rpx 16rpx;
.cx{
font-size: 28rpx;
color:rgb(116, 116, 116);
text-decoration: line-through;
margin-left: 20rpx;
}
}
}
}
</style>

@ -0,0 +1,630 @@
<template>
<view class="page">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="scell" v-if="list.length>0">
<view v-for="(item, index) in list" :key="index" class="oitem">
<view class="otop">
<view class="hleft">
<view>
<text>姓名{{item.studentName?item.studentName:'-'}}</text>
<text style="margin-left: 30rpx;">性别{{item.sex==2?'男':(item.sex==1?'女':'未知')}}</text>
</view>
<text>电话{{item.phone?item.phone:'-'}}</text>
</view>
<view class="hright">
<!-- 1待上课2预约中3待评价 4已完成 5已取消 -->
<!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; -->
<view v-if="item.bookStatus==1" class="ztip"></view>
<view v-else-if="item.bookStatus==0" class="jtip">预约中</view>
<view v-else-if="item.bookStatus==2" class="htip">待上课</view>
<view v-else-if="item.bookStatus==4" class="wtip">已完成</view>
<view v-else-if="item.bookStatus==3" class="ctip">已取消</view>
</view>
</view>
<view class="oscon">
<view class="osname">
<view>
<text class="txt">课程{{item.courseName}}</text>
<text class="txt" style="margin-left: 30rpx;">班级{{item.claName}} </text>
</view>
<view>
<text class="txt">教练{{item.teacherName }}</text>
<text class="txt" style="margin-left: 30rpx;">教室{{item.roomName}}</text>
</view>
<text class="txt">上课时间{{ item.claDate+' '+item.startTime+(item.endTime?'-'+item.endTime:'')}}</text>
<view>
<text class="txt">预约人数{{item.bookAttendCnt}}</text>
<text class="txt" style="margin-left: 30rpx;">可容纳人数{{item.atClassCnt}} </text>
</view>
</view>
</view>
<view class="obtn">
<view class="omoney"></view>
<!-- 1待上课2预约中3待评价 4已完成 5已取消-->
<!-- 描述:0->预约中;1->教练确认;2->店长确认/预约成功/待上课 3->已取消;4->已完成/待评价; -->
<button v-if="item.bookStatus==0" type="primary" class="stopbtn" :data-id="item.courseTimeId" @click="stopdo($event,item)"></button>
<button v-if="item.bookStatus==0" type="primary" class="orderbtn" :data-id="item.courseTimeId" @click="checkdo($event,item)"></button>
</view>
</view>
</view>
<view v-if="list.length==0 && loadStatus=='noMore'" class="nodata"></view>
<uni-load-more v-if="list.length>0" iconType="circle" :status="loadStatus" />
</scroll-view>
<!-- 是否登录 -->
<openlogin ref="loginId" @getPhoneNumber="getPhoneNumber"></openlogin>
</view>
</template>
<script>
import { myCache,getRemoteFile } from '../../utils/utils.js';
import openlogin from "../components/openlogin.vue";
export default {
components: {
openlogin
},
data() {
return {
openId:"",
phone:"",
userid:"",
loadStatus:"more", // loading noMore
list:[],
};
},
onLoad(option) {
myCache('courserefresh',0);
this.loadData();
},
onShow(option){
//
if(myCache('courserefresh')){
this.loadData();
myCache('courserefresh',0);
}
},
onReady(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.phone = user.userphone;
if(this.userid==""||this.userid=="0"){
uni.navigateTo({
url: `/pages/login/login`
});
}
},
onPullDownRefresh() {
setTimeout(()=>{
uni.stopPullDownRefresh()
},100);
},
methods: {
getimgRemoteFile(img){
if(img){
img=img.split(',')[0];
return getRemoteFile(img)
}
else{
return require("@/static/image/theme/p1.jpg")
}
},
getPhoneNumber(e){
if(e.phone){
this.phone = e.phone
}
if(e.userid){
this.userid = e.userid
}
},
async getOrderList() {
if(this.loadStatus!=="noMore")
{
uni.showLoading({
title: '数据加载中...'
});
const {data: res} = await uni.$http.get('/api/my/appointmentListForTeacher');
if(res&&res.data){
//
this.loadStatus="noMore";
this.list=res.data;
this.$forceUpdate();
}
else{
this.loadStatus="noMore";
this.$forceUpdate();
}
}
},
loadData(){
//
if(this.loadStatus=="more") {
this.loadStatus="loading";
setTimeout(() => {
this.getOrderList();
}, 300);
}
},
gotoInfo(id){
//
uni.navigateTo({
url: `/pages/book/bookinfo?id=${id}`
});
},
//
gotoevaluate(item){
var data=encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/pages/book/bookpj?data=${data}`
});
},
iflogin(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.phone = user.userphone;
if(this.userid==""||this.userid=="0"||this.phone==""){
uni.navigateTo({
url: `/pages/login/login`
});
return false;
}
else{
return true;
}
},
//
stopdo(e,item){
var that = this;
//
uni.showModal({
title: '提示',
content: '确定禁止预约吗?',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
that.stopdodo(item);
}
}
});
},
//
async stopdodo(item){
var param={
"bookId": item.bookId,
"bookStatus": 2
};
uni.showLoading({
title: '禁止预约中...'
});
const {data: res} = await uni.$http.post('/api/my/checkAppointment', param);
if(res.success){
uni.showToast({
title: '已禁止预约!',
icon: 'success',
duration: 2000
});
//
this.loadStatus="more";
this.$forceUpdate();
this.loadData();
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'禁止预约失败!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
},
//
checkdo(e,item){
console.log(e);
var id= e.currentTarget.dataset.id;
var that = this;
//
uni.showModal({
title: '提示',
content: '确认预约吗?',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
that.checkdodo(item);
}
}
});
},
//
async checkdodo(item){
var param={
"bookId": item.bookId,
"bookStatus": 1
};
uni.showLoading({
title: '确认预约中...'
});
const {data: res} = await uni.$http.post('/api/my/checkAppointment', param);
if(res.success){
uni.showToast({
title: '已确认预约!',
icon: 'success',
duration: 2000
});
//
this.loadStatus="more";
this.$forceUpdate();
this.loadData();
}
else{
uni.showModal({
title: '提示',
content: res.message? res.message:'确认预约失败!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
},
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 0;
position: relative;
background-image: url('@/static/image/bg.jpg');
background-attachment: fixed;
background-size: cover;
background-position: center center;
min-height: calc(100vh - var(--window-top) - var(--window-bottom));
}
.olistcon{
padding: 0 20rpx 20rpx 20rpx;
.olist{
display: flex;
flex-direction: column;
.ocell{
font-size: 26rpx;
color:#747474;
padding: 10rpx 0;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.red{
color:#ff3d0e;
}
.green{
color:#00cd00;
}
}
}
}
.swiper-box {
flex: 1;
height: calc(100vh - var(--window-top) - 130rpx) !important;
}
.swiper-item {
height: 100%;
}
.scrolllist{
height: 110rpx;
background: #FFF;
white-space: nowrap;
width: 100%;
}
.tabicl{
min-width: 130rpx;
height: 100rpx;
line-height: 100rpx;
position: relative;
display: inline-block;
overflow: hidden;
margin-right: 20rpx;
}
.ptext{
font-size: 30rpx;
text-align: center;
color: #000;
font-weight: 600;
height: 90rpx;
}
.cur .ptext{
color: #00a89b;
font-size: 33rpx;
font-weight: 600;
}
.cur .pline{
width: 40%;
height: 9rpx;
background: #00a89b;
border-radius: 6rpx;
opacity: 1;
margin-left: 30%;
}
.nodata{
width: 100%;
height: calc(100vh - 400rpx) !important;
line-height: calc(100vh) !important;
background-image: url('/static/image/no.png');
background-size: 52% auto;
background-repeat: no-repeat;
background-position: center;
font-size: 28rpx;
text-align: center;
color: #00a89b;
overflow: hidden;
}
.scell{
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx;
.oitem{
display: flex;
flex-direction: column;
background-color: #FFFFFF;
border-radius: 6rpx;
padding: 20rpx 30rpx;
width: 100%;
margin-bottom: 20rpx;
.otop{
display: flex;
flex-direction: row;
width: 100%;
padding: 10rpx 0 10rpx;
border-bottom: 1rpx solid #eee;
.hleft{
display: flex;
flex-direction: column;
flex:1;
justify-content: flex-start;
font-size: 28rpx;
color: #000;
}
.hright{
display: flex;
justify-content: flex-end;
// <!--123 4 56-->
.ztip{
border-radius: 12rpx;
color:#1296db;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.jtip{
border-radius: 12rpx;
color:#feb467;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.htip{
border-radius: 12rpx;
color:#fc6900;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.hwtip{
border-radius: 12rpx;
color:#FF0000;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.wtip{
border-radius: 12rpx;
color:#43cca4;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.gtip{
border-radius: 12rpx;
color:#0036D6;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ftip{
border-radius: 12rpx;
color:#6A81F1;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
.ctip{
border-radius: 12rpx;
color:#888;
font-size: 26rpx;
padding: 0;
height: 40rpx;
line-height: 40rpx;
}
}
}
.obtn{
display: flex;
flex-direction: row;
justify-content: flex-end;
border-top: 1rpx solid #eee;
padding: 20rpx 0 2rpx;
width: 100%;
.omoney{
display: flex;
flex:1;
width: 100%;
color:#333;
align-items: center;
}
.cancelbtn{
background-color: #FFFFFF !important;
margin-left: 20rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
color:#888;
border:1rpx solid #888;
}
.cancelbtn::after{
border:0 !important;
}
.viewbtn{
background-color: #FFFFFF !important;
margin-left: 20rpx;
border-radius: 50rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
color:#6A81F1;
border:1rpx solid #6A81F1;
}
.viewbtn::after{
border:0 !important;
}
.orderbtn{
background-color: #00a89b !important;
margin-left: 20rpx;
border-radius: 50rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
border:1rpx solid #00a89b;
}
.orderbtn::after{
border:0 !important;
}
.stopbtn{
background-color: #f47fa0 !important;
margin-left: 20rpx;
border-radius: 50rpx;
height: 50rpx;
line-height: 48rpx;
padding: 0 20rpx;
font-size: 24rpx;
border:1rpx solid #f47fa0;
}
.stopbtn::after{
border:0 !important;
}
}
.oscon{
margin:16rpx 0;
border-radius: 16rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.osimg{
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.osname{
display: flex;
flex: 1;
display: flex;
flex-direction: column;
.ntxt{
font-size: 26rpx;
color:#333;
line-height: 36rpx;
margin-bottom: 8rpx;
}
.txt{
font-size: 26rpx;
color:#333;
}
}
}
}
.sitem {
display: flex;
flex-direction: column;
flex: 1;
background-color: #FFFFFF;
/*设置最小宽度,才会让元素排不下,导致换行排列*/
min-width: calc((100% - 20rpx) / 2);
max-width: calc((100% - 20rpx) / 2);
margin-right:5rpx;
margin-left:5rpx;
margin-bottom: 10rpx;
border-radius: 16rpx;
.simg{
width: 100%;
height: 360rpx;
.img{
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0 0;
}
}
.sname{
font-size: 30rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 16rpx;
}
.sinfo{
font-size: 26rpx;
color:rgb(116, 116, 116);
padding: 0 16rpx;
height: 60rpx;
line-height: 30rpx;
overflow: hidden;
position: relative;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
.sprices{
padding: 0 16rpx 20rpx 16rpx;
font-size: 36rpx;
color:rgb(252, 105, 0);
border-radius: 0 0 16rpx 16rpx;
.cx{
font-size: 28rpx;
color:rgb(116, 116, 116);
text-decoration: line-through;
margin-left: 20rpx;
}
}
}
}
</style>

@ -11,7 +11,7 @@
<!-- 购物车商品 --> <!-- 购物车商品 -->
<view class="cart-list" v-if="cartnum > 0" v-for="(cell,ii) in carts" :key="ii+'shop'"> <view class="cart-list" v-if="cartnum > 0" v-for="(cell,ii) in carts" :key="ii+'shop'">
<view class="cart-shop"> <view class="cart-shop">
<u-checkbox @change="checkedcell(ii)" v-model="cell.check" size="40" shape="circle" active-color="#89965f" class="checkall"></u-checkbox> <u-checkbox @change="checkedcell(ii)" v-model="cell.check" size="40" shape="circle" active-color="#00a89b" class="checkall"></u-checkbox>
<view class="cart-shop-name"> <view class="cart-shop-name">
{{cell.storeName}} {{cell.storeName}}
</view> </view>
@ -31,7 +31,7 @@
> >
<view class="item u-border-bottom"> <view class="item u-border-bottom">
<u-checkbox-group @change="checkboxChange(index,ii)" width="40rpx"> <u-checkbox-group @change="checkboxChange(index,ii)" width="40rpx">
<u-checkbox v-model="item.check" size="40" shape="circle" active-color="#89965f" class="checkbox"></u-checkbox> <u-checkbox v-model="item.check" size="40" shape="circle" active-color="#00a89b" class="checkbox"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<view class="cart-img"> <view class="cart-img">
<image class="cimg" mode="widthFix" :src="getimgRemoteFile(item.pic)" @click.stop="$u.throttle(gotoDetail(item.productId), 2000)"></image> <image class="cimg" mode="widthFix" :src="getimgRemoteFile(item.pic)" @click.stop="$u.throttle(gotoDetail(item.productId), 2000)"></image>
@ -93,7 +93,7 @@
</view> </view>
</view> </view>
<view class="bottom" v-if="carts.length > 0"> <view class="bottom" v-if="carts.length > 0">
<u-checkbox @change="checkedAll" v-model="checked" size="40" shape="circle" active-color="#89965f" class="checkall"><span>全选</span></u-checkbox> <u-checkbox @change="checkedAll" v-model="checked" size="40" shape="circle" active-color="#00a89b" class="checkall"><span>全选</span></u-checkbox>
<text class="price fill" v-if="btnType === 'edit'"> <text class="price fill" v-if="btnType === 'edit'">
<text class="sml">合计:</text> <text class="sml">合计:</text>
{{ totalPrice }} {{ totalPrice }}
@ -173,7 +173,7 @@
// u-button // u-button
customStyle: { customStyle: {
color: '#fff', color: '#fff',
backgroundColor: '#89965f', backgroundColor: '#00a89b',
margin: '0', margin: '0',
padding: '0 20rpx', padding: '0 20rpx',
width: '200rpx', width: '200rpx',
@ -646,7 +646,7 @@
} }
// //
.status_bar { .status_bar {
background-color: #89965f; background-color: #00a89b;
} }
.page-header { .page-header {
position: fixed; position: fixed;
@ -656,7 +656,7 @@
display: flex; display: flex;
color: #fff; color: #fff;
font-size: 36rpx; font-size: 36rpx;
background-color: #89965f; background-color: #00a89b;
align-items: center; align-items: center;
.text-center { .text-center {
width: 100%; width: 100%;
@ -708,7 +708,7 @@
} }
.cart-lose-btn{ .cart-lose-btn{
font-size: 26rpx; font-size: 26rpx;
color: #89965f; color: #00a89b;
} }
.cart-shop{ .cart-shop{
display: flex; display: flex;
@ -872,8 +872,8 @@
line-height: 64rpx; line-height: 64rpx;
color: #ffffff; color: #ffffff;
font-size: 26rpx; font-size: 26rpx;
background: -webkit-linear-gradient(to right, rgba(137, 150, 95, 0.3) 0%, rgba(137, 150, 95, 1) 100%); background: -webkit-linear-gradient(to right, rgba(137, 150, 95, 0.3) 0%, rgba(0, 168, 155, 1) 100%);
background: linear-gradient(to right, rgba(137, 150, 95, 0.3) 0%, rgba(137, 150, 95, 1) 100%); background: linear-gradient(to right, rgba(137, 150, 95, 0.3) 0%, rgba(0, 168, 155, 1) 100%);
} }
} }
.bottom { .bottom {

File diff suppressed because it is too large Load Diff

@ -147,28 +147,27 @@
}; };
try{ try{
var url="/api/inherit/getOne"; var url="/api/inherit/getOne";
if(this.type==0){ if(this.type==1){
// //
url="/api/inherit/getOne"; url="/api/inherit/getOne";
} }
else if(this.type==3){ else if(this.type==6){
// // ()
url="/api/moments/getOne"; url="/api/moments/getOne";
} }
else if(this.type==4){ else if(this.type==11){
// //
url="/api/appreciate/getOne"; url="/api/appreciate/getOne";
} }
else if(this.type==5){ else if(this.type==12){
// //
url="/api/sense/getOne"; url="/api/sense/getOne";
} }
else if(this.type==6){ else if(this.type==9){
// // ()
url="/api/healthy/getOne"; url="/api/healthy/getOne";
} }
const {data: res1} = await uni.$http.post(url,params); const {data: res1} = await uni.$http.post(url,params);
console.log(res1);
if (res1.success) { if (res1.success) {
if(!res1.data){ if(!res1.data){
uni.showModal({ uni.showModal({
@ -278,7 +277,7 @@
width: 100%; width: 100%;
align-items: center; align-items: center;
.leftarr{ .leftarr{
background-color: #b9af9d; background-color: #00a89b;
padding: 10rpx; padding: 10rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
@ -370,7 +369,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -217,17 +217,6 @@
// WebSocket // WebSocket
this.closeWebSocket(); this.closeWebSocket();
}, },
// buttons
onNavigationBarButtonTap: async function(e) {
const _that = this;
const index = e.index;
if (index === 0) {
var data=encodeURIComponent(JSON.stringify(_that.info));
uni.navigateTo({
url: `/pages/chat/chatset?data=${data}`
});
}
},
methods: { methods: {
gotoInfo(item){ gotoInfo(item){
var data=encodeURIComponent(JSON.stringify(item)); var data=encodeURIComponent(JSON.stringify(item));
@ -237,7 +226,7 @@
}, },
handleImageError(e,index){ handleImageError(e,index){
console.log(e,index); console.log(e,index);
this.unshiftmsg[index]["headimg"]= require("@/static/image/girl.jpg"); this.unshiftmsg[index]["headimg"]= require("@/static/image/girl.png");
this.$forceUpdate(); this.$forceUpdate();
}, },
// //
@ -263,7 +252,7 @@
else if(cell.type=='txt'){ else if(cell.type=='txt'){
cell.content=decodeURIComponent(cell.content); cell.content=decodeURIComponent(cell.content);
} }
cell["headimg"]=require("@/static/image/girl.jpg"); //this.imgurl+'/images/'+ cell.fromuser+".jpg?id="+Math.random()*100; cell["headimg"]=require("@/static/image/girl.png"); //this.imgurl+'/images/'+ cell.fromuser+".jpg?id="+Math.random()*100;
this.unshiftmsg.push(cell); this.unshiftmsg.push(cell);
// :id // :id
setTimeout(() => { setTimeout(() => {
@ -567,7 +556,7 @@
let data = { let data = {
"fromname": this.friendName, "fromname": this.friendName,
"fromuser": this.friendcode, "fromuser": this.friendcode,
"headimg":require("@/static/image/girl.jpg"), "headimg":require("@/static/image/girl.png"),
"toname": this.info.name, // "toname": this.info.name, //
"touser": this.info.id, // "touser": this.info.id, //
"content": e.type=='audio'?e.message.voice:e.message, "content": e.type=='audio'?e.message.voice:e.message,
@ -968,7 +957,7 @@
} }
.msg-text { .msg-text {
margin-right: 16rpx; margin-right: 16rpx;
background-color: #89965f; background-color: #00a89b;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 32rpx;

File diff suppressed because it is too large Load Diff

@ -203,7 +203,7 @@ export default {
spData:JSON.stringify(this.product.spData),// this.retSku(this.product.spData) , // this.product.spData, spData:JSON.stringify(this.product.spData),// this.retSku(this.product.spData) , // this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
const {data: res1} = await uni.$http.post('/api/cart/add',param); const {data: res1} = await uni.$http.post('/api/cart/add',param);
@ -285,7 +285,7 @@ export default {
} }
.price{ .price{
line-height: 1; line-height: 1;
color: #89965f; color: #00a89b;
.txt{ .txt{
font-size: 30rpx; font-size: 30rpx;
} }
@ -334,8 +334,8 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.spcli.cur{ .spcli.cur{
background: #f3f4ee; background: #e4f9f7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
.spclilong{ .spclilong{
@ -354,8 +354,8 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
.spclilong.cur{ .spclilong.cur{
background: #f3f4ee; background: #e4f9f7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
} }
@ -382,7 +382,7 @@ export default {
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -400,7 +400,7 @@ export default {
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #55690e; background: #468a73;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;

@ -155,8 +155,8 @@ export default {
} }
.btn2{ .btn2{
width: 180rpx; width: 180rpx;
background-color: #89965f; background-color: #00a89b;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
font-size: 28rpx; font-size: 28rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;

@ -2,7 +2,7 @@
<view> <view>
<view class="stcon"> <view class="stcon">
<view v-show="showName" class="textop"> <view v-show="showName" class="textop">
瑜伽APP 瑜伽
</view> </view>
<view v-show="showQR" class="qrimg" @tap="ViewImage()"> <view v-show="showQR" class="qrimg" @tap="ViewImage()">
<image :src="qr" mode="aspectFit"></image> <image :src="qr" mode="aspectFit"></image>
@ -21,29 +21,54 @@
<view class="htitle">附近有{{areas.length}}家门店可提供服务</view> <view class="htitle">附近有{{areas.length}}家门店可提供服务</view>
<view class="hinfo">(请点击选择服务门店)</view> <view class="hinfo">(请点击选择服务门店)</view>
<view class="rclose" @tap="_cancel"> <view class="rclose" @tap="_cancel">
<uni-icons type="close" size="30" color="#8b9565"></uni-icons> <uni-icons type="close" size="30" color="#00a89b"></uni-icons>
</view> </view>
</view> </view>
<view class="selcon"> <view class="selcon">
<view class="sitem" v-for="(item,index) in areas" :key="index" :class="item.storeName==shop?'cur':''"> <view v-for="(item,index) in areas" :key="index" >
<view class="stimg"> <view class="sitem" :class="item.id==shopid?'cur':''">
<image class="stimg" :src="getimgRemoteFile(item.banner)" mode="aspectFill"></image> <view class="sarr" v-if="item.childList&&item.childList.length>0">
</view> <uni-icons v-if="item.expanded" type="down" size="20" color="#666" @click="expandDO(index)"></uni-icons>
<view class="sname"> <uni-icons v-else type="right" size="20" color="#666" @click="expandDO(index)"></uni-icons>
<view class="stxt">
{{item.storeName}}
</view> </view>
<view class="sadr"> <view class="sarr" v-else></view>
{{item.address}} <image class="stimg" :src="getimgRemoteFile(item.banner)" mode="aspectFill" @click="expandDO(index)"></image>
<view class="sname" @click="expandDO(index)">
<view class="stxt">
{{item.storeName}}
</view>
<view class="sadr">
{{item.address}}
</view>
</view>
<view class="selbtn" v-if="item.id==shopid" @click="changeArea(item)" >
<image class="selimg" src="/static/image/sel.png" mode="aspectFill"></image>
</view>
<view class="selbtn" v-else @click="changeArea(item)" >
<image class="selimg" src="/static/image/nosel.png" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="selbtn" v-if="item.storeName==shop" @click="changeArea(item)" > <view v-if="item.expanded">
<image class="selimg" src="/static/image/sel.png" mode="aspectFill"></image> <view class="sitemcell" v-for="(cell,ii) in item.childList" :key="ii" :class="cell.storeName==shop?'cur':''">
</view> <image class="stimg" :src="getimgRemoteFile(cell.banner)" mode="aspectFill"></image>
<view class="selbtn" v-else @click="changeArea(item)" > <view class="sname">
<image class="selimg" src="/static/image/nosel.png" mode="aspectFill"></image> <view class="stxt">
{{cell.storeName}}
</view>
<view class="sadr">
{{cell.address}}
</view>
</view>
<view class="selbtn" v-if="cell.id==shopid" @click="changeArea(cell)" >
<image class="selimg" src="/static/image/sel.png" mode="aspectFill"></image>
</view>
<view class="selbtn" v-else @click="changeArea(cell)" >
<image class="selimg" src="/static/image/nosel.png" mode="aspectFill"></image>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -63,6 +88,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
shopid: {
type: String,
default: '0',
},
shop: { shop: {
type: String, type: String,
default: "", default: "",
@ -71,22 +100,9 @@ export default {
data() { data() {
return { return {
qr:"../../static/image/qr.png", qr:"../../static/image/qr.png",
areas:myCache('shoplist'), // areas: myCache('shoplist'), //
// [
// {
// value_name:'',
// value_address:'198',
// value_img:'',
// value_value:'1',
// value_qr:"../../static/image/qr.png",
// },
// ], //
}; };
}, },
mounted() {
console.log('mounted')
this.loadshop();
},
methods: { methods: {
getimgRemoteFile(img){ getimgRemoteFile(img){
if(img){ if(img){
@ -98,13 +114,32 @@ export default {
} }
}, },
// //
changeArea(item){ async changeArea(item){
myCache('myshop',item.storeName); uni.showLoading({
myCache('myshopid',item.id); title: '门店切换中...'
this._hide(); });
this.$emit("changeArea", item); const {data: res} = await uni.$http.post('/api/index/changeStore',{"visitStoreId":item.id});
if(res&&res.success){
var data=res.data;
myCache('myshop',data.storeName);
myCache('myshopid',data.id);
this._hide();
this.$emit("changeArea", data);
}
else{
//
uni.showModal({
title: '提示',
content: res.message? res.message : '切换门店失败!请重试!',
cancelText: '取消',
confirmText: '确定',
success: ress => {}
});
}
}, },
_show() { _show() {
this.areas= myCache('shoplist');
this.$forceUpdate();
this.$refs.share.open(); this.$refs.share.open();
}, },
_hide() { _hide() {
@ -121,16 +156,17 @@ export default {
current:0 current:0
}); });
}, },
async loadshop(){ expandDO(index){
// console.log(index)
const {data: res} = await uni.$http.post('/api/index/getStores'); if(this.areas[index].expanded){
if(res.data&&res.data.length>0){ this.areas[index].expanded=false;
this.areas=res.data;
// console.log("areas",this.areas)
myCache('shoplist',res.data);
this.$forceUpdate(); this.$forceUpdate();
} }
}, else{
this.areas[index].expanded=true;
this.$forceUpdate();
}
}
} }
} }
</script> </script>
@ -185,7 +221,7 @@ export default {
.sitetxt{ .sitetxt{
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color:#8b9565; color:#00a89b;
margin-left: 12rpx; margin-left: 12rpx;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@ -251,18 +287,74 @@ export default {
height: 50rpx; height: 50rpx;
} }
.sitem.cur{ .sitem.cur{
background-color: #f3f4ef; background-color: rgba(228, 249, 247, 0.8);
} }
.sitem { .sitem {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
background-color: #FFFFFF; background-color: #FFFFFF;
border-bottom: 1rpx solid #eeeeee; padding: 20rpx 0 20rpx 10rpx;
padding: 30rpx 0; margin: 10rpx 30rpx 0 30rpx;
margin: 0 30rpx; align-items: center;
.sarr{
width: 30rpx;
margin-right: 10rpx;
}
.stimg{
width: 80rpx;
height: 80rpx;
border-radius: 50rpx;
margin-left: 10rpx;
}
.selbtn{
width: 60rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
border-radius: 6rpx;
font-size: 26rpx;
color: #999;
margin-top: 16rpx;
}
.selimg{
width: 100%;
height: 100%;
}
.sname{
display: flex;
flex: 1;
justify-content: flex-start;
flex-direction: column;
padding: 10rpx 10rpx 0 10rpx;
margin-left: 12rpx;
.stxt{
font-size: 28rpx;
font-weight: 600;
color: rgb(29, 29, 29);
}
.sadr{
font-size: 26rpx;
color: #626464;
margin-top: 6rpx;
}
}
}
.sitemcell.cur{
background-color: rgba(228, 249, 247, 0.6);
}
.sitemcell {
display: flex;
flex-direction: row;
background-color: #F5F5F5;
padding: 20rpx 0 20rpx 12rpx;
margin: 0 30rpx 0 70rpx;
align-items: center;
.stimg{ .stimg{
width: 100rpx; width: 80rpx;
height: 100rpx; height: 80rpx;
border-radius: 50rpx; border-radius: 50rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }

@ -1,169 +0,0 @@
<template>
<view>
<!-- 选择门店 -->
<uni-popup ref="share" type="share">
<view class="allcon">
<view class="hcon">
<view class="htitle">选择门店 <view class="bottom-line"></view></view>
<view class="rclose" @tap="_cancel">
取消
</view>
</view>
<view class="selcon">
<view class="sitem" v-for="(item,index) in areas" :key="index">
<view class="sname">{{item.value_name}}</view>
<view class="selbtn" :class="item.value_name==city?'cur':''" @click="changeArea(item)" >选择</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { myCache } from '../../utils/utils.js';
export default {
props: {
city: {
type: String,
default: myCache('mycity'),
},
},
data() {
return {
areas:[]
};
},
mounted() {
console.log('mounted')
this.loadarea();
},
computed:{
selcity(){
return this.city;
},
},
methods: {
_show() {
console.log('_show')
this.$refs.share.open();
},
_hide() {
this.$refs.share.close();
},
_cancel() {
this._hide();
this.$emit("cancel", "");
},
changeArea(item){
myCache('mycity',item.value_name);
this.$emit("change", item.value_name);
this._hide();
},
async loadarea(){
const {data: ress} = await uni.$http.get('/api/dict/CITY');
if(ress.data){
this.areas=ress.data;
}
},
}
}
</script>
<style lang="scss" scoped>
.allcon{
width: 750rpx;
/* #ifdef MP-ALIPAY */
height: calc(100vh/2 + 300rpx);
/* #endif */
/* #ifdef MP-WEIXIN */
height: calc(100vh - var(--window-top));
/* #endif */
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
overflow: hidden;
background-color: #FFFFFF;
margin: 0 auto;
}
.hcon{
display: flex;
flex-direction: row;
padding: 20rpx 20rpx 20rpx;
.htitle{
flex:1;
justify-content: flex-start;
font-size: 32rpx;
font-weight: 600;
letter-spacing: 5rpx;
padding-left: 10rpx;
}
.rclose{
width: 70rpx;
display: flex;
justify-content: flex-start;
font-size: 28rpx;
color:#949494;
}
}
.selcon{
padding: 0;
position: relative;
display: block;
overflow-y: auto;
/* #ifdef MP-ALIPAY */
height: calc(100vh/2 + 200rpx);
/* #endif */
/* #ifdef MP-WEIXIN */
height: calc(100vh - var(--window-top) - 120rpx);
/* #endif */
/* #ifdef H5 */
height: calc(100vh - var(--window-top) - var(--window-bottom) - 120rpx);
/* #endif */
.lineb{
height: 50rpx;
}
.sitem {
display: flex;
flex-direction: row;
background-color: #FFFFFF;
border-top: 1rpx solid #eeeeee;
margin: 16rpx 0;
.selbtn{
width: 100rpx;
height: 44rpx;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
background-color: #f0f0f0;
border-radius: 6rpx;
font-size: 26rpx;
color: #999;
margin-top: 16rpx;
}
.selbtn.cur{
background-color: rgb(30, 209, 162);
color: #FFF;
}
.sname{
display: flex;
flex: 1;
justify-content: flex-start;
align-items: center;
flex-direction: row;
font-size: 28rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 10rpx 10rpx 0 10rpx;
margin-left: 20rpx;
}
}
}
</style>

@ -13,8 +13,9 @@ export default {
}, },
methods: { methods: {
goservice(){ goservice(){
console.log('linemobile',myCache('linemobile')) var shop=myCache('shop');
myCache('linemobile','18900000001') var phone=shop&&shop.phone?shop.phone:"";
myCache('linemobile',phone)
// 线 // 线
if(myCache('linemobile')){ if(myCache('linemobile')){
// 线 // 线
@ -28,38 +29,7 @@ export default {
} }
}); });
} }
else{
// this.getlinemobile();
}
this.$emit("goservice", "goservice"); this.$emit("goservice", "goservice");
},
async getlinemobile(){
const {data: res} = await uni.$http.get('/platform/getHotline');
console.log(res)
if (res) {
myCache('linemobile',res);
uni.makePhoneCall({
phoneNumber: String(myCache('linemobile')),
success:function(){
console.log('拨打电话成功');
},
fail() {
console.log('打电话失败了');
}
});
}
else{
uni.showModal({
title: '提示',
content: '在线电话获取失败!请稍后再试!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
} }
} }
} }
@ -75,9 +45,9 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: rgba(243, 244, 239, 0.8); background-color: rgba(228, 249, 247, 0.8);
border-radius: 100% 100%; border-radius: 100% 100%;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
z-index: 998; z-index: 998;
.topimg{ .topimg{
width: 40rpx; width: 40rpx;

@ -43,9 +43,9 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: rgba(243, 244, 239, 0.8); background-color: rgba(228, 249, 247, 0.8);
border-radius: 100% 100%; border-radius: 100% 100%;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
z-index: 998; z-index: 998;
.topimg{ .topimg{
width: 40rpx; width: 40rpx;

@ -6,7 +6,7 @@
<view class="box"> <view class="box">
<view class="fixhead" :style="{ paddingTop: geStatusBarHeight() + 'px'}"> <view class="fixhead" :style="{ paddingTop: geStatusBarHeight() + 'px'}">
<selShop :showName="true" :showQR="false" :shop="shop" @changeArea="changeArea"></selShop> <selShop :showName="true" :showQR="false" :shopid="shopid" :shop="shop" @changeArea="changeArea"></selShop>
</view> </view>
<!-- 轮播图区域 --> <!-- 轮播图区域 -->
@ -18,8 +18,8 @@
:duration="1000" :duration="1000"
:circular="true"> :circular="true">
<swiper-item v-for="(item, i) in swiperList" :key="i"> <swiper-item v-for="(item, i) in swiperList" :key="i">
<view class="swiper-item" @click="goto(item.ban_url)"> <view class="swiper-item" @click="goto(item)">
<image :src="item.ban_img" mode="aspectFill"></image> <image :src="item" mode="aspectFill"></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -33,13 +33,14 @@
<!-- 功能菜单 --> <!-- 功能菜单 -->
<view class="theme"> <view class="theme">
<view class="thcon" v-for="(item, index) in themeList" :key="index" :style="{ backgroundColor:item.color}" @click="gotoCategory(index)"> <view class="thcon" v-for="(item, index) in themeList" :key="index" :style="{ backgroundColor:item.color?item.color:colors[index]}"
@click="gotoCategory(item.id)">
<view class="thinfo"> <view class="thinfo">
<view class="thname">{{item.name}}</view> <view class="thname">{{item.name}}</view>
<view class="thtext">{{item.text}}</view> <!-- <view class="thtext">{{item.text}}</view> -->
</view> </view>
<view class="thimg"> <view class="thimg">
<image class="theimg" :src="item.img" mode="aspectFill" lazy-load></image> <image class="theimg" :src="item.img?item.img:timgs[index]" mode="aspectFill" lazy-load></image>
</view> </view>
</view> </view>
</view> </view>
@ -103,110 +104,146 @@
openId:"", openId:"",
phone:"", phone:"",
userid:"", userid:"",
screenWidth: 375, shopid: myCache('myshopid')?myCache('myshopid'):null,
shopid:myCache('myshopid')?myCache('myshopid'):'', shop: myCache('myshop'),
shop:myCache('myshop')?myCache('myshop'):'',
// banner // banner
swiperList:[ swiperList:[
{ "../../static/image/b1.jpg",
ban_img:"../../static/image/b1.jpg" "../../static/image/b2.png"
},
{
ban_img:"../../static/image/b2.png"
}
],// myCache('swiperCache'), ],// myCache('swiperCache'),
themeList: [ colors:[
{ "#f9d1c8","#c7d7bd","#c4dfe4","#efdddd","#c4ccdf","#fceaac","#d5e7c1",
name: "瑜伽传承", "#f9d1c8","#c7d7bd","#c4dfe4","#efdddd","#c4ccdf","#fceaac","#d5e7c1",
text: "传承瑜伽", "#f9d1c8","#c7d7bd","#c4dfe4","#efdddd","#c4ccdf","#fceaac","#d5e7c1",
img: '../../static/image/theme/y1.jpg', "#f9d1c8","#c7d7bd","#c4dfe4","#efdddd","#c4ccdf","#fceaac","#d5e7c1",
color:'#c4dfe4' ],
}, timgs:[
{ '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
name: "了解场馆", '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
text: "场馆介绍", '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
img: '../../static/image/theme/y2.jpg', '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
color:'#c7d7bd' '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
}, '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
{ '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg',
name: "瑜伽用品", '../../static/image/theme/y1.jpg','../../static/image/theme/y2.jpg','../../static/image/theme/y3.jpg','../../static/image/theme/y4.jpg'
text: "瑜伽好物", ],
img: '../../static/image/theme/y3.jpg', themeList: myCache('sortCache'),
color:'#f9d1c8' // [
}, // {
{ // name: "",
name: "线上大咖课", // text: "",
text: "大咖教师", // img: '../../static/image/theme/y1.jpg',
img: '../../static/image/theme/y4.jpg', // color:'#c4dfe4'
color:'#fff9e6' // },
}, // {
{ // name: "",
name: "课程预约", // text: "",
text: "超值课程", // img: '../../static/image/theme/y2.jpg',
img: '../../static/image/theme/y1.jpg', // color:'#c7d7bd'
color:'#c4ccdf' // },
}, // {
{ // name: "",
name: "教练风采", // text: "",
text: "风采展示", // img: '../../static/image/theme/y3.jpg',
img: '../../static/image/theme/y2.jpg', // color:'#f9d1c8'
color:'#fceaac' // },
}, // {
{ // name: "线",
name: "练习瞬间", // text: "",
text: "记录美好", // img: '../../static/image/theme/y4.jpg',
img: '../../static/image/theme/y3.jpg', // color:'#fff9e6'
color:'#d5e7c1' // },
}, // {
{ // name: "",
name: "教练培训", // text: "",
text: "专业课程", // img: '../../static/image/theme/y1.jpg',
img: '../../static/image/theme/y4.jpg', // color:'#c4ccdf'
color:'#c4ccdf' // },
}, // {
{ // name: "",
name: "瑜伽欣赏", // text: "",
text: "瑜伽科普", // img: '../../static/image/theme/y2.jpg',
img: '../../static/image/theme/y3.jpg', // color:'#fceaac'
color:'#efdddd' // },
}, // {
{ // name: "",
name: "瑜伽常识", // text: "",
text: "瑜伽科普", // img: '../../static/image/theme/y3.jpg',
img: '../../static/image/theme/y4.jpg', // color:'#d5e7c1'
color:'#dcd1bd' // },
}, // {
], // // name: "",
teacherList: [ // text: "",
// { // img: '../../static/image/theme/y4.jpg',
// id:11, // color:'#c4ccdf'
// name: "Madeline ()", // },
// info: "", // {
// img: '../../static/image/theme/t2.png' // name: "",
// }, // text: "",
], // // img: '../../static/image/theme/y3.jpg',
// color:'#efdddd'
// },
// {
// name: "",
// text: "",
// img: '../../static/image/theme/y4.jpg',
// color:'#dcd1bd'
// },
// ], //
teacherList: [], //
loadStatus:'more', loadStatus:'more',
page: { page: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
visitStore: myCache('myshopid')?myCache('myshopid'):'', visitStore: myCache('myshopid')?myCache('myshopid'):null,
}, },
}; };
}, },
onLoad() { onLoad() {
// var shop=myCache('shop');
const systemInfo = uni.getSystemInfoSync(); var banner=shop&&shop.banner?shop.banner:"";
this.screenWidth = systemInfo.windowWidth; banner=banner.split(',');
this.$forceUpdate(); if(banner.length>0){
this.swiperList=banner;
this.$forceUpdate();
}
//
this.getSort();
// //
this.getservice(); this.getservice();
// //
this.loadData(); // this.loadData();
// setTimeout(() => {
// console.log("getCurrentActivity")
// this.getCurrentActivity();
// },2000);
}, },
onShow() { onShow() {
this.shopid = myCache('myshopid')?myCache('myshopid'):null;
this.shop = myCache('myshop')?myCache('myshop'):'';
this.$forceUpdate();
//
this.teacherList=[];
this.loadStatus="more";
this.page={
pageNum: 1,
pageSize: 10,
visitStore:this.shopid
}
this.loadData();
// if(myCache("loginindex")=="1"){
// uni.setStorageSync("loginindex", "");
// //
// this.loadData();
// }
this.openId = myCache('openId'); this.openId = myCache('openId');
var user = myCache('user'); var user = myCache('user');
this.userid = user.userid? user.userid:''; this.userid = user.userid? user.userid:'';
@ -266,6 +303,22 @@
this.$refs.topId.topData(e.scrollTop); this.$refs.topId.topData(e.scrollTop);
}, },
methods: { methods: {
getCurrentActivity() {
// ActivityApp
const mainActivity = plus.android.runtimeMainActivity();
if (mainActivity) {
console.log('获取到Activity对象:', mainActivity);
// Activityplus.android.importClass
plus.android.importClass(mainActivity);
//console.log('Activity:', mainActivity.getClass().getSimpleName());
//console.log('Activity:', mainActivity.getClass());
console.log('Activity类名:', mainActivity.getClassName());
return mainActivity;
} else {
console.error('无法获取Activity对象');
return null;
}
},
getimgRemoteFile(img){ getimgRemoteFile(img){
if(img){ if(img){
img=img.split(',')[0]; img=img.split(',')[0];
@ -292,7 +345,6 @@
this.$forceUpdate(); this.$forceUpdate();
this.loadData(); this.loadData();
}, },
dotclick(index){ dotclick(index){
this.swiperCurrent = index; this.swiperCurrent = index;
this.$forceUpdate(); this.$forceUpdate();
@ -372,20 +424,124 @@
this.loadStatus="loading"; this.loadStatus="loading";
setTimeout(() => { setTimeout(() => {
this.getTeacherList(); this.getTeacherList();
this.getBanner();
}, 300); }, 300);
} }
}, },
async getBanner() { async getBanner() {
// banner // banner
const {data: res} = await uni.$http.post('/platform/getbanner'); const {data: res} = await uni.$http.get('/api/getInfo');
if (res&&res.length>0) { if(res&&res.visitStore){
this.swiperList=res; var shop=res.visitStore;
// var banner=shop&&shop.banner?shop.banner:"";
myCache('swiperCache',this.swiperList); banner=banner.split(',');
if(banner.length>0){
this.swiperList=banner;
this.$forceUpdate();
}
myCache('shop',shop);
myCache('myshop',shop.storeName);
myCache('myshopid',shop.id);
}
},
async getSort() {
//
const {data: res} = await uni.$http.get('/api/index/getIndex');
if (res&&res.data) {
this.themeList=res.data?res.data:[];
this.$forceUpdate(); this.$forceUpdate();
myCache('sortCache',this.themeList);
}
},
gotoCategory(id){
if(id==1){
// ()
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==2){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==3){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==4){
//
//
if(this.userid==""||this.userid=="0"){
this.$refs.loginId.open();
}
else{
//
uni.navigateTo({
url: `/pages/user/courselist`
});
}
}
else if(id==5){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==6){
// ()
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==7){
// (线)
uni.reLaunch({
url: `/pages/product/list?id=2`
});
}
else if(id==8){
//
uni.reLaunch({
url: `/pages/product/list`
});
}
else if(id==9){
// ()
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==10){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==11){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==12){
//
uni.reLaunch({
url: `/pages/category/category?id=${id}`
});
}
else if(id==13){
//
uni.reLaunch({
url: `/pages/product/list?id=0`
});
} }
}, },
gotoCategory(index){ gotoCategory0(index){
if(index==0||index==1){ if(index==0||index==1){
// //
uni.reLaunch({ uni.reLaunch({
@ -459,7 +615,7 @@
gotoTeacherMore(){ gotoTeacherMore(){
// //
uni.reLaunch({ uni.reLaunch({
url: `/pages/category/category?id=2` url: `/pages/category/category?id=5`
}); });
}, },
gotoTeacher(info){ gotoTeacher(info){
@ -576,7 +732,7 @@
// //
transform: translate(-50%, 0); transform: translate(-50%, 0);
-webkit-transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0);
z-index: 99; z-index: 98;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
@ -610,7 +766,8 @@
box-sizing: border-box; /* 确保padding和border不会影响宽度计算 */ box-sizing: border-box; /* 确保padding和border不会影响宽度计算 */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 30rpx 24rpx; align-items: center;
padding: 20rpx 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
@ -619,9 +776,10 @@
.thinfo{ .thinfo{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
flex: 1; flex: 1;
.thname{ .thname{
font-size: 32rpx; font-size: 30rpx;
color:#000; color:#000;
} }
.thtext{ .thtext{
@ -631,8 +789,8 @@
} }
} }
.thimg{ .thimg{
width: 100rpx; width: 88rpx;
height: 100rpx; height: 88rpx;
margin-left: 10rpx; margin-left: 10rpx;
.theimg{ .theimg{
width: 100%; width: 100%;

@ -11,7 +11,7 @@
</uni-forms-item> </uni-forms-item>
<uni-forms-item prop="password" > <uni-forms-item prop="password" >
<uni-easyinput type="password" placeholder="请输入密码" v-model="form.password" @blur="mmhandleBlur" :inputBorder="false" :clearable="false" :placeholderStyle="placeholderStyle"/> <uni-easyinput type="password" placeholder="请输入密码" v-model="form.password" @blur="mmhandleBlur" maxlength="12" :inputBorder="false" :clearable="false" :placeholderStyle="placeholderStyle"/>
</uni-forms-item> </uni-forms-item>
<uni-forms-item prop="code" > <uni-forms-item prop="code" >
@ -85,7 +85,9 @@
const _this=this; const _this=this;
uni.getLocation({ uni.getLocation({
type:'gcj02',//'gcj02','wgs84', // wgs84 type:'gcj02',//'gcj02','wgs84', // wgs84
geocode:true,
success: function (res) { success: function (res) {
console.log(res);
console.log('当前位置的经度:' + res.longitude); console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude); console.log('当前位置的纬度:' + res.latitude);
_this.form.position=res.latitude+','+res.longitude; _this.form.position=res.latitude+','+res.longitude;
@ -100,6 +102,8 @@
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); console.log('用户点击确定');
// #ifdef APP-PLUS
// //
plus.device.vendor = 'apple'; // iOS plus.device.vendor = 'apple'; // iOS
if (plus.os.name == 'iOS') { if (plus.os.name == 'iOS') {
@ -107,6 +111,8 @@
} else { } else {
plus.runtime.openURL('package:' + plus.android.runtimeMainActivity()); plus.runtime.openURL('package:' + plus.android.runtimeMainActivity());
} }
// #endif
} }
} }
}); });
@ -167,12 +173,13 @@
// if(e.detail.value&&!this.checkMM(e.detail.value)){ // if(e.detail.value&&!this.checkMM(e.detail.value)){
// '6-20', // '6-20',
// '8-203' // '8-203'
this.$refs.uToast.show({ // this.$refs.uToast.show({
title: "密码必须是6-20位字符至少包括英文、数字、特殊符号中2种以上请核实", // title: "6-202",
type: 'error', // type: 'error',
duration: 2000 // duration: 2000
}); // });
} }
}, },
// //
checkMM(mm) { checkMM(mm) {
@ -252,7 +259,7 @@
// phonenumber:"", // phonenumber:"",
// userid:"1", // userid:"1",
// userphone:"18900000001", // userphone:"18900000001",
// avatar:"/static/image/girl.jpg" // avatar:"/static/image/girl.png"
// }); // });
// this.$refs.uToast.show({ // this.$refs.uToast.show({
// title: '', // title: '',
@ -297,11 +304,13 @@
title: '正在登录...' title: '正在登录...'
}); });
const {data: res} = await uni.$http.post('/api/login',this.form); const {data: res} = await uni.$http.post('/api/login',this.form);
console.log(res);
if(res&&res.code=="200"){ if(res&&res.code=="200"){
uni.setStorageSync('token', res.token); uni.setStorageSync("loginindex", "1");
uni.setStorageSync("token", res.token);
// //
this.getUserInfo(); this.getUserInfo();
//
this.loadshop();
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '登录成功', title: '登录成功',
type: 'success', type: 'success',
@ -327,7 +336,6 @@
async getUserInfo(){ async getUserInfo(){
var _this=this; var _this=this;
const {data: res} = await uni.$http.get('/api/getInfo'); const {data: res} = await uni.$http.get('/api/getInfo');
console.log(res);
if(res&&res.appLoginUser){ if(res&&res.appLoginUser){
var user=res.appLoginUser; var user=res.appLoginUser;
myCache('user',{ myCache('user',{
@ -345,7 +353,20 @@
myCache('shop',shop); myCache('shop',shop);
myCache('myshop',shop.storeName); myCache('myshop',shop.storeName);
myCache('myshopid',shop.id); myCache('myshopid',shop.id);
var shoplist=[shop] // var shoplist=[shop]
// myCache('shoplist',shoplist);
}
},
async loadshop(){
//
const {data: res} = await uni.$http.post('/api/index/getStores');
if(res.data&&res.data.length>0){
myCache('shoplist',res.data);
}
else{
console.log("shoplist")
var shop=myCache('shop');
var shoplist=shop?[shop]:[];
myCache('shoplist',shoplist); myCache('shoplist',shoplist);
} }
}, },
@ -413,24 +434,24 @@
right: 28rpx; right: 28rpx;
display: block; display: block;
font-size: 36rpx; font-size: 36rpx;
color:#89965f; color:#00a89b;
line-height: 38rpx; line-height: 38rpx;
height: 45rpx; height: 45rpx;
margin-left: 50rpx; margin-left: 50rpx;
} }
.checkimg{ .checkimg{
position: absolute; position: absolute;
top:14rpx; top: 8rpx;
right: 130rpx; right: 130rpx;
width: 150rpx; width: 160rpx;
height: 50rpx; height: 66rpx;
} }
.codebtn{ .codebtn{
position: absolute; position: absolute;
top:12rpx; top:12rpx;
right: 20rpx; right: 20rpx;
display: block; display: block;
color:#89965f; color:#00a89b;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
font-size: 26rpx; font-size: 26rpx;
@ -443,24 +464,24 @@
justify-content: center; justify-content: center;
margin-top: 36rpx; margin-top: 36rpx;
.regtxt{ .regtxt{
color:#89965f; color:#00a89b;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.regtxtl{ .regtxtl{
color:#89965f; color:#00a89b;
width: 2rpx; width: 2rpx;
height: 26rpx; height: 26rpx;
font-size: 26rpx; font-size: 26rpx;
margin-left: 10rpx; margin-left: 10rpx;
margin-right: 10rpx; margin-right: 10rpx;
border-right: 1rpx solid #89965f; border-right: 1rpx solid #00a89b;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.regtxtr{ .regtxtr{
color:#89965f; color:#00a89b;
height: 28rpx; height: 28rpx;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;

@ -291,7 +291,7 @@
right: 28rpx; right: 28rpx;
display: block; display: block;
font-size: 36rpx; font-size: 36rpx;
color:#89965f; color:#00a89b;
line-height: 38rpx; line-height: 38rpx;
height: 45rpx; height: 45rpx;
margin-left: 50rpx; margin-left: 50rpx;
@ -308,7 +308,7 @@
top:12rpx; top:12rpx;
right: 20rpx; right: 20rpx;
display: block; display: block;
color:#89965f; color:#00a89b;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
font-size: 26rpx; font-size: 26rpx;
@ -321,24 +321,24 @@
justify-content: center; justify-content: center;
margin-top: 36rpx; margin-top: 36rpx;
.regtxt{ .regtxt{
color:#89965f; color:#00a89b;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.regtxtl{ .regtxtl{
color:#89965f; color:#00a89b;
width: 2rpx; width: 2rpx;
height: 26rpx; height: 26rpx;
font-size: 26rpx; font-size: 26rpx;
margin-left: 10rpx; margin-left: 10rpx;
margin-right: 10rpx; margin-right: 10rpx;
border-right: 1rpx solid #89965f; border-right: 1rpx solid #00a89b;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.regtxtr{ .regtxtr{
color:#89965f; color:#00a89b;
height: 28rpx; height: 28rpx;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;

@ -9,25 +9,35 @@
<!-- <uni-icons type="personadd" size="30" color="#ffffff" @click="$u.throttle(addContacts(), 2000)"></uni-icons> --> <!-- <uni-icons type="personadd" size="30" color="#ffffff" @click="$u.throttle(addContacts(), 2000)"></uni-icons> -->
</view> </view>
<view class="concon"> <view class="concon">
<view class="concell" @click="tabSelect(0)"> <!-- coach -->
<view v-if="ifxy" class="concell" @click="tabSelect(0)">
<image class="cimg" src="/static/image/jl.png"></image> <image class="cimg" src="/static/image/jl.png"></image>
<view class="ctxt" :class="tabCurrentIndex==0?'cur1':''">教练</view> <view class="ctxt" :class="list[tabCurrentIndex].id=='coach'?'cur1':''">教练</view>
</view> </view>
<view class="concell" @click="tabSelect(1)"> <!-- customerService -->
<view v-if="ifxy" class="concell" @click="tabSelect(1)">
<image class="cimg" src="/static/image/kff.png"></image> <image class="cimg" src="/static/image/kff.png"></image>
<view class="ctxt" :class="tabCurrentIndex==1?'cur2':''">客服</view> <view class="ctxt" :class="list[tabCurrentIndex].id=='customerService'?'cur2':''">客服</view>
</view> </view>
<view class="concell" @click="tabSelect(2)"> <!-- adviser -->
<view v-if="ifxy" class="concell" @click="tabSelect(2)">
<image class="cimg" src="/static/image/gw.png"></image> <image class="cimg" src="/static/image/gw.png"></image>
<view class="ctxt" :class="tabCurrentIndex==2?'cur3':''">课程顾问</view> <view class="ctxt" :class="list[tabCurrentIndex].id=='adviser'?'cur3':''">课程顾问</view>
</view> </view>
<view class="concell" @click="tabSelect(3)"> <!-- storeManager -->
<view v-if="ifxy" class="concell" @click="tabSelect(3)">
<image class="cimg" src="/static/image/dzh.png"></image> <image class="cimg" src="/static/image/dzh.png"></image>
<view class="ctxt" :class="tabCurrentIndex==3?'cur4':''">店长</view> <view class="ctxt" :class="list[tabCurrentIndex].id=='storeManager'?'cur4':''">店长</view>
</view> </view>
<!-- consumer -->
<view v-if="!ifxy" class="concell" @click="tabSelect(5)">
<image class="cimg" src="/static/image/xy.png"></image>
<view class="ctxt" :class="list[tabCurrentIndex].id=='consumer'?'cur6':''">学员</view>
</view>
<!-- groupchat -->
<view class="concell" @click="tabSelect(4)"> <view class="concell" @click="tabSelect(4)">
<image class="cimg" src="/static/image/ql.png"></image> <image class="cimg" src="/static/image/ql.png"></image>
<view class="ctxt" :class="tabCurrentIndex==4?'cur5':''" >群聊</view> <view class="ctxt" :class="list[tabCurrentIndex].id=='groupchat'?'cur5':''" >群聊</view>
</view> </view>
</view> </view>
</view> </view>
@ -40,10 +50,10 @@
<view class="listcell"> <view class="listcell">
<view class="lcon" v-for="(info, index) in list[tabCurrentIndex].grouplist" :key="index" @click="gotoGroup(info)"> <view class="lcon" v-for="(info, index) in list[tabCurrentIndex].grouplist" :key="index" @click="gotoGroup(info)">
<view class="limg"> <view class="limg">
<image class="img" :src="info.img" mode="aspectFill"></image> <image class="img" :src="info.friendHeadImage?info.friendHeadImage:(tabCurrentIndex==0?'/static/image/kff.png':(tabCurrentIndex==1?'/static/image/gw.png':(tabCurrentIndex==2?'/static/image/gw.png':(tabCurrentIndex==3?'/static/image/dzh.png':'/static/image/ql.png'))))" mode="aspectFill"></image>
</view> </view>
<view class="lright"> <view class="lright">
<view class="pname">{{info.name}}</view> <view class="pname">{{info.friendNickName}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -65,83 +75,84 @@
export default { export default {
data() { data() {
return { return {
userid:"",
userName:"",
messageText:'', // messageText:'', //
msgType :'error', msgType :'error',
tabCurrentIndex:0, tabCurrentIndex:0,
imgurl:uni.$http.baseUrl, imgurl:uni.$http.baseUrl,
list:[ list:[
{ {
id:0, id:"coach",
name:'教练', name:'教练',
loadStatus:'loadmore', loadStatus:'loadmore',
grouplist:[ grouplist:[]
// {
// id:1,
// name:"A",
// img:"/static/image/jl.png"
// },
]
}, },
{ {
id:1, id:"customerService",
name:'客服', name:'客服',
loadStatus:'loadmore', loadStatus:'loadmore',
grouplist:[ grouplist:[]
// {
// id:1,
// name:"-",
// img:"/static/image/kff.png"
// },
]
}, },
{ {
id:2, id:"adviser",
name:'课程顾问', name:'课程顾问',
loadStatus:'more', loadStatus:'more',
grouplist:[ grouplist:[]
// {
// id:1,
// name:"1",
// img:"/static/image/gw.png"
// },
]
}, },
{ {
id:3, id:"storeManager",
name:'店长', name:'店长',
loadStatus:'more', loadStatus:'more',
grouplist:[ grouplist:[]
// {
// id:1,
// name:"1",
// img:"/static/image/dzh.png"
// },
]
}, },
{ {
id:4, id:"groupchat",
name:'群聊', name:'群聊',
loadStatus:'loadmore', loadStatus:'loadmore',
grouplist:[ grouplist:[]
// { },
// id:1, {
// name:"1", id:"consumer",
// img:"/static/image/ql.png" name:'学员',
// }, loadStatus:'loadmore',
] grouplist:[]
} },
], ],
page:{ ifxy:false,
// pageNum:'1',
// pageSize: '10'
}
} }
}, },
onLoad(options) { onLoad(options) {
// 退 var userInfo=myCache('userInfo');
if(myCache('myshopid')){ this.userid = userInfo.userId? userInfo.userId:'';
this.userName = userInfo.nickName?userInfo.nickName:"";
var roleId=userInfo&&userInfo.roleId?userInfo.roleId:[];
if(roleId.length<1){
this.ifxy=true;
this.$forceUpdate();
}
roleId.forEach(cell=>{
if(cell=='107'&&roleId.length<2){
this.ifxy=true;
this.$forceUpdate();
}
else{
this.ifxy=false;
this.$forceUpdate();
}
});
if(this.ifxy){
this.tabCurrentIndex=0;
this.$forceUpdate();
}
else{
this.tabCurrentIndex=5;
this.$forceUpdate();
} }
// 退
if(myCache('myshopid')){}
this.loadData(); this.loadData();
}, },
onShow(){ onShow(){
@ -159,44 +170,86 @@
this.loadData(); this.loadData();
}, },
methods: { methods: {
addContacts(){ //
}, addContacts(){},
gotoBack(){ gotoBack(){
// //
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
}, },
changeTime(date) { //
return dateTime.dateTime(date); gotoGroup(item){
}, console.log(item);
gotoGroup(info){ //
var timestamp = new Date().getTime();
var info={
chatId: "privatechat-" + this.userid +"-"+ item.friendId,
chatType: (this.tabCurrentIndex==0?"coach":(this.tabCurrentIndex==1?"customerService":(this.tabCurrentIndex==2?"adviser":
(this.tabCurrentIndex==3?"storeManager":(this.tabCurrentIndex==4?"groupchat":(this.tabCurrentIndex==5?"consumer":"")))))),
chatName: item.friendNickName,
chatAvatar: item.friendHeadImage,
chatTime: timestamp,
userid: this.userid,
friendId: item.friendId, //
minId: null, // id
sort: this.tabCurrentIndex==4?"groupchat":"privatechat", // privatechat groupchat
from: "message" // yh message
}
// id:"coach",
// name:'',
// id:"customerService",
// name:'',
// id:"adviser",
// name:'',
// id:"storeManager",
// name:'',
// id:"groupchat",
// name:'',
// id:"consumer",
// name:'',
console.log(info);
if(this.tabCurrentIndex==0){ if(this.tabCurrentIndex==0){
// //
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/teacher/chat?data=${data}` url: `/pages/chat/chat?data=${data}`
}); });
} }
else if(this.tabCurrentIndex==1){ else if(this.tabCurrentIndex==1){
// //
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/service?data=${data}` url: `/pages/chat/chat?data=${data}`
}); });
} }
else if(this.tabCurrentIndex==2){ else if(this.tabCurrentIndex==2){
// //
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/service?data=${data}` url: `/pages/chat/chat?data=${data}`
}); });
} }
else if(this.tabCurrentIndex==3){ else if(this.tabCurrentIndex==3){
//
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
});
}
else if(this.tabCurrentIndex==4){
// //
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/service?data=${data}` url: `/pages/chat/groupchat?data=${data}`
});
}
else if(this.tabCurrentIndex==5){
//
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
}); });
} }
}, },
@ -219,7 +272,7 @@
if(this.list[this.tabCurrentIndex].loadStatus!=="nomore") if(this.list[this.tabCurrentIndex].loadStatus!=="nomore")
{ {
// //
if(this.tabCurrentIndex==0||this.tabCurrentIndex==1||this.tabCurrentIndex==2||this.tabCurrentIndex==3){ if(this.tabCurrentIndex==0||this.tabCurrentIndex==1||this.tabCurrentIndex==2||this.tabCurrentIndex==3||this.tabCurrentIndex==5){
const {data: res} = await uni.$http.get('/api/friend/list'); const {data: res} = await uni.$http.get('/api/friend/list');
this.list[0].loadStatus="nomore"; this.list[0].loadStatus="nomore";
this.list[0].grouplist=[]; this.list[0].grouplist=[];
@ -229,48 +282,32 @@
this.list[2].grouplist=[]; this.list[2].grouplist=[];
this.list[3].loadStatus="nomore"; this.list[3].loadStatus="nomore";
this.list[3].grouplist=[]; this.list[3].grouplist=[];
this.list[5].loadStatus="nomore";
this.list[5].grouplist=[];
// //
if(res.data&&res.data.customerService&&res.data.customerService.length>0){ if(res.data&&res.data.coach&&res.data.coach.length>0){
res.data.customerService.forEach(cell => { this.list[0].grouplist=res.data.coach;
this.list[0].grouplist.push({
id: cell.friendId,
name: cell.friendNickName,
img: cell.friendHeadImage?cell.friendHeadImage:'/static/image/ql.png'
})
});
this.$forceUpdate(); this.$forceUpdate();
} }
// //
if(res.data&&res.data.coach&&res.data.coach.length>0){ if(res.data&&res.data.customerService&&res.data.customerService.length>0){
res.data.coach.forEach(cell => { this.list[1].grouplist=res.data.customerService;
this.list[1].grouplist.push({
id: cell.friendId,
name: cell.friendNickName,
img: cell.friendHeadImage?cell.friendHeadImage:'/static/image/kff.png'
})
});
this.$forceUpdate(); this.$forceUpdate();
} }
// //
if(res.data&&res.data.adviser&&res.data.adviser.length>0){ if(res.data&&res.data.adviser&&res.data.adviser.length>0){
res.data.adviser.forEach(cell => { this.list[2].grouplist=res.data.adviser;
this.list[2].grouplist.push({
id: cell.friendId,
name: cell.friendNickName,
img: cell.friendHeadImage?cell.friendHeadImage:'/static/image/gw.png'
})
});
this.$forceUpdate(); this.$forceUpdate();
} }
// //
if(res.data&&res.data.storeManager&&res.data.storeManager.length>0){ if(res.data&&res.data.storeManager&&res.data.storeManager.length>0){
res.data.storeManager.forEach(cell => { this.list[3].grouplist=res.data.storeManager;
this.list[3].grouplist.push({ this.$forceUpdate();
id: cell.friendId, }
name: cell.friendNickName,
img: cell.friendHeadImage?cell.friendHeadImage:'/static/image/dzh.png' //
}) if(res.data&&res.data.consumer&&res.data.consumer.length>0){
}); this.list[5].grouplist=res.data.consumer;
this.$forceUpdate(); this.$forceUpdate();
} }
} }
@ -282,16 +319,14 @@
this.list[this.tabCurrentIndex].grouplist=[]; this.list[this.tabCurrentIndex].grouplist=[];
if(res.data&&res.data.length>0){ if(res.data&&res.data.length>0){
res.data.forEach(cell => { res.data.forEach(cell => {
this.list[this.tabCurrentIndex].grouplist.push({ this.list[this.tabCurrentIndex].grouplist.push({...cell,
id: cell.id, friendNickName: cell.name,
name: cell.name, friendHeadImage: cell.headImage?cell.headImage:'/static/image/ql.png'
img: cell.headImage?cell.headImage:'/static/image/ql.png'
}) })
}); });
this.$forceUpdate(); this.$forceUpdate();
} }
} }
} }
}, },
// //
@ -321,11 +356,8 @@
position: fixed; position: fixed;
width: 100%; width: 100%;
z-index: 999; z-index: 999;
background-color: #89965f; background-color: #00a89b;
.text-center {
width: 100%;
text-align: center;
}
.edit { .edit {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -336,27 +368,41 @@
} }
.hcon{ .hcon{
width: 100%; width: 100%;
background-color: #89965f; background-color: #00a89b;
margin: 0; margin: 0;
padding: 26rpx 30rpx; padding: 0 30rpx;
height: 100rpx;
display: flex; display: flex;
flex-direction: row;
color: #fff; color: #fff;
font-size: 36rpx; font-size: 36rpx;
align-items: center;
.leftarr{ .leftarr{
background-color: rgba(255, 255,255, 0.3); background-color: rgba(255, 255,255, 0.3);
padding: 5rpx;
border-radius: 10rpx; border-radius: 10rpx;
width: 60rpx; width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.text-center {
display: flex;
flex: 1;
width: 100%;
align-items: center;
justify-content: center;
} }
} }
.concon{ .concon{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
background: #fff; background: #fff;
padding: 30rpx 20rpx 20rpx 20rpx; padding: 20rpx 0;
margin: 0; margin: 0;
height: 190rpx;
align-items: center; align-items: center;
justify-content: center; justify-content: left;
.concell{ .concell{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -364,8 +410,8 @@
justify-content: center; justify-content: center;
width: 20%; width: 20%;
.cimg{ .cimg{
width: 100rpx; width: 90rpx;
height: 100rpx; height: 90rpx;
} }
.ctxt{ .ctxt{
font-size: 28rpx; font-size: 28rpx;
@ -374,33 +420,41 @@
} }
.cur1{ .cur1{
color:#ff7530; color:#ff7530;
font-size: 30rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
.cur2{ .cur2{
color:#46a0fb; color:#46a0fb;
font-size: 30rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
.cur3{ .cur3{
color:#5bd171; color:#5bd171;
font-size: 30rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
.cur5{ .cur5{
color:#d4237a; color:#d4237a;
font-size: 30rpx; font-size: 32rpx;
font-weight: 600;
}
.cur6{
color:#00a89b;
font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
.cur4{ .cur4{
color:#fca600; color:#fca600;
font-size: 30rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
} }
} }
} }
.wrapcon{ .wrapcon{
margin: 400rpx 0 0 0; margin: 370rpx 0 0 0;
/* #ifdef H5 */
margin: 300rpx 0 0 0;
/* #endif */
padding: 0; padding: 0;
width: 100%; width: 100%;
position: relative; position: relative;
@ -433,8 +487,8 @@
justify-content: center; justify-content: center;
border-radius: 50%; border-radius: 50%;
.img{ .img{
width: 100rpx; width: 80rpx;
height: 100rpx; height: 80rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
@ -511,7 +565,7 @@
width: 560rpx; width: 560rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -530,6 +584,6 @@
padding-top: 180rpx; padding-top: 180rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #89965f; color: #00a89b;
} }
</style> </style>

@ -6,35 +6,38 @@
<uni-icons type="staff-filled" size="30" color="#ffffff" @click="$u.throttle(gotoContacts(), 2000)"></uni-icons> <uni-icons type="staff-filled" size="30" color="#ffffff" @click="$u.throttle(gotoContacts(), 2000)"></uni-icons>
</view> </view>
<view class="wrapcon"> <view class="wrapcon">
<!-- 列表 --> <!-- 列表 -->
<view v-if="grouplist.length==0 && loadStatus=='nomore'" class="nodata">~</view> <view v-if="grouplist.length==0 && loadStatus=='nomore'" class="nodata">~</view>
<view class="listcell"> <view class="listcell">
<view class="lcon" v-for="(info, index) in grouplist" :key="index" @click="gotoGroup(info)"> <u-swipe-action :options="options" v-for="(info, index) in grouplist" :key="index" @click="$u.throttle(actionClick(info,index), 2000)" >
<view class="limg"> <view class="lcon" @click="gotoGroup(info,index)">
<image class="img" :src="info.img" mode="aspectFill"></image> <view class="limg">
</view> <image class="img" :src="info.img" mode="aspectFill"></image>
<view class="lright">
<view class="lrow">
<view class="pname">{{info.name}}</view>
<view class="ptime"> {{ changeTime(info.datetime)}}</view>
</view>
<view class="lrow">
<view class="pnr">
{{info.content}}
</view> </view>
<!-- <view class="lnum"> <view class="lright">
{{ getgroupsnums(info.minId)}} <view class="lrow">
</view> --> <view class="pname">{{info.name}}</view>
<view class="lnum" v-if="info.sl>0"> <view class="ptime"> {{ changeTime(info.datetime)}}</view>
{{ info.sl}} </view>
<view class="lrow">
<view class="pnr">
{{ info.type==0?info.content:(info.type==1?"图片":(info.type==2?"文件":(info.type==3?"语音":(info.type==4?"视频":
(info.type==5?"订单咨询":(info.type==6?"商品咨询":info.content))))))}}
</view>
<view class="lnum" v-if="info.sl>0">
{{ info.sl}}
</view>
</view>
</view> </view>
</view> </view>
</view> </u-swipe-action>
</view>
</view> </view>
<u-loadmore v-if="grouplist.length==0 && loadStatus=='loading'" :status="loadStatus" :marginTop="20"></u-loadmore> <u-loadmore v-if="grouplist.length==0 && loadStatus=='loading'" :status="loadStatus" :marginTop="20"></u-loadmore>
</view> </view>
@ -53,92 +56,47 @@
export default { export default {
data() { data() {
return { return {
openId:"",
phone:"",
userid:"",
userName:"",
userheadimg:"",
messageText:'', // messageText:'', //
msgType :'error', msgType :'error',
loadStatus:'loadmore', loadStatus:'loadmore',
options: [
{
text: '删除',
style: {
backgroundColor: '#ed2a28'
}
}
], //u-swipe-action
imgurl:uni.$http.baseUrl, imgurl:uni.$http.baseUrl,
grouplist:[ grouplist:[],
// { socketTask: null,
// id:1, isConnected: false, // WebSocket
// sl:25, socketmsg:[],//
// name:"-", heartbeatInterval: null, // 20
// img:"../../static/image/girl.jpg", heartbeatTimeout: 20000, // 20
// content:"1",
// datetime:"2025-07-10 12:18",
// type:1, //
// },
// {
// id:2,
// sl:8,
// name:"A",
// img:"../../static/image/girl.jpg",
// content:"2",
// datetime:"2025-07-05 12:18",
// type:2, //
// },
// {
// id:1,
// sl:25,
// name:"-",
// img:"../../static/image/girl.jpg",
// content:"1",
// datetime:"2025-07-10 12:18",
// type:1, //
// },
// {
// id:2,
// sl:8,
// name:"A",
// img:"../../static/image/girl.jpg",
// content:"2",
// datetime:"2025-07-05 12:18",
// type:2, //
// },
// {
// id:1,
// sl:25,
// name:"-",
// img:"../../static/image/girl.jpg",
// content:"1",
// datetime:"2025-07-10 12:18",
// type:1, //
// },
// {
// id:2,
// sl:8,
// name:"A",
// img:"../../static/image/girl.jpg",
// content:"2",
// datetime:"2025-07-05 12:18",
// type:2, //
// },
// {
// id:1,
// sl:25,
// name:"-",
// img:"../../static/image/girl.jpg",
// content:"1",
// datetime:"2025-07-10 12:18",
// type:1, //
// },
// {
// id:2,
// sl:8,
// name:"A",
// img:"../../static/image/girl.jpg",
// content:"2",
// datetime:"2025-07-05 12:18",
// type:2, //
// }
],
} }
}, },
onLoad(options) { onLoad(options) {
// this.getgroupsmembers(); // socket
// this.socketinit();
}, },
onShow(){ onShow(){
this.loadStatus='loadmore'; this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.userName=user.nickName?user.nickName:"";
this.userheadimg=user.avatar?user.avatar:require("@/static/image/girl.png");
this.phone = user.userphone;
//
if(this.heartbeatInterval){
clearInterval(this.heartbeatInterval); //
}
// chatlist
this.loadData(); this.loadData();
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -147,12 +105,250 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
},500); },500);
}, },
onReachBottom() { onBackPress(options) {
console.log('onReachBottom'); if (options.from === 'backbutton') {
// //
// this.loadData(); //
console.log('返回按钮被点击');
this.closeWebSocket();
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!');
});
return false;
}
},
beforeDestroy() {
console.log('界面关闭socketbeforeDestroy');
// WebSocket
this.closeWebSocket();
clearInterval(this.heartbeatInterval); //
},
beforeRouteLeave(to, from, next) {
console.log('界面关闭socketbeforeRouteLeave');
next();
}, },
methods: { methods: {
//
actionClick(info,index) {
console.log(info,index);
var that=this;
uni.showModal({
title: '提示',
content: "确定要删除此聊天记录吗?",
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
myCache(info.id,"");
that.grouplist.splice(index, 1);
that.$forceUpdate();
myCache("chatlist",that.grouplist);
}
}
});
},
//
startHeartbeat() {
console.log("startHeartbeat")
this.heartbeatInterval = setInterval(() => {
if (this.socketTask) {
this.socketTask.send({
data: JSON.stringify({
'cmd': 1,//
'data': {
'accessToken':uni.getStorageSync("token")
},
}) //
});
}
}, this.heartbeatTimeout);
},
// ws
socketinit(){
var that = this;
// if (!that.isConnected) {
that.socketTask=uni.connectSocket({
url: "wss://www.sanduolantoyoga.com/yoga-imserver/",
header: {
// 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"),
},
success: (res) => {
console.log(res, 'socket连接成功success');
},
fail: (res) => {
console.log(res, 'socket连接失败')
},
complete: (res) => {
console.log(res,'socket连接成功complete');
}
});
uni.onSocketOpen(resopen => {
console.log('WebSocket连接已打开');
that.isConnected = true;
that.$forceUpdate()
uni.sendSocketMessage({
data: JSON.stringify({
"cmd": 0,//
"data": {
"accessToken":uni.getStorageSync("token"),
},
}), // //
success(re) {
console.log(re);
console.log('消息发送成功!')
},
fail(err) {
console.log(err);
console.log('消息发送失败!')
}
});
//
this.startHeartbeat();
});
uni.onSocketMessage(res => {
console.log('收到WebSocket服务器消息');
if(res.data){
var rs=JSON.parse(res.data);
console.log(rs);
if(rs.cmd==3){
//
if(rs.data){
var data=rs.data;
if(data.recvId&&(data.recvId).toString()==(that.userid).toString()){
//
//
// 0: 1: 2: 3: 4: 10, "" 11, " "12, " " 30,""
if(data.type==0){
data.content=decodeURIComponent(data.content);
}
if(data.type==0||data.type==1||data.type==2||data.type==3||data.type==4||data.type==5||data.type==6){
var ifexist=0,idx=null;
that.grouplist.forEach((cell,index)=>{
if(cell.fromuser==data.sendId&&cell.userid==data.recvId&&cell.sort=="privatechat"){
ifexist=1;
idx=index;
that.grouplist[index].sl=(that.grouplist[index].sl?that.grouplist[index].sl+1:1);
that.grouplist[index].content=data.content;
that.grouplist[index].datetime=data.sendTime;
that.grouplist[index].type=data.type;
that.$forceUpdate();
}
});
if(ifexist==0){
//
// socket
var chatlastinfo={
id: "privatechat-" + data.recvId +"-" + data.sendId,
content: data.content,
minId: data.id,
sl:1,
datetime: data.sendTime,
type: data.type,
name: "",
userid: data.recvId,
fromuser: data.sendId,
img: "",
sort:"privatechat"
};
that.updateChatList(chatlastinfo,ifexist);
}
else{
that.updateChatList(that.grouplist[idx],ifexist);
}
}
else{
// 10, "" 11, " " 12, " " 30,""
}
}
}
}
else if(rs.cmd==4){
//
if(rs.data){
var data=rs.data;
if(data.atUserIds&&data.atUserIds.includes(that.userid)){
//
//
// 0: 1: 2: 3: 4: 10, "" 11, " "12, " " 30,""
if(data.type==0){
data.content=decodeURIComponent(data.content);
}
if(data.type==0||data.type==1||data.type==2||data.type==3||data.type==4||data.type==5||data.type==6){
var ifexist=0,idx=null;
that.grouplist.forEach((cell,index)=>{
if(cell.groupId==data.groupId&&cell.sort=="groupchat"){
ifexist=1;
idx=index;
that.grouplist[index].sl=(that.grouplist[index].sl?that.grouplist[index].sl+1:1);
that.grouplist[index].content=data.content;
that.grouplist[index].datetime=data.sendTime;
that.grouplist[index].fromuser=data.sendId;
that.grouplist[index].type=data.type;
that.$forceUpdate();
}
});
if(ifexist==0){
//
// socket
var chatlastinfo={
id: "groupchat-" + data.groupId,
groupId:data.groupId,
content: data.content,
minId: data.id,
sl:1,
datetime: data.sendTime,
type: data.type,
name: "",
userid: this.userid,
fromuser: data.sendId,
img: "",
sendId: data.sendId,
sendNickName: data.sendNickName,
sort:"groupchat"
};
that.getGroupInfo(chatlastinfo,ifexist);
}
else{
that.getGroupInfo(that.grouplist[idx],ifexist);
}
}
else{
// 10, "" 11, " " 12, " " 30,""
}
}
}
}
}
});
uni.onSocketClose(res => {
console.log('WebSocket连接已关闭',res);
that.isConnected = false;
that.$forceUpdate();
clearInterval(that.heartbeatInterval); //
});
uni.onSocketError(err => {
console.error('WebSocket连接打开失败请检查', err);
that.isConnected = false;
that.$forceUpdate();
clearInterval(that.heartbeatInterval); //
});
// }
},
// WebSocket
closeWebSocket() {
uni.closeSocket();
this.isConnected = false;
this.$forceUpdate()
},
gotoContacts(){ gotoContacts(){
uni.navigateTo({ uni.navigateTo({
url: `/pages/message/contact` url: `/pages/message/contact`
@ -161,57 +357,448 @@
changeTime(date) { changeTime(date) {
return dateTime.dateTime(date); return dateTime.dateTime(date);
}, },
gotoGroup(info){ gotoGroup(chat,index){
//
this.grouplist[index]["sl"]=0;
this.$forceUpdate();
myCache("chatlist",this.grouplist);
// //
if(info.type==1){ if(chat.sort=="privatechat"){
// //
var info={
chatId: chat.id,
chatName: chat.name,
chatAvatar: chat.img,
chatTime: chat.datetime,
friendId: chat.fromuser,
minId: chat.minId,
sort:"privatechat",
from:"message" // yh message
}
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/service?data=${data}` url: `/pages/chat/chat?data=${data}`
}); });
} }
else if(info.type==2){ else if(chat.sort=="groupchat"){
// //
var info={
chatId: chat.id,
groupId: chat.groupId,
chatName: chat.name,
chatAvatar: chat.img,
chatTime: chat.datetime,
friendId: chat.fromuser,
teacherId: chat.teacherId,
minId: chat.minId,
sort:"groupchat", // privatechat groupchat
from:"message", // yh message
notice: chat.notice,
remarkNickName: chat.remarkNickName,
showNickName: chat.showNickName,
showGroupName: chat.showGroupName,
remarkGroupName: chat.remarkGroupName,
reason: chat.reason,
customerService: chat.customerService,
instructor: chat.instructor,
productId: chat.productId,
productName: chat.productName
}
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
console.log(data);
uni.navigateTo({ uni.navigateTo({
url: `/pages/teacher/chat?data=${data}` url: `/pages/chat/groupchat?data=${data}`
}); });
} }
}, },
loadData(){ loadData(){
// //
if(this.loadStatus=="loadmore") { this.loadStatus="loading";
this.loadStatus="loading"; setTimeout(() => {
setTimeout(() => { this.getgroupsmembers();
this.getgroupsmembers(); }, 300);
}, 300);
}
}, },
// //
async getgroupsmembers(){ async getgroupsmembers(){
if(this.loadStatus!=="nomore") //
{ this.grouplist=[];
this.loadStatus="nomore"; var chatlist=myCache("chatlist")?myCache("chatlist"):[];
var chatlist=myCache("chatlist"); chatlist.forEach(cell=>{
this.grouplist=chatlist?chatlist:[]; if(cell.userid==this.userid){
this.grouplist.forEach((cell,i)=>{ this.grouplist.push(cell);
this.grouplist[i]["sl"]=this.getgroupsnums(cell.minId) }
}); });
this.loadStatus="nomore"; this.grouplist.forEach((cell,i)=>{
this.$forceUpdate(); if(cell.minId){
// id 线
this.readUp(i,cell);
}
});
this.loadStatus="nomore";
this.$forceUpdate();
var that=this;
setTimeout(() => {
that.reorder();
myCache("chatlist",that.grouplist);
}, 300);
// socket
this.socketinit();
},
//
reorder(){
this.grouplist.sort((a, b) => b.datetime - a.datetime);
this.$forceUpdate();
},
//
async readUp(i,item) {
if(item.sort=="groupchat"){
const {data: res} = await uni.$http.put('/api/message/group/readed?groupId='+item.groupId);
this.getgroupsnums(i,item);
}
else{
const {data: res} = await uni.$http.put('/api/message/private/readed?friendId='+item.fromuser);
this.getgroupsnums(i,item);
}
},
// 线
async getgroupsnums(i,item){
if(item.sort=="groupchat"){
//
const {data: res} = await uni.$http.get("/api/message/group/pullOfflineMessage",{minId:item.minId});
if(res.data&&res.data.length>0){
//
var data=res.data;
// 线
this.grouplist[i]["sl"]=res.data.length;
var last=res.data[res.data.length-1];
if(last.type==0){
last.content=decodeURIComponent(last.content);
}
if(last.type==0||last.type==1||last.type==2||last.type==3||last.type==4||data.type==5||data.type==6){
this.grouplist[i].content=last.content;
this.grouplist[i].type=last.type;
this.grouplist[i].datetime=last.datetime;
this.$forceUpdate();
//
this.reorder();
myCache("chatlist",this.grouplist);
}
}
}
else{
//
const {data: res} = await uni.$http.get("/api/message/private/pullOfflineMessage",{minId:item.minId});
if(res.data&&res.data.length>0){
//
var data=res.data;
// 线
this.grouplist[i]["sl"]=res.data.length;
var last=res.data[res.data.length-1];
if(last.type==0){
last.content=decodeURIComponent(last.content);
}
if(last.type==0||last.type==1||last.type==2||last.type==3||last.type==4||data.type==5||data.type==6){
this.grouplist[i].content=last.content;
this.grouplist[i].type=last.type;
this.grouplist[i].datetime=last.datetime;
this.$forceUpdate();
//
this.reorder();
myCache("chatlist",this.grouplist);
}
}
}
},
//
async getGroupInfo(info,ifexist) {
const {data: res} = await uni.$http.get('/api/group/find/'+info.groupId);
if(res.data){
var data = res.data;
info.name=data.name;
info.img=data.headImage||'/static/image/qltx.png';
info.notice=data.notice;
info.remarkNickName=data.remarkNickName;
info.showNickName=data.showNickName;
info.showGroupName=data.showGroupName;
info.remarkGroupName=data.remarkGroupName;
info.customerService=data.customerService;
info.instructor=data.instructor;
info.productId=data.productId;
info.productName=data.productName;
this.updateChatGroupList(info,ifexist);
}
},
async updateChatGroupList(info,ifexist){
var name=info.name,img=info.img||require("@/static/image/girl.png");
const {data: res} = await uni.$http.get("/api/friend/find/"+info.sendId);
if(res.data){
var data=res.data;
name=data.nickName?data.nickName:"匿名";
img=data.headImage?data.headImage:require("@/static/image/girl.png");
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
//
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": name, //
"fromuser": info.fromuser, //
"headimg": img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
}];
console.log("firstmsg",firstmsg)
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": name, //
"fromuser": info.fromuser, //
"headimg": img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
}
else{
name="匿名";
img="../../static/image/girl.png";
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": name, //
"fromuser": info.fromuser, //
"headimg": img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
}];
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": name, //
"fromuser": info.fromuser, //
"headimg": img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
}
},
async updateChatList(info,ifexist){
const {data: res} = await uni.$http.get("/api/friend/find/"+info.fromuser);
if(res.data){
var data=res.data;
info.name=data.nickName?data.nickName:"匿名";
info.img=data.headImage?data.headImage:require("@/static/image/girl.png");
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
//
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
}];
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
}
else{
info.name="匿名";
info.img="../../static/image/girl.png";
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
}];
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId,
"send": info.type==6?await this.getProduct(info.content):(info.type==5?await this.getOrder(info.content):null)
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
} }
}, },
// async getProduct(id){
async getgroupsnums(id){ console.log("getProduct",id)
var nums=0 var rets=null;
const {data: res} = await uni.$http.get("/api/message/private/pullOfflineMessage",{"minId":id}); const {data: res} = await uni.$http.post("/api/message/private/getProductForIm",{"productId":id});
if(res.data&&res.data.length>0){ if(res.data){
nums=res.data.length; var data=res.data;
return nums; rets={
type:data.isCourse==0?1:2,// 1 2 3
id:data.id,
name:data.name,
pic:data.pic,
price:data.price,
unit: data.unit,
brandName:data.brandName,
isCourse:data.isCourse
}
console.log(rets)
return rets;
} }
else{ else{
console.log("nums",nums) return rets;
return nums; }
},
async getOrder(id){
var rets=null;
const {data: res} = await uni.$http.post("/api/message/private/getOrderForIm",{"orderItemId":id});
if(res.data){
var data=res.data;
rets={
type:3,// 1 2 3
id:data.id,
orderId:data.orderId,
name:data.productName,
pic:data.pic?data.pic:'/static/image/nopic.png',
price:data.totalAmount,
quantity:data.quantity,
spData: data.spData? JSON.parse(data.spData):null
}
return rets;
}
else{
return rets;
} }
}, },
// //
@ -245,7 +832,7 @@
display: flex; display: flex;
color: #fff; color: #fff;
font-size: 36rpx; font-size: 36rpx;
background-color: #89965f; background-color: #00a89b;
.text-center { .text-center {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -263,29 +850,31 @@
width: 100%; width: 100%;
position: relative; position: relative;
margin: 180rpx 0 0 0; margin: 180rpx 0 0 0;
min-height: calc(100vh - 100rpx); min-height: calc(100vh - 180rpx);
/* #ifdef H5 */ /* #ifdef H5 */
margin: calc( 110rpx + var(--window-top)) 0 0 0; margin: calc( 110rpx + var(--window-top)) 0 0 0;
min-height: calc(100vh - var(--window-top) - var(--window-bottom) - 100rpx); min-height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx);
/* #endif */ /* #endif */
overflow-y: auto; overflow-y: auto;
} }
.listcell{ .listcell{
background: #fff; background: #fff;
margin: 0; margin: 0;
width: 100%;
.lcon{ .lcon{
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #eee;
padding-top: 28rpx; padding-top: 20rpx;
padding-bottom: 28rpx; padding-bottom: 20rpx;
opacity: 1; opacity: 1;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
width: 100%;
.limg{ .limg{
width: 120rpx; width: 100rpx;
height: 120rpx; height: 100rpx;
margin-right: 24rpx; margin-right: 20rpx;
margin-left: 24rpx; margin-left: 20rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
@ -293,8 +882,8 @@
justify-content: center; justify-content: center;
border-radius: 50%; border-radius: 50%;
.img{ .img{
width: 120rpx; width: 100rpx;
height: 120rpx; height: 100rpx;
} }
} }
.lright{ .lright{
@ -382,9 +971,10 @@
background-image: url('../../static/image/nomsg.png'); background-image: url('../../static/image/nomsg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
background-size: 100%;
height: 376rpx; height: 376rpx;
width: 256rpx; width: 256rpx;
color: #89965f; color: #00a89b;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;

@ -0,0 +1,505 @@
<template>
<view class="page">
<view class="page-header" :style="{ paddingTop: geStatusBarHeight()+ 8 + 'px'}">
<view class="text-center">消息</view>
<uni-icons type="staff-filled" size="30" color="#ffffff" @click="$u.throttle(gotoContacts(), 2000)"></uni-icons>
</view>
<view class="wrapcon">
<!-- 列表 -->
<view v-if="grouplist.length==0 && loadStatus=='nomore'" class="nodata">~</view>
<view class="listcell">
<view class="lcon" v-for="(info, index) in grouplist" :key="index" @click="gotoGroup(info)">
<view class="limg">
<image class="img" :src="info.img" mode="aspectFill"></image>
</view>
<view class="lright">
<view class="lrow">
<view class="pname">{{info.name}}</view>
<view class="ptime"> {{ changeTime(info.datetime)}}</view>
</view>
<view class="lrow">
<view class="pnr">
{{info.content}}
</view>
<!-- <view class="lnum">
{{ getgroupsnums(info.minId)}}
</view> -->
<view class="lnum" v-if="info.sl>0">
{{ info.sl}}
</view>
</view>
</view>
</view>
</view>
<u-loadmore v-if="grouplist.length==0 && loadStatus=='loading'" :status="loadStatus" :marginTop="20"></u-loadmore>
</view>
<!-- 提示信息弹窗 -->
<uni-popup ref="message" type="message">
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
</template>
<script>
import { myCache } from '../../utils/utils.js';
import dateTime from '@/common/dateTime.js';
export default {
data() {
return {
openId:"",
phone:"",
userid:"",
messageText:'', //
msgType :'error',
loadStatus:'loadmore',
imgurl:uni.$http.baseUrl,
grouplist:[
// {
// id:1,
// sl:25,
// name:"-",
// img:"../../static/image/girl.png",
// content:"1",
// datetime:"2025-07-10 12:18",
// type:1, //
// },
// {
// id:2,
// sl:8,
// name:"A",
// img:"../../static/image/girl.png",
// content:"2",
// datetime:"2025-07-05 12:18",
// type:2, //
// },
],
socketTask: null,
isConnected: false, // WebSocket
socketmsg:[],//
heartbeatInterval: null, // 20
heartbeatTimeout: 20000, // 20
}
},
onLoad(options) {
// socket
// this.socketinit();
},
onShow(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.phone = user.userphone;
// chatlist
this.loadData();
// socket
this.socketinit();
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
setTimeout(()=>{
uni.stopPullDownRefresh()
},500);
},
onBackPress(options) {
if (options.from === 'backbutton') {
//
//
console.log('返回按钮被点击');
this.closeWebSocket();
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!');
});
return false;
}
},
beforeDestroy() {
console.log('界面关闭socketbeforeDestroy');
// WebSocket
this.closeWebSocket();
},
beforeRouteLeave(to, from, next) {
console.log('界面关闭socketbeforeRouteLeave');
next();
},
methods: {
// ws
socketinit(){
var that = this;
if (!that.isConnected) {
console.log("wss://www.sanduolantoyoga.com/yoga-imserver/")
this.socketTask=uni.connectSocket({
url: "wss://www.sanduolantoyoga.com/yoga-imserver/",
header: {
// 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"),
},
success: (res) => {
console.log(res, 'socket连接成功success');
},
fail: (res) => {
console.log(res, 'socket连接失败')
},
complete: (res) => {
console.log(res,'socket连接成功complete');
}
});
uni.onSocketOpen(resopen => {
console.log('WebSocket连接已打开');
that.isConnected = true;
uni.sendSocketMessage({
data: JSON.stringify({
"cmd": 0,//
"data": {
"accessToken":uni.getStorageSync("token"),
},
}), // //
success(re) {
console.log(re);
console.log('消息发送成功!')
},
fail(err) {
console.log(err);
console.log('消息发送失败!')
}
});
//
// this.startHeartbeat();
//
// this.sendWebSocketMessage();
});
uni.onSocketMessage(res => {
console.log('收到WebSocket服务器消息', res);
if(res.data){
var cmd=res.cmd;
let data=JSON.parse(res.data);
console.log(data);
// if(data){
// //
// // 0: 1: 2: 3: 4: 10, "" 11, " "12, " " 30,""
// if(data.type=='0'){
// data.content=decodeURIComponent(data.content);
// }
// let mdata = {
// "fromname": that.friendName,
// "fromuser": that.friendcode,
// "headimg": that.friendheadimg,
// "toname": that.info.chatName, //
// "touser": that.info.friendId, //
// "content": data.content,
// "time": data.type==3?5:0,
// "ifaudio":data.type==3? true:false,
// "fromtime": data.sendTime,
// "type": data.type==0?'txt':(data.type==1?'image':data.type==3?'audio':(data.type==4?'video':'')),
// "id": data.id,
// "recvId": data.recvId,
// "sendId": data.sendId,
// };
// if(data.type==0||data.type==1||data.type==3||data.type==4){
// that.socketmsg.push(data);
// that.$forceUpdate();
// }
// else{
// // 10, "" 11, " " 12, " " 30,""
// }
// }
}
});
uni.onSocketClose(res => {
console.log('WebSocket连接已关闭');
that.isConnected = false;
clearInterval(that.heartbeatInterval); //
});
uni.onSocketError(err => {
console.error('WebSocket连接打开失败请检查', err);
clearInterval(that.heartbeatInterval); //
});
}
},
startHeartbeat() {
console.log("startHeartbeat")
this.heartbeatInterval = setInterval(() => {
if (this.socketTask) {
this.socketTask.send({
data: JSON.stringify({
'cmd': 1,//
'data': {
'accessToken':uni.getStorageSync("token")
},
}) //
});
}
}, this.heartbeatTimeout);
},
sendWebSocketMessage(){
uni.sendSocketMessage({
data: '这是一条测试消息', //
success(re) {
console.log(re);
console.log('消息发送成功!')
},
fail(err) {
console.log(err);
console.log('消息发送失败!')
}
});
},
// WebSocket
closeWebSocket() {
uni.closeSocket();
this.isConnected = false;
clearInterval(this.heartbeatInterval); //
},
gotoContacts(){
uni.navigateTo({
url: `/pages/message/contact`
});
},
changeTime(date) {
return dateTime.dateTime(date);
},
gotoGroup(info){
//
if(info.type==1){
//
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/groupchat?data=${data}`
});
}
else if(info.type==2){
//
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
});
}
},
loadData(){
//
this.loadStatus="loading";
setTimeout(() => {
this.getgroupsmembers();
}, 300);
},
//
async getgroupsmembers(){
//
this.grouplist=[];
var chatlist=myCache("chatlist")?myCache("chatlist"):[];
chatlist.forEach(cell=>{
if(cell.fromuser==this.userid){
this.grouplist.push(cell);
}
});
this.grouplist.forEach((cell,i)=>{
if(cell.minId){
// id 线
this.getgroupsnums(i,cell.minId)
}
});
this.loadStatus="nomore";
this.$forceUpdate();
},
// 线
async getgroupsnums(i,id){
const {data: res} = await uni.$http.get("/api/message/private/pullOfflineMessage",{"minId":id});
if(res.data&&res.data.length>0){
//
var data=res.data;
// 线
this.grouplist[i]["sl"]=res.data.length;
this.$forceUpdate();
}
},
//
geStatusBarHeight(){
return uni.getSystemInfoSync()['statusBarHeight'];
},
//
getNavBarHeight(){
return 45+uni.getSystemInfoSync()['statusBarHeight'];
},
}
}
</script>
<style lang="scss" scoped>
.page{
padding: 0;
position: relative;
background-image: url('@/static/image/bg.jpg');
background-attachment: fixed;
background-size: cover;
background-position: center center;
min-height: calc(100vh - var(--window-top) - var(--window-bottom));
}
.page-header {
position: fixed;
width: 100%;
z-index: 999;
padding: 40rpx 30rpx 30rpx 30rpx;
display: flex;
color: #fff;
font-size: 36rpx;
background-color: #00a89b;
.text-center {
width: 100%;
text-align: center;
}
.edit {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 30rpx;
font-size: 32rpx;
}
}
.wrapcon{
padding: 0;
width: 100%;
position: relative;
margin: 180rpx 0 0 0;
min-height: calc(100vh - 100rpx);
/* #ifdef H5 */
margin: calc( 110rpx + var(--window-top)) 0 0 0;
min-height: calc(100vh - var(--window-top) - var(--window-bottom) - 100rpx);
/* #endif */
overflow-y: auto;
}
.listcell{
background: #fff;
margin: 0;
.lcon{
border-bottom: 1rpx solid #eee;
padding-top: 20rpx;
padding-bottom: 20rpx;
opacity: 1;
display: flex;
flex-direction: row;
align-items: center;
.limg{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
margin-left: 20rpx;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
border-radius: 50%;
.img{
width: 100rpx;
height: 100rpx;
}
}
.lright{
display: flex;
flex: 1;
flex-direction: column;
}
.lrow{
display: flex;
flex-direction: row;
margin-bottom: 20rpx;
margin-right: 20rpx;
}
.pname{
display: flex;
flex: 1;
line-height: 50rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #000000;
}
.ptime{
line-height: 50rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #595959;
}
.pnr{
display: flex;
flex: 1;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #595959;
}
.lnum{
background-color: #de0000;
padding: 0 10rpx;
min-width: 32rpx;
height: 32rpx;
line-height: 32rpx;
color: #fff;
font-size: 24rpx;
border-radius: 28rpx;
}
}
}
.tips{
margin-top: 20rpx;
margin-bottom: 20rpx;
width: 100%;
line-height: 44rpx;
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #595959;
text-align: center;
}
.submitcon{
margin-top: 200rpx;
display: flex;
align-items: center;
justify-content: center;
}
.bbtn{
margin: 20rpx 30rpx 54rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FCFCFD;
width: 560rpx;
height: 96rpx;
line-height: 96rpx;
background: #367FFA;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4);
border-radius: 254rpx 254rpx 254rpx 254rpx;
opacity: 1;
&::after{
border:none;
}
}
.nodata{
background-image: url('../../static/image/nomsg.png');
background-repeat: no-repeat;
background-position: center center;
background-size: 100%;
height: 376rpx;
width: 256rpx;
color: #00a89b;
display: flex;
align-items: center;
justify-content: flex-end;
flex-direction: column;
padding-bottom: 40rpx;
margin: 100rpx auto;
}
</style>

@ -0,0 +1,731 @@
<template>
<view class="page">
<view class="page-header" :style="{ paddingTop: geStatusBarHeight()+ 8 + 'px'}">
<view class="text-center">消息</view>
<uni-icons type="staff-filled" size="30" color="#ffffff" @click="$u.throttle(gotoContacts(), 2000)"></uni-icons>
</view>
<view class="wrapcon">
<!-- 列表 -->
<view v-if="grouplist.length==0 && loadStatus=='nomore'" class="nodata">~</view>
<view class="listcell">
<u-swipe-action :options="options" v-for="(info, index) in grouplist" :key="index" @click="$u.throttle(actionClick(info,index), 2000)" >
<view class="lcon" @click="gotoGroup(info,index)">
<view class="limg">
<image class="img" :src="info.img" mode="aspectFill"></image>
</view>
<view class="lright">
<view class="lrow">
<view class="pname">{{info.name}}</view>
<view class="ptime"> {{ changeTime(info.datetime)}}</view>
</view>
<view class="lrow">
<view class="pnr">
{{ info.type==0?info.content:(info.type==1?"图片":(info.type==2?"文件":(info.type==3?"语音":(info.type==4?"视频":(info.type==5||info.type==6?
(info.chatType=='customerService'?(info.send&&info.send.type==3?'订单咨询':((info.send&&info.send.type==2?'课程咨询':'商品咨询'))):""):"")))))}}
</view>
<view class="lnum" v-if="info.sl>0">
{{ info.sl}}
</view>
</view>
</view>
</view>
</u-swipe-action>
</view>
<u-loadmore v-if="grouplist.length==0 && loadStatus=='loading'" :status="loadStatus" :marginTop="20"></u-loadmore>
</view>
<!-- 提示信息弹窗 -->
<uni-popup ref="message" type="message">
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
</template>
<script>
import { myCache } from '../../utils/utils.js';
import dateTime from '@/common/dateTime.js';
export default {
data() {
return {
openId:"",
phone:"",
userid:"",
userName:"",
userheadimg:"",
messageText:'', //
msgType :'error',
loadStatus:'loadmore',
options: [
{
text: '删除',
style: {
backgroundColor: '#ed2a28'
}
}
], //u-swipe-action
imgurl:uni.$http.baseUrl,
grouplist:[],
socketTask: null,
isConnected: false, // WebSocket
socketmsg:[],//
heartbeatInterval: null, // 20
heartbeatTimeout: 20000, // 20
}
},
onLoad(options) {
// socket
// this.socketinit();
},
onShow(){
this.openId = myCache('openId');
var user = myCache('user');
this.userid = user.userid? user.userid:'';
this.userName=user.nickName?user.nickName:"";
this.userheadimg=user.avatar?user.avatar:require("@/static/image/girl.png");
this.phone = user.userphone;
//
if(this.heartbeatInterval){
clearInterval(this.heartbeatInterval); //
}
// chatlist
this.loadData();
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
setTimeout(()=>{
uni.stopPullDownRefresh()
},500);
},
onBackPress(options) {
if (options.from === 'backbutton') {
//
//
console.log('返回按钮被点击');
this.closeWebSocket();
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!');
});
return false;
}
},
beforeDestroy() {
console.log('界面关闭socketbeforeDestroy');
// WebSocket
this.closeWebSocket();
clearInterval(this.heartbeatInterval); //
},
beforeRouteLeave(to, from, next) {
console.log('界面关闭socketbeforeRouteLeave');
next();
},
methods: {
//
actionClick(info,index) {
console.log(info,index);
var that=this;
uni.showModal({
title: '提示',
content: "确定要删除此聊天记录吗?",
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
myCache(info.id,"");
that.grouplist.splice(index, 1);
that.$forceUpdate();
myCache("chatlist",that.grouplist);
}
}
});
},
//
startHeartbeat() {
console.log("startHeartbeat")
this.heartbeatInterval = setInterval(() => {
if (this.socketTask) {
this.socketTask.send({
data: JSON.stringify({
'cmd': 1,//
'data': {
'accessToken':uni.getStorageSync("token")
},
}) //
});
}
}, this.heartbeatTimeout);
},
// ws
socketinit(){
var that = this;
// if (!that.isConnected) {
that.socketTask=uni.connectSocket({
url: "wss://www.sanduolantoyoga.com/yoga-imserver/",
header: {
// 'content-type': 'application/json',
Authorization: uni.getStorageSync("token"),
},
success: (res) => {
console.log(res, 'socket连接成功success');
},
fail: (res) => {
console.log(res, 'socket连接失败')
},
complete: (res) => {
console.log(res,'socket连接成功complete');
}
});
uni.onSocketOpen(resopen => {
console.log('WebSocket连接已打开');
that.isConnected = true;
that.$forceUpdate()
uni.sendSocketMessage({
data: JSON.stringify({
"cmd": 0,//
"data": {
"accessToken":uni.getStorageSync("token"),
},
}), // //
success(re) {
console.log(re);
console.log('消息发送成功!')
},
fail(err) {
console.log(err);
console.log('消息发送失败!')
}
});
//
this.startHeartbeat();
});
uni.onSocketMessage(res => {
console.log('收到WebSocket服务器消息');
if(res.data){
var rs=JSON.parse(res.data);
console.log(rs);
if(rs.data){
var data=rs.data;
if(data){
if(data.recvId==that.userid){
//
//
// 0: 1: 2: 3: 4: 10, "" 11, " "12, " " 30,""
if(data.type==0){
data.content=decodeURIComponent(data.content);
}
// else if(data.type==1){
// data.content="";
// }
// else if(data.type==2){
// data.content="";
// }
// else if(data.type==3){
// data.content="";
// }
// else if(data.type==4){
// data.content="";
// }
else if(data.type==5){
data.content="订单";
}
else if(data.type==6){
data.content="商品";
}
if(data.type==0||data.type==1||data.type==2||data.type==3||data.type==4||data.type==5||data.type==6){
var ifexist=0;
that.grouplist.forEach((cell,index)=>{
if(cell.fromuser==data.sendId&&cell.userid==data.recvId){
ifexist=1;
that.grouplist[index].sl=(that.grouplist[index].sl?that.grouplist[index].sl+1:1);
that.grouplist[index].content=data.content;
that.grouplist[index].datetime=data.sendTime;
that.grouplist[index].type=data.type;
that.$forceUpdate();
}
});
if(ifexist==0){
//
// socket
var chatlastinfo={
id: "privatechat-" + data.recvId +"-" + data.sendId,
content: data.content,
minId: data.id,
sl:1,
datetime: data.sendTime,
chatType: "",
type: data.type,
name: "",
userid: data.recvId,
fromuser: data.sendId,
img: "",
sort:"privatechat"
};
that.updateChatList(chatlastinfo,ifexist);
}
else{
that.updateChatList(that.grouplist[that.grouplist.length-1],ifexist);
}
}
else{
// 10, "" 11, " " 12, " " 30,""
}
}
}
}
}
});
uni.onSocketClose(res => {
console.log('WebSocket连接已关闭',res);
that.isConnected = false;
that.$forceUpdate();
clearInterval(that.heartbeatInterval); //
});
uni.onSocketError(err => {
console.error('WebSocket连接打开失败请检查', err);
that.isConnected = false;
that.$forceUpdate();
clearInterval(that.heartbeatInterval); //
});
// }
},
// WebSocket
closeWebSocket() {
uni.closeSocket();
this.isConnected = false;
this.$forceUpdate()
},
gotoContacts(){
uni.navigateTo({
url: `/pages/message/contact`
});
},
changeTime(date) {
return dateTime.dateTime(date);
},
gotoGroup(chat,index){
console.log("gotoGroup",chat);
//
this.grouplist[index]["sl"]=0;
this.$forceUpdate();
myCache("chatlist",this.grouplist);
//
if(chat.sort=="privatechat"){
//
var info={
chatId: chat.id,
chatType: chat.chatType,
chatName: chat.name,
chatAvatar: chat.img,
chatTime: chat.datetime,
friendId: chat.fromuser,
minId: chat.minId,
sort:"privatechat",
from:"message" // yh message
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
});
}
else if(chat.type=="groupchat"){
//
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/groupchat?data=${data}`
});
}
},
loadData(){
//
this.loadStatus="loading";
setTimeout(() => {
this.getgroupsmembers();
}, 300);
},
//
async getgroupsmembers(){
//
this.grouplist=[];
var chatlist=myCache("chatlist")?myCache("chatlist"):[];
chatlist.forEach(cell=>{
if(cell.userid==this.userid){
this.grouplist.push(cell);
}
});
this.grouplist.forEach((cell,i)=>{
if(cell.minId){
// id 线
this.readUp(i,cell.minId,cell.fromuser);
}
});
this.loadStatus="nomore";
this.$forceUpdate();
var that=this;
setTimeout(() => {
that.reorder();
myCache("chatlist",that.grouplist);
}, 300);
// socket
this.socketinit();
},
//
reorder(){
this.grouplist.sort((a, b) => b.datetime - a.datetime);
this.$forceUpdate();
},
//
async readUp(i,id,fromuser) {
const {data: res} = await uni.$http.put('/api/message/private/readed?friendId='+fromuser);
this.getgroupsnums(i,id);
},
// 线
async getgroupsnums(i,id){
const {data: res} = await uni.$http.get("/api/message/private/pullOfflineMessage",{minId:id});
if(res.data&&res.data.length>0){
//
var data=res.data;
// 线
this.grouplist[i]["sl"]=res.data.length;
var last=res.data[res.data.length-1];
if(last.type==0){
last.content=decodeURIComponent(last.content);
}
else if(last.type==1){
last.content="图片";
}
else if(last.type==2){
last.content="文件";
}
else if(last.type==3){
last.content="语音";
}
else if(last.type==4){
last.content="视频";
}
else if(last.type==5){
last.content="订单";
}
else if(last.type==6){
last.content="商品";
}
if(last.type==0||last.type==1||last.type==2||last.type==3||last.type==4||data.type==5||data.type==6){
this.grouplist[i].content=last.content;
this.grouplist[i].type=last.type;
this.grouplist[i].datetime=last.datetime;
this.$forceUpdate();
//
this.reorder();
myCache("chatlist",this.grouplist);
}
}
},
async updateChatList(info,ifexist){
const {data: res} = await uni.$http.get("/api/friend/find/"+info.fromuser);
if(res.data){
var data=res.data;
info.name=data.nickName?data.nickName:"匿名";
info.img=data.headImage?data.headImage:require("@/static/image/girl.png");
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
//
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId
}];
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
}
else{
info.name="匿名";
info.img="../../static/image/girl.png";
if(ifexist==0){
this.grouplist.push(info);
this.$forceUpdate();
}
//
this.reorder();
myCache("chatlist",this.grouplist);
var msgchat=myCache(info.id);
if(ifexist==0||!msgchat){
//
let firstmsg = [{
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId
}];
myCache(info.id,firstmsg);
}
else{
//
let firstmsg = {
"fromname": info.name, //
"fromuser": info.fromuser, //
"headimg": info.img, //
"toname": this.userName, //
"touser": this.userid, //
"content": info.content,
"time": info.type==3?5:0,
"ifaudio":info.type==3? true:false,
"fromtime": info.datetime,
"type": info.type==0?'txt':(info.type==1?'image':info.type==3?'audio':(info.type==4?'video':'product')),
"id": info.id,
"minId": info.minId,
"recvId": info.recvId,
"sendId": info.sendId
};
msgchat.push(firstmsg);
myCache(info.id,msgchat);
}
}
},
//
geStatusBarHeight(){
return uni.getSystemInfoSync()['statusBarHeight'];
},
//
getNavBarHeight(){
return 45+uni.getSystemInfoSync()['statusBarHeight'];
},
}
}
</script>
<style lang="scss" scoped>
.page{
padding: 0;
position: relative;
background-image: url('@/static/image/bg.jpg');
background-attachment: fixed;
background-size: cover;
background-position: center center;
min-height: calc(100vh - var(--window-top) - var(--window-bottom));
}
.page-header {
position: fixed;
width: 100%;
z-index: 999;
padding: 40rpx 30rpx 30rpx 30rpx;
display: flex;
color: #fff;
font-size: 36rpx;
background-color: #00a89b;
.text-center {
width: 100%;
text-align: center;
}
.edit {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 30rpx;
font-size: 32rpx;
}
}
.wrapcon{
padding: 0;
width: 100%;
position: relative;
margin: 180rpx 0 0 0;
min-height: calc(100vh - 180rpx);
/* #ifdef H5 */
margin: calc( 110rpx + var(--window-top)) 0 0 0;
min-height: calc(100vh - var(--window-top) - var(--window-bottom) - 180rpx);
/* #endif */
overflow-y: auto;
}
.listcell{
background: #fff;
margin: 0;
width: 100%;
.lcon{
border-bottom: 1rpx solid #eee;
padding-top: 20rpx;
padding-bottom: 20rpx;
opacity: 1;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
.limg{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
margin-left: 20rpx;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
border-radius: 50%;
.img{
width: 100rpx;
height: 100rpx;
}
}
.lright{
display: flex;
flex: 1;
flex-direction: column;
}
.lrow{
display: flex;
flex-direction: row;
margin-bottom: 20rpx;
margin-right: 20rpx;
}
.pname{
display: flex;
flex: 1;
line-height: 50rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #000000;
}
.ptime{
line-height: 50rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #595959;
}
.pnr{
display: flex;
flex: 1;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #595959;
}
.lnum{
background-color: #de0000;
padding: 0 10rpx;
min-width: 32rpx;
height: 32rpx;
line-height: 32rpx;
color: #fff;
font-size: 24rpx;
border-radius: 28rpx;
}
}
}
.tips{
margin-top: 20rpx;
margin-bottom: 20rpx;
width: 100%;
line-height: 44rpx;
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #595959;
text-align: center;
}
.submitcon{
margin-top: 200rpx;
display: flex;
align-items: center;
justify-content: center;
}
.bbtn{
margin: 20rpx 30rpx 54rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FCFCFD;
width: 560rpx;
height: 96rpx;
line-height: 96rpx;
background: #367FFA;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4);
border-radius: 254rpx 254rpx 254rpx 254rpx;
opacity: 1;
&::after{
border:none;
}
}
.nodata{
background-image: url('../../static/image/nomsg.png');
background-repeat: no-repeat;
background-position: center center;
background-size: 100%;
height: 376rpx;
width: 256rpx;
color: #00a89b;
display: flex;
align-items: center;
justify-content: flex-end;
flex-direction: column;
padding-bottom: 40rpx;
margin: 100rpx auto;
}
</style>

@ -69,7 +69,7 @@
</view> </view>
</view> </view>
<view class="tip"> <view class="tip">
<uni-icons type="info" size="20" color="#89965f"></uni-icons> <uni-icons type="info" size="20" color="#00a89b"></uni-icons>
<text style="margin-left: 10rpx;">提示:快递运输期间不算租期实际起租日为快递签收当天</text> <text style="margin-left: 10rpx;">提示:快递运输期间不算租期实际起租日为快递签收当天</text>
</view> </view>
</view> </view>
@ -1030,7 +1030,7 @@
.xs{ .xs{
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
color:#89965f ; color:#00a89b ;
} }
} }
.sbtn{ .sbtn{
@ -1063,7 +1063,7 @@
width: 660rpx; width: 660rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1214,7 +1214,7 @@
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
background: #89965f; background: #00a89b;
border-radius: 40rpx 40rpx 40rpx 40rpx; border-radius: 40rpx 40rpx 40rpx 40rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
@ -1376,8 +1376,8 @@
} }
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f !important; background-color: #00a89b !important;
border-color: #89965f !important; border-color: #00a89b !important;
background-clip: content-box!important; background-clip: content-box!important;
box-sizing: border-box; box-sizing: border-box;
} }
@ -1438,7 +1438,7 @@
width: 100%; width: 100%;
} }
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 75rpx; height: 75rpx;
@ -1484,7 +1484,7 @@
height: 48rpx; height: 48rpx;
text-align: center; text-align: center;
line-height: 50rpx; line-height: 50rpx;
background: #89965f; background: #00a89b;
border-radius: 24rpx; border-radius: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
@ -1521,7 +1521,7 @@
text-align: center; text-align: center;
.btn{ .btn{
padding: 0 12rpx; padding: 0 12rpx;
background-color: #89965f ; background-color: #00a89b ;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #fff; color: #fff;

@ -173,7 +173,7 @@
<button v-if="info.status==3" type="primary" class="pjbtn" @click="gotopj"></button> <button v-if="info.status==3" type="primary" class="pjbtn" @click="gotopj"></button>
<button v-if="info.status==3" type="primary" class="gzbtn" @click="gotosh"></button> <button v-if="info.status==3" type="primary" class="gzbtn" @click="gotosh"></button>
<button v-if="info.status==3&&info.aftersaleStatus==0" type="primary" class="gzbtn" @click="gotoshcancel"></button> <button v-if="info.status==3&&info.aftersaleStatus==0" type="primary" class="gzbtn" @click="gotoshcancel"></button>
<button type="primary" class="btn" @click="gotosj"></button> <button type="primary" class="btn" @click="gotoSevice"></button>
</view> </view>
@ -447,18 +447,104 @@
url: `/pages/order/orderpj?data=${id}` url: `/pages/order/orderpj?data=${id}`
}); });
}, },
gotosj(){ // 线
async gotoSevice(){
//
var orderItemList=this.info.orderItemList?this.info.orderItemList[0]:null;
if(orderItemList)
{
const {data: res1} = await uni.$http.get('/api/product/detail/'+orderItemList.productId);
if(res1&&res1.product){
var product=res1.product;
var customerService=product.customerService;// id;
if(!customerService){
uni.showModal({
title: '提示',
content: '抱歉!当前订单尚未配置客服服务..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
return false;
}
var nickName="客服";
var headImage="/static/image/kfr.png";
uni.showLoading({
title: '会话创建中...'
});
const {data: res} = await uni.$http.get("/api/friend/find/"+customerService);
console.log(res)
if(res.data){
//
var data = res.data;
nickName=data.nickName?data.nickName:"客服";
headImage=data.headImage?data.headImage:'/static/image/kfr.png';
this.gotoSeviceTZ(nickName,headImage,customerService);
}
else{
this.gotoSeviceTZ(nickName,headImage,customerService);
}
}
else{
uni.showModal({
title: '提示',
content: '抱歉!当前订单尚未配置客服服务..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
return false;
}
}
else{
uni.showModal({
title: '提示',
content: '抱歉!当前订单尚未配置客服服务..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
return false;
}
},
gotoSeviceTZ(nickName,headImage,customerService){
// 线 // 线
uni.makePhoneCall({ //
phoneNumber: "18900000001", //
success:function(){ var chatid="privatechat-" + this.userid +"-"+ customerService;
console.log('拨打电话成功'); var timestamp = new Date().getTime();
}, var sp=this.info.orderItemList[0];
fail() { var info={
console.log('打电话失败了'); chatId: chatid,
chatType: "customerService", //
chatName: nickName,
chatAvatar: headImage,
chatTime: timestamp,
userid: this.userid,
friendId: customerService, // userid
minId: "", // id
sort:"privatechat", // privatechat groupchat
from:"yh", // yh message
sendinfo:{
type:3,// 1 2 3
id:sp.id,
orderId:sp.orderId,
name:sp.productName,
pic:sp.pic?sp.pic:'/static/image/nopic.png',
price:this.info.totalAmount,
quantity:sp.quantity,
spData: sp.spData? JSON.parse(sp.spData):null
} }
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
}); });
}, },
async getinfo() { async getinfo() {
uni.showLoading({ uni.showLoading({
title: '数据加载中...' title: '数据加载中...'
@ -1121,24 +1207,24 @@
.rmb{ .rmb{
font-size: 30rpx; font-size: 30rpx;
font-family: smallYuan; font-family: smallYuan;
color:#89965f ; color:#00a89b ;
margin-left: 10rpx; margin-left: 10rpx;
} }
.zs{ .zs{
font-size: 48rpx; font-size: 48rpx;
font-weight: 600; font-weight: 600;
font-family: smallYuan; font-family: smallYuan;
color:#89965f ; color:#00a89b ;
} }
.xs{ .xs{
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
font-family: smallYuan; font-family: smallYuan;
color:#89965f ; color:#00a89b ;
} }
} }
.btn{ .btn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 30rpx 20rpx 0 0; margin: 30rpx 20rpx 0 0;
border-radius: 50rpx; border-radius: 50rpx;
height: 60rpx; height: 60rpx;
@ -1211,8 +1297,8 @@
line-height: 60rpx; line-height: 60rpx;
width:170rpx; width:170rpx;
font-size: 26rpx; font-size: 26rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
color:#89965f; color:#00a89b;
} }
.wlbtn::after{ .wlbtn::after{
border:0 !important; border:0 !important;
@ -1352,7 +1438,7 @@
.owc{ .owc{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #89965f ; background-color: #00a89b ;
padding: 20rpx; padding: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
.ozstate{ .ozstate{
@ -1473,8 +1559,8 @@
} }
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f !important; background-color: #00a89b !important;
border-color: #89965f !important; border-color: #00a89b !important;
background-clip: content-box!important; background-clip: content-box!important;
box-sizing: border-box; box-sizing: border-box;
} }
@ -1490,7 +1576,7 @@
display: block; display: block;
padding-bottom: 80rpx; padding-bottom: 80rpx;
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 50rpx 20rpx 20rpx; margin: 50rpx 20rpx 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 75rpx; height: 75rpx;
@ -1577,7 +1663,7 @@
text-align: center; text-align: center;
.btn{ .btn{
padding: 0 12rpx; padding: 0 12rpx;
background-color: #89965f ; background-color: #00a89b ;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #fff; color: #fff;

@ -13,7 +13,7 @@
<view v-for="(item, index) in tabItem.slist" :key="index" class="oitem"> <view v-for="(item, index) in tabItem.slist" :key="index" class="oitem">
<view class="obcon" @click="gotoInfo(item.orderId)"> <view class="obcon" @click="gotoInfo(item.orderId)">
<image style="width: 50rpx; height: 50rpx;margin-right: 8rpx;" src="/static/image/sj.png"></image> <image style="width: 35rpx; height: 35rpx;margin-right: 8rpx;" src="/static/image/sj.png"></image>
<text>{{item.storeName}}</text> <text>{{item.storeName}}</text>
</view> </view>
@ -1295,14 +1295,14 @@
height: 90rpx; height: 90rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -1317,7 +1317,7 @@
background-position: center; background-position: center;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
color: #89965f; color: #00a89b;
overflow: hidden; overflow: hidden;
} }
.scell{ .scell{
@ -1522,7 +1522,7 @@
border:0 !important; border:0 !important;
} }
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin-left: 20rpx; margin-left: 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
border-radius: 50rpx; border-radius: 50rpx;
@ -1530,7 +1530,7 @@
line-height: 48rpx; line-height: 48rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
} }
.paybtn::after{ .paybtn::after{
border:0 !important; border:0 !important;
@ -1640,8 +1640,8 @@
} }
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f !important; background-color: #00a89b !important;
border-color: #89965f !important; border-color: #00a89b !important;
background-clip: content-box!important; background-clip: content-box!important;
box-sizing: border-box; box-sizing: border-box;
} }
@ -1657,7 +1657,7 @@
display: block; display: block;
padding-bottom: 80rpx; padding-bottom: 80rpx;
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 50rpx 20rpx 20rpx; margin: 50rpx 20rpx 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 75rpx; height: 75rpx;
@ -1734,7 +1734,7 @@
text-align: center; text-align: center;
.btn{ .btn{
padding: 0 12rpx; padding: 0 12rpx;
background-color: #89965f ; background-color: #00a89b ;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #fff; color: #fff;

@ -413,7 +413,7 @@
display: block; display: block;
padding-bottom: 80rpx; padding-bottom: 80rpx;
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 50rpx 20rpx 20rpx; margin: 50rpx 20rpx 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 75rpx; height: 75rpx;

@ -69,8 +69,8 @@ export default {
} }
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f!important; background-color: #00a89b!important;
border-color: #89965f!important; border-color: #00a89b!important;
background-clip: content-box!important; background-clip: content-box!important;
padding: 0rpx!important; padding: 0rpx!important;
box-sizing: border-box; box-sizing: border-box;
@ -135,7 +135,7 @@ export default {
color: #FCFCFD; color: #FCFCFD;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(67,110,255,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -173,7 +173,7 @@ export default {
text-align: center; text-align: center;
.btn{ .btn{
padding: 0 12rpx; padding: 0 12rpx;
background-color: #89965f; background-color: #00a89b;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #fff; color: #fff;

@ -70,11 +70,11 @@
color:#78839A; color:#78839A;
text-align: center; text-align: center;
box-sizing:border-box; box-sizing:border-box;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
&.hollow{ &.hollow{
background: #E1F2FF; background: #E1F2FF;
color: #78839A; color: #78839A;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
} }
} }
</style> </style>

@ -32,11 +32,11 @@
<text class="txt" v-if="product.unit"> / {{product.unit}} </text> <text class="txt" v-if="product.unit"> / {{product.unit}} </text>
<!-- <text class="pretxt"> {{product.preprice}} </text> --> <!-- <text class="pretxt"> {{product.preprice}} </text> -->
<view v-if="ifcollect" class="collect" @tap="collectDo"> <view v-if="ifcollect" class="collect" @tap="collectDo">
<uni-icons type="star-filled" size="18" color="#89965f"></uni-icons> <uni-icons type="star-filled" size="18" color="#00a89b"></uni-icons>
<text class="txt">已收藏</text> <text class="txt">已收藏</text>
</view> </view>
<view v-else class="collect" @tap="collectDo"> <view v-else class="collect" @tap="collectDo">
<uni-icons type="star" size="18" color="#89965f"></uni-icons> <uni-icons type="star" size="18" color="#00a89b"></uni-icons>
<text class="txt">加入收藏</text> <text class="txt">加入收藏</text>
</view> </view>
</view> </view>
@ -452,7 +452,8 @@
img:product.pic?product.pic:'',// img:product.pic?product.pic:'',//
img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', // img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', //
state:product.showStatus, // 1 2 3 4 5稿 state:product.showStatus, // 1 2 3 4 5稿
customerService:product.scustomerService,// id storeId:product.storeId,
customerService:product.customerService,// id
pjnum:0, // pjnum:0, //
quantity:1, // quantity:1, //
ifspec: res1.skus&&res1.skus.length>0?'1':'0', ifspec: res1.skus&&res1.skus.length>0?'1':'0',
@ -609,7 +610,7 @@
spData:this.product.spData, spData:this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
// //
@ -680,11 +681,133 @@
url: `/pages/cart/cart` url: `/pages/cart/cart`
}); });
}, },
gotoSevice(){ async gotoSevice(){
// 线 if(!this.product.instructor&&!this.product.customerService){
uni.navigateTo({ uni.showModal({
url: `/pages/product/service` title: '提示',
content: '抱歉!当前课程暂未配置客服咨询..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
return false;
}
var nickName="客服";
var headImage="/static/image/kfr.png";
uni.showLoading({
title: '会话创建中...'
}); });
const {data: res} = await uni.$http.get("/api/friend/find/"+this.product.customerService);
if(res.data){
//
var data = res.data;
nickName=data.nickName?data.nickName:"客服";
headImage=data.headImage?data.headImage:'/static/image/kfr.png';
this.gotoSeviceTZ(nickName,headImage);
}
else{
this.gotoSeviceTZ(nickName,headImage);
}
},
async gotoSeviceTZ(nickName,headImage){
// 线
if(this.product.instructor&&this.product.customerService&&this.product.instructor!=this.product.customerService)
{
//
//
var params={
"productId": this.product.id, //id
"productName": this.product.name, //
"customerService": this.product.customerService, //id
"instructor": this.product.instructor //id
}
const {data: res} = await uni.$http.post("/api/group/create",params);
console.log(res)
if(res&&res.data){
var data=res.data;
var timestamp = new Date().getTime();
var chatid="groupchat-" + data.id;
var info={
chatId: chatid,
groupId: data.id,
chatName: data.name,
chatAvatar: data.headImage?data.headImage:'/static/image/kfr.png',
chatTime: timestamp,
userid: data.ownerId,
friendId: this.product.customerService, // userid
teacherId: this.product.instructor, // userid
minId: "", // id
sort:"groupchat", // privatechat groupchat
from:"yh", // yh message
notice: data.notice,
remarkNickName: data.remarkNickName,
showNickName: data.showNickName,
showGroupName: data.showGroupName,
remarkGroupName: data.remarkGroupName,
reason: data.reason,
customerService: data.customerService,
instructor: data.instructor,
productId: data.productId,
productName: data.productName,
sendinfo:{
type:1,// 1 2 3
id:this.product.id,
name:this.product.name,
pic:this.product.pic,
price:this.product.price,
unit: this.product.unit,
brandName:this.product.brandName,
isCourse:this.product.isCourse
}
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/groupchat?data=${data}`
});
}
else{
uni.showModal({
title: '提示',
content: res.msg? res.msg:'当前会话创建失败..',
cancelText: '取消',
confirmText: '确定',
success: ress => {}
});
}
}
else{
//
//
var chatid="privatechat-" + this.userid +"-"+ this.product.customerService;
var timestamp = new Date().getTime();
var info={
chatId: chatid,
chatName: nickName,
chatAvatar: headImage,
chatTime: timestamp,
userid: this.userid,
friendId: this.product.customerService, // userid
minId: "", // id
sort:"privatechat", // privatechat groupchat
from:"yh", // yh message
sendinfo:{
type:2,// 1 2 3
id:this.product.id,
name:this.product.name,
pic:this.product.pic,
price:this.product.price,
unit: this.product.unit,
brandName:this.product.brandName,
isCourse:this.product.isCourse
}
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({
url: `/pages/chat/chat?data=${data}`
});
}
}, },
gotoCourse(){ gotoCourse(){
// //
@ -857,7 +980,7 @@
} }
.price{ .price{
line-height: 1; line-height: 1;
color: #89965f; color: #00a89b;
.txt{ .txt{
font-size: 30rpx; font-size: 30rpx;
} }
@ -907,7 +1030,7 @@
} }
.spcli.cur{ .spcli.cur{
background: #dceef7; background: #dceef7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
.spclilong{ .spclilong{
@ -927,7 +1050,7 @@
} }
.spclilong.cur{ .spclilong.cur{
background: #dceef7; background: #dceef7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
} }
@ -954,7 +1077,7 @@
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -972,7 +1095,7 @@
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #55690e; background: #468a73;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -1076,7 +1199,7 @@
color: #FCFCFD; color: #FCFCFD;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1093,7 +1216,7 @@
width: 220rpx; width: 220rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1110,7 +1233,7 @@
width: 210rpx; width: 210rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #55690e; background: #468a73;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1154,12 +1277,12 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 600; font-weight: 600;
color: #89965f; color: #00a89b;
} }
.cur .pline{ .cur .pline{
width: 40rpx; width: 40rpx;
height: 6rpx; height: 6rpx;
background: #89965f; background: #00a89b;
border-radius: 4rpx 4rpx 4rpx 4rpx; border-radius: 4rpx 4rpx 4rpx 4rpx;
opacity: 1; opacity: 1;
} }
@ -1277,7 +1400,7 @@
line-height: 40rpx; line-height: 40rpx;
color: #fff; color: #fff;
font-size: 22rpx; font-size: 22rpx;
background: #89965f; background: #00a89b;
border-radius: 20rpx; border-radius: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
@ -1297,7 +1420,7 @@
align-items: baseline; align-items: baseline;
.txtt{ .txtt{
font-size: 24rpx; font-size: 24rpx;
color: #89965f; color: #00a89b;
margin-right: 10rpx; margin-right: 10rpx;
} }
.txt{ .txt{
@ -1308,7 +1431,7 @@
.tint{ .tint{
font-size: 42rpx; font-size: 42rpx;
font-weight: 600; font-weight: 600;
color: #89965f; color: #00a89b;
} }
.pretxt{ .pretxt{
color: #959694; color: #959694;
@ -1323,7 +1446,7 @@
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.txt{ .txt{
color: #89965f; color: #00a89b;
font-size: 24rpx; font-size: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
@ -1427,7 +1550,7 @@
} }
.price{ .price{
line-height: 1; line-height: 1;
color: #89965f; color: #00a89b;
.txt{ .txt{
font-size: 30rpx; font-size: 30rpx;
} }

@ -6,7 +6,7 @@
<view class="leftarr"> <view class="leftarr">
<uni-icons type="back" size="24" color="#fff" @tap="gotoBack"></uni-icons> <uni-icons type="back" size="24" color="#fff" @tap="gotoBack"></uni-icons>
</view> </view>
<selShop :showName="false" :showQR="true" :shop="shop" @changeArea="changeArea"></selShop> <selShop :showName="false" :showQR="true" :shopid="shopid" :shop="shop" @changeArea="changeArea"></selShop>
</view> </view>
<view class="hcon"> <view class="hcon">
<uni-search-bar @confirm="search" @input="input" :focus="false" @focus="focus" v-model="searchValue" <uni-search-bar @confirm="search" @input="input" :focus="false" @focus="focus" v-model="searchValue"
@ -96,7 +96,7 @@
searchValue:"", searchValue:"",
cartnum:getcartNum(),// cartnum:getcartNum(),//
ifsear:false, ifsear:false,
shopid:myCache('myshopid')?myCache('myshopid'):'', shopid:myCache('myshopid')?myCache('myshopid'):null,
shop:myCache('myshop')?myCache('myshop'):'', shop:myCache('myshop')?myCache('myshop'):'',
contentText: { contentText: {
contentdown: '查看更多', contentdown: '查看更多',
@ -274,6 +274,7 @@
img:product.pic?product.pic:'',// img:product.pic?product.pic:'',//
img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', // img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', //
state:product.showStatus, // 1 2 3 4 5稿 state:product.showStatus, // 1 2 3 4 5稿
storeId:product.storeId,
customerService:product.scustomerService,// id customerService:product.scustomerService,// id
quantity:1, // quantity:1, //
ifspec: res1.skus&&res1.skus.length>0?'1':'0', ifspec: res1.skus&&res1.skus.length>0?'1':'0',
@ -321,7 +322,7 @@
spData:this.product.spData, spData:this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
// //
@ -436,13 +437,14 @@
if (!keyword) return text; if (!keyword) return text;
// 使<span> // 使<span>
const regex = new RegExp(keyword, 'gi'); const regex = new RegExp(keyword, 'gi');
return text.replace(regex, `<span style="color:#89965f">${keyword}</span>`); return text.replace(regex, `<span style="color:#00a89b">${keyword}</span>`);
}, },
input(res) { input(res) {
if(!this.ifsear){ console.log('input',res);
this.ifsear=true; // if(!this.ifsear){
this.getld(res); // this.ifsear=true;
} // this.getld(res);
// }
}, },
async getld(keywords) { async getld(keywords) {
const {data: res} = await uni.$http.post('/yoga/getProductsBykeywords',{keywords:keywords}); const {data: res} = await uni.$http.post('/yoga/getProductsBykeywords',{keywords:keywords});
@ -458,18 +460,26 @@
}, },
focus(res){ focus(res){
console.log('focus',res); console.log('focus',res);
this.ifshow=false; // this.ifshow=false;
this.$forceUpdate(); this.$forceUpdate();
}, },
search(res) { search(res) {
//
console.log('search',res);
this.ifsear=false; this.ifsear=false;
this.ifshow=true; // this.ifshow=true;
this.$forceUpdate(); this.$forceUpdate();
this.getList(); if(res.value){
this.loadStatus="more";
this.goodsList=[];
this.page.pageNum=1;
this.$forceUpdate();
this.getList();
}
}, },
clear(res) { clear(res) {
this.searchValue=""; this.searchValue="";
this.ifshow=true; // this.ifshow=true;
this.$forceUpdate(); this.$forceUpdate();
this.getList(); this.getList();
}, },
@ -479,7 +489,7 @@
// icon: 'none' // icon: 'none'
// }) // })
this.searchValue=""; this.searchValue="";
this.ifshow=true; // this.ifshow=true;
this.$forceUpdate(); this.$forceUpdate();
this.getList(); this.getList();
}, },
@ -649,8 +659,8 @@
} }
.tab.cur{ .tab.cur{
color: #fff; color: #fff;
background-color: #89965f; background-color: #00a89b;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
} }
} }
.tcon{ .tcon{

@ -44,11 +44,11 @@
<text class="txt"> / {{product.unit}} </text> <text class="txt"> / {{product.unit}} </text>
<!-- <text class="pretxt"> {{product.preprice}} </text> --> <!-- <text class="pretxt"> {{product.preprice}} </text> -->
<view v-if="ifcollect" class="collect" @tap="collectDo"> <view v-if="ifcollect" class="collect" @tap="collectDo">
<uni-icons type="star-filled" size="18" color="#89965f"></uni-icons> <uni-icons type="star-filled" size="18" color="#00a89b"></uni-icons>
<text class="txt">已收藏</text> <text class="txt">已收藏</text>
</view> </view>
<view v-else class="collect" @tap="collectDo"> <view v-else class="collect" @tap="collectDo">
<uni-icons type="star" size="18" color="#89965f"></uni-icons> <uni-icons type="star" size="18" color="#00a89b"></uni-icons>
<text class="txt">加入收藏</text> <text class="txt">加入收藏</text>
</view> </view>
</view> </view>
@ -406,7 +406,8 @@
img:product.pic?product.pic:'',// img:product.pic?product.pic:'',//
img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', // img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', //
state:product.showStatus, // 1 2 3 4 5稿 state:product.showStatus, // 1 2 3 4 5稿
customerService:product.scustomerService,// id storeId:product.storeId,
customerService:product.customerService,// id
pjnum:0, // pjnum:0, //
quantity:1, // quantity:1, //
ifspec: res1.skus&&res1.skus.length>0?'1':'0', ifspec: res1.skus&&res1.skus.length>0?'1':'0',
@ -564,7 +565,7 @@
spData:this.product.spData, spData:this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
// //
@ -638,10 +639,67 @@
url: `/pages/cart/cart` url: `/pages/cart/cart`
}); });
}, },
gotoSevice(){ async gotoSevice(){
if(!this.product.instructor&&!this.product.customerService){
uni.showModal({
title: '提示',
content: '抱歉!当前课商品未配置客服咨询..',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
return false;
}
var nickName="客服";
var headImage="/static/image/kfr.png";
uni.showLoading({
title: '会话创建中...'
});
const {data: res} = await uni.$http.get("/api/friend/find/"+this.product.customerService);
if(res.data){
//
var data = res.data;
nickName=data.nickName?data.nickName:"客服";
headImage=data.headImage?data.headImage:'/static/image/kfr.png';
this.gotoSeviceTZ(nickName,headImage);
}
else{
this.gotoSeviceTZ(nickName,headImage);
}
},
async gotoSeviceTZ(nickName,headImage){
console.log(this.product.instructor,this.product.customerService)
// 线 // 线
//
//
var timestamp = new Date().getTime();
var chatid="privatechat-" + this.userid +"-"+ this.product.customerService;
var info={
chatId: chatid,
chatName: nickName,
chatAvatar: headImage,
chatTime: timestamp,
userid: this.userid,
friendId: this.product.customerService, // userid
minId: "", // id
sort:"privatechat", // privatechat groupchat
from:"yh", // yh message
sendinfo:{
type:1,// 1 2 3
id:this.product.id,
name:this.product.name,
pic:this.product.pic,
price:this.product.price,
unit: this.product.unit,
brandName:this.product.brandName,
isCourse:this.product.isCourse
}
}
var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/service` url: `/pages/chat/chat?data=${data}`
}); });
}, },
gotoShop(){ gotoShop(){
@ -815,7 +873,7 @@
} }
.price{ .price{
line-height: 1; line-height: 1;
color: #89965f; color: #00a89b;
.txt{ .txt{
font-size: 30rpx; font-size: 30rpx;
} }
@ -865,7 +923,7 @@
} }
.spcli.cur{ .spcli.cur{
background: #dceef7; background: #dceef7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
.spclilong{ .spclilong{
@ -885,7 +943,7 @@
} }
.spclilong.cur{ .spclilong.cur{
background: #dceef7; background: #dceef7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
font-weight: 600; font-weight: 600;
} }
} }
@ -912,7 +970,7 @@
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -930,7 +988,7 @@
width: 690rpx; width: 690rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #55690e; background: #468a73;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
margin: 0 30rpx 30rpx; margin: 0 30rpx 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
@ -1035,7 +1093,7 @@
width: 220rpx; width: 220rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1052,7 +1110,7 @@
width: 210rpx; width: 210rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #55690e; background: #468a73;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1096,12 +1154,12 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 600; font-weight: 600;
color: #89965f; color: #00a89b;
} }
.cur .pline{ .cur .pline{
width: 40rpx; width: 40rpx;
height: 6rpx; height: 6rpx;
background: #89965f; background: #00a89b;
border-radius: 4rpx 4rpx 4rpx 4rpx; border-radius: 4rpx 4rpx 4rpx 4rpx;
opacity: 1; opacity: 1;
} }
@ -1219,7 +1277,7 @@
line-height: 40rpx; line-height: 40rpx;
color: #fff; color: #fff;
font-size: 22rpx; font-size: 22rpx;
background: #89965f; background: #00a89b;
border-radius: 20rpx; border-radius: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
@ -1239,7 +1297,7 @@
align-items: baseline; align-items: baseline;
.txtt{ .txtt{
font-size: 24rpx; font-size: 24rpx;
color: #89965f; color: #00a89b;
margin-right: 10rpx; margin-right: 10rpx;
} }
.txt{ .txt{
@ -1250,7 +1308,7 @@
.tint{ .tint{
font-size: 42rpx; font-size: 42rpx;
font-weight: 600; font-weight: 600;
color: #89965f; color: #00a89b;
} }
.pretxt{ .pretxt{
color: #959694; color: #959694;
@ -1265,7 +1323,7 @@
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.txt{ .txt{
color: #89965f; color: #00a89b;
font-size: 24rpx; font-size: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
@ -1369,7 +1427,7 @@
} }
.price{ .price{
line-height: 1; line-height: 1;
color: #89965f; color: #00a89b;
.txt{ .txt{
font-size: 30rpx; font-size: 30rpx;
} }

@ -2,7 +2,7 @@
<view class="page"> <view class="page">
<view class="fixhead" :style="{ marginTop: geStatusBarHeight() + 'px'}"> <view class="fixhead" :style="{ marginTop: geStatusBarHeight() + 'px'}">
<selShop :showName="false" :showQR="true" :shop="shop" @changeArea="changeArea"></selShop> <selShop :showName="false" :showQR="true" :shopid="shopid" :shop="shop" @changeArea="changeArea"></selShop>
<view @tap="gotoSearch" > <view @tap="gotoSearch" >
<uni-search-bar v-model="searchValue" placeholder="请输入关键字" bg-color="#FFFFFF" :readonly="true"></uni-search-bar> <uni-search-bar v-model="searchValue" placeholder="请输入关键字" bg-color="#FFFFFF" :readonly="true"></uni-search-bar>
</view> </view>
@ -24,8 +24,8 @@
<!-- 商品列表 --> <!-- 商品列表 -->
<view v-else class="f-list"> <view v-else class="f-list">
<!-- 广告 --> <!-- 广告 -->
<view class="adcon" v-if="adcoursesList.length>0||adgoodsList.length>0"> <view class="adcon" v-if="(adcoursesList&&adcoursesList.length>0)||(adgoodsList&&adgoodsList.length>0)">
<view class="adrow" v-if="adgoodsList.length>0" style="background: #f8f6f9;"> <view class="adrow" v-if="(adgoodsList&&adgoodsList.length>0)" style="background: #f8f6f9;">
<view class="adhead"> <view class="adhead">
<view class="txt">达人好物</view> <view class="txt">达人好物</view>
<view class="tip">买贵双倍赔</view> <view class="tip">买贵双倍赔</view>
@ -37,7 +37,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="adrow" v-if="adcoursesList.length>0" style="margin-left: 2%; background: #f5f9fa;"> <view class="adrow" v-if="adcoursesList&&adcoursesList.length>0" style="margin-left: 2%; background: #f5f9fa;">
<view class="adhead"> <view class="adhead">
<view class="txt">精品课程</view> <view class="txt">精品课程</view>
<view class="tip"></view> <view class="tip"></view>
@ -52,7 +52,7 @@
</view> </view>
<view v-for="(tabItem,ii) in list" :key="tabItem.id"> <view v-for="(tabItem,ii) in list" :key="tabItem.id">
<view v-show="ii==tabCurrentIndex"> <view v-show="ii==tabCurrentIndex">
<view class="guess-section" v-if="tabItem.goodsList.length>0"> <view class="guess-section" v-if="tabItem.goodsList&&tabItem.goodsList.length>0">
<view <view
v-for="(item, index) in tabItem.goodsList" :key="index" v-for="(item, index) in tabItem.goodsList" :key="index"
class="guess-item" class="guess-item"
@ -71,7 +71,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="tabItem.goodsList.length<1&&tabItem.loadStatus=='noMore'" class="skcon"> <view v-if="tabItem.goodsList&&tabItem.goodsList.length<1&&tabItem.loadStatus=='noMore'" class="skcon">
<image class="skimg" src="@/static/image/nodata.png" mode="aspectFill" ></image> <image class="skimg" src="@/static/image/nodata.png" mode="aspectFill" ></image>
</view> </view>
<uni-load-more v-if="tabItem.loadStatus!=='noMore'" iconType="circle" :status="tabItem.loadStatus" :content-text="contentText" /> <uni-load-more v-if="tabItem.loadStatus!=='noMore'" iconType="circle" :status="tabItem.loadStatus" :content-text="contentText" />
@ -118,7 +118,8 @@
ifshow:true, // ifshow:true, //
searchValue:"", searchValue:"",
ifsear:false, ifsear:false,
shop:myCache('myshop')?myCache('myshop'):'', shopid: myCache('myshopid')?myCache('myshopid'):null,
shop: myCache('myshop'),
scrollLeft: 0, scrollLeft: 0,
tabCurrentIndex:0, tabCurrentIndex:0,
list:myCache("spgglist"), list:myCache("spgglist"),
@ -299,6 +300,7 @@
img:product.pic?product.pic:'',// img:product.pic?product.pic:'',//
img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', // img1:product.pic?getRemoteFile(product.pic):'../../static/image/imgicon.png', //
state:product.showStatus, // 1 2 3 4 5稿 state:product.showStatus, // 1 2 3 4 5稿
storeId:product.storeId,
customerService:product.scustomerService,// id customerService:product.scustomerService,// id
quantity:1, // quantity:1, //
ifspec: res1.skus&&res1.skus.length>0?'1':'0', ifspec: res1.skus&&res1.skus.length>0?'1':'0',
@ -346,7 +348,7 @@
spData:this.product.spData, spData:this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
const {data: res1} = await uni.$http.post('/api/cart/add',param); const {data: res1} = await uni.$http.post('/api/cart/add',param);
@ -548,7 +550,7 @@
if (!keyword) return text; if (!keyword) return text;
// 使<span> // 使<span>
const regex = new RegExp(keyword, 'gi'); const regex = new RegExp(keyword, 'gi');
return text.replace(regex, `<span style="color:#89965f">${keyword}</span>`); return text.replace(regex, `<span style="color:#00a89b">${keyword}</span>`);
}, },
getPhoneNumber(e){ getPhoneNumber(e){
if(e.userid){ if(e.userid){
@ -643,6 +645,7 @@
res.content.forEach((cell,idx)=>{ res.content.forEach((cell,idx)=>{
var celnew={ var celnew={
id:cell.id, id:cell.id,
isCourse:cell.isCourse,
name:cell.name, name:cell.name,
type:cell.isCourse=='1'?'2':'1', type:cell.isCourse=='1'?'2':'1',
img: cell.pic, img: cell.pic,
@ -703,6 +706,7 @@
}) })
}, },
navToList(item){ navToList(item){
console.log("item",item)
if(item.isCourse==1){ if(item.isCourse==1){
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/cdetail?id=${item.id}` url: `/pages/product/cdetail?id=${item.id}`
@ -756,7 +760,6 @@
height: 64rpx; height: 64rpx;
white-space: nowrap; white-space: nowrap;
margin: 0 20rpx 20rpx 20rpx; margin: 0 20rpx 20rpx 20rpx;
text-align: center;
.tab{ .tab{
padding: 0 16rpx; padding: 0 16rpx;
min-width: 180rpx; min-width: 180rpx;
@ -775,8 +778,8 @@
} }
.tab.cur{ .tab.cur{
color: #fff; color: #fff;
background-color: #89965f; background-color: #00a89b;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
} }
} }
.tcon{ .tcon{
@ -874,13 +877,14 @@
margin-right: 2%; margin-right: 2%;
} }
.adname{ .adname{
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.4);
position: absolute; position: absolute;
padding: 8rpx 8rpx; padding: 6rpx 6rpx;
color: #fff; color: #fff;
font-size: 26rpx; font-size: 24rpx;
bottom: 0; bottom: 0;
left: 0; left: 0;
border-radius: 4rpx;
} }
} }
} }

@ -661,7 +661,7 @@
}); });
}, },
adrchange(e){ adrchange(e){
console.log(e); // console.log(e);
if(e.detail.value||e.detail.value=='0'){ if(e.detail.value||e.detail.value=='0'){
var data= this.myaddresslist[parseInt(e.detail.value)]; var data= this.myaddresslist[parseInt(e.detail.value)];
// //
@ -918,7 +918,7 @@
width: 220rpx; width: 220rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;
@ -1170,8 +1170,8 @@
} }
::v-deep.uni-radio-input-checked{ ::v-deep.uni-radio-input-checked{
background-color: #89965f !important; background-color: #00a89b !important;
border-color: #89965f !important; border-color: #00a89b !important;
background-clip: content-box!important; background-clip: content-box!important;
box-sizing: border-box; box-sizing: border-box;
} }
@ -1231,7 +1231,7 @@
width: 100%; width: 100%;
} }
.addadrbtn{ .addadrbtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 20rpx 10%; margin: 20rpx 10%;
border-radius: 50rpx; border-radius: 50rpx;
height: 70rpx; height: 70rpx;
@ -1239,7 +1239,7 @@
font-size: 30rpx; font-size: 30rpx;
} }
.paybtn{ .paybtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 75rpx; height: 75rpx;
@ -1286,7 +1286,7 @@
height: 48rpx; height: 48rpx;
text-align: center; text-align: center;
line-height: 50rpx; line-height: 50rpx;
background: #89965f; background: #00a89b;
border-radius: 24rpx; border-radius: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
@ -1323,7 +1323,7 @@
text-align: center; text-align: center;
.btn{ .btn{
padding: 0 12rpx; padding: 0 12rpx;
background-color: #89965f ; background-color: #00a89b ;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 26rpx; font-size: 26rpx;
color: #fff; color: #fff;

File diff suppressed because it is too large Load Diff

@ -4,13 +4,13 @@
<uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据"> <uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据">
<view class="table_head"> <view class="table_head">
<uni-tr> <uni-tr>
<uni-th width="60" align="center" class="leftfix"> <uni-th width="50" align="center" class="leftfix">
<view class="leftcell"> <view class="leftcell">
<view class="ctitle">日期</view> <view class="ctitle">日期</view>
<view class="ctitle">15日内</view> <view class="ctitle">15日内</view>
</view> </view>
</uni-th> </uni-th>
<uni-th width="120" align="center" v-for="(item, index) in columnTitles" :key="index"> <uni-th width="80" align="center" v-for="(item, index) in columnTitles" :key="index">
<view class="rightcell"> <view class="rightcell">
<view class="ctitle">{{item.day}}</view> <view class="ctitle">{{item.day}}</view>
<view class="ctitle">{{item.weekName}}</view> <view class="ctitle">{{item.weekName}}</view>
@ -21,21 +21,28 @@
</view> </view>
<view class="table_body"> <view class="table_body">
<uni-tr v-for="(item, index) in claTimeContainer" :key="index"> <uni-tr v-for="(item, index) in claTimeContainer" :key="index">
<uni-td width="60" align="center" class="leftfix"> <uni-td width="50" align="center" class="leftfix">
<view class="courfix"> <view class="courfix">
{{item.time}} {{item.time}}
</view> </view>
</uni-td> </uni-td>
<uni-td width="120" align="center" v-for="(cell, ii) in columnTitles" :key="ii"> <uni-td width="80" align="center" v-for="(cell, ii) in columnTitles" :key="ii">
<block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk"> <block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk">
<block v-for="(dd, mm) in cc" :key="mm"> <block v-for="(dd, mm) in cc" :key="mm">
<!-- dd.weekDay==cell.weekName && --> <!-- dd.weekDay==cell.weekName && -->
<!-- :style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}" -->
<view class="courheadtext" v-if="dd.claDate==cell.day" <view class="courheadtext" v-if="dd.claDate==cell.day"
:style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}" > :style="{
fontSize:(dd.fontSize?dd.fontSize+'px':'26rpx'),
color: (dd.fontColor?dd.fontColor:'#000'),
backgroundColor:( dd.claColor?dd.claColor:colorlist[index].color),
borderLeftColor: '#fef2ce'
}" >
<view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view> <view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view>
<view class="ctxt">{{dd.courseName}}</view> <view class="ctxt" style="font-weight: 600;">{{dd.courseName}}</view>
<view class="ctxt">{{dd.claName}}</view> <view class="ctxt">{{dd.claName}}</view>
<view class="ctxt">{{dd.staffName}}</view> <view class="ctxt" v-if="dd.staffName">{{dd.staffName}}</view>
<view class="ctxt" v-if="dd.roomName">{{dd.roomName}}</view>
</view> </view>
</block> </block>
</block> </block>
@ -701,13 +708,13 @@
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 10; z-index: 10;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
::v-deep .uni-table-tr .uni-table-td:first-child { ::v-deep .uni-table-tr .uni-table-td:first-child {
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 10; z-index: 10;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
.leftfix{ .leftfix{
position: sticky; position: sticky;
@ -731,36 +738,40 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 120rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #fffae0; background-color: #e4f9f7;
border-right: 1rpx solid #fff;
} }
.rightcell{ .rightcell{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 240rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #ffffff; background-color: #e4f9f7;
border-radius: 10rpx;
border-right: 1rpx solid #fff;
position: relative;
} }
.cnum{ .cnum{
position: absolute; position: absolute;
top:15rpx; bottom:30rpx;
right: 20rpx; right: 6rpx;
min-width: 28rpx; min-width: 28rpx;
padding: 0 2rpx; padding: 0 2rpx;
border-radius: 50% 50%; border-radius: 50% 50%;
background-color: #ff0000; background-color: #ff0000;
color: #FFF; color: #FFF;
font-size: 22rpx; font-size: 20rpx;
} }
.courhead{ .courhead{
border-radius: 8rpx; border-radius: 8rpx;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -769,17 +780,17 @@
top: 0; top: 0;
} }
.ctitle{ .ctitle{
font-size: 30rpx; font-size: 26rpx;
color:#000; color:#000;
} }
.courcell{ .courcell{
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
background-color: #ffffff; background-color: #ffffff;
} }
.chcell{ .chcell{
width: 240rpx; width: 200rpx;
} }
.courfix{ .courfix{
position: sticky; position: sticky;
@ -787,27 +798,30 @@
z-index: 19; z-index: 19;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100%;
height: 180rpx; height: 240rpx;
justify-content: center; justify-content:flex-start;
align-items: center; align-items: center;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
color:#000;
font-size: 28rpx;
padding-top: 10rpx;
} }
.courheadtext{ .courheadtext{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 240rpx; width: 100%;
height: 180rpx; height: 240rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 10rpx; border-radius: 10rpx;
border-radius: 10rpx; border-left-width: 6rpx;
border-left-width: 10rpx;
border-left: solid; border-left: solid;
} }
.ctxt{ .ctxt{
font-size: 28rpx; line-height: 30rpx;
line-height: 36rpx; padding-bottom: 4rpx;
margin-bottom: 6rpx;
} }
} }
.bbtn{ .bbtn{
@ -819,7 +833,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -597,7 +597,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -44,8 +44,8 @@
</view> </view>
<view class="submitcon"> <view class="submitcon">
<button type="primary" class="bbtn" @tap="goconsult()"></button> <button type="primary" class="bbtn" @click="goconsult()"></button>
<button type="primary" class="bbtn" @tap="gocourse()"></button> <button type="primary" class="bbtn" @click="gocourse()"></button>
</view> </view>
<!-- 是否登录 --> <!-- 是否登录 -->
@ -79,6 +79,7 @@
nickName:"", nickName:"",
html:``, html:``,
id:'', id:'',
appUserId:'',
intro:'', intro:'',
teacherName:'', teacherName:'',
sex:'', sex:'',
@ -164,9 +165,9 @@
}; };
try{ try{
const {data: res} = await uni.$http.post('/api/context/getOne',params); const {data: res} = await uni.$http.post('/api/context/getOne',params);
console.log(res.data);
if (res&&res.success) { if (res&&res.success) {
var data=res.data; var data=res.data;
this.appUserId=data.appUserId;
this.teacherName=data.userName; this.teacherName=data.userName;
this.sex=data.sex=='1'?'女':(data.sex=='2'?'男':'未知'); this.sex=data.sex=='1'?'女':(data.sex=='2'?'男':'未知');
this.html=getRemoteHtmlFile(data.context); this.html=getRemoteHtmlFile(data.context);
@ -178,7 +179,6 @@
ban_img:item ban_img:item
}) })
}) })
console.log(this.swiperList);
this.$forceUpdate(); this.$forceUpdate();
} }
else{ else{
@ -222,27 +222,29 @@
}, },
// //
async goconsult(){ async goconsult(){
// id // uni.showLoading({
uni.showLoading("会话创建中.."); // title: '...'
var params = { // });
friendId: this.id try{
}; //
try{ var chatid="privatechat-" + this.userid +"-"+ this.id;
const {data: res} = await uni.$http.get("/api/message/private/maxReadedId",params);
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
var info={ var info={
chatId: "teacher-" + this.userid +"-"+ this.id, chatId: "privatechat-" + this.userid +"-"+ this.id,
chatType: "teacher", chatType: "coach",
chatName: this.teacherName, chatName: this.teacherName,
chatAvatar: this.avatar, chatAvatar: this.avatar,
chatTime: timestamp, chatTime: timestamp,
minId: res.data, // id userid: this.userid,
friendId: this.id, // id friendId: this.appUserId, // userid
minId: "", // id
sort: "privatechat", // privatechat groupchat
from: "yh" // yh message
} }
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
uni.navigateTo({ uni.navigateTo({
url: `/pages/teacher/chat?data=${data}` url: `/pages/chat/chat?data=${data}`
}) });
} }
catch(e){ catch(e){
console.log(e); console.log(e);
@ -255,6 +257,31 @@
}); });
} }
}, },
groupListChange(chatlastinfo){
//
var chatlist = myCache("chatlist");
if(chatlist&&chatlist.length>0){
var ifexist=0;
chatlist.forEach((cell,i)=>{
if(cell.id==chatlastinfo.id){
ifexist++;
chatlist[i]=chatlastinfo;
}
});
if(ifexist==0){
//
chatlist.unshift(chatlastinfo);
}
//
myCache("chatlist",chatlist);
}
else{
chatlist=[];
chatlist.push(chatlastinfo);
myCache("chatlist",chatlist);
}
},
gocourse(){ gocourse(){
// //
uni.navigateTo({ uni.navigateTo({
@ -293,7 +320,7 @@
width: 100%; width: 100%;
align-items: center; align-items: center;
.leftarr{ .leftarr{
background-color: #b9af9d; background-color: #00a89b;
padding: 10rpx; padding: 10rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
@ -376,7 +403,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -275,18 +275,6 @@
url: `/pages/book/bookinfo?id=${id}` url: `/pages/book/bookinfo?id=${id}`
}); });
}, },
//
gototeacher(item){
var data={
id:item.id,
name:"教练A"
}
//
var data=encodeURIComponent(JSON.stringify(data));
uni.navigateTo({
url: `/pages/teacher/chat?data=${data}`
})
},
// //
gotoevaluate(info){ gotoevaluate(info){
var data=encodeURIComponent(JSON.stringify(info)); var data=encodeURIComponent(JSON.stringify(info));
@ -538,14 +526,14 @@
height: 75rpx; height: 75rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -601,6 +589,7 @@
color: #333; color: #333;
padding: 10rpx 2rpx 15rpx; padding: 10rpx 2rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

@ -36,7 +36,7 @@
<view class="otop"> <view class="otop">
<view class="hleft"> <view class="hleft">
{{item.courseName}} {{item.courseName||'-'}}
</view> </view>
<view class="hright"> <view class="hright">
{{item.startTime+'-'+item.endTime}} {{item.startTime+'-'+item.endTime}}
@ -49,9 +49,10 @@
</view> </view>
<view class="osname"> <view class="osname">
<view class="oscell"> <view class="oscell">
<view v-if="item.claName=='团课'" class="txtbg">{{item.claName}}</view> <!-- <view v-if="item.claName=='团课'" class="txtbg">{{item.claName}}</view>
<view v-else class="txtbg1">{{item.claName}}</view> <view v-else class="txtbg1">{{item.claName}}</view> -->
<uni-rate :size="20" :readonly="true" :value="item.star" :max="item.star"/> <view v-if="item.claName" class="txtbg1">{{item.claName}}</view>
<uni-rate :size="15" :readonly="true" :value="item.star?item.star:5" :max="5"/>
</view> </view>
<view class="oscell" v-if="item.storeName"> <view class="oscell" v-if="item.storeName">
<uni-icons type="paperclip" size="18" color="#00A99A"></uni-icons> <uni-icons type="paperclip" size="18" color="#00A99A"></uni-icons>
@ -101,13 +102,13 @@
<uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据"> <uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据">
<view class="table_head"> <view class="table_head">
<uni-tr> <uni-tr>
<uni-th width="60" align="center" class="leftfix"> <uni-th width="50" align="center" class="leftfix">
<view class="leftcell"> <view class="leftcell">
<view class="ctitle">日期</view> <view class="ctitle">日期</view>
<view class="ctitle">15日内</view> <view class="ctitle">15日内</view>
</view> </view>
</uni-th> </uni-th>
<uni-th width="120" align="center" v-for="(item, index) in columnTitles" :key="index"> <uni-th width="80" align="center" v-for="(item, index) in columnTitles" :key="index">
<view class="rightcell"> <view class="rightcell">
<view class="ctitle">{{item.day}}</view> <view class="ctitle">{{item.day}}</view>
<view class="ctitle">{{item.weekName}}</view> <view class="ctitle">{{item.weekName}}</view>
@ -118,22 +119,30 @@
</view> </view>
<view class="table_body"> <view class="table_body">
<uni-tr v-for="(item, index) in claTimeContainer" :key="index"> <uni-tr v-for="(item, index) in claTimeContainer" :key="index">
<uni-td width="60" align="center" class="leftfix"> <uni-td width="50" align="center" class="leftfix">
<view class="courfix"> <view class="courfix">
{{item.time}} {{item.time}}
</view> </view>
</uni-td> </uni-td>
<uni-td width="120" align="center" v-for="(cell, ii) in columnTitles" :key="ii"> <uni-td width="80" align="center" v-for="(cell, ii) in columnTitles" :key="ii">
<block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk"> <block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk">
<block v-for="(dd, mm) in cc" :key="mm"> <block v-for="(dd, mm) in cc" :key="mm">
<!-- :style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}" -->
<view class="courheadtext" v-if="dd.claDate==cell.day" <view class="courheadtext" v-if="dd.claDate==cell.day"
:style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}" > :style="{
fontSize:(dd.fontSize?dd.fontSize+'px':'26rpx'),
color: (dd.fontColor?dd.fontColor:'#000'),
backgroundColor: ( dd.claColor?dd.claColor:colorlist[index].color),
borderLeftColor: '#fef2ce'
}">
<!-- (dd.fontColor?dd.fontColor:'#000') -->
<view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view> <view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view>
<view class="ctxt">{{dd.courseName}}</view> <view class="ctxt" style="font-weight: 600;">{{dd.courseName}}</view>
<view class="ctxt">{{dd.claName}}</view> <view class="ctxt">{{dd.claName}}</view>
<view class="ctxt">{{dd.staffName}}</view> <view class="ctxt" v-if="dd.staffName">{{dd.staffName}}</view>
<button v-if="dd.claTimeStatus=='1'" type="primary" class="orderbtn" @click="gotoorder(dd)"></button> <view class="ctxt" v-if="dd.roomName">{{dd.roomName}}</view>
<view v-else class="noorderbtn">预约</view> <button v-if="dd.claTimeStatus=='1'" type="primary" class="orderbtn" @click="gotoorder(dd)"></button>
<view v-else class="noorderbtn">不可预约</view>
</view> </view>
</block> </block>
</block> </block>
@ -142,7 +151,6 @@
</view> </view>
</uni-table> </uni-table>
</view> </view>
@ -696,11 +704,11 @@
uni.showLoading(); uni.showLoading();
this.loading=true; this.loading=true;
try{ try{
const {data: res1} = await uni.$http.get('/api/course/getCourseList'); const {data: res} = await uni.$http.get('/api/course/getCourseList');
console.log(res1); console.log(res);
this.loading=false; this.loading=false;
if (res1.success) { if (res.success) {
var data = res1.data; var data = res.data;
this.columnTitles=data.columnTitles?data.columnTitles:[]; this.columnTitles=data.columnTitles?data.columnTitles:[];
this.claTimeContainer=data.claTimeContainer?data.claTimeContainer:[]; this.claTimeContainer=data.claTimeContainer?data.claTimeContainer:[];
this.list=[]; this.list=[];
@ -714,9 +722,9 @@
week:item.weekName, week:item.weekName,
slist:[] slist:[]
} }
this.list.push(lcell) this.list.push(lcell);
}) this.$forceUpdate();
this.$forceUpdate(); });
this.getOrderList(); this.getOrderList();
} }
else{ else{
@ -762,10 +770,10 @@
date:this.list[this.tabCurrentIndex].redate date:this.list[this.tabCurrentIndex].redate
} }
const {data: res} = await uni.$http.post('/api/course/getCourseListByDate', para); const {data: res} = await uni.$http.post('/api/course/getCourseListByDate', para);
if(res&&res.length>0){ if(res&&res.data&&res.data.length>0){
this.list[this.tabCurrentIndex].loadStatus="noMore"; this.list[this.tabCurrentIndex].loadStatus="noMore";
this.$forceUpdate(); this.$forceUpdate();
this.list[this.tabCurrentIndex].slist=res; this.list[this.tabCurrentIndex].slist=res.data;
this.$forceUpdate(); this.$forceUpdate();
} }
else{ else{
@ -916,7 +924,7 @@
} }
.tabtip{ .tabtip{
position: absolute; position: absolute;
top: -6rpx; top: 0;
left: 10rpx; left: 10rpx;
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -1057,6 +1065,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
.osimg{ .osimg{
width: 160rpx; width: 160rpx;
height: 260rpx; height: 260rpx;
@ -1065,13 +1074,14 @@
.osname{ .osname{
display: flex; display: flex;
flex: 1; flex: 1;
display: flex; width: 100%;
flex-direction: column; flex-direction: column;
margin-left: 26rpx; margin-left: 20rpx;
.oscell{ .oscell{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin-bottom: 10rpx; margin-bottom: 10rpx;
align-items: center;
} }
.txtbg{ .txtbg{
padding: 2rpx 15rpx; padding: 2rpx 15rpx;
@ -1226,10 +1236,10 @@
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 19; z-index: 19;
height: calc(100vh - 240rpx); // height: calc(100vh - 240rpx);
/* #ifdef H5 */ // /* #ifdef H5 */
height: calc(100vh - 240rpx - var(--window-top)); // height: calc(100vh - 240rpx - var(--window-top));
/* #endif */ // /* #endif */
background: #f8f8f8; background: #f8f8f8;
} }
::v-deep .uni-table-tr{ ::v-deep .uni-table-tr{
@ -1246,13 +1256,13 @@
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 10; z-index: 10;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
::v-deep .uni-table-tr .uni-table-td:first-child { ::v-deep .uni-table-tr .uni-table-td:first-child {
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 99; z-index: 99;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
.leftfix{ .leftfix{
position: sticky; position: sticky;
@ -1262,7 +1272,7 @@
} }
.courcon{ .courcon{
width: 100%; width: 100%;
height: calc(100vh); height: calc(100vh - 100rpx);
/* #ifdef H5 */ /* #ifdef H5 */
height: calc(100vh - 100rpx - var(--window-top)); height: calc(100vh - 100rpx - var(--window-top));
/* #endif */ /* #endif */
@ -1276,37 +1286,40 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 120rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #fffae0; background-color: #e4f9f7;
border-right: 1rpx solid #fff;
} }
.rightcell{ .rightcell{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 240rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #ffffff; background-color: #e4f9f7;
border-radius: 10rpx;
border-right: 1rpx solid #fff;
position: relative; position: relative;
} }
.cnum{ .cnum{
position: absolute; position: absolute;
top:15rpx; bottom:30rpx;
right: 20rpx; right: 6rpx;
min-width: 28rpx; min-width: 28rpx;
padding: 0 2rpx; padding: 0 2rpx;
border-radius: 50% 50%; border-radius: 50% 50%;
background-color: #ff0000; background-color: #ff0000;
color: #FFF; color: #FFF;
font-size: 22rpx; font-size: 20rpx;
} }
.courhead{ .courhead{
border-radius: 8rpx; border-radius: 8rpx;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -1315,11 +1328,11 @@
top: 0; top: 0;
} }
.ctitle{ .ctitle{
font-size: 30rpx; font-size: 26rpx;
color:#000; color:#000;
} }
.courcell{ .courcell{
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
background-color: #ffffff; background-color: #ffffff;
@ -1333,52 +1346,59 @@
z-index: 19; z-index: 19;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100%;
height: 240rpx; height: 280rpx;
background-color: #FFFAF2; background-color: #F2F2F2;
justify-content: center; justify-content: flex-start;
align-items: center; align-items: center;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
color:#000;
font-size: 28rpx;
padding-top: 10rpx;
} }
.courheadtext{ .courheadtext{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 240rpx; width: 100%;
height: 240rpx; height: 280rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 10rpx; border-radius: 10rpx;
border-radius: 10rpx; border-left-width: 6rpx;
border-left-width: 10rpx;
border-left: solid; border-left: solid;
} }
.ctxt{ .ctxt{
font-size: 28rpx; line-height: 30rpx;
line-height: 36rpx; padding-bottom: 4rpx;
margin-bottom: 6rpx;
} }
.orderbtn{ .orderbtn{
background-color: #00A99A !important; background-color: #ddd !important;
border-radius: 40rpx; border-radius: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 38rpx; line-height: 38rpx;
padding: 0 20rpx; padding: 0 16rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #00A99A; border:1rpx solid #ddd;
margin-top: 6rpx; margin-top: 6rpx;
color:#000;
} }
.orderbtn::after{ .orderbtn::after{
border:0 !important; border:0 !important;
} }
.noorderbtn{ .noorderbtn{
background-color: #c8c8c8 !important; background-color: #eee !important;
border-radius: 40rpx; border-radius: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 38rpx; line-height: 38rpx;
padding: 0 20rpx; padding: 0 16rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #c8c8c8; border:1rpx solid #eee;
margin-top: 6rpx; margin-top: 6rpx;
color:#666; color:#888;
}
.noorderbtn::after{
border:0 !important;
} }
} }
.bbtn{ .bbtn{

@ -55,7 +55,7 @@
<uni-rate :size="20" :readonly="true" :value="item.star" :max="item.star"/> <uni-rate :size="20" :readonly="true" :value="item.star" :max="item.star"/>
</view> </view>
<view class="oscell" v-if="item.tip"> <view class="oscell" v-if="item.tip">
<uni-icons type="paperclip" size="18" color="#89965f"></uni-icons> <uni-icons type="paperclip" size="18" color="#00a89b"></uni-icons>
<view class="ntip">{{item.tip}}</view> <view class="ntip">{{item.tip}}</view>
</view> </view>
<view class="oscell"> <view class="oscell">
@ -64,11 +64,11 @@
<view class="txt">{{item.teacherposition }}</view> <view class="txt">{{item.teacherposition }}</view>
</view> </view>
<view class="oscell"> <view class="oscell">
<uni-icons type="map-pin-ellipse" size="18" color="#89965f"></uni-icons> <uni-icons type="map-pin-ellipse" size="18" color="#00a89b"></uni-icons>
<view class="ntxt">{{item.room}}</view> <view class="ntxt">{{item.room}}</view>
</view> </view>
<view class="oscell"> <view class="oscell">
<uni-icons type="checkbox" size="18" color="#89965f"></uni-icons> <uni-icons type="checkbox" size="18" color="#00a89b"></uni-icons>
<view class="ntxt">已预约{{item.order}}/{{item.limit}}</view> <view class="ntxt">已预约{{item.order}}/{{item.limit}}</view>
</view> </view>
<view class="oscell"> <view class="oscell">
@ -1772,13 +1772,13 @@
height: 90rpx; height: 90rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 36rpx; font-size: 36rpx;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -1812,8 +1812,8 @@
} }
} }
.tabcell.cur{ .tabcell.cur{
background-color: #f3f4ee; background-color: #e4f9f7;
border: 1rpx solid #89965f; border: 1rpx solid #00a89b;
border-radius: 10rpx; border-radius: 10rpx;
} }
@ -1834,7 +1834,7 @@
background-position: center; background-position: center;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
color: #89965f; color: #00a89b;
overflow: hidden; overflow: hidden;
} }
.scell{ .scell{
@ -1971,14 +1971,14 @@
border:0 !important; border:0 !important;
} }
.orderbtn{ .orderbtn{
background-color: #89965f !important; background-color: #00a89b !important;
margin-left: 20rpx; margin-left: 20rpx;
border-radius: 40rpx; border-radius: 40rpx;
height: 46rpx; height: 46rpx;
line-height: 44rpx; line-height: 44rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.orderbtn::after{ .orderbtn::after{
@ -2181,13 +2181,13 @@
line-height: 36rpx; line-height: 36rpx;
} }
.orderbtn{ .orderbtn{
background-color: #89965f !important; background-color: #00a89b !important;
border-radius: 40rpx; border-radius: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 38rpx; line-height: 38rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 24rpx; font-size: 24rpx;
border:1rpx solid #89965f; border:1rpx solid #00a89b;
margin-top: 6rpx; margin-top: 6rpx;
} }
.orderbtn::after{ .orderbtn::after{
@ -2214,7 +2214,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -405,14 +405,14 @@
height: 75rpx; height: 75rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -468,6 +468,7 @@
color: #333; color: #333;
padding: 10rpx 2rpx 15rpx; padding: 10rpx 2rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

@ -283,18 +283,6 @@
this.tabCurrentIndex = current; this.tabCurrentIndex = current;
this.loadData(); this.loadData();
}, },
//
gototeacher(item){
var data={
id:item.id,
name:"教练A"
}
//
var data=encodeURIComponent(JSON.stringify(data));
uni.navigateTo({
url: `/pages/teacher/chat?data=${data}`
})
},
reset(){ reset(){
// //
this.list.forEach((cell,idx)=>{ this.list.forEach((cell,idx)=>{
@ -385,14 +373,14 @@
height: 75rpx; height: 75rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -448,6 +436,7 @@
color: #333; color: #333;
padding: 10rpx 10rpx 15rpx; padding: 10rpx 10rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

@ -272,6 +272,7 @@
img:product.pic?product.pic:'',// img:product.pic?product.pic:'',//
img1:product.pic?product.pic:'../../static/image/imgicon.png', // img1:product.pic?product.pic:'../../static/image/imgicon.png', //
state:product.showStatus, // 1 2 3 4 5稿 state:product.showStatus, // 1 2 3 4 5稿
storeId:product.storeId,
customerService:product.scustomerService,// id customerService:product.scustomerService,// id
quantity:1, // quantity:1, //
ifspec: res1.skus&&res1.skus.length>0?'1':'0', ifspec: res1.skus&&res1.skus.length>0?'1':'0',
@ -319,7 +320,7 @@
spData:this.product.spData, spData:this.product.spData,
skuId:this.product.skuId, skuId:this.product.skuId,
quantity:this.product.quantity, quantity:this.product.quantity,
storeId:myCache('myshopid')?myCache('myshopid'):'', storeId:this.product.storeId,
isCourse:this.product.isCourse, isCourse:this.product.isCourse,
}; };
const {data: res1} = await uni.$http.post('/api/cart/add',param); const {data: res1} = await uni.$http.post('/api/cart/add',param);
@ -427,7 +428,7 @@
if (!keyword) return text; if (!keyword) return text;
// 使<span> // 使<span>
const regex = new RegExp(keyword, 'gi'); const regex = new RegExp(keyword, 'gi');
return text.replace(regex, `<span style="color:#89965f">${keyword}</span>`); return text.replace(regex, `<span style="color:#00a89b">${keyword}</span>`);
}, },
input(res) { input(res) {
if(!this.ifsear){ if(!this.ifsear){

@ -4,13 +4,13 @@
<uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据"> <uni-table class="courcon" ref="table" :loading="loading" emptyText="暂无更多数据">
<view class="table_head"> <view class="table_head">
<uni-tr> <uni-tr>
<uni-th width="60" align="center" class="leftfix"> <uni-th width="50" align="center" class="leftfix">
<view class="leftcell"> <view class="leftcell">
<view class="ctitle">日期</view> <view class="ctitle">日期</view>
<view class="ctitle">15日内</view> <view class="ctitle">15日内</view>
</view> </view>
</uni-th> </uni-th>
<uni-th width="120" align="center" v-for="(item, index) in columnTitles" :key="index"> <uni-th width="80" align="center" v-for="(item, index) in columnTitles" :key="index">
<view class="rightcell"> <view class="rightcell">
<view class="ctitle">{{item.day?(item.day).slice(-5):''}}</view> <view class="ctitle">{{item.day?(item.day).slice(-5):''}}</view>
<view class="ctitle">{{item.weekName}}</view> <view class="ctitle">{{item.weekName}}</view>
@ -21,12 +21,12 @@
</view> </view>
<view class="table_body"> <view class="table_body">
<uni-tr v-for="(item, index) in claTimeContainer" :key="index"> <uni-tr v-for="(item, index) in claTimeContainer" :key="index">
<uni-td width="60" align="center" class="leftfix"> <uni-td width="50" align="center" class="leftfix">
<view class="courfix"> <view class="courfix">
{{item.time}} {{item.time}}
</view> </view>
</uni-td> </uni-td>
<uni-td width="120" align="center" v-for="(cell, ii) in columnTitles" :key="ii"> <uni-td width="80" align="center" v-for="(cell, ii) in columnTitles" :key="ii">
<block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk"> <block v-for="(cc, kk) in item.claTimeWeekDayMap" :key="kk">
<block v-for="(dd, mm) in cc" :key="mm" > <block v-for="(dd, mm) in cc" :key="mm" >
<!-- dd.weekDay==cell.weekName && --> <!-- dd.weekDay==cell.weekName && -->
@ -36,9 +36,10 @@
:style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}" :style="{color:colorlist[index].fcolor,backgroundColor:colorlist[index].color,borderLeftColor:colorlist[index].fcolor}"
> >
<view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view> <view class="ctxt">{{dd.startTime}}-{{dd.endTime}}</view>
<view class="ctxt">{{dd.courseName}}</view> <view class="ctxt" style="font-weight: 600;">{{dd.courseName}}</view>
<view class="ctxt">{{dd.claName}}</view> <view class="ctxt">{{dd.claName}}</view>
<view class="ctxt">{{dd.staffName}}</view> <view class="ctxt" v-if="dd.staffName">{{dd.staffName}}</view>
<view class="ctxt" v-if="dd.roomName">{{dd.roomName}}</view>
</view> </view>
</block> </block>
</block> </block>
@ -687,13 +688,13 @@
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 10; z-index: 10;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
::v-deep .uni-table-tr .uni-table-td:first-child { ::v-deep .uni-table-tr .uni-table-td:first-child {
position: sticky; position: sticky;
left: 0; left: 0;
z-index: 10; z-index: 10;
background-color: #FFFAF2; background-color: #F2F2F2;
} }
.leftfix{ .leftfix{
position: sticky; position: sticky;
@ -717,36 +718,40 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 120rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #fffae0; background-color: #e4f9f7;
border-right: 1rpx solid #fff;
} }
.rightcell{ .rightcell{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 240rpx; width: 100%;
height: 120rpx; height: 120rpx;
background-color: #ffffff; background-color: #e4f9f7;
border-radius: 10rpx;
border-right: 1rpx solid #fff;
position: relative;
} }
.cnum{ .cnum{
position: absolute; position: absolute;
top:15rpx; bottom:30rpx;
right: 20rpx; right: 6rpx;
min-width: 28rpx; min-width: 28rpx;
padding: 0 2rpx; padding: 0 2rpx;
border-radius: 50% 50%; border-radius: 50% 50%;
background-color: #ff0000; background-color: #ff0000;
color: #FFF; color: #FFF;
font-size: 22rpx; font-size: 20rpx;
} }
.courhead{ .courhead{
border-radius: 8rpx; border-radius: 8rpx;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -755,34 +760,36 @@
top: 0; top: 0;
} }
.ctitle{ .ctitle{
font-size: 30rpx; font-size: 26rpx;
color:#000; color:#000;
} }
.courcell{ .courcell{
width: 120rpx; width: 100rpx;
height: 120rpx; height: 120rpx;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
background-color: #ffffff; background-color: #ffffff;
} }
.chcell{ .chcell{
width: 240rpx; width: 200rpx;
} }
.courfix{ .courfix{
position: sticky; position: sticky;
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 120rpx; width: 100%;
height: 180rpx; height: 240rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-bottom: 1rpx dotted #ccc; border-bottom: 1rpx dotted #ccc;
color: #000;
font-size: 28rpx;
} }
.courheadtext{ .courheadtext{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 240rpx; width: 100%;
height: 180rpx; height: 240rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 10rpx; border-radius: 10rpx;
@ -791,8 +798,9 @@
border-left: solid; border-left: solid;
} }
.ctxt{ .ctxt{
font-size: 28rpx; font-size: 24rpx;
line-height: 36rpx; line-height: 30rpx;
margin-bottom: 6rpx;
} }
} }

@ -602,7 +602,7 @@
width: 314rpx; width: 314rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -242,7 +242,7 @@
uni.showLoading({ uni.showLoading({
title: '数据加载中...' title: '数据加载中...'
}); });
const {data: res} = await uni.$http.post('/api/my/courseTimeDetail', {id:this.id}); const {data: res} = await uni.$http.post('/api/my/courseTimeDetail', {courseTimeId:this.id});
if(res&&res.data){ if(res&&res.data){
var data=res.data; var data=res.data;
// //
@ -381,6 +381,7 @@
color: #333; color: #333;
padding: 10rpx 10rpx 15rpx; padding: 10rpx 10rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

@ -33,13 +33,26 @@
课程{{item.courseName}} 课程{{item.courseName}}
</view> </view>
<view class="ptxt"> <view class="ptxt">
收费模式{{item.chargeType=='hour'?'课时':(item.chargeType=='date'?'时间':(item.chargeType=='cycle'?'周期':'其他'))}} 收费模式{{ item.chargeType?retStr(item.chargeType):'其他' }}
</view> </view>
</view> </view>
<view class="pcon"> <view class="pcon">
<view class="ptxt"> <view class="ptxt">
次数{{item.count}}
</view>
</view>
<view class="pcon">
<view class="ptxt">
时间{{item.days}}
</view>
</view>
<view class="pcon">
<view class="ptxt" style="width: 280rpx;">
收费{{item.receiptFee}} 收费{{item.receiptFee}}
</view> </view>
<view class="ptxt">
储值{{item.totalFee}}
</view>
</view> </view>
<view class="pcon"> <view class="pcon">
<view class="ptxt"> <view class="ptxt">
@ -89,26 +102,14 @@
contentrefresh: '加载中', contentrefresh: '加载中',
contentnomore: '' contentnomore: ''
}, },
goodsList: [ goodsList:[],
// { chargeTypes:[],
// id:1, loadStatus:'more'
// name:"",
// sex:"",
// age:"20",
// phone:"18900000001",
// type:"",
// date:"20250305-20250405",
// },
],
loadStatus:'more',
page: {
pageNum: 1,
pageSize: 10
}
}; };
}, },
onLoad(options) { onLoad(options) {
this.getList(); this.getList();
this.getDic();
}, },
onPullDownRefresh() { onPullDownRefresh() {
setTimeout(()=>{ setTimeout(()=>{
@ -232,6 +233,22 @@
this.$forceUpdate(); this.$forceUpdate();
} }
}, },
async getDic() {
const {data: res} = await uni.$http.get('/api/dict/data/list/dictType/charge_type');
if(res&&res.data){
this.chargeTypes=res.data;
this.$forceUpdate();
}
},
retStr(code){
var ret="";
this.chargeTypes.forEach(cell=>{
if(cell.dictValue==code){
ret=cell.dictLabel;
}
})
return ret;
},
searDo(){ searDo(){
this.loadStatus="more"; this.loadStatus="more";
this.loadData(); this.loadData();

@ -174,7 +174,7 @@ export default {
color: #FCFCFD; color: #FCFCFD;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -18,7 +18,7 @@
<view class="title"> <view class="title">
<image class="timg" src="../../static/image/tz.png"></image>开启通知 <image class="timg" src="../../static/image/tz.png"></image>开启通知
</view> </view>
<view style="color:#89965f">已开启</view> <view style="color:#00a89b">已开启</view>
<uni-icons type="right" size="18" color="#777777"></uni-icons> <uni-icons type="right" size="18" color="#777777"></uni-icons>
</view> --> </view> -->
<view class="cells" @tap="gotopwd()"> <view class="cells" @tap="gotopwd()">
@ -243,7 +243,7 @@
border-radius: 5rpx; border-radius: 5rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #89965f; color: #00a89b;
margin: 50rpx 20rpx 30rpx; margin: 50rpx 20rpx 30rpx;
} }
.listcell { .listcell {

@ -433,18 +433,6 @@
url: `/pages/book/bookinfo?id=${id}` url: `/pages/book/bookinfo?id=${id}`
}); });
}, },
//
gototeacher(item){
var data={
id:item.id,
name:"教练A"
}
//
var data=encodeURIComponent(JSON.stringify(data));
uni.navigateTo({
url: `/pages/teacher/chat?data=${data}`
})
},
iflogin(){ iflogin(){
this.openId = myCache('openId'); this.openId = myCache('openId');
var user = myCache('user'); var user = myCache('user');
@ -550,14 +538,14 @@
height: 75rpx; height: 75rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -613,6 +601,7 @@
color: #333; color: #333;
padding: 10rpx 10rpx 15rpx; padding: 10rpx 10rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

@ -58,84 +58,109 @@
<view v-if="favoritesnum>0" class="num">{{favoritesnum}}</view> <view v-if="favoritesnum>0" class="num">{{favoritesnum}}</view>
<view class="title">{{servers[5].name}}</view> <view class="title">{{servers[5].name}}</view>
</view> </view>
<!-- 设置 -->
<view class="product-item" @click="gotoServe(0)"> <view class="product-item" @click="gotoServe(0)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[0].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[0].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[0].name}}</view> <view class="title">{{servers[0].name}}</view>
</view> </view>
<!-- 收货地址 -->
<view class="product-item" @click="gotoServe(1)"> <view class="product-item" @click="gotoServe(1)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[1].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[1].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[1].name}}</view> <view class="title">{{servers[1].name}}</view>
</view> </view>
<!-- 我的课程 -->
<view class="product-item" @click="gotoServe(2)"> <view class="product-item" @click="gotoServe(2)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[2].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[2].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[2].name}}</view> <view class="title">{{servers[2].name}}</view>
</view> </view>
<!-- 我的预约 -->
<view class="product-item" @click="gotoServe(3)"> <view class="product-item" @click="gotoServe(3)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[3].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[3].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[3].name}}</view> <view class="title">{{servers[3].name}}</view>
</view> </view>
<!-- 预约学员 教练-->
<view v-if="ifview('104')" class="product-item" @click="gotoServe(12)">
<view class="image-wrapper">
<image class="imgicon" :src="servers[12].img" mode="aspectFill" lazy-load></image>
</view>
<view class="title">{{servers[12].name}}</view>
</view>
<!-- 预约学员 店长 -->
<view v-if="ifview('105')" class="product-item" @click="gotoServe(13)">
<view class="image-wrapper">
<image class="imgicon" :src="servers[13].img" mode="aspectFill" lazy-load></image>
</view>
<view class="title">{{servers[13].name}}</view>
</view>
<!-- 学员签到 教练/顾问 -->
<view v-if="ifview('103,104')" class="product-item" @click="gotoServe(14)">
<view class="image-wrapper">
<image class="imgicon" :src="servers[14].img" mode="aspectFill" lazy-load></image>
</view>
<view class="title">{{servers[14].name}}</view>
</view>
<!-- 我的客户 --> <!-- 我的客户 -->
<view v-if="ifview(103)" class="product-item" @click="gotoServe(4)"> <view v-if="ifview('103')" class="product-item" @click="gotoServe(4)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[4].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[4].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[4].name}}</view> <view class="title">{{servers[4].name}}</view>
</view> </view>
<!-- 提成统计 --> <!-- 提成统计 -->
<view v-if="ifview(103)" class="product-item" @click="gotoServe(6)"> <view v-if="ifview('103')" class="product-item" @click="gotoServe(6)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[6].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[6].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[6].name}}</view> <view class="title">{{servers[6].name}}</view>
</view> </view>
<!-- 我的排课 --> <!-- 我的排课 -->
<view v-if="ifview(104)" class="product-item" @click="gotoServe(7)"> <view v-if="ifview('104')" class="product-item" @click="gotoServe(7)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[7].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[7].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[7].name}}</view> <view class="title">{{servers[7].name}}</view>
</view> </view>
<!-- 课时统计 --> <!-- 课时统计 -->
<view v-if="ifview(104)" class="product-item" @click="gotoServe(8)"> <view v-if="ifview('104')" class="product-item" @click="gotoServe(8)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[8].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[8].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[8].name}}</view> <view class="title">{{servers[8].name}}</view>
</view> </view>
<!-- 销售信息 --> <!-- 销售信息 -->
<view v-if="ifview(105)" class="product-item" @click="gotoServe(9)"> <view v-if="ifview('105')" class="product-item" @click="gotoServe(9)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[9].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[9].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[9].name}}</view> <view class="title">{{servers[9].name}}</view>
</view> </view>
<!-- 场地费用 --> <!-- 场地费用 -->
<view v-if="ifview(105)" class="product-item" @click="gotoServe(10)"> <view v-if="ifview('105')" class="product-item" @click="gotoServe(10)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[10].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[10].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[10].name}}</view> <view class="title">{{servers[10].name}}</view>
</view> </view>
<!-- 教练费用 --> <!-- 教练费用 -->
<view v-if="ifview(105)" class="product-item" @click="gotoServe(11)"> <view v-if="ifview('105')" class="product-item" @click="gotoServe(11)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[11].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[11].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[11].name}}</view> <view class="title">{{servers[11].name}}</view>
</view> </view>
<view v-if="userid" class="product-item" @click="gotoServe(12)"> <view v-if="userid" class="product-item" @click="gotoServe(99)">
<view class="image-wrapper"> <view class="image-wrapper">
<image class="imgicon" :src="servers[12].img" mode="aspectFill" lazy-load></image> <image class="imgicon" :src="servers[15].img" mode="aspectFill" lazy-load></image>
</view> </view>
<view class="title">{{servers[12].name}}</view> <view class="title">{{servers[15].name}}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -260,6 +285,21 @@
}, },
{ {
key:12, key:12,
img:'../../static/image/yyjl.png',
name:'预约学员',//
},
{
key:13,
img:'../../static/image/yyjl.png',
name:'预约学员',//
},
{
key:14,
img:'../../static/image/qd.png',
name:'学员签到',// /
},
{
key:99,
img:'../../static/image/tc.png', img:'../../static/image/tc.png',
name:'退出登录', name:'退出登录',
}, },
@ -279,10 +319,10 @@
this.openId = myCache('openId'); this.openId = myCache('openId');
var user = myCache('userInfo'); var user = myCache('userInfo');
this.userid = user.userId? user.userId:''; this.userid = user.userId? user.userId:'';
// this.nickName= user.nickName? user.nickName:''; this.avatar = user.avatar?user.avatar:'../../static/image/logo.png';
this.nickName= user.nickName? user.nickName:'';
this.phone = user.phonenumber; this.phone = user.phonenumber;
// this.signature = user.signature; this.signature = user.signature;
// this.avatar = user.avatar?user.avatar:'../../static/image/logo.png';
this.roleId=user.roleId?user.roleId:[]; this.roleId=user.roleId?user.roleId:[];
} }
@ -320,14 +360,24 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
},500); },500);
}, },
// onTabItemTap(){
// console.log('socketonTabItemTap');
// // WebSocket
// uni.closeSocket();
// },
methods: { methods: {
ifview(value){ ifview(value){
// ID103 104 105 107
var str=false; var str=false;
var arrs= value.split(',');
this.roleId.forEach(item=>{ this.roleId.forEach(item=>{
if(item==value) arrs.forEach(cell=>{
{ if(item==cell)
str=true; {
} str=true;
return true;
}
});
}); });
return str; return str;
}, },
@ -454,6 +504,22 @@
}); });
} }
else if(ii==12){ else if(ii==12){
// -
uni.navigateTo({
url: `/pages/book/bookteacher`
});
}
else if(ii==13){
// -
uni.navigateTo({
url: `/pages/book/bookshop`
});
}
else if(ii==14){
//
this.scando();
}
else if(ii==99){
// 退 // 退
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
@ -486,10 +552,11 @@
myCache('phone',''); myCache('phone','');
myCache('openId',''); myCache('openId','');
myCache('userid',''); myCache('userid','');
// myCache('shop',''); // 退
// myCache('myshop',''); myCache('shop','');
// myCache('myshopid',''); myCache('myshop','');
// myCache('shoplist',''); myCache('myshopid','');
myCache('shoplist','');
// //
this.menus[0].num=0; this.menus[0].num=0;
@ -538,6 +605,44 @@
}); });
} }
}, },
//
scando(){
var _this=this;
//
//qrCode,barCode
// #ifdef APP-PLUS
uni.scanCode({
scanType: ['qrCode', 'barCode'],
success: function(res) {
console.log(res);
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
//
var rmbm=res.result;
console.log(rmbm);
if(rmbm){
//
uni.navigateTo({
url: `/pages/book/bookinfo?id=${rmbm}&type=qd`
});
}
else{
uni.showModal({
title: '提示',
content: '扫码异常,请正确扫码绑定推广员!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
if (ress.confirm) {
}
}
});
}
}
});
// #endif
},
async logoff(){ async logoff(){
uni.showLoading({ uni.showLoading({
title: '账号注销中...' title: '账号注销中...'
@ -597,7 +702,6 @@
} }
}, },
logindo(){ logindo(){
console.log(this.userid)
if(this.userid==""||this.userid=="0"){ if(this.userid==""||this.userid=="0"){
// this.$refs.loginId.open(); // this.$refs.loginId.open();
uni.navigateTo({ uni.navigateTo({
@ -667,7 +771,7 @@
height: 105rpx; height: 105rpx;
line-height: 100rpx; line-height: 100rpx;
align-items: center; align-items: center;
background-color: #89965f; background-color: #00a89b;
padding-left: 20rpx; padding-left: 20rpx;
.tx1{ .tx1{
font-size: 32rpx; font-size: 32rpx;
@ -732,7 +836,7 @@
border-radius: 30rpx; border-radius: 30rpx;
font-size: 24rpx; font-size: 24rpx;
color: #888; color: #888;
background: #f3f4ee; background: #e4f9f7;
} }
.scan{ .scan{
@ -905,7 +1009,7 @@
height: 32rpx; height: 32rpx;
line-height: 32rpx; line-height: 32rpx;
padding: 0 2rpx; padding: 0 2rpx;
border-radius: 50% 50%; border-radius: 32rpx;
background-color: #ff0000; background-color: #ff0000;
color: #FFF; color: #FFF;
font-size: 22rpx; font-size: 22rpx;

@ -370,7 +370,7 @@
width: 560rpx; width: 560rpx;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
background: #89965f; background: #00a89b;
box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4); box-shadow: 0rpx 12rpx 64rpx 2rpx rgba(137,150,95,0.4);
border-radius: 10rpx; border-radius: 10rpx;
opacity: 1; opacity: 1;

@ -307,18 +307,6 @@
this.tabCurrentIndex = current; this.tabCurrentIndex = current;
this.loadData(); this.loadData();
}, },
//
gototeacher(item){
var data={
id:item.id,
name:"教练A"
}
//
var data=encodeURIComponent(JSON.stringify(data));
uni.navigateTo({
url: `/pages/teacher/chat?data=${data}`
})
},
reset(){ reset(){
this.orderlists=[]; this.orderlists=[];
// //
@ -410,14 +398,14 @@
height: 75rpx; height: 75rpx;
} }
.cur .ptext{ .cur .ptext{
color: #89965f; color: #00a89b;
font-size: 33rpx; font-size: 33rpx;
font-weight: 600; font-weight: 600;
} }
.cur .pline{ .cur .pline{
width: 40%; width: 40%;
height: 9rpx; height: 9rpx;
background: #89965f; background: #00a89b;
border-radius: 6rpx; border-radius: 6rpx;
opacity: 1; opacity: 1;
margin-left: 30%; margin-left: 30%;
@ -473,6 +461,7 @@
color: #333; color: #333;
padding: 10rpx 2rpx 15rpx; padding: 10rpx 2rpx 15rpx;
text-align: center; text-align: center;
word-wrap: break-word;
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save