123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- const util = require('../../utils/util.js');
- const APIClient = require('../../utils/APIClient.js');
- const login = require('../../utils/loginSchedule.js');
- Component({
-
- properties: {
- productionData: {
- type: Object,
- value: {}
- },
- title: {
- type: String,
- value: ''
- },
- query: {
- type: String,
- value: ''
- },
- type: {
- type: String,
- value: ''
- },
- columnType: {
- type: String,
- value: ''
- },
- more: {
- type: String,
- value: ''
- }
- },
-
- data: {
- animationData: {},
- },
-
- methods: {
- uploadImage (e) {
- const type = this.properties.type;
- const columnType = this.properties.columnType;
- wx.navigateTo({
- url: '../input_content/input_content?type=' + type + '&columnType=' + columnType
- })
- },
- listenerButtonPreviewImage: function(e) {
- let imgUrl = [];
- imgUrl.push(e.target.dataset.img);
- wx.previewImage({
- current: '',
- urls: imgUrl,
-
- success: function(res) {
-
- },
-
- fail: function() {
-
- }
- })
- },
-
- shareImage: function(e){
- console.log(e);
-
- const postId = e.currentTarget.dataset.postsid;
- const imgUrl = e.currentTarget.dataset.imgurl;
-
- this.share.showPopup(postId, imgUrl);
- },
-
- particulars: function (e) {
- const postId = e.currentTarget.dataset.postsid;
- const type = e.currentTarget.dataset.type;
-
- login.getOpenidSessionKey(function(res) {
- APIClient.cancelDian({
- uid: res.data.data.uid
- }, {
- "postsId":postId
- }).success((res) => {
- console.log(res);
- })
- }, function() {
- wx.showModal({
- title: '提示',
- content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定')
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- });
- wx.navigateTo({
- url: '../../pages/particulars/particulars?postId=' + postId + '&type=' + type
- })
- },
-
- examine: function () {
-
- var myEventDetail = {}
- var myEventOption = {}
- this.triggerEvent('myevent', myEventDetail, myEventOption)
- }
- },
- ready: function(){
-
- this.share = this.selectComponent("#share");
- }
- })
|