1、字符串+值
< ... :placeholder=" '回复用户id为' + item.uid " />
2、ReadMore 展开阅读更多
<template>
<u-read-more show-height="250" text-indent="0" :toggle="true" close-text="点击展开详情">
// 内容
<view> ...... </view>
</u-read-more>
</template>
3、调用上一页方法
test(){
// 重置条件,刷新上一页
this.$prePage().getBbsList()
this.$prePage().quary.page = 1
this.$prePage().loadStatus = 'noload'
// 返回上一页
this.$u.route({
type:'navigateBack'
});
}
4、判断是否已登陆,若已登录则跳转到index页面
if(this.vux_token){
uni.switchTab({ // 或者redirectTo
url:'../../index/index'
})
}
5、退出时弹出提示信息 uni.showModal......
6、导航栏自定义返回逻辑方法 :custom-back="signOut"
7、更新用户信息
onshow(){
this.getUserData()
}
// 方法
getUserData(){
this.$u.api.getUserInfo().then(res => {
if(res.role !=1){
this.$u.toast("没有使用权限");
return
}
this.$u.vuex('vuex_user',res)
}).catch(error =>{
c