Commit 66a0a202 by cen

Merge branch 'SAAS+V5.0.0-1014' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.0.0-1014

2 parents f447045b 1adc4cfa
import http from '../request/signHttp'
// ${pathEnum.evaluation}
import { gscPost } from '../request/signHttp'
module.exports = {
/** 评估单列表 */
evalOrderList(data) {
console.log(http)
return http.post(`/evalOrder/page`, {
return gscPost(`/evalOrder/page`, {
...data
})
},
/** 评估单详情 */
evalOrderDetail(data) {
return http.post(`/evalOrder/detail`, {
return gscPost(`/evalOrder/detail`, {
...data
})
},
/** 评估单创建 */
evalOrderCreate(data) {
return http.post(`/evalOrder/create`, {
return gscPost(`/evalOrder/create`, {
...data
})
},
/** 评估单分页状态数量 */
evalOrderPageCount(data) {
return http.post(`/evalOrder/pageCount`, {
return gscPost(`/evalOrder/pageCount`, {
...data
})
},
/** 评估单更新 */
evalOrderUpdate(data) {
return http.post(`/evalOrder/edit`, {
return gscPost(`/evalOrder/edit`, {
...data
})
},
/** 评估单重新报价 */
evalOrderOwnerReQuote(data) {
return http.post(`/evalOrder/ownerReQuote`, {
return gscPost(`/evalOrder/ownerReQuote`, {
...data
})
},
/** 签订买卖合同 */
evalOrderSignContract(data) {
return http.post(`/evalOrder/signingSaleContract`, {
return gscPost(`/evalOrder/signingSaleContract`, {
...data
})
},
/** 评估单取消合同 */
evalOrderCancelContract(data) {
return http.post(`/evalOrder/cancelSaleContract`, {
return gscPost(`/evalOrder/cancelSaleContract`, {
...data
})
},
/** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) {
return http.post(`/confirmVehicleDelivery/reSubmit`, {
return gscPost(`/confirmVehicleDelivery/reSubmit`, {
...data
})
},
/** 确认交车 */
confirmDelivery(data) {
return http.post(`/confirmVehicleDelivery/confirmVehicleDelivery`, {
return gscPost(`/confirmVehicleDelivery/confirmVehicleDelivery`, {
...data
})
},
/** 支付定金 */
payDepositApplication(data) {
return http.post(`/applyPayment/payDepositApplication`, {
return gscPost(`/applyPayment/payDepositApplication`, {
...data
})
},
/** 发起代保管协议签署 */
signAgreement(data) {
return http.post(`/applyPayment/payFinal`, {
return gscPost(`/applyPayment/payFinal`, {
...data
})
},
/** 检查代保管协议签署状态 */
checkSignAgreement(data) {
return http.post(`/applyPayment/checkSignAgreement`, {
return gscPost(`/applyPayment/checkSignAgreement`, {
...data
})
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return http.post(`/evalOrder/checkRepeat`, {
return gscPost(`/evalOrder/checkRepeat`, {
...data
})
},
/** 车辆ocr识别 */
vinOcr(data) {
return http.post(`/evalOrder/vinOcr`, {
return gscPost(`/evalOrder/vinOcr`, {
...data
})
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return http.post(`/evalOrder/carLicenseOcr`, {
return gscPost(`/evalOrder/carLicenseOcr`, {
...data
})
},
/** 获取合同详情 */
getContractDetail(data) {
return http.post(`/evalElectronicContract/getDetail`, {
return gscPost(`/evalElectronicContract/getDetail`, {
...data
})
},
/** 获取保管人列表 */
getCustodyAgreementList(data) {
return http.post(`/custodyAgreement/custodyAgreementList`, {
return gscPost(`/custodyAgreement/custodyAgreementList`, {
...data
})
},
/** 新增保管人 */
addCustodyAgreement(data) {
return http.post(`/custodyAgreement/addCustodyAgreement`, {
return gscPost(`/custodyAgreement/addCustodyAgreement`, {
...data
})
},
/** 发送代保管人协议 */
sendCustodyAgreement(data) {
return http.post(`/custodyAgreement/sendCustodyAgreement`, {
return gscPost(`/custodyAgreement/sendCustodyAgreement`, {
...data
})
},
/** 销售协议预览 */
salesAgreementPreview(data) {
return http.post(`/evalOrder/salesAgreementPreview`, {
return gscPost(`/evalOrder/salesAgreementPreview`, {
...data
})
}
......
import http from '../request/http'
import signHttp from '../request/signHttp'
import { gscPost } from '../request/signHttp'
module.exports = {
/** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid (data) {
......@@ -41,7 +42,7 @@ module.exports = {
* 查询员工是否需要填写二手车日报
*/
checkUsedCarStaffDailyReportValid (data) {
return signHttp.post('/carDailyReport/yesterday/check', {
return gscPost('/carDailyReport/yesterday/check', {
...data
})
},
......
import { add } from 'lodash'
import http from '../request/signHttp'
import { gscPost } from '../request/signHttp'
module.exports = {
/** 二手车驻店日报列表 */
getCarDailyReportList(data) {
return http.post('/carDailyReport/list', {
getCarDailyReportList (data) {
return gscPost('/carDailyReport/list', {
...data
})
},
/**
* 新增二手车驻店日报
*/
addCarDailyReport(data) {
return http.post('/carDailyReport/add', {
addCarDailyReport (data) {
return gscPost('/carDailyReport/add', {
...data
})
},
/**
* 二手车驻店日报详情
*/
getCarDailyReportDetail(data) {
return http.post('/carDailyReport/detail', {
getCarDailyReportDetail (data) {
return gscPost('/carDailyReport/detail', {
...data
})
},
/**
* 修改二手车驻店日报
*/
editCarDailyReport(data) {
return http.post('/carDailyReport/edit', {
editCarDailyReport (data) {
return gscPost('/carDailyReport/edit', {
...data
})
},
......
import { Request } from 'glsk-toolkit'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from '../../env'
const HOST = {
scrm: domain,
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
const request = new Request({
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: async () => await getSid()
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
uni.hideLoading()
uni.showToast({
title: error.msg || '请求失败',
icon: 'none'
})
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
module.exports = {
gscPost: (url, data, _config = {}) => {
if(!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
return uni.$signHttp.post(url, data, _config)
}
})
async function getSid() {
const { sessionId } = uni.$storage?.get() || {}
console.log('sessionId3333322', sessionId)
return sessionId
}
export default request
}
\ No newline at end of file
......@@ -15,7 +15,14 @@ import logger from './utils/logger'
import { Storage } from './utils/cache/index'
import api from './api/index'
import Track from './utils/Track'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from './env'
const HOST = {
scrm: domain,
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
uni.$api = api
// uni.$lock = false
uni.$storage = new Storage()
......@@ -26,6 +33,56 @@ uni.$logger = logger
uni.$dbTempRecord = new DBRecord()
uni.$dbManager = new DBManager()
uni.$track = new Track()
uni.signHttpConfig = {
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: _ => uni.$storage?.get('sessionId')
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
return Promise.reject(error)
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
}
}
!(async _ => {
await uni.$dbManager.init()
await uni.$dbTempRecord.init()
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
......@@ -10,20 +17,46 @@
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</template>
</view>
</view>
<view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
<component
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view>
</view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
<NoticePopup
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
</view>
</template>
......@@ -53,7 +86,7 @@ export default {
UploadProofOfPayment,
OrderDetail
},
data() {
data () {
return {
toolComponentName: '',
transmissionOfData: null,
......@@ -63,16 +96,20 @@ export default {
selectedDays: []
}
},
onLoad(options) {
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate
if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate
if (currentDate) this.setCurrentDate(currentDate)
})
},
methods: {
async entranceClick(item) {
setCurrentDate (currentDate) {
this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换
......@@ -116,11 +153,11 @@ export default {
// 打开弹窗
this.$refs.notice.open()
},
backPage() {
backPage () {
uni.navigateBack()
},
// name:跳转组件名,val:跳转参数
jump(name, val) {
jump (name, val) {
this.toolComponentName = name
console.log(this.toolComponentName, val)
if (val) {
......
......@@ -96,6 +96,15 @@
</template>
<script type="text/ecmascript-6">
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import { Request } from 'glsk-toolkit'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from '@/env'
const HOST = {
scrm: domain,
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
export default {
data () {
return {
......@@ -127,6 +136,8 @@ export default {
}
},
onLoad (options) {
console.log(HOST, '===')
this.setToolkitConfig()
if (options.mobile) this.mobile = options.mobile
const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid)
......@@ -275,7 +286,58 @@ export default {
this[key] = numbers ? numbers.join('') : ''
this.dateKey[key] = Date.now()
}, 0)
}
},
setToolkitConfig () {
uni.$signHttp = new Request({
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: _ => uni.$storage?.get('sessionId')
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
return Promise.reject(error)
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
}
})
console.log(uni.$signHttp)
},
},
};
</script>
......
......@@ -88,10 +88,10 @@ export default {
},
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate
if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate
if (currentDate) this.setCurrentDate(currentDate)
})
},
onBackPress (options) {
......@@ -105,6 +105,10 @@ export default {
return false
},
methods: {
setCurrentDate (currentDate) {
this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
......
......@@ -43,5 +43,6 @@ export const STORAGE_OBJECTKEY = {
noticeTopInfo: 'noticeTopInfo',
studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting'
boutique_YQorderSetting: 'boutique_YQorderSetting',
sessionId:'sessionId'
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!