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

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

parent b5770471
......@@ -173,6 +173,9 @@
this.requestParams.minId = 0;
},
async goDetail(item) {
if (item?.MSGSTATUS === '1') {
return
}
const params = {
id: item.id
}
......
......@@ -78,20 +78,20 @@
</view>
</view>
<!-- <view class="bottom">
<view class="bottom">
<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>
<text class="cell-list-block__title">收货地址</text>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
<text class="cell-list-block__title">退出登录</text>
<!-- <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> -->
</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>
<text class="cell-list-block__title">设置</text>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view> -->
</view>
</view> -->
</view>
</view>
</view>
</template>
......@@ -104,6 +104,10 @@
apiGetBpPrice
} from '@/servers/common.js'
import {
apiLogOut
} from '@/servers/user.js'
export default {
onLoad() {
this.winHeight = `height:${this.sysinfo.safeArea.height}px`
......@@ -147,6 +151,19 @@
uni.navigateTo({
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) {
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 {
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