@ -0,0 +1,14 @@ |
|||
# Windows |
|||
[Dd]esktop.ini |
|||
Thumbs.db |
|||
$RECYCLE.BIN/ |
|||
|
|||
# macOS |
|||
.DS_Store |
|||
.fseventsd |
|||
.Spotlight-V100 |
|||
.TemporaryItems |
|||
.Trashes |
|||
|
|||
# Node.js |
|||
node_modules/ |
|||
@ -0,0 +1,28 @@ |
|||
App({ |
|||
onLaunch: function() {}, |
|||
onShow: function() {}, |
|||
onHide: function() {}, |
|||
onError: function(e) {}, |
|||
util: require("we7/resource/js/util.js"), |
|||
tabBar: { |
|||
color: "#123", |
|||
selectedColor: "#1ba9ba", |
|||
borderStyle: "#1ba9ba", |
|||
backgroundColor: "#fff", |
|||
list: [ { |
|||
pagePath: "/we7/pages/index/index", |
|||
iconPath: "/we7/resource/icon/home.png", |
|||
selectedIconPath: "/we7/resource/icon/homeselect.png", |
|||
text: "首页" |
|||
}, { |
|||
pagePath: "/we7/pages/user/index/index", |
|||
iconPath: "/we7/resource/icon/user.png", |
|||
selectedIconPath: "/we7/resource/icon/userselect.png", |
|||
text: "微擎我的" |
|||
} ] |
|||
}, |
|||
globalData: { |
|||
userInfo: null |
|||
}, |
|||
siteInfo: require("siteinfo.js") |
|||
}); |
|||
@ -0,0 +1,16 @@ |
|||
{ |
|||
"pages": [ |
|||
"qf_happyvote/pages/index/index", |
|||
"we7/pages/index/index", |
|||
"we7/pages/user/index/index", |
|||
"qf_happyvote/pages/web-view/index" |
|||
], |
|||
"window": { |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "", |
|||
"navigationBarBackgroundColor": "#000", |
|||
"backgroundColor": "#f5f5f5", |
|||
"enablePullDownRefresh": true |
|||
}, |
|||
"sitemapLocation": "sitemap.json" |
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
{ |
|||
"description": "项目配置文件", |
|||
"packOptions": { |
|||
"ignore": [] |
|||
}, |
|||
"setting": { |
|||
"urlCheck": true, |
|||
"es6": true, |
|||
"enhance": false, |
|||
"postcss": true, |
|||
"preloadBackgroundData": false, |
|||
"minified": true, |
|||
"newFeature": false, |
|||
"coverView": true, |
|||
"nodeModules": false, |
|||
"autoAudits": false, |
|||
"showShadowRootInWxmlPanel": true, |
|||
"scopeDataCheck": false, |
|||
"uglifyFileName": false, |
|||
"checkInvalidKey": true, |
|||
"checkSiteMap": true, |
|||
"uploadWithSourceMap": true, |
|||
"compileHotReLoad": false, |
|||
"babelSetting": { |
|||
"ignore": [], |
|||
"disablePlugins": [], |
|||
"outputPath": "" |
|||
}, |
|||
"useIsolateContext": true, |
|||
"useCompilerModule": false, |
|||
"userConfirmedUseCompilerModuleSwitch": false, |
|||
"lazyloadPlaceholderEnable": false, |
|||
"useMultiFrameRuntime": true, |
|||
"useApiHook": true, |
|||
"useApiHostProcess": true, |
|||
"enableEngineNative": false, |
|||
"userConfirmedBundleSwitch": false, |
|||
"packNpmManually": false, |
|||
"packNpmRelationList": [], |
|||
"minifyWXSS": true, |
|||
"showES6CompileOption": false |
|||
}, |
|||
"compileType": "miniprogram", |
|||
"libVersion": "2.14.0", |
|||
"appid": "wxec9f98ac8b875086", |
|||
"projectname": "miniprogram-1", |
|||
"debugOptions": { |
|||
"hidedInDevtools": [] |
|||
}, |
|||
"scripts": {}, |
|||
"isGameTourist": false, |
|||
"simulatorType": "wechat", |
|||
"simulatorPluginLibVersion": {}, |
|||
"condition": { |
|||
"search": { |
|||
"list": [] |
|||
}, |
|||
"conversation": { |
|||
"list": [] |
|||
}, |
|||
"plugin": { |
|||
"list": [] |
|||
}, |
|||
"game": { |
|||
"list": [] |
|||
}, |
|||
"gamePlugin": { |
|||
"list": [] |
|||
}, |
|||
"miniprogram": { |
|||
"list": [ |
|||
{ |
|||
"id": 0, |
|||
"name": "qf_happyvote/pages/index/index", |
|||
"pathName": "qf_happyvote/pages/index/index", |
|||
"query": "voteid=20&joinid=92", |
|||
"scene": null |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,851 @@ |
|||
var a = getApp(), i = wx.getRecorderManager(), t = (wx.getBackgroundAudioManager(), |
|||
require("../../resource/js/function.js")); |
|||
let goodsList = [ |
|||
{actEndTime: '2021/08/08 10:00:43'} |
|||
] |
|||
Page({ |
|||
data: { |
|||
countDownList: [], |
|||
actEndTimeList: [], |
|||
//投票id
|
|||
voteid: 0, |
|||
// tabBar配置
|
|||
config: { |
|||
isindexfollow: !1, |
|||
isdetailfollow: !1, |
|||
footbgcolor: "", |
|||
footcolor: "", |
|||
footsearchbgcolor: "", |
|||
footsearchcolor: "", |
|||
buttonbgcolor: "", |
|||
buttoncolor: "", |
|||
isvotegiftpop: !1, |
|||
isgift: !1, |
|||
userlogin: "1" |
|||
}, |
|||
//搜索显示
|
|||
search: { |
|||
show: !1 |
|||
}, |
|||
// 投票显示配置
|
|||
index: { |
|||
showlist: "news", |
|||
limit: 10, |
|||
start: 0, |
|||
pulluploading: !0, |
|||
ispulluploading: !1, |
|||
size: { |
|||
news: { |
|||
left: 0, |
|||
right: 0 |
|||
}, |
|||
hot: { |
|||
left: 0, |
|||
right: 0 |
|||
} |
|||
}, |
|||
width: "" |
|||
}, |
|||
// 资源控制
|
|||
join: { |
|||
images: [ { |
|||
isadd: !1, |
|||
src: "../../resource/image/iconfont-tianjia.png" |
|||
}, { |
|||
isadd: !1, |
|||
src: "../../resource/image/iconfont-tianjia.png" |
|||
}, { |
|||
isadd: !1, |
|||
src: "../../resource/image/iconfont-tianjia.png" |
|||
}, { |
|||
isadd: !1, |
|||
src: "../../resource/image/iconfont-tianjia.png" |
|||
} ], |
|||
video: [ { |
|||
isadd: !1, |
|||
src: "", |
|||
name: "点击选择上传视频:未选择", |
|||
url: "" |
|||
} ], |
|||
music: [ { |
|||
isadd: !1, |
|||
src: "", |
|||
name: "点我开始录音", |
|||
url: "" |
|||
} ], |
|||
subbtn: { |
|||
isdisabled: !0, |
|||
text: "确认提交" |
|||
}, |
|||
validates: { |
|||
username: !1, |
|||
telephone: !1, |
|||
image: !1, |
|||
resume: !1, |
|||
video: !1, |
|||
music: !1 |
|||
}, |
|||
joinInfo: {}, |
|||
area: '', |
|||
typesId: '', |
|||
typesName: '', |
|||
region:[], |
|||
}, |
|||
joinok: {}, |
|||
checking: {}, |
|||
detail: { |
|||
swiperheight: 60, |
|||
giftbox: !0, |
|||
font: "给TA投票", |
|||
topage: "1", |
|||
id: "", |
|||
username: "", |
|||
images: "", |
|||
resume: "", |
|||
telephone: "", |
|||
pollcount: "", |
|||
gifts: "", |
|||
reply: "", |
|||
giftrecords: "", |
|||
ranking: "", |
|||
haibao: "", |
|||
imgurl: "", |
|||
imgbg: "", |
|||
maxpic: !1, |
|||
maximg: "", |
|||
video: "", |
|||
videoshow: "none", |
|||
musicshow: "music_off" |
|||
}, |
|||
ranking: { |
|||
start: 20, |
|||
limit: 20, |
|||
ispulluploading: !1, |
|||
nowType: 'renqi', |
|||
tabs: 'shangcheng', |
|||
mall_list: [] |
|||
}, |
|||
mall: { |
|||
nowNav: 1, |
|||
areaIndex: '' |
|||
}, |
|||
area:{ |
|||
region: ['广东省', '深圳市', '罗湖区'] |
|||
}, |
|||
rule: {}, |
|||
showpage: "index", |
|||
footerindex: 1, |
|||
page: 1, |
|||
mallId: '', |
|||
reply: { |
|||
content: "", |
|||
length: "" |
|||
}, |
|||
memberinfo:{ |
|||
id: 0 |
|||
}, |
|||
}, |
|||
bindPickerChange: function(e) { |
|||
var _this = this; |
|||
_this.setData({ |
|||
'join.typesId': _this.data.join.joinInfo.types[e.detail.value].id, |
|||
'join.typesName': _this.data.join.joinInfo.types[e.detail.value].name |
|||
}) |
|||
if( _this.data.join.region.length != 0 && _this.data.join.typesName != null){ |
|||
_this.getshangquan() |
|||
} |
|||
}, |
|||
bindPickerChange4(e){ |
|||
var _this = this; |
|||
_this.setData({ |
|||
'join.mallId': _this.data.join.joinInfo.mall_list[e.detail.value].id, |
|||
'join.mallName': _this.data.join.joinInfo.mall_list[e.detail.value].name |
|||
}) |
|||
}, |
|||
getshangquan(){ |
|||
var _this = this; |
|||
a.util.request({ |
|||
url: "entry/wxapp/Getmalls", |
|||
data: { |
|||
voteid: _this.data.voteid, |
|||
type: _this.data.join.typesId, |
|||
area: _this.data.join.region |
|||
}, |
|||
success: function(res) { |
|||
_this.setData({ |
|||
'join.joinInfo.mall_list': res.data.data.mall_list |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
bindPickerChange2: function(e) { |
|||
var _this = this; |
|||
_this.setData({ |
|||
'join.storeId': _this.data.join.joinInfo.store_types[e.detail.value].id, |
|||
'join.storeName': _this.data.join.joinInfo.store_types[e.detail.value].name |
|||
}) |
|||
}, |
|||
bindPickerChange3(e){ |
|||
var _this = this; |
|||
this.setData({ |
|||
'join.region': e.detail.value |
|||
}) |
|||
if( _this.data.join.region.length != 0 && _this.data.join.typesName != null){ |
|||
_this.getshangquan() |
|||
} |
|||
}, |
|||
tab1(e){ |
|||
var status = e.currentTarget.dataset.status |
|||
var _this = this; |
|||
_this.setData({ |
|||
'ranking.tabs': status |
|||
}) |
|||
}, |
|||
tab(e){ |
|||
var _this = this; |
|||
var type = e.currentTarget.dataset.type |
|||
_this.setData({ |
|||
'ranking.nowType': type |
|||
}) |
|||
// if( _this.data.ranking.tabs == 'dianzhang' ){
|
|||
t.getrankings(_this,type) |
|||
// } else {
|
|||
_this.getMall() |
|||
// }
|
|||
}, |
|||
bindRegionChange: function (e) { |
|||
console.log('picker发送选择改变,携带值为', e.detail.value) |
|||
this.setData({ |
|||
'area.region': e.detail.value |
|||
}) |
|||
this.mall(this.data.voteid,this.data.uid) |
|||
}, |
|||
onLoad: function(i) { |
|||
// 倒计时
|
|||
let endTimeList = []; |
|||
// 将活动的结束时间参数提成一个单独的数组,方便操作
|
|||
goodsList.forEach(o => {endTimeList.push(o.actEndTime)}) |
|||
this.setData({ actEndTimeList: endTimeList}); |
|||
// 执行倒计时函数
|
|||
this.countDown(); |
|||
//
|
|||
var e = this, o = wx.getStorageSync("userInfo"); |
|||
if ("" != o.memberInfo && void 0 !== o.memberInfo) { |
|||
var n = e.data.config; |
|||
n.userlogin = 0, e.setData({ |
|||
config: n |
|||
}); |
|||
var s = o.memberInfo; |
|||
console.log(s), e.setData({ |
|||
memberinfo: s |
|||
}); |
|||
} |
|||
t.initpage(e); |
|||
if (i.scene) var d = decodeURIComponent(i.scene).split(","), c = d[0], r = d[1]; else var c = i.voteid, r = i.joinid; |
|||
"" != c && c > 0 && (e.setData({ |
|||
voteid: c |
|||
}), "" != r && r > 0 && setTimeout(function(){ |
|||
a.util.request({ |
|||
url: "entry/wxapp/joininfo", |
|||
data: { |
|||
voteid: e.data.voteid, |
|||
joinid: r |
|||
}, |
|||
success: function(a) { |
|||
console.log(a.data); |
|||
var i = a.data.data, t = e.data.detail; |
|||
t.id = i.id, t.username = i.username, t.images = i.images, t.resume = i.resume, |
|||
t.telephone = i.telephone, t.pollcount = i.pollcount, t.gifts = i.gifts, t.giftrecords = i.giftrecords, |
|||
t.ranking = i.ranking, t.haibao = !1, t.video = i.video, t.music = i.music, t.reply = i.reply, |
|||
t.isreply = !1, t.imgurl = "", t.imgbg = "0", e.setData({ |
|||
detail: t, |
|||
showpage: "detail" |
|||
}); |
|||
} |
|||
}) |
|||
},100)) |
|||
}, |
|||
close(){ |
|||
var _this = this; |
|||
_this.setData({ |
|||
'config.userlogin':0, |
|||
footerindex: 1 |
|||
}) |
|||
t.initpage(_this) |
|||
}, |
|||
tabNav(e){ |
|||
this.setData({ |
|||
'mall.nowNav':e.currentTarget.dataset.types |
|||
}) |
|||
this.mall(this.data.voteid,this.data.uid) |
|||
}, |
|||
mall(e,uid){ |
|||
var _this = this; |
|||
a.util.request({ |
|||
url: 'entry/wxapp/voteinfo', |
|||
data: { |
|||
area: _this.data.area.region, |
|||
voteid: e, |
|||
uid, |
|||
type: _this.data.mall.nowNav |
|||
}, |
|||
success: function(res){ |
|||
_this.setData({ |
|||
mall: res.data.data, |
|||
'index.is_join': res.data.data.is_join, |
|||
'mall.nowNav': _this.data.mall.nowNav, |
|||
'mall.areaIndex': _this.data.mall.areaIndex |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
onReady: function() {}, |
|||
onShow: function() {}, |
|||
onHide: function() {}, |
|||
onUnload: function() {}, |
|||
onShareAppMessage: function(i) { |
|||
var t = this, e = t.data.detail; |
|||
return "" != e.id ? (console.log(t.data.voteid), console.log(e.id), { |
|||
title: t.data.config.wxappdetailsharetitle.replace("{username}", e.username), |
|||
path: "/qf_happyvote/pages/index/index?voteid=" + t.data.voteid + "&joinid=" + e.id, |
|||
imageUrl: e.images[0], |
|||
success: function(i) { |
|||
a.util.message("转发成功", "", "success"); |
|||
} |
|||
}) : { |
|||
title: t.data.config.wxappsharetitle, |
|||
path: "/qf_happyvote/pages/index/index?voteid=" + t.data.voteid, |
|||
imageUrl: t.data.config.wxappshareimage, |
|||
success: function(i) { |
|||
a.util.message("转发成功", "", "success"); |
|||
} |
|||
}; |
|||
}, |
|||
bindGetUserInfo: function(i) { |
|||
console.log(i.detail.userInfo); |
|||
var e = this, o = e.data.config; |
|||
o.userlogin = 0, e.setData({ |
|||
config: o |
|||
}), a.util.showLoading(), a.util.getUserInfo(function(a) { |
|||
var i = wx.getStorageSync("userInfo").memberInfo; |
|||
e.setData({ |
|||
memberinfo: i, |
|||
footerindex: 1 |
|||
}), t.initpage(e), wx.hideLoading(); |
|||
}); |
|||
}, |
|||
getMall(){ |
|||
var i = this; |
|||
a.util.request({ |
|||
url: "entry/wxapp/MallRankings", |
|||
data: { |
|||
start: i.data.ranking.start, |
|||
voteid: i.data.voteid, |
|||
type: i.data.ranking.nowType || 'renqi', |
|||
limit: i.data.ranking.limit |
|||
}, |
|||
success: function(res) { |
|||
i.setData({ |
|||
'ranking.mall_list': res.data.data |
|||
}) |
|||
} |
|||
}); |
|||
}, |
|||
viewjump: function(a) { |
|||
var i = this, e = a.currentTarget.dataset.topage; |
|||
console.log(e) |
|||
console.log("------------------") |
|||
if( e == 'mall' ){ |
|||
i.setData({ |
|||
showpage: e, |
|||
footerindex: 1 |
|||
}) |
|||
} |
|||
if( e == 'ranking' ){ |
|||
i.getMall() |
|||
} |
|||
if( e == 'myjoin' ){ |
|||
if(!wx.getStorageSync('userInfo')){ |
|||
i.setData({ |
|||
'config.userlogin': 1 |
|||
}) |
|||
} |
|||
} |
|||
if ("index" == e) { |
|||
var o = i.data.detail; |
|||
o.font = "给TA投票", o.giftbox = !0, i.setData({ |
|||
showpage: e, |
|||
detail: o, |
|||
footerindex: 1 |
|||
}); |
|||
} else "join" == e || "joinok" == e || "checking" == e ? t.tojoinpage(i) : "ranking" == e ? (t.getrankings(i), |
|||
i.setData({ |
|||
showpage: e, |
|||
footerindex: 3 |
|||
})) : "rule" == e ? i.setData({ |
|||
showpage: e, |
|||
footerindex: 4 |
|||
}) : "myjoin" == e && (i.data.config.isupdate ? t.mytojoinpage(i) : t.tojoinpage(i)); |
|||
}, |
|||
showsearch: function(a) { |
|||
var i = this, t = i.data.search; |
|||
t.show = !0, i.setData({ |
|||
search: t |
|||
}); |
|||
}, |
|||
search: function(a) { |
|||
var i = this, e = a.detail.value; |
|||
t.search(i, e); |
|||
}, |
|||
jumpwxapp: function(a) { |
|||
var i = this; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.wxapptoappid, |
|||
path: i.data.config.wxapptopath, |
|||
success: function(a) {} |
|||
}); |
|||
}, |
|||
imgjumpwxapp: function(a) { |
|||
var i = this, t = a.target.dataset.img; |
|||
if (console.log(i.data.config.appid1), "1" == t) { |
|||
if ("" == i.data.config.appid1) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.appid1, |
|||
path: i.data.config.path1, |
|||
success: function(a) { |
|||
console.log(1); |
|||
} |
|||
}); |
|||
} |
|||
if ("2" == t) { |
|||
if ("" == i.data.config.appid2) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.appid2, |
|||
path: i.data.config.path2, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if ("3" == t) { |
|||
if ("" == i.data.config.appid3) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.appid3, |
|||
path: i.data.config.path3, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if ("8" == t) { |
|||
if ("" == i.data.config.appid4) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.appid4, |
|||
path: i.data.config.path4, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if ("9" == t) { |
|||
if ("" == i.data.config.appid5) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.appid5, |
|||
path: i.data.config.path5, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if ("4" == t) if (i.data.index.adfixed == i.data.index.advote || "" == i.data.config.adfixedappid) { |
|||
if ("" == i.data.config.advoteappid) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.advoteappid, |
|||
path: i.data.config.advotepath, |
|||
success: function(a) {} |
|||
}); |
|||
} else { |
|||
if ("" == i.data.config.adfixedappid) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.adfixedappid, |
|||
path: i.data.config.adfixedpath, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if ("6" == t) { |
|||
if ("" == i.data.config.adjoinappid) return !1; |
|||
wx.navigateToMiniProgram({ |
|||
appId: i.data.config.adjoinappid, |
|||
path: i.data.config.adjoinpath, |
|||
success: function(a) {} |
|||
}); |
|||
} |
|||
if( "10" == t ) { |
|||
wx.navigateTo({ |
|||
url: '/qf_happyvote/pages/web-view/index', |
|||
events: { |
|||
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
|||
acceptDataFromOpenedPage: function(data) {} |
|||
}, |
|||
success: function(res) { |
|||
// 通过eventChannel向被打开页面传送数据
|
|||
res.eventChannel.emit('acceptDataFromOpenerPage', { |
|||
url: 'https://xcx.zgzmdz.com/app/index.php?i=11&c=entry&actid=20&do=index&m=hxq_lottery' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
closesearch: function(a) { |
|||
var i = this, t = i.data.search; |
|||
t.show = !1, i.setData({ |
|||
search: t |
|||
}); |
|||
}, |
|||
indextabchange: function(a) { |
|||
var i = this, t = a.currentTarget.dataset.totab, e = i.data.index; |
|||
e.showlist = t, i.setData({ |
|||
index: e |
|||
}); |
|||
}, |
|||
loadlist: function(a) { |
|||
var i = this, e = i.data.index, o = i.data.ranking; |
|||
if(i.data.showpage == 'index'){ |
|||
i.setData({ |
|||
page: i.data.page + 1 |
|||
}) |
|||
t.getlistmore(i) |
|||
} |
|||
e.ispulluploading || o.ispulluploading || (i.data.index.pulluploading && "index" == i.data.showpage && (e.ispulluploading = !0, |
|||
i.setData({ |
|||
index: e |
|||
})), "ranking" == i.data.showpage && (o.ispulluploading = !0, i.setData({ |
|||
ranking: o |
|||
}), t.getranking(i,i.data.ranking.nowType))); |
|||
}, |
|||
delimage: function(a) { |
|||
var i = this, t = a.currentTarget.dataset.index, e = i.data.join; |
|||
e.images[t].isadd = !1, e.images[t].src = "../../resource/image/iconfont-tianjia.png", |
|||
i.setData({ |
|||
'join.images': e.images |
|||
}); |
|||
}, |
|||
selimage: function(a) { |
|||
var i = this, t = a.currentTarget.dataset.index, e = i.data.join; |
|||
wx.chooseImage({ |
|||
count: 1, |
|||
sizeType: [ "original", "compressed" ], |
|||
sourceType: [ "album", "camera" ], |
|||
success: function(a) { |
|||
e.images[t].isadd = !0, e.images[t].src = a.tempFilePaths[0], i.setData({ |
|||
'join.images': e.images |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
goback(){ |
|||
var _this = this; |
|||
_this.setData({ |
|||
showpage: 'mall' |
|||
}) |
|||
}, |
|||
dianzhang(e){ |
|||
var _this = this; |
|||
var mall_id = e.currentTarget.dataset.mall_id |
|||
a.util.request({ |
|||
url: 'entry/wxapp/MallJoinList', |
|||
data: { |
|||
voteid: _this.data.voteid, |
|||
mallid: mall_id |
|||
}, |
|||
success:function(res){ |
|||
_this.setData({ |
|||
showpage: 'index', |
|||
nowMallId: mall_id, |
|||
page: 1, |
|||
'index.dianzhang': res.data.data.dianzhang, |
|||
'index.jiaoyi': res.data.data.jiaoyi, |
|||
'index.liulan': res.data.data.liulan, |
|||
'index.piaoshu':res.data.data.piaoshu, |
|||
'index.newslist': res.data.data.newlist, |
|||
'index.hotlist': res.data.data.hotlist |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
selvideo: function(a) { |
|||
var i = this, t = i.data.join; |
|||
console.log(t) |
|||
wx.chooseVideo({ |
|||
sourceType: [ "album", "camera" ], |
|||
maxDuration: 60, |
|||
success: function(a) { |
|||
t.video[0].isadd = !0, t.video[0].src = a.tempFilePath, t.video[0].name = "已选择视频", |
|||
t.validates.video = !1, i.setData({ |
|||
'join.video': t.video |
|||
}), console.log(t); |
|||
} |
|||
}); |
|||
}, |
|||
selmusic: function(a) { |
|||
var t = this, e = t.data.join; |
|||
if ("正在录音:请说话 (再次点击保存)" == e.music[0].name) return i.stop(), void i.onStop(function(a) { |
|||
e.music[0].isadd = !0, e.music[0].src = a.tempFilePath, e.music[0].name = "录音已完成", |
|||
e.validates.music = !1; |
|||
a.tempFilePath; |
|||
t.setData({ |
|||
'join.music': e.music |
|||
}); |
|||
}); |
|||
e.music[0].name = "正在录音:请说话 (再次点击保存)", t.setData({ |
|||
'join.music': e.music |
|||
}); |
|||
var o = { |
|||
duration: 6e4, |
|||
sampleRate: 16e3, |
|||
numberOfChannels: 1, |
|||
encodeBitRate: 96e3, |
|||
format: "mp3" |
|||
}; |
|||
i.start(o), i.onStart(function() { |
|||
console.log("recorder start"); |
|||
}); |
|||
}, |
|||
join: function(a) { |
|||
var i = this, e = a.detail.value; |
|||
e.mall_id = i.data.join.mallId |
|||
e.store_type = i.data.join.storeId |
|||
e.mall_type = i.data.join.typesId |
|||
e.mall_area = i.data.join.region |
|||
if( e.username == "" ){ |
|||
wx.showToast({ |
|||
title: '请输入您的姓名', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( e.telephone == "" ) { |
|||
wx.showToast({ |
|||
title: '请输入您的手机号码', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if( i.data.join.region.length == 0 || i.data.join.region == null ){ |
|||
wx.showToast({ |
|||
title: '请选所在区域', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( i.data.join.typesName == null ) { |
|||
wx.showToast({ |
|||
title: '请选择商圈/商场', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( i.data.join.mallName == null ) { |
|||
wx.showToast({ |
|||
title: i.data.join.typesId==1?'请选择商圈/商场':i.data.join.typesId==2?'请选择连锁品牌':'请选择特约商户', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( e.store_name == "" ) { |
|||
wx.showToast({ |
|||
title: '请填写店铺名称', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( !i.data.join.images[0].isadd ) { |
|||
wx.showToast({ |
|||
title: '请上传图片', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} else if ( e.resume == "" ) { |
|||
wx.showToast({ |
|||
title: '请发表您的诚信宣言', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} |
|||
if( e.telephone.length < 11 ){ |
|||
wx.showToast({ |
|||
title: '手机号码有误,请重填', |
|||
icon: 'none' |
|||
}) |
|||
return false; |
|||
} |
|||
console.log(e) |
|||
t.join(i, e); |
|||
}, |
|||
detail: function(a) { |
|||
var i = this, e = a.currentTarget.dataset.joinid; |
|||
t.getjoininfo(i, e); |
|||
}, |
|||
sendgift: function(a) { |
|||
var i = this, e = a.currentTarget.dataset.joinid, o = a.currentTarget.dataset.giftid; |
|||
t.sendgift(i, e, o); |
|||
}, |
|||
replybut: function(a) { |
|||
var i = this, t = i.data.detail, e = i.data.reply; |
|||
1 == a.currentTarget.dataset.data ? (t.isreply = !0, e.length = 0) : t.isreply = !1, |
|||
i.setData({ |
|||
detail: t, |
|||
reply: e |
|||
}); |
|||
}, |
|||
replycontent: function(a) { |
|||
var i = this, t = i.data.reply; |
|||
t.content = a.detail.value, t.length = a.detail.value.length, i.setData({ |
|||
reply: t |
|||
}); |
|||
}, |
|||
reply: function(a) { |
|||
var i = this, e = a.currentTarget.dataset.joinid, o = i.data.reply.content; |
|||
i.data.reply.length < 1 || t.reply(i, e, o); |
|||
}, |
|||
giftbox: function() { |
|||
var a = this; |
|||
t.giftbox(a); |
|||
}, |
|||
vote: function(a) { |
|||
var i = this, e = i.data.config.isgiftjoin; |
|||
if ("修改信息" != i.data.detail.font && 1 == e) { |
|||
var o = i.data.index; |
|||
return o.giftid = a.currentTarget.dataset.joinid, i.setData({ |
|||
index: o |
|||
}), void t.giftbox(i); |
|||
} |
|||
var n = a.currentTarget.dataset.joinid; |
|||
if (1 == a.currentTarget.dataset.topage) t.vote(i, n); else { |
|||
i.data.showpage; |
|||
"join", i.setData({ |
|||
showpage: "join" |
|||
}); |
|||
} |
|||
}, |
|||
haibao: function(a) { |
|||
var i = this, e = a.currentTarget.dataset.joinid; |
|||
t.haibao(i, e); |
|||
}, |
|||
saveImg: function() { |
|||
wx.downloadFile({ |
|||
url: this.data.detail.imgurl, |
|||
success: function(a) { |
|||
var i = a.tempFilePath; |
|||
wx.saveImageToPhotosAlbum({ |
|||
filePath: i, |
|||
success: function(a) { |
|||
console.log(a); |
|||
}, |
|||
fail: function(a) { |
|||
console.log(a); |
|||
}, |
|||
complete: function(a) { |
|||
console.log(a); |
|||
} |
|||
}); |
|||
}, |
|||
fail: function(a) { |
|||
console.log(a); |
|||
} |
|||
}); |
|||
}, |
|||
onSlideChangeEnd: function(a) { |
|||
var i = this, t = i.data.detail; |
|||
t.imgbg = a.detail.current, i.setData({ |
|||
detail: t |
|||
}) |
|||
}, |
|||
modalcnt: function() { |
|||
wx.showModal({ |
|||
title: "分享", |
|||
content: "点击右上角的 ··· 转发给朋友哦~", |
|||
success: function(a) { |
|||
a.confirm ? console.log("用户点击确定") : a.cancel && console.log("用户点击取消"); |
|||
} |
|||
}); |
|||
}, |
|||
maximg: function(a) { |
|||
console.log(a.target.dataset.img); |
|||
var i = this, t = i.data.detail; |
|||
t.maximg = a.target.dataset.img, t.maxpic = !0, i.setData({ |
|||
detail: t |
|||
}); |
|||
}, |
|||
maxpic: function(a) { |
|||
var i = this, t = i.data.detail; |
|||
t.maxpic = !1, i.setData({ |
|||
detail: t |
|||
}); |
|||
}, |
|||
videoshow: function(a) { |
|||
var i = this, t = i.data.detail; |
|||
"flex" == t.videoshow ? t.videoshow = "none" : "" == t.video ? wx.showToast({ |
|||
title: "没有上传视频", |
|||
icon: "succes", |
|||
duration: 1e3, |
|||
mask: !0 |
|||
}) : t.videoshow = "flex", i.setData({ |
|||
detail: t |
|||
}); |
|||
}, |
|||
musicshow: function(a) { |
|||
var i = this, t = i.data.detail; |
|||
"music_off" != t.musicshow ? (wx.stopBackgroundAudio(), t.musicshow = "music_off", |
|||
console.log(t.music)) : "" == t.music ? wx.showToast({ |
|||
title: "没有上传音频", |
|||
icon: "succes", |
|||
duration: 1e3, |
|||
mask: !0 |
|||
}) : (t.musicshow = "music", console.log(t.music), wx.playBackgroundAudio({ |
|||
dataUrl: t.music |
|||
}), wx.onBackgroundAudioStop(function() { |
|||
t.musicshow = "music_off", i.setData({ |
|||
detail: t |
|||
}); |
|||
})), i.setData({ |
|||
detail: t |
|||
}); |
|||
}, |
|||
adindex: function(a) { |
|||
var i = this, t = i.data.index; |
|||
t.isadindex = !1, "0" != t.advote && t.adfixed != t.advote && (t.adfixed = t.advote), |
|||
i.setData({ |
|||
index: t |
|||
}); |
|||
}, |
|||
timeFormat(param){ |
|||
//小于10的格式化函数
|
|||
return param < 10 ? '0' + param : param; |
|||
}, |
|||
countDown(){ |
|||
//倒计时函数
|
|||
// 获取当前时间,同时得到活动结束时间数组
|
|||
let newTime = new Date().getTime(); |
|||
let endTimeList = this.data.actEndTimeList; |
|||
let countDownArr = []; |
|||
|
|||
// 对结束时间进行处理渲染到页面
|
|||
endTimeList.forEach(o => { |
|||
let endTime = new Date(o).getTime(); |
|||
let obj = null; |
|||
// 如果活动未结束,对时间进行处理
|
|||
if (endTime - newTime > 0){ |
|||
let time = (endTime - newTime) / 1000; |
|||
// 获取天、时、分、秒
|
|||
let day = parseInt(time / (60 * 60 * 24)); |
|||
let hou = parseInt(time % (60 * 60 * 24) / 3600); |
|||
let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); |
|||
let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); |
|||
obj = { |
|||
day: this.timeFormat(day), |
|||
hou: this.timeFormat(hou), |
|||
min: this.timeFormat(min), |
|||
sec: this.timeFormat(sec) |
|||
} |
|||
}else{//活动已结束,全部设置为'00'
|
|||
obj = { |
|||
day: '00', |
|||
hou: '00', |
|||
min: '00', |
|||
sec: '00' |
|||
} |
|||
} |
|||
countDownArr.push(obj); |
|||
}) |
|||
// 渲染,然后每隔一秒执行一次倒计时函数
|
|||
this.setData({ countDownList: countDownArr}) |
|||
setTimeout(this.countDown,1000); |
|||
} |
|||
}); |
|||
@ -0,0 +1 @@ |
|||
{} |
|||
@ -0,0 +1,40 @@ |
|||
<import src="../templates/index.wxml"></import> |
|||
<import src="../templates/mall.wxml"></import> |
|||
<import src="../templates/detail.wxml"></import> |
|||
<import src="../templates/ranking.wxml"></import> |
|||
<import src="../templates/join.wxml"></import> |
|||
<import src="../templates/joinok.wxml"></import> |
|||
<import src="../templates/checking.wxml"></import> |
|||
<import src="../templates/rule.wxml"></import> |
|||
<import src="../templates/footer.wxml"></import> |
|||
<view class="container"> |
|||
<block wx:if="{{search.show}}"> |
|||
<view bindtap="closesearch" class="searchback"></view> |
|||
<view class="search"> |
|||
<form bindsubmit="search"> |
|||
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="number"></input> |
|||
<button formType="submit" type="default">{{config.font[34]}}</button> |
|||
</form> |
|||
<div class="tips">{{config.font[35]}}</div> |
|||
</view> |
|||
</block> |
|||
<scroll-view bindscrolltolower="loadlist" class="body" scrollY="true"> |
|||
<!-- 店长列表 --> |
|||
<template is="voteindex" data="{{data:index,config:config,gift:detail}}" wx:if="{{showpage=='index'}}"></template> |
|||
<!-- 报名 --> |
|||
<template is="votejoin" data="{{data:join,config:config}}" wx:if="{{showpage=='join'}}"></template> |
|||
<!-- 报名完成 --> |
|||
<template is="votejoinok" data="{{data:joinok,config:config}}" wx:if="{{showpage=='joinok'}}"></template> |
|||
<!-- 报名确认页 --> |
|||
<template is="votechecking" data="{{data:checking,config:config}}" wx:if="{{showpage=='checking'}}"></template> |
|||
<!-- 店长详情 --> |
|||
<template is="votedetail" data="{{data:detail,datas:index,config:config}}" wx:if="{{showpage=='detail'}}"></template> |
|||
<!-- 排行页 --> |
|||
<template is="voteranking" data="{{data:ranking,memberinfo:memberinfo,config:config}}" wx:if="{{showpage=='ranking'}}"></template> |
|||
<!-- 奖品 --> |
|||
<template is="voterule" data="{{data:rule,config:config}}" wx:if="{{showpage=='rule'}}"></template> |
|||
<!-- 首页 --> |
|||
<template is="mall" data="{{data:mall,config:config,area:area, countDownList: countDownList}}" wx:if="{{showpage=='mall'}}"></template> |
|||
</scroll-view> |
|||
<template is="votefooter" data="{{data:index,footerindex:footerindex,config:config}}"></template> |
|||
</view> |
|||
@ -0,0 +1,6 @@ |
|||
<template name="votechecking"> |
|||
<view class="checking"> |
|||
<text class="iconfont icon-shenhe icontext" style="color:{{config.buttonbgcolor}}"></text> |
|||
<view class="msg1">正在审核中,请稍候……</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,124 @@ |
|||
<template name="votedetail"> |
|||
<import src="../../resource/wxParse/wxParse.wxml"></import> |
|||
<view id="detail"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/goback.png" class="goback" bindtap="goback"></image> |
|||
<view style="position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.8);z-index:99;display:{{data.videoshow}};display: -webkit-{{data.videoshow}};align-items:center;"> |
|||
<video controls src="{{data.video}}" style="width:100%;"></video> |
|||
</view> |
|||
<view style="width:100%;height:750rpx;display:block;overflow: hidden;" wx:if="{{!config.isimgs}}"> |
|||
<view style="width:100%;height:750rpx;overflow:hidden;-webkit-filter: blur(50px);-moz-filter: blur(50px);-ms-filter: blur(50px);-o-filter: blur(50px);filter: blur(50px);"> |
|||
<image mode="widthFix" src="{{data.images[data.imgbg]}}" style="position: relative;top: -50%;left: -50%;height:1500rpx;width:200%;"></image> |
|||
</view> |
|||
</view> |
|||
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" style="position: absolute;left:0;top:0;width:750rpx;height:750rpx;display:block;overflow: hidden;" wx:if="{{!config.isimgs}}"> |
|||
<swiper-item style="height:750rpx;" wx:for="{{data.images}}" wx:key="i"> |
|||
<image bindtap="maximg" data-img="{{item}}" mode="aspectFit" src="{{item}}" style="height:750rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
</swiper> |
|||
<block wx:if="{{config.isimgs}}"> |
|||
<image bindtap="maximg" data-img="{{item}}" src="{{item}}" style="width:100%;display:block;overflow: hidden;height:414px" wx:for="{{data.images}}" wx:key="i"></image> |
|||
</block> |
|||
<view bindtap="jumpwxapp" class="top" style="border:1rpx solid {{config.buttonbgcolor}};color:{{config.buttonbgcolor}};" wx:if="{{config.wxapptoisdetail}}">{{config.wxapptotext}}</view> |
|||
<image bindtap="videoshow" class="videoright" mode="widthFix" src="../../resource/image/{{data.videoshow}}.png" style="display:{{config.isvideo?'block':'none'}};"></image> |
|||
<image bindtap="musicshow" class="videoright" mode="widthFix" src="../../resource/image/{{data.musicshow}}.png" style="display:{{config.ismusic?'block':'none'}};{{config.isvideo?'right:105rpx':''}};background-color:rgba(0,0,0,0.1);z-index:88;"></image> |
|||
<view bindtap="giftbox" class="gifts" style="display: block;background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}};" wx:if="{{config.isgift}}"> |
|||
<text class="iconfont icon-liwu"></text> |
|||
</view> |
|||
<view bindtap="replybut" class="gift" data-data="1" style="display: block;background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}};right:20rpx;" wx:if="{{config.isre}}"> |
|||
<image mode="widthFix" src="../../resource/image/reply.png" style="width:42rpx;margin-top:20rpx;"></image> |
|||
</view> |
|||
<view class="content"> |
|||
<view class="left"> |
|||
<view class="title">{{data.id}}号 {{data.username}}</view> |
|||
<view class="subtitle"> |
|||
<template is="wxParse" data="{{wxParseData:data.resume.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
<view class="right"> |
|||
<button class="but" openType="share" style="border:1rpx solid {{config.buttonbgcolor}};color:{{config.buttonbgcolor}};" wx:if="{{config.isshare}}">{{config.font[16]}}</button> |
|||
</view> |
|||
<view class="menu"> |
|||
<view class="i"> |
|||
<view class="num">{{data.id}}</view> |
|||
<view class="title">{{config.font[17]}}</view> |
|||
</view> |
|||
<view class="i"> |
|||
<view class="num">{{data.pollcount}}</view> |
|||
<view class="title">{{config.font[18]}}</view> |
|||
</view> |
|||
<view class="i"> |
|||
<view class="num">{{data.ranking}}</view> |
|||
<view class="title">{{config.font[19]}}</view> |
|||
</view> |
|||
</view> |
|||
<view bindtap="vote" class="ok" data-joinid="{{data.id}}" data-topage="{{data.topage}}" style="display: block;background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}};box-shadow: -2rpx 2rpx 3rpx {{config.buttonbgcolor}};">{{data.font}}</view> |
|||
<view bindtap="haibao" class="tips" data-joinid="{{data.id}}" style="color:{{config.buttonbgcolor}};" wx:if="{{config.isposter}}">{{config.font[21]}}</view> |
|||
<view class="tips" wx:if="{{!config.isposter}}"></view> |
|||
<view bindtap="giftbox" class="gift-FIX" hidden="{{data.giftbox}}"></view> |
|||
<view bindtap="giftbox" class="gift-BOX" hidden="{{data.giftbox}}"> |
|||
<view bindtap="sendgift" class="gift-gift" data-giftid="{{item.id}}" data-joinid="{{data.id}}" wx:for="{{data.gifts}}" wx:key="index"> |
|||
<image src="{{item.image}}"></image> |
|||
<view class="a" style="background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}};">票数+{{item.pollcount}}</view> |
|||
<view class="b">{{item.name}}</view> |
|||
<view class="c">$ {{item.price}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="gift-title" wx:if="{{data.giftrecords!=''&&config.isgift}}">~ 礼物 ~</view> |
|||
<view class="giftbox"> |
|||
<view class="giftline" wx:if="{{config.isgift}}" wx:for="{{data.giftrecords}}" wx:key="index"> |
|||
<view class="a"> |
|||
<image src="{{item.avatar}}"></image> |
|||
</view> |
|||
<view class="b"> |
|||
<view class="name" style="color:{{config.buttonbgcolor}}">{{item.nickname}}</view> |
|||
<view class="content1">给你送了{{item.giftname}} 票数+{{item.pollcount}}</view> |
|||
</view> |
|||
<view class="c"> |
|||
<image class="image1" src="{{item.giftimage}}"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="gift-title" wx:if="{{config.isre}}">~ 评论 ~</view> |
|||
<view class="reply" wx:if="{{config.isre}}"> |
|||
<view class="line" wx:for="{{data.reply}}" wx:key="re"> |
|||
<view class="img"> |
|||
<image src="{{item.avatar}}"></image> |
|||
</view> |
|||
<view class="content"> |
|||
<view class="name">{{item.nickname}}</view> |
|||
<view class="content">{{item.content}}</view> |
|||
<view class="time">{{item.create_time}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="gift-title" wx:if="{{datas.isadjoin}}">~ {{config.font[22]}} ~</view> |
|||
<navigator appId="{{config.adjoinappid}}" extraData="" openType="navigate" path="{{config.adjoinpath}}" target="miniProgram" version="release"> |
|||
<image class="advote" src="{{datas.adjoin}}" wx:if="{{datas.isadjoin}}"></image> |
|||
</navigator> |
|||
<ad unitId="{{config.adunit}}" wx:if="{{config.adunit!=''}}"></ad> |
|||
</view> |
|||
</view> |
|||
<view bindtap="haibao" id="haibao" wx:if="{{data.haibao}}"> |
|||
<view> |
|||
<image src="{{data.imgurl}}" mode="widthFix"></image> |
|||
<view bindtap="saveImg" class="but">保存海报</view> |
|||
</view> |
|||
</view> |
|||
<view bindtap="maxpic" id="maxpic" wx:if="{{data.maxpic}}"> |
|||
<view> |
|||
<image mode="widthFix" src="{{data.maximg}}"></image> |
|||
</view> |
|||
</view> |
|||
<view id="reply" wx:if="{{data.isreply}}"> |
|||
<view style="width:750rpx; position: relative; top: -250rpx;"> |
|||
<view class="box"> |
|||
<view bindtap="replybut" class="name" data-data="0"> |
|||
{{data.username}} |
|||
<b>X</b> |
|||
</view> |
|||
<textarea bindinput="replycontent"></textarea> |
|||
<view bindtap="reply" class="but" data-joinid="{{data.id}}" style="background:{{config.buttonbgcolor}};">{{config.font[23]}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,40 @@ |
|||
<template name="votefooter"> |
|||
<view bindtap="adindex" style="position: fixed;width: 100%;height: 100%;background: rgba(0,0,0,0.85);z-index:1003;display:flex;display: -webkit-flex;align-items:center;" wx:if="{{data.isadindex}}"> |
|||
<view style="margin: 0 auto;position: relative;overflow: visible;"> |
|||
<image bindtap="imgjumpwxapp" data-img="10" src="{{data.adfixed}}" mode="widthFix" style="width:500rpx;border-radius:5px;"></image> |
|||
<view style="width: 60rpx;height: 60rpx;line-height: 60rpx;border-radius: 60rpx;border: 4rpx solid #fff;color: #fff;text-align: center;opacity: 0.9;font-size:30rpx;position:absolute;top:-40px;right:0px;">X</view> |
|||
</view> |
|||
</view> |
|||
<view style="position: fixed;width: 100%;height: 100%;background: rgba(0,0,0,0.5);z-index:1001;display:flex;display: -webkit-flex;align-items:center;" wx:if="{{config.userlogin=='1'}}"> |
|||
<view style="margin-top:-60rpx;width:550rpx;background:#fff;margin-left:100rpx;border-radius:5px;"> |
|||
<view style="padding:25rpx;text-align:center;font-size:18px;">微信授权</view> |
|||
<view style="padding:25rpx;text-align:center;font-size:15px;color:#aaa;margin-top:-10rpx;">提示:需要授权后才能参与活动</view> |
|||
<view style="display:flex;"> |
|||
<button bindtap="close" style="padding:0rpx;text-align:center;font-size:18px;color:#1AAD16;border:0px solid #fff;border-top:1px solid #eee;background-color:#fff;border-radius:0px;position: static;width:50%">取消</button> |
|||
<button bindgetuserinfo="bindGetUserInfo" openType="getUserInfo" style="width:50%;color:#1AAD16;background:#fff;border-radius:0px;">确定</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="footer" style="background-color: {{config.footbgcolor}}"> |
|||
<view bindtap="viewjump" class="item" data-topage="mall" style="{{footerindex==1?'color:'+config.footcolor:'color:'+config.buttoncolor}}"> |
|||
<text class="iconfont icon-shouye-copy"></text> |
|||
<view>{{config.font[10]}}</view> |
|||
</view> |
|||
<view bindtap="viewjump" class="item" data-topage="ranking" style="{{footerindex==3?'color:'+config.footcolor:'color:'+config.buttoncolor}}"> |
|||
<text class="iconfont icon-paixing-copy"></text> |
|||
<view>{{config.font[11]}}</view> |
|||
</view> |
|||
<view bindtap="showsearch" class="item" style="background-color: {{config.footsearchbgcolor}};color:{{config.footsearchcolor}};"> |
|||
<text class="iconfont icon-sousuo"></text> |
|||
<view>{{config.font[12]}}</view> |
|||
</view> |
|||
<view bindtap="viewjump" class="item" data-topage="myjoin" style="{{footerindex==2?'color:'+config.footcolor:'color:'+config.buttoncolor}}"> |
|||
<text class="iconfont icon-zhucetianjiahaoyou"></text> |
|||
<view>{{data.is_join == 0 ? config.font[13] :'我的'}}</view> |
|||
</view> |
|||
<view bindtap="viewjump" class="item" data-topage="rule" style="{{footerindex==4?'color:'+config.footcolor:'color:'+config.buttoncolor}}"> |
|||
<text class="iconfont icon-guize-"></text> |
|||
<view>{{config.font[14]}}</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,119 @@ |
|||
<template name="voteindex"> |
|||
<view class="index"> |
|||
<view class="head"> |
|||
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" style="width:750rpx;height:400rpx;display:block;overflow: hidden;" wx:if="{{data.ishbimg=='0'}}"> |
|||
<swiper-item style="height:490rpx;"> |
|||
<image bindtap="imgjumpwxapp" data-img="1" src="{{data.picture}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture2!='0'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="2" src="{{data.picture2}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture3!='0'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="3" src="{{data.picture3}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture4!='0'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="8" src="{{data.picture4}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture5!='0'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="9" src="{{data.picture5}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
</swiper> |
|||
<block wx:if="{{data.ishbimg=='1'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="1" mode="widthFix" src="{{data.picture}}" style="width:100%;display:block;overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="2" mode="widthFix" src="{{data.picture2}}" style="width:100%;display:{{data.picture2=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="3" mode="widthFix" src="{{data.picture3}}" style="width:100%;display:{{data.picture3=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="8" mode="widthFix" src="{{data.picture4}}" style="width:100%;display:{{data.picture4=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="9" mode="widthFix" src="{{data.picture5}}" style="width:100%;display:{{data.picture5=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
</block> |
|||
<view class="statistics"> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.dianzhang}}</view> |
|||
<view>总店长</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.piaoshu}}</view> |
|||
<view>总票数</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.jiaoyi}}</view> |
|||
<view>总交易</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.liulan}}</view> |
|||
<view>总浏览</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class="index_datetop"></view> |
|||
<view class="index_btn2" wx:if="{{config.wxapptoisindex}}"> |
|||
<view bindtap="viewjump" data-topage="rule" style="color:#888;"> |
|||
<text class="iconfont icon-guize-"> {{config.font[4]}}</text> |
|||
</view> |
|||
<view bindtap="jumpwxapp" class="iconfont icon-biaoti" style="color:#888;" wx:if="{{config.wxapptoisindex}}"> {{config.wxapptotext}} |
|||
</view> |
|||
</view> |
|||
<view class="index_datetime" style="color:#555;"> |
|||
{{data.strtime}} |
|||
</view> |
|||
<view class="list"> |
|||
<view class="menu"> |
|||
<view bindtap="indextabchange" class="menuitem1" data-totab="news" style="{{data.showlist=='news'?'color: '+config.buttonbgcolor+'; border-bottom: 2rpx solid '+config.buttonbgcolor+';':''}}"> |
|||
{{config.font[5]}} |
|||
</view> |
|||
<view bindtap="indextabchange" class="menuitem2" data-totab="hot" style="{{data.showlist=='hot'?'color: '+config.buttonbgcolor+'; border-bottom: 2rpx solid '+config.buttonbgcolor+';':''}}"> |
|||
{{config.font[6]}} |
|||
</view> |
|||
</view> |
|||
<view class="mall_list"> |
|||
<view class="item" wx:for="{{data.showlist == 'news'?data.newslist:data.hotlist}}" wx:key="index"> |
|||
<view bindtap="detail" class="info" data-joinid="{{item.id}}"> |
|||
<view class="top" style="background-color: rgba(0,0,0,0.3);"> {{item.id}}号 {{item.username}}</view> |
|||
</view> |
|||
<image bindtap="detail" class="img" data-joinid="{{item.id}}" src="{{item.image}}"></image> |
|||
<view> |
|||
<text bindtap="vote" data-joinid="{{item.id}}" data-topage="1" class="toupiaobtn">给TA投票</text> |
|||
</view> |
|||
<view class="orderfooter-info"> |
|||
<view class="orderfooter-info-item">店铺:<text>{{item.storename}}</text></view> |
|||
<view class="orderfooter-info-item">排名:<text>{{item.ranking}}</text></view> |
|||
<view class="orderfooter-info-item">票数:<text>{{item.pollcount}}</text></view> |
|||
<view class="orderfooter-info-item">交易额:<text>{{item.orderSum}}</text></view> |
|||
<view class="orderfooter-info-item">浏览量:<text>{{item.views}}</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <view class="index_rightlist"> |
|||
<view class="item" wx:if="{{item.int==2}}" wx:for="{{data.showlist=='news'?data.newslist:data.hotlist}}" wx:key="index"> |
|||
<view bindtap="detail" class="info" data-joinid="{{item.id}}"> |
|||
<view class="top" style="background-color: rgba(0,0,0,0.3);"> {{item.id}}号 {{item.username}}</view> |
|||
</view> |
|||
<image bindtap="detail" class="img" data-joinid="{{item.id}}" src="{{item.image}}"></image> |
|||
<view> |
|||
<text bindtap="vote" data-joinid="{{item.id}}" data-topage="1" class="toupiaobtn">给TA投票</text> |
|||
</view> |
|||
<view class="orderfooter-info"> |
|||
<view class="orderfooter-info-item">店铺:<text>{{item.username}}</text></view> |
|||
<view class="orderfooter-info-item">排名:<text>2</text></view> |
|||
<view class="orderfooter-info-item">票数:<text>{{item.pollcount}}</text></view> |
|||
<view class="orderfooter-info-item">交易额:<text>0</text></view> |
|||
<view class="orderfooter-info-item">浏览量:<text>4</text></view> |
|||
</view> |
|||
<view class="btn" style="background-color: {{config.buttonbgcolor}};margin-top: -8rpx;"> |
|||
<view bindtap="vote" class="btn6" data-joinid="{{item.id}}" data-topage="1" style="background-color: {{config.footsearchbgcolor}};color:{{config.footsearchcolor}};">{{config.font[7]}}</view> |
|||
<view class="list_data" style="background-color: {{config.footbgcolor}};color:{{config.buttoncolor}};">{{item.pollcount}} {{config.font[8]}}</view> |
|||
</view> |
|||
</view> |
|||
</view> --> |
|||
</view> |
|||
<!-- <view bindtap="giftbox" class="gift-FIX" hidden="{{gift.giftbox}}"></view> --> |
|||
<!-- <view bindtap="giftbox" class="gift-BOX" hidden="{{gift.giftbox}}"> |
|||
<view bindtap="sendgift" class="gift-gift" data-giftid="{{item.id}}" data-joinid="{{data.giftid}}" wx:for="{{data.gifts}}" wx:key="index"> |
|||
<image src="{{item.image}}"></image> |
|||
<view class="a" style="background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}};">票数+{{item.pollcount}}</view> |
|||
<view class="b">{{item.name}}</view> |
|||
<view class="c">$ {{item.price}}</view> |
|||
</view> |
|||
</view> --> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,97 @@ |
|||
<template name="votejoin"> |
|||
<view class="join"> |
|||
<view class="tabtitle" style="color:{{config.buttonbgcolor}}">活动报名处</view> |
|||
<view class="form"> |
|||
<form bindsubmit="join"> |
|||
<view class="formgroup"> |
|||
<input class="form-control" maxlength="25" name="username" bindinput="username" |
|||
placeholder="{{config.font[37]}}" type="text" value="{{data.joinInfo.username}}"></input> |
|||
</view> |
|||
<label class="errorlabel" wx:if="{{data.validates.username}}">* {{config.font[38]}}</label> |
|||
<view class="formgroup"> |
|||
<input class="form-control" maxlength="11" name="telephone" placeholder="{{config.font[39]}}" type="number" value="{{data.joinInfo.telephone}}"></input> |
|||
</view> |
|||
<view class="formgroup"> |
|||
<picker mode="region" bindchange="bindPickerChange3" value="{{data.region}}"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.region.length>0?'#333':'#777'}}"> |
|||
<block wx:if="{{data.region.length>0}}"> |
|||
{{data.region[0]}} {{data.region[1]}} {{data.region[2]}} |
|||
</block> |
|||
<block wx:if="{{data.region.length==0}}">请选所在区域</block> |
|||
</view> |
|||
</picker> |
|||
<!-- <picker bindchange="bindPickerChange3" value="{{data.area}}" range="{{data.joinInfo.areas}}"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.area?'#333':'#777'}}"> |
|||
{{data.area||'请选所在区域'}} |
|||
</view> |
|||
</picker> --> |
|||
</view> |
|||
<view class="formgroup"> |
|||
<picker bindchange="bindPickerChange" value="{{data.typesId}}" range="{{data.joinInfo.types}}" range-key="name"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.typesName?'#333':'#777'}}"> |
|||
{{data.typesName||'请选择商圈/商场'}} |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
<view class="formgroup" wx:if="{{data.region.length > 0 && data.typesName != null}}"> |
|||
<picker bindchange="bindPickerChange4" value="{{data.mallId}}" range="{{data.joinInfo.mall_list}}" range-key="name"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.mallName?'#333':'#777'}}"> |
|||
<block wx:if="{{data.mallName!=null}}">{{data.mallName}}</block> |
|||
<block wx:if="{{data.mallName==null}}"> |
|||
{{data.typesId==1?'请选择商圈/商场':data.typesId==2?'请选择连锁品牌':'请选择特约商户'}} |
|||
</block> |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
<view class="formgroup"> |
|||
<picker bindchange="bindPickerChange2" value="{{data.storeId}}" range="{{data.joinInfo.store_types}}" range-key="name"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.storeName?'#333':'#777'}}"> |
|||
{{data.storeName||'请选择店铺分类'}} |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
<view class="formgroup"> |
|||
<input class="form-control" name="store_name" placeholder="请填写店铺名称" type="text" value="{{data.joinInfo.store_name}}"></input> |
|||
</view> |
|||
<!-- <label class="errorlabel" wx:if="{{data.validates.telephone}}">* {{config.font[40]}}</label> --> |
|||
<view class="formgroup imageform"> |
|||
<view class="imagetext">{{config.font[41]}}</view> |
|||
<view class="imagelist"> |
|||
<view class="imageitem"> |
|||
<view bindtap="delimage" class="imageclose" data-index="0" wx:if="{{data.images[0].isadd}}">X</view> |
|||
<image bindtap="selimage" class="image" data-index="0" src="{{data.images[0].src}}"></image> |
|||
</view> |
|||
<view class="imageitem"> |
|||
<view bindtap="delimage" class="imageclose" data-index="1" wx:if="{{data.images[1].isadd}}">X</view> |
|||
<image bindtap="selimage" class="image" data-index="1" src="{{data.images[1].src}}"></image> |
|||
</view> |
|||
<view class="imageitem"> |
|||
<view bindtap="delimage" class="imageclose" data-index="2" wx:if="{{data.images[2].isadd}}">X</view> |
|||
<image bindtap="selimage" class="image" data-index="2" src="{{data.images[2].src}}"></image> |
|||
</view> |
|||
<view class="imageitem"> |
|||
<view bindtap="delimage" class="imageclose" data-index="3" wx:if="{{data.images[3].isadd}}">X</view> |
|||
<image bindtap="selimage" class="image" data-index="3" src="{{data.images[3].src}}"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <label class="errorlabel" wx:if="{{data.validates.image}}">* {{config.font[42]}}</label> --> |
|||
<view class="formgroup imageform" wx:if="{{config.isvideo}}"> |
|||
<view bindtap="selvideo" class="imagetext">{{data.video[0].name}}</view> |
|||
</view> |
|||
<!-- <label class="errorlabel" wx:if="{{data.validates.video}}">* {{config.font[45]}}</label> --> |
|||
<view class="formgroup imageform" wx:if="{{config.ismusic}}"> |
|||
<view bindtap="selmusic" class="imagetext">{{data.music[0].name}}</view> |
|||
</view> |
|||
<!-- <label class="errorlabel" wx:if="{{data.validates.music}}">* {{config.font[49]}}</label> --> |
|||
<view class="formgroup textform"> |
|||
<input maxlength="100" name="resume" placeholder="{{config.font[50]}}" value="{{data.joinInfo.resume}}" style="padding:0"></input> |
|||
</view> |
|||
<!-- <label class="errorlabel" wx:if="{{data.validates.resume}}">* {{config.font[51]}}</label> --> |
|||
<button class="submitbtn" formType="submit" style="background-color:{{config.buttonbgcolor}};color:{{config.buttoncolor}}" type="default">{{data.subbtn.text}}</button> |
|||
<button bindtap="viewjump" class="returnbtn" data-topage="index" style="background-color:{{config.buttoncolor}};color:{{config.buttonbgcolor}}" type="default">{{config.font[53]}}</button> |
|||
</form> |
|||
<view style="width:750:rpx;height:150rpx;diaplay:block;"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,15 @@ |
|||
<template name="votejoinok"> |
|||
<view class="joinok"> |
|||
<image class="img" src="../../resource/icon/ok.png"></image> |
|||
<view class="msg1">{{config.font[70]}}</view> |
|||
<view class="msg2" wx:if="{{data.checkstate==2}}">{{config.font[71]}} <label class="joinid">{{data.id}}</label> {{config.font[72]}}</view> |
|||
<block wx:if="{{data.checkstate==1}}"> |
|||
<view class="msg2">{{config.font[73]}} <label class="joinid">{{data.id}}</label> |
|||
</view> |
|||
<view class="msg2">{{config.font[74]}}</view> |
|||
</block> |
|||
<view class="toindex"> |
|||
<view bindtap="viewjump" data-topage="mall" style="color:{{config.buttonbgcolor}}">{{config.font[75]}}</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,128 @@ |
|||
<template name="mall"> |
|||
<view class="index_datetime"> |
|||
<view class="address"> |
|||
<picker mode="region" bindchange="bindRegionChange" value="{{area.region}}"> |
|||
<view class="picker" style="padding-left:10px"> |
|||
{{area.region[0]}} {{area.region[1]}} {{area.region[2]}} |
|||
</view> |
|||
</picker> |
|||
<image src="/we7/resource/images/xiala.png" style="width:15px;height:15px;position:absolute;right:0;top:16px;"></image> |
|||
</view> |
|||
<!-- <view class="address"> |
|||
<picker bindchange="bindPickerAreas" value="{{data.areaIndex}}" range="{{data.areas}}"style="width:100%;"> |
|||
<view class="picker" style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:#333;"> |
|||
{{data.areaIndex||'全区'}} |
|||
</view> |
|||
<image src="/we7/resource/images/xiala.png" style="width:15px;height:15px;position:absolute;right:0;top:16px"></image> |
|||
</picker> |
|||
</view> --> |
|||
<form bindsubmit="search"> |
|||
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="number" style="height:1.9rem;width:110px"></input> |
|||
<button formType="submit" type="default">{{config.font[34]}}</button> |
|||
</form> |
|||
</view> |
|||
|
|||
<view class="timebox"> |
|||
<view class="selectform"> |
|||
<form bindsubmit="search"> |
|||
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="number" style="height:1.9rem;width:110px"></input> |
|||
<!-- <button formType="submit" type="default">{{config.font[34]}}</button> --> |
|||
</form> |
|||
</view> |
|||
<view class="timetitle">距离活动结束还有</view> |
|||
<view class='tui-countdown-content' wx:for="{{countDownList}}" wx:key="countDownList"> |
|||
<text class='tui-conutdown-box'>{{item.day}}</text>天 |
|||
<text class='tui-conutdown-box'>{{item.hou}}</text>时 |
|||
<text class='tui-conutdown-box'>{{item.min}}</text>分 |
|||
<text class='tui-conutdown-box tui-countdown-bg'>{{item.sec}}</text>秒 |
|||
</view> |
|||
<view> |
|||
<view class="newbtn"> |
|||
我要报名 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="index"> |
|||
<view class="head"> |
|||
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" style="width:750rpx;height:400rpx;display:block;overflow: hidden;"> |
|||
<swiper-item style="height:490rpx;"> |
|||
<image bindtap="imgjumpwxapp" data-img="1" src="{{data.picture}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture2!=''}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="2" src="{{data.picture2}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture3!=''}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="3" src="{{data.picture3}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture4!=''}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="8" src="{{data.picture4}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
<swiper-item style="height:490rpx;" wx:if="{{data.picture5!=''}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="9" src="{{data.picture5}}" style="height:400rpx;width:100%;display:block;overflow: hidden;"></image> |
|||
</swiper-item> |
|||
</swiper> |
|||
<block wx:if="{{data.ishbimg=='1'}}"> |
|||
<image bindtap="imgjumpwxapp" data-img="1" mode="widthFix" src="{{data.picture}}" style="width:100%;display:block;overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="2" mode="widthFix" src="{{data.picture2}}" style="width:100%;display:{{data.picture2=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="3" mode="widthFix" src="{{data.picture3}}" style="width:100%;display:{{data.picture3=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="8" mode="widthFix" src="{{data.picture4}}" style="width:100%;display:{{data.picture4=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
<image bindtap="imgjumpwxapp" data-img="9" mode="widthFix" src="{{data.picture5}}" style="width:100%;display:{{data.picture5=='0'?'none':'block'}};overflow: hidden;"></image> |
|||
</block> |
|||
<view class="statistics"> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.mall_sum}}</view> |
|||
<view>商场</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.dianzhang_num}}</view> |
|||
<view>店长</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.piao_num}}</view> |
|||
<view>总票数</view> |
|||
</view> |
|||
<view class="total"> |
|||
<view class="num" style="color:#fff;">{{data.liulan_num}}</view> |
|||
<view>浏览量</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class="index_datetop"></view> |
|||
<view class="index_btn2" wx:if="{{config.wxapptoisindex}}"> |
|||
<view bindtap="viewjump" data-topage="rule" style="color:#888;"> |
|||
<text class="iconfont icon-guize-"> {{config.font[4]}}</text> |
|||
</view> |
|||
<view bindtap="jumpwxapp" class="iconfont icon-biaoti" style="color:#888;" wx:if="{{config.wxapptoisindex}}"> {{config.wxapptotext}} |
|||
</view> |
|||
</view> |
|||
<view class="nav"> |
|||
<view class="nav-item {{item.id == data.nowNav ? 'active' : ''}}" bindtap="tabNav" data-types="{{item.id}}" wx:for="{{data.types}}" wx:key="{{index}}"> |
|||
{{item.name}} |
|||
</view> |
|||
</view> |
|||
<view class="list"> |
|||
<view class="mall_list"> |
|||
<view class="item" wx:for="{{data.mall_list}}" wx:key="index" bindtap="dianzhang" data-mall_id="{{item.id}}"> |
|||
<view class="info"> |
|||
<view class="top" style="background-color: rgba(0,0,0,0.3);"> B{{item.id}}号 {{item.name}}</view> |
|||
</view> |
|||
<image class="img" src="{{item.imgurl}}"></image> |
|||
<view> |
|||
<view class="mallbtn"> |
|||
{{item.name}} |
|||
</view> |
|||
</view> |
|||
<view class="orderfooter-info"> |
|||
<view class="orderfooter-info-item">店长:<text>{{item.dianzhang_num}}</text></view> |
|||
<view class="orderfooter-info-item">票数:<text>{{item.piao_num}}</text></view> |
|||
<view class="orderfooter-info-item">交易额:<text>{{item.jiaoyi}}</text></view> |
|||
<view class="orderfooter-info-item">浏览量:<text>{{item.liulan_num}}</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view wx:if="{{data.mall_list.length==0}}" style="text-align:center;padding:30px;">暂无商场</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,4 @@ |
|||
@import "../../resource/wxParse/wxParse.wxss"; |
|||
.timebox { |
|||
background-color: red; |
|||
} |
|||
@ -0,0 +1,145 @@ |
|||
<template name="voteranking"> |
|||
<view class="ranking"> |
|||
<view class="tab"> |
|||
<view class="tab-item {{data.tabs == 'shangcheng'?'active':''}}" bindtap="tab1" data-status="shangcheng">商城排行榜</view> |
|||
<view class="tab-item {{data.tabs == 'dianzhang'?'active':''}}" bindtap="tab1" data-status="dianzhang">店长排行榜</view> |
|||
</view> |
|||
<view class="tabtitle"> |
|||
<!-- <view class="tabtitle-item {{data.nowType == 'renqi' ? 'tabtitle-active':''}}" bindtap="tab" data-type="renqi">人气</view> |
|||
<view class="tabtitle-item {{data.nowType == 'yeji' ? 'tabtitle-active':''}}" bindtap="tab" data-type="yeji">业绩</view> |
|||
<view class="tabtitle-item {{data.nowType == 'hudong' ? 'tabtitle-active':''}}" bindtap="tab" data-type="hudong">互动</view> --> |
|||
<view class="tabtitle-item {{data.nowType == 'renqi' ? 'tabtitle-active':''}}" bindtap="tab" data-type="renqi">人气</view> |
|||
<view class="tabtitle-item {{data.nowType == 'yeji' ? 'tabtitle-active':''}}" bindtap="tab" data-type="yeji">信任</view> |
|||
<view class="tabtitle-item {{data.nowType == 'hudong' ? 'tabtitle-active':''}}" bindtap="tab" data-type="hudong">服务</view> |
|||
<view class="tabtitle-item {{data.nowType == 'zonghe' ? 'tabtitle-active':''}}" bindtap="tab" data-type="zonghe">综合</view> |
|||
</view> |
|||
<block wx:if="{{data.tabs == 'dianzhang'}}"> |
|||
<view class="topThree"> |
|||
<view class="huangguan" bindtap="detail" data-joinid="{{data.list[0].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/huangguan.png" class="bg"/> |
|||
<image src="{{data.list[0].image?data.list[0].image:'/we7/resource/images/zanwu.png'}}" class="avatar"/> |
|||
</view> |
|||
<view class="huangguan" style="margin-top: 30px;top:44%"> |
|||
<view style="color: #FCD012;text-align:center" class="piao"> |
|||
{{data.nowType == 'renqi'? data.list[0].pollcount : data.nowType == 'yeji'? data.list[0].jiaoyie:data.list[0].price}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '营业额':'礼物'}} |
|||
</view> |
|||
<view style="padding: 5px; border-radius: 15px; background: rgb(252, 208, 18); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;" class="name"> |
|||
{{data.list[0].username?data.list[0].username:'暂无'}} |
|||
</view> |
|||
<view style="text-align: center;" class="num">编号:{{data.list[0].id?data.list[0].id:'0'}}</view> |
|||
</view> |
|||
<view class="yin" bindtap="detail" data-joinid="{{data.list[1].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/yin.png" class="bg"/> |
|||
<image src="{{data.list[1].image?data.list[1].image:'/we7/resource/images/zanwu.png'}}" class="avatar" style="top:23px;"/> |
|||
</view> |
|||
<view class="yin" style="margin-top: 30px;top:50%;"> |
|||
<view style="color: #FCD012;text-align:center" class="piao"> |
|||
{{data.nowType == 'renqi'? data.list[1].pollcount : data.nowType == 'yeji'? data.list[1].jiaoyie:data.list[1].price}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '营业额':'礼物'}} |
|||
</view> |
|||
<view style="padding: 5px; border-radius: 15px; background: rgb(197, 211, 227); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;" class="name"> |
|||
{{data.list[1].username?data.list[1].username:'暂无'}} |
|||
</view> |
|||
<view style="text-align: center;" class="num">编号:{{data.list[1].id?data.list[1].id:'0'}}</view> |
|||
</view> |
|||
<view class="tong" bindtap="detail" data-joinid="{{data.list[2].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/tong.png" class="bg"/> |
|||
<image src="{{data.list[2].image?data.list[2].image:'/we7/resource/images/zanwu.png'}}" class="avatar" style="top:21px;"/> |
|||
</view> |
|||
<view class="tong" style="margin-top: 30px;top:53%"> |
|||
<view style="color: #FCD012;text-align:center" class="piao"> |
|||
{{data.nowType == 'renqi'? data.list[2].pollcount : data.nowType == 'yeji'? data.list[2].jiaoyie:data.list[2].price}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '营业额':'礼物'}} |
|||
</view> |
|||
<view style="padding: 5px; border-radius: 15px; background: rgb(249, 167, 113); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;" class="name"> |
|||
{{data.list[2].username?data.list[2].username:'暂无'}} |
|||
</view> |
|||
<view style="text-align: center;" class="num">编号:{{data.list[2].id?data.list[2].id:'0'}}</view> |
|||
</view> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/paihang.png" style="width:100%"/> |
|||
</view> |
|||
<view class="table"> |
|||
<view class="tr title"> |
|||
<!-- <view class="td1"></view> --> |
|||
<view class="td2">{{config.font[27]}}</view> |
|||
<view class="td3">{{config.font[28]}}</view> |
|||
<view class="td4">{{config.font[29]}}</view> |
|||
<view class="td5">{{config.font[30]}}</view> |
|||
<view class="td6">{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '营业额':'礼物'}}</view> |
|||
</view> |
|||
<view bindtap="detail" class="tr" data-joinid="{{item.id}}" style="{{item.uid==memberinfo.id?'color:'+config.buttonbgcolor:''}}" wx:for="{{data.list}}" wx:key="index" wx:if="{{index>2}}"> |
|||
<!-- <view class="td1"> |
|||
<image class="fpimg" src="../../resource/icon/ranking{{index+1}}.png" wx:if="{{index<3}}"></image> |
|||
</view> --> |
|||
<view class="td2">{{index+1}}</view> |
|||
<view class="td3"> |
|||
<image class="fmtimg" src="{{item.image}}"></image> |
|||
</view> |
|||
<view class="td4">{{item.id}}</view> |
|||
<view class="td5">{{item.username}}</view> |
|||
<view class="td6">{{data.nowType == 'renqi'? item.pollcount : data.nowType == 'yeji'? item.jiaoyie:item.price}}</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<block wx:if="{{data.tabs == 'shangcheng'}}"> |
|||
<view class="topThree"> |
|||
<view class="huangguan" style="top:10%" bindtap="dianzhang" data-mall_id="{{data.mall_list[0].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/huangguan.png" class="bg"/> |
|||
<image src="{{data.mall_list[0].imgurl?data.mall_list[0].imgurl:'/we7/resource/images/zanwu.png'}}" class="avatar"/> |
|||
</view> |
|||
<view class="huangguan" style="margin-top: 30px;top:44%"> |
|||
<view style="text-align:center;font-size: 30px">1</view> |
|||
<view style="text-align: center;" class="num"> |
|||
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '营业额':'客流量'}}:{{data.nowType == 'renqi'? data.mall_list[0].pollcount : data.nowType == 'yeji' ? data.mall_list[0].jiaoyie:data.mall_list[0].views}} |
|||
</view> |
|||
</view> |
|||
<view class="yin" style="top:29%" bindtap="dianzhang" data-mall_id="{{data.mall_list[1].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/yin.png" class="bg"/> |
|||
<image src="{{data.mall_list[1].imgurl?data.mall_list[1].imgurl:'/we7/resource/images/zanwu.png'}}" class="avatar" style="top:23px;"/> |
|||
</view> |
|||
<view class="yin" style="margin-top: 30px;top:59%;"> |
|||
<view style="text-align:center;font-size: 20px;">2</view> |
|||
<view style="text-align: center;" class="num"> |
|||
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '营业额':'客流量'}}:{{data.nowType == 'renqi'? data.mall_list[1].pollcount : data.nowType == 'yeji' ? data.mall_list[1].jiaoyie:data.mall_list[1].views}} |
|||
</view> |
|||
</view> |
|||
<view class="tong" style="top:40%" bindtap="dianzhang" data-mall_id="{{data.mall_list[2].id}}"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/tong.png" class="bg"/> |
|||
<image src="{{data.mall_list[2].imgurl?data.mall_list[2].imgurl:'/we7/resource/images/zanwu.png'}}" class="avatar" style="top:21px;"/> |
|||
</view> |
|||
<view class="tong" style="margin-top: 30px;top:68%"> |
|||
<view style="text-align:center">3</view> |
|||
<view style="text-align: center;" class="num"> |
|||
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '营业额':'客流量'}}:{{data.nowType == 'renqi'? data.mall_list[2].pollcount : data.nowType == 'yeji' ? data.mall_list[2].jiaoyie:data.mall_list[2].views}} |
|||
</view> |
|||
</view> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/paihang2.png" style="width:100%"/> |
|||
</view> |
|||
<view class="table"> |
|||
<!-- <view style="text-align:center"> |
|||
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/line.png" |
|||
style="width: 96%;height: 36px;position:absolute"></image> |
|||
</view> --> |
|||
<view style="box-shadow: 1px 1px 5px #888888;width:92%;margin: 0 auto;"> |
|||
<view class="tr title" |
|||
style="background-color: #F7F7F7;text-align: center;height: 45px;line-height: 45px;"> |
|||
<!-- <view class="td1"></view> --> |
|||
<view class="td2" style="width:18%;">名次</view> |
|||
<view class="td3" style="width:64%;">商城</view> |
|||
<view class="td4" style="width:18%;"> |
|||
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '营业额':'客流量'}} |
|||
</view> |
|||
</view> |
|||
<view bindtap="dianzhang" class="tr" data-mall_id="{{item.id}}" style="{{item.uid==memberinfo.id?'color:'+config.buttonbgcolor:''}}" wx:for="{{data.mall_list}}" wx:key="index" wx:if="{{index>2}}"> |
|||
<view class="td2" style="width:18%;">{{index+1}}</view> |
|||
<view class="td3" style="width:64%;display:flex;align-items:center"> |
|||
<image class="fmtimg" src="{{item.imgurl}}"></image> |
|||
<view class="names">{{item.name}}</view> |
|||
</view> |
|||
<view class="td4" style="width:18%;"> |
|||
{{data.nowType == 'renqi'? item.pollcount : data.nowType == 'yeji' ? item.jiaoyie:item.views}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,9 @@ |
|||
<template name="voterule"> |
|||
<import src="../../resource/wxParse/wxParse.wxml"></import> |
|||
<view class="rule"> |
|||
<view class="tr tabtitle" style="color:{{config.buttonbgcolor}}">{{config.font[77]}}</view> |
|||
<view class="content"> |
|||
<template is="wxParse" data="{{wxParseData:data}}"></template> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,9 @@ |
|||
Page({ |
|||
data: { |
|||
toView: "red", |
|||
scrollTop: 100 |
|||
}, |
|||
onPullDownRefresh: function(o) { |
|||
console.log("111"); |
|||
} |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
<view class="section"> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
<view id="blue" style="height:300px;">d</view> |
|||
</view> |
|||
@ -0,0 +1,78 @@ |
|||
// pages/web-view/index.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
url: '', |
|||
title: '' |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
var _this = this; |
|||
const eventChannel = this.getOpenerEventChannel() |
|||
//eventChannel.emit('acceptDataFromOpenedPage', {data: 'test'});
|
|||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
|||
eventChannel.on('acceptDataFromOpenerPage', function(data) { |
|||
_this.setData({ |
|||
url: data.url |
|||
}) |
|||
wx.setNavigationBarTitle({ |
|||
title: data.title, |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
<!--pages/web-view/index.wxml--> |
|||
<web-view src="{{url}}"></web-view> |
|||
@ -0,0 +1 @@ |
|||
/* qf_happyvote/pages/web-view/index.wxss */ |
|||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 317 B |
|
After Width: | Height: | Size: 665 B |
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 718 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 893 B |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
@ -0,0 +1,624 @@ |
|||
function t(t) { |
|||
r.util.request({ |
|||
url: "entry/wxapp/initpage", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
listlimit: t.data.index.limit, |
|||
uid: t.data.memberinfo.id |
|||
}, |
|||
success: function(i) { |
|||
var e = i.data.data, o = t.data.index; |
|||
t.mall(e.voteid,e.uid) |
|||
wx.getSystemInfo({ |
|||
success: function(t) { |
|||
o.width = t.windowWidth / 2.213903743315508; |
|||
} |
|||
}), o.title = e.title, o.picture = e.picture, o.picture2 = "" == e.picture2 ? "0" : e.picture2, |
|||
o.picture3 = "" == e.picture3 ? "0" : e.picture3, o.picture4 = "" == e.picture4 ? "0" : e.picture4, |
|||
o.picture5 = "" == e.picture5 ? "0" : e.picture5, o.joincount = e.joincount, o.votecount = e.votecount, |
|||
o.accesscount = e.accesscount, o.starttime = e.starttime, o.endtime = e.endtime, |
|||
o.strtime = e.strtime, o.ischeck = e.ischeck, o.ishbimg = e.ishbimg, o.adfixed = "" == e.adfixed ? "0" : e.adfixed, |
|||
o.advote = "" == e.advote ? "0" : e.advote, o.adjoin = "" == e.adjoin ? "0" : e.adjoin, |
|||
o.gifts = e.gifts, o.giftid = 1, o.newslist = e.newslist; |
|||
for (s = 0; s < e.newslist.length; s++) if (o.size.news.left <= o.size.news.right) { |
|||
o.newslist[s].int = 1; |
|||
n = o.newslist[s].size[1] * (o.width / o.newslist[s].size[0]); |
|||
o.size.news.left = Number(o.size.news.left) + Number(n); |
|||
} else { |
|||
o.newslist[s].int = 2; |
|||
n = o.newslist[s].size[1] * (o.width / o.newslist[s].size[0]); |
|||
o.size.news.right = Number(o.size.news.right) + Number(n); |
|||
} |
|||
o.hotlist = e.hotlist; |
|||
for (var s = 0; s < e.hotlist.length; s++) if (o.size.hot.left <= o.size.hot.right) { |
|||
o.hotlist[s].int = 1; |
|||
n = o.hotlist[s].size[1] * (o.width / o.hotlist[s].size[0]); |
|||
o.size.hot.left = Number(o.size.hot.left) + Number(n); |
|||
} else { |
|||
o.hotlist[s].int = 2; |
|||
var n = o.hotlist[s].size[1] * (o.width / o.hotlist[s].size[0]); |
|||
o.size.hot.right = Number(o.size.hot.right) + Number(n); |
|||
} |
|||
if ("0" != o.adfixed) try { |
|||
"" == wx.getStorageSync("0424") && (o.isadindex = !0, wx.setStorageSync("0424", "yes")); |
|||
} catch (t) {} else o.adfixed = o.advote, o.isadindex = !1; |
|||
"0" != o.adjoin && (o.isadjoin = !0); |
|||
var d = e.newslist.length; |
|||
o.start = d, d < o.limit && (o.pulluploading = !1), wx.setNavigationBarTitle({ |
|||
title: o.title |
|||
}), wx.setNavigationBarColor({ |
|||
frontColor: "#ffffff", |
|||
backgroundColor: e.footbgcolor, |
|||
animation: { |
|||
duration: 400, |
|||
timingFunc: "easeIn" |
|||
} |
|||
}), l.wxParse("rule", "html", e.introduce, t, 5); |
|||
var r = t.data.rule.nodes, u = t.data.config; |
|||
u.footbgcolor = e.footbgcolor, u.footcolor = e.footcolor, u.footsearchbgcolor = e.footsearchbgcolor, |
|||
u.footsearchcolor = e.footsearchcolor, u.buttonbgcolor = e.buttonbgcolor, u.buttoncolor = e.buttoncolor, |
|||
u.isvotegiftpop = 1 == e.isvotegiftpop, u.wxappsharetitle = e.wxappsharetitle, u.wxappshareimage = e.wxappshareimage, |
|||
u.wxappdetailsharetitle = e.wxappdetailsharetitle, u.wxapptotext = e.wxapptotext, |
|||
u.wxapptoappid = e.wxapptoappid, u.wxapptopath = e.wxapptopath, u.wxapptoisindex = 1 == e.wxapptoisindex, |
|||
u.wxapptoisdetail = 1 == e.wxapptoisdetail, u.isjoin = 1 == e.isjoin, u.isshare = 1 == e.isshare, |
|||
u.isposter = 1 == e.isposter, u.isupdate = 1 == e.isupdate, u.isimgs = 1 == e.isimgs, |
|||
u.appid1 = e.imgappid, u.path1 = e.imgpath, u.appid2 = e.imgappid2, u.path2 = e.imgpath2, |
|||
u.appid3 = e.imgappid3, u.path3 = e.imgpath3, u.appid4 = e.imgappid4, u.path4 = e.imgpath4, |
|||
u.appid5 = e.imgappid5, u.path5 = e.imgpath5, u.ismusic = 1 == e.ismusic, u.isvideo = 1 == e.isvideo, |
|||
u.isgift = 1 == e.isgift, u.isre = 1 == e.isre, u.adunit = e.adunit, u.adfixedappid = e.adfixedappid, |
|||
u.adfixedpath = e.adfixedpath, u.advoteappid = e.advoteappid, u.advotepath = e.advotepath, |
|||
u.adjoinappid = e.adjoinappid, u.adjoinpath = e.adjoinpath, u.isgiftjoin = e.isgiftjoin, |
|||
console.log(e), u.font = e.font.split("|"), console.log(3), t.setData({ |
|||
voteid: e.voteid, |
|||
config: u, |
|||
index: o, |
|||
rule: r, |
|||
uid: e.uid, |
|||
showpage: 'mall' |
|||
}), "" != t.data.joinid && t.data.joinid > 0 && a(t, t.data.joinid); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function a(t, a) { |
|||
r.util.request({ |
|||
url: "entry/wxapp/joininfo", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
joinid: a |
|||
}, |
|||
success: function(a) { |
|||
console.log(a.data), e(t, a.data.data); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function i(a, e, o, s, n, d) { |
|||
var l = s[n]; |
|||
if (n == s.length) return wx.hideLoading(), wx.hideNavigationBarLoading(), e.voteid = a.data.voteid, |
|||
e.ischeck = a.data.index.ischeck, e.images = JSON.stringify(d), a.data.config.isvideo ? e.video = a.data.join.video[0].url : e.video = "", |
|||
a.data.config.ismusic ? e.music = a.data.join.music[0].url : e.music = "", e.uid = a.data.memberinfo.id, |
|||
e.avatar = a.data.memberinfo.avatar, a.setData({ |
|||
showpage: "joinok" |
|||
}),console.log(e), void r.util.request({ |
|||
url: "entry/wxapp/join", |
|||
data: e, |
|||
success: function(i) { |
|||
console.log(1000) |
|||
var e = i.data.data, o = { |
|||
id: e.id, |
|||
checkstate: e.checkstate |
|||
}; |
|||
a.setData({ |
|||
joinok: o, |
|||
showpage: "joinok", |
|||
footerindex: 1 |
|||
}), 2 == e.checkstate && t(a); |
|||
} |
|||
}); |
|||
wx.uploadFile({ |
|||
url: o, |
|||
filePath: l, |
|||
name: "image", |
|||
success: function(t) { |
|||
n += 1; |
|||
var r = JSON.parse(t.data); |
|||
d.push('https://xcx.zgzmdz.com/attachment/'+r.data), console.log("第" + n + "张:"), i(a, e, o, s, n, d); |
|||
}, |
|||
fail: function(t) { |
|||
console.log("第" + n + "张:上传失败"), console.log(t); |
|||
n += 1; |
|||
d.push(l),i(a, e, o, s, n, d); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function e(t, a) { |
|||
var i = t.data.detail; |
|||
l.wxParse("detail.resume", "html", a.resume, t, 5), i.id = a.id, i.username = a.username, |
|||
i.images = a.images, i.telephone = a.telephone, i.pollcount = a.pollcount, i.gifts = a.gifts, |
|||
i.giftrecords = a.giftrecords, i.ranking = a.ranking, i.video = a.video, i.music = a.music, |
|||
i.reply = a.reply, i.haibao = !1, i.isreply = !1, i.imgurl = "", i.imgbg = "0", |
|||
i.font = "给TA投票", i.topage = "1", t.setData({ |
|||
detail: i, |
|||
showpage: "detail" |
|||
}); |
|||
} |
|||
|
|||
function o(t, a) { |
|||
var i = t.data.detail; |
|||
i.id = a.id, i.username = a.username, i.images = a.images, i.resume = a.resume, |
|||
i.telephone = a.telephone, i.pollcount = a.pollcount, i.gifts = a.gifts, i.giftrecords = a.giftrecords, |
|||
i.ranking = a.ranking, i.video = a.video, i.music = a.music, i.reply = a.reply, |
|||
i.haibao = !1, i.isreply = !1, i.imgurl = "", i.imgbg = "0", i.font = "修改信息", i.topage = "2", |
|||
t.setData({ |
|||
detail: i, |
|||
showpage: "detail" |
|||
}); |
|||
} |
|||
|
|||
function s(t) { |
|||
return t = t.replace(/-/g, "/"), new Date(t); |
|||
} |
|||
|
|||
function n(t) { |
|||
var a = new Date(), i = s(t.data.index.starttime), e = s(t.data.index.endtime); |
|||
return a < i ? -1 : a > e ? -2 : 0; |
|||
} |
|||
|
|||
function d(t) { |
|||
var a = t.data.detail; |
|||
a.giftbox = !a.giftbox, t.setData({ |
|||
detail: a |
|||
}); |
|||
} |
|||
|
|||
var r = getApp(), l = require("../../resource/wxParse/wxParse.js"); |
|||
|
|||
module.exports = { |
|||
initpage: t, |
|||
getjoininfo: a, |
|||
getlistmore:function(t){ |
|||
wx.showLoading({ |
|||
title: "加载中" |
|||
}); |
|||
var a = t.data.index; |
|||
r.util.request({ |
|||
url: "entry/wxapp/MallJoinList", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
mallid: t.data.nowMallId, |
|||
start: t.data.page, |
|||
limit: a.limit |
|||
}, |
|||
success: function(i) { |
|||
wx.hideLoading(); |
|||
t.setData({ |
|||
'index.newslist': t.data.index.newslist.concat(i.data.data.newlist), |
|||
'index.hotlist': t.data.index.hotlist.concat(i.data.data.hotlist), |
|||
}) |
|||
} |
|||
}); |
|||
}, |
|||
getlist: function(t) { |
|||
wx.showLoading({ |
|||
title: "加载中" |
|||
}); |
|||
var a = t.data.index; |
|||
r.util.request({ |
|||
url: "entry/wxapp/list", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
start: a.start, |
|||
limit: a.limit |
|||
}, |
|||
success: function(i) { |
|||
wx.hideLoading(); |
|||
var e = i.data.data.newslist.length; |
|||
if (e < a.limit && (a.pulluploading = !1), e > 0) { |
|||
for (a.start = a.newslist.length + e, s = 0; s < e; s++) a.size.news.left <= a.size.news.right ? (i.data.data.newslist[s].int = 1, |
|||
o = i.data.data.newslist[s].size[1] * (a.width / i.data.data.newslist[s].size[0]), |
|||
a.size.news.left = Number(a.size.news.left) + Number(o)) : (i.data.data.newslist[s].int = 2, |
|||
o = i.data.data.newslist[s].size[1] * (a.width / i.data.data.newslist[s].size[0]), |
|||
a.size.news.right = Number(a.size.news.right) + Number(o)); |
|||
for (s = 0; s < e; s++) if (a.size.hot.left <= a.size.hot.right) i.data.data.hotlist[s].int = 1, |
|||
o = i.data.data.hotlist[s].size[1] * (a.width / i.data.data.hotlist[s].size[0]), |
|||
a.size.hot.left = Number(a.size.hot.left) + Number(o); else { |
|||
i.data.data.hotlist[s].int = 2; |
|||
var o = i.data.data.hotlist[s].size[1] * (a.width / i.data.data.hotlist[s].size[0]); |
|||
a.size.hot.right = Number(a.size.hot.right) + Number(o); |
|||
} |
|||
for (var s = 0; s < e; s++) a.newslist.push(i.data.data.newslist[s]), a.hotlist.push(i.data.data.hotlist[s]); |
|||
} |
|||
a.ispulluploading = !1, t.setData({ |
|||
index: a |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
search: function(t, a) { |
|||
var i = t.data.search; |
|||
"" != a.joinid ? r.util.request({ |
|||
url: "entry/wxapp/search", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
joinid: a.joinid |
|||
}, |
|||
success: function(a) { |
|||
e(t, a.data.data), i.show = !1, t.setData({ |
|||
search: i |
|||
}); |
|||
} |
|||
}) : r.util.message("作品编号不能为空", "", "error"); |
|||
}, |
|||
getrankings: function(t,type) { |
|||
r.util.request({ |
|||
url: "entry/wxapp/rankings", |
|||
data: { |
|||
start: 0, |
|||
voteid: t.data.voteid, |
|||
type: type || 'renqi', |
|||
limit: t.data.ranking.limit |
|||
}, |
|||
success: function(a) { |
|||
var i = t.data.ranking; |
|||
i.list = a.data.data, i.start = "20", t.setData({ |
|||
ranking: i, |
|||
showpage: "ranking", |
|||
footerindex: 3 |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
join: function(t, a) { |
|||
var e = n(t); |
|||
if (-1 != e) if (-2 != e) { |
|||
for (var o = t.data.join, s = [], d = o.images, l = 0; l < d.length; l++) d[l].isadd && s.push(d[l].src); |
|||
var u = !0; |
|||
if ("" == a.username.trim() ? (o.validates.username = !0, u = !1) : o.validates.username = !1, |
|||
s.length <= 0 ? (o.validates.image = !0, u = !1) : o.validates.image = !1, |
|||
// "" == o.video[0].src && t.data.config.isvideo ? (o.validates.video = !0, u = !1) : o.validates.video = !1,
|
|||
"" == o.music[0].src && t.data.config.ismusic ? (o.validates.music = !0, u = !1) : o.validates.music = !1, |
|||
"" == a.resume.trim() ? (o.validates.resume = !0, u = !1) : o.validates.resume = !1, |
|||
u) if (wx.showNavigationBarLoading(), r.util.showLoading(), t.data.config.ismusic) { |
|||
var c = r.util.getWe7urls("entry/wxapp/uploadmusic"), p = t.data.join.music[0].src; |
|||
wx.uploadFile({ |
|||
url: c, |
|||
filePath: p, |
|||
name: "music", |
|||
formData: { |
|||
voteid: t.data.voteid |
|||
}, |
|||
success: function(e) { |
|||
console.log(2213) |
|||
var o = JSON.parse(e.data), n = t.data.join; |
|||
if (n.music[0].url = o.data, t.setData({ |
|||
join: n |
|||
}), t.data.config.isvideo) { |
|||
var d = r.util.getWe7urls("entry/wxapp/uploadvideo"), l = t.data.join.video[0].src; |
|||
wx.uploadFile({ |
|||
url: d, |
|||
filePath: l, |
|||
name: "video", |
|||
formData: { |
|||
voteid: t.data.voteid |
|||
}, |
|||
success: function(e) { |
|||
var o = JSON.parse(e.data), n = t.data.join; |
|||
n.video[0].url = o.data, t.setData({ |
|||
join: n |
|||
}); |
|||
var d = r.util.getWe7urls("entry/wxapp/uploadimage"); |
|||
i(t, a, d, s, 0, []); |
|||
}, |
|||
fail: function(a) { |
|||
console.log("上传失败"), console.log(a), console.log(t); |
|||
} |
|||
}); |
|||
} else { |
|||
var u = r.util.getWe7urls("entry/wxapp/uploadimage"); |
|||
i(t, a, u, s, 0, []); |
|||
} |
|||
}, |
|||
fail: function(a) { |
|||
console.log("上传失败"), console.log(a), console.log(t); |
|||
} |
|||
}); |
|||
} else if (t.data.join.video[0].isadd) { |
|||
console.log(321) |
|||
var g = r.util.getWe7urls("entry/wxapp/uploadvideo"), f = t.data.join.video[0].src; |
|||
wx.uploadFile({ |
|||
url: g, |
|||
filePath: f, |
|||
name: "video", |
|||
formData: { |
|||
voteid: t.data.voteid |
|||
}, |
|||
success: function(e) { |
|||
var o = JSON.parse(e.data), n = t.data.join; |
|||
n.video[0].url = o.data, t.setData({ |
|||
join: n |
|||
}); |
|||
var d = r.util.getWe7urls("entry/wxapp/uploadimage"); |
|||
i(t, a, d, s, 0, []); |
|||
}, |
|||
fail: function(a) { |
|||
console.log("上传失败"), console.log(a), console.log(t); |
|||
} |
|||
}); |
|||
} else { |
|||
var m = r.util.getWe7urls("entry/wxapp/uploadimage"); |
|||
i(t, a, m, s, 0, []); |
|||
console.log(123) |
|||
} else t.setData({ |
|||
join: o |
|||
}); |
|||
} else r.util.message("活动已经结束,不能报名", "error"); else r.util.message("活动还未开始,不能报名", "error"); |
|||
}, |
|||
vote: function(t, a) { |
|||
var i = n(t); |
|||
console.log(t) |
|||
-1 != i ? -2 != i ? r.util.request({ |
|||
url: "entry/wxapp/vote", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
joinid: a, |
|||
uid: t.data.memberinfo.id, |
|||
nickname: t.data.memberinfo.nickname, |
|||
avatar: t.data.memberinfo.avatar |
|||
}, |
|||
success: function(i) { |
|||
var e = t.data.index; |
|||
e.votecount = Number(e.votecount) + 1, "0" != e.advote && (e.isadindex = !0); |
|||
var o = e[e.showlist + "list"]; |
|||
if (o.length > 0) for (var s = 0; s < o.length; s++) o[s].id == a && (o[s].pollcount = Number(o[s].pollcount) + 1); |
|||
var n = t.data.detail; |
|||
n.pollcount = Number(n.pollcount) + 1, t.data.config.isgift && t.data.config.isvotegiftpop && d(t), |
|||
t.setData({ |
|||
index: e, |
|||
detail: n |
|||
}), r.util.message("投票成功", "", "success"); |
|||
}, |
|||
fail(error){ |
|||
console.log(error) |
|||
if(error.data.errno == -1){ |
|||
wx.showModal({ |
|||
title: error.data.message, |
|||
showCancel: false |
|||
}) |
|||
} else { |
|||
t.setData({ |
|||
'config.userlogin': '1' |
|||
}) |
|||
} |
|||
} |
|||
}) : r.util.message("活动已经结束", "error") : r.util.message("活动还未开始", "error"); |
|||
}, |
|||
sendgift: function(t, a, i) { |
|||
var e = t.data.voteid; |
|||
r.util.request({ |
|||
url: "entry/wxapp/wxpay", |
|||
data: { |
|||
voteid: e, |
|||
joinid: a, |
|||
giftid: i, |
|||
uid: t.data.memberinfo.id, |
|||
op: "sendgift" |
|||
}, |
|||
success: function(o) { |
|||
var s = o.data.data; |
|||
wx.requestPayment({ |
|||
timeStamp: s.timeStamp, |
|||
nonceStr: s.nonceStr, |
|||
package: s.package, |
|||
signType: s.signType, |
|||
paySign: s.paySign, |
|||
success: function(o) { |
|||
o.data, r.util.request({ |
|||
url: "entry/wxapp/wxpay", |
|||
data: { |
|||
voteid: e, |
|||
joinid: a, |
|||
giftid: i, |
|||
op: s.to, |
|||
uid: t.data.memberinfo.id, |
|||
nickname: t.data.memberinfo.nickname, |
|||
avatar: t.data.memberinfo.avatar |
|||
}, |
|||
success: function(i) { |
|||
var e = t.data.detail; |
|||
e.giftrecords; |
|||
var o = i.data.data, s = { |
|||
avatar: o.avatar, |
|||
createtime: o.createtime, |
|||
giftimage: o.giftimage, |
|||
giftname: o.giftname, |
|||
giftprice: o.giftprice, |
|||
nickname: o.nickname, |
|||
pollcount: o.pollcount |
|||
}; |
|||
e.giftrecords.push(s); |
|||
var n = t.data.index; |
|||
n.votecount = Number(n.votecount) + Number(o.pollcount); |
|||
var d = n[n.showlist + "list"]; |
|||
if (d.length > 0) for (var l = 0; l < d.length; l++) d[l].id == a && (console.log("找到了"), |
|||
d[l].pollcount = Number(d[l].pollcount) + Number(o.pollcount)); |
|||
e.pollcount = Number(e.pollcount) + Number(o.pollcount), t.setData({ |
|||
index: n, |
|||
detail: e |
|||
}), r.util.message("赠送成功", "", "success"); |
|||
} |
|||
}); |
|||
}, |
|||
fail: function(t) { |
|||
if (console.log("fail"), console.log(t), "requestPayment:fail cancel" != t.errMsg) { |
|||
var a = t.errMsg.replace("requestPayment:fail", ""); |
|||
r.util.message(a, "error"); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
tojoinpage: function(t) { |
|||
var a = t.data.detail; |
|||
a.giftbox = !0, t.setData({ |
|||
detail: a |
|||
}), r.util.request({ |
|||
url: "entry/wxapp/myjoininfo", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
uid: t.data.memberinfo.id |
|||
}, |
|||
success: function(a) { |
|||
var i = a.data.data, o = "join"; |
|||
if (i != [] && 2 == i.checkstate) e(t, i), o = "detail"; else if (i != [] && 1 == i.checkstate) o = "checking"; else { |
|||
var s = t.data.join, d = n(t); |
|||
-1 == d ? (s.subbtn.isdisabled = !0, s.subbtn.text = "活动还未开始") : -2 == d ? (s.subbtn.isdisabled = !0, |
|||
s.subbtn.text = "活动已经结束") : (s.subbtn.isdisabled = !1, s.subbtn.text = "确认提交"), |
|||
0 == t.data.config.isjoin && (s.subbtn.isdisabled = !0, s.subbtn.text = "报名还未开启"), |
|||
t.setData({ |
|||
join: s |
|||
}); |
|||
} |
|||
t.setData({ |
|||
showpage: o, |
|||
footerindex: 2 |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
mytojoinpage: function(t) { |
|||
var a = t.data.detail; |
|||
a.giftbox = !0, t.setData({ |
|||
detail: a |
|||
}), r.util.request({ |
|||
url: "entry/wxapp/myjoininfo", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
uid: t.data.memberinfo.id |
|||
}, |
|||
success: function(a) { |
|||
var i = a.data.data, e = "join"; |
|||
if (i != [] && 2 == i.checkstate) console.log(i), o(t, i), e = "detail"; else if (i != [] && 1 == i.checkstate) e = "checking"; else { |
|||
var s = t.data.join, d = n(t); |
|||
-1 == d ? (s.subbtn.isdisabled = !0, s.subbtn.text = "活动还未开始") : -2 == d ? (s.subbtn.isdisabled = !0, |
|||
s.subbtn.text = "活动已经结束") : (s.subbtn.isdisabled = !1, s.subbtn.text = "确认提交"), |
|||
0 == t.data.config.isjoin && (s.subbtn.isdisabled = !0, s.subbtn.text = "报名还未开启"), |
|||
t.setData({ |
|||
join: s |
|||
}); |
|||
} |
|||
console.log(i) |
|||
var mallName = null |
|||
var storeName = null |
|||
var typesName = null |
|||
var images = t.data.join.images |
|||
for( var w = 0; w < i.types.length; w++ ){ |
|||
if(i.types[w].id == i.mall_type ){ |
|||
typesName = i.types[w].name |
|||
} |
|||
} |
|||
for( var l = 0; l < i.mall_list.length; l++ ){ |
|||
if(i.mall_list[l].id == i.mall_id ){ |
|||
mallName = i.mall_list[l].name |
|||
} |
|||
} |
|||
for( var p = 0; p < i.store_types.length; p++ ){ |
|||
if( i.store_types[p].id == i.store_type ){ |
|||
storeName = i.store_types[p].name |
|||
} |
|||
} |
|||
for( var img = 0; img< i.images.length; img++ ){ |
|||
images[img].isadd = true; |
|||
images[img].src = i.images[img] |
|||
} |
|||
t.setData({ |
|||
showpage: e, |
|||
'join.joinInfo': i, |
|||
'join.mallId': i.mall_id, |
|||
'join.mallName': mallName, |
|||
'join.storeId': i.store_type, |
|||
'join.storeName': storeName, |
|||
'join.typesId':i.mall_type, |
|||
'join.region': i.mall_area || [], |
|||
'join.typesName': typesName, |
|||
'join.images': images, |
|||
footerindex: 2 |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
escape2Html: function(t) { |
|||
console.log(t); |
|||
var a = { |
|||
"&": "&", |
|||
"<": "<", |
|||
">": ">", |
|||
""": '"', |
|||
"'": "'", |
|||
"/": "/" |
|||
}; |
|||
return t.replace(/&(amp|lt|gt|quot|#39|#x2F);/gi, function(t, i) { |
|||
return a[i]; |
|||
}); |
|||
}, |
|||
getranking: function(t,type) { |
|||
wx.showLoading({ |
|||
title: "加载中" |
|||
}), r.util.request({ |
|||
url: "entry/wxapp/rankings", |
|||
data: { |
|||
start: t.data.ranking.start, |
|||
voteid: t.data.voteid, |
|||
type: type || 'renqi', |
|||
limit: t.data.ranking.limit |
|||
}, |
|||
success: function(a) { |
|||
for (var i = t.data.ranking, e = 0; e < a.data.data.length; e++) i.list.push(a.data.data[e]); |
|||
i.start = Number(i.start) + 20, i.ispulluploading = !1, t.setData({ |
|||
ranking: i |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
giftbox: d, |
|||
haibao: function(t, a) { |
|||
var i = t.data.detail; |
|||
i.haibao ? (i.haibao = !1, t.setData({ |
|||
detail: i |
|||
})) : r.util.request({ |
|||
url: "entry/wxapp/CreatePoster", |
|||
data: { |
|||
voteid: t.data.voteid, |
|||
joinid: a |
|||
}, |
|||
success: function(a) { |
|||
console.log(a.data.data), i.imgurl = a.data.data, i.haibao = !0, t.setData({ |
|||
detail: i |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
reply: function(t, a, i) { |
|||
var e = t.data.voteid; |
|||
r.util.request({ |
|||
url: "entry/wxapp/Reply", |
|||
data: { |
|||
voteid: e, |
|||
joinid: a, |
|||
content: i, |
|||
uid: t.data.memberinfo.id, |
|||
op: "add", |
|||
nickname: t.data.memberinfo.nickname, |
|||
avatar: t.data.memberinfo.avatar |
|||
}, |
|||
success: function(a) { |
|||
var i = t.data.detail; |
|||
i.isreply = !1, i.reply.push(a.data.data), t.setData({ |
|||
detail: i |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}; |
|||
@ -0,0 +1 @@ |
|||
module.exports = function() {}; |
|||
@ -0,0 +1,103 @@ |
|||
function e(e) { |
|||
for (var t = {}, r = e.split(","), s = 0; s < r.length; s++) t[r[s]] = !0; |
|||
return t; |
|||
} |
|||
|
|||
function t(e) { |
|||
return e.replace(/<\?xml.*\?>\n/, "").replace(/<.*!doctype.*\>\n/, "").replace(/<.*!DOCTYPE.*\>\n/, ""); |
|||
} |
|||
|
|||
function r(e) { |
|||
return e.replace(/\r?\n+/g, "").replace(/<!--.*?-->/gi, "").replace(/\/\*.*?\*\//gi, "").replace(/[ ]+</gi, "<"); |
|||
} |
|||
|
|||
function s(e) { |
|||
var t = []; |
|||
if (0 == n.length || !i) return (d = {}).node = "text", d.text = e, s = [ d ]; |
|||
e = e.replace(/\[([^\[\]]+)\]/g, ":$1:"); |
|||
for (var r = new RegExp("[:]"), s = e.split(r), a = 0; a < s.length; a++) { |
|||
var l = s[a], d = {}; |
|||
i[l] ? (d.node = "element", d.tag = "emoji", d.text = i[l], d.baseSrc = o) : (d.node = "text", |
|||
d.text = l), t.push(d); |
|||
} |
|||
return t; |
|||
} |
|||
|
|||
var a = "https", n = "", o = "", i = {}, l = require("./wxDiscode.js"), d = require("./htmlparser.js"), c = (e("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), |
|||
e("br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video")), u = e("abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), p = e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); |
|||
|
|||
e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), |
|||
e("wxxxcode-style,script,style,view,scroll-view,block"); |
|||
|
|||
module.exports = { |
|||
html2json: function(e, n) { |
|||
e = r(e = t(e)), e = l.strDiscode(e); |
|||
var o = [], i = { |
|||
node: n, |
|||
nodes: [], |
|||
images: [], |
|||
imageUrls: [] |
|||
}, g = 0; |
|||
return d(e, { |
|||
start: function(e, t, r) { |
|||
var s = { |
|||
node: "element", |
|||
tag: e |
|||
}; |
|||
if (0 === o.length ? (s.index = g.toString(), g += 1) : (void 0 === (x = o[0]).nodes && (x.nodes = []), |
|||
s.index = x.index + "." + x.nodes.length), c[e] ? s.tagType = "block" : u[e] ? s.tagType = "inline" : p[e] && (s.tagType = "closeSelf"), |
|||
0 !== t.length && (s.attr = t.reduce(function(e, t) { |
|||
var r = t.name, a = t.value; |
|||
return "class" == r && (s.classStr = a), "style" == r && (s.styleStr = a), a.match(/ /) && (a = a.split(" ")), |
|||
e[r] ? Array.isArray(e[r]) ? e[r].push(a) : e[r] = [ e[r], a ] : e[r] = a, e; |
|||
}, {})), "img" === s.tag) { |
|||
s.imgIndex = i.images.length; |
|||
var d = s.attr.src; |
|||
"" == d[0] && d.splice(0, 1), d = l.urlToHttpUrl(d, a), s.attr.src = d, s.from = n, |
|||
i.images.push(s), i.imageUrls.push(d); |
|||
} |
|||
if ("font" === s.tag) { |
|||
var m = [ "x-small", "small", "medium", "large", "x-large", "xx-large", "-webkit-xxx-large" ], f = { |
|||
color: "color", |
|||
face: "font-family", |
|||
size: "font-size" |
|||
}; |
|||
s.attr.style || (s.attr.style = []), s.styleStr || (s.styleStr = ""); |
|||
for (var h in f) if (s.attr[h]) { |
|||
var v = "size" === h ? m[s.attr[h] - 1] : s.attr[h]; |
|||
s.attr.style.push(f[h]), s.attr.style.push(v), s.styleStr += f[h] + ": " + v + ";"; |
|||
} |
|||
} |
|||
if ("source" === s.tag && (i.source = s.attr.src), r) { |
|||
var x = o[0] || i; |
|||
void 0 === x.nodes && (x.nodes = []), x.nodes.push(s); |
|||
} else o.unshift(s); |
|||
}, |
|||
end: function(e) { |
|||
var t = o.shift(); |
|||
if (t.tag !== e && console.error("invalid state: mismatch end tag"), "video" === t.tag && i.source && (t.attr.src = i.source, |
|||
delete i.source), 0 === o.length) i.nodes.push(t); else { |
|||
var r = o[0]; |
|||
void 0 === r.nodes && (r.nodes = []), r.nodes.push(t); |
|||
} |
|||
}, |
|||
chars: function(e) { |
|||
var t = { |
|||
node: "text", |
|||
text: e, |
|||
textArray: s(e) |
|||
}; |
|||
if (0 === o.length) t.index = g.toString(), g += 1, i.nodes.push(t); else { |
|||
var r = o[0]; |
|||
void 0 === r.nodes && (r.nodes = []), t.index = r.index + "." + r.nodes.length, |
|||
r.nodes.push(t); |
|||
} |
|||
}, |
|||
comment: function(e) {} |
|||
}), i; |
|||
}, |
|||
emojisInit: function() { |
|||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "/wxParse/emojis/", r = arguments[2]; |
|||
n = e, o = t, i = r; |
|||
} |
|||
}; |
|||
@ -0,0 +1,48 @@ |
|||
function e(e) { |
|||
for (var t = {}, r = e.split(","), s = 0; s < r.length; s++) t[r[s]] = !0; |
|||
return t; |
|||
} |
|||
|
|||
var t = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, r = /^<\/([-A-Za-z0-9_]+)[^>]*>/, s = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, a = e("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), n = e("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"), i = e("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), o = e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), l = e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), c = e("wxxxcode-style,script,style,view,scroll-view,block"); |
|||
|
|||
module.exports = function(e, d) { |
|||
function f(e, t) { |
|||
if (t) for (t = t.toLowerCase(), r = b.length - 1; r >= 0 && b[r] != t; r--) ; else var r = 0; |
|||
if (r >= 0) { |
|||
for (var s = b.length - 1; s >= r; s--) d.end && d.end(b[s]); |
|||
b.length = r; |
|||
} |
|||
} |
|||
var p, u, h, b = [], m = e; |
|||
for (b.last = function() { |
|||
return this[this.length - 1]; |
|||
}; e; ) { |
|||
if (u = !0, b.last() && c[b.last()]) e = e.replace(new RegExp("([\\s\\S]*?)</" + b.last() + "[^>]*>"), function(e, t) { |
|||
return t = t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2"), d.chars && d.chars(t), |
|||
""; |
|||
}), f(0, b.last()); else if (0 == e.indexOf("\x3c!--") ? (p = e.indexOf("--\x3e")) >= 0 && (d.comment && d.comment(e.substring(4, p)), |
|||
e = e.substring(p + 3), u = !1) : 0 == e.indexOf("</") ? (h = e.match(r)) && (e = e.substring(h[0].length), |
|||
h[0].replace(r, f), u = !1) : 0 == e.indexOf("<") && (h = e.match(t)) && (e = e.substring(h[0].length), |
|||
h[0].replace(t, function(e, t, r, c) { |
|||
if (t = t.toLowerCase(), n[t]) for (;b.last() && i[b.last()]; ) f(0, b.last()); |
|||
if (o[t] && b.last() == t && f(0, t), (c = a[t] || !!c) || b.push(t), d.start) { |
|||
var p = []; |
|||
r.replace(s, function(e, t) { |
|||
var r = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : l[t] ? t : ""; |
|||
p.push({ |
|||
name: t, |
|||
value: r, |
|||
escaped: r.replace(/(^|[^\\])"/g, '$1\\"') |
|||
}); |
|||
}), d.start && d.start(t, p, c); |
|||
} |
|||
}), u = !1), u) { |
|||
p = e.indexOf("<"); |
|||
for (var g = ""; 0 === p; ) g += "<", p = (e = e.substring(1)).indexOf("<"); |
|||
g += p < 0 ? e : e.substring(0, p), e = p < 0 ? "" : e.substring(p), d.chars && d.chars(g); |
|||
} |
|||
if (e == m) throw "Parse Error: " + e; |
|||
m = e; |
|||
} |
|||
f(); |
|||
}; |
|||
@ -0,0 +1,693 @@ |
|||
function e(e) { |
|||
var r = { |
|||
omitExtraWLInCodeBlocks: { |
|||
defaultValue: !1, |
|||
describe: "Omit the default extra whiteline added to code blocks", |
|||
type: "boolean" |
|||
}, |
|||
noHeaderId: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off generated header id", |
|||
type: "boolean" |
|||
}, |
|||
prefixHeaderId: { |
|||
defaultValue: !1, |
|||
describe: "Specify a prefix to generated header ids", |
|||
type: "string" |
|||
}, |
|||
headerLevelStart: { |
|||
defaultValue: !1, |
|||
describe: "The header blocks level start", |
|||
type: "integer" |
|||
}, |
|||
parseImgDimensions: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off image dimension parsing", |
|||
type: "boolean" |
|||
}, |
|||
simplifiedAutoLink: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off GFM autolink style", |
|||
type: "boolean" |
|||
}, |
|||
literalMidWordUnderscores: { |
|||
defaultValue: !1, |
|||
describe: "Parse midword underscores as literal underscores", |
|||
type: "boolean" |
|||
}, |
|||
strikethrough: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off strikethrough support", |
|||
type: "boolean" |
|||
}, |
|||
tables: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off tables support", |
|||
type: "boolean" |
|||
}, |
|||
tablesHeaderId: { |
|||
defaultValue: !1, |
|||
describe: "Add an id to table headers", |
|||
type: "boolean" |
|||
}, |
|||
ghCodeBlocks: { |
|||
defaultValue: !0, |
|||
describe: "Turn on/off GFM fenced code blocks support", |
|||
type: "boolean" |
|||
}, |
|||
tasklists: { |
|||
defaultValue: !1, |
|||
describe: "Turn on/off GFM tasklist support", |
|||
type: "boolean" |
|||
}, |
|||
smoothLivePreview: { |
|||
defaultValue: !1, |
|||
describe: "Prevents weird effects in live previews due to incomplete input", |
|||
type: "boolean" |
|||
}, |
|||
smartIndentationFix: { |
|||
defaultValue: !1, |
|||
description: "Tries to smartly fix identation in es6 strings", |
|||
type: "boolean" |
|||
} |
|||
}; |
|||
if (!1 === e) return JSON.parse(JSON.stringify(r)); |
|||
var t = {}; |
|||
for (var n in r) r.hasOwnProperty(n) && (t[n] = r[n].defaultValue); |
|||
return t; |
|||
} |
|||
|
|||
function r(e, r) { |
|||
var t = r ? "Error in " + r + " extension->" : "Error in unnamed extension", a = { |
|||
valid: !0, |
|||
error: "" |
|||
}; |
|||
s.helper.isArray(e) || (e = [ e ]); |
|||
for (var o = 0; o < e.length; ++o) { |
|||
var i = t + " sub-extension " + o + ": ", l = e[o]; |
|||
if ("object" !== (void 0 === l ? "undefined" : n(l))) return a.valid = !1, a.error = i + "must be an object, but " + (void 0 === l ? "undefined" : n(l)) + " given", |
|||
a; |
|||
if (!s.helper.isString(l.type)) return a.valid = !1, a.error = i + 'property "type" must be a string, but ' + n(l.type) + " given", |
|||
a; |
|||
var c = l.type = l.type.toLowerCase(); |
|||
if ("language" === c && (c = l.type = "lang"), "html" === c && (c = l.type = "output"), |
|||
"lang" !== c && "output" !== c && "listener" !== c) return a.valid = !1, a.error = i + "type " + c + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"', |
|||
a; |
|||
if ("listener" === c) { |
|||
if (s.helper.isUndefined(l.listeners)) return a.valid = !1, a.error = i + '. Extensions of type "listener" must have a property called "listeners"', |
|||
a; |
|||
} else if (s.helper.isUndefined(l.filter) && s.helper.isUndefined(l.regex)) return a.valid = !1, |
|||
a.error = i + c + ' extensions must define either a "regex" property or a "filter" method', |
|||
a; |
|||
if (l.listeners) { |
|||
if ("object" !== n(l.listeners)) return a.valid = !1, a.error = i + '"listeners" property must be an object but ' + n(l.listeners) + " given", |
|||
a; |
|||
for (var u in l.listeners) if (l.listeners.hasOwnProperty(u) && "function" != typeof l.listeners[u]) return a.valid = !1, |
|||
a.error = i + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + u + " must be a function but " + n(l.listeners[u]) + " given", |
|||
a; |
|||
} |
|||
if (l.filter) { |
|||
if ("function" != typeof l.filter) return a.valid = !1, a.error = i + '"filter" must be a function, but ' + n(l.filter) + " given", |
|||
a; |
|||
} else if (l.regex) { |
|||
if (s.helper.isString(l.regex) && (l.regex = new RegExp(l.regex, "g")), !l.regex instanceof RegExp) return a.valid = !1, |
|||
a.error = i + '"regex" property must either be a string or a RegExp object, but ' + n(l.regex) + " given", |
|||
a; |
|||
if (s.helper.isUndefined(l.replace)) return a.valid = !1, a.error = i + '"regex" extensions must implement a replace string or function', |
|||
a; |
|||
} |
|||
} |
|||
return a; |
|||
} |
|||
|
|||
function t(e, r) { |
|||
return "~E" + r.charCodeAt(0) + "E"; |
|||
} |
|||
|
|||
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { |
|||
return typeof e; |
|||
} : function(e) { |
|||
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; |
|||
}, s = {}, a = {}, o = {}, i = e(!0), l = { |
|||
github: { |
|||
omitExtraWLInCodeBlocks: !0, |
|||
prefixHeaderId: "user-content-", |
|||
simplifiedAutoLink: !0, |
|||
literalMidWordUnderscores: !0, |
|||
strikethrough: !0, |
|||
tables: !0, |
|||
tablesHeaderId: !0, |
|||
ghCodeBlocks: !0, |
|||
tasklists: !0 |
|||
}, |
|||
vanilla: e(!0) |
|||
}; |
|||
|
|||
s.helper = {}, s.extensions = {}, s.setOption = function(e, r) { |
|||
return i[e] = r, this; |
|||
}, s.getOption = function(e) { |
|||
return i[e]; |
|||
}, s.getOptions = function() { |
|||
return i; |
|||
}, s.resetOptions = function() { |
|||
i = e(!0); |
|||
}, s.setFlavor = function(e) { |
|||
if (l.hasOwnProperty(e)) { |
|||
var r = l[e]; |
|||
for (var t in r) r.hasOwnProperty(t) && (i[t] = r[t]); |
|||
} |
|||
}, s.getDefaultOptions = function(r) { |
|||
return e(r); |
|||
}, s.subParser = function(e, r) { |
|||
if (s.helper.isString(e)) { |
|||
if (void 0 === r) { |
|||
if (a.hasOwnProperty(e)) return a[e]; |
|||
throw Error("SubParser named " + e + " not registered!"); |
|||
} |
|||
a[e] = r; |
|||
} |
|||
}, s.extension = function(e, t) { |
|||
if (!s.helper.isString(e)) throw Error("Extension 'name' must be a string"); |
|||
if (e = s.helper.stdExtName(e), s.helper.isUndefined(t)) { |
|||
if (!o.hasOwnProperty(e)) throw Error("Extension named " + e + " is not registered!"); |
|||
return o[e]; |
|||
} |
|||
"function" == typeof t && (t = t()), s.helper.isArray(t) || (t = [ t ]); |
|||
var n = r(t, e); |
|||
if (!n.valid) throw Error(n.error); |
|||
o[e] = t; |
|||
}, s.getAllExtensions = function() { |
|||
return o; |
|||
}, s.removeExtension = function(e) { |
|||
delete o[e]; |
|||
}, s.resetExtensions = function() { |
|||
o = {}; |
|||
}, s.validateExtension = function(e) { |
|||
var t = r(e, null); |
|||
return !!t.valid || (console.warn(t.error), !1); |
|||
}, s.hasOwnProperty("helper") || (s.helper = {}), s.helper.isString = function(e) { |
|||
return "string" == typeof e || e instanceof String; |
|||
}, s.helper.isFunction = function(e) { |
|||
var r = {}; |
|||
return e && "[object Function]" === r.toString.call(e); |
|||
}, s.helper.forEach = function(e, r) { |
|||
if ("function" == typeof e.forEach) e.forEach(r); else for (var t = 0; t < e.length; t++) r(e[t], t, e); |
|||
}, s.helper.isArray = function(e) { |
|||
return e.constructor === Array; |
|||
}, s.helper.isUndefined = function(e) { |
|||
return void 0 === e; |
|||
}, s.helper.stdExtName = function(e) { |
|||
return e.replace(/[_-]||\s/g, "").toLowerCase(); |
|||
}, s.helper.escapeCharactersCallback = t, s.helper.escapeCharacters = function(e, r, n) { |
|||
var s = "([" + r.replace(/([\[\]\\])/g, "\\$1") + "])"; |
|||
n && (s = "\\\\" + s); |
|||
var a = new RegExp(s, "g"); |
|||
return e = e.replace(a, t); |
|||
}; |
|||
|
|||
var c = function(e, r, t, n) { |
|||
var s, a, o, i, l, c = n || "", u = c.indexOf("g") > -1, p = new RegExp(r + "|" + t, "g" + c.replace(/g/g, "")), h = new RegExp(r, c.replace(/g/g, "")), d = []; |
|||
do { |
|||
for (s = 0; o = p.exec(e); ) if (h.test(o[0])) s++ || (i = (a = p.lastIndex) - o[0].length); else if (s && !--s) { |
|||
l = o.index + o[0].length; |
|||
var f = { |
|||
left: { |
|||
start: i, |
|||
end: a |
|||
}, |
|||
match: { |
|||
start: a, |
|||
end: o.index |
|||
}, |
|||
right: { |
|||
start: o.index, |
|||
end: l |
|||
}, |
|||
wholeMatch: { |
|||
start: i, |
|||
end: l |
|||
} |
|||
}; |
|||
if (d.push(f), !u) return d; |
|||
} |
|||
} while (s && (p.lastIndex = a)); |
|||
return d; |
|||
}; |
|||
|
|||
s.helper.matchRecursiveRegExp = function(e, r, t, n) { |
|||
for (var s = c(e, r, t, n), a = [], o = 0; o < s.length; ++o) a.push([ e.slice(s[o].wholeMatch.start, s[o].wholeMatch.end), e.slice(s[o].match.start, s[o].match.end), e.slice(s[o].left.start, s[o].left.end), e.slice(s[o].right.start, s[o].right.end) ]); |
|||
return a; |
|||
}, s.helper.replaceRecursiveRegExp = function(e, r, t, n, a) { |
|||
if (!s.helper.isFunction(r)) { |
|||
var o = r; |
|||
r = function() { |
|||
return o; |
|||
}; |
|||
} |
|||
var i = c(e, t, n, a), l = e, u = i.length; |
|||
if (u > 0) { |
|||
var p = []; |
|||
0 !== i[0].wholeMatch.start && p.push(e.slice(0, i[0].wholeMatch.start)); |
|||
for (var h = 0; h < u; ++h) p.push(r(e.slice(i[h].wholeMatch.start, i[h].wholeMatch.end), e.slice(i[h].match.start, i[h].match.end), e.slice(i[h].left.start, i[h].left.end), e.slice(i[h].right.start, i[h].right.end))), |
|||
h < u - 1 && p.push(e.slice(i[h].wholeMatch.end, i[h + 1].wholeMatch.start)); |
|||
i[u - 1].wholeMatch.end < e.length && p.push(e.slice(i[u - 1].wholeMatch.end)), |
|||
l = p.join(""); |
|||
} |
|||
return l; |
|||
}, s.helper.isUndefined(console) && (console = { |
|||
warn: function(e) { |
|||
alert(e); |
|||
}, |
|||
log: function(e) { |
|||
alert(e); |
|||
}, |
|||
error: function(e) { |
|||
throw e; |
|||
} |
|||
}), s.Converter = function(e) { |
|||
function t(e, t) { |
|||
if (t = t || null, s.helper.isString(e)) { |
|||
if (e = s.helper.stdExtName(e), t = e, s.extensions[e]) return console.warn("DEPRECATION WARNING: " + e + " is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"), |
|||
void a(s.extensions[e], e); |
|||
if (s.helper.isUndefined(o[e])) throw Error('Extension "' + e + '" could not be loaded. It was either not found or is not a valid extension.'); |
|||
e = o[e]; |
|||
} |
|||
"function" == typeof e && (e = e()), s.helper.isArray(e) || (e = [ e ]); |
|||
var n = r(e, t); |
|||
if (!n.valid) throw Error(n.error); |
|||
for (var i = 0; i < e.length; ++i) { |
|||
switch (e[i].type) { |
|||
case "lang": |
|||
h.push(e[i]); |
|||
break; |
|||
|
|||
case "output": |
|||
d.push(e[i]); |
|||
} |
|||
if (e[i].hasOwnProperty(f)) for (var l in e[i].listeners) e[i].listeners.hasOwnProperty(l) && c(l, e[i].listeners[l]); |
|||
} |
|||
} |
|||
function a(e, t) { |
|||
"function" == typeof e && (e = e(new s.Converter())), s.helper.isArray(e) || (e = [ e ]); |
|||
var n = r(e, t); |
|||
if (!n.valid) throw Error(n.error); |
|||
for (var a = 0; a < e.length; ++a) switch (e[a].type) { |
|||
case "lang": |
|||
h.push(e[a]); |
|||
break; |
|||
|
|||
case "output": |
|||
d.push(e[a]); |
|||
break; |
|||
|
|||
default: |
|||
throw Error("Extension loader error: Type unrecognized!!!"); |
|||
} |
|||
} |
|||
function c(e, r) { |
|||
if (!s.helper.isString(e)) throw Error("Invalid argument in converter.listen() method: name must be a string, but " + (void 0 === e ? "undefined" : n(e)) + " given"); |
|||
if ("function" != typeof r) throw Error("Invalid argument in converter.listen() method: callback must be a function, but " + (void 0 === r ? "undefined" : n(r)) + " given"); |
|||
f.hasOwnProperty(e) || (f[e] = []), f[e].push(r); |
|||
} |
|||
function u(e) { |
|||
var r = e.match(/^\s*/)[0].length, t = new RegExp("^\\s{0," + r + "}", "gm"); |
|||
return e.replace(t, ""); |
|||
} |
|||
var p = {}, h = [], d = [], f = {}; |
|||
!function() { |
|||
e = e || {}; |
|||
for (var r in i) i.hasOwnProperty(r) && (p[r] = i[r]); |
|||
if ("object" !== (void 0 === e ? "undefined" : n(e))) throw Error("Converter expects the passed parameter to be an object, but " + (void 0 === e ? "undefined" : n(e)) + " was passed instead."); |
|||
for (var a in e) e.hasOwnProperty(a) && (p[a] = e[a]); |
|||
p.extensions && s.helper.forEach(p.extensions, t); |
|||
}(), this._dispatch = function(e, r, t, n) { |
|||
if (f.hasOwnProperty(e)) for (var s = 0; s < f[e].length; ++s) { |
|||
var a = f[e][s](e, r, this, t, n); |
|||
a && void 0 !== a && (r = a); |
|||
} |
|||
return r; |
|||
}, this.listen = function(e, r) { |
|||
return c(e, r), this; |
|||
}, this.makeHtml = function(e) { |
|||
if (!e) return e; |
|||
var r = { |
|||
gHtmlBlocks: [], |
|||
gHtmlMdBlocks: [], |
|||
gHtmlSpans: [], |
|||
gUrls: {}, |
|||
gTitles: {}, |
|||
gDimensions: {}, |
|||
gListLevel: 0, |
|||
hashLinkCounts: {}, |
|||
langExtensions: h, |
|||
outputModifiers: d, |
|||
converter: this, |
|||
ghCodeBlocks: [] |
|||
}; |
|||
return e = e.replace(/~/g, "~T"), e = e.replace(/\$/g, "~D"), e = e.replace(/\r\n/g, "\n"), |
|||
e = e.replace(/\r/g, "\n"), p.smartIndentationFix && (e = u(e)), e = e, e = s.subParser("detab")(e, p, r), |
|||
e = s.subParser("stripBlankLines")(e, p, r), s.helper.forEach(h, function(t) { |
|||
e = s.subParser("runExtension")(t, e, p, r); |
|||
}), e = s.subParser("hashPreCodeTags")(e, p, r), e = s.subParser("githubCodeBlocks")(e, p, r), |
|||
e = s.subParser("hashHTMLBlocks")(e, p, r), e = s.subParser("hashHTMLSpans")(e, p, r), |
|||
e = s.subParser("stripLinkDefinitions")(e, p, r), e = s.subParser("blockGamut")(e, p, r), |
|||
e = s.subParser("unhashHTMLSpans")(e, p, r), e = s.subParser("unescapeSpecialChars")(e, p, r), |
|||
e = e.replace(/~D/g, "$$"), e = e.replace(/~T/g, "~"), s.helper.forEach(d, function(t) { |
|||
e = s.subParser("runExtension")(t, e, p, r); |
|||
}), e; |
|||
}, this.setOption = function(e, r) { |
|||
p[e] = r; |
|||
}, this.getOption = function(e) { |
|||
return p[e]; |
|||
}, this.getOptions = function() { |
|||
return p; |
|||
}, this.addExtension = function(e, r) { |
|||
t(e, r = r || null); |
|||
}, this.useExtension = function(e) { |
|||
t(e); |
|||
}, this.setFlavor = function(e) { |
|||
if (l.hasOwnProperty(e)) { |
|||
var r = l[e]; |
|||
for (var t in r) r.hasOwnProperty(t) && (p[t] = r[t]); |
|||
} |
|||
}, this.removeExtension = function(e) { |
|||
s.helper.isArray(e) || (e = [ e ]); |
|||
for (var r = 0; r < e.length; ++r) { |
|||
for (var t = e[r], n = 0; n < h.length; ++n) h[n] === t && h[n].splice(n, 1); |
|||
for (;0 < d.length; ++n) d[0] === t && d[0].splice(n, 1); |
|||
} |
|||
}, this.getAllExtensions = function() { |
|||
return { |
|||
language: h, |
|||
output: d |
|||
}; |
|||
}; |
|||
}, s.subParser("anchors", function(e, r, t) { |
|||
var n = function(e, r, n, a, o, i, l, c) { |
|||
s.helper.isUndefined(c) && (c = ""), e = r; |
|||
var u = n, p = a.toLowerCase(), h = o, d = c; |
|||
if (!h) if (p || (p = u.toLowerCase().replace(/ ?\n/g, " ")), h = "#" + p, s.helper.isUndefined(t.gUrls[p])) { |
|||
if (!(e.search(/\(\s*\)$/m) > -1)) return e; |
|||
h = ""; |
|||
} else h = t.gUrls[p], s.helper.isUndefined(t.gTitles[p]) || (d = t.gTitles[p]); |
|||
var f = '<a href="' + (h = s.helper.escapeCharacters(h, "*_", !1)) + '"'; |
|||
return "" !== d && null !== d && (d = d.replace(/"/g, """), f += ' title="' + (d = s.helper.escapeCharacters(d, "*_", !1)) + '"'), |
|||
f += ">" + u + "</a>"; |
|||
}; |
|||
return e = (e = t.converter._dispatch("anchors.before", e, r, t)).replace(/(\[((?:\[[^\]]*]|[^\[\]])*)][ ]?(?:\n[ ]*)?\[(.*?)])()()()()/g, n), |
|||
e = e.replace(/(\[((?:\[[^\]]*]|[^\[\]])*)]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, n), |
|||
e = e.replace(/(\[([^\[\]]+)])()()()()()/g, n), e = t.converter._dispatch("anchors.after", e, r, t); |
|||
}), s.subParser("autoLinks", function(e, r, t) { |
|||
function n(e, r) { |
|||
var t = r; |
|||
return /^www\./i.test(r) && (r = r.replace(/^www\./i, "http://www.")), '<a href="' + r + '">' + t + "</a>"; |
|||
} |
|||
function a(e, r) { |
|||
var t = s.subParser("unescapeSpecialChars")(r); |
|||
return s.subParser("encodeEmailAddress")(t); |
|||
} |
|||
var o = /\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi, i = /<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi, l = /(?:^|[ \n\t])([A-Za-z0-9!#$%&'*+-/=?^_`\{|}~\.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?:$|[ \n\t])/gi, c = /<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi; |
|||
return e = (e = t.converter._dispatch("autoLinks.before", e, r, t)).replace(i, n), |
|||
e = e.replace(c, a), r.simplifiedAutoLink && (e = (e = e.replace(o, n)).replace(l, a)), |
|||
e = t.converter._dispatch("autoLinks.after", e, r, t); |
|||
}), s.subParser("blockGamut", function(e, r, t) { |
|||
e = t.converter._dispatch("blockGamut.before", e, r, t), e = s.subParser("blockQuotes")(e, r, t), |
|||
e = s.subParser("headers")(e, r, t); |
|||
var n = s.subParser("hashBlock")("<hr />", r, t); |
|||
return e = e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, n), e = e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, n), |
|||
e = e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, n), e = s.subParser("lists")(e, r, t), |
|||
e = s.subParser("codeBlocks")(e, r, t), e = s.subParser("tables")(e, r, t), e = s.subParser("hashHTMLBlocks")(e, r, t), |
|||
e = s.subParser("paragraphs")(e, r, t), e = t.converter._dispatch("blockGamut.after", e, r, t); |
|||
}), s.subParser("blockQuotes", function(e, r, t) { |
|||
return e = t.converter._dispatch("blockQuotes.before", e, r, t), e = e.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(e, n) { |
|||
var a = n; |
|||
return a = a.replace(/^[ \t]*>[ \t]?/gm, "~0"), a = a.replace(/~0/g, ""), a = a.replace(/^[ \t]+$/gm, ""), |
|||
a = s.subParser("githubCodeBlocks")(a, r, t), a = s.subParser("blockGamut")(a, r, t), |
|||
a = a.replace(/(^|\n)/g, "$1 "), a = a.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(e, r) { |
|||
var t = r; |
|||
return t = t.replace(/^ /gm, "~0"), t = t.replace(/~0/g, ""); |
|||
}), s.subParser("hashBlock")("<blockquote>\n" + a + "\n</blockquote>", r, t); |
|||
}), e = t.converter._dispatch("blockQuotes.after", e, r, t); |
|||
}), s.subParser("codeBlocks", function(e, r, t) { |
|||
e = t.converter._dispatch("codeBlocks.before", e, r, t); |
|||
var n = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g; |
|||
return e = (e += "~0").replace(n, function(e, n, a) { |
|||
var o = n, i = a, l = "\n"; |
|||
return o = s.subParser("outdent")(o), o = s.subParser("encodeCode")(o), o = s.subParser("detab")(o), |
|||
o = o.replace(/^\n+/g, ""), o = o.replace(/\n+$/g, ""), r.omitExtraWLInCodeBlocks && (l = ""), |
|||
o = "<pre><code>" + o + l + "</code></pre>", s.subParser("hashBlock")(o, r, t) + i; |
|||
}), e = e.replace(/~0/, ""), e = t.converter._dispatch("codeBlocks.after", e, r, t); |
|||
}), s.subParser("codeSpans", function(e, r, t) { |
|||
return void 0 === (e = t.converter._dispatch("codeSpans.before", e, r, t)) && (e = ""), |
|||
e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, r, t, n) { |
|||
var a = n; |
|||
return a = a.replace(/^([ \t]*)/g, ""), a = a.replace(/[ \t]*$/g, ""), a = s.subParser("encodeCode")(a), |
|||
r + "<code>" + a + "</code>"; |
|||
}), e = t.converter._dispatch("codeSpans.after", e, r, t); |
|||
}), s.subParser("detab", function(e) { |
|||
return e = e.replace(/\t(?=\t)/g, " "), e = e.replace(/\t/g, "~A~B"), e = e.replace(/~B(.+?)~A/g, function(e, r) { |
|||
for (var t = r, n = 4 - t.length % 4, s = 0; s < n; s++) t += " "; |
|||
return t; |
|||
}), e = e.replace(/~A/g, " "), e = e.replace(/~B/g, ""); |
|||
}), s.subParser("encodeAmpsAndAngles", function(e) { |
|||
return e = e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"), e = e.replace(/<(?![a-z\/?\$!])/gi, "<"); |
|||
}), s.subParser("encodeBackslashEscapes", function(e) { |
|||
return e = e.replace(/\\(\\)/g, s.helper.escapeCharactersCallback), e = e.replace(/\\([`*_{}\[\]()>#+-.!])/g, s.helper.escapeCharactersCallback); |
|||
}), s.subParser("encodeCode", function(e) { |
|||
return e = e.replace(/&/g, "&"), e = e.replace(/</g, "<"), e = e.replace(/>/g, ">"), |
|||
e = s.helper.escapeCharacters(e, "*_{}[]\\", !1); |
|||
}), s.subParser("encodeEmailAddress", function(e) { |
|||
var r = [ function(e) { |
|||
return "&#" + e.charCodeAt(0) + ";"; |
|||
}, function(e) { |
|||
return "&#x" + e.charCodeAt(0).toString(16) + ";"; |
|||
}, function(e) { |
|||
return e; |
|||
} ]; |
|||
return e = "mailto:" + e, e = e.replace(/./g, function(e) { |
|||
if ("@" === e) e = r[Math.floor(2 * Math.random())](e); else if (":" !== e) { |
|||
var t = Math.random(); |
|||
e = t > .9 ? r[2](e) : t > .45 ? r[1](e) : r[0](e); |
|||
} |
|||
return e; |
|||
}), e = '<a href="' + e + '">' + e + "</a>", e = e.replace(/">.+:/g, '">'); |
|||
}), s.subParser("escapeSpecialCharsWithinTagAttributes", function(e) { |
|||
var r = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi; |
|||
return e = e.replace(r, function(e) { |
|||
var r = e.replace(/(.)<\/?code>(?=.)/g, "$1`"); |
|||
return r = s.helper.escapeCharacters(r, "\\`*_", !1); |
|||
}); |
|||
}), s.subParser("githubCodeBlocks", function(e, r, t) { |
|||
return r.ghCodeBlocks ? (e = t.converter._dispatch("githubCodeBlocks.before", e, r, t), |
|||
e += "~0", e = e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g, function(e, n, a) { |
|||
var o = r.omitExtraWLInCodeBlocks ? "" : "\n"; |
|||
return a = s.subParser("encodeCode")(a), a = s.subParser("detab")(a), a = a.replace(/^\n+/g, ""), |
|||
a = a.replace(/\n+$/g, ""), a = "<pre><code" + (n ? ' class="' + n + " language-" + n + '"' : "") + ">" + a + o + "</code></pre>", |
|||
a = s.subParser("hashBlock")(a, r, t), "\n\n~G" + (t.ghCodeBlocks.push({ |
|||
text: e, |
|||
codeblock: a |
|||
}) - 1) + "G\n\n"; |
|||
}), e = e.replace(/~0/, ""), t.converter._dispatch("githubCodeBlocks.after", e, r, t)) : e; |
|||
}), s.subParser("hashBlock", function(e, r, t) { |
|||
return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (t.gHtmlBlocks.push(e) - 1) + "K\n\n"; |
|||
}), s.subParser("hashElement", function(e, r, t) { |
|||
return function(e, r) { |
|||
var n = r; |
|||
return n = n.replace(/\n\n/g, "\n"), n = n.replace(/^\n/, ""), n = n.replace(/\n+$/g, ""), |
|||
n = "\n\n~K" + (t.gHtmlBlocks.push(n) - 1) + "K\n\n"; |
|||
}; |
|||
}), s.subParser("hashHTMLBlocks", function(e, r, t) { |
|||
for (var n = [ "pre", "div", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "table", "dl", "ol", "ul", "script", "noscript", "form", "fieldset", "iframe", "math", "style", "section", "header", "footer", "nav", "article", "aside", "address", "audio", "canvas", "figure", "hgroup", "output", "video", "p" ], a = 0; a < n.length; ++a) e = s.helper.replaceRecursiveRegExp(e, function(e, r, n, s) { |
|||
var a = e; |
|||
return -1 !== n.search(/\bmarkdown\b/) && (a = n + t.converter.makeHtml(r) + s), |
|||
"\n\n~K" + (t.gHtmlBlocks.push(a) - 1) + "K\n\n"; |
|||
}, "^(?: |\\t){0,3}<" + n[a] + "\\b[^>]*>", "</" + n[a] + ">", "gim"); |
|||
return e = e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, s.subParser("hashElement")(e, r, t)), |
|||
e = e.replace(/(<!--[\s\S]*?-->)/g, s.subParser("hashElement")(e, r, t)), e = e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, s.subParser("hashElement")(e, r, t)); |
|||
}), s.subParser("hashHTMLSpans", function(e, r, t) { |
|||
for (var n = s.helper.matchRecursiveRegExp(e, "<code\\b[^>]*>", "</code>", "gi"), a = 0; a < n.length; ++a) e = e.replace(n[a][0], "~L" + (t.gHtmlSpans.push(n[a][0]) - 1) + "L"); |
|||
return e; |
|||
}), s.subParser("unhashHTMLSpans", function(e, r, t) { |
|||
for (var n = 0; n < t.gHtmlSpans.length; ++n) e = e.replace("~L" + n + "L", t.gHtmlSpans[n]); |
|||
return e; |
|||
}), s.subParser("hashPreCodeTags", function(e, r, t) { |
|||
return e = s.helper.replaceRecursiveRegExp(e, function(e, r, n, a) { |
|||
var o = n + s.subParser("encodeCode")(r) + a; |
|||
return "\n\n~G" + (t.ghCodeBlocks.push({ |
|||
text: e, |
|||
codeblock: o |
|||
}) - 1) + "G\n\n"; |
|||
}, "^(?: |\\t){0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>", "^(?: |\\t){0,3}</code>\\s*</pre>", "gim"); |
|||
}), s.subParser("headers", function(e, r, t) { |
|||
function n(e) { |
|||
var r, n = e.replace(/[^\w]/g, "").toLowerCase(); |
|||
return t.hashLinkCounts[n] ? r = n + "-" + t.hashLinkCounts[n]++ : (r = n, t.hashLinkCounts[n] = 1), |
|||
!0 === a && (a = "section"), s.helper.isString(a) ? a + r : r; |
|||
} |
|||
e = t.converter._dispatch("headers.before", e, r, t); |
|||
var a = r.prefixHeaderId, o = isNaN(parseInt(r.headerLevelStart)) ? 1 : parseInt(r.headerLevelStart), i = r.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, l = r.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; |
|||
return e = e.replace(i, function(e, a) { |
|||
var i = s.subParser("spanGamut")(a, r, t), l = r.noHeaderId ? "" : ' id="' + n(a) + '"', c = o, u = "<h" + c + l + ">" + i + "</h" + c + ">"; |
|||
return s.subParser("hashBlock")(u, r, t); |
|||
}), e = e.replace(l, function(e, a) { |
|||
var i = s.subParser("spanGamut")(a, r, t), l = r.noHeaderId ? "" : ' id="' + n(a) + '"', c = o + 1, u = "<h" + c + l + ">" + i + "</h" + c + ">"; |
|||
return s.subParser("hashBlock")(u, r, t); |
|||
}), e = e.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm, function(e, a, i) { |
|||
var l = s.subParser("spanGamut")(i, r, t), c = r.noHeaderId ? "" : ' id="' + n(i) + '"', u = o - 1 + a.length, p = "<h" + u + c + ">" + l + "</h" + u + ">"; |
|||
return s.subParser("hashBlock")(p, r, t); |
|||
}), e = t.converter._dispatch("headers.after", e, r, t); |
|||
}), s.subParser("images", function(e, r, t) { |
|||
function n(e, r, n, a, o, i, l, c) { |
|||
var u = t.gUrls, p = t.gTitles, h = t.gDimensions; |
|||
if (n = n.toLowerCase(), c || (c = ""), "" === a || null === a) { |
|||
if ("" !== n && null !== n || (n = r.toLowerCase().replace(/ ?\n/g, " ")), a = "#" + n, |
|||
s.helper.isUndefined(u[n])) return e; |
|||
a = u[n], s.helper.isUndefined(p[n]) || (c = p[n]), s.helper.isUndefined(h[n]) || (o = h[n].width, |
|||
i = h[n].height); |
|||
} |
|||
r = r.replace(/"/g, """), r = s.helper.escapeCharacters(r, "*_", !1); |
|||
var d = '<img src="' + (a = s.helper.escapeCharacters(a, "*_", !1)) + '" alt="' + r + '"'; |
|||
return c && (c = c.replace(/"/g, """), d += ' title="' + (c = s.helper.escapeCharacters(c, "*_", !1)) + '"'), |
|||
o && i && (d += ' width="' + (o = "*" === o ? "auto" : o) + '"', d += ' height="' + (i = "*" === i ? "auto" : i) + '"'), |
|||
d += " />"; |
|||
} |
|||
var a = /!\[(.*?)]\s?\([ \t]*()<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g, o = /!\[([^\]]*?)] ?(?:\n *)?\[(.*?)]()()()()()/g; |
|||
return e = (e = t.converter._dispatch("images.before", e, r, t)).replace(o, n), |
|||
e = e.replace(a, n), e = t.converter._dispatch("images.after", e, r, t); |
|||
}), s.subParser("italicsAndBold", function(e, r, t) { |
|||
return e = t.converter._dispatch("italicsAndBold.before", e, r, t), e = r.literalMidWordUnderscores ? (e = (e = (e = e.replace(/(^|\s|>|\b)__(?=\S)([\s\S]+?)__(?=\b|<|\s|$)/gm, "$1<strong>$2</strong>")).replace(/(^|\s|>|\b)_(?=\S)([\s\S]+?)_(?=\b|<|\s|$)/gm, "$1<em>$2</em>")).replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, "<strong>$2</strong>")).replace(/(\*)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>") : (e = e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>")).replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>"), |
|||
e = t.converter._dispatch("italicsAndBold.after", e, r, t); |
|||
}), s.subParser("lists", function(e, r, t) { |
|||
function n(e, n) { |
|||
t.gListLevel++, e = e.replace(/\n{2,}$/, "\n"), e += "~0"; |
|||
var a = /(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, o = /\n[ \t]*\n(?!~0)/.test(e); |
|||
return e = e.replace(a, function(e, n, a, i, l, c, u) { |
|||
u = u && "" !== u.trim(); |
|||
var p = s.subParser("outdent")(l, r, t), h = ""; |
|||
return c && r.tasklists && (h = ' class="task-list-item" style="list-style-type: none;"', |
|||
p = p.replace(/^[ \t]*\[(x|X| )?]/m, function() { |
|||
var e = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"'; |
|||
return u && (e += " checked"), e += ">"; |
|||
})), n || p.search(/\n{2,}/) > -1 ? (p = s.subParser("githubCodeBlocks")(p, r, t), |
|||
p = s.subParser("blockGamut")(p, r, t)) : (p = (p = s.subParser("lists")(p, r, t)).replace(/\n$/, ""), |
|||
p = o ? s.subParser("paragraphs")(p, r, t) : s.subParser("spanGamut")(p, r, t)), |
|||
p = "\n<li" + h + ">" + p + "</li>\n"; |
|||
}), e = e.replace(/~0/g, ""), t.gListLevel--, n && (e = e.replace(/\s+$/, "")), |
|||
e; |
|||
} |
|||
function a(e, r, t) { |
|||
var s = "ul" === r ? /^ {0,2}\d+\.[ \t]/gm : /^ {0,2}[*+-][ \t]/gm, a = [], o = ""; |
|||
if (-1 !== e.search(s)) { |
|||
!function e(a) { |
|||
var i = a.search(s); |
|||
-1 !== i ? (o += "\n\n<" + r + ">" + n(a.slice(0, i), !!t) + "</" + r + ">\n\n", |
|||
s = "ul" === (r = "ul" === r ? "ol" : "ul") ? /^ {0,2}\d+\.[ \t]/gm : /^ {0,2}[*+-][ \t]/gm, |
|||
e(a.slice(i))) : o += "\n\n<" + r + ">" + n(a, !!t) + "</" + r + ">\n\n"; |
|||
}(e); |
|||
for (var i = 0; i < a.length; ++i) ; |
|||
} else o = "\n\n<" + r + ">" + n(e, !!t) + "</" + r + ">\n\n"; |
|||
return o; |
|||
} |
|||
e = t.converter._dispatch("lists.before", e, r, t), e += "~0"; |
|||
var o = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; |
|||
return t.gListLevel ? e = e.replace(o, function(e, r, t) { |
|||
return a(r, t.search(/[*+-]/g) > -1 ? "ul" : "ol", !0); |
|||
}) : (o = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, |
|||
e = e.replace(o, function(e, r, t, n) { |
|||
return a(t, n.search(/[*+-]/g) > -1 ? "ul" : "ol"); |
|||
})), e = e.replace(/~0/, ""), e = t.converter._dispatch("lists.after", e, r, t); |
|||
}), s.subParser("outdent", function(e) { |
|||
return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, ""); |
|||
}), s.subParser("paragraphs", function(e, r, t) { |
|||
for (var n = (e = (e = (e = t.converter._dispatch("paragraphs.before", e, r, t)).replace(/^\n+/g, "")).replace(/\n+$/g, "")).split(/\n{2,}/g), a = [], o = n.length, i = 0; i < o; i++) { |
|||
var l = n[i]; |
|||
l.search(/~(K|G)(\d+)\1/g) >= 0 ? a.push(l) : (l = (l = s.subParser("spanGamut")(l, r, t)).replace(/^([ \t]*)/g, "<p>"), |
|||
l += "</p>", a.push(l)); |
|||
} |
|||
for (o = a.length, i = 0; i < o; i++) { |
|||
for (var c = "", u = a[i], p = !1; u.search(/~(K|G)(\d+)\1/) >= 0; ) { |
|||
var h = RegExp.$1, d = RegExp.$2; |
|||
c = (c = "K" === h ? t.gHtmlBlocks[d] : p ? s.subParser("encodeCode")(t.ghCodeBlocks[d].text) : t.ghCodeBlocks[d].codeblock).replace(/\$/g, "$$$$"), |
|||
u = u.replace(/(\n\n)?~(K|G)\d+\2(\n\n)?/, c), /^<pre\b[^>]*>\s*<code\b[^>]*>/.test(u) && (p = !0); |
|||
} |
|||
a[i] = u; |
|||
} |
|||
return e = a.join("\n\n"), e = e.replace(/^\n+/g, ""), e = e.replace(/\n+$/g, ""), |
|||
t.converter._dispatch("paragraphs.after", e, r, t); |
|||
}), s.subParser("runExtension", function(e, r, t, n) { |
|||
if (e.filter) r = e.filter(r, n.converter, t); else if (e.regex) { |
|||
var s = e.regex; |
|||
!s instanceof RegExp && (s = new RegExp(s, "g")), r = r.replace(s, e.replace); |
|||
} |
|||
return r; |
|||
}), s.subParser("spanGamut", function(e, r, t) { |
|||
return e = t.converter._dispatch("spanGamut.before", e, r, t), e = s.subParser("codeSpans")(e, r, t), |
|||
e = s.subParser("escapeSpecialCharsWithinTagAttributes")(e, r, t), e = s.subParser("encodeBackslashEscapes")(e, r, t), |
|||
e = s.subParser("images")(e, r, t), e = s.subParser("anchors")(e, r, t), e = s.subParser("autoLinks")(e, r, t), |
|||
e = s.subParser("encodeAmpsAndAngles")(e, r, t), e = s.subParser("italicsAndBold")(e, r, t), |
|||
e = s.subParser("strikethrough")(e, r, t), e = e.replace(/ +\n/g, " <br />\n"), |
|||
e = t.converter._dispatch("spanGamut.after", e, r, t); |
|||
}), s.subParser("strikethrough", function(e, r, t) { |
|||
return r.strikethrough && (e = (e = t.converter._dispatch("strikethrough.before", e, r, t)).replace(/(?:~T){2}([\s\S]+?)(?:~T){2}/g, "<del>$1</del>"), |
|||
e = t.converter._dispatch("strikethrough.after", e, r, t)), e; |
|||
}), s.subParser("stripBlankLines", function(e) { |
|||
return e.replace(/^[ \t]+$/gm, ""); |
|||
}), s.subParser("stripLinkDefinitions", function(e, r, t) { |
|||
var n = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm; |
|||
return e += "~0", e = e.replace(n, function(e, n, a, o, i, l, c) { |
|||
return n = n.toLowerCase(), t.gUrls[n] = s.subParser("encodeAmpsAndAngles")(a), |
|||
l ? l + c : (c && (t.gTitles[n] = c.replace(/"|'/g, """)), r.parseImgDimensions && o && i && (t.gDimensions[n] = { |
|||
width: o, |
|||
height: i |
|||
}), ""); |
|||
}), e = e.replace(/~0/, ""); |
|||
}), s.subParser("tables", function(e, r, t) { |
|||
function n(e) { |
|||
return /^:[ \t]*--*$/.test(e) ? ' style="text-align:left;"' : /^--*[ \t]*:[ \t]*$/.test(e) ? ' style="text-align:right;"' : /^:[ \t]*--*[ \t]*:$/.test(e) ? ' style="text-align:center;"' : ""; |
|||
} |
|||
function a(e, n) { |
|||
var a = ""; |
|||
return e = e.trim(), r.tableHeaderId && (a = ' id="' + e.replace(/ /g, "_").toLowerCase() + '"'), |
|||
e = s.subParser("spanGamut")(e, r, t), "<th" + a + n + ">" + e + "</th>\n"; |
|||
} |
|||
function o(e, n) { |
|||
return "<td" + n + ">" + s.subParser("spanGamut")(e, r, t) + "</td>\n"; |
|||
} |
|||
function i(e, r) { |
|||
for (var t = "<table>\n<thead>\n<tr>\n", n = e.length, s = 0; s < n; ++s) t += e[s]; |
|||
for (t += "</tr>\n</thead>\n<tbody>\n", s = 0; s < r.length; ++s) { |
|||
t += "<tr>\n"; |
|||
for (var a = 0; a < n; ++a) t += r[s][a]; |
|||
t += "</tr>\n"; |
|||
} |
|||
return t += "</tbody>\n</table>\n"; |
|||
} |
|||
if (!r.tables) return e; |
|||
var l = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm; |
|||
return e = t.converter._dispatch("tables.before", e, r, t), e = e.replace(l, function(e) { |
|||
var r, t = e.split("\n"); |
|||
for (r = 0; r < t.length; ++r) /^[ \t]{0,3}\|/.test(t[r]) && (t[r] = t[r].replace(/^[ \t]{0,3}\|/, "")), |
|||
/\|[ \t]*$/.test(t[r]) && (t[r] = t[r].replace(/\|[ \t]*$/, "")); |
|||
var l = t[0].split("|").map(function(e) { |
|||
return e.trim(); |
|||
}), c = t[1].split("|").map(function(e) { |
|||
return e.trim(); |
|||
}), u = [], p = [], h = [], d = []; |
|||
for (t.shift(), t.shift(), r = 0; r < t.length; ++r) "" !== t[r].trim() && u.push(t[r].split("|").map(function(e) { |
|||
return e.trim(); |
|||
})); |
|||
if (l.length < c.length) return e; |
|||
for (r = 0; r < c.length; ++r) h.push(n(c[r])); |
|||
for (r = 0; r < l.length; ++r) s.helper.isUndefined(h[r]) && (h[r] = ""), p.push(a(l[r], h[r])); |
|||
for (r = 0; r < u.length; ++r) { |
|||
for (var f = [], g = 0; g < p.length; ++g) s.helper.isUndefined(u[r][g]), f.push(o(u[r][g], h[g])); |
|||
d.push(f); |
|||
} |
|||
return i(p, d); |
|||
}), e = t.converter._dispatch("tables.after", e, r, t); |
|||
}), s.subParser("unescapeSpecialChars", function(e) { |
|||
return e = e.replace(/~E(\d+)E/g, function(e, r) { |
|||
var t = parseInt(r); |
|||
return String.fromCharCode(t); |
|||
}); |
|||
}), module.exports = s; |
|||
@ -0,0 +1,74 @@ |
|||
function e(e) { |
|||
return e = e.replace(/∀/g, "∀"), e = e.replace(/∂/g, "∂"), e = e.replace(/&exists;/g, "∃"), |
|||
e = e.replace(/∅/g, "∅"), e = e.replace(/∇/g, "∇"), e = e.replace(/∈/g, "∈"), |
|||
e = e.replace(/∉/g, "∉"), e = e.replace(/∋/g, "∋"), e = e.replace(/∏/g, "∏"), |
|||
e = e.replace(/∑/g, "∑"), e = e.replace(/−/g, "−"), e = e.replace(/∗/g, "∗"), |
|||
e = e.replace(/√/g, "√"), e = e.replace(/∝/g, "∝"), e = e.replace(/∞/g, "∞"), |
|||
e = e.replace(/∠/g, "∠"), e = e.replace(/∧/g, "∧"), e = e.replace(/∨/g, "∨"), |
|||
e = e.replace(/∩/g, "∩"), e = e.replace(/∩/g, "∪"), e = e.replace(/∫/g, "∫"), |
|||
e = e.replace(/∴/g, "∴"), e = e.replace(/∼/g, "∼"), e = e.replace(/≅/g, "≅"), |
|||
e = e.replace(/≈/g, "≈"), e = e.replace(/≠/g, "≠"), e = e.replace(/≤/g, "≤"), |
|||
e = e.replace(/≥/g, "≥"), e = e.replace(/⊂/g, "⊂"), e = e.replace(/⊃/g, "⊃"), |
|||
e = e.replace(/⊄/g, "⊄"), e = e.replace(/⊆/g, "⊆"), e = e.replace(/⊇/g, "⊇"), |
|||
e = e.replace(/⊕/g, "⊕"), e = e.replace(/⊗/g, "⊗"), e = e.replace(/⊥/g, "⊥"), |
|||
e = e.replace(/⋅/g, "⋅"); |
|||
} |
|||
|
|||
function a(e) { |
|||
return e = e.replace(/Α/g, "Α"), e = e.replace(/Β/g, "Β"), e = e.replace(/Γ/g, "Γ"), |
|||
e = e.replace(/Δ/g, "Δ"), e = e.replace(/Ε/g, "Ε"), e = e.replace(/Ζ/g, "Ζ"), |
|||
e = e.replace(/Η/g, "Η"), e = e.replace(/Θ/g, "Θ"), e = e.replace(/Ι/g, "Ι"), |
|||
e = e.replace(/Κ/g, "Κ"), e = e.replace(/Λ/g, "Λ"), e = e.replace(/Μ/g, "Μ"), |
|||
e = e.replace(/Ν/g, "Ν"), e = e.replace(/Ξ/g, "Ν"), e = e.replace(/Ο/g, "Ο"), |
|||
e = e.replace(/Π/g, "Π"), e = e.replace(/Ρ/g, "Ρ"), e = e.replace(/Σ/g, "Σ"), |
|||
e = e.replace(/Τ/g, "Τ"), e = e.replace(/Υ/g, "Υ"), e = e.replace(/Φ/g, "Φ"), |
|||
e = e.replace(/Χ/g, "Χ"), e = e.replace(/Ψ/g, "Ψ"), e = e.replace(/Ω/g, "Ω"), |
|||
e = e.replace(/α/g, "α"), e = e.replace(/β/g, "β"), e = e.replace(/γ/g, "γ"), |
|||
e = e.replace(/δ/g, "δ"), e = e.replace(/ε/g, "ε"), e = e.replace(/ζ/g, "ζ"), |
|||
e = e.replace(/η/g, "η"), e = e.replace(/θ/g, "θ"), e = e.replace(/ι/g, "ι"), |
|||
e = e.replace(/κ/g, "κ"), e = e.replace(/λ/g, "λ"), e = e.replace(/μ/g, "μ"), |
|||
e = e.replace(/ν/g, "ν"), e = e.replace(/ξ/g, "ξ"), e = e.replace(/ο/g, "ο"), |
|||
e = e.replace(/π/g, "π"), e = e.replace(/ρ/g, "ρ"), e = e.replace(/ς/g, "ς"), |
|||
e = e.replace(/σ/g, "σ"), e = e.replace(/τ/g, "τ"), e = e.replace(/υ/g, "υ"), |
|||
e = e.replace(/φ/g, "φ"), e = e.replace(/χ/g, "χ"), e = e.replace(/ψ/g, "ψ"), |
|||
e = e.replace(/ω/g, "ω"), e = e.replace(/ϑ/g, "ϑ"), e = e.replace(/ϒ/g, "ϒ"), |
|||
e = e.replace(/ϖ/g, "ϖ"), e = e.replace(/·/g, "·"); |
|||
} |
|||
|
|||
function r(e) { |
|||
return e = e.replace(/ /g, " "), e = e.replace(/"/g, "'"), e = e.replace(/&/g, "&"), |
|||
e = e.replace(/</g, "<"), e = e.replace(/>/g, ">"), e = e.replace(/•/g, "•"); |
|||
} |
|||
|
|||
function l(e) { |
|||
return e = e.replace(/Œ/g, "Œ"), e = e.replace(/œ/g, "œ"), e = e.replace(/Š/g, "Š"), |
|||
e = e.replace(/š/g, "š"), e = e.replace(/Ÿ/g, "Ÿ"), e = e.replace(/ƒ/g, "ƒ"), |
|||
e = e.replace(/ˆ/g, "ˆ"), e = e.replace(/˜/g, "˜"), e = e.replace(/ /g, ""), |
|||
e = e.replace(/ /g, ""), e = e.replace(/ /g, ""), e = e.replace(/‌/g, ""), |
|||
e = e.replace(/‍/g, ""), e = e.replace(/‎/g, ""), e = e.replace(/‏/g, ""), |
|||
e = e.replace(/–/g, "–"), e = e.replace(/—/g, "—"), e = e.replace(/‘/g, "‘"), |
|||
e = e.replace(/’/g, "’"), e = e.replace(/‚/g, "‚"), e = e.replace(/“/g, "“"), |
|||
e = e.replace(/”/g, "”"), e = e.replace(/„/g, "„"), e = e.replace(/†/g, "†"), |
|||
e = e.replace(/‡/g, "‡"), e = e.replace(/•/g, "•"), e = e.replace(/…/g, "…"), |
|||
e = e.replace(/‰/g, "‰"), e = e.replace(/′/g, "′"), e = e.replace(/″/g, "″"), |
|||
e = e.replace(/‹/g, "‹"), e = e.replace(/›/g, "›"), e = e.replace(/‾/g, "‾"), |
|||
e = e.replace(/€/g, "€"), e = e.replace(/™/g, "™"), e = e.replace(/←/g, "←"), |
|||
e = e.replace(/↑/g, "↑"), e = e.replace(/→/g, "→"), e = e.replace(/↓/g, "↓"), |
|||
e = e.replace(/↔/g, "↔"), e = e.replace(/↵/g, "↵"), e = e.replace(/⌈/g, "⌈"), |
|||
e = e.replace(/⌉/g, "⌉"), e = e.replace(/⌊/g, "⌊"), e = e.replace(/⌋/g, "⌋"), |
|||
e = e.replace(/◊/g, "◊"), e = e.replace(/♠/g, "♠"), e = e.replace(/♣/g, "♣"), |
|||
e = e.replace(/♥/g, "♥"), e = e.replace(/♦/g, "♦"), e = e.replace(/'/g, "'"); |
|||
} |
|||
|
|||
function p(e) { |
|||
return e = e.replace(/\r\n/g, ""), e = e.replace(/\n/g, ""), e = e.replace(/code/g, "wxxxcode-style"); |
|||
} |
|||
|
|||
module.exports = { |
|||
strDiscode: function(c) { |
|||
return c = e(c), c = a(c), c = r(c), c = l(c), c = p(c); |
|||
}, |
|||
urlToHttpUrl: function(e, a) { |
|||
return new RegExp("^//").test(e) && (e = a + ":" + e), e; |
|||
} |
|||
}; |
|||
@ -0,0 +1,83 @@ |
|||
function e(e) { |
|||
return e && e.__esModule ? e : { |
|||
default: e |
|||
}; |
|||
} |
|||
|
|||
function t(e, t, a) { |
|||
return t in e ? Object.defineProperty(e, t, { |
|||
value: a, |
|||
enumerable: !0, |
|||
configurable: !0, |
|||
writable: !0 |
|||
}) : e[t] = a, e; |
|||
} |
|||
|
|||
function a(e) { |
|||
var t = this, a = e.target.dataset.src, i = e.target.dataset.from; |
|||
void 0 !== i && i.length > 0 && wx.previewImage({ |
|||
current: a, |
|||
urls: t.data[i].imageUrls |
|||
}); |
|||
} |
|||
|
|||
function i(e) { |
|||
var t = this, a = e.target.dataset.from, i = e.target.dataset.idx; |
|||
void 0 !== a && a.length > 0 && r(e, i, t, a); |
|||
} |
|||
|
|||
function r(e, a, i, r) { |
|||
var d, o = i.data[r]; |
|||
if (o && 0 != o.images.length) { |
|||
var s = o.images, l = n(e.detail.width, e.detail.height, i, r), g = s[a].index, h = "" + r, m = !0, u = !1, v = void 0; |
|||
try { |
|||
for (var f, w = g.split(".")[Symbol.iterator](); !(m = (f = w.next()).done); m = !0) h += ".nodes[" + f.value + "]"; |
|||
} catch (e) { |
|||
u = !0, v = e; |
|||
} finally { |
|||
try { |
|||
!m && w.return && w.return(); |
|||
} finally { |
|||
if (u) throw v; |
|||
} |
|||
} |
|||
var c = h + ".width", x = h + ".height"; |
|||
i.setData((d = {}, t(d, c, l.imageWidth), t(d, x, l.imageheight), d)); |
|||
} |
|||
} |
|||
|
|||
function n(e, t, a, i) { |
|||
var r = 0, n = 0, d = 0, o = {}, g = a.data[i].view.imagePadding; |
|||
return r = s - 2 * g, l, e > r ? (d = (n = r) * t / e, o.imageWidth = n, o.imageheight = d) : (o.imageWidth = e, |
|||
o.imageheight = t), o; |
|||
} |
|||
|
|||
var d = e(require("./showdown.js")), o = e(require("./html2json.js")), s = 0, l = 0; |
|||
|
|||
wx.getSystemInfo({ |
|||
success: function(e) { |
|||
s = e.windowWidth, l = e.windowHeight; |
|||
} |
|||
}), module.exports = { |
|||
wxParse: function() { |
|||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "wxParseData", t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "html", r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '<div class="color:red;">数据不能为空</div>', n = arguments[3], s = arguments[4], l = n, g = {}; |
|||
if ("html" == t) g = o.default.html2json(r, e); else if ("md" == t || "markdown" == t) { |
|||
var h = new d.default.Converter().makeHtml(r); |
|||
g = o.default.html2json(h, e); |
|||
} |
|||
g.view = {}, g.view.imagePadding = 0, void 0 !== s && (g.view.imagePadding = s); |
|||
var m = {}; |
|||
m[e] = g, l.setData(m), l.wxParseImgLoad = i, l.wxParseImgTap = a; |
|||
}, |
|||
wxParseTemArray: function(e, t, a, i) { |
|||
for (var r = [], n = i.data, d = null, o = 0; o < a; o++) { |
|||
var s = n[t + o].nodes; |
|||
r.push(s); |
|||
} |
|||
e = e || "wxParseTemArray", (d = JSON.parse('{"' + e + '":""}'))[e] = r, i.setData(d); |
|||
}, |
|||
emojisInit: function() { |
|||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "/wxParse/emojis/", a = arguments[2]; |
|||
o.default.emojisInit(e, t, a); |
|||
} |
|||
}; |
|||
@ -0,0 +1,386 @@ |
|||
<template name="wxParse11"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse12" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse12" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse12" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse12" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse12" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse10"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse11" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse11" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse11" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse11" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse11" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse9"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse10" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse10" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse10" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse10" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse10" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse8"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse9" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse9" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse9" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse9" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse9" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse7"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse8" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse8" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse8" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse8" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse8" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse6"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse7" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse7" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse7" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse7" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse7" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse5"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse6" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse6" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse6" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse6" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse6" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse4"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse5" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse5" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse5" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse5" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse5" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse3"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse4" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse4" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse4" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse4" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse4" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse2"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse3" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse3" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse3" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse3" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse3" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse1"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse2" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse2" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse2" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse2" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse2" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse0"> |
|||
<block wx:if="{{item.node=='element'}}"> |
|||
<button size="mini" type="default" wx:if="{{item.tag=='button'}}"> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</button> |
|||
<view class="{{item.classStr}} wxParse-li" style="{{item.styleStr}}" wx:elif="{{item.tag=='li'}}"> |
|||
<view class="{{item.classStr}} wxParse-li-inner"> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<view class="{{item.classStr}} wxParse-li-circle"></view> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-li-text"> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<template is="wxParseVideo" data="{{item:item}}" wx:elif="{{item.tag=='video'}}"></template> |
|||
<template is="wxParseImg" data="{{item:item}}" wx:elif="{{item.tag=='img'}}"></template> |
|||
<view bindtap="wxParseTagATap" class="wxParse-inline {{item.classStr}} wxParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='a'}}"> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tag=='table'}}"> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<template is="WxParseBr" data wx:elif="{{item.tag=='br'}}"></template> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}" wx:elif="{{item.tagType=='block'}}"> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}} wxParse-{{item.tagType}}" style="{{item.styleStr}}" wx:else> |
|||
<template is="wxParse1" data="{{item:item}}" wx:for="{{item.nodes}}"></template> |
|||
</view> |
|||
</block> |
|||
<template is="WxEmojiView" data="{{item:item}}" wx:elif="{{item.node=='text'}}"></template> |
|||
</template> |
|||
<template name="wxParse"> |
|||
<template is="wxParse0" data="{{item:item}}" wx:for="{{wxParseData}}"></template> |
|||
</template> |
|||
<template name="WxParseBr"> |
|||
<text> |
|||
</text> |
|||
</template> |
|||
<template name="WxEmojiView"> |
|||
<view class="WxEmojiView wxParse-inline" style="{{item.styleStr}}"> |
|||
<block wx:for="{{item.textArray}}"> |
|||
<block wx:if="{{item.node=='text'}}">{{item.text}}</block> |
|||
<image class="wxEmoji" src="{{item.baseSrc}}{{item.text}}" wx:elif="{{item.node=='element'}}"></image> |
|||
</block> |
|||
</view> |
|||
</template> |
|||
<template name="wxParseImg"> |
|||
<image bindload="wxParseImgLoad" bindtap="wxParseImgTap" class="{{item.classStr}} wxParse-{{item.tag}}" data-from="{{item.from}}" data-idx="{{item.imgIndex}}" data-src="{{item.attr.src}}" mode="widthFix" src="{{item.attr.src}}" style="width:{{item.width}}px;"></image> |
|||
</template> |
|||
<template name="wxParseVideo"> |
|||
<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}"> |
|||
<video class="{{item.classStr}} wxParse-{{item.tag}}-video" src="{{item.attr.src}}"></video> |
|||
</view> |
|||
</template> |
|||
@ -0,0 +1,250 @@ |
|||
.wxParse { |
|||
margin: 0 5px; |
|||
font-family: Helvetica,sans-serif; |
|||
font-size: 28rpx; |
|||
color: #666; |
|||
line-height: 1.8; |
|||
} |
|||
|
|||
view { |
|||
word-break: break-all; |
|||
overflow: auto; |
|||
} |
|||
|
|||
.wxParse-inline { |
|||
display: inline; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
.wxParse-div { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
.wxParse-h1 { |
|||
font-size: 2em; |
|||
margin: .67em 0; |
|||
} |
|||
|
|||
.wxParse-h2 { |
|||
font-size: 1.5em; |
|||
margin: .75em 0; |
|||
} |
|||
|
|||
.wxParse-h3 { |
|||
font-size: 1.17em; |
|||
margin: .83em 0; |
|||
} |
|||
|
|||
.wxParse-h4 { |
|||
margin: 1.12em 0; |
|||
} |
|||
|
|||
.wxParse-h5 { |
|||
font-size: .83em; |
|||
margin: 1.5em 0; |
|||
} |
|||
|
|||
.wxParse-h6 { |
|||
font-size: .75em; |
|||
margin: 1.67em 0; |
|||
} |
|||
|
|||
.wxParse-h1 { |
|||
font-size: 18px; |
|||
font-weight: 400; |
|||
margin-bottom: .9em; |
|||
} |
|||
|
|||
.wxParse-h2 { |
|||
font-size: 16px; |
|||
font-weight: 400; |
|||
margin-bottom: .34em; |
|||
} |
|||
|
|||
.wxParse-h3 { |
|||
font-weight: 400; |
|||
font-size: 15px; |
|||
margin-bottom: .34em; |
|||
} |
|||
|
|||
.wxParse-h4 { |
|||
font-weight: 400; |
|||
font-size: 14px; |
|||
margin-bottom: .24em; |
|||
} |
|||
|
|||
.wxParse-h5 { |
|||
font-weight: 400; |
|||
font-size: 13px; |
|||
margin-bottom: .14em; |
|||
} |
|||
|
|||
.wxParse-h6 { |
|||
font-weight: 400; |
|||
font-size: 12px; |
|||
margin-bottom: .04em; |
|||
} |
|||
|
|||
.wxParse-h1,.wxParse-h2,.wxParse-h3,.wxParse-h4,.wxParse-h5,.wxParse-h6,.wxParse-b,.wxParse-strong { |
|||
font-weight: bolder; |
|||
} |
|||
|
|||
.wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address { |
|||
font-style: italic; |
|||
} |
|||
|
|||
.wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp { |
|||
font-family: monospace; |
|||
} |
|||
|
|||
.wxParse-pre { |
|||
white-space: pre; |
|||
} |
|||
|
|||
.wxParse-big { |
|||
font-size: 1.17em; |
|||
} |
|||
|
|||
.wxParse-small,.wxParse-sub,.wxParse-sup { |
|||
font-size: .83em; |
|||
} |
|||
|
|||
.wxParse-sub { |
|||
vertical-align: sub; |
|||
} |
|||
|
|||
.wxParse-sup { |
|||
vertical-align: super; |
|||
} |
|||
|
|||
.wxParse-s,.wxParse-strike,.wxParse-del { |
|||
text-decoration: line-through; |
|||
} |
|||
|
|||
.wxParse-strong,.wxParse-s { |
|||
display: inline; |
|||
} |
|||
|
|||
.wxParse-a { |
|||
color: deepskyblue; |
|||
word-break: break-all; |
|||
overflow: auto; |
|||
} |
|||
|
|||
.wxParse-video { |
|||
text-align: center; |
|||
margin: 10px 0; |
|||
} |
|||
|
|||
.wxParse-video-video { |
|||
width: 100%; |
|||
} |
|||
|
|||
.wxParse-img { |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.wxParse-blockquote { |
|||
margin: 0; |
|||
padding: 10px 0 10px 5px; |
|||
font-family: Courier,Calibri,"宋体"; |
|||
background: #f5f5f5; |
|||
border-left: 3px solid #dbdbdb; |
|||
} |
|||
|
|||
.wxParse-code,.wxParse-wxxxcode-style { |
|||
display: inline; |
|||
background: #f5f5f5; |
|||
} |
|||
|
|||
.wxParse-ul { |
|||
margin: 20rpx 10rpx; |
|||
} |
|||
|
|||
.wxParse-li,.wxParse-li-inner { |
|||
display: flex; |
|||
align-items: baseline; |
|||
margin: 10rpx 0; |
|||
} |
|||
|
|||
.wxParse-li-text { |
|||
align-items: center; |
|||
line-height: 20px; |
|||
} |
|||
|
|||
.wxParse-li-circle { |
|||
display: inline-flex; |
|||
width: 5px; |
|||
height: 5px; |
|||
background-color: #333; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
.wxParse-li-square { |
|||
display: inline-flex; |
|||
width: 10rpx; |
|||
height: 10rpx; |
|||
background-color: #333; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
.wxParse-li-ring { |
|||
display: inline-flex; |
|||
width: 10rpx; |
|||
height: 10rpx; |
|||
border: 2rpx solid #333; |
|||
border-radius: 50%; |
|||
background-color: #fff; |
|||
margin-right: 5px; |
|||
} |
|||
|
|||
.wxParse-u { |
|||
text-decoration: underline; |
|||
} |
|||
|
|||
.wxParse-hide { |
|||
display: none; |
|||
} |
|||
|
|||
.WxEmojiView { |
|||
align-items: center; |
|||
} |
|||
|
|||
.wxEmoji { |
|||
width: 16px; |
|||
height: 16px; |
|||
} |
|||
|
|||
.wxParse-tr { |
|||
display: flex; |
|||
border-right: 1px solid #e0e0e0; |
|||
border-bottom: 1px solid #e0e0e0; |
|||
border-top: 1px solid #e0e0e0; |
|||
} |
|||
|
|||
.wxParse-th,.wxParse-td { |
|||
flex: 1; |
|||
padding: 5px; |
|||
font-size: 28rpx; |
|||
border-left: 1px solid #e0e0e0; |
|||
word-break: break-all; |
|||
} |
|||
|
|||
.wxParse-td:last { |
|||
border-top: 1px solid #e0e0e0; |
|||
} |
|||
|
|||
.wxParse-th { |
|||
background: #f0f0f0; |
|||
border-top: 1px solid #e0e0e0; |
|||
} |
|||
|
|||
.wxParse-del { |
|||
display: inline; |
|||
} |
|||
|
|||
.wxParse-figure { |
|||
overflow: hidden; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
var e = { |
|||
title: "资源邦-www.wazyb.com", |
|||
uniacid: "23", |
|||
acid: "25", |
|||
multiid: "0", |
|||
version: "2.15", |
|||
siteroot: "https://xcx.zgzmdz.com/app/index.php", |
|||
design_method: "9.6", |
|||
redirect_module: "", |
|||
template: "" |
|||
}; |
|||
|
|||
module.exports = e; |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", |
|||
"rules": [{ |
|||
"action": "allow", |
|||
"page": "*" |
|||
}] |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
var e = getApp(); |
|||
|
|||
Page({ |
|||
data: { |
|||
navs: [], |
|||
slide: [], |
|||
commend: [], |
|||
userInfo: {} |
|||
}, |
|||
onLoad: function() { |
|||
var s = this; |
|||
e.util.footer(s), e.util.request({ |
|||
url: "wxapp/home/nav", |
|||
cachetime: "30", |
|||
success: function(e) { |
|||
e.data.message.errno || (console.log(e.data.message.message), s.setData({ |
|||
navs: e.data.message.message |
|||
})); |
|||
} |
|||
}), e.util.request({ |
|||
url: "wxapp/home/slide", |
|||
cachetime: "30", |
|||
success: function(e) { |
|||
e.data.message.errno || s.setData({ |
|||
slide: e.data.message.message |
|||
}); |
|||
} |
|||
}), e.util.request({ |
|||
url: "wxapp/home/commend", |
|||
cachetime: "30", |
|||
success: function(e) { |
|||
e.data.message.errno || s.setData({ |
|||
commend: e.data.message.message |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
@ -0,0 +1 @@ |
|||
{} |
|||
@ -0,0 +1,28 @@ |
|||
<view class="container"> |
|||
<view class="swiper"> |
|||
<swiper autoplay="true" duration="1200" indicatorDots="true" interval="3000"> |
|||
<swiper-item wx:for="{{slide}}" wx:key="{{index}}"> |
|||
<image class="nav-icon" mode="aspectFill" src="{{item.thumb}}"></image> |
|||
</swiper-item> |
|||
</swiper> |
|||
</view> |
|||
<view class="nav"> |
|||
<navigator class="nav-item {{(index+1)%3==0?'nav-item-no-border':''}}" hoverClass="navigator-hover" url="{{item.url}}" wx:for="{{navs}}" wx:key="{{index}}"> |
|||
<image class="nav-icon" src="{{item.icon}}"></image> |
|||
<view class="nav-title">{{item.name}}</view> |
|||
</navigator> |
|||
</view> |
|||
<view class="commend"> |
|||
<block wx:for="{{commend}}" wx:key="{{index}}"> |
|||
<view class="commend-header-title">{{item.name}}</view> |
|||
<view class="commend-column"> |
|||
<navigator class="commend-item" hoverClass="navigator-hover" wx:for="{{item.article}}" wx:for-item="subItem"> |
|||
<image class="commend-thumb" src="{{subItem.thumb}}"></image> |
|||
<view class="commend-title">{{subItem.title}}</view> |
|||
</navigator> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
<import src="/we7/pages/templates/footer.wxml"></import> |
|||
<template is="footerWx" data="{{...tabBar}}"></template> |
|||
@ -0,0 +1,86 @@ |
|||
.container { |
|||
background: #e6e6e6; |
|||
} |
|||
|
|||
.nav { |
|||
display: flex; |
|||
flex-direction: row; |
|||
flex-wrap: wrap; |
|||
background-color: #fff; |
|||
width: 100%; |
|||
} |
|||
|
|||
.nav-item { |
|||
width: 248rpx; |
|||
height: 237rpx; |
|||
border: #c9c9c9 solid 1px; |
|||
color: #fff; |
|||
flex-direction: column; |
|||
text-align: center; |
|||
border-left: none; |
|||
border-top: none; |
|||
} |
|||
|
|||
.nav-item.nav-item-no-border { |
|||
border-right: none; |
|||
} |
|||
|
|||
.nav-item .nav-icon { |
|||
width: 118rpx; |
|||
height: 118rpx; |
|||
align-items: center; |
|||
margin-top: 38rpx; |
|||
} |
|||
|
|||
.nav-item .nav-title,.commend-item .commend-title { |
|||
color: #000; |
|||
margin-top: 20rpx; |
|||
font-size: 24rpx; |
|||
} |
|||
|
|||
.swiper { |
|||
width: 100%; |
|||
height: 350rpx; |
|||
} |
|||
|
|||
.swiper swiper { |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.swiper image { |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.commend { |
|||
width: 100%; |
|||
text-align: center; |
|||
flex-wrap: wrap; |
|||
margin-top: 20rpx; |
|||
background: #fff; |
|||
} |
|||
|
|||
.commend .commend-column { |
|||
display: flex; |
|||
} |
|||
|
|||
.commend .commend-header-title { |
|||
text-align: left; |
|||
line-height: 98rpx; |
|||
font-size: 30rpx; |
|||
padding-left: 15rpx; |
|||
} |
|||
|
|||
.commend .commend-item { |
|||
display: flex; |
|||
flex-direction: column; |
|||
border-right: #c9c9c9 solid 1px; |
|||
padding-bottom: 60rpx; |
|||
width: 372rpx; |
|||
} |
|||
|
|||
.commend .commend-item image { |
|||
width: 100%; |
|||
height: 210rpx; |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
var e = getApp(), o = require("../../resource/js/htmlToWxml.js"); |
|||
|
|||
Page({ |
|||
data: { |
|||
scrollHeight: 0, |
|||
newsData: {} |
|||
}, |
|||
getNewsDetail: function() { |
|||
var n = this; |
|||
wx.request({ |
|||
url: "https://wedengta.com/wxnews/getNews?action=DiscNewsContent&type=4&id=1478677877_1406730_1_9", |
|||
headers: { |
|||
"Content-Type": "application/json" |
|||
}, |
|||
success: function(t) { |
|||
var s = t.data; |
|||
if (0 == s.ret) { |
|||
var a = JSON.parse(s.content); |
|||
a.content = o.html2json(a.sContent), a.time = e.util.formatTime(1e3 * a.iTime), |
|||
n.setData({ |
|||
newsData: a |
|||
}); |
|||
} else console.log("数据拉取失败"); |
|||
}, |
|||
fail: function(e) { |
|||
console.log("数据拉取失败"); |
|||
} |
|||
}); |
|||
}, |
|||
stockClick: function(e) { |
|||
var o = e.currentTarget.dataset.seccode, n = e.currentTarget.dataset.secname; |
|||
console.log("stockClick:" + o + ";secName:" + n); |
|||
}, |
|||
onLoad: function(e) { |
|||
this.getNewsDetail(), console.log("onLoad"); |
|||
}, |
|||
onShow: function() { |
|||
console.log("onShow"); |
|||
}, |
|||
onReady: function() { |
|||
console.log("onReady"); |
|||
}, |
|||
onHide: function() { |
|||
console.log("onHide"); |
|||
}, |
|||
onUnload: function() { |
|||
console.log("onUnload"); |
|||
} |
|||
}); |
|||
@ -0,0 +1,15 @@ |
|||
<import src="/we7/pages/templates/news.wxml"></import> |
|||
<view class="page_gap page_news"> |
|||
<text class="h1" id="newsTitle">{{newsData.sTitle}}</text> |
|||
<view class="news_info"> |
|||
<text class="span" id="newsAuthor">{{newsData.sFrom}}</text> |
|||
<text class="span" id="newsDate">{{newsData.time}}</text> |
|||
</view> |
|||
<view id="font-adjust"> |
|||
<view class="news_relative" id="newsRelative"></view> |
|||
<view class="summary_block" id="summary">{{newsData.sDescription}}</view> |
|||
<view class="news_txt" id="newsContent"> |
|||
<template is="newsDetail" data="{{...newsData}}"></template> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,109 @@ |
|||
.page_gap { |
|||
padding: 16px 15px; |
|||
} |
|||
|
|||
.page_news { |
|||
background-color: #fff; |
|||
} |
|||
|
|||
.page_news a { |
|||
color: #106fbc; |
|||
} |
|||
|
|||
.page_news .h1 { |
|||
font-size: 21px; |
|||
margin-bottom: 11px; |
|||
line-height: 1.3; |
|||
color: #373737; |
|||
font-weight: bold; |
|||
letter-spacing: 0.5px; |
|||
display: block; |
|||
} |
|||
|
|||
.news_info { |
|||
float: left; |
|||
font-size: 12px; |
|||
margin-bottom: 15px; |
|||
color: rgba(89,89,89,0.6); |
|||
} |
|||
|
|||
.news_info .span { |
|||
margin-right: 8px; |
|||
display: inline-block; |
|||
} |
|||
|
|||
.summary_block { |
|||
background-color: #ececec; |
|||
font-size: 14px; |
|||
line-height: 1.8; |
|||
text-indent: 30px; |
|||
box-sizing: border-box; |
|||
padding: 10px; |
|||
position: relative; |
|||
margin-bottom: 20px; |
|||
word-break: break-all; |
|||
border-radius: 0 3px 3px 3px; |
|||
text-align: justify; |
|||
} |
|||
|
|||
.summary_block:before { |
|||
content: "摘要"; |
|||
display: inline-block; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
border-radius: 0 3px 3px 0; |
|||
background-color: #f79464; |
|||
color: #fff; |
|||
z-index: 10; |
|||
text-indent: 0; |
|||
font-size: 12px; |
|||
padding: 0 4px; |
|||
line-height: 1.6; |
|||
} |
|||
|
|||
.news_relative { |
|||
font-size: 12px; |
|||
margin-bottom: 13px; |
|||
clear: both; |
|||
} |
|||
|
|||
.news_relative p { |
|||
line-height: 1.7; |
|||
} |
|||
|
|||
.news_relative p span { |
|||
color: rgba(89,89,89,0.6); |
|||
} |
|||
|
|||
.news_relative p a { |
|||
margin-right: 10px; |
|||
} |
|||
|
|||
.news_txt { |
|||
font-size: 16px; |
|||
line-height: 1.8; |
|||
word-break: break-all; |
|||
padding-bottom: 30px; |
|||
color: rgb(37,37,37); |
|||
} |
|||
|
|||
.news_txt .div { |
|||
margin-bottom: 12px; |
|||
text-align: justify; |
|||
} |
|||
|
|||
.news_txt .a { |
|||
color: #106fbc; |
|||
position: relative; |
|||
} |
|||
|
|||
.news_txt .b { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.news_txt .img { |
|||
width: 100%; |
|||
display: block; |
|||
padding: 5px; |
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
var e = require("../utils/util"), t = "http://japi.zto.cn/zto/api_utf8/baseArea?msg_type=GET_AREA&data=", a = { |
|||
addDot: function(e) { |
|||
e instanceof Array && e.map(function(e) { |
|||
return e.fullName.length > 4 ? (e.fullNameDot = e.fullName.slice(0, 4) + "...", |
|||
e) : (e.fullNameDot = e.fullName, e); |
|||
}); |
|||
}, |
|||
load: function(d) { |
|||
d.setData({ |
|||
isShow: !1 |
|||
}), (0, e.Promise)(wx.request, { |
|||
url: t + "0", |
|||
method: "GET" |
|||
}).then(function(l) { |
|||
var c = l.data.result[0]; |
|||
return a.addDot(l.data.result), d.setData({ |
|||
proviceData: l.data.result, |
|||
"selectedProvince.index": 0, |
|||
"selectedProvince.code": c.code, |
|||
"selectedProvince.fullName": c.fullName |
|||
}), (0, e.Promise)(wx.request, { |
|||
url: t + c.code, |
|||
method: "GET" |
|||
}); |
|||
}).then(function(l) { |
|||
var c = l.data.result[0]; |
|||
return a.addDot(l.data.result), d.setData({ |
|||
cityData: l.data.result, |
|||
"selectedCity.index": 0, |
|||
"selectedCity.code": c.code, |
|||
"selectedCity.fullName": c.fullName |
|||
}), (0, e.Promise)(wx.request, { |
|||
url: t + c.code, |
|||
method: "GET" |
|||
}); |
|||
}).then(function(e) { |
|||
var t = e.data.result[0]; |
|||
a.addDot(e.data.result), d.setData({ |
|||
districtData: e.data.result, |
|||
"selectedDistrict.index": 0, |
|||
"selectedDistrict.code": t.code, |
|||
"selectedDistrict.fullName": t.fullName |
|||
}); |
|||
}).catch(function(e) { |
|||
console.log(e); |
|||
}); |
|||
}, |
|||
tapProvince: function(d, l) { |
|||
var c = d.currentTarget.dataset; |
|||
(0, e.Promise)(wx.request, { |
|||
url: t + c.code, |
|||
method: "GET" |
|||
}).then(function(d) { |
|||
return a.addDot(d.data.result), l.setData({ |
|||
cityData: d.data.result, |
|||
"selectedProvince.code": c.code, |
|||
"selectedProvince.fullName": c.fullName, |
|||
"selectedCity.code": d.data.result[0].code, |
|||
"selectedCity.fullName": d.data.result[0].fullName |
|||
}), (0, e.Promise)(wx.request, { |
|||
url: t + d.data.result[0].code, |
|||
method: "GET" |
|||
}); |
|||
}).then(function(e) { |
|||
a.addDot(e.data.result), l.setData({ |
|||
districtData: e.data.result, |
|||
"selectedProvince.index": d.currentTarget.dataset.index, |
|||
"selectedCity.index": 0, |
|||
"selectedDistrict.index": 0, |
|||
"selectedDistrict.code": e.data.result[0].code, |
|||
"selectedDistrict.fullName": e.data.result[0].fullName |
|||
}); |
|||
}).catch(function(e) { |
|||
console.log(e); |
|||
}); |
|||
}, |
|||
tapCity: function(d, l) { |
|||
var c = d.currentTarget.dataset; |
|||
(0, e.Promise)(wx.request, { |
|||
url: t + c.code, |
|||
method: "GET" |
|||
}).then(function(e) { |
|||
a.addDot(e.data.result), l.setData({ |
|||
districtData: e.data.result, |
|||
"selectedCity.index": d.currentTarget.dataset.index, |
|||
"selectedCity.code": c.code, |
|||
"selectedCity.fullName": c.fullName, |
|||
"selectedDistrict.index": 0, |
|||
"selectedDistrict.code": e.data.result[0].code, |
|||
"selectedDistrict.fullName": e.data.result[0].fullName |
|||
}); |
|||
}).catch(function(e) { |
|||
console.log(e); |
|||
}); |
|||
}, |
|||
tapDistrict: function(e, t) { |
|||
var a = e.currentTarget.dataset; |
|||
t.setData({ |
|||
"selectedDistrict.index": e.currentTarget.dataset.index, |
|||
"selectedDistrict.code": a.code, |
|||
"selectedDistrict.fullName": a.fullName |
|||
}); |
|||
}, |
|||
confirm: function(e, t) { |
|||
t.setData({ |
|||
address: t.data.selectedProvince.fullName + " " + t.data.selectedCity.fullName + " " + t.data.selectedDistrict.fullName, |
|||
isShow: !1 |
|||
}); |
|||
}, |
|||
cancel: function(e) { |
|||
e.setData({ |
|||
isShow: !1 |
|||
}); |
|||
}, |
|||
choosearea: function(e) { |
|||
e.setData({ |
|||
isShow: !0 |
|||
}); |
|||
} |
|||
}; |
|||
|
|||
module.exports = { |
|||
SA: a |
|||
}; |
|||
@ -0,0 +1,19 @@ |
|||
<view class="shade {{isShow?'show':''}}"> |
|||
<view class="selector-area box box-tb"> |
|||
<view class="handle-bar box box-lr box-align-center"> |
|||
<text bindtap="cancel" class="btn cancel flex">取消</text> |
|||
<text bindtap="confirm" class="btn confirm flex">确定</text> |
|||
</view> |
|||
<view class="area-selector box box-lr"> |
|||
<scroll-view class="selector province flex" data-type="province" scrollY="true"> |
|||
<view bindtap="tapProvince" class="picker {{selectedProvince.index==index?'actived':''}}" data-code="{{item.code}}" data-full-name="{{item.fullName}}" data-index="{{index}}" wx:for="{{proviceData}}">{{item.fullNameDot}}</view> |
|||
</scroll-view> |
|||
<scroll-view class="selector city flex" data-type="city" scrollY="true"> |
|||
<view bindtap="tapCity" class="picker {{selectedCity.index==index?'actived':''}}" data-code="{{item.code}}" data-full-name="{{item.fullName}}" data-index="{{index}}" wx:for="{{cityData}}">{{item.fullNameDot}}</view> |
|||
</scroll-view> |
|||
<scroll-view class="selector district flex" data-type="district" scrollY="true"> |
|||
<view bindtap="tapDistrict" class="picker {{selectedDistrict.index==index?'actived':''}}" data-code="{{item.code}}" data-full-name="{{item.fullName}}" data-index="{{index}}" wx:for="{{districtData}}">{{item.fullNameDot}}</view> |
|||
</scroll-view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,59 @@ |
|||
.shade { |
|||
background-color: #ccc; |
|||
opacity: .6; |
|||
position: absolute; |
|||
display: none; |
|||
left: 0; |
|||
top: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.show { |
|||
display: block; |
|||
} |
|||
|
|||
.handle-bar { |
|||
padding: 0 15px; |
|||
height: 80rpx; |
|||
background-color: #eee; |
|||
} |
|||
|
|||
.confirm { |
|||
text-align: right; |
|||
} |
|||
|
|||
.selector-area { |
|||
height: 600rpx; |
|||
width: 100%; |
|||
background-color: #e6ebf3; |
|||
position: absolute; |
|||
bottom: 0; |
|||
} |
|||
|
|||
.selector { |
|||
text-align: center; |
|||
} |
|||
|
|||
.picker { |
|||
font-size: 32rpx; |
|||
height: 60rpx; |
|||
line-height: 60rpx; |
|||
} |
|||
|
|||
.actived { |
|||
color: blue; |
|||
} |
|||
|
|||
.area-selector { |
|||
height: 520rpx; |
|||
} |
|||
|
|||
.white-shade { |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 60rpx; |
|||
background-color: #fff; |
|||
left: 0; |
|||
margin-top: 240rpx; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
<template name="goHome"> |
|||
<navigator class="goHome" hoverClass="active" openType="redirect" url="/we7/pages/index/index"> |
|||
<image mode="widthFix" src="/we7/resource/images/home.png"></image> |
|||
</navigator> |
|||
</template> |
|||
<template name="footerWx"> |
|||
<view class="we7-bottom" style="background-color:{{backgroundColor}};border-color:{{borderStyle}}" wx:if="{{list}}"> |
|||
<block wx:for="{{list}}" wx:key="{{index}}"> |
|||
<view class="we7-bottom-item" hoverClass="active" wx:if="{{item.pageUrl=='/'+thisurl}}"> |
|||
<navigator hoverClass="active" openType="redirect" url="{{item.pagePath}}"> |
|||
<image class="item-img" mode="widthFix" src="{{item.selectedIconPath}}"></image> |
|||
<view class="item-text" style="color: {{selectedColor}};">{{item.text}}</view> |
|||
</navigator> |
|||
</view> |
|||
<view class="we7-bottom-item" hoverClass="active" wx:else> |
|||
<navigator hoverClass="active" openType="redirect" url="{{item.pagePath}}"> |
|||
<image class="item-img" mode="widthFix" src="{{item.iconPath}}"></image> |
|||
<view class="item-text" style="color: {{color}}">{{item.text}}</view> |
|||
</navigator> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
<view class="we7-bottom-placeholder"></view> |
|||
</template> |
|||
@ -0,0 +1,14 @@ |
|||
<template name="newsDetail"> |
|||
<block wx:for="{{content}}" wx:for-index="idy" wx:for-item="cellData"> |
|||
<view class="p" wx:if="{{cellData.type=='view'}}"> |
|||
<block wx:for="{{cellData.child}}" wx:key="text"> |
|||
<text bindtap="stockClick" class="a" data-seccode="{{item.attr['data-seccode']}}" data-secname="{{item.attr['data-secname']}}" wx:if="{{item.type=='a'}}">{{item.text}}</text> |
|||
<text wx:else>{{item.text}}</text> |
|||
</block> |
|||
</view> |
|||
<block wx:if="{{cellData.type=='img'}}"> |
|||
{{wn_html_images}} |
|||
<image bindload="imageLoad" class="img" data-index="{{idy}}" mode="widthFix" src="{{cellData.attr.src}}" style="width: {{cellData['attr']['width']}};max-width: 100%;height: {{cellData['attr']['height']?cellData['attr']['height']:auto}}"></image> |
|||
</block> |
|||
</block> |
|||
</template> |
|||
@ -0,0 +1,14 @@ |
|||
var n = getApp(); |
|||
|
|||
Page({ |
|||
data: { |
|||
text: "微擎我的" |
|||
}, |
|||
onLoad: function(o) { |
|||
n.util.footer(this); |
|||
}, |
|||
onReady: function() {}, |
|||
onShow: function() {}, |
|||
onHide: function() {}, |
|||
onUnload: function() {} |
|||
}); |
|||
@ -0,0 +1 @@ |
|||
{} |
|||
@ -0,0 +1,7 @@ |
|||
<view class="container"> |
|||
<view class="textContainer"> |
|||
<text class="textStyle">{{text}}</text> |
|||
</view> |
|||
</view> |
|||
<import src="/we7/pages/templates/footer.wxml"></import> |
|||
<template is="footerWx" data="{{...tabBar}}"></template> |
|||
@ -0,0 +1,19 @@ |
|||
.container { |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 200rpx 0; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.textStyle { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
|||
|
|||
.textContainer { |
|||
margin-top: 200px; |
|||
} |
|||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |