You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.3 KiB
1 lines
4.3 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/activity/detail/index"],{"0628":function(t,e,i){},"30c3":function(t,e,i){"use strict";var n=i("0628"),a=i.n(n);a.a},"602f":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("514b"));function a(t){return t&&t.__esModule?t:{default:t}}var o=getApp(),c={data:function(){return{activityId:"",activityDetail:{},current:1}},components:{},props:{},onLoad:function(e){var i=t.getStorageSync("activityId");e.id&&(this.setData({activityId:e.id}),this.getDetail()),i&&!e.id&&(console.log("扫码进来"),this.setData({activityId:i}),this.getDetail())},onReady:function(){},onShow:function(){},onHide:function(){},onUnload:function(){},onPullDownRefresh:function(){},onReachBottom:function(){},onShareAppMessage:function(){},methods:{getDetail:function(){var e=this;o.http("GET","activity/activityInfo/"+this.activityId).then((function(i){if(i.data.success){var a=i.data.data;a.time1=n.default.setTime(a.createTime).split(" ")[0],a.time2=n.default.setTime(a.applyStartTime).split(" ")[0],a.time3=n.default.setTime(a.applyEndTime).split(" ")[0],a.time4=n.default.setTime(a.activityEndTime).split(" ")[0],a.flag=a.flag.split(","),a.activityStartTime=n.default.setTime(a.activityStartTime),a.activityEndTime=n.default.setTime(a.activityEndTime),a.applyStartTime=n.default.setTime(a.applyStartTime),a.applyEndTime=n.default.setTime(a.applyEndTime),e.setData({activityDetail:a,current:a.status})}else t.showToast({title:i.data.msg,icon:"none"})}))},openMap:function(){var e=this.activityDetail.latitude,i=this.activityDetail.longitude;t.openLocation({latitude:e,longitude:i,scale:18})},shareClick:function(){t.showShareMenu({withShareTicket:!0,menus:["shareAppMessage","shareTimeline"]})},call:function(){t.makePhoneCall({phoneNumber:this.activityDetail.publisherVo.phone,fail:function(){console.log("取消")}})},collect:function(){var e=this,i={};i.id=this.activityDetail.id,i.type="collect",i.status=!this.activityDetail.collect,""!=t.getStorageSync("userInfo")?this.requestCollect(i):t.getUserProfile({desc:"展示用户信息",success:function(n){console.log(n);var a=n.iv,c=n.encryptedData,s=n.userInfo;t.login({success:function(n){o.http("POST","wxapp/auth",{code:n.code,iv:a,encryptedData:c}).then((function(n){n.data.success?(t.setStorageSync("token","Bearer "+n.data.data.token),t.setStorageSync("userInfo",s),e.requestCollect(i)):t.showToast({title:n.data.msg,icon:"none"})}))}})}})},requestCollect:function(e){var i=this;o.http("POST","activity/collect",e).then((function(e){e.data.success?(t.showToast({title:"操作成功!"}),i.getDetail()):t.showToast({title:e.data.msg,icon:"none"})}))},toSignPage:function(){""!=t.getStorageSync("userInfo")?t.navigateTo({url:"../signIn/index?id="+this.activityId}):this.getUserProfile()},toDescribe:function(){t.navigateTo({url:"../describe/index?id="+this.activityDetail.id})},getUserProfile:function(){var e=this;t.getUserProfile({desc:"展示用户信息",success:function(i){console.log(i);var n=i.iv,a=i.encryptedData,c=i.userInfo;t.login({success:function(i){o.http("POST","wxapp/auth",{code:i.code,iv:n,encryptedData:a}).then((function(i){i.data.success?(t.setStorageSync("token","Bearer "+i.data.data.token),t.setStorageSync("userInfo",c),t.navigateTo({url:"../signIn/index?id="+e.activityId})):t.showToast({title:i.data.msg,icon:"none"})}))}})}})}}};e.default=c}).call(this,i("543d")["default"])},"7fef":function(t,e,i){"use strict";i.r(e);var n=i("602f"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},c37d:function(t,e,i){"use strict";i.r(e);var n=i("d642"),a=i("7fef");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("30c3");var c,s=i("f0c5"),u=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],c);e["default"]=u.exports},d642:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement;t._self._c},o=[]},e85c:function(t,e,i){"use strict";(function(t){i("ef82");n(i("66fd"));var e=n(i("c37d"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])}},[["e85c","common/runtime","common/vendor"]]]); |