Commit 411b3c43 authored by youjie's avatar youjie

no message

parent fd75b311
......@@ -36,4 +36,97 @@ export function setStudentClassInAccount(data) {
method: 'post',
data
})
}
/**
* 获取预约课程
* @param {JSON参数} data
*/
export function RemovePlanAppointment(data) {
return request({
url: '/LeaveStudent/RemovePlanAppointment',
method: 'post',
data
})
}
/**
* 获取预约课程列表
* @param {JSON参数} data
*/
export function GetStuPlanAppointment(data) {
return request({
url: '/LeaveStudent/GetStuPlanAppointment',
method: 'post',
data
})
}
/**
* 获取可预约课程时间范围
* @param {JSON参数} data
*/
export function GetPlanTime(data) {
return request({
url: '/LeaveStudent/GetPlanTime',
method: 'post',
data
})
}
/**
* 提交预约课程
* @param {JSON参数} data
*/
export function SetPlanAppointment(data) {
return request({
url: '/LeaveStudent/SetPlanAppointment',
method: 'post',
data
})
}
/**
* 获取个人信息接口
* @param {JSON参数} data
*/
export function GetMyCenterInfo(data) {
return request({
url: '/AppletCenter/GetMyCenterInfo',
method: 'post',
data
})
}
// 获取课程信息
export function GetMyAppointPageList(data) {
return request({
url: '/AppletCenter/GetMyAppointPageList',
method: 'post',
data
})
}
/**
* 订单列表接口
* @param {JSON参数} data
*/
export function GetOrderPage(data) {
return request({
url: '/AppletIndex/GetOrderPage',
method: 'post',
data
})
}
/**
* 获取我的电子合同
* @param {JSON参数} data
*/
export function getContract(data) {
return request({
url: '/AppletIndex/GetContractList',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -121,6 +121,22 @@
}
}
]
},
{
"root": "pages/contract", //合同分包
"pages": [{
"path": "contract" //电子合同
}, {
"path": "orderList" //订单列表
}, {
"path": "contractDetail" //合同详情
}]
},
{
"root": "pages/MyChild", //我的小孩
"pages": [{
"path": "index" //电子合同
}]
}
],
// "tabBar": {
......
<style scoped>
.dataList-header{
font-size: 30rpx;
position: fixed;
left: 50rpx;
right: 50rpx;
top: 0;
background: #ffffff;
}
.dataList-header view{
margin-top: 20rpx;
width: 100%;
line-height: 88rpx;
background: #FCEEEF;
border-radius: 44rpx;
text-align: center;
color: #C91727;
}
.dataList-header text{
margin-left: 27rpx;
}
.dataList-content{
margin-top: 150rpx;
padding: 0 50rpx;
}
.title{
font-size: 34rpx;
font-weight: 800;
color: #111111;
}
.text{
margin-top: 20rpx;
margin-bottom: 40rpx;
font-size: 26rpx;
font-weight: 500;
color: #BEBEBE;
}
.dataList-box{
border-radius: 50rpx;overflow: hidden;
box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);
margin-bottom: 40rpx;
}
.dataList-form{
flex-grow: 1;
position: relative;
padding: 31rpx 40rpx 0 22rpx;
}
.van-swipe-cell__right {
position: absolute;
top: 0;
bottom: 0;
height: 100%;
right: -111rpx;
width:232px;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
</style>
<template>
<view class="dataList">
<view class="dataList-header">
<view>
<van-icon name="plus" />
<text>添加小孩信息</text>
</view>
</view>
<view class="dataList-content">
<view class="title">在读小孩列表</view>
<view class="text">左滑可删除小孩信息</view>
<view class="dataList-box">
<van-swipe-cell
id="swipe-cell"
:right-width="116"
async-close
:disabled="true"
@close="onClose">
<view class="dataList-form">
<view class="dataList-center flex_between_center">
<view>
<view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663903439000_469.png"
mode="aspectFill" style="width:100%;height:100%;">
</image>
<text>周启明</text>
</view>
<view>
<text>武侯校区</text>
<view>
<van-icon name="phone"></van-icon>
<text>18226665548</text>
</view>
</view>
</view>
<view>
<image :src="imgUrlG" style="width: 24rpx;height: 24rpx;"></image>
</view>
</view>
<view slot="right" class="van-swipe-cell__right">
<van-button square type="danger" custom-style="height:100%;">删除</van-button>
</view>
</view>
</van-swipe-cell>
</view>
<van-empty description="暂无数据" v-if="dataList.length === 0" />
<view v-if="dataList.length > 0">
<Loadmore :state="pageState" />
</view>
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
inject,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom";
import {
GetOrderPage
} from "../../api/erp";
export default {
components: {
bottom,
Loadmore,
},
setup(props, context) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
pageTitle: "我的小孩",
msg: {
pageIndex: 1,
pageSize: 10,
OrderType: 1
},
pageCount: 0,
dataList: [],
pageState: "more",
timer: null, //防抖
imgUrlG:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663930765000_891.png',
imgUrlR:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663930765000_218.png',
});
const methods = {
onClose(event) {
const { position, instance } = event.detail;
switch (position) {
case 'left':
case 'cell':
case 'right':
instance.close();
break;
}
},
jumpPage(url) {
uni.navigateTo({
url: url,
});
},
async getData() {
let res = await GetOrderPage(data.msg);
if (res) {
if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) {
data.dataList = res.Data.PageData;
} else {
data.dataList = [...data.dataList, ...res.Data.PageData];
}
data.pageCount = res.Data.PageCount
if (data.msg.pageIndex >= res.Data.PageCount) {
data.pageState = "none";
} else {
data.pageState = "more";
}
}
},
};
let that = methods;
return {
...toRefs(data),
...methods
};
},
onLoad(options) {
this.msg.OrderType = options.type
this.getData();
if (options.type == 1) {
this.pageTitle = '语培订单'
} else if (options.type == 2) {
this.pageTitle = '留学订单'
}
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
onReachBottom() {
if (this.msg.pageIndex < this.pageCount) {
data.pageState = "loading";
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.msg.pageIndex++;
that.getList();
}, 1000);
} else {
this.pageState = "none";
}
}
};
</script>
......@@ -101,6 +101,9 @@
} from '../../utils/date.js'
import Navbar from '../../components/navbar.vue'
import classList from '../../components/bookAclass/classList.vue'
import {
RemovePlanAppointment,GetPlanTime,SetPlanAppointment
} from "../../api/erp";
export default {
components: {
Navbar,
......@@ -171,7 +174,7 @@
let data = {
DetailsId: i.DetailsId
}
methods.Cancel(data)
that.Cancel(data)
}else{
let data = {
Date: i.SubDate,
......@@ -179,7 +182,7 @@
EndTime: i.EndTime,
DetailsId: i.DetailsId
}
methods.addClassSubmit(data)
that.addClassSubmit(data)
}
data.classList.forEach((items)=>{
......@@ -187,52 +190,49 @@
})
},
// 取消
Cancel(data){
proxy.$request("/LeaveStudent/RemovePlanAppointment", data).then(res => {
if (res.Code == 1) {
methods.GetPlanTime()
}
})
async Cancel(data){
let res = await RemovePlanAppointment(data);
if (res.Code == 1) {
that.GetPlanTimeFun()
}
},
addClassSubmit(data){
proxy.$request("/LeaveStudent/SetPlanAppointment", data).then(res => {
if (res.Code == 1) {
methods.GetPlanTime()
}
})
async addClassSubmit(data){
let res = await SetPlanAppointment(data);
if (res.Code == 1) {
that.GetPlanTimeFun()
}
},
// 获取可预约时间范围
GetPlanTime(){
async GetPlanTimeFun(){
// uni.showLoading({
// title: '加载中...'
// })
proxy.$request("/LeaveStudent/GetPlanTime", {}).then(res => {
if (res.Code == 1) {
res.Data.forEach((item,index)=>{
if(index==0){
data.month = item.DateStr.slice(5,7)
}
let datas = {
name: methods.getDateData(item.DateStr),
num: item.DateStr.slice(8,10)
}
data.titleList.push(datas)
})
data.lessonList = []
data.lessonList = res.Data
data.lessonList.forEach((item,index)=>{
data.classList.forEach((items,indexs)=>{
item.TimeList.forEach((itemT,indexT)=>{
if(indexs==indexT){
items.list.push(itemT)
}
})
})
let res = await GetPlanTime({});
if (res.Code == 1) {
res.Data.forEach((item,index)=>{
if(index==0){
data.month = item.DateStr.slice(5,7)
}
let datas = {
name: that.getDateData(item.DateStr),
num: item.DateStr.slice(8,10)
}
data.titleList.push(datas)
})
data.lessonList = []
data.lessonList = res.Data
data.lessonList.forEach((item,index)=>{
data.classList.forEach((items,indexs)=>{
item.TimeList.forEach((itemT,indexT)=>{
if(indexs==indexT){
items.list.push(itemT)
}
})
})
})
uni.hideLoading()
}
})
})
uni.hideLoading()
}
},
// 获取日期
getDateData(d) {
......@@ -265,11 +265,12 @@
return weekStr
},
}
let that = methods;
onMounted(() => {
uni.showLoading({
title: '加载中...'
})
methods.GetPlanTime()
that.GetPlanTimeFun()
})
return {
......
......@@ -46,6 +46,9 @@
import Navbar from '../../components/navbar.vue'
import classList from '../../components/bookAclass/classList.vue'
import lxCalendar from './lx-calendar/lx-calendar.vue'
import {
RemovePlanAppointment,GetStuPlanAppointment
} from "../../api/erp";
export default {
components: {
Navbar,
......@@ -113,15 +116,14 @@
let Msg = {
ExamId: item.ExamId
}
proxy.$request("/LeaveStudent/RemovePlanAppointment", Msg).then(res => {
if(res.Code ==1){
uni.showToast({
title:'删除成功',
icon:'none',
duration: 500
})
}
})
let res = RemovePlanAppointment(Msg);
if (res.Code ==1) {
uni.showToast({
title:'删除成功',
icon:'none',
duration: 500
})
}
} else if (res.cancel) {
}
......@@ -156,30 +158,7 @@
dayTime)).getDate()-1);
arr.push(timeOne_year+'-'+timeOne_month+'-'+timeOne_date);
}
// for(let i=0;i<7;i++){
// data.titleList.forEach((item,index) => {
// if(i==index){
// item.num = arr[i]
// }
// });
// }
data.weekList = arr
// if(data.weekType==0){
// data.weekShow = false
// }else{
// data.weekList.forEach(item=>{
// arr.forEach(i=>{
// if(item==i){
// data.weekShow = false
// }else{
// data.weekShow = true
// }
// })
// })
// }
// console.log(arr)
// data.msg.StartDate = arr[0]
// data.msg.EndDate = arr[6]
data.weeks = data.weekList[0]
return arr;
},
......@@ -192,70 +171,60 @@
data.month = list[1]
data.msg.StartDate = data.weekList[0]
data.msg.EndDate = data.weekList[6]
methods.getList()
that.getList()
},
getData(arr){
let list = []
list = arr[0].date.split('-')
// if(data.weekList.length>0){
// let year = list[0]
// let Math = list[1]<10?'0' + list[1]:list[1]
// let datas = list[2]<10?'0' + list[2]:list[2]
// if(data.weekList[0]==year+'-'+Math+'-'+datas){
// data.weekShow = false
// }else{
// data.weekShow = true
// }
// }
data.year = list[0]
data.month = list[1]<10?'0'+list[1]:list[1]
data.msg.StartDate = arr[0].date
data.msg.EndDate = arr[6].date
methods.getList()
that.getList()
},
getList(){
async getList(){
data.dataList = []
if(data.msg.StartDate){
uni.showLoading({
title: '加载中...'
})
proxy.$request("/LeaveStudent/GetStuPlanAppointment", data.msg).then(res => {
if(res.Code ==1){
data.titleList.forEach((i,indexs)=>{
i.list = []
})
let arr = []
data.dataList = res.Data
if(res.Data.length>0){
data.dataList.forEach((item,index)=>{
item.SubList.sort((a,b)=>a.Sort-b.Sort)
item.SubList.forEach(i=>{
arr.push(i)
})
data.titleList.forEach((i,indexs)=>{
if(index==indexs){
i.date = item.DateStr.slice(8,10)
if(item.SubList.length>0){
i.list = item.SubList
}else{
i.list = []
}
let res = await GetStuPlanAppointment(data.msg);
if (res.Code ==1) {
data.titleList.forEach((i,indexs)=>{
i.list = []
})
let arr = []
data.dataList = res.Data
if(res.Data.length>0){
data.dataList.forEach((item,index)=>{
item.SubList.sort((a,b)=>a.Sort-b.Sort)
item.SubList.forEach(i=>{
arr.push(i)
})
data.titleList.forEach((i,indexs)=>{
if(index==indexs){
i.date = item.DateStr.slice(8,10)
if(item.SubList.length>0){
i.list = item.SubList
}else{
i.list = []
}
})
}
})
}
data.total = arr.length
uni.hideLoading()
})
}
})
data.total = arr.length
uni.hideLoading()
}
}
},
}
let that = methods;
onMounted(() => {
methods.getMonday(0)
methods.getDateData()
that.getMonday(0)
that.getDateData()
})
return {
...toRefs(data),
......
<template>
<view class="course-box">
<van-toast id="van-toast" />
<view class="top-bar flex">
<view class="top-left flex flex_between_center">
<view class="top-title one_line"> 电子合同 </view>
<van-image
width="58rpx"
height="66rpx"
fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.png"
/>
</view>
<view class="top-right">
<view class="course-name one_line"> {{ CourseName||'暂无课程' }} </view>
<view class="section-name one_line"> {{ data.length }}个合同 </view>
</view>
</view>
<van-empty description="暂无数据" v-if="data.length === 0" />
<view
v-for="(item, index) in data"
:key="index"
class="data-item"
v-if="data.length > 0"
@click="seeDetail(item)"
>
<view class="contract-name">
<van-image
width="22rpx"
height="24rpx"
fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contracticon.png"
style="margin-right: 10rpx"
/>
{{ item.ContractNo }}</view
>
<view class="contract-con" v-if="item.Type === 1">订单合同</view>
<view class="contract-con" v-if="item.Type === 2">退课合同</view>
<van-image
width="80rpx"
height="80rpx"
fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contract.png"
class="contract-icon"
v-if="item.IsCompanySeal === 1"
/>
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { getContract } from "../../api/erp";
let { CourseName } = uni.getStorageSync("indexData");
export default {
setup() {
let data = reactive({
pageloading: false,
CourseName,
data: [],
});
let methods = {
async getdata() {
let res = await getContract({});
if (res) {
if (res.Data.length === 0) {
data.pageloading = true;
} else {
data.pageloading = false;
}
console.log(69, res);
data.data = res.Data;
}
},
seeDetail(item){
uni.navigateTo({
url:'/pages/contract/contractDetail?Id='+item.Id+'&&Type='+item.Type
})
}
};
onMounted(() => {
that.getdata();
});
let that = methods;
return {
...toRefs(data),
...methods,
};
},
onLoad() {
uni.setNavigationBarTitle({
title: "电子合同",
});
},
};
</script>
<style scoped>
.course-box {
padding: 30rpx;
}
.top-bar {
height: 120rpx;
margin-bottom: 28rpx;
}
.top-left {
width: 220rpx;
height: 120rpx;
background-color: #d9faf1;
border-radius: 20rpx;
margin-right: 30rpx;
box-sizing: border-box;
padding: 0 20rpx;
}
.top-title {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0f1b35;
}
.top-right {
width: 440rpx;
height: 120rpx;
}
.course-name {
box-sizing: border-box;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
height: 50%;
line-height: 70rpx;
}
.section-name {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
height: 50%;
line-height: 50rpx;
}
.data-item {
margin-top: 30rpx;
box-sizing: border-box;
padding: 30rpx;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(36, 36, 36, 0.2);
position: relative;
}
.contract-icon {
position: absolute;
top: 10rpx;
right: 10rpx;
}
.contract-name {
max-width: 80%;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
margin-bottom: 20rpx;
}
.contract-con {
max-width: 80%;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-left: 30rpx;
}
/deep/.van-skeleton {
padding: 0;
}
</style>
<template>
<view class="">
<web-view :src="url"></web-view>
</view>
</template>
<script>
import {
reactive,
toRefs,
} from "vue";
import {
Encrypt
} from '../../utils/encrypt.js';
export default {
setup() {
let data = reactive({
host: "http://edu.oytour.com/#/contractConfirm?a=",
host2: "http://edu.oytour.com/#/courseRefundH5?a=",
url: "",
})
return {
...toRefs(data),
}
},
onLoad(options) {
uni.setNavigationBarTitle({
title: "合同详情",
});
if (options.Type == 1) {
this.url = this.host + encodeURIComponent(Encrypt(options.Id))
} else {
this.url = this.host2 + encodeURIComponent(Encrypt(options.Id))
}
},
}
</script>
<style scoped>
.orderList {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
padding: 30rpx;
background-color: #fff;
}
.OrderItem {
width: 100%;
height: auto;
background-color: #fff;
border-radius: 16rpx;
padding: 40rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
box-shadow: 0 0 40rpx rgba(0, 0, 0, .07);
}
.Order_Top {
display: flex;
align-items: center;
margin: 30rpx 0;
}
.Order_label {
color: #AFB0B5;
font-size: 24rpx;
}
.Order_Number {
color: #0000ff;
font-size: 24rpx;
}
.Order_Type{
box-sizing: border-box;
padding: 4rpx 14rpx;
font-size: 20rpx;
background-color: #2961fe;
margin-left: 20rpx;
color: #FFFFFF;
border-radius: 20rpx;
}
.courseName {
font-size: 40rpx;
margin-bottom: 20rpx;
font-weight: 500;
color: #000000;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.Order_Complete {
color: #21D188;
}
.Order_Cancel {
color: #999999;
}
.Order_noPay {
color: #2FB4FB;
}
.p-lc-c {
display: flex;
align-items: center;
color: #B3B3B5;
}
.p-lc-item {
flex: 1;
text-align: center;
font-size: 24rpx;
display: inline-block;
}
.p-lc-item:last-child .item-val {
border: none;
}
.item-val {
color: #8E8D92;
font-size: 32rpx;
font-weight: bold;
box-sizing: border-box;
padding: 10rpx 0;
margin: 10rpx 0;
display: block;
border-right: 1rpx solid #C7C7C7;
}
.di {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%
}
/* image {
width: 20px;
height: 20px;
} */
</style>
<template>
<view class="orderList">
<van-empty description="暂无数据" v-if="orderList.length === 0" />
<view v-if="orderList.length > 0">
<view class="OrderItem" v-for="(item,index) in orderList" :key="index">
<view class="courseName">{{item.CourseName}}</view>
<view class="Order_Top">
<view class="Order_label">订单号:</view>
<view class="Order_Number">#{{item.OrderId}}</view>
<view class="Order_Type" v-if="item.ClassScrollType===1">
跟班
</view>
<view class="Order_Type" style="background-color: #29CC40;" v-if="item.ClassScrollType===2">
约课
</view>
</view>
<view class="p-lc-c">
<view class="p-lc-item">
<view>客户</view>
<view class="item-val">
{{item.GuestName}}
</view>
<view class="di">学员</view>
</view>
<view class="p-lc-item">
<view>总课时</view>
<view class="item-val">
{{item.TotalHours}}
</view>
<view class="di">课时</view>
</view>
<view class="p-lc-item" style="display: none;">
<view>完成课时</view>
<view class="item-val">
{{item.CompleteHours}}
</view>
<view class="di">课时</view>
</view>
<view class="p-lc-item">
<view>状态</view>
<view class="item-val">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/zhengchang.png"
mode="heightFix" style="height:36rpx" v-if="item.OrderState==1"></image>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/tuichu.png"
mode="heightFix" style="height:36rpx" v-if="item.OrderState==2"></image>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/quxiao.png"
mode="heightFix" style="height:36rpx" v-if="item.OrderState==3"></image>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/daifukuan.png"
mode="heightFix" style="height:36rpx" v-if="item.OrderState==4"></image>
</view>
<view class="di">
<text class="di" v-if="item.OrderState==1">正常</text>
<text class="di" v-if="item.OrderState==2">退学</text>
<text class="di" v-if="item.OrderState==3">取消</text>
<text class="di" v-if="item.OrderState==4">待付款</text>
</view>
</view>
</view>
</view>
<Loadmore :state="pageState" />
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
inject,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom";
import {
GetOrderPage
} from "../../api/erp";
export default {
components: {
bottom,
Loadmore,
},
setup(props, context) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
pageTitle: "合同列表",
msg: {
pageIndex: 1,
pageSize: 10,
OrderType: 1
},
pageCount: 0,
orderList: [],
pageState: "more",
timer: null, //防抖
});
const methods = {
jumpPage(url) {
uni.navigateTo({
url: url,
});
},
async getData() {
let res = await GetOrderPage(data.msg);
if (res) {
if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) {
data.orderList = res.Data.PageData;
} else {
data.orderList = [...data.orderList, ...res.Data.PageData];
}
data.pageCount = res.Data.PageCount
if (data.msg.pageIndex >= res.Data.PageCount) {
data.pageState = "none";
} else {
data.pageState = "more";
}
}
},
};
let that = methods;
return {
...toRefs(data),
...methods
};
},
onLoad(options) {
this.msg.OrderType = options.type
this.getData();
if (options.type == 1) {
this.pageTitle = '语培订单'
} else if (options.type == 2) {
this.pageTitle = '留学订单'
}
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
onReachBottom() {
if (this.msg.pageIndex < this.pageCount) {
data.pageState = "loading";
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.msg.pageIndex++;
that.getList();
}, 1000);
} else {
this.pageState = "none";
}
}
};
</script>
......@@ -3,10 +3,11 @@
<view class="info flex_between_center flex_nowrap">
<view class="left flex_start_between">
<view class="name">
<view class="name-img">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894197000_691.png"
<view v-if="pageData.StuName" class="name-img" :style="{'background':currentErpUser.bgColor}">
<!-- <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653894197000_691.png"
mode="aspectFill" style="width:70rpx;height:70rpx;border-radius: 50%;border: 1rpx solid #DDDDDD;display: block;">
</image>
</image> -->
{{ pageData.StuName.substring(0,1) }}
</view>
<text v-if="pageData.StuName">{{ pageData.StuName }}</text>
<text v-if="!pageData.StuName&&pageData.StuName!==''"
......@@ -33,7 +34,7 @@
我的订单
</view>
</view>
<view class="orderItem" @click="jumpPage(`/pages/contract/orderList?type=2`)">
<view class="orderItem" @click="jumpPage(`/pages/MyChild/index`)">
<view class=" flex_between_center" style="width:100%">
<view class="orderNum">{{ pageData.StudyAbroadNum||0 }}</view>
<image src="../../static/image/person/order2.png" mode="aspectFill" class="orderIcon"></image>
......@@ -188,6 +189,9 @@
} from "vue";
import bottom from "../../components/bottom";
import { VersionUpdate } from '../../utils/index.js'
import {
GetMyCenterInfo,GetMyAppointPageList
} from "../../api/erp";
export default {
components: {
bottom,
......@@ -197,31 +201,53 @@
proxy
} = getCurrentInstance();
let data = reactive({
colors:['#9ADBC5','#87DDEA','#FE8D6F','#F986AA','#FDC453'],
pageData: {
AssistList: []
},
yuyueNum: 0
yuyueNum: 0,
currentErpUser:null,
erpUsers:[],
});
data.erpUsers=uni.getStorageSync('ErpStus')
data.currentErpUser=uni.getStorageSync('erpUserInfo')
const methods = {
VersionUpdate,
initColor(){
if(data.erpUsers){
let i=0
data.erpUsers.forEach(x=>{
x.bgColor=data.colors[i]
i++;
if(i==data.colors.length){
i=0
}
if(x.AccountId==data.currentErpUser.AccountId){
data.currentErpUser.bgColor=x.bgColor
}
})
}
},
jumpPage(url) {
uni.navigateTo({
url: url,
});
},
getData() {
proxy.$request("/AppletCenter/GetMyCenterInfo", {}).then((res) => {
async getData() {
data.loading = true
let res = await GetMyCenterInfo({});
data.loading = false
if (res) {
data.pageData = res.Data;
});
}
},
callphone(num) {
uni.makePhoneCall({
phoneNumber: num,
});
},
getyuyue() {
async getyuyue() {
const msg = {
pageIndex: 1,
pageSize: 1,
......@@ -231,16 +257,16 @@
TeacherId: 0,
Q_SelectNormal: 1,
}
proxy.$request("/AppletCenter/GetMyAppointPageList", msg).then(res => {
if (res.Code == 1) {
data.yuyueNum = res.Data.Count
}
})
let res = await GetMyAppointPageList(msg);
if (res) {
data.yuyueNum = res.Data.Count
}
},
};
let that = methods;
onMounted(() => {
that.VersionUpdate()
that.initColor()
});
return {
...toRefs(data),
......@@ -288,10 +314,15 @@
align-items: center;
}
.person .info .left .name .name-img{
background: #ffffff;
width: 70rpx;
border-radius: 50%;
padding: 5rpx;
display: inline-block;
text-align: center;
line-height: 70rpx;
color: #ffffff;
font-size: 38rpx;
font-weight: 500;
}
.person .info .left .name text{
white-space: nowrap;
......@@ -331,7 +362,7 @@
font-size: 46rpx;
font-weight: 800;
font-style: italic;
color: #111111;
color: #C91727;
}
.orderItem .orderIcon {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment