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. 158
      pages/functions/proxyPayment.vue
  4. 215
      pages/home/index.vue
  5. 18
      pages/login.vue
  6. 176
      pages/mine/info/index.vue
  7. 22
      pages/mine/info/merchant/edit.vue
  8. 164
      pages/mine/info/merchant/index.vue
  9. 461
      pages/mine/info/proxy/edit.vue
  10. 172
      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 ຄືນເງິນຕາມອັດຕາທີ່ກຳນົດໄວ້ຫຼືຈ່າຍຄັມມິഷັນ, ຜະລິດຈາກການເຮັດທຸລະກິດທີ່ແທ້ຈິງ. ຄວາມລັບລູ້: ລາວກັບລາວຕ້ອງຮັກສາຂໍ້ມູນທີ່ໄດ້ຮັບຮູ້ໃນການຮ່ວມມືຫນ້າຕາມ, ຖ້າບໍ່ໄດ້ຮับໃບຮັບຮອງຈາກອີກເຫົ້າໜຶ່ງບໍ່ສາມາດເປີດເຜີຍໃຫ້ຜູ້ທີສາມຮູ້. ດຳເນີນການສັນຍາ: ສັນຍາອຸ່ງເວັບນີ້ມີຜົນກະທັບຕາມກົດໝາຍ, ຈາກວັນທີ່ທັງສອງເຫົ້າໜຶ່ງຍຳຍອມຮັບ/ລົງເຊັນ."
}
}

158
pages/functions/proxyPayment.vue

@ -3,7 +3,7 @@
<view class="page full-height-with-titile" style="overflow: auto;" v-if="!showResult">
<!-- 主内容区域 -->
<view class="content" @click="hideKeyboard">
<!-- <view v-show="step === 1" style="width: 100%;">
<!-- <view v-show="step === 1" style="width: 100%;">
<u-subsection style="width: 100%;" activeColor="#FDBE44" :list="['代付', '代收']" :current="0" @change="handleUserTypeChg"></u-subsection>
</view> -->
<view v-show="false" class="withdraw-amount" style="margin-bottom: 20rpx;">
@ -91,10 +91,10 @@
</u-radio-group>
</view>
</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">
<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>
</uni-section>
</view>
@ -117,9 +117,9 @@
</view>
<!-- 底部按钮 -->
<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 === 2" class="submit-btn" @click="step = 1" style="background-color: lightgray; color: white;">上一步</button>
<button v-if="step === 2" class="submit-btn" @click="onSubmit" style="margin-top: 30rpx;">立即支付</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;">{{this.$languageData.functions.lastStep}}</button>
<button v-if="step === 2" class="submit-btn" @click="onSubmit" style="margin-top: 30rpx;">{{this.$languageData.functions.payimme}}</button>
</view>
</view>
@ -157,15 +157,15 @@
</template>
<script>
import { createTopUp } from '@/api/home/qrcode.js'
import { getBalance } from '@/api/account/userAccount.js'
import { getBankList2 } from '@/api/bank/index.js'
import payPopup from '@/components/keyboard/payPopup.vue'
import { checkPwd } from '@/api/mine/payPwd.js'
import keyboard from "@/components/master-keyboard/master-keyboard.vue";
import payResult from '@/components/payResult/index.vue'
export default {
import { createTopUp } from '@/api/home/qrcode.js'
import { getBalance } from '@/api/account/userAccount.js'
import { getBankList2 } from '@/api/bank/index.js'
import payPopup from '@/components/keyboard/payPopup.vue'
import { checkPwd } from '@/api/mine/payPwd.js'
import keyboard from "@/components/master-keyboard/master-keyboard.vue";
import payResult from '@/components/payResult/index.vue'
export default {
components: {
payPopup,
payResult
@ -175,12 +175,12 @@
reciWay:[
{
key: 'u',
name: '系统账户',
name: this.$languageData.functions.sysUsr,
img: '/static/img/electricity.png'
},
{
key: 'c',
name: '银行卡',
name: this.$languageData.functions.bankCard,
img:'/static/img/water.png'
}
],
@ -192,7 +192,7 @@
},
{
key: 'c',
name: '银行卡',
name: this.$languageData.functions.bankCard,
img:'/static/img/water.png'
}
],
@ -402,198 +402,198 @@
this.show = true;
}
}
}
}
</script>
<style lang="scss" scoped>
.active{
.active{
border: 1px solid #FDBF44;
background-color: rgba(253, 191, 68, .2);
}
}
.popup-content2 {
.popup-content2 {
background-color: #fff;
padding: 20px;
border-radius: 10px;
font-size: 20rpx;
text-align: center;
}
}
.page {
.page {
padding: 0;
display: flex;
flex-direction: column;
}
}
.nav-bar {
.nav-bar {
height: 88rpx;
background-color: #333333;
display: flex;
align-items: center;
padding: 0 30rpx;
position: relative;
}
}
.back-icon {
.back-icon {
width: 20px;
height: 20px;
}
}
.nav-title {
.nav-title {
position: absolute;
left: 50%;
transform: translateX(-50%);
color: #FFFFFF;
font-size: 16px;
font-weight: 500;
}
}
.content {
.content {
flex: 1;
padding: 20rpx 30rpx;
}
}
.bank-card {
.bank-card {
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 30rpx;
padding-bottom: 10rpx;
margin-top: 30rpx;
}
}
.section-title {
.section-title {
font-size: 14px;
color: #333333;
margin-bottom: 14rpx;
padding-bottom: 14rpx;
display: block;
}
}
.bank-info {
.bank-info {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.bank-detail {
.bank-detail {
display: flex;
flex-direction: column;
}
}
.bank-name {
.bank-name {
font-size: 16px;
color: #333333;
margin-bottom: 8rpx;
}
}
.bank-number {
.bank-number {
font-size: 14px;
color: #666666;
}
}
.withdraw-amount {
.withdraw-amount {
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 20rpx;
padding-bottom: 15rpx;
}
}
.amount-header {
.amount-header {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.withdraw-all {
.withdraw-all {
font-size: 14px;
color: #f4d994;
}
}
.amount-input-area {
.amount-input-area {
display: flex;
align-items: center;
border-bottom: 1px solid #EEEEEE;
}
}
.u-input ::v-deep .uni-input-input {
.u-input ::v-deep .uni-input-input {
font-size: 58rpx;
font-weight: 500;
color: #333333;
height: 100rpx;
line-height: 100rpx;
}
}
.currency {
.currency {
font-size: 30px;
color: #333333;
margin-left: 20rpx;
}
}
.amount-footer {
.amount-footer {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.available-amount {
.available-amount {
font-size: 14px;
color: #999999;
}
}
.bottom-button {
.bottom-button {
padding: 50rpx 0;
}
}
.submit-btn {
.submit-btn {
background-color: #FDBF44;
color: #000;
font-size: 16px;
height: 88rpx;
line-height: 88rpx;
border-radius: 24rpx;
}
}
.popup-content {
.popup-content {
background-color: #FFFFFF;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
padding-bottom: env(safe-area-inset-bottom);
}
}
.popup-header {
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1px solid #EEEEEE;
}
}
.popup-title {
.popup-title {
font-size: 16px;
color: #333333;
font-weight: 500;
}
}
.bank-list {
.bank-list {
max-height: 600rpx;
overflow-y: auto;
}
}
.bank-item {
.bank-item {
padding: 30rpx;
border-bottom: 1px solid #EEEEEE;
}
}
.bank-item-name {
.bank-item-name {
font-size: 16px;
color: #333333;
margin-bottom: 8rpx;
display: block;
}
}
.bank-item-number {
.bank-item-number {
font-size: 14px;
color: #666666;
}
}
</style>

215
pages/home/index.vue

@ -142,17 +142,17 @@
</template>
<script>
import {
import {
getAmount
} from '@/api/account/transactionRecord.js'
import scanTheCode from '@/components/scan/scanTheCode.vue'
import {
} from '@/api/account/transactionRecord.js'
import scanTheCode from '@/components/scan/scanTheCode.vue'
import {
getToken
} from '@/utils/auth'
import {
} from '@/utils/auth'
import {
showConfirm
} from '@/utils/common'
export default {
} from '@/utils/common'
export default {
components: {
scanTheCode
},
@ -265,14 +265,14 @@
url: '/pages/functions/utilityPayment'
},
{
icon: this.$store.state.user.userCate == '3' ? 'man-add' : 'more-dot-fill',
name: this.$store.state.user.userCate == '3' ? this.$languageData.home.proxyPayment : this.$languageData.home.tbc,
url: this.$store.state.user.userCate == '3' ? '/pages/functions/proxyPayment' : undefined
icon: this.$store.state.user.userCate == '2' ? 'man-add' : 'more-dot-fill',
name: this.$store.state.user.userCate == '2' ? this.$languageData.home.proxyPayment : this.$languageData.home.tbc,
url: this.$store.state.user.userCate == '2' ? '/pages/functions/proxyPayment' : undefined
},
{
icon: this.$store.state.user.userCate != '1' ? 'order' : 'more-dot-fill',
name: this.$store.state.user.userCate != '1' ? this.$languageData.home.businessData : this.$languageData.home.tbc,
url: this.$store.state.user.userCate != '1' ? '/pages/mchManage/index' : undefined
icon: this.$store.state.user.userCate != '0' ? 'order' : 'more-dot-fill',
name: this.$store.state.user.userCate != '0' ? this.$languageData.home.businessData : this.$languageData.home.tbc,
url: this.$store.state.user.userCate != '0' ? '/pages/mchManage/index' : undefined
},
{
icon: 'more-dot-fill',
@ -294,38 +294,7 @@
icon: 'more-dot-fill',
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
// }
]
}
},
@ -489,41 +458,41 @@
return rs
}
}
}
}
</script>
<style lang="scss" scoped>
page {
page {
height: 100%;
width: 100%;
background-color: #f5f5f5;
}
}
body {
body {
overflow: hidden;
}
}
.language-list {
.language-list {
padding: 40rpx;
border: 1rpx solid #ffffff;
background-color: #fafafa;
}
}
.account-title {
.account-title {
display: flex;
justify-content: center;
font-size: 36rpx;
color: white;
position: relative;
}
}
.app-container {
.app-container {
width: 100%;
height: 100vh;
overflow: hidden;
}
}
.nav-bar {
.nav-bar {
height: 88rpx;
background-color: #ffffff;
display: flex;
@ -531,29 +500,29 @@
justify-content: space-between;
padding: 0 32rpx;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
}
.text-lg {
.text-lg {
font-size: 16px;
font-weight: 500;
}
}
.nav-right {
.nav-right {
display: flex;
align-items: center;
position: absolute;
right: 0;
}
}
.content-area {
.content-area {
// padding: 32rpx 32rpx 70rpx;
padding: 32rpx 0;
padding-top: 19rpx;
}
}
.account-card {
.account-card {
background-image: url('/static/svgs/lines.svg');
background-size: cover;
background-position: center;
@ -565,42 +534,42 @@
min-height: 240rpx;
display: flex;
align-items: center;
}
}
.account-info {
.account-info {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
}
}
.balance-label {
.balance-label {
font-size: 14px;
color: rgba(255, 255, 255, 0.9);
}
}
.balance-amount {
.balance-amount {
font-size: 23px;
color: #ffffff;
font-weight: 700;
margin-top: 12rpx;
}
}
.button-group {
.button-group {
display: flex;
flex-direction: column;
gap: 16rpx;
}
}
.action-button {
.action-button {
background-color: rgba(255, 255, 255, 0.2) !important;
border: none !important;
color: #ffffff !important;
font-size: 14px !important;
}
}
.features-grid {
.features-grid {
background: white;
padding: 10px;
border-radius: 12px;
@ -611,15 +580,15 @@
// position: relative;
// top: -70rpx;
top: 13rpx;
}
}
.feature-item {
.feature-item {
display: flex;
flex-direction: column;
align-items: center;
}
}
.feature-icon {
.feature-icon {
width: 96rpx;
height: 96rpx;
background-color: rgba(171, 146, 231, 0.1);
@ -629,9 +598,9 @@
align-items: center;
justify-content: center;
margin-bottom: 16rpx;
}
}
.feature-name {
.feature-name {
font-size: 14px;
color: #333333;
text-align: center;
@ -639,9 +608,9 @@
display: flex;
align-items: center;
font-weight: 500;
}
}
.promotion-banner {
.promotion-banner {
background-color: rgba(255, 125, 0, 0.05);
border: 1px solid rgba(255, 125, 0, 0.1);
border-radius: 16rpx;
@ -649,53 +618,53 @@
display: flex;
align-items: center;
// margin-bottom: 48rpx;
}
}
.promotion-text {
.promotion-text {
font-size: 14px;
color: #666666;
margin-left: 24rpx;
}
}
.section-header {
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
}
}
.section-title {
.section-title {
font-size: 16px;
font-weight: 500;
color: #333333;
}
}
.view-all {
.view-all {
font-size: 14px;
color: #999999;
}
}
.transaction-list {
.transaction-list {
display: flex;
flex-direction: column;
gap: 32rpx;
}
}
.transaction-item {
.transaction-item {
background-color: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.transaction-left {
.transaction-left {
display: flex;
align-items: center;
}
}
.transaction-icon {
.transaction-icon {
width: 80rpx;
height: 80rpx;
background-color: #f5f5f5;
@ -704,58 +673,58 @@
align-items: center;
justify-content: center;
margin-right: 24rpx;
}
}
.transaction-info {
.transaction-info {
display: flex;
flex-direction: column;
}
}
.transaction-title {
.transaction-title {
font-size: 14px;
color: #333333;
font-weight: 500;
}
}
.transaction-time {
.transaction-time {
font-size: 12px;
color: #999999;
margin-top: 8rpx;
}
}
.transaction-amount {
.transaction-amount {
font-size: 14px;
font-weight: 500;
}
}
.income {
.income {
color: #00b578;
}
}
.expense {
.expense {
color: #ff4d4f;
}
}
.tab-text {
.tab-text {
font-size: 12px;
color: #999999;
margin-top: 8rpx;
}
}
.active-text {
.active-text {
color: #1B6EF3;
}
}
.languageIcon {
.languageIcon {
display: flex;
justify-content: center;
align-items: center;
}
}
.c {
.c {
display: flex;
justify-content: left;
align-items: center;
}
}
</style>

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,

176
pages/mine/info/index.vue

@ -2,109 +2,177 @@
<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>
<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>
<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()" />
<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 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>
<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(1)" v-show="user.status === '2' || true" class="submit-btn" style="border-radius: 10px;">{{languageData.settings.confirmMod}}</button>
<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 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>
<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>
</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 {
components: {
InfoItem
},
data() {
return {
imgList:['http://sss', 'http://sss'],
texts: '0',
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
languageData: {},
addrData:{},
showAddr: false,
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
},
watch:{
languageData(){
uni.setNavigationBarTitle({
title: this.$languageData.navBar.userInfo
});
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: {
getGender(){
if(this.user.gender == null || this.user.gender.length == 0)
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')
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){
goAuth(flag) {
//
if(flag === 0){
if (flag === 0) {
uni.navigateTo({
url:'/pages/mine/info/edit'
url: '/pages/mine/info/edit'
})
}else{//
} else { //
uni.navigateTo({
url:'/pages/mine/info/edit?checkOnly=1'
url: '/pages/mine/info/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
getStatus(status) {
switch (status) {
case '1':
return this.languageData.me.aduiting
case '2':
@ -123,6 +191,7 @@
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
@ -136,5 +205,4 @@
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 => {

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

@ -1,101 +1,159 @@
<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>
<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-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>
<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>
<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" />
</InfoItem>
<InfoItem v-model="user.address" :ph="languageData.me.addrDetail" :title="languageData.me.addrDetail"
icon-name="location-filled" :ro="false"></InfoItem>
</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>
<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: '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>
<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 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>
<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="['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>
</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 {
components: {
InfoItem
},
data() {
return {
imgList:['http://sss', 'http://sss'],
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
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){
goAuth(flag) {
//
if(flag === 0){
if (flag === 0) {
uni.navigateTo({
url:'/pages/mine/info/merchant/edit'
url: '/pages/mine/info/merchant/edit'
})
}else{//
} else { //
uni.navigateTo({
url:'/pages/mine/info/merchant/edit?checkOnly=1'
url: '/pages/mine/info/merchant/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
getStatus(status) {
switch (status) {
case '1':
return this.$languageData.me.aduiting
case '2':
@ -114,6 +172,7 @@
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
@ -127,5 +186,4 @@
box-shadow: 0 6rpx 16rpx rgba(59, 124, 255, 0.25);
transition: all 0.3s ease;
}
</style>

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

@ -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>
</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"
<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,132 +257,167 @@
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(msg.length > 0){
this.$modal.msg(msg+ this.$languageData.me.cannotbeNUll)
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)
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)
}
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 = ''
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.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 = ''
})
},
@ -364,26 +425,29 @@
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'
})
@ -402,27 +466,30 @@
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,

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

@ -1,108 +1,160 @@
<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>
<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-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>
<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>
<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" />
</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>
<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>
<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: '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>
<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 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>
<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>
</template>
<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 {
components: {
InfoItem
},
data() {
return {
imgList:['http://sss', 'http://sss'],
imgList: ['http://sss', 'http://sss'],
user: {},
roleGroup: "",
postGroup: "",
languageData:{}
languageData: {},
showAddr: false,
addrData: '',
}
},
onLoad() {
this.getUser();
this.languageData = this.$languageData;
},
watch:{
languageData(){
uni.setNavigationBarTitle({
title: this.$languageData.navBar.userInfo
});
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){
goAuth(flag) {
//
if(flag === 0 || flag === 3){
if (flag === 0 || flag === 3) {
uni.navigateTo({
url:'/pages/mine/info/proxy/edit'
url: '/pages/mine/info/proxy/edit'
})
}else{//
} else { //
uni.navigateTo({
url:'/pages/mine/info/proxy/edit?checkOnly=1'
url: '/pages/mine/info/proxy/edit?checkOnly=1'
})
}
},
getStatus(status){
switch(status){
getStatus(status) {
switch (status) {
case '1':
return this.languageData.me.aduiting
case '2':
@ -121,6 +173,7 @@
page {
background-color: #ffffff;
}
.submit-btn {
width: 100%;
height: 88rpx;
@ -134,5 +187,4 @@
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