Commit 5e439375 authored by 王建文's avatar 王建文

首页图片替换

parent fc15b8e6
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"',
CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV), CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV),
debug: true, debug: false,
isMobilePlatform: true, isMobilePlatform: false,
loginPath: '"http://210.12.156.64:9090/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ', loginPath: '"http://210.12.156.64:9090/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://210.12.156.64:9090/r/api/interface?sysName=XCMG_UAT&apiName="', basePath: '"http://210.12.156.64:9090/r/api/interface?sysName=XCMG_UAT&apiName="',
rootPath: '"http://210.12.156.64:9090/r/api"', rootPath: '"http://210.12.156.64:9090/r/api"',
......
...@@ -11,5 +11,5 @@ module.exports = { ...@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://210.12.156.64:9090/r/api"', ocrPath:'"http://210.12.156.64:9090/r/api"',
fileUploadSvcPath:'"http://210.12.156.64:9090/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="', fileUploadSvcPath:'"http://210.12.156.64:9090/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"3.6.2"' currentVersion: '"3.6.6"'
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<template> <template>
<input <input
:value="formatValue" :readonly="disable" type="text" :value="formatValue" :readonly="disable" type="text"
@blur="onBlur" @click="keyboradShow();onFocus($event)"> @focus="onFocus" @blur="onBlur" @click="keyboradShow">
</template> </template>
<script> <script>
...@@ -15,10 +15,20 @@ export default { ...@@ -15,10 +15,20 @@ export default {
value: { value: {
default: '', default: '',
}, },
check: {
default: '',
},
allCheck: {
default: '',
},
// disable: { // disable: {
// type: Boolean, // type: Boolean,
// default: true, // default: true,
// }, // },
readonly: {
type: Boolean,
default: false,
},
content: { content: {
type: String, type: String,
default: '', default: '',
...@@ -34,8 +44,8 @@ export default { ...@@ -34,8 +44,8 @@ export default {
}, },
filter: { filter: {
uncurrency (val) { uncurrency (val) {
if (!val) return '' if (!val) return null
return Number((val).replace(/,|%/gi, '')) return (Number((val).replace(/,/gi, ''))) === 0 ? 0 : Number((val).replace(/,/gi, ''))
}, },
}, },
computed: { computed: {
...@@ -43,7 +53,7 @@ export default { ...@@ -43,7 +53,7 @@ export default {
let currency = this.$options.filters['rate'] let currency = this.$options.filters['rate']
if (!this.focused) { if (!this.focused) {
if (this.value !== '' && this.value !== null) { if (this.value !== '' && this.value !== null) {
return `${currency(this.value*100)}%` return `${currency(this.value)}%`
} }
} else { } else {
return this.value return this.value
...@@ -53,6 +63,7 @@ export default { ...@@ -53,6 +63,7 @@ export default {
methods: { methods: {
keyboradShow () { keyboradShow () {
let vm = this let vm = this
if (!vm.readonly) {
hlsPopup.showNumberKeyborad({ hlsPopup.showNumberKeyborad({
title: '数字键盘', title: '数字键盘',
keyDown: (text) => { keyDown: (text) => {
...@@ -62,22 +73,25 @@ export default { ...@@ -62,22 +73,25 @@ export default {
vm.onDelete() vm.onDelete()
}, },
}) })
}
}, },
onInput (value) { onInput (value) {
// if (this.disable) return // if (this.disable) return
// let uncurrency = this.$options.filter['uncurrency'] if (this.value === '0' || this.value === '0.00') {
// this.newVal = uncurrency(this.value) this.newVal = ''
this.newVal += ('' + value)
} else {
this.newVal = this.value this.newVal = this.value
if (this.newVal.includes('.') && value === '.') {
if (this.newVal !=''&&this.newVal.includes('.') && value === '.') {
} else { } else {
this.newVal += ('' + value) this.newVal += ('' + value)
} }
this.$emit('input', this.newVal/100) }
this.$emit('input', this.newVal)
}, },
onDelete () { onDelete () {
this.newVal = '' this.newVal = ''
this.$emit('input', this.newVal/100) this.$emit('input', this.newVal)
}, },
// onInput: function (value) { // onInput: function (value) {
// if (this.disable) return // if (this.disable) return
...@@ -87,13 +101,12 @@ export default { ...@@ -87,13 +101,12 @@ export default {
// }, // },
onFocus (event) { onFocus (event) {
// if (this.disable) return // if (this.disable) return
debugger
let vm = this let vm = this
this.focused = true this.focused = true
let value = (event.target.value).trim() let value = event.target.value
let uncurrency = this.$options.filter['uncurrency'] event.target.value = ''
let newVal = uncurrency(value) event.target.value = value
event.target.value = newVal
setTimeout(function () { setTimeout(function () {
let dom = document.querySelector('.content') let dom = document.querySelector('.content')
let veiwHeight = vm.getClientHeight() let veiwHeight = vm.getClientHeight()
...@@ -108,26 +121,37 @@ export default { ...@@ -108,26 +121,37 @@ export default {
ele.setAttribute('class', 'add-height') ele.setAttribute('class', 'add-height')
ele.style.height = (fontS - result + 44) + 'px' ele.style.height = (fontS - result + 44) + 'px'
ele.style.background = '#fff' ele.style.background = '#fff'
// setTimeout(() => { // setTimeout(() => {
dom.appendChild(ele) dom.appendChild(ele)
// }, 100) // }, 100)
dom.scrollTop = scrollTop + (fontS - result + 44) dom.scrollTop = scrollTop + (fontS - result + 44)
// dom.scrollTo(dom.scrollLeft, scrollTop + (256 - result)) // dom.scrollTo(dom.scrollLeft, scrollTop + (256 - result))
} }
console.log(veiwHeight, eleHeight, scrollTop, result) console.log(veiwHeight, eleHeight, scrollTop, result, fontS)
event.target.type = 'text' event.target.type = 'text'
event.target.value = newVal event.target.focus()
// event.target.focus()
}, 0) }, 0)
}, },
onBlur (event) { onBlur (event) {
// if (this.disable) return // if (this.disable) return
if (this.check && this.check < 1000) {
hlsPopup.showLongCenter('设备单价不能小于1000元!')
}
if (this.allCheck && this.allCheck < 1000) {
hlsPopup.showLongCenter('设备总价不能小于1000元!')
}
if (document.querySelector('.add-height')) { if (document.querySelector('.add-height')) {
document.querySelector('.content').removeChild(document.querySelector('.add-height')) document.querySelector('.content').removeChild(document.querySelector('.add-height'))
} }
event.target.type = 'text' event.target.type = 'text'
event.target.blur()
this.focused = false this.focused = false
setTimeout(function () {
document.getElementsByTagName('body')[0].style.height = window.innerHeight + 'px'
}, 50)
}, },
// 取窗口可视范围的高度 // 取窗口可视范围的高度
getClientHeight () { getClientHeight () {
var clientHeight = 0 var clientHeight = 0
...@@ -138,7 +162,6 @@ export default { ...@@ -138,7 +162,6 @@ export default {
} }
return clientHeight return clientHeight
}, },
// 取窗口滚动条高度
getOffsetTop (obj) { getOffsetTop (obj) {
var tmp = obj.offsetTop var tmp = obj.offsetTop
var node = obj.offsetParent var node = obj.offsetParent
......
This diff is collapsed.
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
padding: 0 6px; padding: 0 6px;
.card { .card {
background: url("../../assets/homePage/home-card@2x.png") no-repeat; background: url("../../assets/homePage/home-card1@2x.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
height: 160px; height: 160px;
......
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
opacity: 0; opacity: 0;
} }
#login { #login {
background: url("../assets/login/background@3x.png") no-repeat; background: url("../assets/login/background1@3x.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
background-position-x: 0px; background-position-x: 0px;
color: #ffffff; color: #ffffff;
......
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
#register { #register {
.content { .content {
background: url("../assets/login/register-back@3x.png") no-repeat; background: url("../assets/login/register-back1@3x.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
...@@ -395,7 +395,6 @@ export default { ...@@ -395,7 +395,6 @@ export default {
} }
} }
.return { .return {
opacity: 1; opacity: 1;
background: #fff; background: #fff;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<p>推荐使用农行卡,农行卡支付免收手续费!</p> <p>推荐使用农行卡,农行卡支付免收手续费!</p>
</div> </div>
<div class="my-card"> <div class="my-card">
<div class="top"> <!-- <div class="top">
<div class="left"> <div class="left">
<img src="@/assets/userBind/bankIcon.png" class="icon" > <img src="@/assets/userBind/bankIcon.png" class="icon" >
<span class="top-word"> <span class="top-word">
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</span> </span>
</div> </div>
<img src="@/assets/userBind/add.png" class="icon-right" @click="sendFlag" > <img src="@/assets/userBind/add.png" class="icon-right" @click="sendFlag" >
</div> </div> -->
<div class="clear" /> <!-- <div class="clear" />
<div class="card-content"> <div class="card-content">
<ul> <ul>
<li v-for="(item,index) in getBankList" :key="index"> <li v-for="(item,index) in getBankList" :key="index">
...@@ -48,6 +48,51 @@ ...@@ -48,6 +48,51 @@
</li> </li>
</ul> </ul>
</div> </div>
</div> -->
<div class="modal-content">
<div class="modal-content-add-top">
<span>添加银行卡</span>
<!-- <img src="@/assets/userBind/close.png" @click="hideModal"> -->
</div>
<!-- <img-->
<!-- v-if="!bankImg"-->
<!-- src="@/assets/userBind/addBack.png"-->
<!-- class="addBack"-->
<!-- @click="ocrShow('bankCard', '')"-->
<!-- >-->
<!-- <img-->
<!-- v-if="bankImg"-->
<!-- :src="bankImg"-->
<!-- class="addBack"-->
<!-- style="height: 38%;"-->
<!-- @click="ocrShow('bankCard', '')"-->
<!-- >-->
<list-item :item-height="44" class="card-Info" style="margin-top: 50px;">
<item>
<div slot="name">账户名称</div>
<input slot="content" v-model="bank_lists.bank_account_name" placeholder="请输入账户名称">
</item>
<item>
<div slot="name">开户行</div>
<input
slot="content"
v-model="bank_lists.bank_full_name"
placeholder="请输入开户行"
>
</item>
<item>
<div slot="name">银行账号</div>
<input
slot="content"
v-model="bank_lists.bank_account_num"
placeholder="请输入银行账号"
>
</item>
<item>
<div slot="name">联行号</div>
<input slot="content" v-model="bank_lists.bank_branch_name" placeholder="请输入联行号">
</item>
</list-item>
</div> </div>
<bottom-tab class="footer-button"> <bottom-tab class="footer-button">
<tab-button class="save" @click.native="addCheck">提交</tab-button> <tab-button class="save" @click.native="addCheck">提交</tab-button>
...@@ -57,21 +102,21 @@ ...@@ -57,21 +102,21 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-content-add-top"> <div class="modal-content-add-top">
<span>添加银行卡</span> <span>添加银行卡</span>
<img src="@/assets/userBind/close.png" @click="hideModal"> <!-- <img src="@/assets/userBind/close.png" @click="hideModal"> -->
</div> </div>
<!-- <img--> <!-- <img-->
<!-- v-if="!bankImg"--> <!-- v-if="!bankImg"-->
<!-- src="@/assets/userBind/addBack.png"--> <!-- src="@/assets/userBind/addBack.png"-->
<!-- class="addBack"--> <!-- class="addBack"-->
<!-- @click="ocrShow('bankCard', '')"--> <!-- @click="ocrShow('bankCard', '')"-->
<!-- >--> <!-- >-->
<!-- <img--> <!-- <img-->
<!-- v-if="bankImg"--> <!-- v-if="bankImg"-->
<!-- :src="bankImg"--> <!-- :src="bankImg"-->
<!-- class="addBack"--> <!-- class="addBack"-->
<!-- style="height: 38%;"--> <!-- style="height: 38%;"-->
<!-- @click="ocrShow('bankCard', '')"--> <!-- @click="ocrShow('bankCard', '')"-->
<!-- >--> <!-- >-->
<list-item :item-height="44" class="card-Info" style="margin-top: 50px;"> <list-item :item-height="44" class="card-Info" style="margin-top: 50px;">
<item> <item>
<div slot="name">账户名称</div> <div slot="name">账户名称</div>
...@@ -104,7 +149,7 @@ ...@@ -104,7 +149,7 @@
<tab-button class="add-card" @click.native="addBankInfo">添加</tab-button> <tab-button class="add-card" @click.native="addBankInfo">添加</tab-button>
</bottom-tab> </bottom-tab>
</h-modal> </h-modal>
</h-view> </div></h-view>
</template> </template>
<script> <script>
import backImg1 from '@/assets/userBind/nong.png' import backImg1 from '@/assets/userBind/nong.png'
...@@ -159,6 +204,30 @@ export default { ...@@ -159,6 +204,30 @@ export default {
// 提交前校验 // 提交前校验
addCheck () { addCheck () {
let vm = this let vm = this
if (!this.bank_lists.bank_account_num || !this.bank_lists.bank_account_name || !this.bank_lists.bank_full_name) {
this.bank_card_flag = false
this.hlsPopup.showLongCenter('银行信息不完整!')
} else {
this.bank_card_flag = true
}
// 银行卡验证this.hlsUtil.isBankAccount(this.bank.bank_account_num)
if (this.hlsUtil.isBankAccount(this.bank_lists.bank_account_num)) {
this.bank_card_flag = false
this.hlsPopup.showLongCenter('请输入正确银行账号!')
}
if (this.bank_card_flag) {
this.hlsPopup.showLoading('请稍候')
let url = $config.basePath + 'bp_bank_save'
let param = {
master: {
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
bank_lists: [this.bank_lists],
},
}
let vm = this
vm.hlsHttp.post(url, param).then(function (res) {
if (res.result === 'S') {
let url = process.env.basePath + 'bp_attachment_check' let url = process.env.basePath + 'bp_attachment_check'
let param = { let param = {
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id, bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
...@@ -176,6 +245,9 @@ export default { ...@@ -176,6 +245,9 @@ export default {
} }
}) })
} }
}
})
}
}, },
// 银行卡查询 // 银行卡查询
getBankInfo () { getBankInfo () {
...@@ -383,7 +455,7 @@ export default { ...@@ -383,7 +455,7 @@ export default {
let url = $config.basePath + 'auth_user_sign' let url = $config.basePath + 'auth_user_sign'
let param = { let param = {
phone: window.localStorage.user_phone, phone: window.localStorage.user_phone,
bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id bp_id: JSON.parse(window.localStorage.getItem('handleUser')).bp_id,
} }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
...@@ -536,9 +608,9 @@ export default { ...@@ -536,9 +608,9 @@ export default {
} }
.modal-content { .modal-content {
width: 100%; width: 100%;
height: 75%; // height: 75%;
position: absolute; // position: absolute;
top: 25%; // top: 25%;
background-color: #fff; background-color: #fff;
overflow-y: scroll; overflow-y: scroll;
......
This diff is collapsed.
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