Commit d2984a5e authored by lizhan's avatar lizhan

📝 【TASK-20240806-02】TASK:APP设置页面信息修改

增加地址、会员信息相关内容
parent 01b87b02
<template> <template>
<view> <view>
<view class="site"> <view class="site">
<view class="header-toper"> <view class="header-toper">
<!-- <view class="start-bar"></view> --> <!-- <view class="start-bar"></view> -->
<view class="header-toper-title"> <view class="header-toper-title">
<image src="../../static/img/back.png" mode="" @click="goPage('../index/index')"></image> <image src="../../static/img/back.png" mode="" @click="goPage('../index/index')"></image>
<text>{{$lang.lang.site.set}}</text> <text>{{ $lang.lang.site.set }}</text>
</view> </view>
</view> </view>
<!-- <view class="start-bar"></view> --> <!-- <view class="start-bar"></view> -->
<view class="items mt200"> <view class="items mt200">
<view class="items-v" @click="$request.goPage('../auth/auth')"> <view class="items-v">
<image src=".../../static/img/site_auth.png" mode=""></image> <image src=".../../static/img/site_vip.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>{{$lang.lang.site.auth}}</text> <text>{{ $lang.lang.site.vip }}</text>
<view :class="idStatus==2?'items-v-it-rt color36':idStatus==1?'items-v-it-rt rte6':'items-v-it-rt'">{{noticeId}}</view> <view class="text">VIP1</view>
</view> </view>
</view> </view>
<view class="items-v"> <view class="items-v" @click="$request.goPage('../auth/auth')">
<image src=".../../static/img/site_company.png" mode=""></image> <image src=".../../static/img/site_auth.png" mode=""></image>
<view class="items-v-it noborder"> <view class="items-v-it">
<text>{{$lang.lang.site.comAuth}}</text> <text>{{ $lang.lang.site.auth }}</text>
<view :class="companyStatus==2?'items-v-it-rt color36':companyStatus==1?'items-v-it-rt rte6':'items-v-it-rt'">{{companyNotice}}</view> <view
</view> :class="
</view> idStatus == 2
</view> ? 'items-v-it-rt color36'
: idStatus == 1
<view class="items"> ? 'items-v-it-rt rte6'
<view class="items-v"> : 'items-v-it-rt'
<image src=".../../static/img/site_tel.png" mode=""></image> "
<view class="items-v-it"> >{{ noticeId }}</view
<text v-if="userInfo">{{$lang.lang.site.bindTel}}: {{userInfo.areaCode?$request.checkAddIcon(userInfo.areaCode):''}}{{userInfo.mobile?(userInfo.mobile.substr(0, 3)+'****'+userInfo.mobile.substr(8, 3)):$lang.lang.site.unbind}}</text> >
<view class="items-v-it-rt rte036" @click="changMobile">{{$lang.lang.site.changeBind}}</view> </view>
</view> </view>
</view> <view class="items-v">
<view class="items-v"> <image src=".../../static/img/site_company.png" mode=""></image>
<image src=".../../static/img/mail.png" mode=""></image> <view class="items-v-it noborder">
<view class="items-v-it"> <text>{{ $lang.lang.site.comAuth }}</text>
<text v-if="userInfo">{{$lang.lang.site.bindEmail}}:<span class="email">{{userInfo.email||$lang.lang.site.unbind}}</span></text> <view
<view class="items-v-it-rt rte036" @click="changMail">{{userInfo.email?$lang.lang.site.changeBind:$lang.lang.site.tobind}}</view> :class="
</view> companyStatus == 2
</view> ? 'items-v-it-rt color36'
<view class="items-v" @click="toEditPsd"> : companyStatus == 1
<image src=".../../static/img/site_pass.png" mode=""></image> ? 'items-v-it-rt rte6'
<view class="items-v-it"> : 'items-v-it-rt'
<text>{{$lang.lang.site.editPsd}}</text> "
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> >{{ companyNotice }}</view
</view> >
</view> </view>
<view class="items-v" @click="$request.goPage('../telcode/telcode')"> </view>
<image src=".../../static/img/site_pass.png" mode=""></image> </view>
<view class="items-v-it noborder">
<text>{{$lang.lang.site.controlPsd}}</text> <view class="items">
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> <view class="items-v">
</view> <image src=".../../static/img/site_tel.png" mode=""></image>
</view> <view class="items-v-it">
</view> <text v-if="userInfo"
>{{ $lang.lang.site.bindTel }}:
<view class="items"> {{ userInfo.areaCode ? $request.checkAddIcon(userInfo.areaCode) : ''
<view class="items-v" @click="toMyInfo"> }}{{
<image src=".../../static/img/site_person.png" mode=""></image> userInfo.mobile
<view class="items-v-it "> ? userInfo.mobile.substr(0, 3) + '****' + userInfo.mobile.substr(8, 3)
<text>{{$lang.lang.site.info}}</text> : $lang.lang.site.unbind
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> }}</text
</view> >
</view> <view class="items-v-it-rt rte036" @click="changMobile">{{
<view class="items-v" @click="toCompanyInfo"> $lang.lang.site.changeBind
<image src=".../../static/img/site_company.png" mode=""></image> }}</view>
<view class="items-v-it noborder"> </view>
<text>{{$lang.lang.site.companyInfo}}</text> </view>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> <view class="items-v">
</view> <image src=".../../static/img/mail.png" mode=""></image>
</view> <view class="items-v-it">
</view> <text v-if="userInfo"
>{{ $lang.lang.site.bindEmail }}:<span class="email">{{
<view class="items"> userInfo.email || $lang.lang.site.unbind
<view class="items-v" @click="$request.goPage('../help/help')"> }}</span></text
<image src=".../../static/img/site_help.png" mode=""></image> >
<view class="items-v-it"> <view class="items-v-it-rt rte036" @click="changMail">{{
<text>{{$lang.lang.site.help}}</text> userInfo.email ? $lang.lang.site.changeBind : $lang.lang.site.tobind
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> }}</view>
</view> </view>
</view> </view>
<view class="items-v" @click="$request.goPage('../ecash/ecash')"> <view class="items-v" @click="toEditPsd">
<image src=".../../static/img/site_person.png" mode=""></image> <image src=".../../static/img/site_pass.png" mode=""></image>
<view class="items-v-it noborder"> <view class="items-v-it">
<text>{{$lang.lang.site.search}}</text> <text>{{ $lang.lang.site.editPsd }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image> <image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view> </view>
</view> </view>
</view> <view class="items-v" @click="$request.goPage('../telcode/telcode')">
<!-- <view class="es-btn" @click="getAdData(1)"> <image src=".../../static/img/site_pass.png" mode=""></image>
<view class="items-v-it noborder">
<text>{{ $lang.lang.site.controlPsd }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
</view>
<view class="items">
<view class="items-v" @click="toMyInfo">
<image src=".../../static/img/site_person.png" mode=""></image>
<view class="items-v-it">
<text>{{ $lang.lang.site.info }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
<view class="items-v" @click="toCompanyInfo">
<image src=".../../static/img/site_company.png" mode=""></image>
<view class="items-v-it">
<text>{{ $lang.lang.site.companyInfo }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
<view class="items-v">
<image src=".../../static/img/site_address.png" mode=""></image>
<view class="items-v-it noborder">
<text>{{ $lang.lang.site.address }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
</view>
<view class="items">
<view class="items-v" @click="$request.goPage('../help/help')">
<image src=".../../static/img/site_help.png" mode=""></image>
<view class="items-v-it">
<text>{{ $lang.lang.site.help }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
<view class="items-v" @click="$request.goPage('../ecash/ecash')">
<image src=".../../static/img/site_person.png" mode=""></image>
<view class="items-v-it noborder">
<text>{{ $lang.lang.site.search }}</text>
<image class="rgt" src="../../static/img/rgt.png" mode=""></image>
</view>
</view>
</view>
<!-- <view class="es-btn" @click="getAdData(1)">
<text>V{{version}}<text class="redtext" v-if="adData">{{$lang.lang.notices.newVersions}}</text></text> <text>V{{version}}<text class="redtext" v-if="adData">{{$lang.lang.notices.newVersions}}</text></text>
</view> </view>
<view class="es-btn"> <view class="es-btn">
<text>V{{version}}</text> <text>V{{version}}</text>
</view> --> </view> -->
<view class="items"> <view class="items">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view class="items-v" @click="getAdData(1)"> <view class="items-v" @click="getAdData(1)">
<image src=".../../static/img/site_person.png" mode=""></image> <image src=".../../static/img/site_person.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>V{{version}}<text class="redtext" v-if="adData">{{$lang.lang.notices.newVersions}}</text></text> <text
<!-- <image class="rgt" src="../../static/img/rgt.png" mode=""></image> --> >V{{ version
</view> }}<text class="redtext" v-if="adData">{{
</view> $lang.lang.notices.newVersions
<!-- #endif --> }}</text></text
<view class="items-v" @click="changeLang(locale)"> >
<image src=".../../static/img/earth.png" mode=""></image> <!-- <image class="rgt" src="../../static/img/rgt.png" mode=""></image> -->
<view class="items-v-it"> </view>
<text>{{$lang.lang.site.change}}</text> </view>
<text>{{locale=='zh'?'English':$lang.lang.site.Zh}}</text> <!-- #endif -->
</view> <view class="items-v" @click="changeLang(locale)">
</view> <image src=".../../static/img/earth.png" mode=""></image>
</view> <view class="items-v-it">
</view> <text>{{ $lang.lang.site.change }}</text>
<view class="footer"> <text>{{ locale == 'zh' ? 'English' : $lang.lang.site.Zh }}</text>
<view @click="loginOut">{{$lang.lang.site.exit}}</view> </view>
</view> </view>
<view class="footer2"> </view>
<view @click="loginOff" class='logoff'>{{$lang.lang.site.logOff}}</view> </view>
</view> <view class="footer">
<view @click="loginOut">{{ $lang.lang.site.exit }}</view>
</view>
<view class="footer2">
<view @click="loginOff" class="logoff">{{ $lang.lang.site.logOff }}</view>
</view>
<uni-popup ref="adpopup" type="center" :mask-click="false"> <uni-popup ref="adpopup" type="center" :mask-click="false">
<view class="ad-conten"> <view class="ad-conten">
<image v-if="!forceUpdate" @click="closeAd" class="ad-bg" src='../../static/img/index_close.png'></image> <image
<view class="ad-title">V{{appVersion}}{{$lang.lang.notices.newVersion}}</view> v-if="!forceUpdate"
<view class="ad-info"> @click="closeAd"
<rich-text :nodes="adData"></rich-text> class="ad-bg"
</view> src="../../static/img/index_close.png"
<view class="ad-btns"> ></image>
<view class="ad-btn" @click="toupdate"> <view class="ad-title">V{{ appVersion }}{{ $lang.lang.notices.newVersion }}</view>
<view>{{$lang.lang.notices.update}}</view> <view class="ad-info">
</view> <rich-text :nodes="adData"></rich-text>
<view v-if="!forceUpdate" class="ad-btn" @click="closeAd"> </view>
<view>{{$lang.lang.notices.close}}</view> <view class="ad-btns">
</view> <view class="ad-btn" @click="toupdate">
</view> <view>{{ $lang.lang.notices.update }}</view>
<view class="progress" v-if="showdownLine"> </view>
<progress :percent="downloadNum" show-info stroke-width="3" /> <view v-if="!forceUpdate" class="ad-btn" @click="closeAd">
</view> <view>{{ $lang.lang.notices.close }}</view>
</view> </view>
</uni-popup> </view>
<uni-popup ref="newpass" type="center"> <view class="progress" v-if="showdownLine">
<view class="newpass_content"> <progress :percent="downloadNum" show-info stroke-width="3" />
<view class="newpss_title">{{$lang.lang.site.startPsd}}</view> </view>
<view class="login-item"> </view>
<view class="login-vp login-v"> </uni-popup>
<input class="vp-input" v-model="password" type="password" maxlength="32" :placeholder="$lang.lang.notices.numPsd"> <uni-popup ref="newpass" type="center">
</view> <view class="newpass_content">
<view class="login-vp login-v"> <view class="newpss_title">{{ $lang.lang.site.startPsd }}</view>
<input class="vp-input" v-model="password2" type="password" maxlength="32" :placeholder="$lang.lang.notices.password"> <view class="login-item">
</view> <view class="login-vp login-v">
</view> <input
<view class="login-btns"> class="vp-input"
<view class="" @click="setpsd">{{$lang.lang.site.confirm}}</view> v-model="password"
<view class="" @click="$refs.newpass.close()">{{$lang.lang.site.cancel}}</view> type="password"
</view> maxlength="32"
</view> :placeholder="$lang.lang.notices.numPsd"
</uni-popup> />
</view> </view>
<view class="login-vp login-v">
<input
class="vp-input"
v-model="password2"
type="password"
maxlength="32"
:placeholder="$lang.lang.notices.password"
/>
</view>
</view>
<view class="login-btns">
<view class="" @click="setpsd">{{ $lang.lang.site.confirm }}</view>
<view class="" @click="$refs.newpass.close()">{{ $lang.lang.site.cancel }}</view>
</view>
</view>
</uni-popup>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
userInfo: {}, userInfo: {},
noticeId:this.$lang.lang.site.unauth, noticeId: this.$lang.lang.site.unauth,
statusData:[], statusData: [],
companyNotice:this.$lang.lang.site.unauth, companyNotice: this.$lang.lang.site.unauth,
idStatus:0, idStatus: 0,
companyStatus:0, companyStatus: 0,
password:'', password: '',
password2:'', password2: '',
isHavePassword:false, isHavePassword: false,
locale: this.$request.getLocale(), locale: this.$request.getLocale(),
version:'1.0.2', version: '1.0.2',
appUrl:'', appUrl: '',
adData:'', adData: '',
versionCode:0, versionCode: 0,
appVersion:'', appVersion: '',
forceUpdate:0, forceUpdate: 0,
showdownLine:false, showdownLine: false,
downloadNum:0,//下载百分比 downloadNum: 0, //下载百分比
totalSize:0,//下载总量 totalSize: 0 //下载总量
} }
}, },
onLoad() { onLoad() {
this.getVersion() this.getVersion()
this.getStatusData() this.getStatusData()
//#ifdef APP-PLUS //#ifdef APP-PLUS
this.getAdData(2) this.getAdData(2)
//#endif //#endif
}, },
onShow() { onShow() {
this.getUserInfo() this.getUserInfo()
setTimeout(()=>{ setTimeout(() => {
// this.getCompany() // this.getCompany()
this.getIdcard() this.getIdcard()
},500) }, 500)
}, },
methods: { methods: {
toupdate(){ toupdate() {
let that = this let that = this
if(that.showdownLine) return if (that.showdownLine) return
// #ifdef APP-PLUS // #ifdef APP-PLUS
let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase() let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase()
if (platform == 'ios') { if (platform == 'ios') {
plus.runtime.openURL('https://apps.apple.com/us/app/e-c-logistics/id6466407990') plus.runtime.openURL('https://apps.apple.com/us/app/e-c-logistics/id6466407990')
}else{ } else {
// uni.showLoading({ // uni.showLoading({
// title: this.$lang.lang.notices.startDown, // title: this.$lang.lang.notices.startDown,
// }) // })
that.showdownLine = true that.showdownLine = true
uni.showLoading({ uni.showLoading({
title: this.$lang.lang.notices.startDown, title: this.$lang.lang.notices.startDown
}) })
var dtask = plus.downloader.createDownload( var dtask = plus.downloader.createDownload(
that.appUrl, that.appUrl,
{ {
timeout:60, timeout: 60,
retry: 1, retry: 1,
retryInterval: 3 retryInterval: 3
}, (d, status) => { },
if (status == 200) { (d, status) => {
uni.hideLoading(); if (status == 200) {
that.closeVe() uni.hideLoading()
that.showdownLine = false that.closeVe()
console.log("下载成功安装: " + d.filename); that.showdownLine = false
plus.runtime.install(d.filename, {}, () => { console.log('下载成功安装: ' + d.filename)
plus.runtime.install(
}, function(error) { d.filename,
uni.showToast({ {},
title: that.$lang.lang.notices.failDown, () => {},
duration: 1500, function (error) {
icon: "none" uni.showToast({
}); title: that.$lang.lang.notices.failDown,
}) duration: 1500,
} else { icon: 'none'
that.showdownLine = false })
that.closeVe() }
plus.nativeUI.alert(that.$lang.lang.notices.failDown) )
} } else {
} ); that.showdownLine = false
that.closeVe()
// uni.navigateTo({ plus.nativeUI.alert(that.$lang.lang.notices.failDown)
// url:'../updateView/updateView?url='+this.appUrl }
// }) }
)
try{
dtask.start(); // uni.navigateTo({
// 下载进度 // url:'../updateView/updateView?url='+this.appUrl
dtask.addEventListener("statechanged", function (download, status) { // })
if(that.downloadNum==100){
uni.hideLoading(); try {
} dtask.start()
switch (download.state) { // 下载进度
case 1: dtask.addEventListener('statechanged', function (download, status) {
showLoading.setTitle("正在下载"); if (that.downloadNum == 100) {
break; uni.hideLoading()
case 2: }
break; switch (download.state) {
case 3://进度条百分比 totalSize为总量,baifen为当前下载的百分比 case 1:
if(that.totalSize==0){ showLoading.setTitle('正在下载')
that.totalSize=parseInt(download.totalSize); break
} case 2:
if(parseInt(download.downloadedSize/that.totalSize*100)!=that.downloadNum){ break
that.downloadNum=parseInt(download.downloadedSize/that.totalSize*100); case 3: //进度条百分比 totalSize为总量,baifen为当前下载的百分比
} if (that.totalSize == 0) {
break; that.totalSize = parseInt(download.totalSize)
case 4: }
// mui.toast("下载完成"); if (
uni.hideLoading(); parseInt((download.downloadedSize / that.totalSize) * 100) != that.downloadNum
break; ) {
} that.downloadNum = parseInt((download.downloadedSize / that.totalSize) * 100)
}); }
}catch(err){ break
uni.hideLoading(); case 4:
that.showdownLine = false // mui.toast("下载完成");
that.closeVe() uni.hideLoading()
uni.showToast({ break
title: that.$lang.lang.notices.failDown, }
duration: 1500, })
icon: "none" } catch (err) {
}); uni.hideLoading()
} that.showdownLine = false
} that.closeVe()
// #endif uni.showToast({
}, title: that.$lang.lang.notices.failDown,
openAd(){ duration: 1500,
this.$refs.adpopup.open() icon: 'none'
}, })
closeAd(){ }
this.$refs.adpopup.close() }
}, // #endif
getAdData(n){ },
let that = this openAd() {
var addType = uni.getSystemInfoSync().platform=='ios'?'userIos':'userAndroid' this.$refs.adpopup.open()
that.$request.get('/app-api/system/version/latestVersion', { appType: addType,versionCode:that.versionCode}).then(res => { },
if(res.code==0&&res.data){ closeAd() {
that.adData = res.data.desp this.$refs.adpopup.close()
that.appUrl = res.data.appUrl },
that.appVersion = res.data.appVersion getAdData(n) {
that.forceUpdate = res.data.forceUpdate let that = this
if(n==1){ var addType = uni.getSystemInfoSync().platform == 'ios' ? 'userIos' : 'userAndroid'
that.openAd() that.$request
} .get('/app-api/system/version/latestVersion', {
}else{ appType: addType,
if(n==1){ versionCode: that.versionCode
uni.showToast({ })
title:that.$lang.lang.notices.nowNews, .then((res) => {
icon:'none' if (res.code == 0 && res.data) {
}) that.adData = res.data.desp
} that.appUrl = res.data.appUrl
} that.appVersion = res.data.appVersion
}) that.forceUpdate = res.data.forceUpdate
}, if (n == 1) {
changeLang(data){ that.openAd()
data = data=='zh'?'en':'zh' }
this.locale = data } else {
uni.setStorageSync('locale',data) if (n == 1) {
this.$lang.setLang(data) uni.showToast({
this.getIdcard() title: that.$lang.lang.notices.nowNews,
this.companyNotice=this.$lang.lang.site.unauth, icon: 'none'
uni.showToast({ })
title:data=='zh'?'切换成功':'Handover successful' }
}) }
}, })
goPage(){ },
uni.reLaunch({ changeLang(data) {
url:'../index/index', data = data == 'zh' ? 'en' : 'zh'
success() { this.locale = data
uni.setStorageSync('locale', data)
} this.$lang.setLang(data)
}) this.getIdcard()
}, ;(this.companyNotice = this.$lang.lang.site.unauth),
toEditPsd(){ uni.showToast({
if(!this.isHavePassword){ title: data == 'zh' ? '切换成功' : 'Handover successful'
this.$refs.newpass.open() })
}else{ },
uni.navigateTo({ goPage() {
url:'../editPsd/editPsd' uni.reLaunch({
}) url: '../index/index',
} success() {}
}, })
changMobile(){ },
if(!this.isHavePassword){ toEditPsd() {
this.$refs.newpass.open() if (!this.isHavePassword) {
}else{ this.$refs.newpass.open()
uni.navigateTo({ } else {
url:'../changeTel/changeTel' uni.navigateTo({
}) url: '../editPsd/editPsd'
} })
}, }
getUserInfo() { },
this.$request.get('/app-api/member/user/get').then(res => { changMobile() {
if(res.code==0&&res.data){ if (!this.isHavePassword) {
this.userInfo = res.data this.$refs.newpass.open()
this.isHavePassword = this.userInfo.isHavePassword } else {
} uni.navigateTo({
url: '../changeTel/changeTel'
})
}
},
getUserInfo() {
this.$request.get('/app-api/member/user/get').then((res) => {
if (res.code == 0 && res.data) {
this.userInfo = res.data
this.isHavePassword = this.userInfo.isHavePassword
}
})
},
loginOut() {
uni.removeStorageSync('Authorization')
uni.navigateTo({
url: '../login/login'
})
},
getIdcard() {
this.$request.get('/app-api/member/user/get-auth-idcard-info').then((res) => {
if (res.code == 0 && res.data) {
this.noticeId = this.getNoticeName(res.data.status)
this.idStatus = res.data.status
}
})
},
getCompany() {
this.$request.get('/app-api/member/user/get-auth-enterprise-info').then((res) => {
if (res.code == 0 && res.data) {
this.companyNotice = this.getNoticeName(res.data.status)
this.companyStatus = res.data.status
}
})
},
getNoticeName(status) {
var arr = this.statusData.find((item) => item.value == status)
if (arr) {
if (this.$lang.locale == 'zh') {
return arr.label
} else {
return arr.labelEn
}
} else {
return ''
}
},
getVersion() {
this.version = uni.getStorageSync('appversion')
this.versionCode = uni.getStorageSync('versionCode')
},
getStatusData() {
this.$request.getConfig('audit_status').then((res) => {
if (res.code == 0 && res.data && res.data.list.length > 0) {
this.statusData = res.data.list
}
})
},
toMyInfo() {
uni.navigateTo({
url: '../my_info/my_info'
})
},
toCompanyInfo() {
uni.navigateTo({
url: '../company_info/company_info'
})
},
changMail() {
if (!this.isHavePassword) {
this.$refs.newpass.open()
} else {
uni.navigateTo({
url: '../edit_mail/edit_mail'
})
}
},
setpsd() {
let params = {
password: this.password2
}
}) if (this.password == '') {
}, return uni.showToast({
loginOut(){ title: this.$lang.lang.notices.password,
uni.removeStorageSync('Authorization') icon: 'error'
uni.navigateTo({ })
url:"../login/login" } else {
}) var reg1 = new RegExp('^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$')
}, if (!reg1.test(this.password)) {
getIdcard () { return uni.showToast({
this.$request.get('/app-api/member/user/get-auth-idcard-info').then(res => { title: this.$lang.lang.notices.numPsd,
if(res.code==0&&res.data){ icon: 'error'
this.noticeId = this.getNoticeName(res.data.status) })
this.idStatus = res.data.status }
} }
}) if (this.password2 == '') {
}, return uni.showToast({
getCompany () { title: this.$lang.lang.notices.nextPsd,
this.$request.get('/app-api/member/user/get-auth-enterprise-info').then(res => { icon: 'error'
if(res.code==0&&res.data){ })
this.companyNotice = this.getNoticeName(res.data.status) }
this.companyStatus = res.data.status if (this.password != this.password2) {
} return uni.showToast({
}) title: this.$lang.lang.notices.different,
}, icon: 'none'
getNoticeName(status){ })
var arr = this.statusData.find(item => item.value == status) }
if(arr){ let that = this
if(this.$lang.locale=='zh'){ that.$request.post('/app-api/member/update-password', params).then((res) => {
return arr.label if (res.code == 0) {
}else{ that.getUserInfo()
return arr.labelEn that.$refs.newpass.close()
} uni.showToast({
}else{ title: this.$lang.lang.notices.edited,
return '' icon: 'none'
} })
}, } else {
getVersion(){ uni.showToast({
this.version = uni.getStorageSync('appversion'); title: res.msg,
this.versionCode = uni.getStorageSync('versionCode'); icon: 'none'
}, })
getStatusData(){ }
this.$request.getConfig('audit_status').then(res => { })
if(res.code==0&&res.data && res.data.list.length > 0){ },
this.statusData = res.data.list loginOff() {
} let that = this
}) uni.showModal({
}, title: '提示',
toMyInfo(){ content: that.$lang.lang.site.logNotice,
uni.navigateTo({ success: function (res) {
url:'../my_info/my_info' if (res.confirm) {
}) that.$request.deleted('/app-api/member/member/cancellation').then((res) => {
}, if (res.code == 0 && res.data) {
toCompanyInfo(){ uni.showToast({
uni.navigateTo({ title: that.$lang.lang.site.offSuccess,
url:'../company_info/company_info' icon: 'none'
}) })
}, uni.setStorageSync('Authorization', '')
changMail(){ setTimeout(() => {
if(!this.isHavePassword){ uni.reLaunch({
this.$refs.newpass.open() url: '../login/login'
}else{ })
uni.navigateTo({ // uni.reLaunch({
url:'../edit_mail/edit_mail' // url: '../login/login'
}) // })
} }, 2000)
}, } else {
setpsd () { uni.showToast({
let params = { title: res.msg,
password: this.password2, icon: 'none'
} })
}
if(this.password == ''){ })
return uni.showToast({ } else if (res.cancel) {
title: this.$lang.lang.notices.password, console.log('用户点击取消')
icon: 'error', }
}) }
}else{ })
var reg1 = new RegExp('^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$') }
if (!reg1.test(this.password)) { }
return uni.showToast({ }
title: this.$lang.lang.notices.numPsd,
icon: 'error',
})
}
}
if(this.password2 == ''){
return uni.showToast({
title: this.$lang.lang.notices.nextPsd,
icon: 'error',
})
}
if(this.password!=this.password2){
return uni.showToast({
title: this.$lang.lang.notices.different,
icon: 'none',
})
}
let that = this
that.$request.post('/app-api/member/update-password', params).then(res => {
if(res.code == 0){
that.getUserInfo()
that.$refs.newpass.close()
uni.showToast({
title:this.$lang.lang.notices.edited,
icon: 'none'
})
}else{
uni.showToast({
title: res.msg ,
icon: 'none',
})
}
})
},
loginOff(){
let that = this
uni.showModal({
title: '提示',
content: that.$lang.lang.site.logNotice,
success: function (res) {
if (res.confirm) {
that.$request.deleted('/app-api/member/member/cancellation').then(res => {
if(res.code == 0 && res.data){
uni.showToast({
title:that.$lang.lang.site.offSuccess,
icon: 'none'
})
uni.setStorageSync('Authorization', '')
setTimeout(()=>{
uni.reLaunch({
url: '../login/login'
})
// uni.reLaunch({
// url: '../login/login'
// })
},2000)
}else{
uni.showToast({
title: res.msg ,
icon: 'none',
})
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
}
}
</script> </script>
<style> <style>
@import url(../../static/css/site.css); @import url(../../static/css/site.css);
</style> </style>
page{ page {
/* #ifdef H5 */ /* #ifdef H5 */
padding-top: 140upx; padding-top: 140upx;
/* #endif */ /* #endif */
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
padding-top: calc(var(--status-bar-height) + 100upx); padding-top: calc(var(--status-bar-height) + 100upx);
/* #endif */ /* #endif */
}
.items{
width: 90%;
margin: 0 auto 40upx;
background-color: var(--c0);
border-radius: 12upx;
} }
.items {
width: 90%;
margin: 0 auto 40upx;
background-color: var(--c0);
border-radius: 12upx;
}
.items-v { .items-v {
padding: 0 30upx; padding: 0 30upx;
display: flex; display: flex;
font-size: var(--f28); font-size: var(--f28);
color: var(--c3); color: var(--c3);
height: 120upx; height: 120upx;
align-items: center; align-items: center;
} }
.email{
font-size: var(--f26) !important; .email {
} font-size: var(--f26) !important;
.items-v image{ }
width: 44upx;
height: 42upx; .items-v image {
margin: 0 30upx 0 0; width: 44upx;
} height: 42upx;
.items-v-it{ margin: 0 30upx 0 0;
width: 90%; }
height: 100%;
display: flex; .items-v-it {
align-items: center; width: 90%;
border-bottom: 1px solid var(--ceb); height: 100%;
position: relative; display: flex;
justify-content: space-between; align-items: center;
} border-bottom: 1px solid var(--ceb);
.noborder{ position: relative;
border: none; justify-content: space-between;
} }
.items-v-it-rt{
position: absolute; .noborder {
right: 0; border: none;
font-size: var(--f24); }
color: var(--c9);
border: 1px solid var(--c9); .items-v-it-rt {
padding: 4upx 12upx; position: absolute;
border-radius: 4upx; right: 0;
} font-size: var(--f24);
.rgt{ color: var(--c9);
position: absolute; border: 1px solid var(--c9);
right: -30upx; padding: 4upx 12upx;
width: 20upx; border-radius: 4upx;
height: 30upx; }
}
.rte6{ .rgt {
border: 1px solid var(--ce6); position: absolute;
color: var(--ce6); right: -30upx;
} width: 20upx;
.color36{ height: 30upx;
border: 1px solid var(--c036); }
color: var(--c036);
} .rte6 {
.rte036{ border: 1px solid var(--ce6);
border: 1px solid var(--c036); color: var(--ce6);
color: var(--c036); }
border-radius: 30upx;
padding: 6upx 20upx; .color36 {
} border: 1px solid var(--c036);
.footer{ color: var(--c036);
width: 90%; }
margin: 0 auto;
padding-bottom: 20upx; .rte036 {
} border: 1px solid var(--c036);
.footer view{ color: var(--c036);
width: 100%; border-radius: 30upx;
border-radius: 12upx; padding: 6upx 20upx;
padding: 20upx 0; }
color: #fff;
text-align: center; .footer {
background-color: #1373eb; width: 90%;
margin-top: 40upx; margin: 0 auto;
} padding-bottom: 20upx;
.login-item{ }
border-radius: 20upx;
background-color: #fff; .footer view {
width: 86%; width: 100%;
margin: 0 auto; border-radius: 12upx;
padding: 3%; padding: 20upx 0;
margin-top: 30upx; color: #fff;
} text-align: center;
.login-v{ background-color: #1373eb;
display: flex; margin-top: 40upx;
height: 100upx; }
}
.login-v .vp-input{ .login-item {
/* color: var(--c0); */ border-radius: 20upx;
/* caret-color: var(--c0); */ background-color: #fff;
font-size: var(--f26); width: 86%;
} margin: 0 auto;
.login-vs{ padding: 3%;
display: flex; margin-top: 30upx;
align-items: center; }
font-size: var(--f30);
/* color: var(--c0); */ .login-v {
font-weight: 700; display: flex;
margin-right: 20upx; height: 100upx;
} }
.login-vp{
width: 100%; .login-v .vp-input {
border-bottom: 1px solid #e0e0e0; /* color: var(--c0); */
position: relative; /* caret-color: var(--c0); */
} font-size: var(--f26);
.login-phone{ }
display: flex;
} .login-vs {
.login-phone .login-area{ display: flex;
display: flex; align-items: center;
align-items: center; font-size: var(--f30);
justify-content: center; /* color: var(--c0); */
font-size: var(--f30); font-weight: 700;
/* background-color: #27417C; */ margin-right: 20upx;
border-radius: 60upx; }
height: 50upx;
margin-top: 30upx; .login-vp {
padding: 0 10upx; width: 100%;
margin-right: 20upx; border-bottom: 1px solid #e0e0e0;
font-size: var(--f26); position: relative;
} }
.login-phone .login-area text{
margin-right: 10upx; .login-phone {
display: flex;
}
.login-phone .login-area {
display: flex;
align-items: center;
justify-content: center;
font-size: var(--f30);
/* background-color: #27417C; */
border-radius: 60upx;
height: 50upx;
margin-top: 30upx;
padding: 0 10upx;
margin-right: 20upx;
font-size: var(--f26);
}
.login-phone .login-area text {
margin-right: 10upx;
} }
/* .vp-input::input-placeholder{ /* .vp-input::input-placeholder{
color:var(--c0); color:var(--c0);
} */ } */
.vp-input{ .vp-input {
margin-top: 30upx; margin-top: 30upx;
width: 86%; width: 86%;
font-size: var(--f26); font-size: var(--f26);
} }
.login-btns{ .login-btns {
margin-top: 40upx; margin-top: 40upx;
padding: 0 50upx; padding: 0 50upx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
} }
.login-btns view{
width: 40%; .login-btns view {
height: 60upx; width: 40%;
border-radius: 100upx; height: 60upx;
font-size: 30upx; border-radius: 100upx;
font-weight: 700; font-size: 30upx;
display: flex; font-weight: 700;
justify-content: center; display: flex;
align-items: center; justify-content: center;
margin-bottom: 20upx; align-items: center;
} margin-bottom: 20upx;
.login-btns view:first-child{ }
background: linear-gradient(0deg, #2878E0 0%, #016EF6 100%);
color: var(--c0); .login-btns view:first-child {
} background: linear-gradient(0deg, #2878E0 0%, #016EF6 100%);
.login-btns view:last-child{ color: var(--c0);
border: 1px solid #666; }
color: #666;
} .login-btns view:last-child {
.newpass_content{ border: 1px solid #666;
width: 580upx; color: #666;
background: #fff; }
border-radius: 12upx;
padding: 20upx; .newpass_content {
} width: 580upx;
.newpss_title{ background: #fff;
padding: 20upx; border-radius: 12upx;
font-size: 32upx; padding: 20upx;
font-weight: 600; }
color: #333;
} .newpss_title {
.ad-conten{ padding: 20upx;
width: 580upx; font-size: 32upx;
border-radius: 16upx; font-weight: 600;
background-image: url(../../static/img/index_pbg.png); color: #333;
background-repeat: no-repeat; }
background-size: 100%;
padding-top: 182upx; .ad-conten {
padding-bottom: 20upx; width: 580upx;
} border-radius: 16upx;
.ad-bg{ background-image: url(../../static/img/index_pbg.png);
width: 60upx; background-repeat: no-repeat;
height: 60upx; background-size: 100%;
margin-top: -154upx; padding-top: 182upx;
margin-right: 14upx; padding-bottom: 20upx;
float: right; }
}
.ad-title{ .ad-bg {
width: 100%; width: 60upx;
text-align: center; height: 60upx;
font-size: 40upx; margin-top: -154upx;
font-weight: 600; margin-right: 14upx;
} float: right;
.ad-btns{ }
width: 90%;
margin: 20rpx auto; .ad-title {
display:flex; width: 100%;
flex-direction: column; text-align: center;
align-items: center; font-size: 40upx;
justify-content: space-between; font-weight: 600;
} }
.ad-btn{
width: 90%; .ad-btns {
color: #fff; width: 90%;
text-align: center; margin: 20rpx auto;
padding: 40upx 0; display: flex;
background-image: url(../../static/img/btn_bg.png); flex-direction: column;
background-size: 100%; align-items: center;
background-repeat: no-repeat; justify-content: space-between;
} }
.ad-btn view{
margin-top: -20upx; .ad-btn {
font-size: 36upx; width: 90%;
} color: #fff;
.ad-info{ text-align: center;
width: 92%; padding: 40upx 0;
margin: 20upx auto; background-image: url(../../static/img/btn_bg.png);
height: 260upx; background-size: 100%;
overflow: auto; background-repeat: no-repeat;
} }
.es-btn{
width: 80%; .ad-btn view {
margin: 0 auto 20upx; margin-top: -20upx;
padding: 20upx 0; font-size: 36upx;
color: #666; }
font-size: 26upx;
} .ad-info {
.redtext{ width: 92%;
font-size: 26upx; margin: 20upx auto;
color: #FF0000; height: 260upx;
margin-left:12upx; overflow: auto;
} }
.progress{
width: 80%; .es-btn {
margin: 20upx auto; width: 80%;
} margin: 0 auto 20upx;
.footer2{ padding: 20upx 0;
padding: 20px; color: #666;
} font-size: 26upx;
.logoff{ }
margin-bottom: 50rpx;
margin-top: 10px !important; .redtext {
text-align:center; font-size: 26upx;
font-size: 12px; color: #FF0000;
color: #666; margin-left: 12upx;
} }
\ No newline at end of file
.progress {
width: 80%;
margin: 20upx auto;
}
.footer2 {
padding: 20px;
}
.logoff {
margin-bottom: 50rpx;
margin-top: 10px !important;
text-align: center;
font-size: 12px;
color: #666;
}
.items-v-it .text {
color: #666;
}
...@@ -741,6 +741,8 @@ export default { ...@@ -741,6 +741,8 @@ export default {
logOff: 'Log off', logOff: 'Log off',
offSuccess: 'Logged out successfully', offSuccess: 'Logged out successfully',
logNotice: logNotice:
'Are you sure you want to log out? After cancellation, all data related to the account will be deleted and cannot be restored. Are you sure to cancel?' 'Are you sure you want to log out? After cancellation, all data related to the account will be deleted and cannot be restored. Are you sure to cancel?',
vip: 'membership tiers',
address: 'address information'
} }
} }
...@@ -741,6 +741,8 @@ export default { ...@@ -741,6 +741,8 @@ export default {
controlPsd: '控货密码', controlPsd: '控货密码',
logOff: '注销当前账号', logOff: '注销当前账号',
offSuccess: '注销成功', offSuccess: '注销成功',
logNotice: '您确定要注销吗?注销后账号相关所有数据都会被删除,且无法恢复,您确定注销吗?' logNotice: '您确定要注销吗?注销后账号相关所有数据都会被删除,且无法恢复,您确定注销吗?',
vip: '会员等级',
address: '地址信息'
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment