Commit d2984a5e authored by lizhan's avatar lizhan

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

增加地址、会员信息相关内容
parent 01b87b02
...@@ -5,23 +5,48 @@ ...@@ -5,23 +5,48 @@
<!-- <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">
<image src=".../../static/img/site_vip.png" mode=""></image>
<view class="items-v-it">
<text>{{ $lang.lang.site.vip }}</text>
<view class="text">VIP1</view>
</view>
</view>
<view class="items-v" @click="$request.goPage('../auth/auth')"> <view class="items-v" @click="$request.goPage('../auth/auth')">
<image src=".../../static/img/site_auth.png" mode=""></image> <image src=".../../static/img/site_auth.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>{{$lang.lang.site.auth}}</text> <text>{{ $lang.lang.site.auth }}</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="
idStatus == 2
? 'items-v-it-rt color36'
: idStatus == 1
? 'items-v-it-rt rte6'
: 'items-v-it-rt'
"
>{{ noticeId }}</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/site_company.png" mode=""></image>
<view class="items-v-it noborder"> <view class="items-v-it noborder">
<text>{{$lang.lang.site.comAuth}}</text> <text>{{ $lang.lang.site.comAuth }}</text>
<view :class="companyStatus==2?'items-v-it-rt color36':companyStatus==1?'items-v-it-rt rte6':'items-v-it-rt'">{{companyNotice}}</view> <view
:class="
companyStatus == 2
? 'items-v-it-rt color36'
: companyStatus == 1
? 'items-v-it-rt rte6'
: 'items-v-it-rt'
"
>{{ companyNotice }}</view
>
</view> </view>
</view> </view>
</view> </view>
...@@ -30,28 +55,44 @@ ...@@ -30,28 +55,44 @@
<view class="items-v"> <view class="items-v">
<image src=".../../static/img/site_tel.png" mode=""></image> <image src=".../../static/img/site_tel.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<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> <text v-if="userInfo"
<view class="items-v-it-rt rte036" @click="changMobile">{{$lang.lang.site.changeBind}}</view> >{{ $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/mail.png" mode=""></image> <image src=".../../static/img/mail.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text v-if="userInfo">{{$lang.lang.site.bindEmail}}:<span class="email">{{userInfo.email||$lang.lang.site.unbind}}</span></text> <text v-if="userInfo"
<view class="items-v-it-rt rte036" @click="changMail">{{userInfo.email?$lang.lang.site.changeBind:$lang.lang.site.tobind}}</view> >{{ $lang.lang.site.bindEmail }}:<span class="email">{{
userInfo.email || $lang.lang.site.unbind
}}</span></text
>
<view class="items-v-it-rt rte036" @click="changMail">{{
userInfo.email ? $lang.lang.site.changeBind : $lang.lang.site.tobind
}}</view>
</view> </view>
</view> </view>
<view class="items-v" @click="toEditPsd"> <view class="items-v" @click="toEditPsd">
<image src=".../../static/img/site_pass.png" mode=""></image> <image src=".../../static/img/site_pass.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>{{$lang.lang.site.editPsd}}</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 class="items-v" @click="$request.goPage('../telcode/telcode')"> <view class="items-v" @click="$request.goPage('../telcode/telcode')">
<image src=".../../static/img/site_pass.png" mode=""></image> <image src=".../../static/img/site_pass.png" mode=""></image>
<view class="items-v-it noborder"> <view class="items-v-it noborder">
<text>{{$lang.lang.site.controlPsd}}</text> <text>{{ $lang.lang.site.controlPsd }}</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>
...@@ -60,15 +101,22 @@ ...@@ -60,15 +101,22 @@
<view class="items"> <view class="items">
<view class="items-v" @click="toMyInfo"> <view class="items-v" @click="toMyInfo">
<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>{{$lang.lang.site.info}}</text> <text>{{ $lang.lang.site.info }}</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 class="items-v" @click="toCompanyInfo"> <view class="items-v" @click="toCompanyInfo">
<image src=".../../static/img/site_company.png" mode=""></image> <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"> <view class="items-v-it noborder">
<text>{{$lang.lang.site.companyInfo}}</text> <text>{{ $lang.lang.site.address }}</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>
...@@ -78,19 +126,19 @@ ...@@ -78,19 +126,19 @@
<view class="items-v" @click="$request.goPage('../help/help')"> <view class="items-v" @click="$request.goPage('../help/help')">
<image src=".../../static/img/site_help.png" mode=""></image> <image src=".../../static/img/site_help.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>{{$lang.lang.site.help}}</text> <text>{{ $lang.lang.site.help }}</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 class="items-v" @click="$request.goPage('../ecash/ecash')"> <view class="items-v" @click="$request.goPage('../ecash/ecash')">
<image src=".../../static/img/site_person.png" mode=""></image> <image src=".../../static/img/site_person.png" mode=""></image>
<view class="items-v-it noborder"> <view class="items-v-it noborder">
<text>{{$lang.lang.site.search}}</text> <text>{{ $lang.lang.site.search }}</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>
<!-- <view class="es-btn" @click="getAdData(1)"> <!-- <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">
...@@ -101,7 +149,12 @@ ...@@ -101,7 +149,12 @@
<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
>V{{ version
}}<text class="redtext" v-if="adData">{{
$lang.lang.notices.newVersions
}}</text></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>
...@@ -109,32 +162,37 @@ ...@@ -109,32 +162,37 @@
<view class="items-v" @click="changeLang(locale)"> <view class="items-v" @click="changeLang(locale)">
<image src=".../../static/img/earth.png" mode=""></image> <image src=".../../static/img/earth.png" mode=""></image>
<view class="items-v-it"> <view class="items-v-it">
<text>{{$lang.lang.site.change}}</text> <text>{{ $lang.lang.site.change }}</text>
<text>{{locale=='zh'?'English':$lang.lang.site.Zh}}</text> <text>{{ locale == 'zh' ? 'English' : $lang.lang.site.Zh }}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view @click="loginOut">{{$lang.lang.site.exit}}</view> <view @click="loginOut">{{ $lang.lang.site.exit }}</view>
</view> </view>
<view class="footer2"> <view class="footer2">
<view @click="loginOff" class='logoff'>{{$lang.lang.site.logOff}}</view> <view @click="loginOff" class="logoff">{{ $lang.lang.site.logOff }}</view>
</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"
@click="closeAd"
class="ad-bg"
src="../../static/img/index_close.png"
></image>
<view class="ad-title">V{{ appVersion }}{{ $lang.lang.notices.newVersion }}</view>
<view class="ad-info"> <view class="ad-info">
<rich-text :nodes="adData"></rich-text> <rich-text :nodes="adData"></rich-text>
</view> </view>
<view class="ad-btns"> <view class="ad-btns">
<view class="ad-btn" @click="toupdate"> <view class="ad-btn" @click="toupdate">
<view>{{$lang.lang.notices.update}}</view> <view>{{ $lang.lang.notices.update }}</view>
</view> </view>
<view v-if="!forceUpdate" class="ad-btn" @click="closeAd"> <view v-if="!forceUpdate" class="ad-btn" @click="closeAd">
<view>{{$lang.lang.notices.close}}</view> <view>{{ $lang.lang.notices.close }}</view>
</view> </view>
</view> </view>
<view class="progress" v-if="showdownLine"> <view class="progress" v-if="showdownLine">
...@@ -144,18 +202,30 @@ ...@@ -144,18 +202,30 @@
</uni-popup> </uni-popup>
<uni-popup ref="newpass" type="center"> <uni-popup ref="newpass" type="center">
<view class="newpass_content"> <view class="newpass_content">
<view class="newpss_title">{{$lang.lang.site.startPsd}}</view> <view class="newpss_title">{{ $lang.lang.site.startPsd }}</view>
<view class="login-item"> <view class="login-item">
<view class="login-vp login-v"> <view class="login-vp login-v">
<input class="vp-input" v-model="password" type="password" maxlength="32" :placeholder="$lang.lang.notices.numPsd"> <input
class="vp-input"
v-model="password"
type="password"
maxlength="32"
:placeholder="$lang.lang.notices.numPsd"
/>
</view> </view>
<view class="login-vp login-v"> <view class="login-vp login-v">
<input class="vp-input" v-model="password2" type="password" maxlength="32" :placeholder="$lang.lang.notices.password"> <input
class="vp-input"
v-model="password2"
type="password"
maxlength="32"
:placeholder="$lang.lang.notices.password"
/>
</view> </view>
</view> </view>
<view class="login-btns"> <view class="login-btns">
<view class="" @click="setpsd">{{$lang.lang.site.confirm}}</view> <view class="" @click="setpsd">{{ $lang.lang.site.confirm }}</view>
<view class="" @click="$refs.newpass.close()">{{$lang.lang.site.cancel}}</view> <view class="" @click="$refs.newpass.close()">{{ $lang.lang.site.cancel }}</view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -163,28 +233,28 @@ ...@@ -163,28 +233,28 @@
</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() {
...@@ -196,325 +266,334 @@ ...@@ -196,325 +266,334 @@
}, },
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) => { },
(d, status) => {
if (status == 200) { if (status == 200) {
uni.hideLoading(); uni.hideLoading()
that.closeVe() that.closeVe()
that.showdownLine = false that.showdownLine = false
console.log("下载成功安装: " + d.filename); console.log('下载成功安装: ' + d.filename)
plus.runtime.install(d.filename, {}, () => { plus.runtime.install(
d.filename,
}, function(error) { {},
() => {},
function (error) {
uni.showToast({ uni.showToast({
title: that.$lang.lang.notices.failDown, title: that.$lang.lang.notices.failDown,
duration: 1500, duration: 1500,
icon: "none" icon: 'none'
});
}) })
}
)
} else { } else {
that.showdownLine = false that.showdownLine = false
that.closeVe() that.closeVe()
plus.nativeUI.alert(that.$lang.lang.notices.failDown) plus.nativeUI.alert(that.$lang.lang.notices.failDown)
} }
} ); }
)
// uni.navigateTo({ // uni.navigateTo({
// url:'../updateView/updateView?url='+this.appUrl // url:'../updateView/updateView?url='+this.appUrl
// }) // })
try{ try {
dtask.start(); dtask.start()
// 下载进度 // 下载进度
dtask.addEventListener("statechanged", function (download, status) { dtask.addEventListener('statechanged', function (download, status) {
if(that.downloadNum==100){ if (that.downloadNum == 100) {
uni.hideLoading(); uni.hideLoading()
} }
switch (download.state) { switch (download.state) {
case 1: case 1:
showLoading.setTitle("正在下载"); showLoading.setTitle('正在下载')
break; break
case 2: case 2:
break; break
case 3://进度条百分比 totalSize为总量,baifen为当前下载的百分比 case 3: //进度条百分比 totalSize为总量,baifen为当前下载的百分比
if(that.totalSize==0){ if (that.totalSize == 0) {
that.totalSize=parseInt(download.totalSize); that.totalSize = parseInt(download.totalSize)
} }
if(parseInt(download.downloadedSize/that.totalSize*100)!=that.downloadNum){ if (
that.downloadNum=parseInt(download.downloadedSize/that.totalSize*100); parseInt((download.downloadedSize / that.totalSize) * 100) != that.downloadNum
) {
that.downloadNum = parseInt((download.downloadedSize / that.totalSize) * 100)
} }
break; break
case 4: case 4:
// mui.toast("下载完成"); // mui.toast("下载完成");
uni.hideLoading(); uni.hideLoading()
break; break
} }
}); })
}catch(err){ } catch (err) {
uni.hideLoading(); uni.hideLoading()
that.showdownLine = false that.showdownLine = false
that.closeVe() that.closeVe()
uni.showToast({ uni.showToast({
title: that.$lang.lang.notices.failDown, title: that.$lang.lang.notices.failDown,
duration: 1500, duration: 1500,
icon: "none" icon: 'none'
}); })
} }
} }
// #endif // #endif
}, },
openAd(){ openAd() {
this.$refs.adpopup.open() this.$refs.adpopup.open()
}, },
closeAd(){ closeAd() {
this.$refs.adpopup.close() this.$refs.adpopup.close()
}, },
getAdData(n){ getAdData(n) {
let that = this let that = this
var addType = uni.getSystemInfoSync().platform=='ios'?'userIos':'userAndroid' var addType = uni.getSystemInfoSync().platform == 'ios' ? 'userIos' : 'userAndroid'
that.$request.get('/app-api/system/version/latestVersion', { appType: addType,versionCode:that.versionCode}).then(res => { that.$request
if(res.code==0&&res.data){ .get('/app-api/system/version/latestVersion', {
appType: addType,
versionCode: that.versionCode
})
.then((res) => {
if (res.code == 0 && res.data) {
that.adData = res.data.desp that.adData = res.data.desp
that.appUrl = res.data.appUrl that.appUrl = res.data.appUrl
that.appVersion = res.data.appVersion that.appVersion = res.data.appVersion
that.forceUpdate = res.data.forceUpdate that.forceUpdate = res.data.forceUpdate
if(n==1){ if (n == 1) {
that.openAd() that.openAd()
} }
}else{ } else {
if(n==1){ if (n == 1) {
uni.showToast({ uni.showToast({
title:that.$lang.lang.notices.nowNews, title: that.$lang.lang.notices.nowNews,
icon:'none' icon: 'none'
}) })
} }
} }
}) })
}, },
changeLang(data){ changeLang(data) {
data = data=='zh'?'en':'zh' data = data == 'zh' ? 'en' : 'zh'
this.locale = data this.locale = data
uni.setStorageSync('locale',data) uni.setStorageSync('locale', data)
this.$lang.setLang(data) this.$lang.setLang(data)
this.getIdcard() this.getIdcard()
this.companyNotice=this.$lang.lang.site.unauth, ;(this.companyNotice = this.$lang.lang.site.unauth),
uni.showToast({ uni.showToast({
title:data=='zh'?'切换成功':'Handover successful' title: data == 'zh' ? '切换成功' : 'Handover successful'
}) })
}, },
goPage(){ goPage() {
uni.reLaunch({ uni.reLaunch({
url:'../index/index', url: '../index/index',
success() { success() {}
}
}) })
}, },
toEditPsd(){ toEditPsd() {
if(!this.isHavePassword){ if (!this.isHavePassword) {
this.$refs.newpass.open() this.$refs.newpass.open()
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'../editPsd/editPsd' url: '../editPsd/editPsd'
}) })
} }
}, },
changMobile(){ changMobile() {
if(!this.isHavePassword){ if (!this.isHavePassword) {
this.$refs.newpass.open() this.$refs.newpass.open()
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'../changeTel/changeTel' url: '../changeTel/changeTel'
}) })
} }
}, },
getUserInfo() { getUserInfo() {
this.$request.get('/app-api/member/user/get').then(res => { this.$request.get('/app-api/member/user/get').then((res) => {
if(res.code==0&&res.data){ if (res.code == 0 && res.data) {
this.userInfo = res.data this.userInfo = res.data
this.isHavePassword = this.userInfo.isHavePassword this.isHavePassword = this.userInfo.isHavePassword
} }
}) })
}, },
loginOut(){ loginOut() {
uni.removeStorageSync('Authorization') uni.removeStorageSync('Authorization')
uni.navigateTo({ uni.navigateTo({
url:"../login/login" url: '../login/login'
}) })
}, },
getIdcard () { getIdcard() {
this.$request.get('/app-api/member/user/get-auth-idcard-info').then(res => { this.$request.get('/app-api/member/user/get-auth-idcard-info').then((res) => {
if(res.code==0&&res.data){ if (res.code == 0 && res.data) {
this.noticeId = this.getNoticeName(res.data.status) this.noticeId = this.getNoticeName(res.data.status)
this.idStatus = res.data.status this.idStatus = res.data.status
} }
}) })
}, },
getCompany () { getCompany() {
this.$request.get('/app-api/member/user/get-auth-enterprise-info').then(res => { this.$request.get('/app-api/member/user/get-auth-enterprise-info').then((res) => {
if(res.code==0&&res.data){ if (res.code == 0 && res.data) {
this.companyNotice = this.getNoticeName(res.data.status) this.companyNotice = this.getNoticeName(res.data.status)
this.companyStatus = res.data.status this.companyStatus = res.data.status
} }
}) })
}, },
getNoticeName(status){ getNoticeName(status) {
var arr = this.statusData.find(item => item.value == status) var arr = this.statusData.find((item) => item.value == status)
if(arr){ if (arr) {
if(this.$lang.locale=='zh'){ if (this.$lang.locale == 'zh') {
return arr.label return arr.label
}else{ } else {
return arr.labelEn return arr.labelEn
} }
}else{ } else {
return '' return ''
} }
}, },
getVersion(){ getVersion() {
this.version = uni.getStorageSync('appversion'); this.version = uni.getStorageSync('appversion')
this.versionCode = uni.getStorageSync('versionCode'); this.versionCode = uni.getStorageSync('versionCode')
}, },
getStatusData(){ getStatusData() {
this.$request.getConfig('audit_status').then(res => { this.$request.getConfig('audit_status').then((res) => {
if(res.code==0&&res.data && res.data.list.length > 0){ if (res.code == 0 && res.data && res.data.list.length > 0) {
this.statusData = res.data.list this.statusData = res.data.list
} }
}) })
}, },
toMyInfo(){ toMyInfo() {
uni.navigateTo({ uni.navigateTo({
url:'../my_info/my_info' url: '../my_info/my_info'
}) })
}, },
toCompanyInfo(){ toCompanyInfo() {
uni.navigateTo({ uni.navigateTo({
url:'../company_info/company_info' url: '../company_info/company_info'
}) })
}, },
changMail(){ changMail() {
if(!this.isHavePassword){ if (!this.isHavePassword) {
this.$refs.newpass.open() this.$refs.newpass.open()
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'../edit_mail/edit_mail' url: '../edit_mail/edit_mail'
}) })
} }
}, },
setpsd () { setpsd() {
let params = { let params = {
password: this.password2, password: this.password2
} }
if(this.password == ''){ if (this.password == '') {
return uni.showToast({ return uni.showToast({
title: this.$lang.lang.notices.password, title: this.$lang.lang.notices.password,
icon: 'error', icon: 'error'
}) })
}else{ } else {
var reg1 = new RegExp('^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$') var reg1 = new RegExp('^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,32})$')
if (!reg1.test(this.password)) { if (!reg1.test(this.password)) {
return uni.showToast({ return uni.showToast({
title: this.$lang.lang.notices.numPsd, title: this.$lang.lang.notices.numPsd,
icon: 'error', icon: 'error'
}) })
} }
} }
if(this.password2 == ''){ if (this.password2 == '') {
return uni.showToast({ return uni.showToast({
title: this.$lang.lang.notices.nextPsd, title: this.$lang.lang.notices.nextPsd,
icon: 'error', icon: 'error'
}) })
} }
if(this.password!=this.password2){ if (this.password != this.password2) {
return uni.showToast({ return uni.showToast({
title: this.$lang.lang.notices.different, title: this.$lang.lang.notices.different,
icon: 'none', icon: 'none'
}) })
} }
let that = this let that = this
that.$request.post('/app-api/member/update-password', params).then(res => { that.$request.post('/app-api/member/update-password', params).then((res) => {
if(res.code == 0){ if (res.code == 0) {
that.getUserInfo() that.getUserInfo()
that.$refs.newpass.close() that.$refs.newpass.close()
uni.showToast({ uni.showToast({
title:this.$lang.lang.notices.edited, title: this.$lang.lang.notices.edited,
icon: 'none' icon: 'none'
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title: res.msg , title: res.msg,
icon: 'none', icon: 'none'
}) })
} }
}) })
}, },
loginOff(){ loginOff() {
let that = this let that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: that.$lang.lang.site.logNotice, content: that.$lang.lang.site.logNotice,
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.$request.deleted('/app-api/member/member/cancellation').then(res => { that.$request.deleted('/app-api/member/member/cancellation').then((res) => {
if(res.code == 0 && res.data){ if (res.code == 0 && res.data) {
uni.showToast({ uni.showToast({
title:that.$lang.lang.site.offSuccess, title: that.$lang.lang.site.offSuccess,
icon: 'none' icon: 'none'
}) })
uni.setStorageSync('Authorization', '') uni.setStorageSync('Authorization', '')
setTimeout(()=>{ setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: '../login/login' url: '../login/login'
}) })
// uni.reLaunch({ // uni.reLaunch({
// url: '../login/login' // url: '../login/login'
// }) // })
},2000) }, 2000)
}else{ } else {
uni.showToast({ uni.showToast({
title: res.msg , title: res.msg,
icon: 'none', icon: 'none'
}) })
} }
}) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); 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 */
...@@ -6,13 +6,15 @@ page{ ...@@ -6,13 +6,15 @@ page{
padding-top: calc(var(--status-bar-height) + 100upx); padding-top: calc(var(--status-bar-height) + 100upx);
/* #endif */ /* #endif */
} }
.items{
.items {
width: 90%; width: 90%;
margin: 0 auto 40upx; margin: 0 auto 40upx;
background-color: var(--c0); background-color: var(--c0);
border-radius: 12upx; border-radius: 12upx;
} }
.items-v { .items-v {
padding: 0 30upx; padding: 0 30upx;
display: flex; display: flex;
...@@ -21,15 +23,18 @@ page{ ...@@ -21,15 +23,18 @@ page{
height: 120upx; height: 120upx;
align-items: center; align-items: center;
} }
.email{
.email {
font-size: var(--f26) !important; font-size: var(--f26) !important;
} }
.items-v image{
.items-v image {
width: 44upx; width: 44upx;
height: 42upx; height: 42upx;
margin: 0 30upx 0 0; margin: 0 30upx 0 0;
} }
.items-v-it{
.items-v-it {
width: 90%; width: 90%;
height: 100%; height: 100%;
display: flex; display: flex;
...@@ -38,10 +43,12 @@ page{ ...@@ -38,10 +43,12 @@ page{
position: relative; position: relative;
justify-content: space-between; justify-content: space-between;
} }
.noborder{
.noborder {
border: none; border: none;
} }
.items-v-it-rt{
.items-v-it-rt {
position: absolute; position: absolute;
right: 0; right: 0;
font-size: var(--f24); font-size: var(--f24);
...@@ -50,32 +57,38 @@ page{ ...@@ -50,32 +57,38 @@ page{
padding: 4upx 12upx; padding: 4upx 12upx;
border-radius: 4upx; border-radius: 4upx;
} }
.rgt{
.rgt {
position: absolute; position: absolute;
right: -30upx; right: -30upx;
width: 20upx; width: 20upx;
height: 30upx; height: 30upx;
} }
.rte6{
.rte6 {
border: 1px solid var(--ce6); border: 1px solid var(--ce6);
color: var(--ce6); color: var(--ce6);
} }
.color36{
.color36 {
border: 1px solid var(--c036); border: 1px solid var(--c036);
color: var(--c036); color: var(--c036);
} }
.rte036{
.rte036 {
border: 1px solid var(--c036); border: 1px solid var(--c036);
color: var(--c036); color: var(--c036);
border-radius: 30upx; border-radius: 30upx;
padding: 6upx 20upx; padding: 6upx 20upx;
} }
.footer{
.footer {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 20upx; padding-bottom: 20upx;
} }
.footer view{
.footer view {
width: 100%; width: 100%;
border-radius: 12upx; border-radius: 12upx;
padding: 20upx 0; padding: 20upx 0;
...@@ -84,7 +97,8 @@ page{ ...@@ -84,7 +97,8 @@ page{
background-color: #1373eb; background-color: #1373eb;
margin-top: 40upx; margin-top: 40upx;
} }
.login-item{
.login-item {
border-radius: 20upx; border-radius: 20upx;
background-color: #fff; background-color: #fff;
width: 86%; width: 86%;
...@@ -92,16 +106,19 @@ page{ ...@@ -92,16 +106,19 @@ page{
padding: 3%; padding: 3%;
margin-top: 30upx; margin-top: 30upx;
} }
.login-v{
.login-v {
display: flex; display: flex;
height: 100upx; height: 100upx;
} }
.login-v .vp-input{
.login-v .vp-input {
/* color: var(--c0); */ /* color: var(--c0); */
/* caret-color: var(--c0); */ /* caret-color: var(--c0); */
font-size: var(--f26); font-size: var(--f26);
} }
.login-vs{
.login-vs {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: var(--f30); font-size: var(--f30);
...@@ -109,15 +126,18 @@ page{ ...@@ -109,15 +126,18 @@ page{
font-weight: 700; font-weight: 700;
margin-right: 20upx; margin-right: 20upx;
} }
.login-vp{
.login-vp {
width: 100%; width: 100%;
border-bottom: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
position: relative; position: relative;
} }
.login-phone{
.login-phone {
display: flex; display: flex;
} }
.login-phone .login-area{
.login-phone .login-area {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -130,26 +150,29 @@ page{ ...@@ -130,26 +150,29 @@ page{
margin-right: 20upx; margin-right: 20upx;
font-size: var(--f26); font-size: var(--f26);
} }
.login-phone .login-area text{
.login-phone .login-area text {
margin-right: 10upx; 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{
.login-btns view {
width: 40%; width: 40%;
height: 60upx; height: 60upx;
border-radius: 100upx; border-radius: 100upx;
...@@ -160,27 +183,32 @@ page{ ...@@ -160,27 +183,32 @@ page{
align-items: center; align-items: center;
margin-bottom: 20upx; margin-bottom: 20upx;
} }
.login-btns view:first-child{
.login-btns view:first-child {
background: linear-gradient(0deg, #2878E0 0%, #016EF6 100%); background: linear-gradient(0deg, #2878E0 0%, #016EF6 100%);
color: var(--c0); color: var(--c0);
} }
.login-btns view:last-child{
.login-btns view:last-child {
border: 1px solid #666; border: 1px solid #666;
color: #666; color: #666;
} }
.newpass_content{
.newpass_content {
width: 580upx; width: 580upx;
background: #fff; background: #fff;
border-radius: 12upx; border-radius: 12upx;
padding: 20upx; padding: 20upx;
} }
.newpss_title{
.newpss_title {
padding: 20upx; padding: 20upx;
font-size: 32upx; font-size: 32upx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.ad-conten{
.ad-conten {
width: 580upx; width: 580upx;
border-radius: 16upx; border-radius: 16upx;
background-image: url(../../static/img/index_pbg.png); background-image: url(../../static/img/index_pbg.png);
...@@ -189,28 +217,32 @@ page{ ...@@ -189,28 +217,32 @@ page{
padding-top: 182upx; padding-top: 182upx;
padding-bottom: 20upx; padding-bottom: 20upx;
} }
.ad-bg{
.ad-bg {
width: 60upx; width: 60upx;
height: 60upx; height: 60upx;
margin-top: -154upx; margin-top: -154upx;
margin-right: 14upx; margin-right: 14upx;
float: right; float: right;
} }
.ad-title{
.ad-title {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 40upx; font-size: 40upx;
font-weight: 600; font-weight: 600;
} }
.ad-btns{
.ad-btns {
width: 90%; width: 90%;
margin: 20rpx auto; margin: 20rpx auto;
display:flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.ad-btn{
.ad-btn {
width: 90%; width: 90%;
color: #fff; color: #fff;
text-align: center; text-align: center;
...@@ -219,39 +251,50 @@ page{ ...@@ -219,39 +251,50 @@ page{
background-size: 100%; background-size: 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.ad-btn view{
.ad-btn view {
margin-top: -20upx; margin-top: -20upx;
font-size: 36upx; font-size: 36upx;
} }
.ad-info{
.ad-info {
width: 92%; width: 92%;
margin: 20upx auto; margin: 20upx auto;
height: 260upx; height: 260upx;
overflow: auto; overflow: auto;
} }
.es-btn{
.es-btn {
width: 80%; width: 80%;
margin: 0 auto 20upx; margin: 0 auto 20upx;
padding: 20upx 0; padding: 20upx 0;
color: #666; color: #666;
font-size: 26upx; font-size: 26upx;
} }
.redtext{
.redtext {
font-size: 26upx; font-size: 26upx;
color: #FF0000; color: #FF0000;
margin-left:12upx; margin-left: 12upx;
} }
.progress{
.progress {
width: 80%; width: 80%;
margin: 20upx auto; margin: 20upx auto;
} }
.footer2{
.footer2 {
padding: 20px; padding: 20px;
} }
.logoff{
.logoff {
margin-bottom: 50rpx; margin-bottom: 50rpx;
margin-top: 10px !important; margin-top: 10px !important;
text-align:center; text-align: center;
font-size: 12px; font-size: 12px;
color: #666; 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