Commit d59bde3f authored by chuan.liu's avatar chuan.liu

新增登出 修复消息已读列表不可编辑状态

parent b5770471
...@@ -173,6 +173,9 @@ ...@@ -173,6 +173,9 @@
this.requestParams.minId = 0; this.requestParams.minId = 0;
}, },
async goDetail(item) { async goDetail(item) {
if (item?.MSGSTATUS === '1') {
return
}
const params = { const params = {
id: item.id id: item.id
} }
......
...@@ -78,20 +78,20 @@ ...@@ -78,20 +78,20 @@
</view> </view>
</view> </view>
<!-- <view class="bottom"> <view class="bottom">
<view class="cell-list"> <view class="cell-list">
<view class="cell-list-block"> <view class="cell-list-block" @click="logOut">
<image class="icon-address" src="@/static/image/uc_address@3x.png" mode="aspectFit"></image> <image class="icon-address" src="@/static/image/uc_address@3x.png" mode="aspectFit"></image>
<text class="cell-list-block__title">收货地址</text> <text class="cell-list-block__title">退出登录</text>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <!-- <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> -->
</view> </view>
<view class="cell-list-block"> <!-- <view class="cell-list-block">
<image class="icon-address" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image> <image class="icon-address" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image>
<text class="cell-list-block__title">设置</text> <text class="cell-list-block__title">设置</text>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view> </view> -->
</view> --> </view>
</view> </view>
</view> </view>
</template> </template>
...@@ -104,6 +104,10 @@ ...@@ -104,6 +104,10 @@
apiGetBpPrice apiGetBpPrice
} from '@/servers/common.js' } from '@/servers/common.js'
import {
apiLogOut
} from '@/servers/user.js'
export default { export default {
onLoad() { onLoad() {
this.winHeight = `height:${this.sysinfo.safeArea.height}px` this.winHeight = `height:${this.sysinfo.safeArea.height}px`
...@@ -147,6 +151,19 @@ ...@@ -147,6 +151,19 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/apply-order/apply-order" url: "/pages/apply-order/apply-order"
}) })
},
logOut() {
apiLogOut().then((res) => {
uni.navigateTo({
url: "/pages/login/login"
})
}).catch(() => {
uni.showToast({
title: '登出异常',
icon: 'none',
duration: 1500
});
})
} }
} }
} }
......
...@@ -12,6 +12,18 @@ export async function apiLogin(params) { ...@@ -12,6 +12,18 @@ export async function apiLogin(params) {
return res return res
} }
/**
* 登出服务
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiLogOut(params) {
const res = await apiHelper.post('/crm-app/logout', params, {
'Content-Type': "application/x-www-form-urlencoded"
})
return res
}
export default { export default {
apiLogin apiLogin
} }
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