mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 00:15:54 +08:00
1.在我的界面增加我的消息链接到IM消息
1.在我的界面增加我的消息链接到IM消息 2.调整了一下我的界面菜单的排序 3.顶部点击用户进去的personMsg增加一个退出登录的按钮
This commit is contained in:
@@ -23,12 +23,16 @@
|
||||
<u-input v-model="form.___path" disabled @click="clickRegion" />
|
||||
</u-form-item>
|
||||
<view class="submit" @click="submit">保存</view>
|
||||
<view class="submit" @click="showModalDialog">退出登录</view>
|
||||
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
|
||||
:content="'确定要退出登录么?'"></u-modal>
|
||||
</u-form>
|
||||
|
||||
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" pickerSize="4"></m-city>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { logout } from "@/api/login";
|
||||
import { saveUserInfo } from "@/api/members.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
@@ -38,6 +42,7 @@ export default {
|
||||
components: { uFormItem, "m-city": gkcity },
|
||||
data() {
|
||||
return {
|
||||
quitShow: false,
|
||||
lightColor: this.$lightColor, //高亮颜色
|
||||
form: {
|
||||
nickName: storage.getUserInfo().nickName || "",
|
||||
@@ -65,6 +70,35 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 显示退出登录对话框
|
||||
*/
|
||||
showModalDialog() {
|
||||
this.quitShow = true;
|
||||
},
|
||||
|
||||
clear() {
|
||||
storage.setAccessToken("");
|
||||
storage.setRefreshToken("");
|
||||
storage.setUserInfo({});
|
||||
this.$options.filters.navigateToLogin("redirectTo");
|
||||
},
|
||||
|
||||
/**
|
||||
* 确认退出
|
||||
* 清除缓存重新登录
|
||||
*/
|
||||
async confirm() {
|
||||
try{
|
||||
await logout();
|
||||
this.clear();
|
||||
}catch(e){
|
||||
//TODO handle the exception
|
||||
this.clear();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择地址回调
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user