0401
This commit is contained in:
parent
6cf6d6c1fe
commit
64db21f0f5
@ -137,7 +137,7 @@
|
|||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
}
|
}
|
||||||
.text_4 {
|
.text_4 {
|
||||||
width: 112rpx;
|
width: 200rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
@ -167,7 +167,7 @@
|
|||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
}
|
}
|
||||||
.text_6 {
|
.text_6 {
|
||||||
width: 198rpx;
|
width: 300rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
|
|||||||
@ -1,18 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page flex-col">
|
<view class="page flex-col">
|
||||||
<view class="box_1 flex-row">
|
<view class="box_1 flex-row">
|
||||||
<image
|
|
||||||
class="image_1"
|
|
||||||
referrerpolicy="no-referrer"
|
|
||||||
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNG5472ef46deab947fe098747eb1b07bd2.png"
|
|
||||||
/>
|
|
||||||
<view class="box_2 flex-col"></view>
|
|
||||||
<view class="box_3 flex-col"></view>
|
|
||||||
<image
|
|
||||||
class="image_2"
|
|
||||||
referrerpolicy="no-referrer"
|
|
||||||
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGb239db97c719ec7467ee7c9615d3d24a.png"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="box_4 flex-col">
|
<view class="box_4 flex-col">
|
||||||
<view class="box_5 flex-row">
|
<view class="box_5 flex-row">
|
||||||
@ -20,21 +11,10 @@
|
|||||||
class="label_1"
|
class="label_1"
|
||||||
referrerpolicy="no-referrer"
|
referrerpolicy="no-referrer"
|
||||||
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
|
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
|
||||||
|
@click="handleBack()"
|
||||||
/>
|
/>
|
||||||
<text class="text_1">个人信息</text>
|
<text class="text_1">个人信息</text>
|
||||||
<view class="block_1 flex-col">
|
|
||||||
<view class="image-wrapper_1 flex-row">
|
|
||||||
<image
|
|
||||||
class="thumbnail_1"
|
|
||||||
referrerpolicy="no-referrer"
|
|
||||||
src="/static/lanhu_gerenxinxiweitianxie/FigmaDDSSlicePNGdc9929c2b5fd86c1689cc5990a0b4397.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="group_1 flex-row justify-between">
|
|
||||||
<view class="section_1 flex-col"></view>
|
|
||||||
<view class="section_2 flex-col"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="box_6 flex-col">
|
<view class="box_6 flex-col">
|
||||||
<view class="box_7 flex-row justify-between">
|
<view class="box_7 flex-row justify-between">
|
||||||
@ -47,11 +27,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_1 flex-row justify-between">
|
<view class="text-wrapper_1 flex-row justify-between">
|
||||||
<text class="text_3">昵称</text>
|
<text class="text_3">昵称</text>
|
||||||
<text class="text_4">千舟寻渡</text>
|
<input class="text_4" v-model="name" type="text" placeholder="请填写昵称">
|
||||||
|
<!-- <text class="text_4">千舟寻渡</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_2 flex-row justify-between">
|
<view class="text-wrapper_2 flex-row justify-between">
|
||||||
<text class="text_5">联系方式</text>
|
<text class="text_5">联系方式</text>
|
||||||
<text class="text_6">166 8888 6666</text>
|
<input class="text_6" v-model="name" type="text" placeholder="请填写联系方式">
|
||||||
|
<!-- <text class="text_6">166 8888 6666</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box_8 flex-col">
|
<view class="box_8 flex-col">
|
||||||
@ -103,7 +85,14 @@ export default {
|
|||||||
constants: {}
|
constants: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
handleBack() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
class="image-text_3 flex-col justify-between"
|
class="image-text_3 flex-col justify-between"
|
||||||
v-for="(item, index) in loopData"
|
v-for="(item, index) in loopData"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="toOrderPage(item.type)"
|
@click="toOrderPage(item.orderType,item.type)"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="label_3"
|
class="label_3"
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="block_2 flex-row">
|
<view class="block_2 flex-row" @click="goMyInfo()">
|
||||||
<view class="image-wrapper_4 flex-col">
|
<view class="image-wrapper_4 flex-col">
|
||||||
<image
|
<image
|
||||||
class="thumbnail_2"
|
class="thumbnail_2"
|
||||||
@ -138,21 +138,25 @@ export default {
|
|||||||
{
|
{
|
||||||
url: '/static/myImgs/alreadyPaid.png',
|
url: '/static/myImgs/alreadyPaid.png',
|
||||||
text: '已付款',
|
text: '已付款',
|
||||||
|
orderType: '2',
|
||||||
type: '2',
|
type: '2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/myImgs/alreadyInterviewed.png',
|
url: '/static/myImgs/alreadyInterviewed.png',
|
||||||
text: '已面签',
|
text: '已面签',
|
||||||
|
orderType: '4',
|
||||||
type: '3',
|
type: '3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/myImgs/registered.png',
|
url: '/static/myImgs/registered.png',
|
||||||
text: '已报名',
|
text: '已报名',
|
||||||
type: '1',
|
orderType: '2',
|
||||||
|
type: '4',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: '/static/myImgs/allOrder.png',
|
url: '/static/myImgs/allOrder.png',
|
||||||
text: '全部订单',
|
text: '全部订单',
|
||||||
|
orderType: '',
|
||||||
type: '1',
|
type: '1',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -163,7 +167,6 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.selfInfo = getLocalUserInfo()
|
this.selfInfo = getLocalUserInfo()
|
||||||
console.log("用户信息", this.selfInfo)
|
console.log("用户信息", this.selfInfo)
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
@ -203,11 +206,16 @@ export default {
|
|||||||
this.selfInfo = res
|
this.selfInfo = res
|
||||||
},*/
|
},*/
|
||||||
|
|
||||||
toOrderPage(orderType) {
|
toOrderPage(orderType,type) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/newPages/orderList/index?orderType=${orderType}&userId=${this.selfInfo.userId}`
|
url: `/newPages/orderList/index?orderType=${orderType}&type=${type}&userId=${this.selfInfo.id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goMyInfo(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/newPages/informationAdd/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -258,10 +258,11 @@
|
|||||||
width: 112rpx;
|
width: 112rpx;
|
||||||
height: 44rpx;
|
height: 44rpx;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: rgba(44, 120, 245, 1);
|
// color: rgba(44, 120, 245, 1);
|
||||||
|
color: rgba(0, 0, 0, 0.9);
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: PingFang SC-Semibold;
|
font-family: PingFang SC-Semibold;
|
||||||
font-weight: 600;
|
font-weight: NaN;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
@ -305,6 +306,17 @@
|
|||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
margin-left: 104rpx;
|
margin-left: 104rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text_9, .text_10, .text_11, .text_12 {
|
||||||
|
// 默认样式
|
||||||
|
color: #333; // 默认文字颜色
|
||||||
|
transition: color 0.3s; // 添加颜色过渡效果
|
||||||
|
|
||||||
|
&.active-blue {
|
||||||
|
color: #2C78F5 !important; // 蓝色高亮
|
||||||
|
font-weight: bold; // 可选:加粗效果
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -353,5 +365,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.active-blue {
|
||||||
|
position: relative;
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 20px;
|
||||||
|
height: 3px;
|
||||||
|
background: #2C78F5;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,85 +11,80 @@
|
|||||||
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
|
src="/static/lanhu_quanbudingdan/FigmaDDSSlicePNGacf527a62cbe7351c6472edd8f5b2814.png"
|
||||||
@click="handleBack()"
|
@click="handleBack()"
|
||||||
/>
|
/>
|
||||||
<text class="text_1">全部订单</text>
|
<text class="text_1">订单</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="list_1 flex-col">
|
<view class="list_1 flex-col">
|
||||||
<view
|
<scroll-view
|
||||||
class="list-items_1 flex-col"
|
class="scroll-view"
|
||||||
v-for="(item, index) in orderList"
|
scroll-y
|
||||||
:key="index"
|
:style="{ height: scrollHeight + 'px' }"
|
||||||
>
|
>
|
||||||
|
<view class="list-items_1 flex-col" v-for="(item, index) in orderList" :key="index" >
|
||||||
<view class="box_6 flex-row justify-between">
|
<view class="box_6 flex-row justify-between">
|
||||||
<text class="text_2" v-html="item.lanhutext0"></text>
|
<text class="text_2">订单号: {{item.orderNo}}</text>
|
||||||
<view
|
<view class="text-wrapper_1 flex-col" :style="{ background: statusMap[item.paymentStatus].background }">
|
||||||
class="text-wrapper_1 flex-col"
|
<text class="text_3" :style="{ color: statusMap[item.paymentStatus].color }">{{ statusMap[item.paymentStatus].name}}</text>
|
||||||
:style="{ background: item.lanhuBg2 }"
|
|
||||||
>
|
|
||||||
<text
|
|
||||||
class="text_3"
|
|
||||||
:style="{ color: item.lanhufontColor1 }"
|
|
||||||
v-html="item.lanhutext1"
|
|
||||||
></text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box_7 flex-row">
|
<view class="box_7 flex-row">
|
||||||
<view class="image-text_1 flex-row">
|
<view class="image-text_1 flex-row">
|
||||||
<image
|
<image
|
||||||
class="image_3"
|
class="image_3"
|
||||||
referrerpolicy="no-referrer"
|
referrerpolicy="no-referrer"
|
||||||
:src="item.lanhuimage0"
|
src='/static/lanhu_shouye2gai/FigmaDDSSlicePNG530e91ec069b391e8972e9ed0aeebc58.png'
|
||||||
/>
|
/>
|
||||||
<view class="text-group_1 flex-col justify-between">
|
<view class="text-group_1 flex-col justify-between">
|
||||||
<text class="text_4" v-html="item.lanhutext2"></text>
|
<text class="text_4" >{{item.courseName}}</text>
|
||||||
<view class="text-wrapper_2 flex-row justify-between">
|
<view class="text-wrapper_2 flex-row justify-between">
|
||||||
<text class="text_5" v-html="item.lanhutext3"></text>
|
<text class="text_5" >{{item.reserveMoney}}</text>
|
||||||
<text class="text_6" v-html="item.lanhutext4"></text>
|
<text class="text_6" >{{item.reserveMoney}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_3 flex-col">
|
<view class="text-wrapper_3 flex-col">
|
||||||
<text class="text_7" v-html="item.lanhutext5"></text>
|
<text class="text_7" >{{item.courseType}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_4 flex-col">
|
<view class="text-wrapper_4 flex-col">
|
||||||
<text class="text_8" v-html="item.lanhutext6"></text>
|
<text class="text_8" >{{item.courseType}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group_2 flex-col justify-end">
|
<view class="group_2 flex-col justify-end">
|
||||||
<view class="text-wrapper_5 flex-row">
|
<view class="text-wrapper_5 flex-row">
|
||||||
<text
|
<text
|
||||||
class="text_9"
|
class="text_9"
|
||||||
:class="{ active: orderType === 1 }"
|
:class="{ 'active-blue': type === 1 }"
|
||||||
@click="changeOrderType()"
|
@click="changeOrderType('',1)"
|
||||||
>
|
>
|
||||||
全部订单
|
全部订单
|
||||||
</text>
|
</text>
|
||||||
<text
|
<text
|
||||||
class="text_10"
|
class="text_10"
|
||||||
:class="{ active: orderType === 2 }"
|
:class="{ 'active-blue': type === 2 }"
|
||||||
@click="changeOrderType(2)"
|
@click="changeOrderType(2,2)"
|
||||||
>
|
>
|
||||||
已付款
|
已付款
|
||||||
</text>
|
</text>
|
||||||
<text
|
<text
|
||||||
class="text_11"
|
class="text_11"
|
||||||
:class="{ active: orderType === 3 }"
|
:class="{ 'active-blue': type === 3 }"
|
||||||
@click="changeOrderType(4)"
|
@click="changeOrderType(4,3)"
|
||||||
>
|
>
|
||||||
已面签
|
已面签
|
||||||
</text>
|
</text>
|
||||||
<text
|
<text
|
||||||
class="text_12"
|
class="text_12"
|
||||||
:style="{ color: orderType === 4 ? 'rgba(44, 120, 245, 1)' : '' }"
|
:class="{ 'active-blue': type === 4 }"
|
||||||
@click="changeOrderType(2)"
|
@click="changeOrderType(2,4)"
|
||||||
>
|
>
|
||||||
已报名
|
已报名
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="box_8 flex-row">
|
<view class="box_8 flex-row">
|
||||||
<view class="group_8 flex-col"></view>
|
<!-- <view class="group_8 flex-col"></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -141,21 +136,45 @@ export default {
|
|||||||
lanhutext6: '自动挡'
|
lanhutext6: '自动挡'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
orderType: '1', // 默认选中“全部订单”
|
type: null,
|
||||||
underlinePosition: 0, // 下划线的 X 轴位置
|
orderType: null,
|
||||||
|
scrollHeight: 0,
|
||||||
userId:null,
|
userId:null,
|
||||||
orderList:[],
|
orderList:[],
|
||||||
constants: {}
|
constants: {},
|
||||||
|
courseDetails: {},
|
||||||
|
statusMap: {
|
||||||
|
5: { name: '已完成', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
|
||||||
|
4: { name: '已面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
|
||||||
|
3: { name: '待面签', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
|
||||||
|
2: { name: '已付款', background: 'rgba(255,244,228,1)', color: 'rgba(237,162,58,1)' },
|
||||||
|
1: { name: '未付款', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
|
||||||
|
0: { name: '待支付', background: 'rgba(255,228,228,1)', color: 'rgba(237,58,58,1)' },
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options){
|
onLoad(options){
|
||||||
this.orderType = options.orderType; // 读取上个页面传入的 orderType
|
// this.orderType = options.orderType; // 读取上个页面传入的 orderType
|
||||||
|
this.orderType = options.orderType ? parseInt(options.orderType) : '';
|
||||||
|
this.type = options.type ? parseInt(options.type) : 1;
|
||||||
this.userId = options.userId;
|
this.userId = options.userId;
|
||||||
|
// this.type = options.type;
|
||||||
// this.getUserOrderDetails(this.orderType); // 页面加载时请求数据
|
// this.getUserOrderDetails(this.orderType); // 页面加载时请求数据
|
||||||
console.log(options)
|
// this.getUserOrderDetails(options.orderType);
|
||||||
|
console.log('options',options)
|
||||||
|
console.log('type', this.type)
|
||||||
|
console.log('type', this.type === 2)
|
||||||
|
console.log('orderType',this.orderType)
|
||||||
|
console.log('orderType',this.orderType === 2)
|
||||||
|
this.changeOrderType(this.orderType, this.type)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onReady() {
|
||||||
|
// 动态计算滚动区域高度
|
||||||
|
this.calculateScrollHeight();
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateUnderlinePosition(this.orderType);
|
// this.updateUnderlinePosition(this.orderType);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -166,29 +185,57 @@ export default {
|
|||||||
},
|
},
|
||||||
getUserOrderDetails(paymentStatus) {
|
getUserOrderDetails(paymentStatus) {
|
||||||
console.log(paymentStatus)
|
console.log(paymentStatus)
|
||||||
|
console.log(this.userId)
|
||||||
request({
|
request({
|
||||||
url: '/app-api/small/drive/school-course-order/page',
|
url: '/app-api/small/drive/school-course-order/page',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
userId: '1',
|
userId: this.userId,
|
||||||
paymentStatus:paymentStatus
|
paymentStatus:paymentStatus
|
||||||
},
|
},
|
||||||
tenantIdFlag : false
|
tenantIdFlag : false
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.orderList = res.data;
|
this.orderList = res.data.records;
|
||||||
|
console.log('订单信息',res.data)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeOrderType(type) {
|
changeOrderType(orderType,type) {
|
||||||
this.orderType = type;
|
this.orderType = orderType;
|
||||||
console.log(type)
|
this.type = type;
|
||||||
this.getUserOrderDetails(type); // 切换 Tab 时重新请求数据
|
console.log('type',type)
|
||||||
this.updateUnderlinePosition(type);
|
console.log('orderType',orderType)
|
||||||
|
this.getUserOrderDetails(orderType); // 切换 Tab 时重新请求数据
|
||||||
|
// this.updateUnderlinePosition(type);
|
||||||
},
|
},
|
||||||
updateUnderlinePosition(type) {
|
getStatusStyle(status) {
|
||||||
|
return this.statusMap[status] || { name: '未知状态', background: '', color: '' };
|
||||||
|
},
|
||||||
|
getCourseDetails(){
|
||||||
|
request({
|
||||||
|
url: '/app-api/dl-drive-school-course-small/get',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
id: this.courseId,
|
||||||
|
tenantId: this.tenantId,
|
||||||
|
},
|
||||||
|
tenantIdFlag: false
|
||||||
|
}).then(res => {
|
||||||
|
this.courseDetails = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
calculateScrollHeight() {
|
||||||
|
// 获取屏幕高度
|
||||||
|
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||||
|
// 获取顶部区域高度
|
||||||
|
const topHeight = 160;
|
||||||
|
// 计算滚动区域高度
|
||||||
|
this.scrollHeight = screenHeight - topHeight;
|
||||||
|
},
|
||||||
|
/* updateUnderlinePosition(type) {
|
||||||
const index = parseInt(type) - 1; // 计算选中的索引(从 0 开始)
|
const index = parseInt(type) - 1; // 计算选中的索引(从 0 开始)
|
||||||
const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 假设有 4 个选项,均分屏幕宽度
|
const tabWidth = uni.getSystemInfoSync().windowWidth / 4; // 假设有 4 个选项,均分屏幕宽度
|
||||||
this.underlinePosition = index * tabWidth;
|
this.underlinePosition = index * tabWidth;
|
||||||
},
|
}, */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -151,7 +151,6 @@
|
|||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
import tabbar from '../../components/tabbar/tabbar.vue'
|
import tabbar from '../../components/tabbar/tabbar.vue'
|
||||||
import upload from '@/utils/upload.js'
|
import upload from '@/utils/upload.js'
|
||||||
import Decimal from "@/unpackage/dist/dev/mp-weixin/common/vendor";
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -183,8 +182,8 @@
|
|||||||
orderId: null,
|
orderId: null,
|
||||||
orderNo: null,
|
orderNo: null,
|
||||||
dname: "全款", // 默认显示全款
|
dname: "全款", // 默认显示全款
|
||||||
currentPrice: 0,
|
currentPrice: 0,
|
||||||
selectedPayType: 2, // 默认选中全款(2)
|
selectedPayType: 2, // 默认选中全款(2)
|
||||||
settings: { //签名设置
|
settings: { //签名设置
|
||||||
width: '750', //签名区域的宽
|
width: '750', //签名区域的宽
|
||||||
height: '500', //签名区域的高
|
height: '500', //签名区域的高
|
||||||
@ -196,8 +195,9 @@
|
|||||||
hideTeacher: 0,
|
hideTeacher: 0,
|
||||||
Address: '',
|
Address: '',
|
||||||
djshow: false,
|
djshow: false,
|
||||||
userId: null,
|
userId: null,
|
||||||
tenantId: null,
|
tenantId: null,
|
||||||
|
userinfo: [],
|
||||||
columns: [
|
columns: [
|
||||||
[{
|
[{
|
||||||
label: '全款',
|
label: '全款',
|
||||||
@ -221,8 +221,9 @@
|
|||||||
}
|
}
|
||||||
this.jlId = uni.getStorageSync('jlId');
|
this.jlId = uni.getStorageSync('jlId');
|
||||||
this.courseId = option.courseId,
|
this.courseId = option.courseId,
|
||||||
this.userId = option.userId,
|
this.userId = option.userId,
|
||||||
this.tenantId = option.tenantId
|
this.tenantId = option.tenantId
|
||||||
|
this.userinfo = getLocalUserInfo()
|
||||||
console.log("驾校id", this.jxId, "课程id", this.courseId)
|
console.log("驾校id", this.jxId, "课程id", this.courseId)
|
||||||
console.log("userId", this.userId, "tenantId", this.tenantId)
|
console.log("userId", this.userId, "tenantId", this.tenantId)
|
||||||
|
|
||||||
@ -436,6 +437,8 @@
|
|||||||
},
|
},
|
||||||
async wxPayClick(name, phone, identity, courseId, payType, reserveMoney, restMoney) {
|
async wxPayClick(name, phone, identity, courseId, payType, reserveMoney, restMoney) {
|
||||||
console.log("微信支付", )
|
console.log("微信支付", )
|
||||||
|
console.log("reserveMoney123",reserveMoney)
|
||||||
|
const that = this; // 保存this引用
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/small/jxInfo/onLinePay',
|
url: '/small/jxInfo/onLinePay',
|
||||||
data: {
|
data: {
|
||||||
@ -450,7 +453,7 @@
|
|||||||
courseType: this.rightInfoList.type,
|
courseType: this.rightInfoList.type,
|
||||||
courseName: this.rightInfoList.name,
|
courseName: this.rightInfoList.name,
|
||||||
userId: this.userId,
|
userId: this.userId,
|
||||||
reserveMoney: this.rightInfoList.reserveMoney,
|
reserveMoney: reserveMoney,
|
||||||
payType: payType,
|
payType: payType,
|
||||||
restMoney: restMoney,
|
restMoney: restMoney,
|
||||||
},
|
},
|
||||||
@ -458,7 +461,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.orderId = res.orderId
|
this.orderId = res.orderId
|
||||||
this.orderNo = res.orderNo
|
this.orderNo = res.orderNo
|
||||||
console.log("收到为单位1 =====>", this.orderId)
|
console.log("收到为单位1 =====>", this.orderId)
|
||||||
console.log("收到为单位2 =====>", this.orderNo)
|
console.log("收到为单位2 =====>", this.orderNo)
|
||||||
console.log("收到为单位3 =====>", res)
|
console.log("收到为单位3 =====>", res)
|
||||||
@ -478,20 +481,23 @@
|
|||||||
signType: item.signType, // 签名算法类型,默认为 MD5,支持RSA等其他加密算法
|
signType: item.signType, // 签名算法类型,默认为 MD5,支持RSA等其他加密算法
|
||||||
paySign: item.paySign, // 签名,详见签名生成算法
|
paySign: item.paySign, // 签名,详见签名生成算法
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log('成功', res);
|
console.log('微信支付成功返回信息', res);
|
||||||
if (res.errMsg = 'requestPayment:ok') {
|
if (res.errMsg = 'requestPayment:ok') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功'
|
||||||
})
|
})
|
||||||
|
that.updateOrderStatus(that.orderId,'2')
|
||||||
|
that.insertSchoolStudent()
|
||||||
|
|
||||||
const contractData = {
|
const contractData = {
|
||||||
adress: this.Address,
|
adress: that.Address,
|
||||||
name: this.name,
|
name: that.name,
|
||||||
tenantId: this.tenantId,
|
tenantId: that.tenantId,
|
||||||
type: this.rightInfoList.type,
|
type: that.rightInfoList.type,
|
||||||
money: reserveMoney,
|
money: reserveMoney,
|
||||||
indent: this.identity,
|
indent: that.identity,
|
||||||
phone: this.phone,
|
phone: that.phone,
|
||||||
time: this.getCurrentDateTime()
|
time: that.getCurrentDateTime()
|
||||||
};
|
};
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
||||||
@ -530,11 +536,16 @@
|
|||||||
coachUserId: this.jlId,
|
coachUserId: this.jlId,
|
||||||
courseType: this.rightInfoList.type,
|
courseType: this.rightInfoList.type,
|
||||||
courseName: this.rightInfoList.name,
|
courseName: this.rightInfoList.name,
|
||||||
|
reserveMoney: this.rightInfoList.price,
|
||||||
|
payType: '2',
|
||||||
|
|
||||||
userId: this.userId,
|
userId: this.userId,
|
||||||
},
|
},
|
||||||
method: 'post',
|
method: 'post',
|
||||||
})
|
})
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
console.log('OK')
|
||||||
|
// this.updateOrderStatus('20b1fd5446aef14c7023da05332e4e43','2')
|
||||||
const contractData = {
|
const contractData = {
|
||||||
adress: this.Address,
|
adress: this.Address,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
@ -545,9 +556,10 @@
|
|||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
time: this.getCurrentDateTime()
|
time: this.getCurrentDateTime()
|
||||||
};
|
};
|
||||||
uni.navigateTo({
|
|
||||||
|
uni.navigateTo({
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
||||||
})
|
})
|
||||||
|
|
||||||
/*uni.navigateTo({
|
/*uni.navigateTo({
|
||||||
url: '/pages/index/contract?Address=' +
|
url: '/pages/index/contract?Address=' +
|
||||||
@ -564,7 +576,7 @@
|
|||||||
})
|
})
|
||||||
this.rightInfoList = res.data,
|
this.rightInfoList = res.data,
|
||||||
this.currentPrice = this.rightInfoList.price;
|
this.currentPrice = this.rightInfoList.price;
|
||||||
console.log("报名班类型", this.rightInfoList)
|
console.log("111222333", this.rightInfoList)
|
||||||
},
|
},
|
||||||
async xxgetRightInfoList() {
|
async xxgetRightInfoList() {
|
||||||
let res = await request({
|
let res = await request({
|
||||||
@ -646,6 +658,37 @@
|
|||||||
console.log('654',res);
|
console.log('654',res);
|
||||||
that.popupShow = false
|
that.popupShow = false
|
||||||
},
|
},
|
||||||
|
updateOrderStatus(orderId,paymentStatus){
|
||||||
|
console.log('orderId',orderId)
|
||||||
|
console.log('paymentStatus',paymentStatus)
|
||||||
|
request({
|
||||||
|
url: '/app-api/small/drive/school-course-order/update',
|
||||||
|
method: 'put',
|
||||||
|
data: {
|
||||||
|
id: orderId,
|
||||||
|
paymentStatus: paymentStatus
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
insertSchoolStudent(){
|
||||||
|
request({
|
||||||
|
url: '/app-api/small/dl-drive-school-student/create',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
avatar:this.userinfo.avatar,
|
||||||
|
name:this.name,
|
||||||
|
age:this.age,
|
||||||
|
sex:this.sex,
|
||||||
|
phone:this.phone,
|
||||||
|
idCard:this.identity,
|
||||||
|
registAddress:this.Address,
|
||||||
|
userId:this.userinfo.id,
|
||||||
|
tenantId:this.tenantId,
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
checkLogin() {
|
checkLogin() {
|
||||||
const token = uni.getStorageSync('App-Token');
|
const token = uni.getStorageSync('App-Token');
|
||||||
@ -659,14 +702,15 @@
|
|||||||
getCurrentDateTime() {
|
getCurrentDateTime() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
||||||
const year = now.getFullYear();
|
/* const year = now.getFullYear();
|
||||||
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||||
const day = String(now.getDate()).padStart(2, '0');
|
const day = String(now.getDate()).padStart(2, '0');
|
||||||
const hours = String(now.getHours()).padStart(2, '0');
|
const hours = String(now.getHours()).padStart(2, '0');
|
||||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||||
const seconds = String(now.getSeconds()).padStart(2, '0');
|
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||||
|
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; */
|
||||||
|
return now;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user