story#7189,回程车小程序司机端-迁移认证页面
This commit is contained in:
131
src/views/rvDriverAuthentication/component/auditItem.vue
Normal file
131
src/views/rvDriverAuthentication/component/auditItem.vue
Normal file
@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div class="audit_item flex flex_between">
|
||||
<div class="item_left flex">
|
||||
<img class="main_img mr15" :src="url" />
|
||||
<div class="flex_fit">
|
||||
<div class="main_title active">{{title}}</div>
|
||||
<div class="main_tip">{{tip}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pass_item" v-if="pass" @click="showDetail">
|
||||
<span>{{status}}</span>
|
||||
<img v-if="title != '审核信息'" class="arrow_icon" src="@/assets/authentication/arrow_right.png" />
|
||||
</div>
|
||||
<div class="uploadBtn" :class="{'activeBtn': currentClass }"
|
||||
v-else-if="!pass && buttonHide" @click="uploadHandler">{{buttonTitle}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "auditItem",
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
uploadHandler(){
|
||||
if( !this.pass && this.currentClass ) {
|
||||
this.$emit('upload')
|
||||
}
|
||||
},
|
||||
showDetail() {
|
||||
this.$emit('detail')
|
||||
}
|
||||
},
|
||||
props: {
|
||||
buttonHide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
default: '查看'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tip: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
default: require('@/assets/authentication/aduit_icon1.png')
|
||||
},
|
||||
pass: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
currentClass: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
buttonTitle: {
|
||||
type: String,
|
||||
default: '上传'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.audit_item {
|
||||
width: 100%;
|
||||
padding: 20px 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.item_left {
|
||||
flex: 1;
|
||||
.main_img {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.flex_fit {
|
||||
flex: 1;
|
||||
}
|
||||
.main_title {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
color: #33495E;
|
||||
}
|
||||
.active {
|
||||
color: #33495E;
|
||||
}
|
||||
.main_tip {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #33495E;
|
||||
line-height: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.uploadBtn {
|
||||
width: 68px;
|
||||
height: 31px;
|
||||
background: rgba($color: #5B739D, $alpha: 0.24);
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
border-radius: 4px;
|
||||
line-height: 31px;
|
||||
text-align: center;
|
||||
}
|
||||
.activeBtn {
|
||||
background: #3364B7;
|
||||
}
|
||||
.pass_item {
|
||||
font-size: 13px;
|
||||
color: rgba($color: #000, $alpha: 0.59);
|
||||
.arrow_icon {
|
||||
width: 8px;
|
||||
height: 12px;
|
||||
vertical-align: sub;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
56
src/views/rvDriverAuthentication/component/fixedButton.vue
Normal file
56
src/views/rvDriverAuthentication/component/fixedButton.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div class="button_fixed" :class="{ 'noBg': noBg }">
|
||||
<div class="button_wrap" @click="clickHandler">
|
||||
{{title}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "fixedButton",
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '下一步'
|
||||
},
|
||||
noBg: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickHandler() {
|
||||
this.$emit('myClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.button_fixed {
|
||||
width: 100%;
|
||||
background: #F4F5F7;
|
||||
padding: 20px 0;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1111;
|
||||
.button_wrap {
|
||||
width: calc(100% - 80px);
|
||||
height: 46px;
|
||||
background: #354D93;
|
||||
border-radius: 23px;
|
||||
margin: 0 auto;
|
||||
line-height: 46px;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.noBg {
|
||||
background: none
|
||||
}
|
||||
</style>
|
||||
282
src/views/rvDriverAuthentication/component/photoItem.vue
Normal file
282
src/views/rvDriverAuthentication/component/photoItem.vue
Normal file
@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<div class="photo_wrap">
|
||||
<template v-if="title.indexOf('责任险/货物') !== -1">
|
||||
<div class="photo_title custom-title">
|
||||
<span><span class="star">*</span>{{title}}</span>
|
||||
<radio-group @change="radioChange" class="flexWrap">
|
||||
<label class="flexWrap labelWrap" v-for="(item, index) in options" :key="item.value">
|
||||
<div class="flexWrap center"><radio :value="item.value" :checked="index == inSure" />{{item.name}}</div>
|
||||
</label>
|
||||
</radio-group>
|
||||
</div>
|
||||
<div class="photoWrap" v-if="inSure == 1">
|
||||
<template v-if="urlList.length>0">
|
||||
<div v-for="(item,index) in urlList" :key="index" @click="chooseHandler('urlList',index)">
|
||||
<img class="photo_item" mode="widthFix" :src="item.replace(/http:\/\//g, 'https://')" />
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="urlList.length < 3" @click="chooseHandler('urlList')" class="tipWrap">
|
||||
<img class="photo_item" mode="widthFix" src="@/assets/authentication/carInfo_icon5.png" />
|
||||
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||
<span class="picNum">({{urlList.length}}/3)</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="photo_title">
|
||||
<span class="star">*</span>
|
||||
<span>{{title}}</span>
|
||||
</div>
|
||||
<div class="photo_img flex flex_between">
|
||||
<div @click="chooseHandler('leftImg')">
|
||||
<template v-if="form.leftImg">
|
||||
<img class="photo_item" mode="widthFix" :src="form.leftImg.replace(/http:\/\//g, 'https://')" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<img class="photo_item" mode="widthFix" :src="leftUrl.replace(/http:\/\//g, 'https://')" />
|
||||
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||
</template>
|
||||
<div></div>
|
||||
</div>
|
||||
<div v-if="rightUrl" @click="chooseHandler('rightImg')">
|
||||
<template v-if="form.rightImg">
|
||||
<img class="photo_item" mode="widthFix" :src="form.rightImg.replace(/http:\/\//g, 'https://')" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<img class="photo_item" mode="widthFix" :src="rightUrl.replace(/http:\/\//g, 'https://')" />
|
||||
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let baseUrl=''
|
||||
if (window.location.href.includes('www.sinoassist.com')) {
|
||||
baseUrl = 'https://www.sinoassist.com'
|
||||
} else {
|
||||
baseUrl = 'https://crm1.sino-assist.com'
|
||||
}
|
||||
export default {
|
||||
name: "photoItem",
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
leftUrl: {
|
||||
type: String,
|
||||
default: require('@/assets/authentication/person_header.png')
|
||||
},
|
||||
rightUrl: {
|
||||
type: String,
|
||||
},
|
||||
show: {
|
||||
|
||||
},
|
||||
urlList: {
|
||||
type: Array,
|
||||
},
|
||||
inSure:{
|
||||
type:Number,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
leftImg: '',
|
||||
rightImg: '',
|
||||
urlList:[],
|
||||
isInsure:-1,
|
||||
},
|
||||
options:[{value:0,name:'否'},{value:1,name:'是'}],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log("inSure",this.inSure)
|
||||
},
|
||||
methods: {
|
||||
radioChange(e){
|
||||
this.form.isInsure=e?.detail?.value
|
||||
if(this.form.isInsure==0){
|
||||
this.form.urlList=[]
|
||||
this.$emit('urlList', this.form.urlList)
|
||||
}
|
||||
this.$emit('insureHandle',e?.detail?.value)
|
||||
},
|
||||
showFun() {
|
||||
if( localStorage.getItem('infoVerify') == 8 || localStorage.getItem('infoVerify') == 12 ) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
async chooseHandler(type,i) {
|
||||
console.log("type,i",type,i,baseUrl)
|
||||
return
|
||||
// #ifdef MP-WEIXIN
|
||||
// await this.weChatImage(type,i)
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
// await this.commonImage(type,i)
|
||||
// #endif
|
||||
|
||||
},
|
||||
/* commonImage(type,index) {
|
||||
uni.chooseImage({
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
uni.uploadFile({
|
||||
url: baseUrl + '/order/uploadImage', //仅为示例,非真实的接口地址
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: async (uploadFileRes) => {
|
||||
if (type=='urlList' && (index==0 || index)){
|
||||
this.$set( this.form.urlList,index,JSON.parse(uploadFileRes.data).data)
|
||||
} else if(type=='urlList'){
|
||||
this.form[type].push(JSON.parse(uploadFileRes.data).data)
|
||||
}else {
|
||||
this.form[type] = JSON.parse(uploadFileRes.data).data
|
||||
}
|
||||
this.$emit(type, this.form[type])
|
||||
},
|
||||
fail: () => {
|
||||
this.$toast('上传失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('选择照片出错', res)
|
||||
// this.$toast('选择照片出错,请重试')
|
||||
}
|
||||
})
|
||||
},
|
||||
weChatImage(type,index) {
|
||||
uni.chooseMedia({
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
count: 1,
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFiles[0].tempFilePath;
|
||||
uni.uploadFile({
|
||||
url: baseUrl + '/order/uploadImage', //仅为示例,非真实的接口地址
|
||||
filePath: tempFilePaths,
|
||||
name: 'file',
|
||||
success: async (uploadFileRes) => {
|
||||
if (type=='urlList' && (index==0 || index)){
|
||||
this.$set( this.form.urlList,index,JSON.parse(uploadFileRes.data).data)
|
||||
}else if(type=='urlList'){
|
||||
this.form[type].push(JSON.parse(uploadFileRes.data).data)
|
||||
}else{
|
||||
this.form[type] = JSON.parse(uploadFileRes.data).data
|
||||
}
|
||||
this.$emit(type, this.form[type])
|
||||
},
|
||||
fail: () => {
|
||||
this.$toast('上传失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('选择照片出错', res)
|
||||
// this.$toast('选择照片出错,请重试')
|
||||
}
|
||||
})
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/styles/common.scss";
|
||||
.photo_wrap {
|
||||
padding: 20px 12px 22px 17px;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
.photo_title {
|
||||
font-size: 14px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
.star {
|
||||
color: red;
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
.custom-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.flexWrap{
|
||||
display:flex;
|
||||
}
|
||||
.labelWrap{
|
||||
margin-left: 10px;
|
||||
}
|
||||
radio{
|
||||
width: 24px;
|
||||
transform: scale(0.7);
|
||||
transform-origin: center; /* 保持中心点不变 */
|
||||
}
|
||||
.center{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.photoWrap{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.tipWrap{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.picNum{
|
||||
position: absolute;
|
||||
z-index: 111;
|
||||
color: #206FFF ;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
div:nth-child(2n+1) {
|
||||
margin-right: 4px;
|
||||
}
|
||||
div {
|
||||
width: calc(50% - 3px);
|
||||
position: relative;
|
||||
.photo_item {
|
||||
width: 100%;
|
||||
height: 95px !important;
|
||||
}
|
||||
.camera {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 35px;
|
||||
height: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.photo_img {
|
||||
width: 100%;
|
||||
div {
|
||||
width: calc(50% - 3px);
|
||||
position: relative;
|
||||
.photo_item {
|
||||
width: 100%;
|
||||
height: 95px !important;
|
||||
}
|
||||
.camera {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 35px;
|
||||
height: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
195
src/views/rvDriverAuthentication/component/protocolDialog.vue
Normal file
195
src/views/rvDriverAuthentication/component/protocolDialog.vue
Normal file
@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<div class="privacy" v-if="showPrivacy">
|
||||
<div class="content">
|
||||
<div class="title">隐私保护指引</div>
|
||||
<div class="pop_con">
|
||||
在使用当前小程序服务之前,请仔细阅读<text class="pop_protocol" @click="openPrivacyContract">{{privacyContractName}}</text>如你同意{{privacyContractName}},请点击“同意”开始使用。
|
||||
</div>
|
||||
<div class="pop_button_wrap" :style="{'height': 50 + 'px', 'lineHeight': 50 + 'px'}">
|
||||
<div class="border_right" @click="exitMiniProgram">
|
||||
拒绝
|
||||
</div>
|
||||
<button id="agree-btn" plain="true" class="pop_confirm" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { myMixins } from '@/utils/myMixins.js';
|
||||
import twoBtn from "@/components/twoBtn";
|
||||
export default {
|
||||
name: "protocolDialog",
|
||||
data() {
|
||||
return {
|
||||
privacyContractName: '',
|
||||
showPrivacy: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
twoBtn
|
||||
},
|
||||
mixins: [myMixins],
|
||||
created() {
|
||||
if (wx.getPrivacySetting) {
|
||||
const version = wx.getAppBaseInfo().SDKVersion
|
||||
if (this.compareVersion(version, '2.32.3') >= 0) {
|
||||
wx.getPrivacySetting({
|
||||
success: (res) => {
|
||||
if (res.needAuthorization) {
|
||||
this.showPrivacy = true;
|
||||
this.privacyContractName = res.privacyContractName
|
||||
} else{
|
||||
this.$emit("agree")
|
||||
this.showPrivacy = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 低版本基础库不支持 wx.getPrivacySetting 接口,隐私接口可以直接调用
|
||||
this.$emit("agree")
|
||||
this.showPrivacy = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的生命周期
|
||||
*/
|
||||
pageLifetimes: {
|
||||
show() {
|
||||
const _ = this
|
||||
const version = wx.getAppBaseInfo().SDKVersion
|
||||
if (_.compareVersion(version, '2.32.3') >= 0) {
|
||||
wx.getPrivacySetting({
|
||||
success(res) {
|
||||
console.log('隐私设置:', res)
|
||||
if (res.errMsg == "getPrivacySetting:ok") {
|
||||
this.privacyContractName = res.privacyContractName;
|
||||
this.showPrivacy = res.needAuthorization;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 打开隐私协议页面
|
||||
openPrivacyContract() {
|
||||
wx.openPrivacyContract({
|
||||
fail: () => {
|
||||
wx.showToast({
|
||||
title: '遇到错误',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 拒绝隐私协议
|
||||
exitMiniProgram() {
|
||||
// 直接退出小程序
|
||||
wx.exitMiniProgram()
|
||||
this.showPrivacy = false
|
||||
},
|
||||
// 同意隐私协议
|
||||
handleAgreePrivacyAuthorization() {
|
||||
console.log('我点击同意了')
|
||||
this.showPrivacy = false
|
||||
this.$emit('agree')
|
||||
},
|
||||
// 比较版本号
|
||||
compareVersion(v1, v2) {
|
||||
v1 = v1.split('.')
|
||||
v2 = v2.split('.')
|
||||
const len = Math.max(v1.length, v2.length)
|
||||
|
||||
while (v1.length < len) {
|
||||
v1.push('0')
|
||||
}
|
||||
while (v2.length < len) {
|
||||
v2.push('0')
|
||||
}
|
||||
|
||||
for (let i = 0; i < len; i++) {
|
||||
const num1 = parseInt(v1[i])
|
||||
const num2 = parseInt(v2[i])
|
||||
|
||||
if (num1 > num2) {
|
||||
return 1
|
||||
} else if (num1 < num2) {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.privacy {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
z-index: 9999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.content {
|
||||
width: 632rpx;
|
||||
padding-top: 48rpx !important;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.content .title {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*登录弹框样式*/
|
||||
.pop_con {
|
||||
color: #203152;
|
||||
font-size: 14px;
|
||||
margin-bottom: 30px;
|
||||
/*text-align: left;*/
|
||||
padding: 0 20px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
}
|
||||
.pop_protocol {
|
||||
color: #1D64D2;
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
.pop_button_wrap {
|
||||
display: flex;
|
||||
border-top: 1rpx solid rgba($color: #979797, $alpha: 0.34);
|
||||
div {
|
||||
width: calc(50% - 1rpx);
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: rgba(0,0,0,0.73);
|
||||
}
|
||||
.border_right {
|
||||
border-right: 1rpx solid rgba($color: #979797, $alpha: 0.34);
|
||||
}
|
||||
.pop_confirm {
|
||||
color: #1D64D2;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
135
src/views/rvDriverAuthentication/component/successDialog.vue
Normal file
135
src/views/rvDriverAuthentication/component/successDialog.vue
Normal file
@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<div class="dialog_wrap">
|
||||
<van-popup ref="success" v-model="poupShow">
|
||||
<div class="pop_wrap">
|
||||
<img class="tip_bg" src="@/assets/authentication/tipBg.png" />
|
||||
<div class="pop_title">
|
||||
恭喜您!
|
||||
</div>
|
||||
<div class="pop_content">
|
||||
<div>
|
||||
您的信息已经认证完成,
|
||||
</div>
|
||||
<div>
|
||||
请开启您的接单赚钱之旅!
|
||||
</div>
|
||||
<div>
|
||||
关注服务号,新订单及时提醒,接单更快!
|
||||
</div>
|
||||
</div>
|
||||
<div class="tip_button_wrap">
|
||||
<div class="continue" @click="focusHandler">
|
||||
关注
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { successPopup,getMyInfo } from '@/api/authentication'
|
||||
import { myMixins } from '@/utils/myMixins.js'
|
||||
export default {
|
||||
name: "successDialog",
|
||||
data() {
|
||||
return {
|
||||
poupShow:false,
|
||||
}
|
||||
},
|
||||
mixins: [ myMixins ],
|
||||
components: {},
|
||||
methods: {
|
||||
async getMineInfo() { // 获取用户信息
|
||||
let myInfo = await getMyInfo()
|
||||
if(!( myInfo.code != 200 || !myInfo.data.phone)) {
|
||||
localStorage.setItem('phone', myInfo?.data?.phone)
|
||||
localStorage.setItem('infoVerify', myInfo?.data?.infoVerify?.code || 0) // 认证进度
|
||||
localStorage.setItem('authIsSuccess', myInfo?.data?.authIsSuccess)
|
||||
localStorage.setItem('name', myInfo?.data?.name)
|
||||
localStorage.setItem('attentionState', myInfo?.data?.attentionState)
|
||||
}
|
||||
},
|
||||
openHandler() {
|
||||
this.poupShow=true
|
||||
},
|
||||
async focusHandler() {
|
||||
let focusFlag = localStorage.getItem('attentionState'); // 是否关注过公众号的标志
|
||||
if( focusFlag ) {
|
||||
await this.continueHandler()
|
||||
} else {//去关注公众号页面
|
||||
this.goPage('https://mp.weixin.qq.com/s/VNy_ppgDTLtwTtdRV_vPgA')
|
||||
}
|
||||
},
|
||||
async continueHandler() {
|
||||
await successPopup();
|
||||
this.poupShow=false
|
||||
await this.getMineInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/styles/common.scss";
|
||||
// 弹框样式
|
||||
.pop_wrap {
|
||||
width: 304px;
|
||||
height: 267px;
|
||||
position: relative;
|
||||
.tip_bg {
|
||||
position: absolute;
|
||||
width: 304px;
|
||||
height: 267px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
.pop_title {
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
color: #3364B7;
|
||||
position: absolute;
|
||||
width: 304px;
|
||||
text-align: center;
|
||||
top: 100px;
|
||||
z-index: 101;
|
||||
}
|
||||
.pop_content {
|
||||
width: 304px;
|
||||
position: absolute;
|
||||
top: 130px;
|
||||
z-index: 101;
|
||||
font-size: 14px;
|
||||
color: #4C5361;
|
||||
div {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.tip_button_wrap {
|
||||
position: absolute;
|
||||
z-index: 101;
|
||||
width: 275px;
|
||||
margin: 0 auto;
|
||||
bottom: 14px;
|
||||
display: flex;
|
||||
border-top: 1px solid #F1F2F5;
|
||||
left: 15px;
|
||||
height: 45px;
|
||||
div {
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 45px;
|
||||
}
|
||||
.close {
|
||||
color: #999B9F;
|
||||
border-right: 1px solid #F1F2F5;
|
||||
}
|
||||
.continue {
|
||||
color: #3364B7;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
44
src/views/rvDriverAuthentication/component/tipBar.vue
Normal file
44
src/views/rvDriverAuthentication/component/tipBar.vue
Normal file
@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div class="tip_content" :style="styleCls">
|
||||
<img class="icon_tip" mode="widthFix" src="@/assets/authentication/icon_tip.png" />
|
||||
<span>{{title}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "tipBar",
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
styleCls: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tip_content{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 22px;
|
||||
line-height: 15px;
|
||||
background: #FFF0EE;
|
||||
.icon_tip{
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin-right: 6px;
|
||||
position: relative;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
span{
|
||||
font-size: 11px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FF6337;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user