70 lines
1.3 KiB
JavaScript
70 lines
1.3 KiB
JavaScript
// packageE/others/case_library/mycomponents/head.js
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
|
|
options: {
|
|
addGlobalClass: true
|
|
},
|
|
properties: {
|
|
datas: {
|
|
type: Array || Number, //指定传入的类型
|
|
},
|
|
text: {
|
|
type: String,
|
|
},
|
|
choosed: {
|
|
type: String,
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
goBack() {
|
|
wx.navigateBack({
|
|
delta: 1
|
|
});
|
|
},
|
|
close() {
|
|
this.setData({
|
|
show: false
|
|
});
|
|
},
|
|
openMenu() {
|
|
this.setData({
|
|
show: true
|
|
});
|
|
},
|
|
gotoOther(e) {
|
|
console.log(e);
|
|
let type = e.currentTarget.dataset.name;
|
|
if (type == 'home') {
|
|
wx.navigateTo({
|
|
url: '/packageE/others/case_library/home/caseLibraryHome',
|
|
});
|
|
} else if (type == 'category') {
|
|
wx.navigateTo({
|
|
url: '/packageE/others/case_library/category/caseLibraryCategory',
|
|
});
|
|
} else if (type == 'ranking') {
|
|
wx.navigateTo({
|
|
url: '/packageE/others/case_library/ranking_mobile/caseLibraryRankingMobile',
|
|
});
|
|
} else if (type == 'subject') {
|
|
wx.navigateTo({
|
|
url: '/packageE/others/case_library/subject_list/caseLibrarySubjectList',
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}); |