|
@@ -1,6 +1,6 @@
|
|
|
// pages/imgController/index.js
|
|
|
import { httpCloud } from "../../utils/httpFunc";
|
|
|
-import {dateFormmat} from "../../utils/tool"
|
|
|
+import { dateFormmat } from "../../utils/tool"
|
|
|
|
|
|
Page({
|
|
|
|
|
@@ -16,7 +16,6 @@ Page({
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
const _this = this;
|
|
|
- wx.showLoading({})
|
|
|
this.nameText = decodeURIComponent(options.title || "详情");
|
|
|
this.mediaType = options.mediaType || 'image';
|
|
|
wx.setNavigationBarTitle({
|
|
@@ -30,7 +29,7 @@ Page({
|
|
|
},
|
|
|
call(res) {
|
|
|
_this.setData({
|
|
|
- mediaList: (res || []).map(v=>{
|
|
|
+ mediaList: (res || []).map(v => {
|
|
|
const date = dateFormmat(v.date);
|
|
|
return {
|
|
|
...v,
|
|
@@ -46,49 +45,36 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
- onReady() {
|
|
|
-
|
|
|
- },
|
|
|
+ onReady() { },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
+ onShow() { },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
- onHide() {
|
|
|
-
|
|
|
- },
|
|
|
+ onHide() { },
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
- onUnload() {
|
|
|
-
|
|
|
- },
|
|
|
+ onUnload() { },
|
|
|
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
- onPullDownRefresh() {
|
|
|
-
|
|
|
- },
|
|
|
+ onPullDownRefresh() { },
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
- onReachBottom() {
|
|
|
-
|
|
|
- },
|
|
|
+ onReachBottom() { },
|
|
|
|
|
|
onShareAppMessage: function () {
|
|
|
return {
|
|
|
title: this.nameText, // 分享名称
|
|
|
- path: 'pages/detail/detail?title=' + this.nameText, // 点击分享后的链接要来到的页面的路径已经对应需要的参数
|
|
|
+ path: 'pages/home/index', // 点击分享后的链接要来到的页面的路径已经对应需要的参数
|
|
|
}
|
|
|
},
|
|
|
})
|