123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <!-- 个人中心 -->
- <template>
- <view id="register">
- <view class="register_li">
- <view class="register_li_min" @click="goPage('datum')">
- <view>修改资料</view>
- <view class="view-three-type" :class="state==0?'colorA':'colorB'">{{state==0?'审核未通过':'审核已通过'}}</view>
- <img class="right-img" src="@/pages_supplier/images/icon_04.png">
- </view>
- <view class="register_li_min" @click="goPage('password')" style="border: none;">
- <view>修改密码</view>
- <view></view>
- <img class="right-img" src="@/pages_supplier/images/icon_04.png">
- </view>
- </view>
- <view class="sub_btn" @click="clickOut()">退出登录</view>
- </view>
- </template>
- <script>
- import {logout} from '@/api/apiDemo/index.js'
- import { config } from '@/api/request/config.js'
- export default {
- data() {
- return {
- form:{
- name:'',
- },
- state:null,
- }
- },
- onLoad(option) {//审核状态(0:未审核,1:审核通过,2:审核未通过)
- this.state=option.state
- },
- onShow(){
- },
- methods: {
- //页面跳转
- goPage(type){
- if(type == 'datum'){//修改资料
- uni.redirectTo({
- url: '/pages_supplier/register/register?pageStatus=1',//注册页面
- });
- }else if(type == 'password'){//修改密码
- uni.redirectTo({
- url: '/pages_supplier/mine/changePassword',
- });
- }
- },
- //退出按钮
- clickOut(){
- let self = this;
- uni.showModal({
- // title: '确认要退出吗?',
- content: '确认要退出吗',
- cancelColor:"#999",
- confirmColor:"#0183FA",
- success: function (res) {
- if (res.confirm) {
- self.logout();
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- //退出登录
- async logout() {
- let self = this;
- const {data} = await logout();
- if(data.code == 200){
- uni.removeStorageSync('token');
- uni.removeStorageSync('userId');
- uni.removeStorageSync('userType');
- uni.redirectTo({
- url: '/pages/login',
- });
- }
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- #register{
- height:100%;
- width:100%;
- display flex
- flex-direction column;
- padding-bottom: 220rpx;
- .register_li{
- background #fff;
- padding:20rpx 0;
- box-sizing: border-box;
- .register_li_min{
- margin:0 26rpx;
- display flex;
- align-items center;
- border-bottom: 1px solid #F5F5F5;
- display flex;
- view{
- line-height:110rpx;
- font-size:28rpx;
- }
- view:nth-child(1){
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 110rpx;
- }
- view:nth-child(2){
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 110rpx;
- flex:1;
- text-align: right;
- }
- .colorA{
- color:#FF3131!important;
- }
- .colorB{
- color:#999999!important;
- }
- >img{
- width: 12rpx;
- height: 24rpx;
- margin-left: 26rpx;
- }
- }
- }
- /* 按钮 */
- .sub_btn{
- width: 650rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 20rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- margin-left: 50rpx;
- position: fixed;
- bottom:30rpx;
- z-index: 1000;
- }
- }
- </style>
|