环境配置

This commit is contained in:
THK3121 2023-09-04 15:38:48 +08:00
parent 36084196a5
commit ea1bbb1e9d
4 changed files with 50 additions and 42 deletions

View File

@ -1,9 +1,15 @@
let httpApiThree; let httpApiThree;
let httpApi let httpApi;
// httpApi = 'https://shop.lihaink.cn' //生产
httpApi = 'https://worker-task.lihaink.cn' //生产 // 正式使用的域名
httpApiThree = 'https://worker-task.lihaink.cn' //生产 httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试
// httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 // httpApi = 'https://preview-worker-task.lihaink.cn' //预上线
// httpApi = 'https://worker-task.lihaink.cn' //正式
httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试
// httpApiThree = 'https://preview-worker-task.lihaink.cn' //预上线
// httpApiThree = 'https://worker-task.lihaink.cn' //正式
// #ifdef H5 // #ifdef H5
// httpApiThree = 'baseUrlTest' //生产 // httpApiThree = 'baseUrlTest' //生产
// #endif // #endif
@ -25,29 +31,27 @@ httpApiThree = 'https://worker-task.lihaink.cn' //生产
// } // }
module.exports = { module.exports = {
// 请求域名 格式: https://您的域名 // 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS || H5 HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL: httpApi, HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_THREE: httpApiThree,
// #endif
// #ifdef H5 // #ifdef H5
//H5接口是浏览器地址 //H5接口是浏览器地址
// HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host, // HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
// HTTP_REQUEST_URL_THREE: httpApiThree || window.location.protocol + "//" + window.location.host, // HTTP_REQUEST_URL_THREE: httpApiThree || window.location.protocol + "//" + window.location.host,
// #endif // #endif
HEADER: { HEADER: {
'content-type': 'application/json', 'content-type': 'application/json',
//#ifdef MP //#ifdef MP
'Form-type': 'routine', 'Form-type': 'routine',
//#endif //#endif
//#ifdef APP-PLUS //#ifdef APP-PLUS
'Form-type': 'app', 'Form-type': 'app',
//#endif //#endif
}, },
// 回话密钥名称 请勿修改此配置 // 回话密钥名称 请勿修改此配置
// TOKENNAME: 'X-Token', // TOKENNAME: 'X-Token',
TOKENNAME: 'token', TOKENNAME: 'token',
// 缓存时间 0 永久 // 缓存时间 0 永久
EXPIRE: 0, EXPIRE: 0,
}; };

View File

@ -72,7 +72,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 合同 --> <!-- 合同 -->
<view class="card" v-if="dataList.type==2"> <view class="card" v-if="dataList.type==2">
<view class="contract"> <view class="contract">
@ -94,12 +93,14 @@
</view> </view>
</view> </view>
<!-- 车辆信息为空 -->
<u-empty v-if="flag1" text="你还没有车辆哦,快去向平台申请用车吧" icon="../../static/img/empty/data.png"> </u-empty>
<!-- 按钮 --> <!-- 按钮 -->
<view class="btns"> <view class="btns">
<!-- 生成合同 --> <!-- 生成合同 -->
<view class="" v-if="dataList.status==-1"> <view class="" v-if="dataList.status==-1">
<u-button :disabled="false" type="primary" @click="showPop=true" <u-button type="primary" @click="showPop=true" style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32"
style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" text="申请驳回"></u-button> text="申请驳回"></u-button>
<u-button :disabled="flag1" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button> <u-button :disabled="flag1" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
</view> </view>
<!-- 审核中 --> <!-- 审核中 -->
@ -131,15 +132,12 @@
</view> </view>
<u-button v-if="dataList.status==1" :disabled="false" type="primary" text="发送合同" @tap="sendFn" <u-button v-if="dataList.status==1" :disabled="false" type="primary" text="发送合同" @tap="sendFn"
color="#0122C7"></u-button> color="#0122C7"></u-button>
<!-- <u-button v-if="flag" :disabled="false" type="primary" text="发送合同" @tap="sendMsgFn"
color="#0122C7"></u-button> -->
<u-button v-else :disabled="times" type="primary" :text="`重新发送${times?times+'s':''}`" @tap="sendAgainFn" <u-button v-else :disabled="times" type="primary" :text="`重新发送${times?times+'s':''}`" @tap="sendAgainFn"
color="#0122C7"></u-button> color="#0122C7"></u-button>
</view> </view>
</view> </view>
<!--uview 组件 --> <!--uview 组件 -->
<view class=""> <view class="">
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true" <u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
title="请输入驳回理由"> title="请输入驳回理由">
@ -180,7 +178,6 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
getAgencyDetailApi({ getAgencyDetailApi({
id: options.id id: options.id
}).then(res => { }).then(res => {
@ -192,8 +189,8 @@
if (this.dataList.status == 3) { if (this.dataList.status == 3) {
uni.navigateBack() uni.navigateBack()
} }
console.log(this.dataList.cars_info) if (this.carList.length > 0 || this.dataList.cars_info) {
if (this.carList.length >= 0 || this.dataList.cars_info) { console.log(this.dataList.cars_info)
this.flag1 = false this.flag1 = false
} }
// console.log(this.dataList) // console.log(this.dataList)

View File

@ -48,7 +48,7 @@
</view> </view>
<view class="li" v-if="datas.type"> <view class="li" v-if="datas.type">
<text>到期时间: </text> <text>到期时间: </text>
<text> {{datas.rent_time}} </text> <text> {{overDateFn(datas.rent_time) }} </text>
</view> </view>
</view> </view>
</view> </view>
@ -157,6 +157,12 @@
}, },
methods: { methods: {
//
overDateFn(date) {
var specifiedDate = new Date(date);
specifiedDate.setMonth(specifiedDate.getMonth() + 2);
return specifiedDate.toISOString().split('T')[0]
},
showContractFn(url) { showContractFn(url) {
console.log(url) console.log(url)
uni.navigateTo({ uni.navigateTo({

View File

@ -21,7 +21,8 @@ function baseRequestTwo(url, method, data, {
noAuth = false, noAuth = false,
noVerify = false noVerify = false
}) { }) {
let Url = "https://logistics.lihaink.cn", // let Url = "https://logistics.lihaink.cn",//正式环境
let Url = "https://ceshi-logistics.lihaink.cn", //测试环境
header = HEADER; header = HEADER;
if (!noAuth) { if (!noAuth) {
// 已经未登录了,禁止请求 // 已经未登录了,禁止请求