Browse Source

Initial Commit

master
陈玉麟 4 years ago
commit
eaf91e62f2
  1. 14
      .gitignore
  2. 28
      app.js
  3. 16
      app.json
  4. 1333
      app.wxss
  5. 82
      project.config.json
  6. 851
      qf_happyvote/pages/index/index.js
  7. 1
      qf_happyvote/pages/index/index.json
  8. 40
      qf_happyvote/pages/index/index.wxml
  9. 1563
      qf_happyvote/pages/index/index.wxss
  10. 6
      qf_happyvote/pages/templates/checking.wxml
  11. 0
      qf_happyvote/pages/templates/checking.wxss
  12. 124
      qf_happyvote/pages/templates/detail.wxml
  13. 0
      qf_happyvote/pages/templates/detail.wxss
  14. 40
      qf_happyvote/pages/templates/footer.wxml
  15. 0
      qf_happyvote/pages/templates/footer.wxss
  16. 119
      qf_happyvote/pages/templates/index.wxml
  17. 0
      qf_happyvote/pages/templates/index.wxss
  18. 97
      qf_happyvote/pages/templates/join.wxml
  19. 0
      qf_happyvote/pages/templates/join.wxss
  20. 15
      qf_happyvote/pages/templates/joinok.wxml
  21. 0
      qf_happyvote/pages/templates/joinok.wxss
  22. 128
      qf_happyvote/pages/templates/mall.wxml
  23. 4
      qf_happyvote/pages/templates/mall.wxss
  24. 145
      qf_happyvote/pages/templates/ranking.wxml
  25. 0
      qf_happyvote/pages/templates/ranking.wxss
  26. 9
      qf_happyvote/pages/templates/rule.wxml
  27. 0
      qf_happyvote/pages/templates/rule.wxss
  28. 9
      qf_happyvote/pages/test/test.js
  29. 15
      qf_happyvote/pages/test/test.wxml
  30. 0
      qf_happyvote/pages/test/test.wxss
  31. 78
      qf_happyvote/pages/web-view/index.js
  32. 3
      qf_happyvote/pages/web-view/index.json
  33. 2
      qf_happyvote/pages/web-view/index.wxml
  34. 1
      qf_happyvote/pages/web-view/index.wxss
  35. 42
      qf_happyvote/resource/font/iconfont.js
  36. 72
      qf_happyvote/resource/font/iconfont.svg
  37. BIN
      qf_happyvote/resource/icon/checking.png
  38. BIN
      qf_happyvote/resource/icon/like_white.png
  39. BIN
      qf_happyvote/resource/icon/ok.png
  40. BIN
      qf_happyvote/resource/icon/quotesleft.png
  41. BIN
      qf_happyvote/resource/icon/quotesright.png
  42. BIN
      qf_happyvote/resource/icon/ranking1.png
  43. BIN
      qf_happyvote/resource/icon/ranking2.png
  44. BIN
      qf_happyvote/resource/icon/ranking3.png
  45. BIN
      qf_happyvote/resource/icon/share.png
  46. BIN
      qf_happyvote/resource/icon/shijian.png
  47. BIN
      qf_happyvote/resource/icon/shuqian.png
  48. BIN
      qf_happyvote/resource/icon/tishi.png
  49. BIN
      qf_happyvote/resource/image/flex.png
  50. BIN
      qf_happyvote/resource/image/iconfont-tianjia.png
  51. BIN
      qf_happyvote/resource/image/l0g0.png
  52. BIN
      qf_happyvote/resource/image/mg.png
  53. BIN
      qf_happyvote/resource/image/music.png
  54. BIN
      qf_happyvote/resource/image/music_off.png
  55. BIN
      qf_happyvote/resource/image/none.png
  56. BIN
      qf_happyvote/resource/image/reply.png
  57. BIN
      qf_happyvote/resource/image/tx.png
  58. 624
      qf_happyvote/resource/js/function.js
  59. 1
      qf_happyvote/resource/js/lanch.js
  60. 103
      qf_happyvote/resource/wxParse/html2json.js
  61. 48
      qf_happyvote/resource/wxParse/htmlparser.js
  62. 693
      qf_happyvote/resource/wxParse/showdown.js
  63. 74
      qf_happyvote/resource/wxParse/wxDiscode.js
  64. 83
      qf_happyvote/resource/wxParse/wxParse.js
  65. 386
      qf_happyvote/resource/wxParse/wxParse.wxml
  66. 250
      qf_happyvote/resource/wxParse/wxParse.wxss
  67. 13
      siteinfo.js
  68. 7
      sitemap.json
  69. 38
      we7/pages/index/index.js
  70. 1
      we7/pages/index/index.json
  71. 28
      we7/pages/index/index.wxml
  72. 86
      we7/pages/index/index.wxss
  73. 49
      we7/pages/newsDetail/newsDetail.js
  74. 15
      we7/pages/newsDetail/newsDetail.wxml
  75. 109
      we7/pages/newsDetail/newsDetail.wxss
  76. 124
      we7/pages/selectarea/selectarea.js
  77. 19
      we7/pages/selectarea/selectarea.wxml
  78. 59
      we7/pages/selectarea/selectarea.wxss
  79. 24
      we7/pages/templates/footer.wxml
  80. 0
      we7/pages/templates/footer.wxss
  81. 14
      we7/pages/templates/news.wxml
  82. 0
      we7/pages/templates/news.wxss
  83. 14
      we7/pages/user/index/index.js
  84. 1
      we7/pages/user/index/index.json
  85. 7
      we7/pages/user/index/index.wxml
  86. 19
      we7/pages/user/index/index.wxss
  87. BIN
      we7/resource/icon/home.png
  88. BIN
      we7/resource/icon/homeselect.png
  89. BIN
      we7/resource/icon/hotel.png
  90. BIN
      we7/resource/icon/hotelselect.png
  91. BIN
      we7/resource/icon/img_1.png
  92. BIN
      we7/resource/icon/img_2.png
  93. BIN
      we7/resource/icon/img_3.png
  94. BIN
      we7/resource/icon/img_4.png
  95. BIN
      we7/resource/icon/order.png
  96. BIN
      we7/resource/icon/orderselect.png
  97. BIN
      we7/resource/icon/pay.png
  98. BIN
      we7/resource/icon/payselect.png
  99. BIN
      we7/resource/icon/todo.png
  100. BIN
      we7/resource/icon/todoselect.png

14
.gitignore

@ -0,0 +1,14 @@
# Windows
[Dd]esktop.ini
Thumbs.db
$RECYCLE.BIN/
# macOS
.DS_Store
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
# Node.js
node_modules/

28
app.js

@ -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")
});

16
app.json

@ -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"
}

1333
app.wxss

File diff suppressed because it is too large

82
project.config.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
}
]
}
}
}

851
qf_happyvote/pages/index/index.js

@ -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);
}
});

1
qf_happyvote/pages/index/index.json

@ -0,0 +1 @@
{}

40
qf_happyvote/pages/index/index.wxml

@ -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>

1563
qf_happyvote/pages/index/index.wxss

File diff suppressed because it is too large

6
qf_happyvote/pages/templates/checking.wxml

@ -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
qf_happyvote/pages/templates/checking.wxss

124
qf_happyvote/pages/templates/detail.wxml

@ -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
qf_happyvote/pages/templates/detail.wxss

40
qf_happyvote/pages/templates/footer.wxml

@ -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
qf_happyvote/pages/templates/footer.wxss

119
qf_happyvote/pages/templates/index.wxml

@ -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
qf_happyvote/pages/templates/index.wxss

97
qf_happyvote/pages/templates/join.wxml

@ -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
qf_happyvote/pages/templates/join.wxss

15
qf_happyvote/pages/templates/joinok.wxml

@ -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
qf_happyvote/pages/templates/joinok.wxss

128
qf_happyvote/pages/templates/mall.wxml

@ -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>

4
qf_happyvote/pages/templates/mall.wxss

@ -0,0 +1,4 @@
@import "../../resource/wxParse/wxParse.wxss";
.timebox {
background-color: red;
}

145
qf_happyvote/pages/templates/ranking.wxml

@ -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
qf_happyvote/pages/templates/ranking.wxss

9
qf_happyvote/pages/templates/rule.wxml

@ -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
qf_happyvote/pages/templates/rule.wxss

9
qf_happyvote/pages/test/test.js

@ -0,0 +1,9 @@
Page({
data: {
toView: "red",
scrollTop: 100
},
onPullDownRefresh: function(o) {
console.log("111");
}
});

15
qf_happyvote/pages/test/test.wxml

@ -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
qf_happyvote/pages/test/test.wxss

78
qf_happyvote/pages/web-view/index.js

@ -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 () {
}
})

3
qf_happyvote/pages/web-view/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

2
qf_happyvote/pages/web-view/index.wxml

@ -0,0 +1,2 @@
<!--pages/web-view/index.wxml-->
<web-view src="{{url}}"></web-view>

1
qf_happyvote/pages/web-view/index.wxss

@ -0,0 +1 @@
/* qf_happyvote/pages/web-view/index.wxss */

42
qf_happyvote/resource/font/iconfont.js

File diff suppressed because one or more lines are too long

72
qf_happyvote/resource/font/iconfont.svg

@ -0,0 +1,72 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="huodongguize" unicode="&#58965;" d="M511.806083 746.844048c61.822021 0 119.823016-11.790534 174.000939-35.372625 54.151317-23.638373 101.369735-55.517431 141.574413-95.746668 40.204677-40.177048 72.136947-87.559195 95.719038-142.094252 23.582091-54.475705 35.401278-112.613824 35.401278-174.463474 0-61.793368-11.819187-119.819946-35.401278-173.971263-23.582091-54.206576-55.514361-101.370759-95.719038-141.601019-40.204677-40.229237-87.423095-72.109318-141.574413-95.691409-54.177923-23.638373-112.178919-35.428907-174.000939-35.428907-61.818951 0-119.956046 11.790534-174.488033 35.428907-54.478775 23.582091-101.861946 55.461149-142.066623 95.691409-40.232306 40.23026-72.136947 87.394443-95.719038 141.601019C75.922668 179.347083 64.132134 237.373661 64.132134 299.166005c0 61.84965 11.790534 119.986745 35.401278 174.463474 23.582091 54.534034 55.486732 101.917204 95.719038 142.094252 40.204677 40.229237 87.586824 72.109318 142.066623 95.746668C391.850038 735.05249 449.988156 746.844048 511.806083 746.844048L511.806083 746.844048zM565.658595 361.015655c0 15.940041-5.15951 29.368888-15.44783 40.33873-10.317996 10.973936-23.091928 16.488533-38.404682 16.488533-15.284101 0-28.248368-5.514597-38.891775-16.488533-10.617825-10.970866-15.940041-24.399713-15.940041-40.33873l0-334.023516c0-15.939017 5.322216-28.768207 15.940041-38.430264 10.643408-9.607822 23.607674-14.411221 38.891775-14.411221 15.312754 0 28.251438 4.967128 38.894845 14.902408 10.645454 9.990538 15.940041 22.980387 15.940041 38.919405L565.658595 361.015655zM511.806083 484.659697c19.298532 0 35.728736 6.769171 49.375547 20.412912 13.5936 13.649881 20.415982 30.079062 20.415982 49.347918 0 19.270902-6.822382 35.756365-20.415982 49.347918-13.646811 13.649881-30.077016 20.47124-49.375547 20.47124-19.267832 0-35.890418-6.822382-49.864688-20.47124-13.94664-13.591553-20.906146-30.077016-20.906146-49.347918 0-19.268856 6.959505-35.698037 20.906146-49.347918C475.915665 491.427844 492.538251 484.659697 511.806083 484.659697L511.806083 484.659697zM511.806083 484.659697" horiz-adv-x="1024" />
<glyph glyph-name="huodongguize1" unicode="&#58966;" d="M512.489652 747.184809c61.822021 0 119.823016-11.790534 174.000939-35.372625 54.151317-23.638373 101.369735-55.517431 141.574413-95.746668 40.204677-40.177048 72.136947-87.559195 95.719038-142.094252 23.582091-54.475705 35.401278-112.613824 35.401278-174.463474 0-61.793368-11.819187-119.819946-35.401278-173.971263-23.582091-54.206576-55.514361-101.370759-95.719038-141.601019-40.204677-40.229237-87.423095-72.109318-141.574413-95.691409-54.177923-23.639396-112.179942-35.428907-174.000939-35.428907-61.818951 0-119.957069 11.789511-174.489056 35.428907-54.477752 23.582091-101.860922 55.461149-142.0656 95.691409-40.232306 40.23026-72.136947 87.394443-95.719038 141.601019-23.609721 54.151317-35.401278 112.177895-35.401278 173.97024 0 61.84965 11.790534 119.986745 35.402301 174.463474 23.582091 54.534034 55.486732 101.917204 95.719038 142.094252 40.204677 40.229237 87.586824 72.109318 142.0656 95.746668C392.533606 735.393251 450.671725 747.184809 512.489652 747.184809L512.489652 747.184809zM566.342164 361.356416c0 15.940041-5.15951 29.368888-15.448854 40.33873-10.317996 10.973936-23.090904 16.488533-38.403658 16.488533-15.285125 0-28.248368-5.514597-38.892799-16.488533-10.617825-10.970866-15.939017-24.399713-15.939017-40.33873l0-334.023516c0-15.939017 5.321192-28.768207 15.939017-38.430264 10.643408-9.608845 23.607674-14.411221 38.892799-14.411221 15.312754 0 28.250414 4.967128 38.894845 14.902408 10.644431 9.990538 15.940041 22.980387 15.940041 38.919405L566.342164 361.356416zM512.489652 485.000458c19.297508 0 35.728736 6.769171 49.375547 20.412912 13.592576 13.649881 20.414959 30.079062 20.414959 49.347918 0 19.270902-6.822382 35.756365-20.414959 49.347918-13.646811 13.649881-30.078039 20.47124-49.375547 20.47124-19.267832 0-35.890418-6.822382-49.864688-20.47124-13.94664-13.591553-20.906146-30.077016-20.906146-49.347918 0-19.268856 6.959505-35.698037 20.906146-49.347918C476.599234 491.768605 493.22182 485.000458 512.489652 485.000458L512.489652 485.000458z" horiz-adv-x="1024" />
<glyph glyph-name="shijian" unicode="&#59062;" d="M516.061867 609.536 426.5472 609.536 426.5472 341.009067 426.5472 251.4944 516.061867 251.4944 784.5888 251.4944 784.5888 341.009067 516.061867 341.009067ZM516.061867 878.08c-271.889067 0-492.305067-220.416-492.305067-492.305067s220.416-492.305067 492.305067-492.305067c271.889067 0 492.305067 220.416 492.305067 492.305067C1008.366933 657.664 787.950933 878.08 516.061867 878.08zM516.061867-17.032533c-222.464 0-402.7904 180.343467-402.7904 402.7904S293.597867 788.565333 516.061867 788.565333s402.7904-180.343467 402.7904-402.807467S738.525867-17.032533 516.061867-17.032533z" horiz-adv-x="1024" />
<glyph glyph-name="iconfont" unicode="&#58970;" d="M806.102016 524.673024c84.93056 0 154.021888 69.102592 154.021888 154.00448 0 84.912128-69.091328 154.015744-154.021888 154.015744-84.929536 0-154.021888-69.103616-154.021888-154.015744 0-7.515136 0.722944-14.841856 1.788928-22.08768L330.047488 532.06016c-28.127232 29.853696-67.841024 48.60928-111.97952 48.60928-84.929536 0-154.021888-69.091328-154.021888-154.003456 0-84.912128 69.092352-154.0096 154.021888-154.0096 33.088512 0 63.71328 10.602496 88.839168 28.438528l219.40224-146.249728c-9.053184-19.56864-14.22336-41.257984-14.22336-64.202752 0-84.912128 69.066752-154.028032 154.0096-154.028032 84.892672 0 154.008576 69.115904 154.008576 154.028032 0 84.913152-69.115904 154.00448-154.008576 154.00448-41.847808 0-79.77472-16.807936-107.557888-43.99104L346.560512 341.98016c16.072704 24.334336 25.504768 53.398528 25.504768 84.685824 0 20.231168-4.018176 39.513088-11.147264 57.238528L671.828992 603.471872C698.215424 556.517376 748.490752 524.673024 806.102016 524.673024" horiz-adv-x="1024" />
<glyph glyph-name="paixing-copy" unicode="&#58881;" d="M90.125 18.234h229.922v530.297h-229.922v-530.297zM396.828 18.234h229.922v723.094h-229.922v-723.094zM699.313 410.156v-391.922h234.563v391.922h-234.563zM699.313 410.156z" horiz-adv-x="1024" />
<glyph glyph-name="shouye-copy" unicode="&#58882;" d="M512.017 806.495c0 0-288.093-248.693-449.082-383.379-9.468-8.558-16.626-21.062-16.626-35.767 0-25.743 20.818-46.56 46.56-46.56h93.155v-325.99c0-25.746 20.816-46.56 46.56-46.56h139.715c25.743 0 46.559 20.852 46.559 46.56v186.275h186.275v-186.273c0-25.709 20.816-46.56 46.56-46.56h139.715c25.743 0 46.559 20.815 46.559 46.56v325.99h93.156c25.743 0 46.559 20.816 46.559 46.56 0 14.705-7.161 27.21-17.849 35.767-159.867 134.685-447.89 383.378-447.89 383.378h0.069z" horiz-adv-x="1024" />
<glyph glyph-name="biaoti" unicode="&#58883;" d="M981.873319 896c0 0-409.638476-4.012382-447.792429-42.167357L29.841896 349.594672c-37.734397-37.734397-37.734397-98.913751 0-136.648148l312.644447-312.64547c37.734397-37.734397 98.913751-37.734397 136.648148 0l504.238994 504.238994c38.153953 38.153953 40.60477 449.558654 40.60477 449.558654C1023.091049 876.940932 1004.719642 895.223311 981.873319 896zM757.75914 528.397898 757.75914 528.397898c-27.564785-27.564785-72.255615-27.564785-99.8204 0l0 0c-27.564785 27.564785-27.564785 72.255615 0 99.8204l0 0c27.564785 27.564785 72.255615 27.564785 99.8204 0l0 0C785.323926 600.653513 785.323926 555.962683 757.75914 528.397898z" horiz-adv-x="1024" />
<glyph glyph-name="shenhe" unicode="&#58919;" d="M923.081189 625.358752c-36.995601 0-40.510865 24.40208-40.510865 88.939608 0 62.182642-4.402613 74.844421-33.855753 96.686842-11.876816 8.839355-22.115451 9.078256-366.133582 9.078256-341.117184 0-354.97347-0.341288-370.263165-9.180642-9.2489-5.358219-19.965338-17.508066-26.040261-29.521398a98.42741 98.42741 0 0 1-10.511665-44.196773v-727.318491l10.511665-20.852686c17.712838-34.982002 22.900413-38.326623 147.436342-41.261699 117.164111-2.764431 124.194641-2.900947 124.399413-38.872684 0.034129-7.781362-0.819091-16.586588-7.405946-23.207572-11.22837-11.296627-34.708972-13.514998-105.867484-13.514998l-15.187308 0.034129c-63.206506 0.204773-108.427143 2.730303-124.023997 6.962272-43.343554 11.706173-81.60192 48.428743-97.471804 93.581122-7.030529 19.999467-8.12265 73.922944-8.12265 412.207439v47.404879C0 804.944407 0 804.944407 33.65098 842.656712l4.027196 4.539129c11.5014 13.105453 32.183442 29.350753 46.107986 36.244767A121.839755 121.839755 0 0 0 137.67551 896h676.773763a146.753766 146.753766 0 0 0 66.926544-16.142914c12.798294-6.552726 32.79776-28.019731 48.804159-46.82469 16.450073-19.35102 25.835489-43.718971 26.381549-69.144914l0.85322-37.268631c1.365151-61.875483 0.136515-82.864685-10.409279-93.64938-6.484469-6.689241-15.357952-7.610719-23.924277-7.610719zM208.526863 203.219837c-12.661778 37.746434-13.958672 48.838288-13.958672 118.734036s1.296894 81.02173 13.958672 118.734035c20.101853 60.032529 47.09772 102.693508 96.311425 152.180243 49.008932 49.281962 91.533396 76.346087 151.770697 96.516198 37.609919 12.62765 48.667644 13.924543 118.392748 13.924543 69.690975 0 80.782829-1.296894 118.392748-13.924543 60.27143-20.170111 102.830023-47.268364 151.736568-96.618584 75.458739-76.038928 107.94934-148.972137 112.113052-251.631516 3.754166-91.635782-14.914278-161.087855-62.353286-232.17811l-21.432876-32.149313 71.909345-72.660179C1023.863485-75.168644 1023.863485-84.144514 1023.863485-88.956672c0-9.419544-8.156779-20.7503-16.177043-27.098254-9.863218-7.781362-14.880149-11.22837-21.262232-11.22837-3.549393 0-7.542461 1.057992-13.037195 3.037462-8.941741 3.173977-76.175443 69.895747-83.820291 77.472337l-69.144914 68.769498-38.326623-24.12905c-25.664845-16.142914-63.343021-34.128783-89.622183-42.763365-41.841888-13.753899-51.909879-15.016664-120.03093-14.880149-69.520331 0.102386-77.369951 1.194507-119.826156 16.279429-63.547794 22.627383-98.086122 44.742834-147.743501 94.604986-49.213705 49.418478-76.209572 92.045327-96.345554 152.111985z m227.980269-155.285962c66.346354-32.866018 132.556193-41.671244 202.486069-27.029996 103.17131 21.671777 187.878949 96.44794 226.649247 200.062925 12.320491 32.900147 13.753899 43.002266 14.061058 98.495668 0.307159 55.561658-1.057992 66.039195-13.378483 102.04506-25.118784 73.308626-78.154913 135.730169-145.593387 171.224104-46.858819 24.709239-73.445141 32.456472-123.580323 36.005866-9.658446 0.682576-18.907346 1.023863-27.849087 1.023863-46.961205 0-85.321957-9.726703-129.962405-32.149313-52.14878-26.142648-89.690441-59.281696-121.771497-107.369151-36.074123-54.094121-47.643781-94.980403-47.643781-168.289028 0-52.728969 1.535795-63.92321 13.7539-99.55366a306.681243 306.681243 0 0 1 152.828689-174.466338z m48.155713 506.641782h0.102386c8.736968 0 17.439808-4.163712 23.924277-11.433143 7.474203-8.327423 11.194241-19.794694 9.931476-30.579389-1.740568-15.15318-12.183975-24.504466-33.514465-38.633782-28.258632-18.702573-55.391015-48.394614-69.179043-75.629383-8.668711-17.09852-20.067724-27.371284-32.934275-29.657912a29.350753 29.350753 0 0 0-5.392348-0.477803c-7.167044 0-16.415945 2.491401-26.210905 11.637915-18.736702 17.508066-14.982536 29.760299 0.477803 60.407945 23.82189 47.09772 96.516198 114.229036 132.795094 114.365552z m105.42381-412.275697c43.650713 5.460605 76.209572 19.931209 105.628583 46.858819 32.081056 29.419011 49.520864 63.513665 58.257832 114.024263 7.030529 40.613252 12.559392 55.698174 43.411812 52.967871 11.535529-1.023863 19.862952-5.085189 25.52833-12.422877 8.97587-11.569657 10.511665-30.067458 5.221703-61.875483-17.67871-106.003999-95.116918-188.561525-197.264364-210.267431-21.432876-4.539128-36.244767-7.098787-47.814425-7.098787a46.415145 46.415145 0 0 0-28.941208 8.771097c-7.952006 5.562992-13.276097 15.630983-14.265831 26.92761-0.989735 11.262498 2.491401 22.081322 9.351286 28.941208 7.235302 7.269431 29.930943 11.77443 40.886282 13.17371z" horiz-adv-x="1024" />
<glyph glyph-name="sousuo" unicode="&#59744;" d="M959.620225 15.369292l-78.289064-79.004355-214.536144 215.776391c-63.155389-48.677653-141.809773-77.905324-227.389894-77.905324-207.342302 0-375.432625 169.634492-375.432624 378.875027S232.061798 831.995267 439.4041 831.995267c207.333092 0 375.419322-169.623235 375.419322-378.87298 0-82.510202-26.41358-158.650323-70.803579-220.847897l215.600382-216.905098zM439.4041 740.128977c-157.091828 0-284.436144-128.490419-284.436144-287.007713 0-158.52241 127.338177-287.025109 284.436144-287.025109 157.058059 0 284.396235 128.502699 284.396235 287.025109 0 158.517293-127.337153 287.007713-284.396235 287.007713z" horiz-adv-x="1024" />
<glyph glyph-name="zhucetianjiahaoyou" unicode="&#59594;" d="M320 588.8c6.4 95.2 84.8 172.8 180 178.4 111.2 6.4 204-81.6 204-192 0-105.6-85.6-192-192-192-110.4 0-199.2 93.6-192 205.6zM575.2 128c0 72.8 40.8 136.8 100.8 168.8C616 312 556 320 511.2 320 384 320 128 256 128 128v-96c0-17.6 14.4-32 32-32h464c-30.4 33.6-48.8 78.4-48.8 128z m320.8 32h-96V256h-64v-96H640v-64h96v-96h64v96h96v64z" horiz-adv-x="1024" />
<glyph glyph-name="xihuan" unicode="&#58887;" d="M1084.074667 595.831467c0-348.228267-542.037333-716.117333-542.037334-716.117334S0 247.534933 0 595.7632C0 761.856 131.413333 896 293.546667 896 398.267733 896 490.154667 840.430933 542.037333 755.780267 594.056533 840.430933 685.8752 896 790.528 896c162.133333 0 293.546667-134.144 293.546667-300.168533z" horiz-adv-x="1092" />
<glyph glyph-name="liwu" unicode="&#58933;" d="M816.128 725.333333c14.472533 0 25.6 2.901333 33.348267 8.738134a46.08 46.08 0 0 1 16.2816 22.186666c3.072 8.977067 4.642133 19.0464 4.642133 30.276267 0 11.195733-0.512 21.742933-1.536 31.607467-2.082133 9.864533-4.437333 20.3776-6.997333 31.607466a81.373867 81.373867 0 0 1-12.3904 28.910934 40.618667 40.618667 0 0 1-22.493867 16.145066c-9.284267 2.6624-20.650667 0.887467-34.0992-5.393066a1807.018667 1807.018667 0 0 0-52.701867-26.2144c-19.626667-9.4208-39.0144-18.8416-58.129066-28.2624a4372.48 4372.48 0 0 0-52.701867-25.531734c-16.042667-7.645867-27.648-13.687467-34.884267-18.158933-11.3664-6.280533-19.626667-13.243733-24.814933-20.855467-5.154133-7.611733-7.236267-14.779733-6.178133-21.504 1.024-6.724267 5.154133-12.356267 12.3904-16.827733s18.090667-6.724267 32.5632-6.724267h207.701333zM415.573333 725.333333H207.872c-14.472533 0-25.6 2.901333-33.348267 8.738134a46.08 46.08 0 0 0-16.2816 22.186666A92.228267 92.228267 0 0 0 153.6 786.5344c0 11.195733 0.512 21.742933 1.536 31.607467 2.082133 9.864533 4.437333 20.3776 6.997333 31.607466 2.56 11.195733 6.724267 20.821333 12.3904 28.910934a40.618667 40.618667 0 0 0 22.493867 16.145066c9.284267 2.6624 20.650667 0.887467 34.0992-5.393066 15.496533-8.055467 33.0752-16.827733 52.701867-26.2144 19.626667-9.4208 39.0144-18.8416 58.129066-28.2624 19.114667-9.4208 36.693333-17.92 52.701867-25.531734 16.042667-7.645867 27.648-13.687467 34.884267-18.158933 11.3664-6.280533 19.626667-13.243733 24.814933-20.855467 5.154133-7.611733 7.236267-14.779733 6.178133-21.504-1.024-6.724267-5.154133-12.356267-12.3904-16.827733S430.08 725.333333 415.573333 725.333333zM82.261333 657.066667c-27.272533 0-44.9536-3.959467-53.0432-11.8784C21.128533 637.269333 17.066667 624.64 17.066667 607.300267v-99.601067c0-18.8416 4.471467-32.802133 13.4144-41.847467s26.624-13.585067 53.077333-13.585066H460.8V657.066667H82.261333z m861.3888 0c24.576 0 41.233067-4.7104 50.039467-14.1312 8.840533-9.454933 13.243733-22.8352 13.243733-40.174934v-97.314133c0-18.090667-4.027733-31.505067-12.0832-40.174933s-23.9616-13.0048-47.752533-13.0048H563.2V657.066667h380.450133zM972.8 384v-375.637333c-0.853333-42.461867-4.437333-74.9568-28.603733-99.498667-24.200533-24.576-62.634667-36.864-115.336534-36.864H563.2V384h409.6zM51.2 384v-375.637333c0.853333-42.461867 4.437333-74.9568 28.603733-99.498667 24.200533-24.576 62.634667-36.864 115.336534-36.864H460.8V384H51.2z" horiz-adv-x="1024" />
<glyph glyph-name="guize-" unicode="&#59533;" d="M512.1 829.497c61.543 0 119.278-11.739 173.213-35.211 53.906-23.531 100.914-55.267 140.933-95.315 40.022-39.993 71.813-87.162 95.29-141.453 23.473-54.231 35.24-112.102 35.24-173.674 0-61.518-11.768-119.277-35.24-173.188-23.478-53.959-55.268-100.908-95.29-140.956-40.019-40.048-87.026-71.784-140.933-95.261-53.935-23.531-111.67-35.27-173.213-35.27-61.539 0-119.413 11.738-173.702 35.27-54.231 23.477-101.399 55.209-141.423 95.261-40.049 40.048-71.808 86.997-95.286 140.956-23.501 53.911-35.24 111.671-35.24 173.188 0 61.567 11.739 119.442 35.24 173.674 23.479 54.285 55.237 101.455 95.286 141.453 40.023 40.049 87.191 71.784 141.428 95.311C392.687 817.758 450.561 829.497 512.1 829.497z m53.609-384.086c0 15.87-5.138 29.237-15.379 40.159-10.271 10.921-22.986 16.413-38.23 16.413-15.218 0-28.123-5.492-38.716-16.413-10.571-10.922-15.87-24.289-15.87-40.159v-332.515c0-15.866 5.299-28.634 15.87-38.254 10.593-9.565 23.498-14.349 38.716-14.349 15.244 0 28.125 4.947 38.717 14.834 10.596 9.945 15.87 22.881 15.87 38.746l-0.978 331.538zM512.1 568.499c19.21 0 35.566 6.737 49.152 20.318 13.532 13.591 20.322 29.941 20.322 49.127 0 19.181-6.79 35.596-20.322 49.123-13.586 13.591-29.942 20.381-49.152 20.381-19.178 0-35.73-6.795-49.642-20.381-13.882-13.527-20.81-29.942-20.81-49.123 0-19.186 6.928-35.536 20.81-49.127 13.911-13.581 30.464-20.318 49.642-20.318z m0 0" horiz-adv-x="1024" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 18 KiB

BIN
qf_happyvote/resource/icon/checking.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
qf_happyvote/resource/icon/like_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

BIN
qf_happyvote/resource/icon/ok.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
qf_happyvote/resource/icon/quotesleft.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

BIN
qf_happyvote/resource/icon/quotesright.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

BIN
qf_happyvote/resource/icon/ranking1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
qf_happyvote/resource/icon/ranking2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
qf_happyvote/resource/icon/ranking3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

BIN
qf_happyvote/resource/icon/share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
qf_happyvote/resource/icon/shijian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
qf_happyvote/resource/icon/shuqian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

BIN
qf_happyvote/resource/icon/tishi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
qf_happyvote/resource/image/flex.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
qf_happyvote/resource/image/iconfont-tianjia.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
qf_happyvote/resource/image/l0g0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
qf_happyvote/resource/image/mg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
qf_happyvote/resource/image/music.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
qf_happyvote/resource/image/music_off.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

BIN
qf_happyvote/resource/image/none.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
qf_happyvote/resource/image/reply.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
qf_happyvote/resource/image/tx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

624
qf_happyvote/resource/js/function.js

@ -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 = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&#39;": "'",
"&#x2F;": "/"
};
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
});
}
});
}
};

1
qf_happyvote/resource/js/lanch.js

@ -0,0 +1 @@
module.exports = function() {};

103
qf_happyvote/resource/wxParse/html2json.js

@ -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;
}
};

48
qf_happyvote/resource/wxParse/htmlparser.js

@ -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();
};

693
qf_happyvote/resource/wxParse/showdown.js

@ -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, "&quot;"), 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, "&amp;"), e = e.replace(/<(?![a-z\/?\$!])/gi, "&lt;");
}), 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, "&amp;"), e = e.replace(/</g, "&lt;"), e = e.replace(/>/g, "&gt;"),
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, "&quot;"), r = s.helper.escapeCharacters(r, "*_", !1);
var d = '<img src="' + (a = s.helper.escapeCharacters(a, "*_", !1)) + '" alt="' + r + '"';
return c && (c = c.replace(/"/g, "&quot;"), 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, "&quot;")), 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;

74
qf_happyvote/resource/wxParse/wxDiscode.js

@ -0,0 +1,74 @@
function e(e) {
return e = e.replace(/&forall;/g, "∀"), e = e.replace(/&part;/g, "∂"), e = e.replace(/&exists;/g, "∃"),
e = e.replace(/&empty;/g, "∅"), e = e.replace(/&nabla;/g, "∇"), e = e.replace(/&isin;/g, "∈"),
e = e.replace(/&notin;/g, "∉"), e = e.replace(/&ni;/g, "∋"), e = e.replace(/&prod;/g, "∏"),
e = e.replace(/&sum;/g, "∑"), e = e.replace(/&minus;/g, "−"), e = e.replace(/&lowast;/g, "∗"),
e = e.replace(/&radic;/g, "√"), e = e.replace(/&prop;/g, "∝"), e = e.replace(/&infin;/g, "∞"),
e = e.replace(/&ang;/g, "∠"), e = e.replace(/&and;/g, "∧"), e = e.replace(/&or;/g, "∨"),
e = e.replace(/&cap;/g, "∩"), e = e.replace(/&cap;/g, "∪"), e = e.replace(/&int;/g, "∫"),
e = e.replace(/&there4;/g, "∴"), e = e.replace(/&sim;/g, "∼"), e = e.replace(/&cong;/g, "≅"),
e = e.replace(/&asymp;/g, "≈"), e = e.replace(/&ne;/g, "≠"), e = e.replace(/&le;/g, "≤"),
e = e.replace(/&ge;/g, "≥"), e = e.replace(/&sub;/g, "⊂"), e = e.replace(/&sup;/g, "⊃"),
e = e.replace(/&nsub;/g, "⊄"), e = e.replace(/&sube;/g, "⊆"), e = e.replace(/&supe;/g, "⊇"),
e = e.replace(/&oplus;/g, "⊕"), e = e.replace(/&otimes;/g, "⊗"), e = e.replace(/&perp;/g, "⊥"),
e = e.replace(/&sdot;/g, "⋅");
}
function a(e) {
return e = e.replace(/&Alpha;/g, "Α"), e = e.replace(/&Beta;/g, "Β"), e = e.replace(/&Gamma;/g, "Γ"),
e = e.replace(/&Delta;/g, "Δ"), e = e.replace(/&Epsilon;/g, "Ε"), e = e.replace(/&Zeta;/g, "Ζ"),
e = e.replace(/&Eta;/g, "Η"), e = e.replace(/&Theta;/g, "Θ"), e = e.replace(/&Iota;/g, "Ι"),
e = e.replace(/&Kappa;/g, "Κ"), e = e.replace(/&Lambda;/g, "Λ"), e = e.replace(/&Mu;/g, "Μ"),
e = e.replace(/&Nu;/g, "Ν"), e = e.replace(/&Xi;/g, "Ν"), e = e.replace(/&Omicron;/g, "Ο"),
e = e.replace(/&Pi;/g, "Π"), e = e.replace(/&Rho;/g, "Ρ"), e = e.replace(/&Sigma;/g, "Σ"),
e = e.replace(/&Tau;/g, "Τ"), e = e.replace(/&Upsilon;/g, "Υ"), e = e.replace(/&Phi;/g, "Φ"),
e = e.replace(/&Chi;/g, "Χ"), e = e.replace(/&Psi;/g, "Ψ"), e = e.replace(/&Omega;/g, "Ω"),
e = e.replace(/&alpha;/g, "α"), e = e.replace(/&beta;/g, "β"), e = e.replace(/&gamma;/g, "γ"),
e = e.replace(/&delta;/g, "δ"), e = e.replace(/&epsilon;/g, "ε"), e = e.replace(/&zeta;/g, "ζ"),
e = e.replace(/&eta;/g, "η"), e = e.replace(/&theta;/g, "θ"), e = e.replace(/&iota;/g, "ι"),
e = e.replace(/&kappa;/g, "κ"), e = e.replace(/&lambda;/g, "λ"), e = e.replace(/&mu;/g, "μ"),
e = e.replace(/&nu;/g, "ν"), e = e.replace(/&xi;/g, "ξ"), e = e.replace(/&omicron;/g, "ο"),
e = e.replace(/&pi;/g, "π"), e = e.replace(/&rho;/g, "ρ"), e = e.replace(/&sigmaf;/g, "ς"),
e = e.replace(/&sigma;/g, "σ"), e = e.replace(/&tau;/g, "τ"), e = e.replace(/&upsilon;/g, "υ"),
e = e.replace(/&phi;/g, "φ"), e = e.replace(/&chi;/g, "χ"), e = e.replace(/&psi;/g, "ψ"),
e = e.replace(/&omega;/g, "ω"), e = e.replace(/&thetasym;/g, "ϑ"), e = e.replace(/&upsih;/g, "ϒ"),
e = e.replace(/&piv;/g, "ϖ"), e = e.replace(/&middot;/g, "·");
}
function r(e) {
return e = e.replace(/&nbsp;/g, " "), e = e.replace(/&quot;/g, "'"), e = e.replace(/&amp;/g, "&"),
e = e.replace(/&lt;/g, "<"), e = e.replace(/&gt;/g, ">"), e = e.replace(/&#8226;/g, "•");
}
function l(e) {
return e = e.replace(/&OElig;/g, "Œ"), e = e.replace(/&oelig;/g, "œ"), e = e.replace(/&Scaron;/g, "Š"),
e = e.replace(/&scaron;/g, "š"), e = e.replace(/&Yuml;/g, "Ÿ"), e = e.replace(/&fnof;/g, "ƒ"),
e = e.replace(/&circ;/g, "ˆ"), e = e.replace(/&tilde;/g, "˜"), e = e.replace(/&ensp;/g, ""),
e = e.replace(/&emsp;/g, ""), e = e.replace(/&thinsp;/g, ""), e = e.replace(/&zwnj;/g, ""),
e = e.replace(/&zwj;/g, ""), e = e.replace(/&lrm;/g, ""), e = e.replace(/&rlm;/g, ""),
e = e.replace(/&ndash;/g, "–"), e = e.replace(/&mdash;/g, "—"), e = e.replace(/&lsquo;/g, "‘"),
e = e.replace(/&rsquo;/g, "’"), e = e.replace(/&sbquo;/g, "‚"), e = e.replace(/&ldquo;/g, "“"),
e = e.replace(/&rdquo;/g, "”"), e = e.replace(/&bdquo;/g, "„"), e = e.replace(/&dagger;/g, "†"),
e = e.replace(/&Dagger;/g, "‡"), e = e.replace(/&bull;/g, "•"), e = e.replace(/&hellip;/g, "…"),
e = e.replace(/&permil;/g, "‰"), e = e.replace(/&prime;/g, "′"), e = e.replace(/&Prime;/g, "″"),
e = e.replace(/&lsaquo;/g, "‹"), e = e.replace(/&rsaquo;/g, "›"), e = e.replace(/&oline;/g, "‾"),
e = e.replace(/&euro;/g, "€"), e = e.replace(/&trade;/g, "™"), e = e.replace(/&larr;/g, "←"),
e = e.replace(/&uarr;/g, "↑"), e = e.replace(/&rarr;/g, "→"), e = e.replace(/&darr;/g, "↓"),
e = e.replace(/&harr;/g, "↔"), e = e.replace(/&crarr;/g, "↵"), e = e.replace(/&lceil;/g, "⌈"),
e = e.replace(/&rceil;/g, "⌉"), e = e.replace(/&lfloor;/g, "⌊"), e = e.replace(/&rfloor;/g, "⌋"),
e = e.replace(/&loz;/g, "◊"), e = e.replace(/&spades;/g, "♠"), e = e.replace(/&clubs;/g, "♣"),
e = e.replace(/&hearts;/g, "♥"), e = e.replace(/&diams;/g, "♦"), e = e.replace(/&#39;/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;
}
};

83
qf_happyvote/resource/wxParse/wxParse.js

@ -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);
}
};

386
qf_happyvote/resource/wxParse/wxParse.wxml

@ -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>

250
qf_happyvote/resource/wxParse/wxParse.wxss

@ -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;
}

13
siteinfo.js

@ -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;

7
sitemap.json

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

38
we7/pages/index/index.js

@ -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
});
}
});
}
});

1
we7/pages/index/index.json

@ -0,0 +1 @@
{}

28
we7/pages/index/index.wxml

@ -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>

86
we7/pages/index/index.wxss

@ -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;
}

49
we7/pages/newsDetail/newsDetail.js

@ -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");
}
});

15
we7/pages/newsDetail/newsDetail.wxml

@ -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>

109
we7/pages/newsDetail/newsDetail.wxss

@ -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;
}

124
we7/pages/selectarea/selectarea.js

@ -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
};

19
we7/pages/selectarea/selectarea.wxml

@ -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>

59
we7/pages/selectarea/selectarea.wxss

@ -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;
}

24
we7/pages/templates/footer.wxml

@ -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
we7/pages/templates/footer.wxss

14
we7/pages/templates/news.wxml

@ -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
we7/pages/templates/news.wxss

14
we7/pages/user/index/index.js

@ -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() {}
});

1
we7/pages/user/index/index.json

@ -0,0 +1 @@
{}

7
we7/pages/user/index/index.wxml

@ -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>

19
we7/pages/user/index/index.wxss

@ -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;
}

BIN
we7/resource/icon/home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
we7/resource/icon/homeselect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
we7/resource/icon/hotel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
we7/resource/icon/hotelselect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
we7/resource/icon/img_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
we7/resource/icon/img_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
we7/resource/icon/img_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
we7/resource/icon/img_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
we7/resource/icon/order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
we7/resource/icon/orderselect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
we7/resource/icon/pay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
we7/resource/icon/payselect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
we7/resource/icon/todo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
we7/resource/icon/todoselect.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save