Browse Source

app认证调整

main
zhj 1 month ago
parent
commit
4bc5c3bb83
  1. 7
      config/addr.js
  2. 23
      config/language.js
  3. 16
      pages/functions/proxyPayment.vue
  4. 45
      pages/home/index.vue
  5. 156
      pages/mine/info/index.vue
  6. 16
      pages/mine/info/merchant/edit.vue
  7. 150
      pages/mine/info/merchant/index.vue
  8. 277
      pages/mine/info/proxy/edit.vue
  9. 158
      pages/mine/info/proxy/index.vue
  10. 264
      pages/mine/login.vue

7
config/addr.js

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

23
config/language.js

@ -323,7 +323,8 @@ export const LGC_data = {
cannotbeNUll: "不能为空", cannotbeNUll: "不能为空",
idType: '证件类型', idType: '证件类型',
area: '地区', area: '地区',
address: '详细地址' address: '详细地址',
}, },
wallet: { wallet: {
@ -577,7 +578,13 @@ export const LGC_data = {
income: "收入", income: "收入",
outcome: "支出", outcome: "支出",
quota: "限额", quota: "限额",
noLimit: "无限制" noLimit: "无限制",
agree: "同意",
disagree: "不同意",
eContract: "电子合同",
agentContract: "代理电子合同",
contrtent: "授权范围:甲方授权乙方在合同有效期内,通过线上渠道代理销售/推广甲方指定产品/服务,乙方不得超范围经营。代理期限:本合同自____年____月____日起生效,至____年____月____日止,期满可续签。权利义务:甲方应提供合法合规的产品及相关资料;乙方须遵守平台规则,维护品牌形象,不得从事虚假或误导性宣传。结算方式:甲乙双方按约定比例分成或支付佣金,结算周期为每月/每季度一次,具体以实际交易为准。保密义务:双方应对在合作中获知的商业信息严格保密,未经对方书面同意,不得向第三方披露。合同效力:本合同为电子合同,具有法律效力,自双方在线确认签署之日起成立。"
} }
}, },
English: { English: {
@ -1146,7 +1153,12 @@ export const LGC_data = {
income: "Income", income: "Income",
outcome: "Outcome", outcome: "Outcome",
quota: "Limit", 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: { Laos: {
@ -1712,6 +1724,11 @@ export const LGC_data = {
outcome: "ລາຍຈ່າຍ", outcome: "ລາຍຈ່າຍ",
quota: "ຂອບເຂດ", quota: "ຂອບເຂດ",
noLimit: "ບໍ່ຈຳກັດ", noLimit: "ບໍ່ຈຳກັດ",
agree: "ຕົກລົງ",
disagree: "ບໍ່ຕົກລົງ",
eContract: "ສັນຍາອຸ່ງເວັບ",
agentContract: "ສັນຍາຕົວແທນອຸ່ງເວັບ",
contrtent: "ຂັດແຍ່ງອະນຸຍາດ: ຕົວຢ່າງທີ 1 ອະນຸຍາດໃຫ້ຕົວຢ່າງທີ 2 ສຳລັບການຂາຍ/ການປະກັນສິນຄ້າ/ບໍລິການທີ່ກຳນົດໄວ້ຜ່ານຊ່ອງທາງອອນໄລໃນອະນຸດີພາຍໃນສັນຍາ. ຕົວຢ່າງທີ 2 ບໍ່ສາມາດຈັດການເຮັດວຽກເພີ່ມເຕີມອອກໄປຈາກຂັດແຍ່ງທີ່ກຳນົດໄວ້. ພາຍໃນການຕັ້ງຕົວແທນ: ສັນຍານີ້ຈະມີຜົນກະທູ້ຈາກວັນ____ເດືອນ____ປີ____ແລະຈະສິ້ນສຸດໃນວັນ____ເດືອນ____ປີ____. ສາມາດຕ่อເຕີມໄດ້. ຄວາມຮັບຜັດ/ໝວດຕໍ່: ຕົວຢ່າງທີ 1 ຕ້ອງມີການມອບເອກະສານທີ່ຖຶກຕ້ອງຕາມກົດໝາຍ; ຕົວຢ່າງທີ 2 ຕ້ອງປະຕິບັດຕາມກົດໝາຍຂອງພື້ນຖານ, ຖືກຕ້ອງຮັກສາຮື້ງມະນະຂອງບໍລິສັດ, ບໍ່ສາມາດປະກາດຂໍ້ມູນບໍ່ຖຶກຕ້ອງຫຼືການປະກາດທີ່ກ້າໃຫ້ຜິດຕາມ. ວິທີການຈ່າຍ: ຕົວຢ່າງທີ 1 ແລະຕົວຢ່າງທີ 2 ຄືນເງິນຕາມອັດຕາທີ່ກຳນົດໄວ້ຫຼືຈ່າຍຄັມມິഷັນ, ຜະລິດຈາກການເຮັດທຸລະກິດທີ່ແທ້ຈິງ. ຄວາມລັບລູ້: ລາວກັບລາວຕ້ອງຮັກສາຂໍ້ມູນທີ່ໄດ້ຮັບຮູ້ໃນການຮ່ວມມືຫນ້າຕາມ, ຖ້າບໍ່ໄດ້ຮับໃບຮັບຮອງຈາກອີກເຫົ້າໜຶ່ງບໍ່ສາມາດເປີດເຜີຍໃຫ້ຜູ້ທີສາມຮູ້. ດຳເນີນການສັນຍາ: ສັນຍາອຸ່ງເວັບນີ້ມີຜົນກະທັບຕາມກົດໝາຍ, ຈາກວັນທີ່ທັງສອງເຫົ້າໜຶ່ງຍຳຍອມຮັບ/ລົງເຊັນ."
} }
} }

16
pages/functions/proxyPayment.vue

@ -91,10 +91,10 @@
</u-radio-group> </u-radio-group>
</view> </view>
</uni-section> </uni-section>
<uni-section :title="param.reciWay === 'u' ? '账户号':'银行卡号'" type="line" padding> <uni-section :title="param.reciWay === 'u' ? this.$languageData.functions.accNum:this.$languageData.functions.bankCardNum" type="line" padding>
<view class="amount-input-area"> <view class="amount-input-area">
<u-input border="none" type="text" cursor-spacing="15" v-model="param.famId" :fontSize="12" <u-input border="none" type="text" cursor-spacing="15" v-model="param.famId" :fontSize="12"
:placeholder="'请输入'+(param.reciWay === 'u' ? '账户号':'银行卡号')"/> :placeholder="(param.reciWay === 'u' ? this.$languageData.functions.accNum:this.$languageData.functions.bankCardNum)"/>
</view> </view>
</uni-section> </uni-section>
</view> </view>
@ -117,9 +117,9 @@
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="bottom-button"> <view class="bottom-button">
<button v-if="step === 1" class="submit-btn" @click="step = 2" style="background-color: #2A79FF; color: white;">下一步</button> <button v-if="step === 1" class="submit-btn" @click="step = 2" style="background-color: #2A79FF; color: white;">{{this.$languageData.functions.nextStep}}</button>
<button v-if="step === 2" class="submit-btn" @click="step = 1" style="background-color: lightgray; color: white;">上一步</button> <button v-if="step === 2" class="submit-btn" @click="step = 1" style="background-color: lightgray; color: white;">{{this.$languageData.functions.lastStep}}</button>
<button v-if="step === 2" class="submit-btn" @click="onSubmit" style="margin-top: 30rpx;">立即支付</button> <button v-if="step === 2" class="submit-btn" @click="onSubmit" style="margin-top: 30rpx;">{{this.$languageData.functions.payimme}}</button>
</view> </view>
</view> </view>
@ -175,12 +175,12 @@
reciWay:[ reciWay:[
{ {
key: 'u', key: 'u',
name: '系统账户', name: this.$languageData.functions.sysUsr,
img: '/static/img/electricity.png' img: '/static/img/electricity.png'
}, },
{ {
key: 'c', key: 'c',
name: '银行卡', name: this.$languageData.functions.bankCard,
img:'/static/img/water.png' img:'/static/img/water.png'
} }
], ],
@ -192,7 +192,7 @@
}, },
{ {
key: 'c', key: 'c',
name: '银行卡', name: this.$languageData.functions.bankCard,
img:'/static/img/water.png' img:'/static/img/water.png'
} }
], ],

45
pages/home/index.vue

@ -265,14 +265,14 @@
url: '/pages/functions/utilityPayment' url: '/pages/functions/utilityPayment'
}, },
{ {
icon: this.$store.state.user.userCate == '3' ? 'man-add' : 'more-dot-fill', icon: this.$store.state.user.userCate == '2' ? 'man-add' : 'more-dot-fill',
name: this.$store.state.user.userCate == '3' ? this.$languageData.home.proxyPayment : this.$languageData.home.tbc, name: this.$store.state.user.userCate == '2' ? this.$languageData.home.proxyPayment : this.$languageData.home.tbc,
url: this.$store.state.user.userCate == '3' ? '/pages/functions/proxyPayment' : undefined url: this.$store.state.user.userCate == '2' ? '/pages/functions/proxyPayment' : undefined
}, },
{ {
icon: this.$store.state.user.userCate != '1' ? 'order' : 'more-dot-fill', icon: this.$store.state.user.userCate != '0' ? 'order' : 'more-dot-fill',
name: this.$store.state.user.userCate != '1' ? this.$languageData.home.businessData : this.$languageData.home.tbc, name: this.$store.state.user.userCate != '0' ? this.$languageData.home.businessData : this.$languageData.home.tbc,
url: this.$store.state.user.userCate != '1' ? '/pages/mchManage/index' : undefined url: this.$store.state.user.userCate != '0' ? '/pages/mchManage/index' : undefined
}, },
{ {
icon: 'more-dot-fill', icon: 'more-dot-fill',
@ -294,38 +294,7 @@
icon: 'more-dot-fill', icon: 'more-dot-fill',
name: this.$languageData.home.tbc name: this.$languageData.home.tbc
} }
// {
// icon: 'list',
// name: this.$languageData.home.recivRecord
// },
// {
// icon: 'flag-filled',
// name: this.$languageData.home.runAnalysis
// },
// {
// icon: 'staff',
// name: this.$languageData.home.staffManagement
// },
// {
// icon: 'gear',
// name: this.$languageData.home.deviceManagement
// },
// {
// icon: 'map-filled',
// name: this.$languageData.home.merchantPro
// },
// {
// icon: 'chatboxes-filled',
// name: this.$languageData.home.msgCenter
// },
// {
// icon: 'auth-filled',
// name: this.$languageData.home.merchantCenter
// },
// {
// icon: 'more-filled',
// name: this.$languageData.home.more
// }
] ]
} }
}, },

156
pages/mine/info/index.vue

@ -2,83 +2,147 @@
<view class="container-with-elep full-height-with-titile"> <view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;"> <view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view> <view style="font-weight: 500;">{{$t('me.info.basic')}}</view>
<uni-list style="background-color: aliceblue;"> <InfoItem :ph="languageData.me.personalAccount" :title="languageData.me.userType"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.userType" :rightText="languageData.me.personalAccount" /> icon-name="person-filled" :ro="true"></InfoItem>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.nickname')" :rightText="user.fullName" /> <InfoItem v-model="user.fullName" icon-name="person-filled" :title="$t('me.info.nickname')" :ro="!true">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" /> </InfoItem>
</uni-list> <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> <view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.contact')}}</view>
<uni-list> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" /> <InfoItem :ph="user.phone" :title="$t('me.info.phone')"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" :title="$t('me.info.gender')" :rightText="getGender()" /> 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 :value="user.area" inputAlign="right" border="none" :disabled="da" :readonly="ro" 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> </uni-list>
<view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view> <view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</view>
<uni-list> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
<view v-if="user.status === 2"> :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" /> <view style="margin-top: 10px;">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" /> <uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" /> :title="languageData.me.failureReason" :rightText="user.failureReason" />
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" /> <button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" /> class="submit-btn">{{languageData.me.authImme}}</button>
</view> <button @click="goAuth(1)"
<view v-else style="margin-top: 10px;"> v-show="user.status === '1' || user.status === '2' || user.status === '3'"
<uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="languageData.me.failureReason" :rightText="user.failureReason" /> class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
<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> </view>
</uni-list> </uni-list>
</view> </view>
<button @click="modifySimple(1)" v-show="user.status === '2' || true" class="submit-btn" style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button> <button @click="modifySimple()" 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="false"
<view v-show="user.status === 2" style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;"> style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px; padding-bottom: 60rpx;">
<u-icon <view v-show="user.status === 2"
:label="$t('me.info.cerPic')" style="padding: 12px 15px; width: 100%; display: flex; justify-content: flex-start; align-items: center;">
size="16" <u-icon :label="$t('me.info.cerPic')" size="16" name="fingerprint"></u-icon>
name="fingerprint"
></u-icon>
<view style="display: flex; width: 100%; overflow-x: auto;"> <view style="display: flex; width: 100%; overflow-x: auto;">
<u--image style="margin-left: 12px;" v-for="img in [...imgList,]" <u--image style="margin-left: 12px;" v-for="img in [...imgList,]" :showLoading="true" :src="img"
:showLoading="true" width="80px" height="80px"></u--image>
:src="img"
width="80px"
height="80px"
></u--image>
</view> </view>
</view> </view>
</view> </view>
<u-picker :show="showAddr" ref="uPicker"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker>
</view> </view>
</template> </template>
<script> <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 { export default {
components: {
InfoItem
},
data() { data() {
return { return {
texts: '0',
imgList: ['http://sss', 'http://sss'], imgList: ['http://sss', 'http://sss'],
user: {}, user: {},
roleGroup: "", roleGroup: "",
postGroup: "", postGroup: "",
languageData:{} languageData: {},
addrData:{},
showAddr: false,
} }
}, },
onLoad() { onLoad() {
this.getUser(); this.getUser();
this.languageData = this.$languageData; if(uni.getLocale() == 'en'){
}, this.addrData = addr.en
watch:{ }else if(uni.getLocale() == 'zh-Hans'){
languageData(){ this.addrData = addr.cn
uni.setNavigationBarTitle({ }else{
title: this.$languageData.navBar.userInfo this.addrData = addr.laos
});
} }
this.languageData = this.$languageData;
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/edit') this.$tab.navigateTo('/pages/mine/info/edit')
}, },
methods: { 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(() => {
this.$refs.loading.close();
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
uni.navigateBack()
this.$refs.loading.close();
})
},
getGender() { getGender() {
if (this.user.gender == null || this.user.gender.length == 0) if (this.user.gender == null || this.user.gender.length == 0)
return '' return ''
@ -88,6 +152,12 @@
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data 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) console.log(response.data)
}) })
}, },
@ -123,6 +193,7 @@
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
.submit-btn { .submit-btn {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
@ -136,5 +207,4 @@
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25); box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
</style> </style>

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

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

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

@ -1,84 +1,144 @@
<template> <template>
<view class="container-with-elep full-height-with-titile"> <view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;"> <view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view> <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> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="this.$languageData.me.accType" :right-text="$languageData.me.merchantAcc" /> <InfoItem :ph="user.phone" :title="$t('me.info.phone')"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="this.$languageData.me.merchanrName" :rightText="user.merchantName"/> icon-name="phone-filled" :ro="true"></InfoItem>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" /> <InfoItem v-model="user.contactPersonPhone" :ph="languageData.me.lePhone"
</uni-list> :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 :value="user.area" inputAlign="right" border="none" :disabled="da" :readonly="ro" clearable ></u--input>
</view> </view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px;"> </InfoItem>
<view style="font-weight: 500;">{{$t('me.info.contact')}}</view> <InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.me.addrDetail"
<uni-list> icon-name="location-filled" :ro="false"></InfoItem>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" />
</uni-list> </uni-list>
</view> <view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</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>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
<view v-if="user.status === 2"> :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<!-- <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="this.$languageData.me.authenticationType" :rightText="'身份证'" /> --> <view style="margin-top: 10px;">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" /> <uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" /> :title="languageData.me.failureReason" :rightText="user.failureReason" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" /> <button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" /> class="submit-btn">{{languageData.me.authImme}}</button>
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" /> <button @click="goAuth(1)"
</view> v-show="user.status === '1' || user.status === '2' || user.status === '3'"
<view v-else style="margin-top: 10px;"> class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
<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> </view>
</uni-list> </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>
</view>
</view>
<button @click="modifySimple(1)" v-show="user.status === '2' || true" class="submit-btn" style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<button @click="modifySimple()" v-show="user.status === '2' || true" 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> </template>
<script> <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 { export default {
components: {
InfoItem
},
data() { data() {
return { return {
imgList: ['http://sss', 'http://sss'], imgList: ['http://sss', 'http://sss'],
user: {}, user: {},
roleGroup: "", roleGroup: "",
postGroup: "", postGroup: "",
languageData:{} languageData: {},
showAddr: false,
addrData: '',
} }
}, },
onLoad() { onLoad() {
this.getUser(); this.getUser();
this.languageData = this.$languageData; 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() { onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/merchant/edit') this.$tab.navigateTo('/pages/mine/info/merchant/edit')
}, },
methods: { 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(() => {
this.$refs.loading.close();
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
this.$refs.loading.close();
})
},
getUser() { getUser() {
getMerchantProfile().then(response => { getMerchantProfile().then(response => {
this.user = response.data 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) console.log(response.data)
}) })
}, },
@ -114,6 +174,7 @@
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
.submit-btn { .submit-btn {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
@ -127,5 +188,4 @@
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25); box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
</style> </style>

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

@ -8,24 +8,22 @@
<u-steps-item :title="languageData.me.submitForReview" desc=""></u-steps-item> <u-steps-item :title="languageData.me.submitForReview" desc=""></u-steps-item>
</u-steps> </u-steps>
<!-- <view class="form-title">{{formData.userType === '0' ? languageData.me.personalData:languageData.me.merchantInfo}}</view> --> <!-- <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"> <view v-show="step!==1">
<uni-forms-item :label="languageData.me.userType" name="userType"> <uni-forms-item :label="languageData.me.userType" name="userType">
<uni-easyinput disabled :placeholder="languageData.me.correspondentAccount" clearable /> <uni-easyinput disabled :placeholder="languageData.me.correspondentAccount" clearable />
</uni-forms-item> </uni-forms-item>
<uni-forms-item :label="languageData.me.agentName" name="name"> <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> </uni-forms-item>
<view @click="showBizType = true"> <view @click="showBizType = true">
<uni-forms-item style="pointer-events: none" :label="languageData.me.runType" name="operateType"> <uni-forms-item style="pointer-events: none" :label="languageData.me.runType"
<u--input name="operateType">
border="surround" <u--input border="surround" v-model="formData.operateTypeLabel"
v-model="formData.operateTypeLabel" :placeholder="languageData.me.runType" :disabled="true"
:placeholder="languageData.me.runType" :disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
</uni-forms-item> </uni-forms-item>
</view> </view>
</view> </view>
@ -35,140 +33,152 @@
<view class="gender-options"> <view class="gender-options">
<u-radio-group :disabled="step === 2" v-model="formData.licenseType" placement="row" <u-radio-group :disabled="step === 2" v-model="formData.licenseType" placement="row"
style="justify-content: space-around;"> style="justify-content: space-around;">
<u-radio size="25" :customStyle="{marginBottom: '8px'}" <u-radio size="25" :customStyle="{marginBottom: '8px'}" v-for="(item, index) in [{label:languageData.functions.passport,name:0},
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">
{label:languageData.functions.idCard, name:'1'}]"
:key="index" :label="item.label" :name="item.name">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item :label="languageData.me.leName" name="legalPersoName"> <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>
<uni-forms-item :label="languageData.me.lePhone" name="contactPersonPhone"> <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>
<uni-forms-item :label="languageData.me.leMail" name="contactPersonEmail"> <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> </uni-forms-item>
<view @click="dateClick('i')"> <view @click="dateClick('i')">
<uni-forms-item style="pointer-events: none;" :label="languageData.me.signDate" name="expDate"> <uni-forms-item style="pointer-events: none;" :label="languageData.me.signDate"
<u--input name="expDate">
border="surround" <u--input border="surround" v-model="formData.legalPersonDateOfIssue"
v-model="formData.legalPersonDateOfIssue" :placeholder="languageData.me.signDate" :disabled="true"
:placeholder="languageData.me.signDate" :disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
</uni-forms-item> </uni-forms-item>
</view> </view>
<view @click="dateClick('e')"> <view @click="dateClick('e')">
<uni-forms-item style="pointer-events: none;" :label="languageData.me.exTime" name="expDate"> <uni-forms-item style="pointer-events: none;" :label="languageData.me.exTime"
<u--input name="expDate">
border="surround" <u--input border="surround" v-model="formData.legalPersonExpirationTime"
v-model="formData.legalPersonExpirationTime" :placeholder="languageData.me.exTime" :disabled="true"
:placeholder="languageData.me.exTime" :disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
</uni-forms-item> </uni-forms-item>
</view> </view>
<uni-forms-item :label="languageData.me.leId" name="legalPersonIdCard"> <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> </uni-forms-item>
<view v-if="formData.licenseType == 1"> <view v-if="formData.licenseType == 1">
<uni-forms-item style="align-items: left;" :label="languageData.me.leupIdImg" name="cardImg"> <uni-forms-item style="align-items: left;" :label="languageData.me.leupIdImg"
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList1" @afterRead="afterRead" name="cardImg">
@delete="deletePic" name="1" multiple :maxCount="1"> <u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList1"
@afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1">
</u-upload> </u-upload>
</uni-forms-item> </uni-forms-item>
<uni-forms-item style="align-items: left;" :label="languageData.me.lebackIdImg" name="cardImg"> <uni-forms-item style="align-items: left;" :label="languageData.me.lebackIdImg"
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList2" @afterRead="afterRead" name="cardImg">
@delete="deletePic" name="2" multiple :maxCount="1"> <u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList2"
@afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="1">
</u-upload> </u-upload>
</uni-forms-item> </uni-forms-item>
<uni-forms-item style="align-items: left;" :label="languageData.me.leholdIdImg" name="cardImg"> <uni-forms-item style="align-items: left;" :label="languageData.me.leholdIdImg"
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList3" @afterRead="afterRead" name="cardImg">
@delete="deletePic" name="3" multiple :maxCount="1"> <u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
</u-upload> </u-upload>
</uni-forms-item> </uni-forms-item>
</view> </view>
<view v-show="formData.licenseType == 0"> <view v-show="formData.licenseType == 0">
<uni-forms-item v-if="formData.licenseType == 0" style="align-items: left;" :label="languageData.functions.passportInformation" name="cardImg"> <uni-forms-item v-if="formData.licenseType == 0" style="align-items: left;"
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4" @afterRead="(e)=>afterRead(e, 'pa')" :label="languageData.functions.passportInformation" name="cardImg">
@delete="(e)=>deletePic(e, 'pa')" name="4" multiple :maxCount="1"> <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> </u-upload>
</uni-forms-item> </uni-forms-item>
</view> </view>
<view @click="addrClick('a')"> <view @click="addrClick('a')">
<uni-forms-item style="pointer-events: none" :label="languageData.me.runArea" name="address"> <uni-forms-item style="pointer-events: none" :label="languageData.me.runArea"
<u--input name="address">
border="surround" <u--input border="surround" v-model="formData.area"
v-model="formData.area" :placeholder="languageData.me.runArea" :disabled="true"
:placeholder="languageData.me.runArea" :disabledColor="step === 2 ? '#F7F6F6':'white'" suffixIcon="arrow-down"></u--input>
:disabled="true"
:disabledColor="step === 2 ? '#F7F6F6':'white'"
suffixIcon="arrow-down"
></u--input>
</uni-forms-item> </uni-forms-item>
</view> </view>
<uni-forms-item :label="languageData.me.addrDetail" name="address"> <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>
<uni-forms-item :label="languageData.me.runCode" name="businessLicenseNumber"> <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> </uni-forms-item>
</view> </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> <view>
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4" @afterRead="afterRead" <u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList4"
@delete="deletePic" name="4" multiple :maxCount="1"> @afterRead="afterRead" @delete="deletePic" name="4" multiple :maxCount="1">
</u-upload> </u-upload>
</view> </view>
</uni-forms-item> </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> <view>
<u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList5" @afterRead="afterRead" <u-upload :disabled="step === 2" style="margin-left: 0px;" :fileList="fileList5"
@delete="deletePic" name="5" multiple :maxCount="1"> @afterRead="afterRead" @delete="deletePic" name="5" multiple :maxCount="1">
</u-upload> </u-upload>
</view> </view>
</uni-forms-item> </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> </view>
</uni-forms> </uni-forms>
<view> <view>
<button v-show="step>0" class="submit-btn" @click="step = step === 0 ? step:step-1">{{languageData.functions.lastStep}}</button> <button v-show="step>0 && !checkOnly" class="submit-btn"
<button v-show="step<2" class="submit-btn" @click="nextStep()">{{languageData.functions.nextStep}}</button> @click="step = step === 0 ? step:step-1">{{languageData.functions.lastStep}}</button>
<button v-show="step===2" class="submit-btn" @click="handleSubmit">{{languageData.me.submit}}</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>
</view> </view>
<u-datetime-picker <u-datetime-picker ref="datetimePicker" :show="showBirth" mode="date" :value="pickerDate" :minDate="0"
ref="datetimePicker" :maxDate="7289625599000" @confirm="dateConf" @cancel="dateClose">
:show="showBirth"
mode="date"
:value="pickerDate"
:minDate="0"
:maxDate="7289625599000"
@confirm="dateConf"
@cancel="dateClose"
>
</u-datetime-picker> </u-datetime-picker>
<u-picker @cancel="bizTYpeCancel" @confirm="bizTypeConfirm" keyName="label" :show="showBizType" <u-picker @cancel="bizTYpeCancel" @confirm="bizTypeConfirm" keyName="label" :show="showBizType"
:columns="opTypes"></u-picker> :columns="opTypes"></u-picker>
<u-picker :show="showAddr" ref="uPicker" <u-picker :show="showAddr" ref="uPicker" :columns="addrData.province" @confirm="addrConf" @change="addrChg"
:columns="addrData.province"
@confirm="addrConf" @change="addrChg"
@cancel="addrClose"></u-picker> @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" /> <loading ref="loading" :custom="false" :shadeClick="false" :type="1" />
</view> </view>
@ -179,8 +189,12 @@
updateAgentProfile, updateAgentProfile,
verifyPhoneNumber verifyPhoneNumber
} from "@/api/system/user"; } from "@/api/system/user";
import { baseUrl } from "@/config"; import {
import { addr } from "@/config/addr"; baseUrl
} from "@/config";
import {
addr
} from "@/config/addr";
export default { export default {
computed: { computed: {
@ -193,7 +207,19 @@
}, },
data() { data() {
return { return {
opTypes:[[{label:this.$languageData.me.lspf, id:0},{label:this.$languageData.me.manu, id:1},{label:this.$languageData.me.serv, id:2}]], 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, showBizType: false,
pickerDate: new Date().getTime(), pickerDate: new Date().getTime(),
step: 0, step: 0,
@ -206,9 +232,9 @@
fileList3: [], fileList3: [],
fileList4: [], fileList4: [],
fileList5: [], fileList5: [],
fileList6: [],
formData: {}, formData: {},
rules: { rules: {}
}
} }
}, },
onLoad(e) { onLoad(e) {
@ -248,8 +274,7 @@
msg += ' ' + this.$languageData.me.merchanrName + ' ' msg += ' ' + this.$languageData.me.merchanrName + ' '
if (this.formData.operateType === '' || this.formData.operateType == null) if (this.formData.operateType === '' || this.formData.operateType == null)
msg += ' ' + this.$languageData.me.runType + ' ' msg += ' ' + this.$languageData.me.runType + ' '
} } else if (this.step === 1) {
else if(this.step === 1){
if (this.formData.legalPersonName === '' || this.formData.legalPersonName == null) if (this.formData.legalPersonName === '' || this.formData.legalPersonName == null)
msg += ' ' + this.$languageData.me.leName + ' ' msg += ' ' + this.$languageData.me.leName + ' '
if (this.formData.contactPersonPhone === '' || this.formData.contactPersonPhone == null) if (this.formData.contactPersonPhone === '' || this.formData.contactPersonPhone == null)
@ -263,11 +288,11 @@
if (this.formData.legalPersonIdCard === '' || this.formData.legalPersonIdCard == null) if (this.formData.legalPersonIdCard === '' || this.formData.legalPersonIdCard == null)
msg += ' ' + this.$languageData.me.leId + ' ' msg += ' ' + this.$languageData.me.leId + ' '
if(this.fileList1 == null || this.fileList1.length === 0) if ((this.fileList1 == null || this.fileList1.length === 0) && this.formData.licenseType == 0)
msg += ' ' + this.$languageData.me.leupIdImg + ' ' msg += ' ' + this.$languageData.me.leupIdImg + ' '
if(this.fileList2 == null || this.fileList2.length === 0) if ((this.fileList2 == null || this.fileList2.length === 0) && this.formData.licenseType == 0)
msg += ' ' + this.$languageData.me.lebackIdImg + ' ' msg += ' ' + this.$languageData.me.lebackIdImg + ' '
if(this.fileList3 == null || this.fileList3.length === 0) if ((this.fileList3 == null || this.fileList3.length === 0) && this.formData.licenseType == 1)
msg += ' ' + this.$languageData.me.leholdIdImg + ' ' msg += ' ' + this.$languageData.me.leholdIdImg + ' '
if (this.formData.area == null || this.formData.area === 0) if (this.formData.area == null || this.formData.area === 0)
@ -283,6 +308,8 @@
msg += ' ' + this.$languageData.me.runImg + ' ' msg += ' ' + this.$languageData.me.runImg + ' '
if (this.fileList5 == null || this.fileList5.length === 0) if (this.fileList5 == null || this.fileList5.length === 0)
msg += ' ' + this.$languageData.me.guaImg + ' ' 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) { if (msg.length > 0) {
this.$modal.msg(msg + this.$languageData.me.cannotbeNUll) this.$modal.msg(msg + this.$languageData.me.cannotbeNUll)
@ -314,7 +341,13 @@
this.showAddr = true this.showAddr = true
}, },
addrChg(e) { addrChg(e) {
const {columnIndex,value,values, index,picker = this.$refs.uPicker} = e const {
columnIndex,
value,
values,
index,
picker = this.$refs.uPicker
} = e
// () // ()
if (columnIndex === 0) { if (columnIndex === 0) {
// pickerthis // pickerthis
@ -339,23 +372,51 @@
this.formData.address = addr.substring(idx + 1) this.formData.address = addr.substring(idx + 1)
} }
if (this.formData.operateType) { if (this.formData.operateType) {
this.formData.operateTypeLabel = this.opTypes[0].filter(item=>item.id == this.formData.operateType)[0].label this.formData.operateTypeLabel = this.opTypes[0].filter(item => item.id == this.formData
.operateType)[0].label
} }
if (this.formData.idCardFrontImagePath) if (this.formData.idCardFrontImagePath)
this.fileList1 = [{type: "image", url: this.formData.idCardFrontImagePath, this.fileList1 = [{
thumb: this.formData.idCardFrontImagePath, status:"sucess"}] type: "image",
url: this.formData.idCardFrontImagePath,
thumb: this.formData.idCardFrontImagePath,
status: "sucess"
}]
if (this.formData.idCardBackImagePath) if (this.formData.idCardBackImagePath)
this.fileList2 = [{type: "image", url: this.formData.idCardBackImagePath, this.fileList2 = [{
thumb: this.formData.idCardBackImagePath, status:"sucess"}] type: "image",
url: this.formData.idCardBackImagePath,
thumb: this.formData.idCardBackImagePath,
status: "sucess"
}]
if (this.formData.userWithIdCardImagePath) if (this.formData.userWithIdCardImagePath)
this.fileList3 = [{type: "image", url: this.formData.userWithIdCardImagePath, this.fileList3 = [{
thumb: this.formData.userWithIdCardImagePath, status:"sucess"}] type: "image",
url: this.formData.userWithIdCardImagePath,
thumb: this.formData.userWithIdCardImagePath,
status: "sucess"
}]
if (this.formData.businessLicenseImage) if (this.formData.businessLicenseImage)
this.fileList4 = [{type: "image", url: this.formData.businessLicenseImage, this.fileList4 = [{
thumb: this.formData.businessLicenseImage, status:"sucess"}] type: "image",
url: this.formData.businessLicenseImage,
thumb: this.formData.businessLicenseImage,
status: "sucess"
}]
if (this.formData.earnestMoney) if (this.formData.earnestMoney)
this.fileList5 = [{type: "image", url: this.formData.earnestMoney, this.fileList5 = [{
thumb: this.formData.earnestMoney, status:"sucess"}] 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 = '' if (this.formData.gender == null) this.formData.gender = ''
}) })
@ -374,6 +435,8 @@
this.formData.businessLicenseImage = this.fileList4[0].url this.formData.businessLicenseImage = this.fileList4[0].url
if (this.fileList5.length > 0) if (this.fileList5.length > 0)
this.formData.earnestMoney = this.fileList5[0].url 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.formData.commonContactAddress = this.formData.area + '/' + this.formData.address
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
@ -383,7 +446,8 @@
setTimeout(() => { setTimeout(() => {
this.$refs.loading.close(); this.$refs.loading.close();
setTimeout(() => { setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess) this.$modal.msgSuccess(this.languageData
.updateSuccess)
uni.switchTab({ uni.switchTab({
url: '/pages/home/index' url: '/pages/home/index'
}) })
@ -423,6 +487,9 @@
if (!this.formData.fileLlist5) { if (!this.formData.fileLlist5) {
this.formData.fileList5 = [] this.formData.fileList5 = []
} }
if (!this.formData.fileLlist6) {
this.formData.fileList6 = []
}
// multiple true , file // multiple true , file
let lists = [].concat(event.file); let lists = [].concat(event.file);
let fileListLen = this[`fileList${event.name}`].length; let fileListLen = this[`fileList${event.name}`].length;

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

@ -1,91 +1,145 @@
<template> <template>
<view class="container-with-elep full-height-with-titile"> <view class="container-with-elep full-height-with-titile">
<view style="border-radius: 20px; background-color: white; padding:10px;"> <view style="border-radius: 20px; background-color: white; padding:10px;">
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view> <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> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.accType" :right-text="languageData.me.agentAcc" /> <InfoItem :ph="user.phone" :title="$t('me.info.phone')"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="languageData.me.agentName" :rightText="user.agentName" /> icon-name="phone-filled" :ro="true"></InfoItem>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.registerDate')" :rightText="user.registerTime" /> <InfoItem v-model="user.contactPersonPhone" :ph="languageData.me.lePhone"
</uni-list> :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 :value="user.area" inputAlign="right" border="none" :disabled="da" :readonly="ro" clearable ></u--input>
</view> </view>
<view style="border-radius: 20px; background-color: white; padding:10px; margin-top: 10px;"> </InfoItem>
<view style="font-weight: 500;">{{$t('me.info.basic')}}</view> <InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.me.addrDetail"
<uni-list> icon-name="location-filled" :ro="false"></InfoItem>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" :title="$t('me.info.phone')" :rightText="user.phone" /> <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> </uni-list>
</view> <view style="font-weight: 500; margin-top: 20px;">{{$t('me.info.auth')}}</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>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}"
<view v-if="user.status === 2"> :title="$t('me.info.reviewStatus')" :rightText="getStatus(user.status)" />
<!-- // <uni-list-item showExtraIcon="true" :extraIcon="{type: 'vip-filled'}" :title="''" :rightText="''" /> --> <view style="margin-top: 10px;">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" :title="$t('me.info.name')" :rightText="user.name" /> <uni-list-item v-if="user.status == '3'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" :title="$t('me.info.idCard')" :rightText="user.idCardNumber" /> :title="languageData.me.failureReason" :rightText="user.failureReason" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" :title="$t('me.info.expire')" :rightText="'2030/03/18'" /> <button @click="goAuth(0)" v-show="!['1','2','3'].includes(user.status)"
<uni-list-item v-if="user.userType == '0'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.pAddress')" :rightText="user.addr" /> class="submit-btn">{{languageData.me.authImme}}</button>
<uni-list-item v-if="user.userType == '1'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" /> <button @click="goAuth(1)"
<uni-list-item v-if="user.userType == '2'" showExtraIcon="true" :extraIcon="{type: 'location-filled'}" :title="$t('me.info.mAddress')" :rightText="user.addr" /> v-show="user.status === '1' || user.status === '2' || user.status === '3'"
</view> class="submit-btn">{{user.status == '3' ? languageData.me.reAuth:languageData.me.checkAuth}}</button>
<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> </view>
</uni-list> </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>
</view> </view>
<button @click="modifySimple()" v-show="user.status === '2' || true" 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> </template>
<script> <script>
import { getAgentProfile } from "@/api/system/user" import {
getAgentProfile,
updateAgentProfile
} from "@/api/system/user"
import InfoItem from '@/components/auth/InfoItem.vue'
import { addr } from "@/config/addr";
export default { export default {
components: {
InfoItem
},
data() { data() {
return { return {
imgList: ['http://sss', 'http://sss'], imgList: ['http://sss', 'http://sss'],
user: {}, user: {},
roleGroup: "", roleGroup: "",
postGroup: "", postGroup: "",
languageData:{} languageData: {},
showAddr: false,
addrData: '',
} }
}, },
onLoad() { onLoad() {
this.getUser(); this.getUser();
this.languageData = this.$languageData; this.languageData = this.$languageData;
}, if(uni.getLocale() == 'en'){
watch:{ this.addrData = addr.en
languageData(){ }else if(uni.getLocale() == 'zh-Hans'){
uni.setNavigationBarTitle({ this.addrData = addr.cn
title: this.$languageData.navBar.userInfo }else{
}); this.addrData = addr.laos
} }
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
this.$tab.navigateTo('/pages/mine/info/proxy/edit') this.$tab.navigateTo('/pages/mine/info/proxy/edit')
}, },
methods: { 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(() => {
this.$refs.loading.close();
setTimeout(() => {
this.$modal.msgSuccess(this.languageData.updateSuccess)
uni.switchTab({
url: '/pages/home/index'
})
}, 500)
}, 1000)
})
}
}).catch(e => {
this.$refs.loading.close();
})
},
getUser() { getUser() {
getAgentProfile().then(response => { getAgentProfile().then(response => {
this.user = response.data 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) console.log(response.data)
}) })
}, },
@ -121,6 +175,7 @@
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
.submit-btn { .submit-btn {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
@ -134,5 +189,4 @@
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25); box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
</style> </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