@@ -56,7 +56,7 @@ Page({
showCover:false
})
},
- CoverCheck:function(e){
+ coverCheck:function(e){
let currentTab = e.currentTarget.dataset.index;
// 实现每一个tabbar切换对应内容的原理,根据每一个tabbar的index对应数组中的数据
this.setData({
@@ -3,7 +3,7 @@
<!-- 蒙板内容 要放在蒙板的外面-->
<view class="hmly-menu">
<view class="hmly-menu-item {{currentTab === index ? 'hmly-menu-item-active' : ''}}"
- wx:for="{{navTitle}}" wx:key="index" data-index="{{index}}" bindtap="CoverCheck">
+ wx:for="{{navTitle}}" wx:key="index" data-index="{{index}}" bindtap="coverCheck">
{{item.title}}
</view>
@@ -1,6 +1,7 @@
// 定义全局常量baseUrl用来存储前缀
const baseURL = 'http://mobile.ximalaya.com/mobile/discovery/v3/recommend/hotAndGuess?code=43_310000_3100&device=android&version=5.4.45';
+
function request(params = {method, url, data}) {
return new Promise(function (resolve, reject) {
let header = { //定义请求头