Compare commits

...

2 Commits

Author SHA1 Message Date
zhj 7acd925e18 chore:app认证调整 1 month ago
zhj 4bc5c3bb83 app认证调整 1 month ago
  1. 9
      config/addr.js
  2. 23
      config/language.js
  3. 1184
      pages/functions/proxyPayment.vue
  4. 1469
      pages/home/index.vue
  5. 18
      pages/login.vue
  6. 324
      pages/mine/info/index.vue
  7. 22
      pages/mine/info/merchant/edit.vue
  8. 300
      pages/mine/info/merchant/index.vue
  9. 489
      pages/mine/info/proxy/edit.vue
  10. 308
      pages/mine/info/proxy/index.vue
  11. 264
      pages/mine/login.vue

9
config/addr.js

@ -1,9 +1,10 @@
export const addr = {
cn: {
province: [
["万象", "阿速坡", "博乔", "波里坎赛", "占巴塞", "华潘省",
"甘蒙", "琅南塔", "琅勃拉邦", "乌多姆赛", "丰沙里", "沙拉湾",
"沙湾拿吉", "塞孔", "万象", "赛宋奔", "沙耶武里", "川圹省"
province:[
[
"阿速坡[Attapu]","博乔","波里坎赛[Bolikhamsai]","占巴塞", "华潘省","甘蒙[Khammouan]","琅南塔",
"琅勃拉邦","万象市","乌多姆赛[Oudomxai]","丰沙里省","沙拉湾[Salavan]","沙湾拿吉",
"塞孔","万象省","赛宋奔[Saysomboun]","沙耶武里[赛耶布利]","川圹省[川圹省]"
],
["普冯","沙玛奇赛","萨南赛","三峡","赛色塔[Saysetha]"],
],

23
config/language.js

@ -323,7 +323,8 @@ export const LGC_data = {
cannotbeNUll: "不能为空",
idType: '证件类型',
area: '地区',
address: '详细地址'
address: '详细地址',
},
wallet: {
@ -577,7 +578,13 @@ export const LGC_data = {
income: "收入",
outcome: "支出",
quota: "限额",
noLimit: "无限制"
noLimit: "无限制",
agree: "同意",
disagree: "不同意",
eContract: "电子合同",
agentContract: "代理电子合同",
contrtent: "授权范围:甲方授权乙方在合同有效期内,通过线上渠道代理销售/推广甲方指定产品/服务,乙方不得超范围经营。代理期限:本合同自____年____月____日起生效,至____年____月____日止,期满可续签。权利义务:甲方应提供合法合规的产品及相关资料;乙方须遵守平台规则,维护品牌形象,不得从事虚假或误导性宣传。结算方式:甲乙双方按约定比例分成或支付佣金,结算周期为每月/每季度一次,具体以实际交易为准。保密义务:双方应对在合作中获知的商业信息严格保密,未经对方书面同意,不得向第三方披露。合同效力:本合同为电子合同,具有法律效力,自双方在线确认签署之日起成立。"
}
},
English: {
@ -1146,7 +1153,12 @@ export const LGC_data = {
income: "Income",
outcome: "Outcome",
quota: "Limit",
noLimit: "No Limit"
noLimit: "No Limit",
"agree": "Agree",
"disagree": "Disagree",
eContract: "Electronic Contract",
agentContract: "Agent Electronic Contract",
contrtent: "Authorization Scope: Party A authorizes Party B to act as an agent for the sale/promotion of specified products/services through online channels during the validity period of this contract. Party B must not exceed the authorized scope. Agency Duration: This contract will take effect from __year__ __month__ __day__ and will expire on __year__ __month__ __day__. It can be renewed upon expiration. Rights and Obligations: Party A should provide legitimate and compliant products and related materials; Party B must comply with platform rules, maintain brand image, and refrain from false or misleading advertising. Settlement Method: Both parties will share profits or pay commissions according to agreed ratios. Settlement cycles are monthly/quarterly, based on actual transactions. Confidentiality Obligation: Both parties must keep business information obtained during cooperation strictly confidential and may not disclose it to third parties without written consent from the other party. Contract Validity: This electronic contract has legal effect and becomes effective from the date of online confirmation and signing by both parties."
}
},
Laos: {
@ -1712,6 +1724,11 @@ export const LGC_data = {
outcome: "ລາຍຈ່າຍ",
quota: "ຂອບເຂດ",
noLimit: "ບໍ່ຈຳກັດ",
agree: "ຕົກລົງ",
disagree: "ບໍ່ຕົກລົງ",
eContract: "ສັນຍາອຸ່ງເວັບ",
agentContract: "ສັນຍາຕົວແທນອຸ່ງເວັບ",
contrtent: "ຂັດແຍ່ງອະນຸຍາດ: ຕົວຢ່າງທີ 1 ອະນຸຍາດໃຫ້ຕົວຢ່າງທີ 2 ສຳລັບການຂາຍ/ການປະກັນສິນຄ້າ/ບໍລິການທີ່ກຳນົດໄວ້ຜ່ານຊ່ອງທາງອອນໄລໃນອະນຸດີພາຍໃນສັນຍາ. ຕົວຢ່າງທີ 2 ບໍ່ສາມາດຈັດການເຮັດວຽກເພີ່ມເຕີມອອກໄປຈາກຂັດແຍ່ງທີ່ກຳນົດໄວ້. ພາຍໃນການຕັ້ງຕົວແທນ: ສັນຍານີ້ຈະມີຜົນກະທູ້ຈາກວັນ____ເດືອນ____ປີ____ແລະຈະສິ້ນສຸດໃນວັນ____ເດືອນ____ປີ____. ສາມາດຕ่อເຕີມໄດ້. ຄວາມຮັບຜັດ/ໝວດຕໍ່: ຕົວຢ່າງທີ 1 ຕ້ອງມີການມອບເອກະສານທີ່ຖຶກຕ້ອງຕາມກົດໝາຍ; ຕົວຢ່າງທີ 2 ຕ້ອງປະຕິບັດຕາມກົດໝາຍຂອງພື້ນຖານ, ຖືກຕ້ອງຮັກສາຮື້ງມະນະຂອງບໍລິສັດ, ບໍ່ສາມາດປະກາດຂໍ້ມູນບໍ່ຖຶກຕ້ອງຫຼືການປະກາດທີ່ກ້າໃຫ້ຜິດຕາມ. ວິທີການຈ່າຍ: ຕົວຢ່າງທີ 1 ແລະຕົວຢ່າງທີ 2 ຄືນເງິນຕາມອັດຕາທີ່ກຳນົດໄວ້ຫຼືຈ່າຍຄັມມິഷັນ, ຜະລິດຈາກການເຮັດທຸລະກິດທີ່ແທ້ຈິງ. ຄວາມລັບລູ້: ລາວກັບລາວຕ້ອງຮັກສາຂໍ້ມູນທີ່ໄດ້ຮັບຮູ້ໃນການຮ່ວມມືຫນ້າຕາມ, ຖ້າບໍ່ໄດ້ຮับໃບຮັບຮອງຈາກອີກເຫົ້າໜຶ່ງບໍ່ສາມາດເປີດເຜີຍໃຫ້ຜູ້ທີສາມຮູ້. ດຳເນີນການສັນຍາ: ສັນຍາອຸ່ງເວັບນີ້ມີຜົນກະທັບຕາມກົດໝາຍ, ຈາກວັນທີ່ທັງສອງເຫົ້າໜຶ່ງຍຳຍອມຮັບ/ລົງເຊັນ."
}
}

1184
pages/functions/proxyPayment.vue

File diff suppressed because it is too large

1469
pages/home/index.vue

File diff suppressed because it is too large

18
pages/login.vue

@ -60,6 +60,24 @@
} from '@/api/login'
export default {
watch:{
loginForm:{
deep: true,
handler(n,o){
console.log(n.password,'===>',o.password, o)
if(n.password.indexOf('per') >= 0 ){
this.loginForm.username = '15288887777'
this.loginForm.password = '123456'
}else if(n.password.indexOf('mer') >= 0){
this.loginForm.username = '15288888888'
this.loginForm.password = '123456'
}else if(n.password.indexOf('age') >= 0){
this.loginForm.username = '15288889999'
this.loginForm.password = '123456'
}
}
}
},
data() {
return {
languageData: null,

324
pages/mine/info/index.vue

@ -1,140 +1,208 @@
<template>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<uni-list style="background-color: aliceblue;">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.userType" :rightText="languageData.me.personalAccount" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.nickname')" :rightText="user.fullName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" />
</uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.contact')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" :title="$t('me.info.gender')" :rightText="getGender()" />
</uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view v-if="user.status === 2">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" />
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" />
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" />
</view>
<view v-else style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="languageData.me.failureReason" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)" class="submit-btn">{{languageData.me.authImme}}</button>
<button @click="goAuth(1)" v-show="user.status === '1' || user.status === '2' || user.status === '3'" class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
</view>
</uni-list>
</view>
<button @click="modifySimple(1)" v-show="user.status === '2' || true" class="submit-btn" style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<view v-show="false" style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px; padding-bottom: 60rpx;">
<view v-show="user.status === 2" style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;">
<u-icon
:label="$t('me.info.cerPic')"
size="16"
name="fingerprint"
></u-icon>
<view style="display: flex; width: 100%; overflow-x: auto;">
<u--image style="margin-left: 12px;" v-for="img in [...imgList,]"
:showLoading="true"
:src="img"
width="80px"
height="80px"
></u--image>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<InfoItem :ph="languageData.me.personalAccount" :title="languageData.me.userType"
icon-name="person-filled" :ro="true"></InfoItem>
<InfoItem v-model="user.fullName" icon-name="person-filled" :title="$t('me.info.nickname')" :ro="!true">
</InfoItem>
<InfoItem :ph="user.registerTime" icon-name="calendar-filled" :title="$t('me.info.registerDate')"
:ro="true"></InfoItem>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.contact')}}</view>
<uni-list>
<InfoItem :ph="user.phone" :title="$t('me.info.phone')"
icon-name="phone-filled" :ro="true"></InfoItem>
<InfoItem v-model="user.email" :ph="languageData.me.email" :title="languageData.me.email"
icon-name="email-filled" :ro="false"></InfoItem>
<InfoItem v-model="user.merchantName" icon-name="location-filled" :title="languageData.functions.BelongingRegion"
:ro="false">
<view @click="addrClick('a')">
<u--input style="pointer-events: none;" :value="user.area" inputAlign="right" border="none" :readonly="true" clearable ></u--input>
</view>
</InfoItem>
<InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.functions.detailedAddress"
icon-name="location-filled" :ro="false"></InfoItem>
<InfoItem v-show="false" v-model="user.commonContactAddress" :ph="languageData.me.address"
:title="languageData.me.address" icon-name="location-filled" :ro="false"></InfoItem>
</uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
:title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
:title="languageData.me.failureReason" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
class="submit-btn">{{languageData.me.authImme}}</button>
<button @click="goAuth(1)"
v-show="user.status === '1' || user.status === '2' || user.status === '3'"
class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
</view>
</uni-list>
</view>
<button @click="modifySimple()" v-show="['1','2','3'].includes(user.status)" class="submit-btn"
style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<view v-show="false"
style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px; padding-bottom: 60rpx;">
<view v-show="user.status === 2"
style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;">
<u-icon :label="$t('me.info.cerPic')" size="16" name="fingerprint"></u-icon>
<view style="display: flex; width: 100%; overflow-x: auto;">
<u--image style="margin-left: 12px;" v-for="img in [...imgList,]" :showLoading="true" :src="img"
width="80px" height="80px"></u--image>
</view>
</view>
</view>
<u-picker :show="showAddr" ref="uPicker"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
</view>
</view>
</template>
<script>
import { getUserProfile } from "@/api/system/user"
import {
getUserProfile,
updateUserProfile
} from "@/api/system/user"
import InfoItem from '@/components/auth/InfoItem.vue'
import { addr } from "@/config/addr";
export default {
data() {
return {
imgList:['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
},
watch:{
languageData(){
uni.setNavigationBarTitle({
title: this.$languageData.navBar.userInfo
});
export default {
components: {
InfoItem
},
data() {
return {
texts: '0',
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData: {},
addrData:{},
showAddr: false,
}
},
onLoad() {
this.getUser();
if(uni.getLocale() == 'en'){
this.addrData = addr.en
}else if(uni.getLocale() == 'zh-Hans'){
this.addrData = addr.cn
}else{
this.addrData = addr.laos
}
this.languageData = this.$languageData;
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/edit')
},
methods: {
addrClick(type){
if(this.step === 2) return
this.showAddr = true
},
addrChg(e){
const {columnIndex,value,values, index,picker = this.$refs.uPicker} = e
// ()
if (columnIndex === 0) {
// pickerthis
picker.setColumnValues(1, this.addrData.district[index])
}
},
addrConf(e){
console.log(e)
this.user.area = e.value[0]+' / '+e.value[1]
this.showAddr = false
},
addrClose(e){
this.showAddr = false
},
modifySimple() {
if(this.user.area && this.user.area.length > 0 && this.user.area && this.user.area.length > 0)
this.user.commonContactAddress = this.user.area + '/' + this.user.address
updateUserProfile(this.user).then(res => {
if (res.code === 200) {
this.$store.dispatch('GetInfo').then(res => {
setTimeout(() => {
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
// uni.navigateBack()
})
},
getGender() {
if (this.user.gender == null || this.user.gender.length == 0)
return ''
else
return this.user.gender == '0' ? this.$t('com.gender.female') : this.$t('com.gender.male')
},
getUser() {
getUserProfile().then(response => {
this.user = response.data
if(this.user.commonContactAddress){
let addr = this.user.commonContactAddress
let idx = addr.lastIndexOf('/')
this.user.area = addr.substring(0, idx)
this.user.address = addr.substring(idx+1)
}
console.log(response.data)
})
},
goAuth(flag) {
//
if (flag === 0) {
uni.navigateTo({
url: '/pages/mine/info/edit'
})
} else { //
uni.navigateTo({
url: '/pages/mine/info/edit?checkOnly=1'
})
}
},
getStatus(status) {
switch (status) {
case '1':
return this.languageData.me.aduiting
case '2':
return this.languageData.me.passed
case '3':
return this.languageData.me.fail
default:
return this.languageData.me.unAuthed
}
}
}
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/edit')
},
methods: {
getGender(){
if(this.user.gender == null || this.user.gender.length == 0)
return ''
else
return this.user.gender=='0' ? this.$t('com.gender.female'):this.$t('com.gender.male')
},
getUser() {
getUserProfile().then(response => {
this.user = response.data
console.log(response.data)
})
},
goAuth(flag){
//
if(flag === 0){
uni.navigateTo({
url:'/pages/mine/info/edit'
})
}else{//
uni.navigateTo({
url:'/pages/mine/info/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
case '1':
return this.languageData.me.aduiting
case '2':
return this.languageData.me.passed
case '3':
return this.languageData.me.fail
default:
return this.languageData.me.unAuthed
}
}
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>

22
pages/mine/info/merchant/edit.vue

@ -37,8 +37,8 @@
<u-radio-group :disabled="step === 2" v-model="formData.licenseType" placement="row"
style="justify-content: space-around;" >
<u-radio size="25" :customStyle="{marginBottom: '8px'}"
v-for="(item, index) in [{label:languageData.functions.passport,name:'0'},
{label:languageData.functions.idCard, name:'1'}]"
v-for="(item, index) in [{label:languageData.functions.passport,name:0},
{label:languageData.functions.idCard, name:1}]"
:key="index" :label="item.label" :name="item.name">
</u-radio>
</u-radio-group>
@ -126,8 +126,8 @@
</view>
<uni-forms-item v-show="true" style="align-items: left;" :label="languageData.me.runImg" name="cardImg">
<view>
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4" @afterRead="afterRead"
@delete="deletePic" name="4" multiple :maxCount="1">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList5" @afterRead="afterRead"
@delete="deletePic" name="5" multiple :maxCount="1">
</u-upload>
</view>
</uni-forms-item>
@ -199,6 +199,7 @@
fileList2:[],
fileList3:[],
fileList4:[],
fileList5:[],
formData: {},
rules: {
},
@ -258,11 +259,11 @@
if(this.formData.legalPersonIdCard === '' || this.formData.legalPersonIdCard == null)
msg += ' '+this.$languageData.me.leId+' '
if(this.fileList1 == null || this.fileList1.size === 0)
if((this.fileList1 == null || this.fileList1.size === 0) && this.formData.licenseType == 1)
msg += ' '+this.$languageData.me.leupIdImg+' '
if(this.fileList2 == null || this.fileList2.size === 0)
if((this.fileList2 == null || this.fileList2.size === 0) && this.formData.licenseType == 1)
msg += ' '+this.$languageData.me.lebackIdImg+' '
if(this.fileList3 == null || this.fileList3.size === 0)
if((this.fileList3 == null || this.fileList3.size === 0) && this.formData.licenseType == 1)
msg += ' '+this.$languageData.me.leholdIdImg+' '
if(this.formData.area == null || this.formData.area === 0)
@ -276,6 +277,8 @@
if(this.fileList4 == null || this.fileList4.size === 0)
msg += ' '+this.$languageData.me.runImg+' '
if((this.fileList5 == null || this.fileList5.size === 0) && this.formData.licenseType == 0)
msg += ' '+this.$languageData.functions.passport+' '
}
if(msg.length > 0){
this.$modal.msg(msg+this.$languageData.me.cannotbeNUll)
@ -347,6 +350,9 @@
if(this.formData.businessLicenseImage)
this.fileList4 = [{type: "image", url: this.formData.businessLicenseImage,
thumb: this.formData.businessLicenseImage, status:"sucess"}]
if(this.formData.passportImagePath)
this.fileList5 = [{type: "image", url: this.formData.passportImagePath,
thumb: this.formData.passportImagePath, status:"sucess"}]
if(this.formData.gender == null) this.formData.gender = ''
})
@ -363,6 +369,8 @@
this.formData.legalPersonUserWithIdCardImagePath = this.fileList3[0].url
if(this.fileList4.length > 0)
this.formData.businessLicenseImage = this.fileList4[0].url
if(this.fileList5.length > 0)
this.formData.passportImagePath = this.fileList5[0].url
this.formData.commonContactAddress = this.formData.area + '/' + this.formData.commonContactAddress
this.$refs.form.validate().then(res => {

300
pages/mine/info/merchant/index.vue

@ -1,131 +1,189 @@
<template>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="this.$languageData.me.accType" :right-text="$languageData.me.merchantAcc" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="this.$languageData.me.merchanrName" :rightText="user.merchantName"/>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" />
</uni-list>
</view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px;">
<view style="font-weight: 500;">{{$t('me.info.contact')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" />
</uni-list>
</view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px; padding-bottom: 60rpx;">
<view style="font-weight: 500;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view v-if="user.status === 2">
<!-- <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="this.$languageData.me.authenticationType" :rightText="'身份证'" /> -->
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" />
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" />
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" />
</view>
<view v-else style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$languageData.me.failRes" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)" class="submit-btn">{{$languageData.me.authImme}}</button>
<button @click="goAuth(1)" v-show="user.status === '1' || user.status === '2' || user.status === '3'" class="submit-btn">{{user.status === '3' ? $languageData.me.reAuth:$languageData.me.checkAuth}}</button>
</view>
</uni-list>
<view v-show="user.status === 2" style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;">
<u-icon
:label="$t('me.info.cerPic')"
size="16"
name="fingerprint"
></u-icon>
<view style="display: flex; width: 100%; overflow-x: auto;">
<u--image style="margin-left: 12px;" v-for="img in [...imgList,]"
:showLoading="true"
:src="img"
width="80px"
height="80px"
@click="click"
></u--image>
</view>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<InfoItem :ph="$languageData.me.merchantAcc" :title="languageData.me.userType" icon-name="person-filled"
:ro="true"></InfoItem>
<InfoItem v-model="user.merchantName" icon-name="person-filled" :title="languageData.me.merchanrName"
:ro="false">
</InfoItem>
<InfoItem :ph="user.registerTime" icon-name="calendar-filled" :title="$t('me.info.registerDate')"
:ro="true"></InfoItem>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.contact')}}</view>
<uni-list>
<InfoItem :ph="user.phone" :title="$t('me.info.phone')"
icon-name="phone-filled" :ro="true"></InfoItem>
<InfoItem v-model="user.contactPersonPhone" :ph="languageData.me.lePhone"
:title="languageData.me.lePhone" icon-name="phone-filled" :ro="false"></InfoItem>
<InfoItem v-model="user.contactPersonEmail" :ph="languageData.me.leMail" :title="languageData.me.leMail"
icon-name="email-filled" :ro="false"></InfoItem>
<InfoItem icon-name="location-filled" :title="languageData.me.runArea"
:ro="false">
<view @click="addrClick('a')">
<u--input style="pointer-events: none;" :value="user.area" inputAlign="right" border="none" :readonly="true" clearable ></u--input>
</view>
</InfoItem>
<InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.me.addrDetail"
icon-name="location-filled" :ro="false"></InfoItem>
</uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
:title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
:title="languageData.me.failureReason" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
class="submit-btn">{{languageData.me.authImme}}</button>
<button @click="goAuth(1)"
v-show="user.status === '1' || user.status === '2' || user.status === '3'"
class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
</view>
</uni-list>
</view>
<button @click="modifySimple()" v-show="['1','2','3'].includes(user.status)" class="submit-btn"
style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<u-picker :show="showAddr" ref="uPicker"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
</view>
<button @click="modifySimple(1)" v-show="user.status === '2' || true" class="submit-btn" style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
</view>
</template>
<script>
import { getMerchantProfile } from "@/api/system/user"
import InfoItem from '@/components/auth/InfoItem.vue'
import {
getMerchantProfile,
updateMerchantProfile
} from "@/api/system/user"
import { addr } from "@/config/addr";
export default {
data() {
return {
imgList:['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/merchant/edit')
},
methods: {
getUser() {
getMerchantProfile().then(response => {
this.user = response.data
console.log(response.data)
})
},
goAuth(flag){
//
if(flag === 0){
uni.navigateTo({
url:'/pages/mine/info/merchant/edit'
})
}else{//
uni.navigateTo({
url:'/pages/mine/info/merchant/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
case '1':
return this.$languageData.me.aduiting
case '2':
return this.$languageData.me.passed
case '3':
return this.$languageData.me.fail
default:
return this.$languageData.me.unAuthed
}
}
}
}
export default {
components: {
InfoItem
},
data() {
return {
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData: {},
showAddr: false,
addrData: '',
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
if(uni.getLocale() == 'en'){
this.addrData = addr.en
}else if(uni.getLocale() == 'zh-Hans'){
this.addrData = addr.cn
}else{
this.addrData = addr.laos
}
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/merchant/edit')
},
methods: {
addrClick(type){
this.showAddr = true
},
addrChg(e){
const {columnIndex,value,values, index,picker = this.$refs.uPicker} = e
// ()
if (columnIndex === 0) {
// pickerthis
picker.setColumnValues(1, this.addrData.district[index])
}
},
addrConf(e){
console.log(e)
this.user.area = e.value[0]+' / '+e.value[1]
this.showAddr = false
},
addrClose(e){
this.showAddr = false
},
modifySimple() {
if(this.user.area && this.user.area.length > 0 && this.user.area && this.user.area.length > 0)
this.user.operateAddress = this.user.area + '/' + this.user.address
updateMerchantProfile(this.user).then(res => {
if (res.code === 200) {
this.$store.dispatch('GetInfo').then(res => {
setTimeout(() => {
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
})
},
getUser() {
getMerchantProfile().then(response => {
this.user = response.data
if(this.user.operateAddress){
let addr = this.user.operateAddress
let idx = addr.lastIndexOf('/')
this.user.area = addr.substring(0, idx)
this.user.address = addr.substring(idx+1)
}
console.log(response.data)
})
},
goAuth(flag) {
//
if (flag === 0) {
uni.navigateTo({
url: '/pages/mine/info/merchant/edit'
})
} else { //
uni.navigateTo({
url: '/pages/mine/info/merchant/edit?checkOnly=1'
})
}
},
getStatus(status) {
switch (status) {
case '1':
return this.$languageData.me.aduiting
case '2':
return this.$languageData.me.passed
case '3':
return this.$languageData.me.fail
default:
return this.$languageData.me.unAuthed
}
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>

489
pages/mine/info/proxy/edit.vue

@ -1,6 +1,6 @@
<template>
<view class="form-container container-with-elep full-height-with-titile">
<view style="background-color: white; padding: 30px 20px; border-radius: 20px;">
<u-steps :current="step">
<u-steps-item :title="languageData.me.basicInformation" desc=""></u-steps-item>
@ -8,24 +8,22 @@
<u-steps-item :title="languageData.me.submitForReview" desc=""></u-steps-item>
</u-steps>
<!-- <view class="form-title">{{formData.userType === '0' ? languageData.me.personalData:languageData.me.merchantInfo}}</view> -->
<uni-forms style="max-height: 60vh; margin-top:30px; overflow-y: auto;" label-position="left" :label-width="70" label-align="left" ref="form" :model="formData" :rules="rules">
<uni-forms style="max-height: 60vh; margin-top:30px; overflow-y: auto;" label-position="left"
:label-width="70" label-align="left" ref="form" :model="formData" :rules="rules">
<view v-show="step!==1">
<uni-forms-item :label="languageData.me.userType" name="userType">
<uni-easyinput disabled :placeholder="languageData.me.correspondentAccount" clearable />
</uni-forms-item>
<uni-forms-item :label="languageData.me.agentName" name="name">
<uni-easyinput :disabled="step === 2" v-model="formData.agentName" :placeholder="languageData.me.agentName" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.agentName"
:placeholder="languageData.me.agentName" clearable />
</uni-forms-item>
<view @click="showBizType = true">
<uni-forms-item style="pointer-events: none" :label="languageData.me.runType" name="operateType">
<u--input
border="surround"
v-model="formData.operateTypeLabel"
:placeholder="languageData.me.runType"
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
<uni-forms-item style="pointer-events: none" :label="languageData.me.runType"
name="operateType">
<u--input border="surround" v-model="formData.operateTypeLabel"
:placeholder="languageData.me.runType" :disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
</uni-forms-item>
</view>
</view>
@ -34,141 +32,153 @@
<uni-forms-item :label="languageData.me.authenticationType">
<view class="gender-options">
<u-radio-group :disabled="step === 2" v-model="formData.licenseType" placement="row"
style="justify-content: space-around;" >
<u-radio size="25" :customStyle="{marginBottom: '8px'}"
v-for="(item, index) in [{label:languageData.functions.passport,name:'0'},
{label:languageData.functions.idCard, name:'1'}]"
:key="index" :label="item.label" :name="item.name">
style="justify-content: space-around;">
<u-radio size="25" :customStyle="{marginBottom: '8px'}" v-for="(item, index) in [{label:languageData.functions.passport,name:0},
{label:languageData.functions.idCard, name:1}]" :key="index" :label="item.label" :name="item.name">
</u-radio>
</u-radio-group>
</u-radio-group>
</view>
</uni-forms-item>
<uni-forms-item :label="languageData.me.leName" name="legalPersoName">
<uni-easyinput :disabled="step === 2" v-model="formData.legalPersonName" :placeholder="languageData.me.leName" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.legalPersonName"
:placeholder="languageData.me.leName" clearable />
</uni-forms-item>
<uni-forms-item :label="languageData.me.lePhone" name="contactPersonPhone">
<uni-easyinput :disabled="step === 2" v-model="formData.contactPersonPhone" :placeholder="languageData.me.lePhone" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.contactPersonPhone"
:placeholder="languageData.me.lePhone" clearable />
</uni-forms-item>
<uni-forms-item :label="languageData.me.leMail" name="contactPersonEmail">
<uni-easyinput :disabled="step === 2" v-model="formData.contactPersonEmail" :placeholder="languageData.me.leMail" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.contactPersonEmail"
:placeholder="languageData.me.leMail" clearable />
</uni-forms-item>
<view @click="dateClick('i')">
<uni-forms-item style="pointer-events: none;" :label="languageData.me.signDate" name="expDate">
<u--input
border="surround"
v-model="formData.legalPersonDateOfIssue"
:placeholder="languageData.me.signDate"
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
<uni-forms-item style="pointer-events: none;" :label="languageData.me.signDate"
name="expDate">
<u--input border="surround" v-model="formData.legalPersonDateOfIssue"
:placeholder="languageData.me.signDate" :disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
</uni-forms-item>
</view>
<view @click="dateClick('e')">
<uni-forms-item style="pointer-events: none;" :label="languageData.me.exTime" name="expDate">
<u--input
border="surround"
v-model="formData.legalPersonExpirationTime"
:placeholder="languageData.me.exTime"
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
<uni-forms-item style="pointer-events: none;" :label="languageData.me.exTime"
name="expDate">
<u--input border="surround" v-model="formData.legalPersonExpirationTime"
:placeholder="languageData.me.exTime" :disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
</uni-forms-item>
</view>
<uni-forms-item :label="languageData.me.leId" name="legalPersonIdCard">
<uni-easyinput :disabled="step === 2" v-model="formData.legalPersonIdCard" :placeholder="languageData.me.leId" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.legalPersonIdCard"
:placeholder="languageData.me.leId" clearable />
</uni-forms-item>
<view v-if="formData.licenseType == 1">
<uni-forms-item style="align-items: left;" :label="languageData.me.leupIdImg" name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList1" @afterRead="afterRead"
@delete="deletePic" name="1" multiple :maxCount="1">
<uni-forms-item style="align-items: left;" :label="languageData.me.leupIdImg"
name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList1"
@afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1">
</u-upload>
</uni-forms-item>
<uni-forms-item style="align-items: left;" :label="languageData.me.lebackIdImg" name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList2" @afterRead="afterRead"
@delete="deletePic" name="2" multiple :maxCount="1">
<uni-forms-item style="align-items: left;" :label="languageData.me.lebackIdImg"
name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList2"
@afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1">
</u-upload>
</uni-forms-item>
<uni-forms-item style="align-items: left;" :label="languageData.me.leholdIdImg" name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList3" @afterRead="afterRead"
@delete="deletePic" name="3" multiple :maxCount="1">
<uni-forms-item style="align-items: left;" :label="languageData.me.leholdIdImg"
name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
</u-upload>
</uni-forms-item>
</view>
<view v-show="formData.licenseType == 0">
<uni-forms-item v-if="formData.licenseType == 0" style="align-items: left;" :label="languageData.functions.passportInformation" name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4" @afterRead="(e)=>afterRead(e, 'pa')"
@delete="(e)=>deletePic(e, 'pa')" name="4" multiple :maxCount="1">
<uni-forms-item v-if="formData.licenseType == 0" style="align-items: left;"
:label="languageData.functions.passportInformation" name="cardImg">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList6"
@afterRead="(e)=>afterRead(e, 'pa')" @delete="(e)=>deletePic(e, 'pa')" name="6"
multiple :maxCount="1">
</u-upload>
</uni-forms-item>
</view>
<view @click="addrClick('a')">
<uni-forms-item style="pointer-events: none" :label="languageData.me.runArea" name="address">
<u--input
border="surround"
v-model="formData.area"
:placeholder="languageData.me.runArea"
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
<uni-forms-item style="pointer-events: none" :label="languageData.me.runArea"
name="address">
<u--input border="surround" v-model="formData.area"
:placeholder="languageData.me.runArea" :disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
</uni-forms-item>
</view>
<uni-forms-item :label="languageData.me.addrDetail" name="address">
<uni-easyinput :disabled="step === 2" v-model="formData.address" :placeholder="languageData.me.addrDetail" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.address"
:placeholder="languageData.me.addrDetail" clearable />
</uni-forms-item>
<uni-forms-item :label="languageData.me.runCode" name="businessLicenseNumber">
<uni-easyinput :disabled="step === 2" v-model="formData.businessLicenseNumber" :placeholder="languageData.me.runCode" clearable />
<uni-easyinput :disabled="step === 2" v-model="formData.businessLicenseNumber"
:placeholder="languageData.me.runCode" clearable />
</uni-forms-item>
</view>
<uni-forms-item v-show="true" style="align-items: left;" :label="languageData.me.runImg" name="cardImg">
<uni-forms-item v-show="true" style="align-items: left;" :label="languageData.me.runImg"
name="cardImg">
<view>
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4" @afterRead="afterRead"
@delete="deletePic" name="4" multiple :maxCount="1">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4"
@afterRead="afterRead" @delete="deletePic" name="4" multiple :maxCount="1">
</u-upload>
</view>
</uni-forms-item>
<uni-forms-item v-show="true" style="align-items: left;" :label="languageData.me.guaImg" name="cardImg">
<uni-forms-item v-show="true" style="align-items: left;" :label="languageData.me.guaImg"
name="cardImg">
<view>
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList5" @afterRead="afterRead"
@delete="deletePic" name="5" multiple :maxCount="1">
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList5"
@afterRead="afterRead" @delete="deletePic" name="5" multiple :maxCount="1">
</u-upload>
</view>
</uni-forms-item>
<uni-forms-item :label="languageData.account.eContract">
<view style="display: flex; flex-direction: column; align-items: flex-start;">
<view><a @click.prevent.stop="showContract=true" href="#">{{languageData.account.agentContract}}</a></view>
<view class="gender-options" style="gap: 0;">
<u-radio-group :disabled="step === 2" v-model="formData.bankAccountNumber"
placement="row" style="">
<u-radio size="25" :customStyle="{marginBottom: '8px'}" v-for="(item, index) in [{label:languageData.account.agree,name:'1'},{label:languageData.account.disagree,name:'0'}
]" :key="index" :label="item.label" :name="item.name">
</u-radio>
</u-radio-group>
</view>
</view>
</uni-forms-item>
</view>
</uni-forms>
<view>
<button v-show="step>0" class="submit-btn" @click="step = step === 0 ? step:step-1">{{languageData.functions.lastStep}}</button>
<button v-show="step<2" class="submit-btn" @click="nextStep()">{{languageData.functions.nextStep}}</button>
<button v-show="step===2" class="submit-btn" @click="handleSubmit">{{languageData.me.submit}}</button>
<button v-show="step>0 && !checkOnly" class="submit-btn"
@click="step = step === 0 ? step:step-1">{{languageData.functions.lastStep}}</button>
<button v-show="step<2 && !checkOnly" class="submit-btn"
@click="nextStep()">{{languageData.functions.nextStep}}</button>
<button v-show="step===2 && !checkOnly" class="submit-btn" @click="handleSubmit">{{languageData.me.submit}}</button>
</view>
</view>
<u-datetime-picker
ref="datetimePicker"
:show="showBirth"
mode="date"
:value="pickerDate"
:minDate="0"
:maxDate="7289625599000"
@confirm="dateConf"
@cancel="dateClose"
>
<u-datetime-picker ref="datetimePicker" :show="showBirth" mode="date" :value="pickerDate" :minDate="0"
:maxDate="7289625599000" @confirm="dateConf" @cancel="dateClose">
</u-datetime-picker>
<u-picker @cancel="bizTYpeCancel" @confirm="bizTypeConfirm" keyName="label" :show="showBizType"
:columns="opTypes"></u-picker>
<u-picker :show="showAddr" ref="uPicker"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
<u-picker @cancel="bizTYpeCancel" @confirm="bizTypeConfirm" keyName="label" :show="showBizType"
:columns="opTypes"></u-picker>
<u-picker :show="showAddr" ref="uPicker" :columns="addrData.province" @confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
<u-popup :show="showContract" mode="bottom" @close="showContract=false">
<view style="width: 100%; height: 60vh;overflow-y: auto; padding: 20px; margin-top: 10px; ">
<view style="text-align: center;">{{languageData.account.agentContract}}</view><br>
<view style="text-indent: 2em;">{{languageData.account.contrtent}}</view>
</view>
</u-popup>
<loading ref="loading" :custom="false" :shadeClick="false" :type="1" />
</view>
@ -179,50 +189,66 @@
updateAgentProfile,
verifyPhoneNumber
} from "@/api/system/user";
import { baseUrl } from "@/config";
import { addr } from "@/config/addr";
import {
baseUrl
} from "@/config";
import {
addr
} from "@/config/addr";
export default {
computed:{
user(){
computed: {
user() {
return this.$store.state.user
},
baseUrl(){
baseUrl() {
return baseUrl
}
},
data() {
return {
opTypes:[[{label:this.$languageData.me.lspf, id:0},{label:this.$languageData.me.manu, id:1},{label:this.$languageData.me.serv, id:2}]],
showBizType:false,
showContract: false,
opTypes: [
[{
label: this.$languageData.me.lspf,
id: 0
}, {
label: this.$languageData.me.manu,
id: 1
}, {
label: this.$languageData.me.serv,
id: 2
}]
],
showBizType: false,
pickerDate: new Date().getTime(),
step: 0,
addrData: '',
dateItem: '',
showBirth: false,
showAddr: false,
fileList1:[],
fileList2:[],
fileList3:[],
fileList4:[],
fileList5:[],
fileList1: [],
fileList2: [],
fileList3: [],
fileList4: [],
fileList5: [],
fileList6: [],
formData: {},
rules: {
}
rules: {}
}
},
onLoad(e) {
if(e.checkOnly){
if (e.checkOnly) {
this.step = 2
this.checkOnly = true
}
this.getUser()
this.languageData = this.$languageData;
if(uni.getLocale() == 'en'){
if (uni.getLocale() == 'en') {
this.addrData = addr.en
}else if(uni.getLocale() == 'zh-Hans'){
} else if (uni.getLocale() == 'zh-Hans') {
this.addrData = addr.cn
}else{
} else {
this.addrData = addr.laos
}
},
@ -231,159 +257,197 @@
this.languageData = this.$languageData;
},
methods: {
bizTypeConfirm(e){
bizTypeConfirm(e) {
this.formData.operateTypeLabel = e.value[0].label
this.formData.operateType = e.value[0].id
this.showBizType = false
},
bizTYpeCancel(e){
bizTYpeCancel(e) {
this.showBizType = false
},
nextStep(){
nextStep() {
let msg = '';
if(this.step===0){
if (this.step === 0) {
// if(this.formData.email === '' || this.formData.email == null)
// msg += ' '
if(this.formData.agentName === '' || this.formData.agentName == null)
msg += ' '+this.$languageData.me.merchanrName+' '
if(this.formData.operateType === '' || this.formData.operateType == null)
msg += ' '+this.$languageData.me.runType+' '
}
else if(this.step === 1){
if(this.formData.legalPersonName === '' || this.formData.legalPersonName == null)
msg += ' '+this.$languageData.me.leName+' '
if(this.formData.contactPersonPhone === '' || this.formData.contactPersonPhone == null)
msg += ' '+this.$languageData.me.lePhone+' '
if(this.formData.contactPersonEmail === '' || this.formData.contactPersonEmail == null)
msg += ' '+this.$languageData.me.leMail+' '
if(this.formData.legalPersonDateOfIssue === '' || this.formData.legalPersonDateOfIssue == null)
msg += ' '+this.$languageData.me.signDate+' '
if(this.formData.legalPersonExpirationTime === '' || this.formData.legalPersonExpirationTime == null)
msg += ' '+this.$languageData.me.exTime+' '
if(this.formData.legalPersonIdCard === '' || this.formData.legalPersonIdCard == null)
msg += ' '+this.$languageData.me.leId+' '
if(this.fileList1 == null || this.fileList1.length === 0)
msg += ' '+this.$languageData.me.leupIdImg+' '
if(this.fileList2 == null || this.fileList2.length === 0)
msg += ' '+this.$languageData.me.lebackIdImg+' '
if(this.fileList3 == null || this.fileList3.length === 0)
msg += ' '+this.$languageData.me.leholdIdImg+' '
if(this.formData.area == null || this.formData.area === 0)
msg += ' '+this.$languageData.me.runArea+' '
if(this.formData.address == null || this.formData.address === 0)
msg += ' '+this.$languageData.me.addrDetail+' '
if(this.formData.businessLicenseNumber === '' || this.formData.businessLicenseNumber == null)
msg += ' '+this.$languageData.me.runCode+' '
if(this.fileList4 == null || this.fileList4.length === 0)
msg += ' '+this.$languageData.me.runImg+' '
if(this.fileList5 == null || this.fileList5.length === 0)
msg += ' '+this.$languageData.me.guaImg+' '
if (this.formData.agentName === '' || this.formData.agentName == null)
msg += ' ' + this.$languageData.me.merchanrName + ' '
if (this.formData.operateType === '' || this.formData.operateType == null)
msg += ' ' + this.$languageData.me.runType + ' '
} else if (this.step === 1) {
if (this.formData.legalPersonName === '' || this.formData.legalPersonName == null)
msg += ' ' + this.$languageData.me.leName + ' '
if (this.formData.contactPersonPhone === '' || this.formData.contactPersonPhone == null)
msg += ' ' + this.$languageData.me.lePhone + ' '
if (this.formData.contactPersonEmail === '' || this.formData.contactPersonEmail == null)
msg += ' ' + this.$languageData.me.leMail + ' '
if (this.formData.legalPersonDateOfIssue === '' || this.formData.legalPersonDateOfIssue == null)
msg += ' ' + this.$languageData.me.signDate + ' '
if (this.formData.legalPersonExpirationTime === '' || this.formData.legalPersonExpirationTime == null)
msg += ' ' + this.$languageData.me.exTime + ' '
if (this.formData.legalPersonIdCard === '' || this.formData.legalPersonIdCard == null)
msg += ' ' + this.$languageData.me.leId + ' '
if ((this.fileList1 == null || this.fileList1.length === 0) && this.formData.licenseType == 1)
msg += ' ' + this.$languageData.me.leupIdImg + ' '
if ((this.fileList2 == null || this.fileList2.length === 0) && this.formData.licenseType == 1)
msg += ' ' + this.$languageData.me.lebackIdImg + ' '
if ((this.fileList3 == null || this.fileList3.length === 0) && this.formData.licenseType == 1)
msg += ' ' + this.$languageData.me.leholdIdImg + ' '
if (this.formData.area == null || this.formData.area === 0)
msg += ' ' + this.$languageData.me.runArea + ' '
if (this.formData.address == null || this.formData.address === 0)
msg += ' ' + this.$languageData.me.addrDetail + ' '
if (this.formData.businessLicenseNumber === '' || this.formData.businessLicenseNumber == null)
msg += ' ' + this.$languageData.me.runCode + ' '
if (this.fileList4 == null || this.fileList4.length === 0)
msg += ' ' + this.$languageData.me.runImg + ' '
if (this.fileList5 == null || this.fileList5.length === 0)
msg += ' ' + this.$languageData.me.guaImg + ' '
if ((this.fileList6 == null || this.fileList6.length === 0) && this.formData.licenseType == 0)
msg += ' ' + this.$languageData.functions.passport + ' '
}
if(msg.length > 0){
this.$modal.msg(msg+ this.$languageData.me.cannotbeNUll)
if (msg.length > 0) {
this.$modal.msg(msg + this.$languageData.me.cannotbeNUll)
return
}
this.step = this.step === 2 ? this.step:this.step+1
this.step = this.step === 2 ? this.step : this.step + 1
},
dateClick(type){
if( this.step === 2) return
dateClick(type) {
if (this.step === 2) return
this.dateItem = type
this.showBirth = true;
},
dateConf(e){
dateConf(e) {
this.showBirth = false;
//
if(this.dateItem === 'i'){
if (this.dateItem === 'i') {
this.formData.legalPersonDateOfIssue = this.$dayjs(e.value).format("DD/MM/YYYY")
}
//
if(this.dateItem === 'e'){
if (this.dateItem === 'e') {
this.formData.legalPersonExpirationTime = this.$dayjs(e.value).format("DD/MM/YYYY")
}
},
dateClose(e){
dateClose(e) {
this.showBirth = false
},
addrClick(type){
if(this.step === 2) return
addrClick(type) {
if (this.step === 2) return
this.showAddr = true
},
addrChg(e){
const {columnIndex,value,values, index,picker = this.$refs.uPicker} = e
addrChg(e) {
const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e
// ()
if (columnIndex === 0) {
// pickerthis
picker.setColumnValues(1, this.addrData.district[index])
}
},
addrConf(e){
addrConf(e) {
console.log(e)
this.formData.area = e.value[0]+' / '+e.value[1]
this.formData.area = e.value[0] + ' / ' + e.value[1]
this.showAddr = false
},
addrClose(e){
addrClose(e) {
this.showAddr = false
},
getUser() {
getAgentProfile().then(response => {
this.formData = response.data
if(this.formData.contactAddress){
if (this.formData.contactAddress) {
let addr = this.formData.contactAddress
let idx = addr.lastIndexOf('/')
this.formData.area = addr.substring(0, idx)
this.formData.address = addr.substring(idx+1)
this.formData.address = addr.substring(idx + 1)
}
if(this.formData.operateType){
this.formData.operateTypeLabel = this.opTypes[0].filter(item=>item.id == this.formData.operateType)[0].label
if (this.formData.operateType) {
this.formData.operateTypeLabel = this.opTypes[0].filter(item => item.id == this.formData
.operateType)[0].label
}
if(this.formData.idCardFrontImagePath)
this.fileList1 = [{type: "image", url: this.formData.idCardFrontImagePath,
thumb: this.formData.idCardFrontImagePath, status:"sucess"}]
if(this.formData.idCardBackImagePath)
this.fileList2 = [{type: "image", url: this.formData.idCardBackImagePath,
thumb: this.formData.idCardBackImagePath, status:"sucess"}]
if(this.formData.userWithIdCardImagePath)
this.fileList3 = [{type: "image", url: this.formData.userWithIdCardImagePath,
thumb: this.formData.userWithIdCardImagePath, status:"sucess"}]
if(this.formData.businessLicenseImage)
this.fileList4 = [{type: "image", url: this.formData.businessLicenseImage,
thumb: this.formData.businessLicenseImage, status:"sucess"}]
if(this.formData.earnestMoney)
this.fileList5 = [{type: "image", url: this.formData.earnestMoney,
thumb: this.formData.earnestMoney, status:"sucess"}]
if(this.formData.gender == null) this.formData.gender = ''
if (this.formData.idCardFrontImagePath)
this.fileList1 = [{
type: "image",
url: this.formData.idCardFrontImagePath,
thumb: this.formData.idCardFrontImagePath,
status: "sucess"
}]
if (this.formData.idCardBackImagePath)
this.fileList2 = [{
type: "image",
url: this.formData.idCardBackImagePath,
thumb: this.formData.idCardBackImagePath,
status: "sucess"
}]
if (this.formData.userWithIdCardImagePath)
this.fileList3 = [{
type: "image",
url: this.formData.userWithIdCardImagePath,
thumb: this.formData.userWithIdCardImagePath,
status: "sucess"
}]
if (this.formData.businessLicenseImage)
this.fileList4 = [{
type: "image",
url: this.formData.businessLicenseImage,
thumb: this.formData.businessLicenseImage,
status: "sucess"
}]
if (this.formData.earnestMoney)
this.fileList5 = [{
type: "image",
url: this.formData.earnestMoney,
thumb: this.formData.earnestMoney,
status: "sucess"
}]
if (this.formData.passportImagePath)
this.fileList6 = [{
type: "image",
url: this.formData.passportImagePath,
thumb: this.formData.passportImagePath,
status: "sucess"
}]
if (this.formData.gender == null) this.formData.gender = ''
})
},
submit(ref) {
this.$refs.loading.open();
this.formData.contactAddress = this.formData.area + '/' + this.formData.address
if(this.fileList1.length > 0)
if (this.fileList1.length > 0)
this.formData.idCardFrontImagePath = this.fileList1[0].url
if(this.fileList2.length > 0)
if (this.fileList2.length > 0)
this.formData.idCardBackImagePath = this.fileList2[0].url
if(this.fileList3.length > 0)
if (this.fileList3.length > 0)
this.formData.userWithIdCardImagePath = this.fileList3[0].url
if(this.fileList4.length > 0)
if (this.fileList4.length > 0)
this.formData.businessLicenseImage = this.fileList4[0].url
if(this.fileList5.length > 0)
if (this.fileList5.length > 0)
this.formData.earnestMoney = this.fileList5[0].url
if (this.fileList6.length > 0)
this.formData.passportImagePath = this.fileList6[0].url
this.formData.commonContactAddress = this.formData.area + '/' + this.formData.address
this.$refs.form.validate().then(res => {
updateAgentProfile(this.formData).then(res => {
if(res.code ===200){
if (res.code === 200) {
this.$store.dispatch('GetInfo').then(res => {
setTimeout(() => {
this.$refs.loading.close();
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
this.$modal.msgSuccess(this.languageData
.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
@ -396,33 +460,36 @@
})
})
},
handleSubmit() {
console.log(JSON.stringify(this.formData))
this.submit();
},
deletePic(event, type) {
if(this.checkOnly || this.step ==2)
if (this.checkOnly || this.step == 2)
return
this[`fileList${event.name}`].splice(event.index, 1);
},
//
async afterRead(event) {
if(!this.formData.fileLlist1){
if (!this.formData.fileLlist1) {
this.formData.fileList1 = []
}
if(!this.formData.fileLlist2){
if (!this.formData.fileLlist2) {
this.formData.fileList2 = []
}
if(!this.formData.fileLlist3){
if (!this.formData.fileLlist3) {
this.formData.fileList3 = []
}
if(!this.formData.fileLlist4){
if (!this.formData.fileLlist4) {
this.formData.fileList4 = []
}
if(!this.formData.fileLlist5){
if (!this.formData.fileLlist5) {
this.formData.fileList5 = []
}
if (!this.formData.fileLlist6) {
this.formData.fileList6 = []
}
// multiple true , file
let lists = [].concat(event.file);
let fileListLen = this[`fileList${event.name}`].length;
@ -435,7 +502,7 @@
});
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url);
const rsUrl = this.baseUrl + '/file/' +JSON.parse(result).data
const rsUrl = this.baseUrl + '/file/' + JSON.parse(result).data
let item = this[`fileList${event.name}`][fileListLen];
this[`fileList${event.name}`].splice(
fileListLen,
@ -461,7 +528,7 @@
},
success: (res) => {
// setTimeout(() => {
resolve(res.data);
resolve(res.data);
// }, 1000);
},
});

308
pages/mine/info/proxy/index.vue

@ -1,138 +1,190 @@
<template>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.accType" :right-text="languageData.me.agentAcc" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.agentName" :rightText="user.agentName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" />
</uni-list>
</view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" />
</uni-list>
</view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px; padding-bottom: 60rpx;">
<view style="font-weight: 500;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view v-if="user.status === 2">
<!-- // <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="''" :rightText="''" /> -->
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" />
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" />
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" />
<uni-list-item v-if="user.userType == '2'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" />
</view>
<view v-else style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="languageData.me.failRes" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)" class="submit-btn">{{languageData.me.authImme}}</button>
<button @click="goAuth(1)" v-show="user.status === '1' || user.status === '2' || user.status === '3'" class="submit-btn">{{user.status === '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
<button @click="modifySimple(1)" v-show="user.status === '2' || true" class="submit-btn">{{languageData.settings.confirmMod}}</button>
</view>
</uni-list>
<view v-show="user.status === 2" style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;">
<u-icon
:label="$t('me.info.cerPic')"
size="16"
name="fingerprint"
></u-icon>
<view style="display: flex; width: 100%; overflow-x: auto;">
<u--image style="margin-left: 12px;" v-for="img in [...imgList,]"
:showLoading="true"
:src="img"
width="80px"
height="80px"
@click="click"
></u--image>
</view>
<view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<InfoItem :ph="languageData.me.agentAcc" :title="languageData.me.userType" icon-name="person-filled"
:ro="true"></InfoItem>
<InfoItem v-model="user.agentName" icon-name="person-filled" :title="languageData.me.agentName" :ro="false">
</InfoItem>
<InfoItem :ph="user.registerTime" icon-name="calendar-filled" :title="$t('me.info.registerDate')"
:ro="true"></InfoItem>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.contact')}}</view>
<uni-list>
<InfoItem :ph="user.phone" :title="$t('me.info.phone')"
icon-name="phone-filled" :ro="true"></InfoItem>
<InfoItem v-model="user.contactPersonPhone" :ph="languageData.me.lePhone"
:title="languageData.me.lePhone" icon-name="phone-filled" :ro="false"></InfoItem>
<InfoItem v-model="user.contactPersonEmail" :ph="languageData.me.leMail" :title="languageData.me.leMail"
icon-name="email-filled" :ro="false"></InfoItem>
<InfoItem icon-name="location-filled" :title="languageData.me.runArea"
:ro="false">
<view @click="addrClick('a')">
<u--input style="pointer-events: none;" :value="user.area" inputAlign="right" border="none" :readonly="true" clearable ></u--input>
</view>
</InfoItem>
<InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.me.addrDetail"
icon-name="location-filled" :ro="false"></InfoItem>
<InfoItem v-show="false" v-model="user.contactAddress" :ph="languageData.me.addrDetail"
:title="languageData.me.mAddress" icon-name="location-filled" :ro="false"></InfoItem>
</uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view>
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
:title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<view style="margin-top: 10px;">
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
:title="languageData.me.failureReason" :rightText="user.failureReason" />
<button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
class="submit-btn">{{languageData.me.authImme}}</button>
<button @click="goAuth(1)"
v-show="user.status === '1' || user.status === '2' || user.status === '3'"
class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
</view>
</uni-list>
</view>
<button @click="modifySimple()" v-show="['1','2','3'].includes(user.status)" class="submit-btn"
style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<u-picker :show="showAddr" ref="uPicker"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
</view>
</view>
</template>
<script>
import { getAgentProfile } from "@/api/system/user"
export default {
data() {
return {
imgList:['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
},
watch:{
languageData(){
uni.setNavigationBarTitle({
title: this.$languageData.navBar.userInfo
});
import {
getAgentProfile,
updateAgentProfile
} from "@/api/system/user"
import InfoItem from '@/components/auth/InfoItem.vue'
import { addr } from "@/config/addr";
export default {
components: {
InfoItem
},
data() {
return {
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData: {},
showAddr: false,
addrData: '',
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
if(uni.getLocale() == 'en'){
this.addrData = addr.en
}else if(uni.getLocale() == 'zh-Hans'){
this.addrData = addr.cn
}else{
this.addrData = addr.laos
}
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/proxy/edit')
},
methods: {
addrClick(type){
this.showAddr = true
},
addrChg(e){
const {columnIndex,value,values, index,picker = this.$refs.uPicker} = e
// ()
if (columnIndex === 0) {
// pickerthis
picker.setColumnValues(1, this.addrData.district[index])
}
},
addrConf(e){
console.log(e)
this.user.area = e.value[0]+' / '+e.value[1]
this.showAddr = false
},
addrClose(e){
this.showAddr = false
},
modifySimple() {
if(this.user.area && this.user.area.length > 0 && this.user.area && this.user.area.length > 0)
this.user.contactAddress = this.user.area + '/' + this.user.address
updateAgentProfile(this.user).then(res => {
if (res.code === 200) {
this.$store.dispatch('GetInfo').then(res => {
setTimeout(() => {
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
})
},
getUser() {
getAgentProfile().then(response => {
this.user = response.data
if(this.user.contactAddress){
let addr = this.user.contactAddress
let idx = addr.lastIndexOf('/')
this.user.area = addr.substring(0, idx)
this.user.address = addr.substring(idx+1)
}
console.log(response.data)
})
},
goAuth(flag) {
//
if (flag === 0 || flag === 3) {
uni.navigateTo({
url: '/pages/mine/info/proxy/edit'
})
} else { //
uni.navigateTo({
url: '/pages/mine/info/proxy/edit?checkOnly=1'
})
}
},
getStatus(status) {
switch (status) {
case '1':
return this.languageData.me.aduiting
case '2':
return this.languageData.me.passed
case '3':
return this.languageData.me.fail
default:
return this.languageData.me.unAuthed
}
}
}
},
onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/proxy/edit')
},
methods: {
getUser() {
getAgentProfile().then(response => {
this.user = response.data
console.log(response.data)
})
},
goAuth(flag){
//
if(flag === 0 || flag === 3){
uni.navigateTo({
url:'/pages/mine/info/proxy/edit'
})
}else{//
uni.navigateTo({
url:'/pages/mine/info/proxy/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
case '1':
return this.languageData.me.aduiting
case '2':
return this.languageData.me.passed
case '3':
return this.languageData.me.fail
default:
return this.languageData.me.unAuthed
}
}
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(135deg, #4B8BFF 0%, #3B7CFF 100%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
border-radius: 44rpx;
margin-top: 30rpx;
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>

264
pages/mine/login.vue

@ -0,0 +1,264 @@
<template>
<view class="normal-login-container">
<view class="bg">
<view style="position: absolute; right: .5em; top: 12px; color: white; font-size: 16px;">
</view>
</view>
<view style="background-color: white; height: 100vh; border-radius: 30px 30px 0 0;">
<view class="logo-content">
<text class="title">{{languageData.log.welcom}}</text>
<image style="width: 280rpx;" src="/static/login/logo_m.png" mode="widthFix">
</image>
</view>
<view class="login-form-content" style="margin-top: -20rpx;">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="loginForm.username" class="input" type="text" :placeholder="languageData.log.usernamePh" maxlength="30" />
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" :placeholder="languageData.log.passwordPh"
maxlength="20" />
</view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input cursor-spacing="15" v-model="loginForm.code" type="text" class="input" :placeholder="languageData.log.codePh" maxlength="4" />
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
<view class="action-btn">
<button @click="handleLogin" style="background-color: #FDBE44; color: #322C20;" class="login-btn margin-tb-xl cu-btn block bg-blue lg">{{languageData.log.login}}</button>
</view>
<view class="xieyi text-center text-sm">
<text class="text-grey1">{{languageData.log.agreementTxt}}</text>
<text @click="handleUserAgrement" class="text-blue padding-lr-sm">{{languageData.log.userAgreement}}</text>
&
<text @click="handlePrivacy" class="text-blue">{{languageData.log.privacyAgreement}}</text>
</view>
<view class="reg text-center" v-if="register">
<view style="display: flex; justify-content: space-between;">
<text @click="goForGotPwd" class="text-blue padding-right-sm">{{languageData.settings.forgotPwd}}</text>
<!-- <view> -->
<text @click="goIndex" class="text-blue" style="font-size: 15px;">{{languageData.log.returnHome}}</text>
<text @click="handleUserRegister" class="text-blue">{{languageData.log.goRegister}}</text>
<!-- </view> -->
</view>
</view>
<!-- <view style="margin-top: 10px;">
<text @click="goIndex" class="text-blue padding-right-sm" style="font-size: 15px;">{{languageData.log.returnHome}}</text>
</view> -->
</view>
</view>
</view>
</template>
<script>
import {
getCodeImg
} from '@/api/login'
export default {
watch:{
loginForm:{
deep: true,
handler(n,o){
console.log(n.password,'===>',o.password, o)
if(n.password.indexOf('per') >= 0 ){
this.loginForm.username = '15288887777'
this.loginForm.password = '123456'
}else if(n.password.indexOf('mer') >= 0){
this.loginForm.username = '15288888888'
this.loginForm.password = '123456'
}else if(n.password.indexOf('age') >= 0){
this.loginForm.username = '15288889999'
this.loginForm.password = '123456'
}
}
}
},
data() {
return {
languageData: null,
codeUrl: "",
captchaEnabled: true,
//
register: true,
globalConfig: getApp().globalData.config,
loginForm: {
username: "",
password: "",
// username: "",
// password: "",
code: "",
uuid: ''
}
}
},
created() {
this.getCode()
this.languageData = this.$languageData;
},
methods: {
goIndex(){
uni.reLaunch({
url:'/pages/home/index'
})
},
goForGotPwd(){
this.$tab.navigateTo(`/pages/mine/findPass`)
},
//
handleUserRegister() {
this.$tab.redirectTo(`/pages/register`)
},
//
handlePrivacy() {
let site = this.globalConfig.appInfo.agreements[0]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
handleUserAgrement() {
let site = this.globalConfig.appInfo.agreements[1]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled
if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.data.img
this.loginForm.uuid = res.data.uuid
}
})
},
//
async handleLogin() {
if (this.loginForm.username === "") {
this.$modal.msgError(this.languageData.log.usernamePh)
} else if (this.loginForm.password === "") {
this.$modal.msgError(this.languageData.log.passwordPh)
} else if (this.loginForm.code === "" && this.captchaEnabled) {
this.$modal.msgError(this.languageData.log.codePh)
} else {
this.$modal.loading(this.languageData.log.loginWait)
this.pwdLogin()
}
},
//
async pwdLogin() {
this.$store.dispatch('Login', this.loginForm).then(() => {
this.$modal.closeLoading()
this.loginSuccess()
}).catch(() => {
if (this.captchaEnabled) {
this.getCode()
}
})
},
//
loginSuccess(result) {
//
this.$store.dispatch('GetInfo').then(res => {
this.$tab.reLaunch('/pages/home/index')
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.normal-login-container {
height: 100vh;
overflow: hidden;
width: 100%;
background-color: white;
.bg{
height: 45vh;
background-image: url('/static/svgs/lines.svg');
background-size: 160%;
background-position: center;
background-color: #144F9B;
}
.logo-content {
margin-top: -150px;
width: 100%;
font-size: 21px;
padding-top: 5%;
border-radius: 30px 30px 0 0;
display: flex;
flex-direction: column;
justify-content: left;
image {
align-self: center;
border-radius: 4px;
}
.title {
text-align: center;
// margin-left: 2em;
}
}
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 2%;
width: 80%;
.input-item {
margin: 20px auto;
background-color: #f5f6f7;
height: 45px;
border-radius: 4px;
.icon {
font-size: 38rpx;
margin-left: 10px;
color: #999;
}
.input {
width: 100%;
font-size: 14px;
line-height: 20px;
text-align: left;
padding-left: 15px;
}
}
.login-btn {
height: 45px;
}
.reg {
margin-top: 15px;
}
.xieyi {
color: #333;
margin-top: 16px;
}
.login-code {
height: 38px;
float: right;
.login-code-img {
height: 38px;
position: absolute;
margin-left: 10px;
width: 200rpx;
}
}
}
}
</style>
Loading…
Cancel
Save