Commit 8d133a3b authored by 14699's avatar 14699

'移动端需求优化'

parent 6b760d40
......@@ -26,7 +26,9 @@
"build:projectList:test": "set VITE_TARGET=projectList&& vite build --mode test",
"build:projectList:production": "set VITE_TARGET=projectList&& vite build --mode production",
"build:makeRepayment:test": "set VITE_TARGET=makeRepayment&& vite build --mode test",
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production"
"build:makeRepayment:production": "set VITE_TARGET=makeRepayment&& vite build --mode production",
"build:homeMessage:test": "set VITE_TARGET=homeMessage&& vite build --mode test",
"build:homeMessage:production": "set VITE_TARGET=homeMessage&& vite build --mode production"
},
"dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2",
......
......@@ -42,8 +42,8 @@ export default {
methods: {
async getBusinessToken(jumpRouter) {
if (import.meta.env.VITE_LOCAL == 'true') {
window.localStorage.setItem('userId', 5)
window.localStorage.setItem('phone', "18388105084")
window.localStorage.setItem('userId', 17) //5
window.localStorage.setItem('phone', "17864386578") //17864386578
}
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
let res = await post(`${baseURL}/app/api/app/user/token/get`, {
......
......@@ -125,14 +125,12 @@ const cascaderValue = ref('')
const currencyFormatter = (value) => currency(value.replace(/[^0-9.]*/g, ''));
const numberFormatter = function(value) {
console.log(value)
if (!value || isNaN(+value)) return '0.00'
return +value.toFixed(2)
};
function placeHolder(value, type, item = {}) {
let val = value
const typeList = {
cell: '请选择',
input: '请输入',
......@@ -140,7 +138,7 @@ function placeHolder(value, type, item = {}) {
if (type === 'cell' && isObject(item.select[0])) {
let target = item.select.find(ele => ele.value === val)
val = target?.text ?? target?.meaning
val = target?.text ?? target?.meaning ?? ''
}
if (type === 'rate') {
val = toPercent(item.value, false)
......@@ -241,7 +239,7 @@ function getClass(item) {
// 必须填写
:deep(.required .van-cell__title::before) {
content: '*';
color: red;
color: red !important;
}
// 检验失败后
......
......@@ -4,7 +4,7 @@
<section class="list">
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<Notice detail="登录后可使用完整功能" v-if="showNotice"/>
<List :finished="finished" finished-text="没有更多了">
<Empty v-if="!listValue.length" description="无计算记录" />
<ListItem v-else v-for="item in listValue" :title="item.title" :values="item.values"
......@@ -22,6 +22,7 @@ import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty, Toast } from "vant";
import ListItem from '@/components/ListItem.vue'
import Plus from '@/components/Plus.vue'
import Notice from '@/components/Notice.vue'
import api from "../api";
import { useRouter } from "vue-router";
import { usePlan } from '../store/index'
......@@ -32,8 +33,14 @@ const planStore = usePlan()
let refreshing = $ref(true);
const finished = $ref(true);
let listValue = $ref([])
let showNotice = window.localStorage.getItem('userRole') == 'tourist'?true:false
let getList = async () => {
// 游客模式 不查询
if(window.localStorage.getItem('userRole') == 'tourist') {
refreshing = false;
return
}
let list = await api.financingCalculator({ userId: window.localStorage.getItem('userId') })
if (list.rows && list.rows.length) {
list = list.rows.map(item =>
......
......@@ -64,7 +64,7 @@ onActivated(() => {
const router = useRouter();
const save = async () => {
if (isComplete) {
if (isComplete || window.localStorage.getItem('userRole') == 'tourist') {
const planStore = usePlan()
planStore.planData = {};
return router.go(-2)
......
......@@ -18,8 +18,8 @@
<section class="form-area">
<AuForm v-model="formConfig" :key="form" />
<Field class="message" v-model="suggestInformation" rows="2" :autosize="{ minHeight: 100 }" label="投诉与建议"
type="textarea" maxlength="300" placeholder="请输入你的宝贵意见(最多300字)" show-word-limit />
<Field class= "message" :class="{'fail':isSuggestClick}" v-model="suggestInformation" rows="2" :autosize="{ minHeight: 100 }" label="投诉与建议"
type="textarea" maxlength="300" placeholder="请输入你的宝贵意见(最多300字)" show-word-limit/>
</section>
<section class="sub">
......@@ -68,8 +68,10 @@ const formConfig = $ref(new AuFormClass([
}
]))
const suggestInformation = $ref('')
let isSuggestClick = $ref(false)
const save = async () => {
isSuggestClick = !suggestInformation
if (formConfig.validate() && suggestInformation.trim().length) {
let formObj = formConfig.getValues();
let res = await api.commit({suggestInformation, ...formObj})
......@@ -85,6 +87,12 @@ const save = async () => {
Toast({ message: '请将必填项填写完整', position: 'top' });
}
}
function getClass() {
let flag = false
if(suggestInformation.length > 0) flag = true
console.log(!flag&&isSuggestClick)
return [!flag&&isSuggestClick? 'fail' : '']
}
</script>
<style lang="less" scoped>
......@@ -121,9 +129,9 @@ const save = async () => {
flex-direction: column;
}
:deep(.message label) {
color: #323233;
}
/*:deep(.message label) {*/
/* color: #323233;*/
/*}*/
:deep(.message textarea) {
border: 1px solid #f1f1f1;
......@@ -136,6 +144,14 @@ const save = async () => {
content: '*';
color: red;
}
.fail{
color: red !important;
}
:deep(.fail .van-cell__title) {
color: red !important;
}
</style>
<route>
......
......@@ -2,8 +2,8 @@ import { ref } from 'vue'
import { defineStore } from 'pinia'
export const usePlan = defineStore('plan', () => {
export const usePlanData = defineStore('usePlanDataStore', () => {
const planData = ref({})
const active = ref(0)
return { planData }
})
<template>
<div class="container">
<NavBar title="合同签约" left-arrow @click-left="goBack" />
<NavBar title="合同签约" left-arrow @click-left="goBack(true)" />
<section class="list">
<Tabs v-model:active="active" title-active-color="#0277bc" color="#0277bc" @change="TabChange">
<Search v-model="searchValue" placeholder="请输入合同编号/代理店" @search="onSearch"/>
<Search v-model="searchValue" placeholder="请输入合同编号/代理店" @update:model-value="onSearch"/>
<Tab title="未签署">
<Notice detail="只对已关联的项目发送合同签约链接" />
......@@ -34,24 +34,42 @@ import { NavBar, List, PullRefresh, Tab, Tabs, Search, Toast } from "vant";
import Notice from '@/components/Notice.vue'
import SignListItem from '../components/SignListItem.vue'
import popMessage from '@/components/popMessage.vue'
import {watchEffect} from "vue";
import api from "../api";
import { useRouter } from "vue-router";
import { usePlanData } from '../store/index'
let notList = $ref([])
let alreadyList = $ref([])
const usePlanDataStore = usePlanData()
const active = $ref(0)
let active = $ref(0)
let searchValue = $ref('')
let refreshing = $ref(true);
let finished = $ref(true);
let pager = {
page: 1,
pageSize: 10
}
watchEffect(() => {
if(usePlanDataStore.active){
active = usePlanDataStore.active
}
})
const onSearch = () => {
if (active === 0) {
notList = []
} else {
alreadyList = []
}
finished = true;
refreshing = true;
pager.page = 1;
pager.pageSize = 10;
queryList()
}
......@@ -62,8 +80,13 @@ let queryList = async () => {
agencyName: searchValue,
receivets: + new Date() + '',
projectNumber: searchValue,
...pager
// ...pager
})
if (active === 0) {
notList = []
} else {
alreadyList = []
}
if (res.success && res.rows.length > 0) {
res.rows.forEach(item => {
let temp = {
......@@ -98,12 +121,14 @@ const onRefresh = () => {
}
finished = true
refreshing = true
searchValue = '';
pager.page = 1;
pager.pageSize = 10;
queryList()
};
let TabChange = () => {
usePlanDataStore.active = active
if ((active === 0 && !notList.length) || (active === 1 && !alreadyList.length)) {
onRefresh()
}
......@@ -117,13 +142,19 @@ const loadApproval = () => {
const router = useRouter();
const pdfPre = (item) => {
// router.push({ name: 'contractSign-views-pdfPre' })
router.push({ name: 'contractSign-views-pdfPreList', item: item })
if(item.esignFlowId){
router.push({ path: '/contractsign/views/pdfprelist', query: { esignFlowId: item.esignFlowId } })
} else {
Toast('未获取到签署合同,请联系管理员!');
}
}
let eSign = (eUrl) => {
// eUrl = 'http://www.baidu.com'
router.push({ path: '/contractsign/views/esign', query: { url: eUrl } })
const eSign = (eUrl) => {
if(eUrl){
router.push({ path: '/contractsign/views/esign', query: { url: eUrl } })
} else {
Toast('未获取到签署合同链接,请联系管理员!');
}
}
</script>
......@@ -142,6 +173,7 @@ let eSign = (eUrl) => {
box-sizing: border-box;
height: calc(100vh - 56vw);
overflow-y: auto;
padding-top: 10px;
}
</style>
......
......@@ -13,12 +13,15 @@ import { goBack } from "@/utils/globalFun"
import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let isLoading = $ref(true)
const page = $ref(null)
const pdfRef = $ref('')
let pageCount = $ref(1)
const pdfSource = $ref('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf')
let pdfSource = $ref(route.query.url)
watchEffect(() => {
if (isLoading) {
......
......@@ -2,36 +2,57 @@
<div class="container">
<NavBar title="合同预览列表" left-arrow @click-left="goBack" />
<section class="list">
<ListItem v-for="item in preList" :values="item.documentName" @click="jump(item.intentionId)" />
<PullRefresh v-model="refreshing" @refresh="getDailyLiquidatedDetail" class="scroll">
<List :finished="finished" finished-text="没有更多了">
<div class="item" v-for="item in preList">
<div class="left">
<img src="../../../assets/list.png"/>
<div class="title">{{item.documentName}}</div>
</div>
<div class="button-status sign" @click="jump(item)">查看</div>
</div>
</List>
</PullRefresh>
</section>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty } from "vant";
import { NavBar, List, PullRefresh, Empty, Toast} from "vant";
import ListItem from '@/components/ListItem.vue'
import api from "../api";
import { useRouter } from "vue-router";
import { useIntention } from '../store/index'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let refreshing = $ref(true);
const finished = $ref(true);
const esignFlowId = $ref(route.item.esignFlowId);
const esignFlowId = route.query.esignFlowId;
let preList = $ref([]);
const getDailyLiquidatedDetail = async () => {
const res = await api.preListQuery({"esignFlowId": esignFlowId})
refreshing = false;
if(res.success){
preList = res.rows
} else {
Toast.fail('请求失败,请联系管理员!');
Toast('请求失败,请联系管理员!');
}
};
getDailyLiquidatedDetail();
const jump = (item) => {
if(item.fileUrl){
router.push({ path: '/contractsign/views/pdfPre', query: { url: item.fileUrl } })
} else {
Toast('未获取到签署文件!');
}
}
</script>
<style scoped lang="less">
......@@ -50,5 +71,43 @@ getDailyLiquidatedDetail();
height: 100%;
overflow-y: auto;
}
.item{
width: 100%;
height: 50px;
margin:0 auto;
background-color: #fff;
margin-top:10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.left {
display: flex;
}
.item img{
width: 20px;
height: 20px;
margin-left: 16px;
}
.item .title{
font-size: 14px;
color: #656464;
margin-left: 16px;
font-weight: 600;
line-height: 20px;
}
.button-status{
width: 54px;
height: 20px;
font-size: 12px;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 15px;
}
.sign{
color: #2499FF;
}
</style>
import { post } from '@/utils/http'
const baseURL = import.meta.env.VITE_LOCAL== 'true' ? '/api' : import.meta.env.VITE_HTTP_BASE_URL
const api = {
// 消息查询
messageQuery(data = {}) {
return post(`${baseURL}/app/api/app/user/msg/notice`, data)
},
};
export default api;
const state = {};
export default {
};
<template>
<div class="container">
<div class="title-content">
<div class="title-left">最新消息</div>
<div class="title-right">{{messageTotal}}</div>
</div>
<NoticeBar v-if="messageList.length === 0" left-icon="volume-o" color="#2979FF" background="#EAF2FF" text="暂无消息"/>
<NoticeBar v-if="messageList.length>0" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="messageList[0].messageContent"/>
<NoticeBar v-if="messageList.length>1" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="messageList[1].messageContent"/>
<div class="title-content">
<div class="title-left">还款计划消息</div>
<div class="title-right">{{repaymentMessageTotal}}</div>
</div>
<NoticeBar v-if="repaymentMessageList.length=== 0" left-icon="volume-o" color="#2979FF" background="#EAF2FF" text="暂无消息"/>
<NoticeBar v-if="repaymentMessageList.length>0" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="repaymentMessageList[0].messageContent"/>
<NoticeBar v-if="repaymentMessageList.length>1" left-icon="volume-o" scrollable color="#2979FF" background="#EAF2FF" :text="repaymentMessageList[1].messageContent"/>
</div>
</template>
<script setup>
import api from "../api";
import { NoticeBar, List } from "vant";
let messageList = $ref([])
let messageTotal = $ref()
let repaymentMessageList = $ref([])
let repaymentMessageTotal = $ref()
const getList = async () => {
let res = await api.messageQuery({
readFlag: 'N'
})
if (res.success && res.rows.length > 0) {
messageList = res.rows
messageTotal = res.total + '条新消息'
}
};
getList()
const getRepaymentList = async () => {
let result = await api.messageQuery({
readFlag: 'N',
messageCode: "repaymentMessage"
})
if (result.success && result.rows.length > 0) {
repaymentMessageList = result.rows
repaymentMessageTotal = result.total + '条新消息'
}
};
getRepaymentList()
</script>
<style scoped lang="less">
.page{
background-color: #fff;
}
.container{
background-color: #fff;
}
.title-content{
display: flex;
justify-content: space-between;
height: 40px;
line-height: 40px;
padding: 0px 10px 0px 10px;
background-color: #EAF2FF;
}
</style>
<route>
{
meta: {
title: '首页消息'
}
}
</route>
......@@ -33,7 +33,7 @@
<script setup>
import { goBack } from "@/utils/globalFun"
import nation from "@/utils/nation"
import { NavBar, Button, Field, Tab, Tabs, Toast } from "vant";
import { NavBar, Button, Field, Tab, Tabs, Toast, Dialog} from "vant";
import AuForm from '@/components/AuForm.vue';
import AuFormClass from "@/components/useAuForm";
import { areaList } from '@vant/area-data';
......@@ -588,6 +588,7 @@ const fillForm = () => {
orgAddressFormConfig.clearForm()
orgContactPersonConfig.clearForm()
} else {
console.log(infoChangeStore.data)
refV01 = infoChangeStore.data.hlsBpMasterAddress?.refV01
remark = infoChangeStore.data.hlsBpMasterContactInfo?.remark
provinceId = infoChangeStore.data.hlsBpMasterAddress?.provinceId
......@@ -652,19 +653,22 @@ queryPrj()
const submit = async () => {
let obj2 = bpObj.bpClass === 'ORG'?orgAddressFormConfig.getValues() : npAddressFormConfig.getValues()
let obj3 = bpObj.bpClass === 'ORG'?orgContactPersonConfig.getValues() : npContactPersonConfig.getValues()
// let provinceId = obj2.area
// let cityId = obj2.area
// let districtId = obj2.area
obj3.dateOfBirth = moment(obj3.dateOfBirth).format('YYYY-MM-DD')
let params = { hlsBpMasterAddress: { ...obj2, refV01, provinceId, cityId, districtId}, hlsBpMasterContactInfo: { ...obj3, remark }, ...bpObj }
obj2 = obj2.addressType?{...infoChangeStore.data.hlsBpMasterAddress,...obj2,refV01, provinceId, cityId, districtId}:{}
obj3 = obj3.contactType?{...infoChangeStore.data.hlsBpMasterContactInfo,...obj3, remark }:{}
console.log(obj3)
console.log(obj3.length)
if(obj3){
obj3.dateOfBirth = obj3.dateOfBirth?moment(obj3.dateOfBirth).format('YYYY-MM-DD'):''
console.log(obj3.dateOfBirth)
}
let params = { ...bpObj, hlsBpMasterAddress: obj2, hlsBpMasterContactInfo: obj3 }
let res = await api.changeApprove(params)
if (res.success) {
Toast.success('提交成功')
setTimeout(() => {
goBack()
}, 2000);
}, 1000);
} else {
Toast.fail(res.message)
}
......@@ -683,13 +687,19 @@ const NextStepWork = () => {
};
const buttonClick = () => {
if (isOpenConfig && middleConfig.validate()) {
NextStepWork()
} else if (!isOpenConfig && !readonly && ((bpObj.bpClass === "ORG" && orgAddressFormConfig.validate() && orgContactPersonConfig.validate()) || (bpObj.bpClass === "NP" && npAddressFormConfig.validate() && npContactPersonConfig.validate()))) {
submit()
} else if (!isOpenConfig && !readonly){
checkForm()
} else {
Toast.fail('请将数据填写完整')
}
// else if (!isOpenConfig && !readonly && ((bpObj.bpClass === "ORG" && orgAddressFormConfig.validate() && orgContactPersonConfig.validate()) || (bpObj.bpClass === "NP" && npAddressFormConfig.validate() && npContactPersonConfig.validate()))) {
// submit()
// } else {
// Toast.fail('请将数据填写完整')
// }
}
const goLastPage = () => {
......@@ -706,6 +716,91 @@ const handleSelect = (value) => {
}
}
const checkForm = () => {
let contractObj = bpObj.bpClass === 'ORG'? orgContactPersonConfig.getValues():npContactPersonConfig.getValues();
let addressObj = bpObj.bpClass === 'ORG'? orgAddressFormConfig.getValues():npAddressFormConfig.getValues();
let contractCheckFlag = false;
let addressCheckFlag = false;
let addressFlag = false;
let contractFlag = false;
// 地址页时点击申请
if(active === 0 ){
// 判断地址信息是否填写完整
addressCheckFlag = bpObj.bpClass === 'ORG'? orgAddressFormConfig.validate():npAddressFormConfig.validate()
if(addressCheckFlag){
// 遍历联系人信息是否填写
Object.values(contractObj).forEach(item => {
if(item !== ''){
contractFlag = true
return item
}
})
// 联系人信息已填写信息
if(contractFlag){
// 校验联系人信息完整度
contractCheckFlag = bpObj.bpClass === 'ORG'? orgContactPersonConfig.validate():npContactPersonConfig.validate()
if(contractCheckFlag) {
submit()
} else {
active = 1
Toast.fail('请将联系人信息补充完整!')
}
} else {
Dialog.confirm({
title: '提示',
message: '是否变更联系人信息?',
confirmButtonText: '是',
cancelButtonText: '否'
}).then(() => {
active = 1
}).catch(() => {
submit()
})
}
} else {
Toast.fail('请将地址信息补充完整!')
}
} else {
// 判断联系人信息是否填写完整
contractCheckFlag = bpObj.bpClass === 'ORG'? orgContactPersonConfig.validate():npContactPersonConfig.validate()
if(contractCheckFlag){
// 遍历地址信息是否填写
Object.values(addressObj).forEach(item => {
if(item !== ''){
addressFlag = true
return item
}
})
// 地址信息已填写信息
if(addressFlag){
// 校验地址信息信息完整度
addressCheckFlag = bpObj.bpClass === 'ORG'? orgAddressFormConfig.validate():npAddressFormConfig.validate()
if(addressCheckFlag) {
submit()
} else {
active = 0
Toast.fail('请将地址信息补充完整!')
}
} else {
Dialog.confirm({
title: '提示',
message: '是否变更地址信息?',
confirmButtonText: '是',
cancelButtonText: '否'
}).then(() => {
active = 0
}).catch(() => {
submit()
})
}
} else {
Toast.fail('请将联系人信息补充完整!')
}
}
}
</script>
<style lang="less" scoped>
......
......@@ -60,13 +60,14 @@ const router = useRouter();
const getDetail = async (item) => {
let res = await api.requestDetail({ bpClass: item.bpClass, changeReqId: item.changeReqId })
if (res.success && res.rows.length && res.rows[0].hlsBpMasterAddress.length) {
if (res.success && res.rows.length>0) {
let hlsBpMasterAddress = res.rows[0].hlsBpMasterAddress[0]
hlsBpMasterAddress.area = hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN + hlsBpMasterAddress.districtIdN
if(hlsBpMasterAddress){
hlsBpMasterAddress.area = hlsBpMasterAddress.provinceIdN + hlsBpMasterAddress.cityIdN + hlsBpMasterAddress.districtIdN
}
let hlsBpMasterContactInfo = res.rows[0].hlsBpMasterContactInfo[0]
return { hlsBpMasterAddress, hlsBpMasterContactInfo }
} else {
Toast.fail('获取信息详情失败')
return {}
}
};
......@@ -77,13 +78,11 @@ const jump = async (item) => {
if (item.reqStatus && item.reqStatus === 'RETURN') {
infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress)
router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
router.push({ path: '/infochange/views/changeform', query: { isReturn: true } })
} else if (item.reqStatus && item.reqStatus !== 'RETURN') {
infoChangeStore.data = await getDetail(item)
infoChangeStore.data.bpObj = item;
if (infoChangeStore.data.hlsBpMasterAddress)
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
router.push({ path: '/infochange/views/changeform', query: { isReturn: false } })
} else {
infoChangeStore.data = {}
infoChangeStore.data.bpObj = item;
......
......@@ -108,6 +108,7 @@ let message = $ref('')
let formConfig = $ref(new AuFormClass(formRaw))
let messageDisabled = $ref(false)
let agentList = []
let checkAgentObj = {}
const router = useRouter()
......@@ -125,7 +126,8 @@ const save = async () => {
}
let validateValue = checkValues(formValueObj);
if(validateValue) {
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount})
console.log(checkAgentObj)
let res = await api.saveInfo({ remark: message, ...formValueObj, financeAmount: +formValueObj.financeAmount,...checkAgentObj})
if (res.success) {
Toast.success('已提交申请至小松融资租赁公司');
} else {
......@@ -141,21 +143,34 @@ const save = async () => {
};
const getLocation = () => {
Toast.loading({
duration: 0,
forbidClick: true,
message: '加载中...',
});
location(function (res) {
let info = JSON.parse(res);
console.log(info);
let provineReg = new RegExp(info.address.province)
let cityReg = new RegExp(info.address.city)
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
console.log(agentList);
let temp1 = agentList.filter(item => provineReg.test(item.provinceIdN));
Toast.clear();
if (temp1.length > 0) {
let temp2 = temp1.filter(item => cityReg.test(item.cityIdN))
if (temp2.length > 0) {
formConfig.setFormValue('agentBpName', 'value', temp2[0].value)
formConfig.setFormValue('agentPhone', 'value', temp2[0].cellPhone)
checkAgentObj = {
agentBpName: temp2[0].bpName,
agentBpId: temp2[0].bpId
}
} else {
formConfig.setFormValue('agentBpName', 'value', temp1[0].value)
formConfig.setFormValue('agentPhone', 'value', temp1[0].cellPhone)
checkAgentObj = {
agentBpName: temp1[0].bpName,
agentBpId: temp1[0].bpId
}
}
}
}, function (error) {
......@@ -170,7 +185,7 @@ const getFormVal = () => {
formConfig.setAll('disabled', () => true);
messageDisabled = true;
} else {
getLocation()
getLocation()
}
};
......@@ -178,6 +193,10 @@ const handleSelect = (value) => {
console.log('选择框选择后拿到的值:', value)
if(value.type === "picker"){
formConfig.setFormValue('agentPhone', 'value', value.cellPhone)
checkAgentObj = {
agentBpName: value.bpName,
agentBpId: value.bpId
}
}
};
......@@ -194,9 +213,10 @@ const handleAgent = async () => {
bpName: item.bpName,
bpCode: item.bpCode,
cellPhone: item.cellPhone,
bpId: item.bpId,
})
).map(item => {
return { text: item.bpName, value: item.bpCode, ...item }
return { text: item.bpName, value: item.bpName, ...item }
}).sort((a, b) => (a.text.localeCompare(b.text)))
formStore.agentList = agentList;
}
......
......@@ -4,7 +4,6 @@
round
position="bottom"
class="payModalStyle"
:style="{ height: '70%' }"
>
<div class="van-nav-bar-pay van-hairline--bottom" data-v-8b47ba6a="">
<div class="van-nav-bar__content">
......@@ -16,15 +15,19 @@
</div>
<div class="pay-money-content">
<Field v-model="orderAmount" type="number" label="¥" readonly />
<div class="pay-money-update" style="float: right" @click="updatAmount">修改</div>
<div class="pay-money-update" style="float: right" @click="updatAmount" v-if="isModify">修改</div>
</div>
<div class="pay-money-mode">
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>订单金额</span><!----></div>
<div class="van-cell__title"><span>应付金额</span></div>
<div class="van-cell__value_mode"><span>{{payAmount}}</span></div>
</div>
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>本次支付金额</span></div>
<div class="van-cell__value_mode"><span>{{orderAmount}}</span></div>
</div>
<div class="van-cell-mode van-cell--clickable" role="button" tabindex="0" data-v-8b47ba6a="">
<div class="van-cell__title"><span>支付方式</span><!----></div>
<div class="van-cell__title"><span>支付方式</span></div>
<div class="van-cell__value_mode"><span>{{checkArray[checked]}}</span></div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"></i>
</div>
......@@ -88,26 +91,26 @@
<!-- <Cell title="支付方式" is-link value="内容" />-->
</div>
</Popup>
<Popup v-model:show="showDialog" position="bottom" :style="{ height: '60%', padding: '20px' }">
<i class="van-badge__wrapper van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback" role="button" tabindex="0"><!----><!----><!----></i>
<div>
<div :style="{fontWeight: '600', marginLeft: '130px'}">请输入密码</div>
<div :style="{marginLeft: '135px',marginTop:'10px', marginBottom: '20px'}">
<span :style="{fontSize: '13px'}">金额:{{orderAmount}}</span>
</div>
<PasswordInput
:value="password"
:gutter="10"
:focused="showKeyboard"
@focus="showKeyboard = true"
/>
<div class="finish-pay" @click="handleFinishAmount">完成</div>
<NumberKeyboard
v-model="password"
:show="showKeyboard"
/>
</div>
</Popup>
<!-- <Popup v-model:show="showDialog" position="bottom" :style="{ height: '60%', padding: '20px' }">-->
<!-- <i class="van-badge__wrapper van-icon van-icon-cross van-popup__close-icon van-popup__close-icon&#45;&#45;top-right van-haptics-feedback" role="button" tabindex="0">&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;</i>-->
<!-- <div>-->
<!-- <div :style="{fontWeight: '600', marginLeft: '130px'}">请输入密码</div>-->
<!-- <div :style="{marginLeft: '135px',marginTop:'10px', marginBottom: '20px'}">-->
<!-- <span :style="{fontSize: '13px'}">金额:{{orderAmount}}</span>-->
<!-- </div>-->
<!-- <PasswordInput-->
<!-- :value="password"-->
<!-- :gutter="10"-->
<!-- :focused="showKeyboard"-->
<!-- @focus="showKeyboard = true"-->
<!-- />-->
<!-- <div class="finish-pay" @click="handleFinishAmount">完成</div>-->
<!-- <NumberKeyboard-->
<!-- v-model="password"-->
<!-- :show="showKeyboard"-->
<!-- />-->
<!-- </div>-->
<!-- </Popup>-->
</template>
<script setup>
......@@ -125,10 +128,11 @@ const props = defineProps({
default: {
cashflowId: '',
payAmount: '',
cfItem: '',
}
},
})
const emit = defineEmits(['payMoneyClick', 'closePage'])
const emit = defineEmits(['payMoneyClick', 'closePage', 'paySuccess', 'payFail'])
// const state = reactive({
// showDialog: true, //弹窗
......@@ -136,14 +140,18 @@ const emit = defineEmits(['payMoneyClick', 'closePage'])
const showDialog = ref(false);
const show = ref(false);
const checked = ref('ALI_PAY');
const payAmount = ref();
const orderAmount = ref();
const showModeFlag = ref(true);
const password = ref([]);
const showKeyboard = ref(true);
const checkArray = {UNION_PAY:'云闪付(银行卡)',WECHAT_PAY:'微信支付',ALI_PAY:'支付宝'};
let isModify = ref(false); // 支付金额是否可修改 现金流项目为 罚息:9,租金:1 可修改部分支付
watchEffect(() => {
payAmount.value = props.payInfoObj.payAmount
orderAmount.value = props.payInfoObj.payAmount
isModify = (props.payInfoObj.cfItem == 1 || props.payInfoObj.cfItem == 9)?true:false
})
const cancel = () => {
......@@ -159,46 +167,77 @@ const onDelete = () => {
}
const payMoney = () => {
// showDialog.value = true;
// Dialog.alert({
// // title: '标题',
// showConfirmButton: false,
// allowHtml: true,
// message: `<div>哈哈哈哈1111</div>`,
// }).then(() => {
// // on close
// });
// emit('closePage', false);
if(!checked.value){
Toast.fail('请先选择支付方式!')
}
else if(+orderAmount <= 0 || +orderAmount > +props.payInfoObj.payAmount){
Toast.fail('请输入正确的支付金额!')
else if(+orderAmount.value <= 0 || +orderAmount.value > +props.payInfoObj.payAmount){
Toast(`支付金额请输入0~${props.payInfoObj.payAmount}的金额!`)
} else {
const info = {
// payAmount: orderAmount.value,
payAmount: '0.01',
payAmount: orderAmount.value,
payType: checked.value,
cashflowId: props.payInfoObj.cashflowId
}
//emit('payMoneyClick', info);
goPayApp(info)
// if(checked.value == 'WECHAT_PAY'){
// Toast.fail('微信支付当前暂不支持!')
// } else {
goPayApp(info)
// }
}
};
const goPayApp = async (param) => {
// 下拉重置参数,重新加载
let res = await api.getPay({...param,receivets: + new Date() + '',});
console.log(res)
if(res.rows[0].qrCode){
openWebLink(res.rows[0].qrCode)
.then((res) => {console.log(res)})
.catch((err) => {console.log(err)});
}else{
Toast.fail('当前支付方式暂不支持!')
let paramsData = {}
if(res.success){
if(res.rows[0].appPayRequest){
if(param.payType == 'WECHAT_PAY'){
paramsData = {
"channel":"01",
appPayRequest:res.rows[0].appPayRequest
}
} else if(param.payType == 'ALI_PAY'){
paramsData = {
"channel":"03",
"appPayRequest":res.rows[0].appPayRequest
}
} else if(param.payType == 'UNION_PAY'){
paramsData = {
"channel":"00",
"appPayRequest":res.rows[0].appPayRequest
}
}
unifyPay(paramsData)
} else {
Toast('支付参数获取失败,请联系管理员!')
}
} else {
let message = res?res:'支付下单失败,请联系管理员!';
Toast(message)
}
};
const unifyPay = (paramsData) => {
console.log("paramsData:",paramsData)
window.unifyPayBackNormal = function(res){
console.log('UnifyPay normal = \n\n'+res)
emit('paySuccess', res);
};
window.unifyPayBackException = function(res) {
console.log('UnifyPay exception = \n\n'+res)
emit('payFail', res);
};
let params = {
className:"UnifyPayBridge",
function:"unifyPay",
params:paramsData,
successCallBack:"unifyPayBackNormal",
failCallBack:"unifyPayBackException"
}
HandBridge.postMessage(JSON.stringify(params));
};
const handleFinishAmount = () => {
showDialog.value = false;
......@@ -228,13 +267,19 @@ const handleFinishAmount = () => {
.pay-money-content{
display: flex;
width: 100%;
.van-cell {
width: 80%;
margin-left: 20px;
padding: 0;
line-height: 40px;
}
}
.pay-money-update{
/*float: left;*/
/*margin-top: -40px;*/
/*margin-right: 15px;*/
padding-left: 10px;
color: #1989fa;
margin-top: 15px;
// margin-top: 15px;
height: 40px;
line-height: 40px;
}
......@@ -282,8 +327,8 @@ const handleFinishAmount = () => {
color: #1989fa;
}
:deep(.van-cell__title.van-field__label) {
margin-top: 10px;
width: 10% ;
//margin-top: 10px;
width: 5% ;
}
:deep(.van-field__label label) {
font-size: 20px;
......@@ -301,4 +346,7 @@ const handleFinishAmount = () => {
:deep(.van-password-input__security li){
border: 1px solid #c4c4c4;
}
.pay-money-mode{
margin-bottom: 20px;
}
</style>
......@@ -6,7 +6,7 @@
<Search v-model="value" placeholder="请输入项目编号/融资金额" @update:model-value="onSearch"/>
<Notice detail="只可对已关联的项目还款" />
<PullRefresh v-model="refreshing" @refresh="onRefresh" class="scroll">
<PullRefresh v-model="refreshing" @refresh="getList" class="scroll">
<List :finished="finished" finished-text="没有更多了">
<ListItem v-for="item in listValue" :other_title="item.other_title" :title="item.title" :values="item.values"
@click="jump(item.contractId)" />
......@@ -44,9 +44,10 @@ const onSearch = (value) => {
const getList = async (param) => {
// 下拉重置参数,重新加载
let list = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),...param});
if(list.success){
list = list.rows.map(item => ({
let res = await api.getRepayPlantList({userId: window.localStorage.getItem('userId'),astrictStatus:'Y',...param});
let list = []
if(res.success){
list = res.rows.map(item => ({
...item,
title: item.contractNumber,
other_title: item.applyDate?.split(' ')[0],
......
......@@ -3,13 +3,17 @@
<section class="hint" v-if="damageDetailInfo.length<1">
<div class="detail">暂无数据</div>
</section>
<Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo">
<CollapseItem :title="item.periods" :name="index+1" :value="item.amount">
<CellGroup v-for="(k) of item.detail">
<Cell :title="k.name" :value="k.debait" :label="k.date" />
</CellGroup>
</CollapseItem>
</Collapse>
<div class="list">
<Collapse v-model="activeNames" v-for="(item, index) of damageDetailInfo">
<CollapseItem :title="item.periods" :name="index+1" :value="item.amount">
<!-- <div class="cell-item">-->
<CellGroup v-for="(k) of item.detail">
<Cell :title="k.name" :value="k.debait" :label="k.date" />
</CellGroup>
<!-- </div>-->
</CollapseItem>
</Collapse>
</div>
</template>
<script setup>
......@@ -32,14 +36,26 @@ const getDailyLiquidatedDetail = async () => {
damageDetailInfo = res.rows.map(items => ({
...items,
periods: `第${items.times}期`,
amount: currency(items.dueAmount),
amount: currency(items.sumPenaltyAmt),
detail: items.file.map(item => ({
...item,
name: `罚息`,
debait: currency(item.dueAmount),
debait: currency(item.penaltyAmt.toFixed(2)),
date: item.creationDate?.split(' ')[0]
}))
}))
if(damageDetailInfo.length > 0){
for(let i = 0; i<damageDetailInfo.length;i++){
if(+damageDetailInfo[i].deductPenaltyAmount > 0){
damageDetailInfo[i].detail.push({
...damageDetailInfo[i].detail,
name: `减免罚息`,
debait: currency(damageDetailInfo[i].deductPenaltyAmount.toFixed(2)),
date: damageDetailInfo[i].deductPenaltyDate?.split(' ')[0]
})
}
}
}
} else {
Toast.fail('请求失败,请联系管理员!');
}
......@@ -65,4 +81,13 @@ getDailyLiquidatedDetail();
color: gray;
line-height: 20px;
}
.list{
box-sizing: border-box;
height: calc(100vh - 10vw);
overflow-y: auto;
}
.cell-item{
height: 210px;
overflow-y: auto;
}
</style>
......@@ -27,20 +27,23 @@
<div class="right-item">
<span></span>
<span class="flag-button paid" v-if="item.writeOffFlag == 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
<Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span>
<span v-else-if="checkCashflow(item,index)" class="flag-button payment" @click="handleClick(item)">
支付
</span>
<span v-else-if="item.overdueStatus == 'Y'" class="flag-button overtime">
<Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.overdueStatusN}}
</span>
<span v-else class="flag-button paying">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
<Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span>
</div>
</div>
</div>
</div>
</div>
<Pay :visible="showModal" :payInfoObj="payInfo" @payMoneyClick="pay" @closePage="handleColse"/>
<Pay :visible="showModal" :payInfoObj="payInfo" @paySuccess="paySuccessFunction" @payFail="payFailFunction" @closePage="handleColse"/>
</template>
<template #footer>
</template>
......@@ -65,24 +68,44 @@ let cashflow = []
let payInfo = $ref({});
let showModal = ref(false);
const route = useRoute()
const router = useRouter();
const handleClick = (item) => {
showModal.value = true
payInfo = {cashflowId:item.cashflowId,payAmount:item.obligation}
payInfo = {cashflowId:item.cashflowId,payAmount:item.obligation,cfItem:item.cfItem}
}
const handleColse = (param) => {
showModal.value = param;
}
const pay = (value) => {
// console.log(value, value.showDialog);
// payInfo.value = value;
// showDialog.value = true;
// console.log(showDialog.value)
// console.log(payInfo.value)
}
const router = useRouter();
// 支付成功回调
const paySuccessFunction = (result) => {
showModal.value = false;
//{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
let message = '支付成功!'
Dialog.confirm({
title: '提示',
message: message,
showCancelButton: false
}).then(() => {
getRepayPlanInfo();
})
};
// 支付失败回调
const payFailFunction = (result) => {
showModal.value = false;
//{"resultCode":"1000","resultMsg":"用户取消了云闪付支付"}
let message = result.resultMsg?result.resultMsg:'支付失败,请联系管理员!'
Dialog.confirm({
title: '提示',
message: message,
showCancelButton: false
}).then(() => {
getRepayPlanInfo();
})
};
const goDamagesDetail = () => {
router.push({ name: 'makeRepayment-views-liquidatedDamagesDetails' })
......
......@@ -26,14 +26,14 @@
</div>
<div class="right-item">
<span></span>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
<span class="flag-button paid" v-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
<span class="flag-button overtime" v-else-if="item.overdueStatus === 'Y'">
<Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.overdueStatusN}}
</span>
<span class="flag-button overtime" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}}
<span class="flag-button paying" v-else>
<Icon style="margin-right: 1px;padding-top: 2px;" name="info-o" />{{item.writeOffFlagN}}
</span>
</div>
</div>
......
......@@ -237,6 +237,7 @@ const submit = async () => {
showMessagePop = false;
let res = await api.contractBind({
projectLeaseItemId: shouldSaveContractId.toString(),
phone: secondFormConfig.tel,
receivets: + new Date() + ''
})
isRead = true;
......
......@@ -10,7 +10,13 @@ const api = {
//还款计划明细
getRepaymentDetails(data={}){
return post(`${baseURL}/app/api/app/project/repayment/details`, data)
},
// 发票下载
downloadInvoice(data={}){
return post(`${baseURL}/app/api/app/repayment/payment/invoice/get`, data)
}
};
export default api;
......
......@@ -5,5 +5,6 @@ import { defineStore } from 'pinia'
export const useIntention = defineStore('formStore', () => {
const repayPlanData = ref({})
const contractId = ref('')
return { repayPlanData, contractId }
const invoiceList = ref([])
return { repayPlanData, contractId, invoiceList}
})
<template>
<div class="container">
<NavBar title="发票列表" left-arrow @click-left="goBack" />
<section class="list">
<PullRefresh class="scroll">
<List :finished="finished" finished-text="没有更多了">
<div class="item" v-for="item in preList">
<div class="left">
<img src="../../../assets/list.png"/>
<div class="title">{{item.documentName}}</div>
</div>
<div class="button-status sign" @click="jump(item)">查看</div>
</div>
</List>
</PullRefresh>
</section>
</div>
</template>
<script setup>
import { goBack,HIPSDownLoad} from "@/utils/globalFun"
import { NavBar, List, PullRefresh, Empty, Toast} from "vant";
import ListItem from '@/components/ListItem.vue'
import api from "../api";
import { useRoute, useRouter } from "vue-router";
import { useIntention } from "../store";
const route = useRoute();
const router = useRouter();
let refreshing = $ref(true);
const finished = $ref(true);
const formStore = useIntention()
let preList = $ref(formStore.invoiceList);
// const getDailyLiquidatedDetail = async () => {
// const res = await api.preListQuery({"esignFlowId": esignFlowId})
// refreshing = false;
// if(res.success){
// preList = res.rows
// } else {
// Toast('请求失败,请联系管理员!');
// }
// };
// getDailyLiquidatedDetail();
const jump = (item) => {
if(item.downloadUrl){
if (/.pdf/.test(item.downloadUrl)) {
router.push({ path: '/repayPlan/views/invoicePre', query: { url: item.downloadUrl } })
// HIPSDownLoad(item.downloadUrl)
} else {
HIPSDownLoad(item.downloadUrl)
// Toast('发票文件格式有误,请联系管理员!');
}
} else {
Toast('未获取到签署文件!');
}
}
</script>
<style scoped lang="less">
.list {
box-sizing: border-box;
height: calc(100vh - var(--van-nav-bar-height));
display: flex;
flex-direction: column;
justify-content: space-between;
padding-top: 8px;
padding-bottom: 10px;
}
.scroll {
box-sizing: border-box;
height: 100%;
overflow-y: auto;
}
.item{
width: 100%;
height: 50px;
margin:0 auto;
background-color: #fff;
margin-top:10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.left {
display: flex;
}
.item img{
width: 20px;
height: 20px;
margin-left: 16px;
}
.item .title{
font-size: 14px;
color: #656464;
margin-left: 16px;
font-weight: 600;
line-height: 20px;
}
.button-status{
width: 54px;
height: 20px;
font-size: 12px;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 15px;
}
.sign{
color: #2499FF;
}
</style>
<template>
<div class="container">
<NavBar title="发票查看" left-arrow @click-left="goBack" />
<div class="content">
<VuePdfEmbed ref="pdfRef" :source="pdfSource" :page="page" @rendered="handleDocumentRender"></VuePdfEmbed>
</div>
</div>
</template>
<script setup>
import { goBack } from "@/utils/globalFun"
import { NavBar, Toast } from "vant";
import VuePdfEmbed from 'vue-pdf-embed'
import { watchEffect } from 'vue'
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
let isLoading = $ref(true)
const page = $ref(null)
const pdfRef = $ref('')
let pageCount = $ref(1)
const pdfSource = $ref('')
let iframeUrl = $ref(route.query.url)
watchEffect(() => {
if (isLoading) {
Toast.loading({ message: '加载中...', forbidClick: true, overlay: true, duration: 0 });
} else {
Toast.clear()
}
})
const handleDocumentRender = (args) => {
console.log(args)
isLoading = false
pageCount = pdfRef.pageCount
}
</script>
<style lang="less" scoped>
.content {
height: calc(100% - var(--van-nav-bar-height));
overflow-y: auto;
}
.vue-pdf-embed {
}
</style>
......@@ -25,16 +25,16 @@
</p>
</div>
<div class="right-item">
<span>明细</span>
<span class="flag-button paying" v-if="item.writeOffFlag === 'NOT'">
<Icon name="clock-o" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button paid" v-else-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button overtime" v-else>
<Icon style="margin-right: 1px;" name="info-o" />{{item.writeOffFlagN}}
</span>
<span @click="downloadInvoice(item)">明细</span>
<span class="flag-button paid" v-if="item.writeOffFlag === 'FULL'">
<Icon name="passed" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span>
<span class="flag-button overtime" v-else-if="item.overdueStatus === 'Y'">
<Icon style="margin-right: 1px;padding-top: 2px;" name="info-o" />{{item.overdueStatusN}}
</span>
<span class="flag-button paying" v-else>
<Icon name="clock-o" style="margin-right: 1px;padding-top: 2px;" />{{item.writeOffFlagN}}
</span>
</div>
</div>
</div>
......@@ -49,12 +49,13 @@
<script setup>
import RepayPlan from '@/components/RepayPlan.vue'
import { goBack } from "@/utils/globalFun"
import { Icon } from 'vant'
import {useRoute} from 'vue-router'
import { Icon, Toast} from 'vant';
import { useRouter } from "vue-router";
import api from "../api";
import { currency } from "@/utils/textFormat"
import { currency } from "@/utils/textFormat";
import { useIntention } from "../store";
const router = useRouter();
const formStore = useIntention()
let currencyObj = $ref({})
let cashflow = []
......@@ -75,6 +76,21 @@ const getRepayPlanInfo = async () => {
}
}
getRepayPlanInfo()
const downloadInvoice = async (item) => {
const res = await api.downloadInvoice({"cashflowId": item.cashflowId})
if(res.success) {
if(res.rows.length >0){
formStore.invoiceList = res.rows;
router.push({ path: '/repayPlan/views/invoiceList'})
} else {
Toast('未获取到发票信息,请联系业务员!')
}
} else {
let message = res.message?res.message:'未获取到发票信息,请联系业务员!';
Toast(message)
}
}
</script>
<style lang="less" scoped>
......
......@@ -145,7 +145,10 @@ export async function HlpsUpload(source, target, headers, successCb) {
// 判断还有可返回的路由吗? 无则退出
export const goBack = (isExit = false) => {
if (Object.prototype.toString.call(isExit) === "[object PointerEvent]") isExit = false
console.log('isExit',isExit)
console.log(Object.prototype.toString.call(isExit))
console.log('window.history.state.position',window.history.state.position)
if (Object.prototype.toString.call(isExit) === "[object PointerEvent]" || Object.prototype.toString.call(isExit) === "[object MouseEvent]") isExit = false
if (window.history.state.position > 0 && !isExit) {
window.history.back();
return
......@@ -159,4 +162,4 @@ export const goBack = (isExit = false) => {
failCallBack: "onError",
};
HandBridge.postMessage(JSON.stringify(args));
};
\ No newline at end of file
};
......@@ -185,7 +185,6 @@ export function post(url, param = {}) {
url,
data: {...param, _token: window.localStorage.getItem('_token')},
}).then((res) => {
console.log('返回参数',res)
if(res.code == '403'){
Dialog.alert({
title: "提示",
......
......@@ -20,6 +20,9 @@ export function bridgeLogin() {
loginAccount: object.loginAccount,
pushExtra: object.pushExtra
}
if(object.loginAccount === '15826841439'){
window.localStorage.setItem('userRole', 'tourist')
}
window.localStorage.setItem('userId', object.userId)
window.localStorage.setItem('phone', phone)
resolve(data)
......
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