| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view class="default_page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title='设置'></cus-header>
- <div class="box">
- <div class="box-item adfacjb" @click="turnPage('/pagesMy/userInfo')">
- <div class="box-item-left">用户信息</div>
- <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
- </div>
- <div class="box-item adfacjb" @click="turnPage('/pagesMy/serviceAgreement')">
- <div class="box-item-left">服务协议</div>
- <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
- </div>
- <div class="box-item adfacjb" @click="turnPage('/pagesMy/privacyPolicy')">
- <div class="box-item-left">隐私政策</div>
- <image class="box-item-right" :src="imgBase+'my_arrow_right.png'"></image>
- </div>
- </div>
- <div class="exit" @click="exitLogin">退出登录</div>
- </view>
- </template>
- <script>
- export default {
- data(){
- return {
- userBrief:''
- }
- },
- onLoad() {
- if(uni.getStorageSync('userInfo')){
- const id = JSON.parse(uni.getStorageSync('userInfo')).id
- this.getMyInfo(id)
- }
- },
- methods:{
- getMyInfo(userId){
- this.$api.get(`/wx/myCount/${userId}`,this.params).then(({data:res})=>{
- if(res.code!==0) return this.$showToast(res.msg)
- this.userBrief = res.data.userBrief||'';
- })
- },
- turnPage(url){
- uni.navigateTo({
- url
- })
- },
- exitLogin(){
- uni.clearStorageSync();
- uni.reLaunch({
- url:'/pages/my'
- })
- }
- }
- }
- </script>
- <style scoped lang="less">
- .default_page{
- padding: 0 24rpx;
- box-sizing: border-box;
- background: #F7F7F7;
-
- .box{
- margin-top: 20rpx;
- border-radius: 24rpx;
- &-item{
- background: #FFFFFF;
- box-shadow: inset 0px -1px 0px 0px #EFEFEF;
- padding: 28rpx 24rpx;
- &-left{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 30rpx;
- color: #002846;
- line-height: 42rpx;
- }
- &-right{
- width: 32rpx;
- height: 32rpx;
- }
- }
- }
-
- .exit{
- width: calc(100% - 100rpx);
- height: 88rpx;
- background: #FFFFFF;
- border-radius: 44rpx;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- color: #199C9C;
- line-height: 88rpx;
- text-align: center;
- letter-spacing: 2rpx;
- position: fixed;
- left: 50rpx;
- bottom: 200rpx;
- }
- }
- </style>
|