44 lines
884 B
JavaScript
44 lines
884 B
JavaScript
var App = getApp();
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
// banner轮播组件属性
|
|
indicatorDots: true, // 是否显示面板指示点
|
|
autoplay: true, // 是否自动切换
|
|
interval: 3000, // 自动切换时间间隔
|
|
duration: 800, // 滑动动画时长
|
|
imgHeights: {}, // 图片的高度
|
|
imgCurrent: {}, // 当前banne所在滑块指针
|
|
articleData:{}
|
|
},
|
|
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
let id = options.id || 0;
|
|
wx.showLoading({ title: '加载中' });
|
|
this.get_article(id);
|
|
},
|
|
|
|
/**
|
|
* 获取列表
|
|
*/
|
|
get_article: function (id) {
|
|
let _this = this;
|
|
App._post_form('footchina/getCityInfo', {
|
|
id: id
|
|
}, function(result) {
|
|
wx.hideLoading();
|
|
var rdata = result.data.data;
|
|
_this.setData({
|
|
articleData: rdata
|
|
})
|
|
});
|
|
}
|
|
}) |