Browse Source

优化

master
ltlzx 3 years ago
parent
commit
d681994982
  1. 4
      app.js
  2. 15
      app.json
  3. 160
      project.config.json
  4. 1849
      qf_happyvote/pages/index/index.js
  5. 35
      qf_happyvote/pages/index/index.wxml
  6. 1806
      qf_happyvote/pages/index/index.wxss
  7. 240
      qf_happyvote/pages/templates/detail.wxml
  8. 37
      qf_happyvote/pages/templates/footer.wxml
  9. 162
      qf_happyvote/pages/templates/index.wxml
  10. 3
      qf_happyvote/pages/templates/index.wxss
  11. 181
      qf_happyvote/pages/templates/join.wxml
  12. 2
      qf_happyvote/pages/templates/joinok.wxml
  13. 306
      qf_happyvote/pages/templates/mall.wxml
  14. 2
      qf_happyvote/pages/templates/mall.wxss
  15. 92
      qf_happyvote/pages/templates/ranking.wxml
  16. 8
      qf_happyvote/pages/templates/rule.wxml
  17. 1
      qf_happyvote/pages/web-view/index.js
  18. 115
      qf_happyvote/resource/js/function.js
  19. 15
      qf_happyvote/resource/wxParse/wxParse.wxss
  20. 500
      we7/resource/js/util.js

4
app.js

@ -1,5 +1,7 @@
App({
onLaunch: function() {},
onLaunch: function() {
},
onShow: function() {},
onHide: function() {},
onError: function(e) {},

15
app.json

@ -3,14 +3,21 @@
"qf_happyvote/pages/index/index",
"we7/pages/index/index",
"we7/pages/user/index/index",
"qf_happyvote/pages/web-view/index"
"qf_happyvote/pages/web-view/index",
"qf_happyvote/pages/templates/personal",
"qf_happyvote/pages/success/success"
],
"window": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#000",
"backgroundColor": "#f5f5f5",
"navigationBarTitleText": "中国深圳店长节评选",
"navigationBarBackgroundColor": "#F7694E",
"backgroundColor": "#f2f2f2",
"enablePullDownRefresh": true
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"sitemapLocation": "sitemap.json"
}

160
project.config.json

@ -1,82 +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
}
]
}
}
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"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,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
},
"compileType": "miniprogram",
"libVersion": "2.15.0",
"appid": "wxec9f98ac8b875086",
"projectname": "wxapp",
"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
}
]
}
}
}

1849
qf_happyvote/pages/index/index.js

File diff suppressed because it is too large

35
qf_happyvote/pages/index/index.wxml

@ -7,6 +7,14 @@
<import src="../templates/checking.wxml"></import>
<import src="../templates/rule.wxml"></import>
<import src="../templates/footer.wxml"></import>
<import src="../templates/single.wxml"></import>
<import src="../templates/personal.wxml"></import>
<import src="../templates/hairCurl.wxml"></import>
<import src="../templates/myLottery.wxml"></import>
<import src="../templates/luckDraw.wxml"></import>
<import src="../templates/destroy.wxml"></import>
<import src="../templates/destroyList.wxml"></import>
<import src="../templates/gift.wxml"></import>
<view class="container">
<block wx:if="{{search.show}}">
<view bindtap="closesearch" class="searchback"></view>
@ -19,22 +27,39 @@
</view>
</block>
<scroll-view bindscrolltolower="loadlist" class="body" scrollY="true">
<!-- 店长排名 -->
<template is="votesingle" data="{{data:ranking,memberinfo:memberinfo,config:config}}" wx:if="{{showpage=='single'}}"></template>
<!-- 店长列表 -->
<template is="voteindex" data="{{data:index,config:config,gift:detail}}" wx:if="{{showpage=='index'}}"></template>
<template is="voteindex" data="{{data:index,config:config,gift:detail, countDownList: countDownList}}" wx:if="{{showpage=='index'}}"></template>
<!-- 报名 -->
<template is="votejoin" data="{{data:join,config:config}}" wx:if="{{showpage=='join'}}"></template>
<template is="votejoin" data="{{data:join,config:config,CheckItem:CheckItem,Num:checkNum}}" wx:if="{{showpage=='join'}}"></template>
<!-- 个人中心 -->
<template is="votepersonal" data="{{data:myjoin}}" wx:if="{{showpage=='personal'}}"></template>
<!-- 礼物和评论 -->
<template is="votegift" data="{{data:giftData}}" wx:if="{{showpage=='gift'}}"></template>
<!-- 我要发卷 -->
<template is="votehairCurl" data="{{datas:hairCurl,config:hairCurlDate}}" wx:if="{{showpage=='hairCurl'}}"></template>
<!-- 抽奖页面 -->
<template is="voteluckDraw" data="{{datas:luckDraw,config:luckDrawDates,showDialog:showDialog,luckDrawRinkDates:luckDrawRinkDates}}" wx:if="{{showpage=='luckDraw'}}"></template>
<!-- 我的奖券 -->
<template is="votemyLottery" data="{{data:myLottery}}" wx:if="{{showpage=='myLottery'}}"></template>
<!-- 报名完成 -->
<template is="votejoinok" data="{{data:joinok,config:config}}" wx:if="{{showpage=='joinok'}}"></template>
<!-- 核销 -->
<template is="votedestroy" data="{{data:destroyInfo}}" wx:if="{{showpage=='destroy'}}"></template>
<!-- 核销列表 -->
<template is="votedestroyList" data="{{data:destroyList}}" wx:if="{{showpage=='destroyList'}}"></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="votedetail" data="{{img:mall,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="voteranking" data="{{data:ranking,memberinfo:memberinfo,config:config,rankIndex:rankIndex,rankArea:rankArea}}" 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>
<template is="mall" data="{{data:mall,config:config,area:area, countDownList: countDownList,isArea:isArea}}" wx:if="{{showpage=='mall'}}"></template>
</scroll-view>
<template is="votefooter" data="{{data:index,footerindex:footerindex,config:config}}"></template>
</view>

1806
qf_happyvote/pages/index/index.wxss

File diff suppressed because one or more lines are too long

240
qf_happyvote/pages/templates/detail.wxml

@ -1,102 +1,170 @@
<template name="votedetail">
<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 class="pageContainer" style="background:#FEA271;">
<view id="detail">
<!-- 返回按钮 -->
<view class="head">
<view class="gobackContainer">
<image src="https://xcx.zgzmdz.com/attachment/images/baseImages/back2x.png" mode="aspectFit" style="height:56rpx;width:100%;display:block;overflow: hidden;" bindtap="goback"></image>
</view>
<view class="i">
<view class="num">{{data.pollcount}}</view>
<view class="title">{{config.font[18]}}</view>
<view class="left" style="">
<!-- <image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/goback.png" class="gobackForDetail" bindtap="goback"></image> -->
<view class="title" style="">
<text style="font-size: 32rpx;line-height: 44rpx;color: #000000;">{{data.id}}号 </text>
<text style="font-size: 32rpx;font-weight: bold;line-height: 44rpx;color: #000000;"> {{data.username}}</text>
</view>
<view class="subtitle">
<template is="wxParse" data="{{wxParseData:data.resume.nodes}}"></template>
</view>
</view>
<view class="i">
<view class="num">{{data.ranking}}</view>
<view class="title">{{config.font[19]}}</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>
<text style="font-size: 32rpx;color: #000000;">第</text>
<text style="font-size: 40rpx;font-weight: bold;color:#FF564F;line-height: 44rpx;">{{data.ranking}}</text>
<text style="font-size: 32rpx;color: #000000;">名</text>
</view>
<view style=" margin-top: 20rpx;"><text style="font-size: 32rpx;line-height: 32rpx;color: #000000;">{{data.pollcount}}票</text></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 style="width:588rpx;height:588rpx;display:block;overflow: hidden;" wx:if="{{!config.isimgs}}">
<view style="width:588rpx;height:588rpx;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>
<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 style="position:relative;margin:0rpx auto;width:588rpx;height:588rpx;">
<view class="brand">
<view>诚信示范品牌</view>
<view class="brandImg">
<text>{{data.trust_count}}.0</text>
<image wx:for="{{data.trust_count}}" src="../../resource/icon/xing1.png" style="width:24rpx;height:24rpx" ></image>
<image wx:for="{{5-data.trust_count}}" src="../../resource/icon/xing2.png" style="width:24rpx;height:24rpx" ></image>
</view>
</view>
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" style="margin:0rpx auto;width:588rpx;height:588rpx;display:block;overflow: hidden;" >
<swiper-item style="height:588rpx;" wx:for="{{data.images}}" wx:key="i">
<image bindtap="maximg" data-img="{{item}}" mode="aspectFill" src="{{item}}" style="height:588rpx;width:588rpx;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item>
<!-- <swiper-item style="height:668rpx;" wx:if="{{data.video}}">
<video controls src="{{data.video}}" style="width:668px;"></video>
</swiper-item> -->
</swiper>
</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>
<!-- <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>
<!-- 店长信息 -->
<view class="content">
<!-- <button openType="share" class="ok" style="box-shadow: none" wx:if="{{config.isshare}}">给TA拉票</button> -->
<button openType="share" class="ok" style="box-shadow: none">给TA拉票</button>
<!-- 浮标 -->
<view class="floatBoxRight">评论</view>
<view class="floatBoxLeft">送礼物</view>
<view bindtap="giftbox" class="gift" style="display: block;background-color:#FF564F;color:#fff;">
<text class="iconfont icon-liwu"></text>
</view>
<view bindtap="replybut" class="gifts" data-data="1" style="background-color:#FF564F" >
<image src="../../resource/image/reply.png" style="width:40rpx;height:40rpx"></image>
<!-- <text class="iconfont icon-chat"></text> -->
</view>
<view wx:if='{{data.font === "给TA投票"}}' class="iconAddone">+1</view>
<view bindtap="vote" class="ok" data-joinid="{{data.id}}" data-topage="{{data.topage}}" style="background-color:#FF564F;color:#fff;">{{data.font}}</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}}" wx:if="{{config.isposter}}"><text>去生成海报</text></view>
<view class="tips" wx:if="{{!config.isposter}}"></view>
<image class="giftImg" wx:if="{{data.giftrecords.length && data.giftrecords.length>0}}" src="https://xcx.zgzmdz.com/attachment/images/baseImages/gift.png"></image>
<swiper class="giftbox" wx:if="{{data.giftrecords.length && data.giftrecords.length>0}}" autoplay='{{true}}' interval="800" circular="true" vertical="true" display-multiple-items="{{data.giftrecords.length==1?1:2}}" >
<swiper-item class="giftline" wx:for="{{data.giftrecords}}" wx:key="index">
<view class="linec"></view>
<view class="a">
<image src="{{item.avatar}}"></image>
</view>
<view class="b">
<view class="name">{{item.nickname}}</view>
<view class="content1">给你送了{{item.giftname}}</view>
</view>
<view class="c">
<image class="image1" src="{{item.giftimage}}"></image>
</view>
<view class="d">
<view class="content2">+{{item.pollcount}}票</view>
</view>
<!-- <view class="linec" v-if='{{index == data.giftrecords.length-1}}'></view> -->
</swiper-item>
</swiper>
<image class="giftImg" style="margin-top:40rpx" wx:if="{{data.reply.length>0}}" src="https://xcx.zgzmdz.com/attachment/images/baseImages/comment.png"></image>
<!-- 礼物弹窗 -->
<block>
<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="content">
<view class="name">{{item.nickname}}</view>
<view class="content">{{item.content}}</view>
<view class="time">{{item.create_time}}</view>
</block>
<swiper wx:if="{{data.reply.length>0}}" class="giftbox" autoplay='{{true}}' interval="800" circular="true" vertical="true" display-multiple-items="{{data.reply.length==1?1:2}}" >
<swiper-item class="giftline" wx:for="{{data.reply}}" wx:key="index">
<view class="linec"></view>
<view class="a">
<image src="{{item.avatar}}"></image>
</view>
<view class="content">
<view class="name">{{item.nickname}}</view>
<view class="content1">{{item.content}}</view>
</view>
<view class="createTimeBox">
<view class="content2">{{item.create_time}}</view>
</view>
</swiper-item>
</swiper>
<!-- <view class="giftbox">
<view class="giftline" wx:for="{{data.reply}}" wx:key="re">
<view class="linec"></view>
<view class="a">
<image src="{{item.avatar}}"></image>
</view>
<view class="content">
<view class="name">{{item.nickname}}</view>
<view class="content1">{{item.content}}</view>
</view>
<view class="createTimeBox">
<view class="content2">{{item.create_time}}</view>
</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 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>
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" class="swiperBox swiper_detail" style="margin-top:40rpx;width:670rpx;height:380rpx;display:block;overflow: hidden;margin-bottom:60rpx;border: 40rpx;margin-left: 40rpx;">
<swiper-item style="height:380rpx;" wx:for="{{img.ad}}" >
<image bindtap="imgjumpwxapp" data-img="1" src="{{item.pic}}" style="height:380rpx;width:100%;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item>
<!-- <swiper-item style="height:244rpx;" wx:if="{{img.picture2!=''}}">
<image bindtap="imgjumpwxapp" data-img="2" src="{{img.picture2}}" mode="aspectFill" style="height:244rpx;width:100%;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item>
<swiper-item style="height:244rpx;" wx:if="{{img.picture3!=''}}">
<image bindtap="imgjumpwxapp" data-img="3" src="{{img.picture3}}" mode="aspectFill" style="height:244rpx;width:100%;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item>
<swiper-item style="height:244rpx;" wx:if="{{img.picture4!=''}}">
<image bindtap="imgjumpwxapp" data-img="8" src="{{img.picture4}}" mode="aspectFill" style="height:244rpx;width:100%;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item>
<swiper-item style="height:244rpx;" wx:if="{{img.picture5!=''}}">
<image bindtap="imgjumpwxapp" data-img="9" src="{{img.picture5}}" mode="aspectFill" style="height:244rpx;width:100%;display:block;overflow: hidden;object-fit:cover"></image>
</swiper-item> -->
</swiper>
</view>
<view bindtap="haibao" id="haibao" wx:if="{{data.haibao}}">
<view>

37
qf_happyvote/pages/templates/footer.wxml

@ -11,30 +11,31 @@
<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>
<!-- <button bindgetuserinfo="bindGetUserInfo" openType="getUserInfo" style="width:50%;color:#1AAD16;background:#fff;border-radius:0px;">确定</button> -->
<button bindtap="bindGetUserInfo" 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 class="footer" style="background-color: #EEEDF0;padding-top: 20rpx;padding-bottom:{{ config.isIphoneX ? 34 : 0 }}px;">
<view bindtap="viewjump" class="item" data-topage="mall" style="{{footerindex==1?'color:#333333':'color:#C9CDD2'}}">
<image class="iconfont" style="height:36rpx;width:36rpx;" src="{{footerindex==1 ? 'https://xcx.zgzmdz.com/attachment/images/baseImages/pinkhome2x.png' : 'https://xcx.zgzmdz.com/attachment/images/baseImages/home2x.png'}}"> </image>
<view>活动首页</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 bindtap="viewjump" class="item" data-topage="ranking" style="{{footerindex==3?'color:#333333':'color:#C9CDD2'}}">
<image class="iconfont" style="height:36rpx;width:36rpx;" src="{{footerindex==3 ? 'https://xcx.zgzmdz.com/attachment/images/baseImages/pinktrophy2x.png' : 'https://xcx.zgzmdz.com/attachment/images/baseImages/trophy2x.png'}}"> </image>
<view>排行</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 bindtap="viewjump" class="item" data-topage="rule" style="{{footerindex==4?'color:#333333':'color:#C9CDD2'}}">
<image class="iconfont" style="height:36rpx;width:36rpx;" src="{{footerindex==4 ? 'https://xcx.zgzmdz.com/attachment/images/baseImages/pinkprize2x.png' : 'https://xcx.zgzmdz.com/attachment/images/baseImages/prize2x.png'}}"> </image>
<view>奖品</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 bindtap="viewjump" class="item" data-topage="myjoin" style="{{footerindex==2?'color:#333333':'color:#C9CDD2'}}">
<image class="iconfont" style="height:36rpx;width:36rpx;" src="{{footerindex==2 ? 'https://xcx.zgzmdz.com/attachment/images/baseImages/pinkflag2x.png' : 'https://xcx.zgzmdz.com/attachment/images/baseImages/flag2x.png'}}"> </image>
<view>{{data.is_join == 0 ? '个人中心' :'我的'}}</view>
</view> -->
<view bindtap="viewjump" class="item" data-topage="personal" style="{{footerindex==2?'color:#333333':'color:#C9CDD2'}}">
<image class="iconfont" style="height:36rpx;width:36rpx;" src="{{footerindex==2 ? 'https://xcx.zgzmdz.com/attachment/images/baseImages/pinkflag2x.png' : 'https://xcx.zgzmdz.com/attachment/images/baseImages/flag2x.png'}}"> </image>
<view>{{data.is_join == 0 ? '个人中心' :'我的'}}</view>
</view>
</view>
</template>

162
qf_happyvote/pages/templates/index.wxml

@ -1,23 +1,78 @@
<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>
<view class="index" class="dian_bg">
<swiper autoplay="ture" bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" class="swiperBox" style="width:750rpx;height:338rpx;display:block;overflow: hidden;" wx:if="{{data.ishbimg=='0'}}">
<!-- <swiper-item style="height:338rpx;" wx:if="{{data.picture!=''}}" >
<image bindtap="imgjumpwxapp" data-img="1" src="{{data.picture}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item> -->
<swiper-item style="height:338rpx;" wx:if="{{data.picture2!=''}}">
<image bindtap="imgjumpwxapp" data-img="2" src="{{data.picture2}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{data.picture3!=''}}">
<image bindtap="imgjumpwxapp" data-img="3" src="{{data.picture3}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{data.picture4!=''}}">
<image bindtap="imgjumpwxapp" data-img="8" src="{{data.picture4}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{data.picture5!=''}}">
<image bindtap="imgjumpwxapp" data-img="9" src="{{data.picture5}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
</swiper>
<view class="in_top">
<view class="in_top1"></view>
</view>
<view class="infoBox bt_piao">
<view class="info-title">
<view class="info-title-item">总店长</view>
<view class="info-title-item">总票数</view>
<view class="info-title-item">总交易</view>
<view class="info-title-item">总浏览</view>
</view>
<view class="info-content">
<view class="info-content-item">{{data.dianzhang}}</view>
<view class="info-content-item">{{data.piaoshu}}</view>
<view class="info-content-item">{{data.jiaoyi}}</view>
<view class="info-content-item">{{data.liulan}}</view>
</view>
<view class="bt_piao" style="display: flex;padding-bottom: 15px;">
<view class="info-content-item-i">位</view>
<view class="info-content-item-i">票</view>
<view class="info-content-item-i">万元</view>
<view class="info-content-item-i">个</view>
</view>
</view>
<view class="timebox">
<view class="selectform">
<!-- <form bindsubmit="search">
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="text" confirm-type="search" bindconfirm="search" style="height:1.9rem;width:110px" style="width: 100%;text-align: left;"></input>
<button formType="submit" type="default">{{config.font[34]}}</button>
</form> -->
<form bindsubmit="search">
<view class="formInner">
<text class="iconfont icon-sousuo" style="font-size:32rpx;margin-top:12rpx;margin-right:20rpx;"></text>
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="text" confirm-type="search" bindconfirm="search" ></input>
<button formType="submit" class="searchBtn">{{config.font[34]}}</button>
</view>
</form>
</view>
<view class="box_time">
<view class="iconfont icon-countDown">
</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>
<view class="newbtn" bindtap="viewjump" data-topage="myjoin">
我要报名
</view>
</view>
</view>
<!-- <view class="head">
<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>
@ -44,8 +99,8 @@
</view>
</view>
</view>
<view class="index_datetop"></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>
@ -55,31 +110,64 @@
</view>
<view class="index_datetime" style="color:#555;">
{{data.strtime}}
</view>
</view> -->
<view class="list">
<view class="menu">
<!-- <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>
{{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>
{{config.font[6]}}
</view>
</view> -->
<view class="bt_1">
<view class="nav-tip">
<view class="nav-tip-i">
<view class="circle_box">
<image style="width:24rpx;height:24rpx" src="https://xcx.zgzmdz.com/attachment/images/baseImages/circle.png" ></image>
</view>
参与投票</view>
<!-- <view class="nav-tip-b">请选择1-10个</view> -->
</view>
<view class="nav nav_dian" style="width: 50%;">
<view class="nav-item {{data.showlist=='news'? 'active' : ''}}" bindtap="indextabchange" data-totab="news" style="width: 50%;">
<view style="z-index: 99;position: relative;">{{config.font[5]}}</view>
<view class="nav-item-after" wx:if="{{data.showlist=='news'}}"></view>
</view>
<view class="nav-item {{data.showlist=='hot'? 'active' : ''}}" bindtap="indextabchange" data-totab="hot" style="width: 50%;">
<view style="z-index: 99;position: relative;">人气</view>
<view class="nav-item-after" wx:if="{{data.showlist=='hot'}}"></view>
</view>
</view>
<view class="nav-item " bindtap="singleBtn">
<view class="btn_pai" style="z-index: 99;position: relative;">排行</view>
</view>
</view>
<view class="mall_list">
<view class="mall_list2">
<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 class="brand">
<view>诚信示范品牌</view>
<view class="brandImg">
<text>{{item.trust_count}}.0</text>
<image wx:for="{{item.trust_count}}" src="../../resource/icon/xing1.png" style="width:24rpx;height:24rpx" ></image>
<image wx:for="{{5-item.trust_count}}" src="../../resource/icon/xing2.png" style="width:24rpx;height:24rpx" ></image>
</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 class="info" data-joinid="{{item.id}}" >
<view class="top2"> <text class="iconfont icon-yanjing" style="font-size:24rpx;margin-right:10rpx;"></text>{{item.views}}</view>
<view class="top" style="background-color: rgba(0,0,0,0.3);"> {{item.id}}号 {{item.username}}</view>
</view>
<image bindtap="detail" class="img" mode="aspectFill" data-joinid="{{item.id}}" data-voteid="{{item.voteid}}" src="{{item.image}}"></image>
<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 style="color: #FF564F;">{{item.ranking}}</text></view>
<view class="orderfooter-info-item">票数:<text style="color: #FF564F;">{{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 class="orderfooter-info-item">店铺:<text>{{item.storename}}</text></view>
<!-- <view class="orderfooter-info-item">浏览量:<text>{{item.views}}</text></view> -->
</view>
<view class="newbtn2" bindtap="vote" data-joinid="{{item.id}}" data-topage="1">
给TA投票
</view>
</view>
</view>

3
qf_happyvote/pages/templates/index.wxss

@ -0,0 +1,3 @@
.box_time{
display: flex;
}

181
qf_happyvote/pages/templates/join.wxml

@ -1,16 +1,97 @@
<template name="votejoin">
<view class="join">
<view class="tabtitle" style="color:{{config.buttonbgcolor}}">活动报名处</view>
<view class="tabtitle">我要报名</view>
<view class="form">
<form bindsubmit="join">
<form catchsubmit="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 class="formgroupTitle">*姓名</view>
<input class="form-control" maxlength="25" name="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 class="formgroupTitle">*联系方式</view>
<input class="form-control" maxlength="11" name="telephone" placeholder="{{config.font[39]}}"
type="number" value="{{data.joinInfo.telephone}}"></input>
</view>
<view class="formgroup">
<view class="formgroupTitle">*商铺类型</view>
<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">
<view class="formgroupTitle">*店铺名称</view>
<input class="form-control" name="store_name" placeholder="请填写店铺名称" type="text"
value="{{data.joinInfo.store_name}}"></input>
</view>
<!-- 新增 -->
<view class="formgroup">
<view class="formgroupTitle">*商户地址</view>
<input class="form-control" name="store_Address" placeholder="请填写商户地址" type="text"
value="{{data.joinInfo.store_Address}}"></input>
</view>
<view class="formgroup">
<view class="formgroupTitle">*所属商业体</view>
<picker mode="multiSelector" bindchange="bindPickerChange" bindcolumnchange="bindMultiPickerColumnChange" range="{{data.joinInfo.mall_list}}"
>
<view class="picker"
style="font-size: 28rpx;background-color: #FFF;border-radius: 6rpx;padding: 20rpx;color:{{data.mallName?'#333':'#777'}}">
{{data.mallName||'请选择商圈/商场'}}
</view>
</picker>
</view>
<view class="formgroup">
<view class="formgroupTitle">*商户楼层位置</view>
<input class="form-control" name="store_floor" placeholder="楼层所在具体位置描述" type="text"
value="{{data.joinInfo.store_floor}}"></input>
</view>
<view class="formgroup imageform">
<view class="imagetext">*商户照片,默认第一张为封面图</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>
<view
style="height:194rpx;width:620rpx;border-bottom:2rpx solid #EEEEEE;text-align:center;line-height:194rpx;margin:0 auto;font-size: 24rpx;color: #999999;">
完善信息,可以增加更多曝光机会哦!
</view>
<view class="formgroup">
<view class="formgroupTitle">商户编码</view>
<input class="form-control" maxlength="15" name="MerchantCode" placeholder="收款机上查找" type="text"
value="{{data.joinInfo.MerchantCode}}"></input>
</view>
<view class="formgroup">
<view class="formgroupTitle">商户终端号</view>
<input class="form-control" maxlength="18" name="MerchantNumber" placeholder="收款机上查找" type="text"
value="{{data.joinInfo.MerchantNumber}}"></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'}}">
@ -20,11 +101,6 @@
<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">
@ -52,46 +128,79 @@
</view>
<view class="formgroup">
<input class="form-control" name="store_name" placeholder="请填写店铺名称" type="text" value="{{data.joinInfo.store_name}}"></input>
</view>
</view> -->
<!-- <label class="errorlabel" wx:if="{{data.validates.telephone}}">* {{config.font[40]}}</label> -->
<view class="formgroup imageform">
<view class="imagetext">{{config.font[41]}}</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 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 bindtap="delimage" class="imageclose" data-index="4" wx:if="{{data.images[0].isadd}}">
X</view>
<image bindtap="selimage" class="image" data-index="4" src="{{data.images[0].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>
<view class="formgroup">
<view class="formgroupTitle">店铺面积(平方)</view>
<input class="form-control" name="store_area" placeholder="0" type="text"
value="{{data.joinInfo.store_area}}"></input>
</view>
<view class="formgroup imageform">
<view class="imagetext">营业执照</view>
<view class="imagelist">
<view class="imageitem">
<view bindtap="delimage" class="imageclose" data-index="4" wx:if="{{data.images[4].isadd}}">
X</view>
<image bindtap="selimage" class="image" data-index="4" src="{{data.images[4].src}}"></image>
</view>
</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 class="formgroup">
<view class="formgroupTitle">店长诚信宣言</view>
<input maxlength="100" name="resume" placeholder="用心的写下您的宣言吧"
value="{{data.joinInfo.resume}}"></input>
</view>
<view class="fromCheck">
<view style="font-size:28rpx;padding:20rpx 0;display:flex;justify-content: space-between;">
<view>诚信示范品牌</view>
<view>{{Num}}.0分</view>
</view>
<checkbox-group name="checkGroup" bindchange="checkboxChange">
<label class="labelCheck" wx:for="{{CheckItem}}" wx:key="{{item.value}}">
<view class="weui-cell__hd">
<checkbox value="{{item.value}}" checked="{{item.checked}}" />
</view>
<view class="weui-cell__bd">{{item.name}}</view>
</label>
</checkbox-group>
</view>
<!-- <checkbox-group style="text-align:center;margin-bottom:30rpx;">
<label class="weui-agree" style="font-size:20rpx" for="weuiAgree">
<view class="weui-agree__text" style="text-align:center">
<checkbox class="weui-agree__checkbox" id="weuiAgree" value="agree" checked="{{}}" />
<view class="weui-agree__checkbox-icon">
<icon class="weui-agree__checkbox-icon-check" type="success_no_circle" size="9" wx:if="{{isAgree}}"></icon>
</view>
阅读并同意<view bindtap="open" class="weui-agree__link">《店长评选》</view>协议,并遵守活动规则
</view>
</label>
</checkbox-group> -->
<!-- <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>
<button class="submitbtn" formType="submit" style="background-color:#FF564F;color:#fff"
type="default">提交</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>
<view class="mask" catchtouchmove='true' hidden="{{!config.open}}"></view>
<view class="model_box" hidden="{{!config.open}}">
<view bindtap="close" class="submitbtn">确认</view>
</view>
</template>

2
qf_happyvote/pages/templates/joinok.wxml

@ -2,7 +2,7 @@
<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>
<view class="msg2">{{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>

306
qf_happyvote/pages/templates/mall.wxml

@ -1,128 +1,218 @@
<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 class="bg_in">
<!-- <view class="index_datetime">
<view class="address">
<picker mode="region" bindchange="bindRegionChange" value="{{area.region}}">
<view class="picker" style="padding-left:10px;padding-right:80rpx;">
{{area.region[0]}} {{area.region[1]}} {{area.region[2]}}
<text class="iconfont icon-xiala" style="position:relative;left:20rpx"></text>
</view>
</picker>
</view>
</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>
<swiper bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" class="swiperBox" style="width:750rpx;height:338rpx;display:block;overflow: hidden;">
<swiper-item style="height:338rpx;" wx:for="{{data.ad}}">
<image bindtap="imgjumpwxapp" data-appid="{{item.appid}}" data-url="{{item.value}}" src="{{item.pic}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<!-- <swiper-item style="height:338rpx;" wx:if="{{index.picture!=0}}">
<image bindtap="imgjumpwxapp" data-img="2" src="{{index.picture}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if='{{index.picture2!="0"}}'>
<image bindtap="imgjumpwxapp" data-img="2" src="{{index.picture2}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{index.picture3!='0'}}">
<image bindtap="imgjumpwxapp" data-img="3" src="{{index.picture3}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{index.picture4!='0'}}">
<image bindtap="imgjumpwxapp" data-img="8" src="{{index.picture4}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
<swiper-item style="height:338rpx;" wx:if="{{index.picture5!='0'}}">
<image bindtap="imgjumpwxapp" data-img="9" src="{{index.picture5}}" style="height:338rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item> -->
</swiper>
<view class="in_top">
<view class="in_top1"></view>
</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 class="timebox">
<view class="selectform">
<form bindsubmit="search">
<view class="formInner">
<text class="iconfont icon-sousuo" style="font-size:32rpx;margin-top:12rpx;margin-right:20rpx;"></text>
<input maxlength="11" name="joinid" placeholder="{{config.font[33]}}" type="text" confirm-type="search" bindconfirm="search" ></input>
<button formType="submit" class="searchBtn">{{config.font[34]}}</button>
</view>
</form>
</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 class="box_time">
<view class="iconfont icon-countDown">
</view>
<view class="total">
<view class="num" style="color:#fff;">{{data.piao_num}}</view>
<view>总票数</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 class="total">
<view class="num" style="color:#fff;">{{data.liulan_num}}</view>
<view>浏览量</view>
</view>
<view>
<view class="newbtn" bindtap="viewjump" data-topage="myjoin">
我要报名
</view>
</view>
</view> -->
<view class="infoBox">
<view class="info-title">
<view class="info-title-item">商场</view>
<view class="info-title-item">店长</view>
<view class="info-title-item">总票数</view>
<view class="info-title-item">浏览量</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 class="info-content">
<view class="info-content-item">{{data.total_shop_sum}}</view>
<view class="info-content-item">{{data.total_join_count}}</view>
<view class="info-content-item">{{data.total_vote_count}}</view>
<view class="info-content-item">{{data.total_access_count}}</view>
</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 style="display: flex;padding-bottom: 15px;">
<view class="info-content-item-i">个</view>
<view class="info-content-item-i">位</view>
<view class="info-content-item-i">票</view>
<view class="info-content-item-i">{{data.total_access_count<9999999 ? '个':'百万'}}</view>
</view>
</view>
<view class="bg_linepot"> </view>
<!-- <swiper bindchange="onSlideChangeEnd" duration="200" indicatorDots="ture" interval="4000" class="swiperBox" style="width:750rpx;height:200rpx;display:block;overflow: hidden;">
<swiper-item style="height:250rpx;" wx:for="{{data.ad_index}}">
bindtap="imgjumpwxapp"
<image data-appid="{{item.id}}" data-url="{{item.value}}" src="{{item.pic}}" style="height:250rpx;width:100%;display:block;overflow: hidden;object-fit:cover;"></image>
</swiper-item>
</swiper> -->
<view class="index_banner">
<image wx:for="{{data.ad_index}}" src="{{item.pic}}"></image>
</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>
<!-- 区域选择 -->
<scroll-view scroll-x="true" style="white-space:nowrap" class="areaContent" bindtap="changeTab" >
<view class="{{isArea=='罗湖区'?'active':''}}" data-area="罗湖区" >罗湖区</view>
<view class="{{isArea=='南山区'?'active':''}}" data-area="南山区" >南山区</view>
<view class="{{isArea=='宝安区'?'active':''}}" data-area="宝安区" >宝安区</view>
<view class="{{isArea=='福田区'?'active':''}}" data-area="福田区" >福田区</view>
<view class="{{isArea=='龙华区'?'active':''}}" data-area="龙华区" >龙华区</view>
<view class="{{isArea=='坪山区'?'active':''}}" data-area="坪山区" >坪山区</view>
<view class="{{isArea=='龙岗区'?'active':''}}" data-area="龙岗区" >龙岗区</view>
<view class="{{isArea=='光明区'?'active':''}}" data-area="光明区" >光明区</view>
<view class="{{isArea=='盐田区'?'active':''}}" data-area="盐田区" >盐田区</view>
<view class="{{isArea=='大鹏新区'?'active':''}}" data-area="大鹏新区" >大鹏新区</view>
<view class="{{isArea=='前海新区'?'active':''}}" data-area="前海新区" >前海新区</view>
</scroll-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>
<image class="img" src="{{item.imgurl}}"></image>
<view>
<view class="mallbtn">
{{item.name}}
</view>
<view class="total">
<view class="num" style="color:#fff;">{{data.dianzhang_num}}</view>
<view>店长</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 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_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}}">
<view style="z-index: 99;position: relative;">{{item.name}}</view>
<view class="nav-item-after" wx:if="{{item.id == data.nowNav}}"></view>
</view>
</view>
<view class="list">
<view class="mall_list">
<view wx:for="{{data.mall_list}}" wx:key="index">
<view class="kh-item {{ index%2==0 ? 'redBg' : 'whiteBg'}}" bindtap="dianzhang" data-time="{{item.end_time}}" data-voteid="{{item.id}}" data-mall_id="{{item.mall_id}}">
<view class="kh-item-left">
<view class="kh-item-left-box">
<image mode="aspectFill" class="kh-item-left-box-img" src="https://xcx.zgzmdz.com/attachment/{{item.picture}}"></image>
<view class="kh-item-left-box-ps">
票数 {{item.total_vote_count}}
</view>
</view>
</view>
<view class="kh-item-right">
<view class="order-info">
<view class="order-info-name"><view class="order-info-id"> B{{item.id}}</view>{{item.title}}</view>
<view class="order-info-item">店长:<text>{{item.total_join_count}}</text></view>
<view class="order-info-item">交易额:<text>{{item.total_gift_record}}</text></view>
<view class="order-info-item">浏览量:<text>{{item.total_access_count}}</text></view>
</view>
</view>
</view>
<view class="{{ index%2==0 ? 'listBak' : 'listBak2'}}"></view>
</view>
<!-- <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 wx:if="{{data.mall_list.length==0}}" style="text-align:center;padding:30px;">暂无商场</view>
</view>
</view>
</template>

2
qf_happyvote/pages/templates/mall.wxss

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

92
qf_happyvote/pages/templates/ranking.wxml

@ -1,60 +1,64 @@
<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 == 'shangcheng'?'active':''}}" bindtap="tab1" data-status="shangcheng">商排行榜</view>
<view class="tab-item {{data.tabs == 'dianzhang'?'active':''}}" bindtap="tab1" data-status="dianzhang">店长排行榜</view>
</view>
<picker style="margin-top:30rpx" bindchange="rnakAreaChange" value="{{data.rankIndex}}" range="{{data.rankArea}}">
<view style="box-sizing: border-box;padding: 20rpx 60rpx;font-size: 32rpx;color: white;">
当前选择区域:{{data.rankArea[data.rankIndex]}}
</view>
</picker>
<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 == 'renqi' ? 'tabtitle-active':''}}" bindtap="tab" data-type="renqi">网红人气MALL</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}}">
<view class="huangguan" style="top:10%" bindtap="detail" data-joinid="{{data.mall_list[0].id}}" data-voteid="{{data.mall_list[0].voteid}}" >
<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"/>
<image src="{{data.mall_list[0].image?data.mall_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 class="huangguan" style="margin-top: 30px;top:50%">
<view style="color: #fff;text-align:center" class="piao">
{{data.nowType == 'renqi'? data.mall_list[0].pollcount : data.nowType == 'yeji'? data.mall_list[0].price_sum: data.nowType == 'hudong'? data.mall_list[0].user_count:data.mall_list[0].count}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '信任榜': data.nowType == 'hudong' ? '客流榜' : '综合'}}
</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:'暂无'}}
{{data.mall_list[0].username?data.mall_list[0].username:'暂无'}}
</view>
<view style="text-align: center;" class="num">编号:{{data.list[0].id?data.list[0].id:'0'}}</view>
<view style="text-align: center;" class="num">编号:{{data.mall_list[0].id?data.mall_list[0].id:'0'}}</view>
</view>
<view class="yin" bindtap="detail" data-joinid="{{data.list[1].id}}">
<view class="yin" style="top: 25%;" bindtap="detail" data-joinid="{{data.mall_list[1].id}}" data-voteid="{{data.mall_list[1].voteid}}" >
<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;"/>
<image src="{{data.mall_list[1].image?data.mall_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 class="yin" style="margin-top: 30px;top:56%;">
<view style="color: #fff;text-align:center" class="piao">
{{data.nowType == 'renqi'? data.mall_list[1].pollcount : data.nowType == 'yeji'? data.mall_list[1].price_sum: data.nowType == 'hudong'? data.mall_list[1].user_count:data.mall_list[1].count}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '信任榜': data.nowType == 'hudong' ? '客流榜' : '综合'}}
</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:'暂无'}}
{{data.mall_list[1].username?data.mall_list[1].username:'暂无'}}
</view>
<view style="text-align: center;" class="num">编号:{{data.list[1].id?data.list[1].id:'0'}}</view>
<view style="text-align: center;" class="num">编号:{{data.mall_list[1].id?data.mall_list[1].id:'0'}}</view>
</view>
<view class="tong" bindtap="detail" data-joinid="{{data.list[2].id}}">
<view class="tong" style="top:32%" bindtap="detail" data-joinid="{{data.mall_list[2].id}}" data-voteid="{{data.mall_list[2].voteid}}" >
<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;"/>
<image src="{{data.mall_list[2].image?data.mall_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 class="tong" style="margin-top: 30px;top:57%">
<view style="color: #fff;text-align:center" class="piao">
{{data.nowType == 'renqi'? data.mall_list[2].pollcount : data.nowType == 'yeji'? data.mall_list[2].price_sum: data.nowType == 'hudong'? data.mall_list[2].user_count:data.mall_list[2].count}}{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '信任榜': data.nowType == 'hudong' ? '客流榜' : '综合'}}
</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:'暂无'}}
{{data.mall_list[2].username?data.mall_list[2].username:'暂无'}}
</view>
<view style="text-align: center;" class="num">编号:{{data.list[2].id?data.list[2].id:'0'}}</view>
<view style="text-align: center;" class="num">编号:{{data.mall_list[2].id?data.mall_list[2].id:'0'}}</view>
</view>
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/paihang.png" style="width:100%"/>
<image src="https://xcx.zgzmdz.com/attachment/images/baseImages/pai.png" style="width:100%"/>
</view>
<view class="table">
<view class="tr title">
@ -63,9 +67,9 @@
<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 class="td6">{{data.nowType == 'renqi'? config.font[31] : data.nowType == 'yeji' ? '信任榜': data.nowType == 'hudong' ? '客流榜' : '综合'}}</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 bindtap="detail" class="tr" data-joinid="{{item.id}}" data-voteid="{{item.voteid}}" style="{{item.uid==memberinfo.id?'color:'+config.buttonbgcolor:''}}" wx:for="{{data.mall_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> -->
@ -75,67 +79,67 @@
</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 class="td6">{{data.nowType == 'renqi'? item.pollcount : data.nowType == 'yeji'? item.price_sum: data.nowType == 'yeji'?item.user_count:item.count}}</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}}">
<view class="huangguan" style="top:10%" bindtap="dianzhang" data-mall_id="{{data.mall_list[0].id}}" data-voteid="{{data.mall_list[0].vote_id}}" data-time="{{data.mall_list[0].end_time}}" >
<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 class="huangguan" style="margin-top: 30px;top:48%">
<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}}
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '信任榜': data.nowType=='hudong' ? '客流榜' : '综合'}}:{{data.nowType == 'renqi'? data.mall_list[0].pollcount : data.nowType == 'yeji' ? data.mall_list[0].price : data.nowType=='hudong' ? data.mall_list[0].count : data.mall_list[0].count}}
</view>
</view>
<view class="yin" style="top:29%" bindtap="dianzhang" data-mall_id="{{data.mall_list[1].id}}">
<view class="yin" style="top:25%" bindtap="dianzhang" data-mall_id="{{data.mall_list[1].id}}" data-voteid="{{data.mall_list[1].vote_id}}" data-time="{{data.mall_list[1].end_time}}" >
<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 class="yin" style="margin-top: 30px;top:62%;">
<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}}
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '信任榜': data.nowType=='hudong' ? '客流榜' : '综合'}}:{{data.nowType == 'renqi'? data.mall_list[1].pollcount : data.nowType == 'yeji' ? data.mall_list[1].price : data.nowType=='hudong' ? data.mall_list[1].count : data.mall_list[1].count}}
</view>
</view>
<view class="tong" style="top:40%" bindtap="dianzhang" data-mall_id="{{data.mall_list[2].id}}">
<view class="tong" style="top:32%" bindtap="dianzhang" data-mall_id="{{data.mall_list[2].id}}" data-voteid="{{data.mall_list[2].vote_id}}" data-time="{{data.mall_list[2].end_time}}" >
<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 class="tong" style="margin-top: 30px;top:65%">
<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}}
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '信任榜': data.nowType=='hudong' ? '客流榜' : '综合'}}:{{data.nowType == 'renqi'? data.mall_list[2].pollcount : data.nowType == 'yeji' ? data.mall_list[2].price : data.nowType=='hudong' ? data.mall_list[2].count : data.mall_list[2].count}}
</view>
</view>
<image src="https://xcx.zgzmdz.com/addons/qf_happyvote/template/img/paihang2.png" style="width:100%"/>
<image src="https://xcx.zgzmdz.com/attachment/images/baseImages/pai.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 style="box-shadow: 1px 1px 5px #888888;width:100%;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' ? '营业额':'客流量'}}
{{data.nowType == 'renqi'? '票数' : data.nowType == 'yeji' ? '信任榜': data.nowType=='hudong' ? '客流榜' : '综合'}}
</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 bindtap="dianzhang" class="tr" data-mall_id="{{item.id}}" data-voteid="{{item.vote_id}}" data-time="{{item.end_time}}" 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}}
{{data.nowType == 'renqi'? item.pollcount : data.nowType == 'yeji' ? item.price : data.nowType == 'hudong' ? item.count : item.count}}
</view>
</view>
</view>

8
qf_happyvote/pages/templates/rule.wxml

@ -1,9 +1,11 @@
<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 class="tr tabtitle" style="color:{{config.buttonbgcolor}}">{{config.font[77]}}</view> -->
<view style="text-align: center;font-size: 28rpx;font-weight: bold;color: white;">{{data.title}}</view>
<view class="content" style="color: white;">
<rich-text nodes="{{data.message}}"></rich-text>
<!-- <template is="wxParse" data="{{wxParseData:data.message}}"></template> -->
</view>
</view>
</template>

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

@ -18,6 +18,7 @@ Page({
//eventChannel.emit('acceptDataFromOpenedPage', {data: 'test'});
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
eventChannel.on('acceptDataFromOpenerPage', function(data) {
console.log(data);
_this.setData({
url: data.url
})

115
qf_happyvote/resource/js/function.js

@ -2,6 +2,7 @@ function t(t) {
r.util.request({
url: "entry/wxapp/initpage",
data: {
state:'aa',
voteid: t.data.voteid,
listlimit: t.data.index.limit,
uid: t.data.memberinfo.id
@ -45,15 +46,18 @@ function t(t) {
"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
// title: o.title
frontColor: "#ffffff"
// title: "中国深圳店长节评选"
}), wx.setNavigationBarColor({
frontColor: "#ffffff",
backgroundColor: e.footbgcolor,
// 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,
@ -68,14 +72,16 @@ function t(t) {
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({
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);
}), "" != t.data.joinid && t.data.joinid > 0 && a(t, t.data.joinid) ;
}
});
}
@ -88,6 +94,9 @@ function a(t, a) {
joinid: a
},
success: function(a) {
if(a.data.data.images.length>1){
a.data.data.images.splice(-1,1);
}
console.log(a.data), e(t, a.data.data);
}
});
@ -137,7 +146,7 @@ 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.giftrecords = a.giftrecords, i.ranking = a.ranking, i.video = a.video, i.music = a.music, i.trust_count=a.trust_count
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,
@ -272,6 +281,7 @@ module.exports = {
},
join: function(t, a) {
var e = n(t);
console.log(e)
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;
@ -357,7 +367,6 @@ module.exports = {
},
vote: function(t, a) {
var i = n(t);
console.log(t)
-1 != i ? -2 != i ? r.util.request({
url: "entry/wxapp/vote",
data: {
@ -368,16 +377,25 @@ module.exports = {
avatar: t.data.memberinfo.avatar
},
success: function(i) {
console.info(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),
n.pollcount = Number(n.pollcount) + 1, t.data.config.isgift && t.data.config.isvotegiftpop , //&& d(t),
t.setData({
index: e,
detail: n
detail: n,
}), r.util.message("投票成功", "", "success");
if(i.data.data.today_vote_count!=2){
t.setData({
showpage: 'luckDraw',
footerindex: 1
})
t.luckDrawLoad()
}
},
fail(error){
console.log(error)
@ -476,9 +494,9 @@ module.exports = {
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 = "报名还未开启"),
0 == t.data.config.isjoin && (s.subbtn.isdisabled = !0, s.subbtn.text = "报名还未开启")
t.setData({
join: s
'join': s
});
}
t.setData({
@ -500,50 +518,73 @@ module.exports = {
},
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);
if (i != [] && 2 == i.checkstate) console.log(i), o(t, i), e = "join"; 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
});
0 == t.data.config.isjoin && (s.subbtn.isdisabled = !0, s.subbtn.text = "报名还未开启")
// t.setData({
// join: s
// });
}
console.log(i)
let joinInfo=t.data.join.joinInfo;
joinInfo.username =i.joininfo.username,joinInfo.telephone =i.joininfo.telephone,joinInfo.store_name =i.joininfo.store_name,joinInfo.store_Address =i.joininfo.address,
joinInfo.store_floor =i.joininfo.floor,joinInfo.MerchantCode =i.joininfo.mcode,joinInfo.MerchantNumber =i.joininfo.mterminal,joinInfo.store_area =i.joininfo.size,joinInfo.resume =i.joininfo.resume;
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
}
var images = t.data.join.images;
if(i.joininfo){
images[4].isadd=true;
images[4].src=i.joininfo.image[i.joininfo.image.length-1]
}
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
}
let CheckItem=t.data.CheckItem;
let num=0;
if(i.joininfo){
num=i.joininfo.trust_count.length;
i.joininfo.trust_count.forEach(item=>{
CheckItem[item-1].checked=true;
})
}
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 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
// }
// }
if(i.joininfo){
for( var img = 0; img< i.joininfo.image.length-1; img++ ){
images[img].isadd = true;
images[img].src = i.joininfo.image[img]
}
}
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.joinInfo': joinInfo,
'join.mallId': i.joininfo.mall_id,
'join.mallName': i.joininfo.mall_name,
'join.storeId': i.joininfo.store_type,
'join.storeName': i.joininfo.store_type_name,
'join.typesId':i.mall_type,
'join.region': i.mall_area || [],
'join.typesName': typesName,
'join.images': images,
CheckItem:CheckItem,
'detail.trust_count':num,
footerindex: 2
});
}

15
qf_happyvote/resource/wxParse/wxParse.wxss

@ -10,7 +10,20 @@ view {
word-break: break-all;
overflow: auto;
}
.index_banner{
width: 100%;
height: 200rpx;
overflow-x: scroll;
overflow-y:hidden ;
background-color: white;
/* display: flex; */
white-space: nowrap;
}
.index_banner image{
width: 170rpx;
height: 100%;
margin-right: 20rpx;
}
.wxParse-inline {
display: inline;
margin: 0;

500
we7/resource/js/util.js

@ -15,20 +15,25 @@ function _defineProperty(e, t, n) {
function getQuery(e) {
var t = [];
if (-1 != e.indexOf("?")) for (var n = e.split("?")[1].split("&"), r = 0; r < n.length; r++) n[r].split("=")[0] && unescape(n[r].split("=")[1]) && (t[r] = {
name: n[r].split("=")[0],
value: unescape(n[r].split("=")[1])
});
if (-1 != e.indexOf("?"))
for (var n = e.split("?")[1].split("&"), r = 0; r < n.length; r++) n[r].split("=")[0] && unescape(n[r].split("=")[1]) && (t[r] = {
name: n[r].split("=")[0],
value: unescape(n[r].split("=")[1])
});
return t;
}
function getUrlParam(e, t) {
var n = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), r = e.split("?")[1].match(n);
var n = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"),
r = e.split("?")[1].match(n);
return null != r ? unescape(r[2]) : null;
}
function getSign(e, t, n) {
var r = require("underscore.js"), a = require("md5.js"), i = "", o = getUrlParam(e, "sign");
var r = require("underscore.js"),
a = require("md5.js"),
i = "",
o = getUrlParam(e, "sign");
if (o || t && t.sign) return !1;
if (e && (i = getQuery(e)), t) {
var s = [];
@ -39,68 +44,80 @@ function getSign(e, t, n) {
i = i.concat(s);
}
i = r.sortBy(i, "name"), i = r.uniq(i, !0, "name");
for (var c = "", g = 0; g < i.length; g++) i[g] && i[g].name && i[g].value && (c += i[g].name + "=" + i[g].value,
g < i.length - 1 && (c += "&"));
for (var c = "", g = 0; g < i.length; g++) i[g] && i[g].name && i[g].value && (c += i[g].name + "=" + i[g].value,
g < i.length - 1 && (c += "&"));
return n = n || getApp().siteInfo.token, o = a(c + n);
}
var _typeof = "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;
}, _base = require("base64"), _md = require("md5"), _md2 = _interopRequireDefault(_md), util = {};
var _typeof = "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;
},
_base = require("base64"),
_md = require("md5"),
_md2 = _interopRequireDefault(_md),
util = {};
util.base64_encode = function(e) {
util.base64_encode = function (e) {
return (0, _base.base64_encode)(e);
}, util.base64_decode = function(e) {
}, util.base64_decode = function (e) {
return (0, _base.base64_decode)(e);
}, util.md5 = function(e) {
}, util.md5 = function (e) {
return (0, _md2.default)(e);
}, util.url = function(e, t) {
var n = getApp(), r = n.siteInfo.siteroot + "?i=" + n.siteInfo.uniacid + "&t=" + n.siteInfo.multiid + "&v=" + n.siteInfo.version + "&from=wxapp&";
if (e && ((e = e.split("/"))[0] && (r += "c=" + e[0] + "&"), e[1] && (r += "a=" + e[1] + "&"),
e[2] && (r += "do=" + e[2] + "&")), t && "object" === (void 0 === t ? "undefined" : _typeof(t))) for (var a in t) a && t.hasOwnProperty(a) && t[a] && (r += a + "=" + t[a] + "&");
}, util.url = function (e, t) {
var n = getApp(),
r = n.siteInfo.siteroot + "?i=" + n.siteInfo.uniacid + "&t=" + n.siteInfo.multiid + "&v=" + n.siteInfo.version + "&from=wxapp&";
if (e && ((e = e.split("/"))[0] && (r += "c=" + e[0] + "&"), e[1] && (r += "a=" + e[1] + "&"),
e[2] && (r += "do=" + e[2] + "&")), t && "object" === (void 0 === t ? "undefined" : _typeof(t)))
for (var a in t) a && t.hasOwnProperty(a) && t[a] && (r += a + "=" + t[a] + "&");
return r;
}, util.getSign = function(e, t, n) {
}, util.getSign = function (e, t, n) {
return getSign(e, t, n);
}, util.getWe7url = function(e, t) {
var n = wx.getStorageSync("userInfo").sessionid, r = e;
if (-1 == r.indexOf("http://") && -1 == r.indexOf("https://") && (r = util.url(r)),
getUrlParam(r, "state") || t && t.state || !n || (r = r + "&state=we7sid-" + n),
!t || !t.m) {
}, util.getWe7url = function (e, t) {
var n = wx.getStorageSync("userInfo").sessionid,
r = e;
if (-1 == r.indexOf("http://") && -1 == r.indexOf("https://") && (r = util.url(r)),
getUrlParam(r, "state") || t && t.state || !n || (r = r + "&state=we7sid-" + n),
!t || !t.m) {
var a = getCurrentPages();
a.length && (a = a[getCurrentPages().length - 1]) && a.__route__ && (r = r + "&m=" + a.__route__.split("/")[0]);
}
var i = getSign(r, t);
return i && (r = r + "&sign=" + i), r || !1;
}, util.getWe7urls = function(e, t) {
}, util.getWe7urls = function (e, t) {
wx.getStorageSync("userInfo").sessionid;
var n = e;
if (-1 == n.indexOf("http://") && -1 == n.indexOf("https://") && (n = util.url(n)),
!t || !t.m) {
if (-1 == n.indexOf("http://") && -1 == n.indexOf("https://") && (n = util.url(n)),
!t || !t.m) {
var r = getCurrentPages();
r.length && (r = r[getCurrentPages().length - 1]) && r.__route__ && (n = n + "&m=" + r.__route__.split("/")[0]);
}
return n || !1;
}, util.request = function(e) {
}, util.request = function (e) {
// console.info(e)
require("underscore.js");
var t, n = require("md5.js"), r = getApp();
var t, n = require("md5.js"),
r = getApp();
(e = e || {}).cachetime = e.cachetime ? e.cachetime : 0, e.showLoading = void 0 === e.showLoading || e.showLoading;
var a = wx.getStorageSync("userInfo").sessionid, i = e.url;
if (-1 == i.indexOf("http://") && -1 == i.indexOf("https://") && (i = util.url(i)),
getUrlParam(i, "state") || e.data && e.data.state || !a || (i = i + "&state=we7sid-" + a),
!e.data || !e.data.m) {
var a = wx.getStorageSync("userInfo").sessionid,
i = e.url;
if (-1 == i.indexOf("http://") && -1 == i.indexOf("https://") && (i = util.url(i)),
getUrlParam(i, "state") || e.data && e.data.state || !a || (i = i + "&state=we7sid-" + a),
!e.data || !e.data.m) {
var o = getCurrentPages();
o.length && (o = o[getCurrentPages().length - 1]) && o.__route__ && (i = i + "&m=" + o.__route__.split("/")[0]);
}
var s = getSign(i, e.data);
if (s && (i = i + "&sign=" + s), !i) return !1;
if (wx.showNavigationBarLoading(), e.showLoading && util.showLoading(), e.cachetime) {
var u = n(i), c = wx.getStorageSync(u), g = Date.parse(new Date());
var u = n(i),
c = wx.getStorageSync(u),
g = Date.parse(new Date());
if (c && c.data) {
if (c.expire > g) return e.complete && "function" == typeof e.complete && e.complete(c),
e.success && "function" == typeof e.success && e.success(c), console.log("cache:" + i),
wx.hideLoading(), wx.hideNavigationBarLoading(), !0;
if (c.expire > g) return e.complete && "function" == typeof e.complete && e.complete(c),
e.success && "function" == typeof e.success && e.success(c), console.log("cache:" + i),
wx.hideLoading(), wx.hideNavigationBarLoading(), !0;
wx.removeStorageSync(u);
}
}
@ -111,13 +128,19 @@ util.base64_encode = function(e) {
method: e.method ? e.method : "GET"
}, _defineProperty(t, "header", {
"content-type": "application/x-www-form-urlencoded"
}), _defineProperty(t, "success", function(t) {
}), _defineProperty(t, "success", function (t) {
if (wx.hideNavigationBarLoading(), wx.hideLoading(), t.data.errno) {
if ("41009" == t.data.errno) return wx.setStorageSync("userInfo", ""), void util.getUserInfo(function() {
util.request(e);
if ("41009" == t.data.errno) return wx.setStorageSync("userInfo", ""),
// void util.getUserInfo(function () {
// util.request(e);
// });
e.setData({
['config.userlogin']:1
});
if (e.fail && "function" == typeof e.fail) e.fail(t); else if (t.data.message) {
if (null != t.data.data && t.data.data.redirect) n = t.data.data.redirect; else var n = "";
if (e.fail && "function" == typeof e.fail) e.fail(t);
else if (t.data.message) {
if (null != t.data.data && t.data.data.redirect) n = t.data.data.redirect;
else var n = "";
r.util.message(t.data.message, n, "error");
}
} else if (e.success && "function" == typeof e.success && e.success(t), e.cachetime) {
@ -127,110 +150,127 @@ util.base64_encode = function(e) {
};
wx.setStorageSync(u, a);
}
}), _defineProperty(t, "fail", function(t) {
}), _defineProperty(t, "fail", function (t) {
wx.hideNavigationBarLoading(), wx.hideLoading();
var n = require("md5.js")(i), r = wx.getStorageSync(n);
if (r && r.data) return e.success && "function" == typeof e.success && e.success(r),
console.log("failreadcache:" + i), !0;
var n = require("md5.js")(i),
r = wx.getStorageSync(n);
if (r && r.data) return e.success && "function" == typeof e.success && e.success(r),
console.log("failreadcache:" + i), !0;
e.fail && "function" == typeof e.fail && e.fail(t);
}), _defineProperty(t, "complete", function(t) {
}), _defineProperty(t, "complete", function (t) {
e.complete && "function" == typeof e.complete && e.complete(t);
}), t));
}, util.getUserInfo = function(e) {
!function() {
}, util.getUserInfo = function (e) {
! function () {
console.log("start login");
var t = {
sessionid: "",
wxInfo: "",
memberInfo: ""
};
wx.login({
success: function(n) {
n.code ? util.request({
url: "auth/session/openid",
data: {
code: n.code
},
cachetime: 0,
success: function(n) {
console.log(n), console.log("openid"), console.log(n.data.data.userinfo.openid),
n.data.errno || (t.sessionid = n.data.data.sessionid, console.log(n.data.data.sessionid),
wx.setStorageSync("userInfo", t), wx.getUserInfo({
success: function(n) {
t.wxInfo = n.userInfo, console.log(n), wx.setStorageSync("userInfo", t), util.request({
url: "entry/wxapp/initqfuser",
data: {
signature: n.signature,
rawData: n.rawData,
iv: n.iv,
encryptedData: n.encryptedData
},
method: "POST",
header: {
"content-type": "application/x-www-form-urlencoded"
},
cachetime: 0,
success: function(n) {
console.log("res"), console.log(n), n.data.errno || (t.memberInfo = n.data.data,
wx.setStorageSync("userInfo", t)), "function" == typeof e && e(t);
}
});
wx.getUserProfile({
desc: '需要授权后才能参加活动',
success: file => {
wx.login({
success: function (n) {
n.code ? util.request({
url: "auth/session/openid",
data: {
code: n.code
},
fail: function(t) {
"getUserInfo:fail auth deny" == t.errMsg ? wx.showModal({
title: "获取信息失败",
content: "请允许授权以便为您提供给服务",
success: function(t) {
t.confirm && wx.openSetting({
success: function(t) {
1 == t.authSetting["scope.userInfo"] && util.getUserInfo(e);
}
});
cachetime: 0,
success: function (n) {
wx.getUserInfo({
success: use1 => {
console.log(n), console.log("openid"), console.log(n.data.data.userinfo.openid),
n.data.errno || (t.sessionid = n.data.data.sessionid, console.log(n.data.data.sessionid),
wx.setStorageSync("userInfo", t),
t.wxInfo = file.userInfo, console.log(file), wx.setStorageSync("userInfo", t),
util.request({
url: "entry/wxapp/initqfuser",
data: {
signature: use1.signature,
rawData: use1.rawData,
iv: use1.iv,
encryptedData: use1.encryptedData
},
method: "POST",
header: {
"content-type": "application/x-www-form-urlencoded"
},
cachetime: 0,
success: function (n) {
n.data.data.avatar=file.userInfo.avatarUrl;
n.data.data.nickname=file.userInfo.nickName;
console.log("res"), console.log(n), n.data.errno || (t.memberInfo = n.data.data,
wx.setStorageSync("userInfo", t)), "function" == typeof e && e(t);
}
})
);
}
}) : wx.showModal({
title: "获取信息失败",
content: "错误:" + t.errMsg + "。是否重新获取?",
success: function(t) {
t.confirm && wx.openSetting({
success: function(t) {
1 == t.authSetting["scope.userInfo"] && util.getUserInfo(e);
}
});
}
});
})
}
}));
}
}) : wx.showModal({
title: "登陆失败",
content: "获取用户登录态失败!" + n.errMsg,
success: function(t) {
t.confirm && util.getUserInfo(e);
}) : wx.showModal({
title: "登陆失败",
content: "获取用户登录态失败!" + n.errMsg,
success: function (t) {
t.confirm && util.getUserInfo(e);
}
});
}
});
},
fail: function (t) {
"getUserInfo:fail auth deny" == t.errMsg ? wx.showModal({
title: "获取信息失败",
content: "请允许授权以便为您提供给服务",
success: function (t) {
t.confirm && wx.openSetting({
success: function (t) {
1 == t.authSetting["scope.userInfo"] && util.getUserInfo(e);
}
});
}
}) :''
// : wx.showModal({
// title: "获取信息失败",
// content: "错误:" + t.errMsg + "。是否重新获取?",
// success: function (t) {
// t.confirm && wx.openSetting({
// success: function (t) {
// 1 == t.authSetting["scope.userInfo"] && util.getUserInfo(e);
// }
// });
// }
// });
}
});
})
}();
}, util.navigateBack = function(e) {
}, util.navigateBack = function (e) {
var t = e.delta ? e.delta : 1;
if (e.data) {
var n = getCurrentPages(), r = n[n.length - (t + 1)];
var n = getCurrentPages(),
r = n[n.length - (t + 1)];
r.pageForResult ? r.pageForResult(e.data) : r.setData(e.data);
}
wx.navigateBack({
delta: t,
success: function(t) {
success: function (t) {
"function" == typeof e.success && e.success(t);
},
fail: function(t) {
fail: function (t) {
"function" == typeof e.fail && e.fail(t);
},
complete: function() {
complete: function () {
"function" == typeof e.complete && e.complete();
}
});
}, util.footer = function(e) {
var t = e, n = getApp().tabBar;
}, util.footer = function (e) {
var t = e,
n = getApp().tabBar;
console.log(n)
console.log('----------------------------')
for (var r in n.list) n.list[r].pageUrl = n.list[r].pagePath.replace(/(\?|#)[^"]*/g, "");
@ -238,21 +278,23 @@ util.base64_encode = function(e) {
tabBar: n,
"tabBar.thisurl": t.__route__
});
}, util.message = function(e, t, n) {
}, util.message = function (e, t, n) {
if (!e) return !0;
if ("object" == (void 0 === e ? "undefined" : _typeof(e)) && (t = e.redirect, n = e.type,
e = e.title), t) {
var r = t.substring(0, 9), a = "", i = "";
"navigate:" == r ? (i = "navigateTo", a = t.substring(9)) : "redirect:" == r ? (i = "redirectTo",
a = t.substring(9)) : (a = t, i = "redirectTo");
if ("object" == (void 0 === e ? "undefined" : _typeof(e)) && (t = e.redirect, n = e.type,
e = e.title), t) {
var r = t.substring(0, 9),
a = "",
i = "";
"navigate:" == r ? (i = "navigateTo", a = t.substring(9)) : "redirect:" == r ? (i = "redirectTo",
a = t.substring(9)) : (a = t, i = "redirectTo");
}
n || (n = "success"), "success" == n ? wx.showToast({
title: e,
icon: "success",
duration: 2e3,
mask: !!a,
complete: function() {
a && setTimeout(function() {
complete: function () {
a && setTimeout(function () {
wx[i]({
url: a
});
@ -262,98 +304,105 @@ util.base64_encode = function(e) {
title: "系统信息",
content: e,
showCancel: !1,
complete: function() {
complete: function () {
a && wx[i]({
url: a
});
}
});
}, util.user = util.getUserInfo, util.showLoading = function() {
wx.getStorageSync("isShowLoading") && (wx.hideLoading(), wx.setStorageSync("isShowLoading", !1)),
wx.showLoading({
title: "加载中",
complete: function() {
wx.setStorageSync("isShowLoading", !0);
},
fail: function() {
wx.setStorageSync("isShowLoading", !1);
}
});
}, util.showImage = function(e) {
}, util.user = util.getUserInfo, util.showLoading = function () {
wx.getStorageSync("isShowLoading") && (wx.hideLoading(), wx.setStorageSync("isShowLoading", !1)),
wx.showLoading({
title: "加载中",
complete: function () {
wx.setStorageSync("isShowLoading", !0);
},
fail: function () {
wx.setStorageSync("isShowLoading", !1);
}
});
}, util.showImage = function (e) {
var t = e ? e.currentTarget.dataset.preview : "";
if (!t) return !1;
wx.previewImage({
urls: [ t ]
urls: [t]
});
}, util.parseContent = function(e) {
}, util.parseContent = function (e) {
if (!e) return e;
var t = [ "\ud83c[\udf00-\udfff]", "\ud83d[\udc00-\ude4f]", "\ud83d[\ude80-\udeff]" ], n = e.match(new RegExp(t.join("|"), "g"));
if (n) for (var r in n) e = e.replace(n[r], "[U+" + n[r].codePointAt(0).toString(16).toUpperCase() + "]");
var t = ["\ud83c[\udf00-\udfff]", "\ud83d[\udc00-\ude4f]", "\ud83d[\ude80-\udeff]"],
n = e.match(new RegExp(t.join("|"), "g"));
if (n)
for (var r in n) e = e.replace(n[r], "[U+" + n[r].codePointAt(0).toString(16).toUpperCase() + "]");
return e;
}, util.date = function() {
this.isLeapYear = function(e) {
}, util.date = function () {
this.isLeapYear = function (e) {
return 0 == e.getYear() % 4 && (e.getYear() % 100 != 0 || e.getYear() % 400 == 0);
}, this.dateToStr = function(e, t) {
}, this.dateToStr = function (e, t) {
e = arguments[0] || "yyyy-MM-dd HH:mm:ss", t = arguments[1] || new Date();
var n = e, r = [ "日", "一", "二", "三", "四", "五", "六" ];
return n = n.replace(/yyyy|YYYY/, t.getFullYear()), n = n.replace(/yy|YY/, t.getYear() % 100 > 9 ? (t.getYear() % 100).toString() : "0" + t.getYear() % 100),
n = n.replace(/MM/, t.getMonth() > 9 ? t.getMonth() + 1 : "0" + (t.getMonth() + 1)),
n = n.replace(/M/g, t.getMonth()), n = n.replace(/w|W/g, r[t.getDay()]), n = n.replace(/dd|DD/, t.getDate() > 9 ? t.getDate().toString() : "0" + t.getDate()),
n = n.replace(/d|D/g, t.getDate()), n = n.replace(/hh|HH/, t.getHours() > 9 ? t.getHours().toString() : "0" + t.getHours()),
n = n.replace(/h|H/g, t.getHours()), n = n.replace(/mm/, t.getMinutes() > 9 ? t.getMinutes().toString() : "0" + t.getMinutes()),
n = n.replace(/m/g, t.getMinutes()), n = n.replace(/ss|SS/, t.getSeconds() > 9 ? t.getSeconds().toString() : "0" + t.getSeconds()),
n = n.replace(/s|S/g, t.getSeconds());
}, this.dateAdd = function(e, t, n) {
var n = e,
r = ["日", "一", "二", "三", "四", "五", "六"];
return n = n.replace(/yyyy|YYYY/, t.getFullYear()), n = n.replace(/yy|YY/, t.getYear() % 100 > 9 ? (t.getYear() % 100).toString() : "0" + t.getYear() % 100),
n = n.replace(/MM/, t.getMonth() > 9 ? t.getMonth() + 1 : "0" + (t.getMonth() + 1)),
n = n.replace(/M/g, t.getMonth()), n = n.replace(/w|W/g, r[t.getDay()]), n = n.replace(/dd|DD/, t.getDate() > 9 ? t.getDate().toString() : "0" + t.getDate()),
n = n.replace(/d|D/g, t.getDate()), n = n.replace(/hh|HH/, t.getHours() > 9 ? t.getHours().toString() : "0" + t.getHours()),
n = n.replace(/h|H/g, t.getHours()), n = n.replace(/mm/, t.getMinutes() > 9 ? t.getMinutes().toString() : "0" + t.getMinutes()),
n = n.replace(/m/g, t.getMinutes()), n = n.replace(/ss|SS/, t.getSeconds() > 9 ? t.getSeconds().toString() : "0" + t.getSeconds()),
n = n.replace(/s|S/g, t.getSeconds());
}, this.dateAdd = function (e, t, n) {
switch (n = arguments[2] || new Date(), e) {
case "s":
return new Date(n.getTime() + 1e3 * t);
case "s":
return new Date(n.getTime() + 1e3 * t);
case "n":
return new Date(n.getTime() + 6e4 * t);
case "n":
return new Date(n.getTime() + 6e4 * t);
case "h":
return new Date(n.getTime() + 36e5 * t);
case "h":
return new Date(n.getTime() + 36e5 * t);
case "d":
return new Date(n.getTime() + 864e5 * t);
case "d":
return new Date(n.getTime() + 864e5 * t);
case "w":
return new Date(n.getTime() + 6048e5 * t);
case "w":
return new Date(n.getTime() + 6048e5 * t);
case "m":
return new Date(n.getFullYear(), n.getMonth() + t, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
case "m":
return new Date(n.getFullYear(), n.getMonth() + t, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
case "y":
return new Date(n.getFullYear() + t, n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
case "y":
return new Date(n.getFullYear() + t, n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
}
}, this.dateDiff = function(e, t, n) {
}, this.dateDiff = function (e, t, n) {
switch (e) {
case "s":
return parseInt((n - t) / 1e3);
case "s":
return parseInt((n - t) / 1e3);
case "n":
return parseInt((n - t) / 6e4);
case "n":
return parseInt((n - t) / 6e4);
case "h":
return parseInt((n - t) / 36e5);
case "h":
return parseInt((n - t) / 36e5);
case "d":
return parseInt((n - t) / 864e5);
case "d":
return parseInt((n - t) / 864e5);
case "w":
return parseInt((n - t) / 6048e5);
case "w":
return parseInt((n - t) / 6048e5);
case "m":
return n.getMonth() + 1 + 12 * (n.getFullYear() - t.getFullYear()) - (t.getMonth() + 1);
case "m":
return n.getMonth() + 1 + 12 * (n.getFullYear() - t.getFullYear()) - (t.getMonth() + 1);
case "y":
return n.getFullYear() - t.getFullYear();
case "y":
return n.getFullYear() - t.getFullYear();
}
}, this.strToDate = function(dateStr) {
var data = dateStr, reCat = /(\d{1,4})/gm, t = data.match(reCat);
}, this.strToDate = function (dateStr) {
var data = dateStr,
reCat = /(\d{1,4})/gm,
t = data.match(reCat);
return t[1] = t[1] - 1, eval("var d = new Date(" + t.join(",") + ");"), d;
}, this.strFormatToDate = function(e, t) {
var n = 0, r = -1, a = t.length;
}, this.strFormatToDate = function (e, t) {
var n = 0,
r = -1,
a = t.length;
(r = e.indexOf("yyyy")) > -1 && r < a && (n = t.substr(r, 4));
var i = 0;
(r = e.indexOf("MM")) > -1 && r < a && (i = parseInt(t.substr(r, 2)) - 1);
@ -365,66 +414,69 @@ util.base64_encode = function(e) {
(r = e.indexOf("mm")) > -1 && r < a && (u = t.substr(r, 2));
var c = 0;
return (r = e.indexOf("ss")) > -1 && r < a && (c = t.substr(r, 2)), new Date(n, i, o, s, u, c);
}, this.dateToLong = function(e) {
}, this.dateToLong = function (e) {
return e.getTime();
}, this.longToDate = function(e) {
}, this.longToDate = function (e) {
return new Date(e);
}, this.isDate = function(e, t) {
}, this.isDate = function (e, t) {
null == t && (t = "yyyyMMdd");
var n = t.indexOf("yyyy");
if (-1 == n) return !1;
var r = e.substring(n, n + 4), a = t.indexOf("MM");
var r = e.substring(n, n + 4),
a = t.indexOf("MM");
if (-1 == a) return !1;
var i = e.substring(a, a + 2), o = t.indexOf("dd");
var i = e.substring(a, a + 2),
o = t.indexOf("dd");
if (-1 == o) return !1;
var s = e.substring(o, o + 2);
return !(!isNumber(r) || r > "2100" || r < "1900") && (!(!isNumber(i) || i > "12" || i < "01") && !(s > getMaxDay(r, i) || s < "01"));
}, this.getMaxDay = function(e, t) {
}, this.getMaxDay = function (e, t) {
return 4 == t || 6 == t || 9 == t || 11 == t ? "30" : 2 == t ? e % 4 == 0 && e % 100 != 0 || e % 400 == 0 ? "29" : "28" : "31";
}, this.isNumber = function(e) {
}, this.isNumber = function (e) {
return /^\d+$/g.test(e);
}, this.toArray = function(e) {
}, this.toArray = function (e) {
e = arguments[0] || new Date();
var t = Array();
return t[0] = e.getFullYear(), t[1] = e.getMonth(), t[2] = e.getDate(), t[3] = e.getHours(),
t[4] = e.getMinutes(), t[5] = e.getSeconds(), t;
}, this.datePart = function(e, t) {
return t[0] = e.getFullYear(), t[1] = e.getMonth(), t[2] = e.getDate(), t[3] = e.getHours(),
t[4] = e.getMinutes(), t[5] = e.getSeconds(), t;
}, this.datePart = function (e, t) {
t = arguments[1] || new Date();
var n = "", r = [ "日", "一", "二", "三", "四", "五", "六" ];
var n = "",
r = ["日", "一", "二", "三", "四", "五", "六"];
switch (e) {
case "y":
n = t.getFullYear();
break;
case "y":
n = t.getFullYear();
break;
case "M":
n = t.getMonth() + 1;
break;
case "M":
n = t.getMonth() + 1;
break;
case "d":
n = t.getDate();
break;
case "d":
n = t.getDate();
break;
case "w":
n = r[t.getDay()];
break;
case "w":
n = r[t.getDay()];
break;
case "ww":
n = t.WeekNumOfYear();
break;
case "ww":
n = t.WeekNumOfYear();
break;
case "h":
n = t.getHours();
break;
case "h":
n = t.getHours();
break;
case "m":
n = t.getMinutes();
break;
case "m":
n = t.getMinutes();
break;
case "s":
n = t.getSeconds();
case "s":
n = t.getSeconds();
}
return n;
}, this.maxDayOfDate = function(e) {
}, this.maxDayOfDate = function (e) {
(e = arguments[0] || new Date()).setDate(1), e.setMonth(e.getMonth() + 1);
var t = e.getTime() - 864e5;
return new Date(t).getDate();

Loading…
Cancel
Save