699dfdee by 华明祺

no message

1 parent 5beac84c
import request from './request.js'
import config from '@/config.js'
function getTrainList(params) {
return request({
......@@ -19,9 +18,11 @@ function getComanyList(params) {
function getTrainDetail(id) {
return request({
url: `/train/info/getTrainByUser/${id}`,
url: `/train/info/getTrainByUser`,
method: 'get',
params: id
params: {
id
}
})
}
......@@ -115,8 +116,11 @@ function getInvoiceDetailBills(invoiceId) {
function getInvoiceDetail(invoiceId) {
return request({
url: `/train/invoice/${invoiceId}`,
method: 'get'
url: `/train/invoice/getInvoiceById`,
method: 'get',
params: {
id: invoiceId
}
})
}
......@@ -126,26 +130,20 @@ function getInvoiceByUserId() {
method: 'get'
})
}
// /-sss--sss--sssssss---ssssssssss-----////
function getbilllist(userId, venueId) {
return request({
url: `/logex/order/list?createById=${userId}&venueId=${venueId}`,
method: 'get',
params: userId
method: 'get'
})
}
function getbilldetailbyId(orderId) {
return request({
// url: `/logex/order/${orderId}`,
url: `/logex/norder/${orderId}`,
method: 'get',
params: orderId
method: 'get'
})
}
......@@ -178,8 +176,7 @@ function cancelOrder() {
function cancelOrder2(orderId) {
return request({
url: `/logex/norder/cancelOrderBack//${orderId}`,
method: 'post',
params: orderId
method: 'post'
})
}
......@@ -188,8 +185,7 @@ function payForOrder(orderId) {
return request({
// url: `/logex/order/payForOrder?orderId=${orderId}&openId=${nowOpenId}`,
url: `/train/order/payForOrder?orderId=${orderId}`,
method: 'post',
params: orderId
method: 'post'
})
}
......
......@@ -25,18 +25,10 @@ function getToken() {
// 获取请求头
function getHeaders() {
let header
if (config.localPort) {
header = {
const header = {
"isToken": false,
'content-type': 'application/x-www-form-urlencoded'
}
} else {
header = {
"Authorization": getToken(),
"Content-Type": "application/json",
}
}
return header
}
......@@ -61,18 +53,19 @@ let request = function(req) {
const token = getToken()
let tempUrl = req.url
// if (token) {
if (token) {
if (tempUrl.indexOf('?') > -1) {
tempUrl += '&userNo=' + token
} else {
tempUrl += '?userNo=' + token
}
// }
}
let url, data
if (config.localPort) {
const baseUrl = config.localPort + '/jsintszxd/request'
if (req.method === 'POST') {
req.params.userNo = token
url = baseUrl
data = {
appSecretId: config.appSecretId,
......@@ -92,8 +85,23 @@ let request = function(req) {
url = `${baseUrl}?appSecretId=${config.appSecretId}&restApi=${encodeURIComponent(tempUrl)}`
}
} else {
if (req.method === 'POST') {
req.params.userNo = token
data = {
jsonBody: JSON.stringify(req.params)
}
} else {
if (req.params) {
for (const key of Object.keys(req.params)) {
if (tempUrl.indexOf('?') > -1) {
tempUrl += `&${key}=${req.params[key]}`
} else {
tempUrl += `?${key}=${req.params[key]}`
}
}
}
}
url = config.baseUrl_api + tempUrl
data = req.params
}
return new Promise((resolve, reject) => {
......
......@@ -20,7 +20,7 @@
</view>
</view>
<uni-forms>
<!-- <uni-forms>
<view>
<view class="t"> 培训人员信息 </view>
<view class="whiteItem">
......@@ -36,7 +36,7 @@
</view>
</view>
</uni-forms>
</uni-forms> -->
</view>
<view class="bbfix" v-if="orderType!='all'">
<!-- 底部提交 -->
......@@ -72,50 +72,64 @@
</template>
<script setup>
import {reactive,toRefs} from 'vue';
import {onLoad,onShow} from '@dcloudio/uni-app';
import * as api from '@/common/api.js';
import * as hotel from '@/common/hotel.js';
import {
reactive,
toRefs
} from 'vue';
import {
onLoad,
onShow
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js';
import * as hotel from '@/common/hotel.js';
const data = reactive({
form: {
},
status:null,
tdpopup:null,
detail:{},
info:{},
orderType:''
form: {},
status: null,
tdpopup: null,
detail: {},
info: {},
orderType: ''
})
const {
form,detail,orderType,info,status,tdpopup
form,
detail,
orderType,
info,
status,
tdpopup
} = toRefs(data);
let trainId = ''
onLoad((options)=>{
let trainId = ''
onLoad((options) => {
trainId = options.trainId
orderType.value = options.orderType
console.log(orderType.value)
status.value = options.status
init()
})
function init(){
function init() {
getData()
}
function getData(){
}
function getData() {
// 培训详情
hotel.getTrainDetail(trainId).then(res => {
form.value = res.data
})
// 用户信息
api.checkReport().then((res)=>{
detail.value = res.data
})
}
function unsubscribe(){
hotel.cancelOrder().then(res=>{
// api.checkReport().then((res)=>{
// detail.value = res.data
// })
}
function unsubscribe() {
hotel.cancelOrder().then(res => {
info.value = res.data
tdpopup.value.open()
})
}
}
function callphone(number) {
uni.makePhoneCall({
phoneNumber: number
......@@ -124,21 +138,45 @@ function unsubscribe(){
</script>
<style lang="scss" scoped>
:deep(.uni-forms-item__inner){padding-bottom: 10rpx;}
:deep(.uni-forms-item__content){line-height: 36px;}
.t{padding: 20rpx;}
.hotel {
:deep(.uni-forms-item__inner) {
padding-bottom: 10rpx;
}
:deep(.uni-forms-item__content) {
line-height: 36px;
}
.whiteItem{ width: 700rpx;
.t {
padding: 20rpx;
}
.hotel {}
.whiteItem {
width: 700rpx;
box-sizing: border-box;
margin: 0 auto 26rpx;
padding: 26rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 27rpx 0rpx #DEDEDE;
border-radius: 15rpx;}
.roomType{color: #4C5359;font-size: 28rpx;margin:10rpx 0;}
.roomInfo{color: #4C5359;font-size: 28rpx;}
.tip{font-size: 28rpx;color: #E60012;}
border-radius: 15rpx;
}
.roomType {
color: #4C5359;
font-size: 28rpx;
margin: 10rpx 0;
}
.roomInfo {
color: #4C5359;
font-size: 28rpx;
}
.tip {
font-size: 28rpx;
color: #E60012;
}
.bbfix {
background: #fff;
......@@ -161,23 +199,54 @@ function unsubscribe(){
color: #ff8124;
}
}
.subBtn {
font-size: 32rpx;
color: #1EC886;border: 1px solid #1EC886;
color: #1EC886;
border: 1px solid #1EC886;
background: transparent;
height: 60rpx;margin: 15rpx;
height: 60rpx;
margin: 15rpx;
line-height: 60rpx;
padding: 0 30rpx;
}
.subBtn.gray{color: #999;border: 1px solid #999;}
.subBtn.gray {
color: #999;
border: 1px solid #999;
}
}
.ccitem{display: flex;justify-content: space-between;font-size: 28rpx;
color: #666;margin: 0 0 10rpx;
label{font-size: 32rpx;color: #000;}
text{color: #1EC886;}
.ccitem {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #666;
margin: 0 0 10rpx;
label {
font-size: 32rpx;
color: #000;
}
text {
color: #1EC886;
}
}
.colorfulBg {
background: #1EC886;
padding: 20rpx 10rpx 10rpx;
.whiteItem {
border-radius: 0;
margin: 0;
width: 730rpx;
}
.name {
color: #fff;
margin: 0 0 20rpx;
}
.colorfulBg{background:#1EC886;padding: 20rpx 10rpx 10rpx;
.whiteItem{border-radius: 0;margin: 0;width: 730rpx;}
.name{color: #fff;margin: 0 0 20rpx;}
}
</style>
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!