提交 4291fc97 编写于 作者: ijianbo's avatar ijianbo

升级mp-html组件2.4.0

上级 a834fdc4
......@@ -8,7 +8,6 @@
"pages/logs/logs",
"pages/list/list",
"pages/page/page",
"pages/pay/pay",
"pages/poster/poster",
"pages/readlog/readlog",
"pages/search/search",
......
"use strict";var t=require("./context");Component({data:{time:"00:00"},properties:{name:String,author:String,poster:String,autoplay:Boolean,controls:Boolean,loop:Boolean,src:{type:String,observer:function(t){this.setSrc(t)}}},attached:function(){t.set(this.id,this)},detached:function(){this._ctx&&(this.setData({playing:!1,time:"00:00"}),this._ctx.stop()),t.remove(this.data.audioId)},pageLifetimes:{show:function(){this.data.playing&&this._ctx.paused&&this._ctx.play()}},methods:{createAudio:function(){var t=this;this._ctx=wx.getBackgroundAudioManager(),this._ctx.onError(function(i){t.setData({error:!0}),t.triggerEvent("error",i)}),this._ctx.onTimeUpdate(function(){var i=t._ctx.currentTime,e=parseInt(i/60),s=Math.ceil(i%60),a={};a.time=(e>9?e:"0"+e)+":"+(s>9?s:"0"+s),t.lastTime||(a.value=i/t._ctx.duration*100),t.setData(a)}),this._ctx.onEnded(function(){t.data.loop||t.setData({playing:!1,time:"00:00"})}),this._ctx.onStop(function(){t.setData({playing:!1,time:"00:00"}),t.triggerEvent("stop")})},setSrc:function(t){this._ctx.id=this.data.id,this._ctx.autoplay=this.data.autoplay,this._ctx.loop=this.data.loop,this._ctx.title=this.data.name||"音频",this._ctx.singer=this.data.author,this.data.autoplay&&!this.data.playing&&this.setData({playing:!0})},play:function(){this.createAudio(),this._ctx.title=this.data.name||"音频",this._ctx.singer=this.data.author,this._ctx.src=this.data.src,this.setData({playing:!0}),this.triggerEvent("play")},pause:function(){this._ctx&&this._ctx.pause(),this.setData({playing:!1}),this.triggerEvent("pause")},stop:function(){this._ctx&&this._ctx.stop(),this.setData({playing:!1,time:"00:00"}),this.triggerEvent("stop")},seek:function(t){this._ctx&&this._ctx.seek(t)},_seeking:function(t){if(!(t.timeStamp-this.lastTime<200)){var i=Math.round(t.detail.value/100*this._ctx.duration),e=parseInt(i/60),s=i%60;this.setData({time:(e>9?e:"0"+e)+":"+(s>9?s:"0"+s)}),this.lastTime=t.timeStamp}},_seeked:function(t){this._ctx&&this._ctx.seek(t.detail.value/100*this._ctx.duration),this.lastTime=void 0}}});
\ No newline at end of file
"use strict";var t=require("./context");Component({data:{time:"00:00"},properties:{name:String,author:String,poster:String,autoplay:Boolean,controls:Boolean,loop:Boolean,src:{type:String,observer:function(t){this.setSrc(t)}}},created:function(){var t=this;this._ctx=wx.createInnerAudioContext(),wx.setInnerAudioOption({obeyMuteSwitch:!1}),this._ctx.onError(function(i){t.setData({error:!0}),t.triggerEvent("error",i)}),this._ctx.onTimeUpdate(function(){var i=t._ctx.currentTime,e=parseInt(i/60),s=Math.ceil(i%60),a={};a.time=(e>9?e:"0"+e)+":"+(s>9?s:"0"+s),t.lastTime||(a.value=i/t._ctx.duration*100),t.setData(a)}),this._ctx.onEnded(function(){t.data.loop||t.setData({playing:!1})})},attached:function(){t.set(this.id,this)},detached:function(){this._ctx.destroy(),t.remove(this.data.audioId)},pageLifetimes:{show:function(){this.data.playing&&this._ctx.paused&&this._ctx.play()}},methods:{setSrc:function(t){this._ctx.autoplay=this.data.autoplay,this._ctx.loop=this.data.loop,this._ctx.src=t,this.data.autoplay&&!this.data.playing&&this.setData({playing:!0})},play:function(){this._ctx.play(),this.setData({playing:!0}),this.triggerEvent("play")},pause:function(){this._ctx.pause(),this.setData({playing:!1}),this.triggerEvent("pause")},stop:function(){this._ctx.stop(),this.setData({playing:!1,time:"00:00"}),this.triggerEvent("stop")},seek:function(t){this._ctx.seek(t)},_seeking:function(t){if(!(t.timeStamp-this.lastTime<200)){var i=Math.round(t.detail.value/100*this._ctx.duration),e=parseInt(i/60),s=i%60;this.setData({time:(e>9?e:"0"+e)+":"+(s>9?s:"0"+s)}),this.lastTime=t.timeStamp}},_seeked:function(t){this._ctx.seek(t.detail.value/100*this._ctx.duration),this.lastTime=void 0}}});
\ No newline at end of file
"use strict";var t=require("./context");Component({data:{time:"00:00"},properties:{name:String,author:String,poster:String,autoplay:Boolean,controls:Boolean,loop:Boolean,src:{type:String,observer:function(t){this.setSrc(t)}}},created:function(){var t=this;this._ctx=wx.createInnerAudioContext(),wx.setInnerAudioOption({obeyMuteSwitch:!1}),this._ctx.onError(function(i){t.setData({error:!0}),t.triggerEvent("error",i)}),this._ctx.onTimeUpdate(function(){var i=t._ctx.currentTime,e=parseInt(i/60),a=Math.ceil(i%60),s={};s.time=(e>9?e:"0"+e)+":"+(a>9?a:"0"+a),t.lastTime||(s.value=i/t._ctx.duration*100),t.setData(s)}),this._ctx.onEnded(function(){t.data.loop||t.setData({playing:!1})})},attached:function(){t.set(this.id,this)},detached:function(){this._ctx.destroy(),t.remove(this.id)},pageLifetimes:{show:function(){this.data.playing&&this._ctx.paused&&this._ctx.play()}},methods:{setSrc:function(t){this._ctx.autoplay=this.data.autoplay,this._ctx.loop=this.data.loop,this._ctx.src=t,this.data.autoplay&&!this.data.playing&&this.setData({playing:!0})},play:function(){this._ctx.play(),this.setData({playing:!0}),this.triggerEvent("play")},pause:function(){this._ctx.pause(),this.setData({playing:!1}),this.triggerEvent("pause")},playbackRate:function(t){this._ctx.playbackRate=t},stop:function(){this._ctx.stop(),this.setData({playing:!1,time:"00:00"}),this.triggerEvent("stop")},seek:function(t){this._ctx.seek(t)},_seeking:function(t){if(!(t.timeStamp-this.lastTime<200)){var i=Math.round(t.detail.value/100*this._ctx.duration),e=parseInt(i/60),a=i%60;this.setData({time:(e>9?e:"0"+e)+":"+(a>9?a:"0"+a)}),this.lastTime=t.timeStamp}},_seeked:function(t){this._ctx.seek(t.detail.value/100*this._ctx.duration),this.lastTime=void 0}}});
\ No newline at end of file
<view wx:if="{{controls}}" class="_contain"><view class="{{poster ? '_poster' : '_poster _poster_icon'}}"><image wx:if="{{poster}}" class="_poster_img" mode="aspectFill" src="{{poster}}"/><text wx:else class="iconfont icon-headset"/><view class="_button" bindtap="{{playing?'pause':'play'}}"><view class="{{playing?'_pause':'_play'}}"/></view></view><view class="_title"><view class="_name">{{name}}</view><view class="_author">{{author}}</view></view><slider class="_slider" activeColor="#585959" block-size="12" disabled="{{error}}" value="{{value}}" bindchanging="_seeking" bindchange="_seeked"/><view class="_time">{{time}}</view></view>
\ No newline at end of file
<view wx:if="{{controls}}" class="_contain"><view class="{{poster ? '_poster' : '_poster _poster_icon'}}"><image wx:if="{{poster}}" class="_poster_img" mode="aspectFill" src="{{poster}}"/><text wx:else class="iconfont icon-headset"/><view class="_button" bindtap="{{playing?'pause':'play'}}"><view class="{{playing?'_pause':'_play'}}"/></view></view><view class="_title"><view class="_name">{{name||'未知音频'}}</view><view class="_author">{{author||'未知作者'}}</view></view><slider class="_slider" activeColor="#585959" block-size="12" disabled="{{error}}" value="{{value}}" bindchanging="_seeking" bindchange="_seeked"/><view class="_time">{{time}}</view></view>
\ No newline at end of file
@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.woff2?t=1628748615633) format('woff2'),url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.woff?t=1628748615633) format('woff'),url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.ttf?t=1628748615633) format('truetype')}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-headset:before{content:"\e62b"}.icon-a-link:before{content:"\e6e7"}.icon-miniapp-logo:before{content:"\e61e"}._contain{position:relative;display:inline-flex;width:100%;background-color:#fcfcfc;border:1px solid #e0e0e0;border-radius:2px;box-sizing:border-box;margin:6px 0}._poster{width:70px;height:70px;position:relative;text-align:center}._poster_icon{background-color:#a0bcf9}._poster_img{width:70px;height:70px}._poster .iconfont{font-size:40px;line-height:70px;color:#fff;text-align:center}._button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;overflow:hidden;background-color:rgb(0,0,0,.2);border:1px solid #fff;border-radius:50%;opacity:.9}._play{margin-left:2px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:8px solid #fff}._pause{width:8px;height:8px;background-color:#fff}._title{flex:1;margin:0 0 0 14px;text-align:left}._author{width:45px;font-size:12px;color:#888}._name{width:140px;font-size:15px;line-height:39px}._author,._name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._slider{position:absolute;right:16px;bottom:8px;width:140px;margin:0}._time{margin:7px 14px 0 0;font-size:12px;color:#888}@media (min-width:400px){._contain{width:380px}._button{width:26px;height:26px}._poster{width:90px;height:90px}._author{width:60px;font-size:15px}._name{width:180px;font-size:19px;line-height:55px}._slider{right:20px;bottom:10px;width:180px}._time{font-size:15px}}
\ No newline at end of file
@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.woff2?t=1628748615633) format('woff2'),url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.woff?t=1628748615633) format('woff'),url(//at.alicdn.com/t/font_1187166_o0g09eo9kzn.ttf?t=1628748615633) format('truetype')}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-headset:before{content:"\e62b"}.icon-a-link:before{content:"\e6e7"}.icon-miniapp-logo:before{content:"\e61e"}._contain{position:relative;display:inline-flex;width:290px;background-color:#fcfcfc;border:1px solid #e0e0e0;border-radius:2px}._poster{width:70px;height:70px;position:relative;text-align:center}._poster_icon{background-color:#a0bcf9}._poster_img{width:70px;height:70px}._poster .iconfont{font-size:40px;line-height:70px;color:#fff;text-align:center}._button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;overflow:hidden;background-color:rgb(0,0,0,.2);border:1px solid #fff;border-radius:50%;opacity:.9}._play{margin-left:2px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:8px solid #fff}._pause{width:8px;height:8px;background-color:#fff}._title{flex:1;margin:4px 0 0 14px;text-align:left}._author{width:45px;font-size:12px;color:#888}._name{width:140px;font-size:15px;line-height:39px}._author,._name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._slider{position:absolute;right:16px;bottom:8px;width:140px;margin:0}._time{margin:7px 14px 0 0;font-size:12px;color:#888}@media (min-width:400px){._contain{width:380px}._button{width:26px;height:26px}._poster{width:90px;height:90px}._author{width:60px;font-size:15px}._name{width:180px;font-size:19px;line-height:55px}._slider{right:20px;bottom:10px;width:180px}._time{font-size:15px}}
\ No newline at end of file
"use strict";function t(t){this.vm=t}var o=require("./context"),i=0;t.prototype.onUpdate=function(){this.audios=[]},t.prototype.onParse=function(t){"audio"===t.name&&(t.attrs.id||(t.attrs.id="a"+i++),this.audios.push(t.attrs.id))},t.prototype.onLoad=function(){var t=this;setTimeout(function(){for(var i=0;i<t.audios.length;i++){var s=o.get(t.audios[i]);s.id=t.audios[i],t.vm._videos.push(s)}},50)},module.exports=t;
\ No newline at end of file
"use strict";function t(t){this.vm=t}var o=require("./context"),i=0;t.prototype.onUpdate=function(){this.audios=[]},t.prototype.onParse=function(t){"audio"===t.name&&(t.attrs.id||(t.attrs.id="a"+i++),this.audios.push(t.attrs.id))},t.prototype.onLoad=function(){var t=this;setTimeout(function(){for(var i=0;i<t.audios.length;i++){var s=o.get(t.audios[i]);s.id=t.audios[i],t.vm._videos.push(s)}},500)},module.exports=t;
\ No newline at end of file
"use strict";function e(e){this.vm=e}var r=require("./prism.min"),s=require("./config"),t=require("../parser");e.prototype.onParse=function(e,a){if("pre"===e.name){var n;for(n=e.children.length;n--&&"code"!==e.children[n].name;);if(-1===n)return;var l=e.children[n],i=l.attrs.class||"";n=i.indexOf("language-"),-1===n&&(i=e.attrs.class||"",n=i.indexOf("language-")),-1===n&&(i="language-text",n=i.indexOf("language-")),n+=9;var c;for(c=n;c<i.length&&" "!==i[c];c++);var h=i.substring(n,c);if(l.children.length&&"text"===l.children[0].type){var g=l.children[0].text.replace(/&amp;/g,"&");if(r.languages[h]&&(l.children=new t(this.vm).parse("<pre>"+r.highlight(g,r.languages[h],h).replace(/token /g,"hl-")+"</pre>")[0].children),e.attrs.class="hl-pre",l.attrs.class="hl-code",s.showLanguageName&&e.children.push({name:"div",attrs:{class:"hl-language",style:"user-select:none"},children:[{type:"text",text:h}]}),s.copyByLongPress&&(e.attrs.style+=(e.attrs.style||"")+";user-select:none",e.attrs["data-content"]=g,a.expose()),s.showLineNumber){for(var p=g.split("\n").length,u=[],o=p;o--;)u.push({name:"span",attrs:{class:"span"}});e.children.push({name:"span",attrs:{class:"line-numbers-rows"},children:u})}}}},module.exports=e;
\ No newline at end of file
"use strict";function e(e){this.vm=e}var r=require("./prism.min"),s=require("./config"),t=require("../parser");e.prototype.onParse=function(e,a){if("pre"===e.name){if(a.options.editable)return void(e.attrs.class=(e.attrs.class||"")+" hl-pre");var n;for(n=e.children.length;n--&&"code"!==e.children[n].name;);if(-1===n)return;var l=e.children[n],i=l.attrs.class+" "+e.attrs.class;n=i.indexOf("language-"),-1===n?(n=i.indexOf("lang-"),-1===n?(i="language-text",n=9):n+=5):n+=9;var c;for(c=n;c<i.length&&" "!==i[c];c++);var h=i.substring(n,c);if(l.children.length){var o=this.vm.getText(l.children).replace(/&amp;/g,"&");if(!o)return;if(e.c&&(e.c=void 0),r.languages[h]&&(l.children=new t(this.vm).parse("<pre>"+r.highlight(o,r.languages[h],h).replace(/token /g,"hl-")+"</pre>")[0].children),e.attrs.class="hl-pre",l.attrs.class="hl-code",s.showLanguageName&&e.children.push({name:"div",attrs:{class:"hl-language",style:"user-select:none"},children:[{type:"text",text:h}]}),s.copyByLongPress&&(e.attrs.style+=(e.attrs.style||"")+";user-select:none",e.attrs["data-content"]=o,a.expose()),s.showLineNumber){for(var g=o.split("\n").length,p=[],u=g;u--;)p.push({name:"span",attrs:{class:"span"}});e.children.push({name:"span",attrs:{class:"line-numbers-rows"},children:p})}}}},module.exports=e;
\ No newline at end of file
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
* mp-html v2.1.3
* mp-html v2.4.0
* https://github.com/jin-yufeng/mp-html
*
* Released under the MIT license
* Author: Jin Yufeng
*/
var t=require("./parser"),n=[require("./markdown/index.js"),require("./audio/index.js"),require("./emoji/index.js"),require("./highlight/index.js"),require("./style/index.js")];Component({data:{nodes:[]},properties:{markdown:Boolean,containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:Boolean,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){clearInterval(this._timer),this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return t=this._ids[decodeURI(t)]||t,new Promise(function(r,o){if(!i.data.useAnchor)return void o(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void o(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),r()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var r=n[i];if("text"===r.type)t+=r.text.replace(/&amp;/g,"&");else if("br"===r.name)t+="\n";else{var o="p"===r.name||"div"===r.name||"tr"===r.name||"li"===r.name||"h"===r.name[0]&&r.name[1]>"0"&&r.name[1]<"7";o&&t&&"\n"!==t[t.length-1]&&(t+="\n"),r.children&&e(r.children),o&&"\n"!==t[t.length-1]?t+="\n":"td"!==r.name&&"th"!==r.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var r={},o=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,l=o.length;l--;)r["nodes[".concat(a+l,"]")]=o[l];else r.nodes=o;this.setData(r,function(){i._hook("onLoad"),i.triggerEvent("load")});var s;clearInterval(this._timer),this._timer=setInterval(function(){i.getRect().then(function(e){e.height===s&&(i.triggerEvent("ready",e),clearInterval(i._timer)),s=e.height}).catch(function(){})},350)},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
\ No newline at end of file
var t=require("./parser"),n=[require("./markdown/index.js"),require("./audio/index.js"),require("./emoji/index.js"),require("./highlight/index.js"),require("./style/index.js")];Component({data:{nodes:[]},properties:{markdown:Boolean,containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:Boolean,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return t=this._ids[decodeURI(t)]||t,new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l,c=function e(t){t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e)},350))};this.getRect().then(c)}else this.imgList._unloadimgs||this.getRect(function(e){i.triggerEvent("ready",e)})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
\ No newline at end of file
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu]}}" catchadd="_add"/></view>
\ No newline at end of file
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add"/></view>
\ No newline at end of file
"use strict";function t(t,e,r,a,n,i,o){try{var s=t[i](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(a,n)}function e(e){return function(){var r=this,a=arguments;return new Promise(function(n,i){function o(e){t(c,n,i,o,s,"next",e)}function s(e){t(c,n,i,o,s,"throw",e)}var c=e.apply(r,a);o(void 0)})}}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{copyCode:function(t){wx.showActionSheet({itemList:["复制代码"],success:function(){return wx.setClipboardData({data:t.currentTarget.dataset.content})}})},noop:function(){},getNode:function(t){for(var e=t.split("_"),r=this.data.childs[e[0]],a=1;a<e.length;a++)r=r.children[e[a]];return r},play:function(t){if(this.root.data.pauseVideo){for(var e=!1,r=t.target.id,a=this.root._videos.length;a--;)this.root._videos[a].id===r?e=!0:this.root._videos[a].pause();if(!e){var n=wx.createVideoContext(r,this);n.id=r,this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];wx.previewImage({current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,a=t.target.dataset.i,n=this.getNode(a);n.w?(this.data.opts[1]&&!this.data.ctrl[a]||-1===this.data.ctrl[a])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+a,e))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,a=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),a&&("#"===a[0]?this.root.navigateTo(a.substring(1)).catch(function(){}):a.includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:a,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:a,fail:function(){wx.switchTab({url:a,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,a=this.getNode(e);if("video"===a.name||"audio"===a.name){var n=(this.data.ctrl[e]||0)+1;if(n>a.src.length&&(n=0),n<a.src.length)return this.setData(r({},"ctrl."+e,n))}else"img"===a.name&&this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1));this.root&&this.root.triggerEvent("error",{source:a.name,attrs:a.attrs,errMsg:t.detail.errMsg})},previewImage:function(t){var e=t.currentTarget.dataset.imgallsrc,r=t.currentTarget.dataset.imgsrc;wx.previewImage({current:r,urls:e})},goTo:function(t){var e=t.currentTarget.dataset.appid,r=t.currentTarget.dataset.redirectype,a=t.currentTarget.dataset.path,n=t.currentTarget.dataset.url,i=t.currentTarget.dataset.jumptype;"apppage"==r?wx.navigateTo({url:a}):"webpage"==r?(n="../webview/webview?url="+n,wx.navigateTo({url:n})):"miniapp"==r&&("embedded"==i?wx.openEmbeddedMiniProgram({appId:e,path:a}):wx.navigateToMiniProgram({appId:e,path:a}))},goChannels:function(t){var e=t.currentTarget.dataset.channelsid;wx.openChannelsUserProfile({finderUserName:e})},openActivity:function(t){var e=t.currentTarget.dataset.channelsid,r=t.currentTarget.dataset.feedid;wx.openChannelsActivity({finderUserName:e,feedId:r})},openEvent:function(t){var e=t.currentTarget.dataset.channelsid,r=t.currentTarget.dataset.eventid;wx.openChannelsEvent({finderUserName:e,eventId:r})},goToSinshopproduct:function(t){var e=t.currentTarget.dataset.path;wx.navigateTo({url:e})},openmap:function(t){var e=Number(t.currentTarget.dataset.latitude),r=Number(t.currentTarget.dataset.longitude),a=t.currentTarget.dataset.address,n=t.currentTarget.dataset.title;wx.openLocation({latitude:e,longitude:r,scale:15,name:n,address:a})},onTapATag:function(t){var e=t.currentTarget.dataset.src,r=t.currentTarget.dataset.appid,a=t.currentTarget.dataset.redirectype,n=t.currentTarget.dataset.path;if(/\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(e))return void this.openLinkDoc(t);a?"apppage"==a?wx.navigateTo({url:n}):"webpage"==a?(e="../webview/webview?url="+e,wx.navigateTo({url:e})):"miniapp"==a&&wx.navigateToMiniProgram({appId:r,path:n}):wx.setClipboardData({data:e,success:function(){return wx.showToast({title:"链接已复制"})}})},onbaiPanCopy:function(t){var e=t.currentTarget.dataset.code;if(!e)return void wx.showToast({title:"提取码不存在!",icon:"none",duration:3e3});wx.setClipboardData({data:e,success:function(t){wx.getClipboardData({success:function(t){wx.showToast({title:"复制成功",icon:"success",duration:3e3})}})}})},onbaiduPanOpen:function(t){var e=t.currentTarget.dataset.key;if(e){var r="pages/netdisk_share/share?scene=".concat(e);wx.navigateToMiniProgram({appId:"wxdcd3d073e47d1742",path:r})}else wx.showToast({title:"链接不存在!",icon:"none",duration:3e3})},openLinkDoc:function(t){return e(regeneratorRuntime.mark(function e(){var r,a,n,i,o,s,c,d;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.currentTarget.dataset.src||"",e.next=3,getApp().$api.getBaseConfig();case 3:if(i=e.sent,console.log("domains"),console.log(i),o=i.settings||{},s=o.downloadfile_domain&&o.downloadfile_domain.split(",")||[],c=s.find(function(t){return n.includes(t)})){e.next=12;break}return wx.setClipboardData({data:n,success:function(){return wx.showToast({title:"链接已复制"})}}),e.abrupt("return");case 12:d=/\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(n),n&&d?(r=n,a=/doc|docx|xls|xlsx|ppt|pptx|pdf$/.exec(n)[0]):(r=t.currentTarget.dataset.filelink,a=t.currentTarget.dataset.filetype),wx.downloadFile({url:r,success:function(t){var e=t.tempFilePath;wx.openDocument({filePath:e})}});case 15:case"end":return e.stop()}},e)}))()}}});
\ No newline at end of file
"use strict";function t(e){"@babel/helpers - typeof";return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){function r(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}function n(t,e,r,n){var i=e&&e.prototype instanceof a?e:a,s=Object.create(i.prototype),c=new p(n||[]);return s._invoke=function(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return g()}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var c=l(s,r);if(c){if(c===L)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=o(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===L)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,c),s}function o(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function a(){}function i(){}function s(){}function c(t){["next","throw","return"].forEach(function(e){r(t,e,function(t){return this._invoke(e,t)})})}function u(e,r){function n(a,i,s,c){var u=o(e[a],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==t(d)&&w.call(d,"__await")?r.resolve(d.__await).then(function(t){n("next",t,s,c)},function(t){n("throw",t,s,c)}):r.resolve(d).then(function(t){l.value=t,s(l)},function(t){return n("throw",t,s,c)})}c(u.arg)}var a;this._invoke=function(t,e){function o(){return new r(function(r,o){n(t,e,r,o)})}return a=a?a.then(o,o):o()}}function l(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,l(t,e),"throw"===e.method))return L;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return L}var n=o(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,L;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,L):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,L)}function d(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(d,this),this.reset(!0)}function f(t){if(t){var e=t[x];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(w.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:g}}function g(){return{value:void 0,done:!0}}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return v};var v={},y=Object.prototype,w=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},x=m.iterator||"@@iterator",b=m.asyncIterator||"@@asyncIterator",T=m.toStringTag||"@@toStringTag";try{r({},"")}catch(t){r=function(t,e,r){return t[e]=r}}v.wrap=n;var L={},E={};r(E,x,function(){return this});var k=Object.getPrototypeOf,_=k&&k(k(f([])));_&&_!==y&&w.call(_,x)&&(E=_);var N=s.prototype=a.prototype=Object.create(E);return i.prototype=s,r(N,"constructor",s),r(s,"constructor",i),i.displayName=r(s,T,"GeneratorFunction"),v.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},v.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r(t,T,"GeneratorFunction")),t.prototype=Object.create(N),t},v.awrap=function(t){return{__await:t}},c(u.prototype),r(u.prototype,b,function(){return this}),v.AsyncIterator=u,v.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new u(n(t,e,r,o),a);return v.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},c(N),r(N,T,"Generator"),r(N,x,function(){return this}),r(N,"toString",function(){return"[object Generator]"}),v.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},v.values=f,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&w.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}if(this.done)throw t;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var i=w.call(o,"catchLoc"),s=w.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&w.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,L):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),L},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),L}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;h(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:f(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),L}},v}function r(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,a){function i(t){r(c,o,a,i,s,"next",t)}function s(t){r(c,o,a,i,s,"throw",t)}var c=t.apply(e,n);i(void 0)})}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{},isiOS:wx.getSystemInfoSync().system.includes("iOS")},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{copyCode:function(t){wx.showActionSheet({itemList:["复制代码"],success:function(){return wx.setClipboardData({data:t.currentTarget.dataset.content})}})},noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],n=1;n<e.length;n++)r=r.children[e[n]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){if(this.root.triggerEvent("play"),this.root.data.pauseVideo){for(var e=!1,r=t.target.id,n=this.root._videos.length;n--;)this.root._videos[n].id===r?e=!0:this.root._videos[n].pause();if(!e){var o=wx.createVideoContext(r,this);o.id=r,this.root.playbackRate&&o.playbackRate(this.root.playbackRate),this.root._videos.push(o)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];wx.previewImage({showmenu:this.root.data.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,r=t.target.dataset.i,n=this.getNode(r);n.w?(this.data.opts[1]&&!this.data.ctrl[r]||-1===this.data.ctrl[r])&&(e=1):e=t.detail.width,e&&this.setData(o({},"ctrl."+r,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,n=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),n&&("#"===n[0]?this.root.navigateTo(n.substring(1)).catch(function(){}):n.split("?")[0].includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:n,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:n,fail:function(){wx.switchTab({url:n,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,r=this.getNode(e);if("video"===r.name||"audio"===r.name){var n=(this.data.ctrl[e]||0)+1;if(n>r.src.length&&(n=0),n<r.src.length)return this.setData(o({},"ctrl."+e,n))}else"img"===r.name&&(this.data.opts[2]&&this.setData(o({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:r.name,attrs:r.attrs,errMsg:t.detail.errMsg})},previewImage:function(t){var e=t.currentTarget.dataset.imgallsrc,r=t.currentTarget.dataset.imgsrc;wx.previewImage({current:r,urls:e})},goTo:function(t){var e=t.currentTarget.dataset.appid,r=t.currentTarget.dataset.redirectype,n=t.currentTarget.dataset.path,o=t.currentTarget.dataset.url,a=t.currentTarget.dataset.jumptype;"apppage"==r?wx.navigateTo({url:n}):"webpage"==r?(o="../webview/webview?url="+o,wx.navigateTo({url:o})):"miniapp"==r&&("embedded"==a?wx.openEmbeddedMiniProgram({appId:e,path:n}):wx.navigateToMiniProgram({appId:e,path:n}))},goChannels:function(t){var e=t.currentTarget.dataset.channelsid;wx.openChannelsUserProfile({finderUserName:e})},openActivity:function(t){var e=t.currentTarget.dataset.channelsid,r=t.currentTarget.dataset.feedid;wx.openChannelsActivity({finderUserName:e,feedId:r})},openEvent:function(t){var e=t.currentTarget.dataset.channelsid,r=t.currentTarget.dataset.eventid;wx.openChannelsEvent({finderUserName:e,eventId:r})},goToSinshopproduct:function(t){var e=t.currentTarget.dataset.path;wx.navigateTo({url:e})},openmap:function(t){var e=Number(t.currentTarget.dataset.latitude),r=Number(t.currentTarget.dataset.longitude),n=t.currentTarget.dataset.address,o=t.currentTarget.dataset.title;wx.openLocation({latitude:e,longitude:r,scale:15,name:o,address:n})},onTapATag:function(t){var e=t.currentTarget.dataset.src,r=t.currentTarget.dataset.appid,n=t.currentTarget.dataset.redirectype,o=t.currentTarget.dataset.path;if(/\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(e))return void this.openLinkDoc(t);n?"apppage"==n?wx.navigateTo({url:o}):"webpage"==n?(e="../webview/webview?url="+e,wx.navigateTo({url:e})):"miniapp"==n&&wx.navigateToMiniProgram({appId:r,path:o}):wx.setClipboardData({data:e,success:function(){return wx.showToast({title:"链接已复制"})}})},onbaiPanCopy:function(t){var e=t.currentTarget.dataset.code;if(!e)return void wx.showToast({title:"提取码不存在!",icon:"none",duration:3e3});wx.setClipboardData({data:e,success:function(t){wx.getClipboardData({success:function(t){wx.showToast({title:"复制成功",icon:"success",duration:3e3})}})}})},onbaiduPanOpen:function(t){var e=t.currentTarget.dataset.key;if(e){var r="pages/netdisk_share/share?scene=".concat(e);wx.navigateToMiniProgram({appId:"wxdcd3d073e47d1742",path:r})}else wx.showToast({title:"链接不存在!",icon:"none",duration:3e3})},openLinkDoc:function(t){return n(e().mark(function r(){var n,o,a,i,s,c,u,l;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.currentTarget.dataset.src||"",e.next=3,getApp().$api.getBaseConfig();case 3:if(i=e.sent,console.log("domains"),console.log(i),s=i.settings||{},c=s.downloadfile_domain&&s.downloadfile_domain.split(",")||[],u=c.find(function(t){return a.includes(t)})){e.next=12;break}return wx.setClipboardData({data:a,success:function(){return wx.showToast({title:"链接已复制"})}}),e.abrupt("return");case 12:l=/\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(a),a&&l?(n=a,o=/doc|docx|xls|xlsx|ppt|pptx|pdf$/.exec(a)[0]):(n=t.currentTarget.dataset.filelink,o=t.currentTarget.dataset.filetype),wx.downloadFile({url:n,success:function(t){var e=t.tempFilePath;wx.openDocument({showMenu:!0,filePath:e})}});case 15:case"end":return e.stop()}},r)}))()}}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -48,16 +48,9 @@ Page({
},
onLoad: function (options) {
var self = this;
Auth.setUserInfoData(self);
Auth.checkLogin(self);
this.fetchData();
wx.getSystemInfo({
success: function (t) {
var system = t.system.indexOf('iOS') != -1 ? 'iOS' : 'Android';
self.setData({ system: system });
}
})
// 设置系统分享菜单
wx.showShareMenu({
withShareTicket: true,
......@@ -65,31 +58,13 @@ Page({
})
},
praise: function () {
var self = this;
var enterpriseMinapp = self.data.pageData.enterpriseMinapp;
var system =self.data.system;
var praiseWord=self.data.pageData.praiseWord;
var postid=self.data.pageData.id;
if (enterpriseMinapp == "1" && system=='Android') {
if (self.data.openid) {
wx.navigateTo({
url: '../pay/pay?flag=2&openid=' + self.data.openid + '&postid=' + postid +'&praiseWord='+praiseWord
})
}
else {
Auth.checkSession(self,'isLoginNow');
}
}
else if(enterpriseMinapp == "0" || system=='iOS') {
praise: function () {
var src = wx.getStorageSync('zanImageurl');
wx.previewImage({
urls: [src],
});
}
},
onPullDownRefresh: function () {
......
......@@ -10,9 +10,9 @@
* Copyright (c) 2017 微慕 https://www.minapper.com All rights reserved.
*
*/-->
<import src="../../templates/header.wxml" />
<import src="../../templates/copyright.wxml" />
<import src="../../templates/login-popup.wxml" />
<ui-sys title="关于我们">
<view class="ui-BG-card ui-BG" style="display:{{display}}">
<template is="tempHeader" />
......@@ -23,31 +23,12 @@
<mp-html content="{{ pageData.post_content }}" bindlinktap="wxParseTagATap" copy-link="{{false}}" selectable="{{true}}" lazy-load="{{true}}" markdown="{{true}}" />
</view>
<template is="login-popup" data="{{show: isLoginPopup, userInfo: userInfo}}"></template>
<view style='text-align:center'>
<button class="gotowebpage-button ui-BG-Main" formType="submit" size="mini" bindtap="gotowebpage">打开“{{webSiteName}}”网站</button>
<modal title="{{dialog.title}}" hidden="{{dialog.hidden}}" no-cancel bindconfirm="confirm">{{dialog.content}}</modal>
</view>
<view class="praisePost" >
<view style='text-align:center'>
<button class="praise-button ui-BG-Main" formType="submit" size="mini" bindtap="praise">{{pageData.praiseWord}}</button>
<modal title="{{dialog.title}}" hidden="{{dialog.hidden}}" no-cancel bindconfirm="confirm">{{dialog.content}}</modal>
</view>
<block wx:if="{{system !='iOS'}}">
<view class="praiseTitle">
<view style='margin-top: 15rpx;'>
<text>谢谢以下{{pageData.praiseWord}}的朋友</text>
</view>
</view>
<view class="praiseText">
<block wx:key="id" wx:for="{{praiseList}}">
<image src="{{item}}" class="gravatarLikeImg"></image>
</block>
</view>
</block>
</view>
</view>
<view class="copyright">
......
......@@ -345,29 +345,13 @@ Page({
Adapter.toast("请前往小程序使用完整服务", 3000)
return
}
//this.ShowHideMenu();
var self = this;
var enterpriseMinapp = self.data.detail.enterpriseMinapp;
var system = self.data.system;
var praiseWord=self.data.detail.praiseWord;
if (enterpriseMinapp == "1" && system == 'Android') {
if (self.data.openid) {
wx.navigateTo({
url: '../pay/pay?flag=1&openid=' + self.data.openid + '&postid=' + self.data.postID+'&praiseWord='+praiseWord
})
}
else {
Auth.checkSession(self, 'isLoginNow');
}
}
else if(enterpriseMinapp == "0" || system=='iOS'){
//this.ShowHideMenu();
var src = wx.getStorageSync('zanImageurl');
wx.previewImage({
urls: [src],
});
}
},
//获取是否开启评论设置
......
......@@ -83,7 +83,7 @@
<text class="left">文章ID:{{postID}} </text>
<text class="right ui-TC-Main-2" catchtap="gotowebpage">阅读原文 </text>
<!-- <text class="right ui-TC-Main-2" catchtap="gotowebpage">阅读原文 </text> -->
</view>
</view>
......
{
"setting": {
"compileHotReLoad": true
"compileHotReLoad": true,
"urlCheck": true
},
"condition": {
"miniprogram": {
......@@ -62,5 +63,5 @@
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.23.4",
"projectname": "winxin-app-watch-life.net"
"projectname": "watch-life.net"
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ const enableChannels =false
//微慕小程序端版本,请勿修改
const minapperVersion=4.5
const minapperVersion=4.53
const minapperSource="free"
//////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册