提交 039a17af 编写于 作者: 杨广俊's avatar 杨广俊

token 收藏

上级 ad6a5beb
......@@ -61,6 +61,7 @@ import GroupTitle from '@/components/business/group-title';
export default {
data() {
return {
token: '',
isShowNum: false,
list: [],
pageNo: 2,
......@@ -104,16 +105,18 @@ export default {
},
},
created() {
let _this = this
window.__getUserInfo_CA = function(params){
_self.setUserInfo(params)
_this.token = params.userToken
_this.getData()
_this.setUserInfo(params)
}
window.__refresh = function (parm) {
_this.getUserInfo();
}
},
mounted() {
this.getUserInfo()
},
computed: {
...mapGetters({
......@@ -210,14 +213,15 @@ export default {
})
let _this = this,
parm = {
token: _this.userInfo.userToken,
token: _this.token,
type: status,
courseId: id,
setEntry: 'headers',
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
// _this.handelData(id, status);
_this.getData()
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
......@@ -240,31 +244,15 @@ export default {
getData(type) {
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
pageNo: 1,
pageSize: 4,
token: _this.token,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList', parm).then(function (res) {
if (res.code === '000000') {
if (res.data == null || res.data.length == 0) {
res.data = [];
_this.isLoading = false;
_this.noMore = true;
_this.loading = true;
_this.isReauestBack = false;
} else {
_this.isReauestBack = true;
_this.list = [..._this.list, ...res.data];
_this.isLoading = true;
_this.noMore = false;
_this.loading = false;
_this.pageNo += 1;
}
this.list = res.data || []
}
})
}
}
......
......@@ -167,7 +167,7 @@ export default {
let _this = this;
window.__getUserInfo = function(params){
_this.token = params.userToken
_this.getAdjustData()
// _this.getAdjustData()
_this.search()
}
window.__refresh = function(){
......@@ -313,7 +313,7 @@ export default {
let _this = this,
parm = {
pageNo: 1,
pageSize: 10,
pageSize: 4,
token: _this.token,
setEntry: 'headers',
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册