Commit e2d7524f authored by linxin's avatar linxin

add:371 359 356

parent edfda19e
Pipeline #4001 canceled with stages
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
formatValue () { formatValue () {
let currency = this.$options.filters['currency'] let currency = this.$options.filters['currency']
if (!this.focused) { if (!this.focused) {
return currency(this.value) return `¥${currency(this.value)}`
} else { } else {
return this.value return this.value
} }
......
...@@ -9,17 +9,20 @@ ...@@ -9,17 +9,20 @@
<template> <template>
<h-view id="my-info"> <h-view id="my-info">
<h-header class="bar-custom"> <h-header class="bar-custom">
<div slot="center" >个人中心</div> <div slot="center">个人中心</div>
</h-header> </h-header>
<div class="top" style="margin-top:-1px;"> <div class="top" style="margin-top:-1px;">
<div class="card-top"> <div class="card-top">
<img src="@/assets/myInfo/1.png" @click="checkType" > <img :src="upLoadObj.picture" @click="checkType" >
<div class="sign"> <div class="sign">
<span>{{ user_phone }}</span> <span>{{ user_phone }}</span>
<div> <div>
电子签 电子签
<p :class="[elecStatus?'across':'un-across']" @click="certification">{{ elecStatusDesceibe }}</p> <p
:class="[elecStatus?'across':'un-across']"
@click="certification"
>{{ elecStatusDesceibe }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -60,7 +63,7 @@ ...@@ -60,7 +63,7 @@
>{{ confirmCount > 99 ? '99+' : confirmCount }}</span> >{{ confirmCount > 99 ? '99+' : confirmCount }}</span>
<img src="@/assets/myInfo/unConfirm.png" > <img src="@/assets/myInfo/unConfirm.png" >
<p>待确认</p> <p>待确认</p>
</div> --> </div>-->
<div class="content-wrap" @click="goVideoSign"> <div class="content-wrap" @click="goVideoSign">
<span <span
v-if="vedioCount > 0" v-if="vedioCount > 0"
...@@ -72,7 +75,8 @@ ...@@ -72,7 +75,8 @@
<div class="content-wrap" @click="goCarConfirm"> <div class="content-wrap" @click="goCarConfirm">
<span <span
v-if="carCount > 0" v-if="carCount > 0"
:class="{'content-wrap-class-width':carCount>99, 'content-wrap-class':carCount<99}" style="margin-left:5px;" :class="{'content-wrap-class-width':carCount>99, 'content-wrap-class':carCount<99}"
style="margin-left:5px;"
>{{ carCount > 99 ? '99+' : carCount }}</span> >{{ carCount > 99 ? '99+' : carCount }}</span>
<img src="@/assets/myInfo/carConfirm.png" > <img src="@/assets/myInfo/carConfirm.png" >
<p>发车确认</p> <p>发车确认</p>
...@@ -122,12 +126,17 @@ ...@@ -122,12 +126,17 @@
</div> </div>
</h-content> </h-content>
<role-switch <role-switch
v-show="roleSwitchFlag" ref="roleSwitch" :roleList="roleList" @roleConfirm="roleConfirm" v-show="roleSwitchFlag"
@roleCancle="roleCancle"/> ref="roleSwitch"
:roleList="roleList"
@roleConfirm="roleConfirm"
@roleCancle="roleCancle"
/>
</h-view> </h-view>
</template> </template>
<script> <script>
import roleSwitch from './role-switch-component' import roleSwitch from './role-switch-component'
import defaultImg from '../../assets/myInfo/1.png'
export default { export default {
components: { components: {
roleSwitch, roleSwitch,
...@@ -135,6 +144,10 @@ export default { ...@@ -135,6 +144,10 @@ export default {
data () { data () {
return { return {
currentVersion: process.env.currentVersion, currentVersion: process.env.currentVersion,
upLoadObj: {
picture: defaultImg,
filePath: '',
}, // 上传的图片
flag: true, flag: true,
isAGENT: false, isAGENT: false,
elecStatusDesceibe: '', elecStatusDesceibe: '',
...@@ -230,9 +243,7 @@ export default { ...@@ -230,9 +243,7 @@ export default {
// } // }
}, },
}, },
created () { created () {},
},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.userQuery() vm.userQuery()
...@@ -457,10 +468,13 @@ export default { ...@@ -457,10 +468,13 @@ export default {
}, },
checkType () { checkType () {
this.hlsPopup.showActionSheet({ this.hlsPopup.showActionSheet({
buttonArray: this.bp_id === undefined ? ['修改头像'] : ['修改头像', '用户信息', '角色切换'], buttonArray:
callback: (index) => { this.bp_id === undefined
? ['修改头像']
: ['修改头像', '用户信息', '角色切换'],
callback: index => {
if (index === 0) { if (index === 0) {
hlsPopup.showLongCenter('修改头像功能敬请期待!') this.imgUploadShow('app_user_id')
} else if (index === 1) { } else if (index === 1) {
this.changePageHead() this.changePageHead()
} else if (index === 2) { } else if (index === 2) {
...@@ -469,6 +483,115 @@ export default { ...@@ -469,6 +483,115 @@ export default {
}, },
}) })
}, },
// 图片上传入口
imgUploadShow (check_id) {
let vm = this
// vm.upload_list = []
hlsPopup.showActionSheet({
titleText: '请选择照片',
buttonArray: ['拍照', '从相册取'],
callback: index => {
if (index === 0) {
vm.imgUploadOpenCamera(check_id)
} else {
vm.imgUploadTakePicture(check_id)
}
},
})
},
imgUploadOpenCamera (check_id) {
let vm = this
let obj = {
pkvalue: check_id,
source_type: 'PRJ_CDD_ITEM_CHECK',
picture: '',
check_id: check_id,
filePath: '',
attachment_id: '',
user_id: 1,
fileName: '',
}
let cameraoptions = {
quality: 100,
}
let success = function (imgdata) {
obj.picture = imgdata
obj.filePath = imgdata
Object.assign(vm.upLoadObj, obj)
vm.save_picture(obj)
}
let error = function () {
hlsPopup.showLongCenter('请拍照')
}
hlsUtil.openCamera(cameraoptions, success, error)
},
imgUploadTakePicture (check_id) {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgUrl) {
let obj = {
pkvalue: check_id,
source_type: 'PRJ_CDD_ITEM_CHECK',
picture: '',
check_id: check_id,
filePath: '',
attachment_id: '',
user_id: 1,
fileName: '',
}
obj.picture = imgUrl
obj.filePath = imgUrl
Object.assign(vm.upLoadObj, obj)
// 拍完一张立马执行保存图片逻辑
vm.save_picture(obj)
}
let error = function () {}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
openCamera (ocrType, type) {
let vm = this
let cameraoptions = {
quality: 60,
width: 1843,
height: 1382,
}
let success = function (imgdata) {
if (!imgdata) {
hlsPopup.showLongCenter('请拍照')
}
}
let error = function () {
hlsPopup.showLongCenter('请拍照')
}
hlsUtil.openCamera(cameraoptions, success, error)
},
takePicture (ocrType, type) {
let vm = this
var cameraoptions = {
quality: 70,
width: 1843,
height: 1382,
maxCount: 1,
}
let success = function (imgUrl) {
if (imgUrl.length === 0) {
hlsPopup.showLongCenter('请选择一张图片')
}
}
let error = function () {
hlsPopup.showLongCenter(error)
}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
save_picture (obj) {
if (obj) {
hlsUtil.fileUploadSvc(obj)
} else {
hlsPopup.hideLoading()
}
},
changePageHead () { changePageHead () {
let vm = this let vm = this
if (vm.bp_id) { if (vm.bp_id) {
...@@ -591,7 +714,11 @@ export default { ...@@ -591,7 +714,11 @@ export default {
async certification () { async certification () {
let vm = this let vm = this
if (vm.bp_id) { if (vm.bp_id) {
if (vm.bp_identity === 'NP_NO' || vm.bp_identity === 'ORG_L_NO' || vm.bp_identity === 'ORG_AUTH_NO') { if (
vm.bp_identity === 'NP_NO' ||
vm.bp_identity === 'ORG_L_NO' ||
vm.bp_identity === 'ORG_AUTH_NO'
) {
let authUrl = await vm.getNpCertificationUrl() let authUrl = await vm.getNpCertificationUrl()
if (authUrl) { if (authUrl) {
vm.$router.push({ vm.$router.push({
...@@ -671,7 +798,7 @@ export default { ...@@ -671,7 +798,7 @@ export default {
align-items: center; align-items: center;
.sign { .sign {
margin-left: 24px; margin-left: 24px;
height:55px; height: 55px;
span { span {
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
font-size: 18px; font-size: 18px;
...@@ -690,7 +817,7 @@ export default { ...@@ -690,7 +817,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding:0 5px; padding: 0 5px;
height: 20px; height: 20px;
margin-left: 10px; margin-left: 10px;
border: 1px solid #fff; border: 1px solid #fff;
...@@ -700,10 +827,10 @@ export default { ...@@ -700,10 +827,10 @@ export default {
color: #ffffff; color: #ffffff;
letter-spacing: 0; letter-spacing: 0;
} }
.across{ .across {
background-color: #1D3FFF; background-color: #1d3fff;
} }
.un-across{ .un-across {
background: #0523ce; background: #0523ce;
} }
} }
...@@ -775,7 +902,7 @@ export default { ...@@ -775,7 +902,7 @@ export default {
height: 121px; height: 121px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
margin-top:18px; margin-top: 18px;
} }
.userInfo { .userInfo {
height: 45px; height: 45px;
...@@ -892,7 +1019,7 @@ export default { ...@@ -892,7 +1019,7 @@ export default {
.platform-ios { .platform-ios {
#my-info { #my-info {
button { button {
margin-bottom: 98px; margin-bottom: 98px;
} }
} }
} }
...@@ -902,7 +1029,7 @@ export default { ...@@ -902,7 +1029,7 @@ export default {
.platform-ios { .platform-ios {
#my-info { #my-info {
button { button {
margin-bottom: 98px; margin-bottom: 98px;
} }
} }
} }
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<p>本次还款</p> <p>本次还款</p>
</div> </div>
<div class="item-right"> <div class="item-right">
<p>{{ parseFloat(e.due_amount).toFixed(2)|currency }}</p> <p>{{ parseFloat(e.due_amount).toFixed(2)|currency }}</p>
<p>{{ e.received_amount|currency }}</p> <p>{{ e.received_amount|currency }}</p>
<CurrencyInput v-model="e.amount" placeholder="请输入还款金额"/></div> <CurrencyInput v-model="e.amount" placeholder="请输入还款金额"/></div>
</div> </div>
</div> </div>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
<div class="pay-input"> <div class="pay-input">
<span>应还首付款</span> <span>应还首付款</span>
<input v-model="money" type="text" placeholder="请输入支付金额" > <CurrencyInput v-model="money" placeholder="请输入支付金额"/>
<div @click="createOrder"> <div @click="createOrder">
<img src="@/assets/payment/into.png" > <img src="@/assets/payment/into.png" >
</div> </div>
...@@ -52,9 +52,12 @@ ...@@ -52,9 +52,12 @@
</template> </template>
<script> <script>
import CurrencyInput from '../../../components/currencyInput'
export default { export default {
name: 'FirstPay', name: 'FirstPay',
components: {}, components: {
CurrencyInput,
},
data () { data () {
return { return {
money: 0, money: 0,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
<div class="pay-input"> <div class="pay-input">
<span>应还保证金</span> <span>应还保证金</span>
<input v-model="money" type="number" placeholder="请输入支付金额" > <CurrencyInput v-model="money" type="number" placeholder="请输入支付金额" />
<!-- <div @click="createOrder"> <!-- <div @click="createOrder">
<img src="@/assets/payment/into.png" > <img src="@/assets/payment/into.png" >
</div> --> </div> -->
...@@ -59,8 +59,12 @@ ...@@ -59,8 +59,12 @@
</template> </template>
<script> <script>
import CurrencyInput from '../../../components/currencyInput'
export default { export default {
components: {}, components: {
CurrencyInput,
},
data () { data () {
return { return {
money: 0, money: 0,
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</div> </div>
<div> <div>
<span>应还金额</span> <span>应还金额</span>
<span class="orange">{{ detail.due_amount|currency }}</span> <span class="orange">{{ detail.due_amount|currency }}</span>
</div> </div>
</div> </div>
<div class="list"> <div class="list">
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div> <div>
<span>已还金额</span> <span>已还金额</span>
<span class="blue">{{ detail.received_amount|currency }}</span> <span class="blue">{{ detail.received_amount|currency }}</span>
</div> </div>
</div> </div>
<div class="list"> <div class="list">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<list-item :item-height="44"> <list-item :item-height="44">
<item> <item>
<div slot="name">逾期利息</div> <div slot="name">逾期利息</div>
<span slot="content">{{ money|currency }}</span> <span slot="content">{{ money|currency }}</span>
</item> </item>
</list-item> </list-item>
</section> </section>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<div class="pay-input"> <div class="pay-input">
<span>应还租金</span> <span>应还租金</span>
<input v-model="pay_rent" type="text" placeholder="请输入支付金额" > <CurrencyInput v-model="pay_rent" type="text" placeholder="请输入支付金额" />
<div @click="createOrder"> <div @click="createOrder">
<img src="@/assets/payment/into.png" > <img src="@/assets/payment/into.png" >
</div> </div>
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
</div> </div>
<div class="pay-input"> <div class="pay-input">
<span>逾期利息</span> <span>逾期利息</span>
<input v-model="liquidated_damages" readonly type="text" placeholder="请输入支付金额" > <CurrencyInput v-model="liquidated_damages" readonly type="text" placeholder="请输入支付金额" /></currencyinput></div>
</div>
</div> </div>
</div> </div>
</section> </section>
...@@ -62,9 +61,11 @@ ...@@ -62,9 +61,11 @@
</template> </template>
<script> <script>
import CurrencyInput from '../../../components/currencyInput'
export default { export default {
name: 'NewList', name: 'NewList',
components: { components: {
CurrencyInput,
}, },
data () { data () {
return { return {
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</template> </template>
<script> <script>
var CryptoJS = require('crypto-js') var CryptoJS = require('crypto-js')
export default { export default {
data () { data () {
return { return {
...@@ -65,9 +65,9 @@ export default { ...@@ -65,9 +65,9 @@ export default {
captchaKey: '123456', captchaKey: '123456',
phoneCodeTimeOut: false, phoneCodeTimeOut: false,
timer: 60000, timer: 120000,
showTimer: false, showTimer: false,
timerCount: 60, timerCount: 120,
text: '获取验证码', text: '获取验证码',
} }
}, },
...@@ -128,6 +128,8 @@ export default { ...@@ -128,6 +128,8 @@ export default {
vm.showTimer = false vm.showTimer = false
clearInterval(counter) clearInterval(counter)
vm.showTimer = false vm.showTimer = false
vm.captchaKey = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
hlsPopup.showLongCenter('验证码失效,请重新获取')
vm.timerCount = vm.timer / 1000 vm.timerCount = vm.timer / 1000
}, vm.timer) }, vm.timer)
} else { } else {
...@@ -159,7 +161,7 @@ export default { ...@@ -159,7 +161,7 @@ export default {
let vm = this let vm = this
if (!vm.phoneNumberFlag) { if (!vm.phoneNumberFlag) {
hlsPopup.showLongCenter('请输入手机号!') hlsPopup.showLongCenter('请输入手机号!')
} else if (!vm.verifiedCodeFlag) { } else if (vm.verifiedCode !== vm.captchaKey) {
hlsPopup.showLongCenter('验证码错误!') hlsPopup.showLongCenter('验证码错误!')
} else if (!vm.passwordFlag) { } else if (!vm.passwordFlag) {
hlsPopup.showLongCenter('请输入密码!') hlsPopup.showLongCenter('请输入密码!')
...@@ -170,7 +172,7 @@ export default { ...@@ -170,7 +172,7 @@ export default {
let md5passwprd = CryptoJS.MD5(vm.user_password).toString().toUpperCase() let md5passwprd = CryptoJS.MD5(vm.user_password).toString().toUpperCase()
let params = { let params = {
phone: vm.phone_number, phone: vm.phone_number,
password: md5passwprd password: md5passwprd,
} }
hlsHttp.post(url, params).then(function (res) { hlsHttp.post(url, params).then(function (res) {
if (res.result === 'S') { if (res.result === 'S') {
...@@ -184,7 +186,24 @@ export default { ...@@ -184,7 +186,24 @@ export default {
}, },
getVerifiedCode () { getVerifiedCode () {
let vm = this let vm = this
hlsPopup.showLongCenter('测试验证码为123456') let url = process.env.basePath + 'sms_verify_post'
let signcode = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
vm.captchaKey = signcode
let param = {
'info': {
'phone': vm.phone_number,
'signcode': signcode,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess('验证码已发送')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
/* let url = process.env.rootPath + '/aliyun/sms' /* let url = process.env.rootPath + '/aliyun/sms'
let params = { let params = {
phoneNumber: vm.phone_number, phoneNumber: vm.phone_number,
...@@ -213,7 +232,7 @@ export default { ...@@ -213,7 +232,7 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
@import "../styles/mixin"; @import "../styles/mixin";
.header { .header {
background-color: #00469c; background-color: @headerColor;
color: #fff; color: #fff;
.h-header-btn { .h-header-btn {
img { img {
...@@ -234,7 +253,7 @@ export default { ...@@ -234,7 +253,7 @@ export default {
.description{ .description{
.wh(100%,50px); .wh(100%,50px);
.fja(); .fja();
background-color: #00469c; background-color: @headerColor;
.sc(14px,#fff); .sc(14px,#fff);
} }
.verified-code{ .verified-code{
...@@ -243,16 +262,16 @@ export default { ...@@ -243,16 +262,16 @@ export default {
.verified-code-box{ .verified-code-box{
margin-left: 14px; margin-left: 14px;
.border-left; .border-left;
color:#0057C3; color:@headerColor;
line-height: 30px; line-height: 30px;
} }
.verified-code-des{ .verified-code-des{
font-size: 10px; font-size: 10px;
color:#0057C3; color:@headerColor;
} }
} }
.tab-content{ .tab-content{
background-color: #00469c; background-color: @headerColor;
margin: 0 2%; margin: 0 2%;
color: #fff; color: #fff;
} }
......
...@@ -65,12 +65,11 @@ export default { ...@@ -65,12 +65,11 @@ export default {
verifiedCodeFlag: false, verifiedCodeFlag: false,
passwordFlag: false, passwordFlag: false,
confirmPassword: false, confirmPassword: false,
captchaKey: '123456', captchaKey: '123456',
phoneCodeTimeOut: false, phoneCodeTimeOut: false,
timer: 60000, timer: 120000,
showTimer: false, showTimer: false,
timerCount: 60, timerCount: 120,
text: '获取验证码', text: '获取验证码',
} }
}, },
...@@ -152,6 +151,8 @@ export default { ...@@ -152,6 +151,8 @@ export default {
vm.showTimer = false vm.showTimer = false
clearInterval(counter) clearInterval(counter)
vm.showTimer = false vm.showTimer = false
vm.captchaKey = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
hlsPopup.showLongCenter('验证码失效,请重新获取')
vm.timerCount = vm.timer / 1000 vm.timerCount = vm.timer / 1000
}, vm.timer) }, vm.timer)
} else { } else {
...@@ -183,7 +184,7 @@ export default { ...@@ -183,7 +184,7 @@ export default {
let vm = this let vm = this
if (!vm.phoneNumberFlag) { if (!vm.phoneNumberFlag) {
hlsPopup.showLongCenter('请输入手机号!') hlsPopup.showLongCenter('请输入手机号!')
} else if (!vm.verifiedCodeFlag) { } else if (vm.verifiedCode !== vm.captchaKey) {
hlsPopup.showLongCenter('验证码错误!') hlsPopup.showLongCenter('验证码错误!')
} else if (!vm.passwordFlag) { } else if (!vm.passwordFlag) {
hlsPopup.showLongCenter('请输入密码!') hlsPopup.showLongCenter('请输入密码!')
...@@ -217,7 +218,25 @@ export default { ...@@ -217,7 +218,25 @@ export default {
}, },
getVerifiedCode () { getVerifiedCode () {
let vm = this let vm = this
hlsPopup.showLongCenter('测试验证码为123456') // hlsPopup.showLongCenter('测试验证码为123456')
let url = process.env.basePath + 'sms_verify_post'
let signcode = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
vm.captchaKey = signcode
let param = {
'info': {
'phone': vm.phone_number,
'signcode': signcode,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess('验证码已发送')
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
/* let url = process.env.rootPath + '/aliyun/sms' /* let url = process.env.rootPath + '/aliyun/sms'
let params = { let params = {
phoneNumber: vm.phone_number, phoneNumber: vm.phone_number,
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
.search { .search {
background-color: #fff; background-color: #fff;
padding: 8px 12px; padding: 8px 12px;
// position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 100; z-index: 100;
// margin-top: 52px; // margin-top: 52px;
...@@ -176,4 +176,31 @@ export default { ...@@ -176,4 +176,31 @@ export default {
position: absolute; position: absolute;
} }
} }
.platform-ios {
#startList {
.scrollContent {
padding-top: 2.2rem;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#startList {
.scrollContent {
padding-top: 2.62rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#startList {
.scrollContent {
padding-top: 2.62rem;
}
}
}
}
</style> </style>
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