标签:mdx 传递 分享 otc sre mda mct rpd lnl
setInterval(this.run, 1000)
1
|
<view class="block" bindtap="playTap" data-id="{{modle.id}}">
|
1
2
3
4
5
6
7
|
playTap:function(e) {
const dataset = e.currentTarget.dataset;
wx.navigateTo({
url: ‘../play/index?id=‘+ dataset.id
})
console.log(dataset.id);
}
|
1
2
3
4
5
6
|
onLoad:function (param) {
//页面初始化
this.setData({
currentId:param.id
})
}
|
1
|
<view bindtap=“playTap" id="{{modle.id}}">
|
1
|
<navigator url="../my/my?id={{item.id}}" wx:for="{{modles}}">
|
1
2
3
4
|
onLoad (params){
app.fetch(API.detail + params.id,(err,data) => {
})
}
|
1
2
3
4
5
6
7
|
const api = {
interface1: ‘https://........‘,
interface2: ‘https://.......‘,
interface3: ‘https://....‘,
.....
}
module.exports = api;
|
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
|
fetch(url,data, callback) {
wx.request({
url,
data: data,
header: {
‘Content-Type‘: ‘application/json‘
},
success(res) {
callback(null, res.data);
},
fail(e) {
callback(e);
}
})
},
|
01
02
03
04
05
06
07
08
09
10
11
|
import API from "../../api/api.js";
const app = getApp();
const conf = {
data:{
title:‘正在拼命加载中...‘,
loadding:true
},
onLoad (){
app.fetch(API.hot,{},(err,data) => {
})
},
|
标签:mdx 传递 分享 otc sre mda mct rpd lnl
原文地址:http://www.cnblogs.com/tian-sun/p/7410160.html