|
|
|
@ -4,30 +4,31 @@ |
|
|
|
<view class="profile_item profile_item1"> |
|
|
|
<text>Photo</text> |
|
|
|
<view class="profile_item_right"> |
|
|
|
<img src="/static/img/logo.png" alt="" class="head_img"> |
|
|
|
<img src="/static/img/right1.png" alt="" class="right_img"> |
|
|
|
<image src="../../static/img/logo.png" mode="" class="head_img" v-show="!user_info.isLogin"></image> |
|
|
|
<image :src="user_info.user_head?user_info.user_head:user_info.headicons[5]" mode="" class="head_img" v-if="user_info.isLogin"></image> |
|
|
|
<image src="../../static/img/right1.png" alt="" class="right_img"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="profile_item "> |
|
|
|
<view class="profile_item " @click="$refs.inputDialog.open()"> |
|
|
|
<text>Name</text> |
|
|
|
<view class="profile_item_right"> |
|
|
|
<text>mayzhang</text> |
|
|
|
<img src="/static/img/right1.png" alt="" class="right_img"> |
|
|
|
<text>{{user_info.nickname}}</text> |
|
|
|
<image src="../../static/img/right1.png" alt="" class="right_img"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="profile_item "> |
|
|
|
<text>Email</text> |
|
|
|
<view class="profile_item_right"> |
|
|
|
<img src="/static/img/gantan.png" alt="" class="right_img1"> |
|
|
|
<text>unverified</text> |
|
|
|
<img src="/static/img/right1.png" alt="" class="right_img"> |
|
|
|
<image src="../../static/img/gantan.png" alt="" class="right_img1" v-if="user_info.is_validated==0"></image> |
|
|
|
<text>{{user_info.is_validated==0?'unverified':user_info.email}}</text> |
|
|
|
<image src="../../static/img/right1.png" alt="" class="right_img"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<navigator url="/pages/login/changePwd" > |
|
|
|
<navigator :url="'/pages/login/verifyEmail?type=0&email='+user_info.email" > |
|
|
|
<view class="profile_item "> |
|
|
|
<text>Change Password</text> |
|
|
|
<view class="profile_item_right"> |
|
|
|
<img src="/static/img/right1.png" alt="" class="right_img"> |
|
|
|
<image src="../../static/img/right1.png" alt="" class="right_img"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</navigator> |
|
|
|
@ -35,30 +36,74 @@ |
|
|
|
<text>Ship to</text> |
|
|
|
<view class="profile_item_right"> |
|
|
|
<text>United States</text> |
|
|
|
<img src="/static/img/right1.png" alt="" class="right_img"> |
|
|
|
<image src="../../static/img/right1.png" alt="" class="right_img"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uni-popup ref="inputDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" title="输入内容" |
|
|
|
placeholder="请输入姓名" @confirm="dialogInputConfirm"></uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {defaultRequest2} from '../../api/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
user_info:{ |
|
|
|
isLogin:false, |
|
|
|
}, |
|
|
|
query:{ |
|
|
|
_action:'updateinfo', |
|
|
|
nickname:'' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
|
|
|
|
getUserInfo(){ |
|
|
|
let data={_action:'getinfo'} |
|
|
|
defaultRequest2(data).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
res.data.isLogin=true |
|
|
|
this.user_info=res.data |
|
|
|
uni.setStorageSync('user_info',this.user_info) |
|
|
|
}else{ |
|
|
|
this.user_info=uni.getStorageSync('user_info') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
dialogInputConfirm(val){ |
|
|
|
this.query.nickname=val |
|
|
|
defaultRequest2(this.query).then(res=>{ |
|
|
|
console.info(res) |
|
|
|
if(res.error==0){ |
|
|
|
uni.showToast({ |
|
|
|
title:'修改成功', |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
this.getUserInfo() |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.user_info=uni.getStorageSync('user_info') |
|
|
|
this.getUserInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style> |
|
|
|
page{ |
|
|
|
border-top: 13.33rpx #F7F7F7 solid; |
|
|
|
padding-left: 26.67rpx; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
.profile_item{ |
|
|
|
width: 100%; |
|
|
|
display: flex; |
|
|
|
|