Commit e9f2251b1d23e234320c493e00579de5455eb2c9

Authored by vking
2 parents fc7f7135 fcc4b86f

'msearch'

.idea
.DS_Store
package-lock.json
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
miniprogram_dist
miniprogram_dev
node_modules
miniprogram_npm
\ No newline at end of file
... ...
[submodule "components/painter"]
path = components/painter
url = https://github.com/Kujiale-Mobile/PainterCore.git
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/xcx-book.iml" filepath="$PROJECT_DIR$/.idea/xcx-book.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7016b20a-b56b-4f03-9b69-7a660c3cba08" name="Default" comment="查找包间在线预订调整">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="PUSH_TAGS">
<GitPushTagMode>
<option name="argument" value="--follow-tags" />
<option name="title" value="Current Branch" />
</GitPushTagMode>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
<package-json value="$PROJECT_DIR$/package.json" />
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="33" />
<option name="y" value="12" />
<option name="width" value="1622" />
<option name="height" value="933" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane" />
<pane id="Scratches" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="application.passwordSafe" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="7016b20a-b56b-4f03-9b69-7a660c3cba08" name="Default" comment="" />
<created>1581409774018</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1581409774018</updated>
<workItem from="1581409778032" duration="490000" />
<workItem from="1581412123910" duration="1665000" />
<workItem from="1581414730285" duration="571000" />
<workItem from="1581417384562" duration="602000" />
<workItem from="1581434573578" duration="504000" />
<workItem from="1581470826408" duration="143000" />
</task>
<task id="LOCAL-00001" summary="查找包间在线预订调整">
<created>1581409961223</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1581409961224</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3975000" />
</component>
<component name="ToolWindowManager">
<frame x="33" y="12" width="1622" height="933" extended-state="0" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24968867" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.9393204" sideWeight="0.4234122" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.9393204" sideWeight="0.5765878" order="7" side_tool="false" content_ui="tabs" />
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="HIGHLIGHTERS">
<map>
<entry key="MERGE_COMMITS" value="false" />
</map>
</option>
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="1" />
<option value="2" />
<option value="3" />
</list>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="查找包间在线预订调整" />
<option name="LAST_COMMIT_MESSAGE" value="查找包间在线预订调整" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
... ... @@ -32,7 +32,8 @@
"pages/reserve/share",
"pages/reserve/submit",
"pages/me/history",
"pages/reserve/remark"
"pages/reserve/remark",
"pages/reserve/findSeller"
],
"subpackages": [
{
... ...
// components/reserve/search/how/hv/date.js
var myBehavior = require('hv_behavior')
const items=(function(){
let today=parseInt(new Date()/1000);
let ds=[]
for(let i=0;i<15;i++){
ds.push(today+86400*i)
}
return ds
})()
Component({
behaviors: [myBehavior],
data:{
items:items,
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
this.setData({
spi:this.data.pi,
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/hv/date.wxml-->
<wxs src="../../../../utils/util.wxs" module="util" />
<swiper previous-margin="35rpx" next-margin="45rpx"
class="tabs"
display-multiple-items="5">
<swiper-item wx:for="{{items}}" wx:key="items">
<view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="date">
<view class="name">{{util.unixtoTime(item,'DAY')||util.unixtoTime(item,'周WW')}}</view>
<view class="mmdd">{{util.unixtoTime(item,'MM.DD')}}</view>
</view>
</swiper-item>
</swiper>
... ...
/* components/reserve/search/how/hv/date.wxss */
@import "hv_behavior.wxss";
.item .name{
height: 42rpx;
font-size: 30rpx;
line-height: 42rpx;
}
.item .mmdd{
height: 34rpx;
line-height: 34rpx;
margin-top: 4rpx;
font-size: 24rpx;
}
\ No newline at end of file
... ...
// components/reserve/search/how/hv/pnum.js
var myBehavior = require('hv_behavior')
const items=[
{id:1,label:'早餐'},
{id:2,label:'午餐'},
{id:3,label:'晚餐'},
{},
{},
]
Component({
behaviors: [myBehavior],
data:{
items:items,
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
console.log(this.data.pi)
this.setData({
spi:this.data.pi,
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/dur.wxml-->
<swiper previous-margin="35rpx" next-margin="45rpx"
class="tabs"
display-multiple-items="5">
<swiper-item wx:for="{{items}}" wx:key="items">
<view class="item {{spi==index?'active':''}} flex-vc"
bindtap="{{index>2?'':'checked'}}"
data-index="{{index}}"
data-val="{{item.id}}"
data-type="dur">
<view class="name">{{item.label}}</view>
</view>
</swiper-item>
</swiper>
... ...
/* components/reserve/search/how/dur.wxss */
@import "hv_behavior.wxss";
... ...
// components/reserve/search/how/hv.js
import util from '../../../../utils/util'
module.exports = Behavior({
properties: {
pi: {
type: Number,
value:0,
}
},
data: {
},
attached: function(){
},
methods: {
gotoHere(){
this.data.index;
},
checked(e){
let index=util.attr(e,'index')
let val=util.attr(e,'val')
let type=util.attr(e,'type')
this.setData({
spi:index,
})
this.triggerEvent('event',{index,val,type})
}
}
})
\ No newline at end of file
... ...
/* components/reserve/search/how/hv.wxss */
@import "../../../../app.wxss";
.tabs {
height: 100rpx;
}
.tabs .item{
width:120rpx;
height:100rpx;
line-height: 100rpx;
border-radius:10rpx;
border:2rpx solid #fffff;
font-size:30rpx;
font-weight:600;
color:#353535;
text-align: center;
box-sizing: border-box;
}
.tabs .item.active{
border-radius:10rpx;
background:rgba(255,245,235,1);
border:2px solid rgba(195,165,108,1);
color:rgba(192,163,105,1);
}
\ No newline at end of file
... ...
// components/reserve/search/how/index.js
import util from '../../../../utils/util'
Component({
/**
* 组件的属性列表
*/
properties: {
hasPage:{
type:Boolean,
value:false,
},
date_pi:{
type:Number,
value:0,
},
pnum_pi:{
type:Number,
value:0,
},
dur_pi:{
type:Number,
value:-1,
}
},
/**
* 组件的初始数据
*/
data: {
hidden:true,
},
attached(){
this.params={}
this.setData({
hidden:!this.data.hasPage
})
},
/**
* 组件的方法列表
*/
methods: {
paramEvent(e){
console.log('paramEvent',e.detail)
this.params[e.detail.type]=e.detail
},
submit(){
console.log(this.params)
let paramObj={
when_date:util.unixtoTime(this.params['date'].val,'YYYY-MM-DD'),
several:this.params['pnum'].val,
}
if(this.params['dur'].val>=0){
paramObj.daily=this.params['dur'].val
}
this.triggerEvent('event',{
params:this.params,
paramObj:paramObj,
})
},
show(){
this.setData({
hidden:false
})
},
hide(){
this.setData({
hidden:true
})
},
}
})
... ...
{
"component": true,
"usingComponents": {
"date":"./date",
"pnum":"./pnum",
"dur":"./dur"
}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/index.wxml-->
<view hidden="{{hidden}}">
<view class="mask" wx:if="{{!hasPage}}" bindtap="hide"></view>
<view class="{{hasPage?'pages':'pages-window'}}">
<view class="title flex-lr">
<view class="title-name">您好,几位,什么时候</view>
<view class="close" bindtap="hide"></view>
</view>
<view>
<pnum bindevent="paramEvent" pi="{{pnum_pi}}"></pnum>
<view style="margin: 60rpx 0">
<date bindevent="paramEvent" pi="{{pnum_pi}}"></date>
</view>
<dur bindevent="paramEvent" pi="{{dur_pi}}"></dur>
</view>
<view class="submit" bindtap="submit">查找餐厅</view>
</view>
</view>
... ...
/* components/reserve/search/how/index.wxss */
@import "../../../../app.wxss";
.pages{
padding: 20rpx 0;
}
.pages-window{
padding: 58rpx 0;
border-radius:20rpx 20rpx 0 0;
position: fixed;
bottom: 0;
background-color: #fff;
width: 100%;
z-index: 9999;
height: 870rpx;
box-sizing: border-box;
}
.pages .close{
display: none;
}
.title{
height:48rpx;
font-size:34rpx;
font-weight:600;
color:rgba(53,53,53,1);
line-height:48rpx;
padding: 0 40rpx;
width: calc(100% - 80rpx);
margin-bottom: 60rpx;
}
.close{
background-image: url("http://qn.colorcun.com/reserve/images/close.png");
background-size: 100% 100%;
width: 32rpx;
height: 32rpx;
}
.submit{
height:80rpx;
background:rgba(192,163,105,1);
border-radius:10rpx;
font-size:32rpx;
font-weight:500;
color:rgba(255,255,255,1);
line-height:80rpx;
text-align: center;
margin: 0 40rpx;
width: calc(100% - 80rpx);
position: fixed;
bottom: 80rpx;
}
\ No newline at end of file
... ...
// components/reserve/search/how/hv/pnum.js
var myBehavior = require('hv_behavior')
const items=(function(){
let today=1;
let ds=[]
for(let i=0;i<=30;i++){
ds.push(today+i)
}
return ds
})()
Component({
behaviors: [myBehavior],
data:{
items:items,
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
this.setData({
spi:this.data.pi==0?3:this.data.pi,
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/reserve/search/how/hv/pnum.wxml-->
<swiper previous-margin="35rpx" next-margin="45rpx"
class="tabs"
display-multiple-items="5">
<swiper-item wx:for="{{items}}" wx:key="items">
<view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="pnum">
<view class="name">{{item>30?'30位以上':item+' 位'}}</view>
</view>
</swiper-item>
</swiper>
... ...
/* components/reserve/search/how/hv/pnum.wxss */
@import "hv_behavior.wxss";
.item .name{
font-size: 30rpx;
line-height: 40rpx;
}
\ No newline at end of file
... ...
module.exports = (function() {
var __MODS__ = {};
var __DEFINE__ = function(modId, func, req) { var m = { exports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = { exports: {} }; __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); if(typeof m.exports === "object") { __MODS__[modId].m.exports.__proto__ = m.exports.__proto__; Object.keys(m.exports).forEach(function(k) { __MODS__[modId].m.exports[k] = m.exports[k]; var desp = Object.getOwnPropertyDescriptor(m.exports, k); if(desp && desp.configurable) Object.defineProperty(m.exports, k, { set: function(val) { __MODS__[modId].m.exports[k] = val; }, get: function() { return __MODS__[modId].m.exports[k]; } }); }); if(m.exports.__esModule) Object.defineProperty(__MODS__[modId].m.exports, "__esModule", { value: true }); } else { __MODS__[modId].m.exports = m.exports; } } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1580783104282, function(require, module, exports) {
var MTA_CONFIG={app_id:"",event_id:"",api_base:"https://pingtas.qq.com/pingd",prefix:"_mta_",version:"1.3.9",stat_share_app:!1,stat_pull_down_fresh:!1,stat_reach_bottom:!1,stat_param:!0};function getNetworkType(a){wx.getNetworkType({success:function(b){a(b.networkType)}})}
function getSystemInfo(){var a=wx.getSystemInfoSync();return{adt:encodeURIComponent(a.model),scl:a.pixelRatio,scr:a.windowWidth+"x"+a.windowHeight,lg:a.language,fl:a.version,jv:encodeURIComponent(a.system),tz:encodeURIComponent(a.platform)}}function getUID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+"auid")}catch(a){}}function setUID(){try{var a=getRandom();wx.setStorageSync(MTA_CONFIG.prefix+"auid",a);return a}catch(b){}}
function getSID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+"ssid")}catch(a){}}function setSID(){try{var a="s"+getRandom();wx.setStorageSync(MTA_CONFIG.prefix+"ssid",a);return a}catch(b){}}function getRandom(a){for(var b=[0,1,2,3,4,5,6,7,8,9],c=10;1<c;c--){var d=Math.floor(10*Math.random()),f=b[d];b[d]=b[c-1];b[c-1]=f}for(c=d=0;5>c;c++)d=10*d+b[c];return(a||"")+(d+""+ +new Date)}
function getPagePath(){try{var a=getCurrentPages(),b="/";0<a.length&&(b=a.pop().__route__);return b}catch(c){console.log("get current page path error:"+c)}}function getMainInfo(){var a={dm:"wechat.apps.xx",url:encodeURIComponent(getPagePath()+getQuery(MTA.Data.pageQuery)),pvi:"",si:"",ty:0};a.pvi=function(){var b=getUID();b||(b=setUID(),a.ty=1);return b}();a.si=function(){var a=getSID();a||(a=setSID());return a}();return a}
function getBasicInfo(){var a=getSystemInfo();getNetworkType(function(a){try{wx.setStorageSync(MTA_CONFIG.prefix+"ntdata",a)}catch(c){}});a.ct=wx.getStorageSync(MTA_CONFIG.prefix+"ntdata")||"4g";return a}function getExtentInfo(){var a=MTA.Data.userInfo;var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);a=b.join(";");return{r2:MTA_CONFIG.app_id,r4:"wx",ext:"v="+MTA_CONFIG.version+(null!==a&&""!==a?";ui="+encodeURIComponent(a):"")}}
function getQuery(a){if(!MTA_CONFIG.stat_param||!a)return"";a=ignoreParams(a);var b=[],c;for(c in a)b.push(c+"="+a[c]);return 0<b.length?"?"+b.join("&"):""}function ignoreParams(a){if(1>MTA_CONFIG.ignore_params.length)return a;var b={},c;for(c in a)0<=MTA_CONFIG.ignore_params.indexOf(c)||(b[c]=a[c]);return b}
function initOnload(){var a=Page;Page=function(b){var c=b.onLoad;b.onLoad=function(a){c&&c.call(this,a);MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath();MTA.Data.show=!1;MTA.Page.init()};a(b)}}
var MTA={App:{init:function(a){"appID"in a&&(MTA_CONFIG.app_id=a.appID);"eventID"in a&&(MTA_CONFIG.event_id=a.eventID);"statShareApp"in a&&(MTA_CONFIG.stat_share_app=a.statShareApp);"statPullDownFresh"in a&&(MTA_CONFIG.stat_pull_down_fresh=a.statPullDownFresh);"statReachBottom"in a&&(MTA_CONFIG.stat_reach_bottom=a.statReachBottom);"ignoreParams"in a&&(MTA_CONFIG.ignore_params=a.ignoreParams);"statParam"in a&&(MTA_CONFIG.stat_param=a.statParam);setSID();try{"lauchOpts"in a&&(MTA.Data.lanchInfo=a.lauchOpts,
MTA.Data.lanchInfo.landing=1)}catch(b){}"autoReport"in a&&a.autoReport&&initOnload()}},Page:{init:function(){var a=getCurrentPages()[getCurrentPages().length-1];a.onShow&&!function(){var b=a.onShow;a.onShow=function(){if(!0===MTA.Data.show){var a=MTA.Data.lastPageQuery;MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath()}MTA.Data.show=!0;MTA.Page.stat();b.apply(this,arguments)}}();MTA_CONFIG.stat_pull_down_fresh&&a.onPullDownRefresh&&
!function(){var b=a.onPullDownRefresh;a.onPullDownRefresh=function(){MTA.Event.stat(MTA_CONFIG.prefix+"pulldownfresh",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_reach_bottom&&a.onReachBottom&&!function(){var b=a.onReachBottom;a.onReachBottom=function(){MTA.Event.stat(MTA_CONFIG.prefix+"reachbottom",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_share_app&&a.onShareAppMessage&&!function(){var b=a.onShareAppMessage;a.onShareAppMessage=function(){MTA.Event.stat(MTA_CONFIG.prefix+
"shareapp",{url:a.__route__});return b.apply(this,arguments)}}()},multiStat:function(a,b){if(1==b)MTA.Page.stat(a),!0;else{var c=getCurrentPages()[getCurrentPages().length-1];c.onShow&&!function(){var b=c.onShow;c.onShow=function(){MTA.Page.stat(a);b.call(this,arguments)}}()}},stat:function(a){if(""!=MTA_CONFIG.app_id){var b=[],c=getExtentInfo();a&&(c.r2=a);a=[getMainInfo(),c,getBasicInfo()];if(MTA.Data.lanchInfo){a.push({ht:MTA.Data.lanchInfo.scene});MTA.Data.pageQuery&&MTA.Data.pageQuery._mta_ref_id&&
a.push({rarg:MTA.Data.pageQuery._mta_ref_id});try{1==MTA.Data.lanchInfo.landing&&(c.ext+=";lp=1",MTA.Data.lanchInfo.landing=0)}catch(e){}}a.push({rdm:"/",rurl:0>=MTA.Data.lastPageUrl.length?MTA.Data.pageUrl+getQuery(MTA.Data.lastPageQuery):encodeURIComponent(MTA.Data.lastPageUrl+getQuery(MTA.Data.lastPageQuery))});a.push({rand:+new Date});c=0;for(var d=a.length;c<d;c++)for(var f in a[c])a[c].hasOwnProperty(f)&&b.push(f+"="+("undefined"==typeof a[c][f]?"":a[c][f]));wx.request({url:MTA_CONFIG.api_base+
"?"+b.join("&").toLowerCase()})}}},Event:{stat:function(a,b){if(""!=MTA_CONFIG.event_id){var c=[],d=getMainInfo(),f=getExtentInfo();d.dm="wxapps.click";d.url=a;f.r2=MTA_CONFIG.event_id;var e="undefined"===typeof b?{}:b;var k=[],g;for(g in e)e.hasOwnProperty(g)&&k.push(encodeURIComponent(g)+"="+encodeURIComponent(e[g]));e=k.join(";");f.r5=e;e=0;d=[d,f,getBasicInfo(),{rand:+new Date}];for(f=d.length;e<f;e++)for(var h in d[e])d[e].hasOwnProperty(h)&&c.push(h+"="+("undefined"==typeof d[e][h]?"":d[e][h]));
wx.request({url:MTA_CONFIG.api_base+"?"+c.join("&").toLowerCase()})}}},Data:{userInfo:null,lanchInfo:null,pageQuery:null,lastPageQuery:null,pageUrl:"",lastPageUrl:"",show:!1}};module.exports=MTA;
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1580783104282);
})()
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.js","sourcesContent":["var MTA_CONFIG={app_id:\"\",event_id:\"\",api_base:\"https://pingtas.qq.com/pingd\",prefix:\"_mta_\",version:\"1.3.9\",stat_share_app:!1,stat_pull_down_fresh:!1,stat_reach_bottom:!1,stat_param:!0};function getNetworkType(a){wx.getNetworkType({success:function(b){a(b.networkType)}})}\r\nfunction getSystemInfo(){var a=wx.getSystemInfoSync();return{adt:encodeURIComponent(a.model),scl:a.pixelRatio,scr:a.windowWidth+\"x\"+a.windowHeight,lg:a.language,fl:a.version,jv:encodeURIComponent(a.system),tz:encodeURIComponent(a.platform)}}function getUID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+\"auid\")}catch(a){}}function setUID(){try{var a=getRandom();wx.setStorageSync(MTA_CONFIG.prefix+\"auid\",a);return a}catch(b){}}\r\nfunction getSID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+\"ssid\")}catch(a){}}function setSID(){try{var a=\"s\"+getRandom();wx.setStorageSync(MTA_CONFIG.prefix+\"ssid\",a);return a}catch(b){}}function getRandom(a){for(var b=[0,1,2,3,4,5,6,7,8,9],c=10;1<c;c--){var d=Math.floor(10*Math.random()),f=b[d];b[d]=b[c-1];b[c-1]=f}for(c=d=0;5>c;c++)d=10*d+b[c];return(a||\"\")+(d+\"\"+ +new Date)}\r\nfunction getPagePath(){try{var a=getCurrentPages(),b=\"/\";0<a.length&&(b=a.pop().__route__);return b}catch(c){console.log(\"get current page path error:\"+c)}}function getMainInfo(){var a={dm:\"wechat.apps.xx\",url:encodeURIComponent(getPagePath()+getQuery(MTA.Data.pageQuery)),pvi:\"\",si:\"\",ty:0};a.pvi=function(){var b=getUID();b||(b=setUID(),a.ty=1);return b}();a.si=function(){var a=getSID();a||(a=setSID());return a}();return a}\r\nfunction getBasicInfo(){var a=getSystemInfo();getNetworkType(function(a){try{wx.setStorageSync(MTA_CONFIG.prefix+\"ntdata\",a)}catch(c){}});a.ct=wx.getStorageSync(MTA_CONFIG.prefix+\"ntdata\")||\"4g\";return a}function getExtentInfo(){var a=MTA.Data.userInfo;var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+\"=\"+a[c]);a=b.join(\";\");return{r2:MTA_CONFIG.app_id,r4:\"wx\",ext:\"v=\"+MTA_CONFIG.version+(null!==a&&\"\"!==a?\";ui=\"+encodeURIComponent(a):\"\")}}\r\nfunction getQuery(a){if(!MTA_CONFIG.stat_param||!a)return\"\";a=ignoreParams(a);var b=[],c;for(c in a)b.push(c+\"=\"+a[c]);return 0<b.length?\"?\"+b.join(\"&\"):\"\"}function ignoreParams(a){if(1>MTA_CONFIG.ignore_params.length)return a;var b={},c;for(c in a)0<=MTA_CONFIG.ignore_params.indexOf(c)||(b[c]=a[c]);return b}\r\nfunction initOnload(){var a=Page;Page=function(b){var c=b.onLoad;b.onLoad=function(a){c&&c.call(this,a);MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath();MTA.Data.show=!1;MTA.Page.init()};a(b)}}\r\nvar MTA={App:{init:function(a){\"appID\"in a&&(MTA_CONFIG.app_id=a.appID);\"eventID\"in a&&(MTA_CONFIG.event_id=a.eventID);\"statShareApp\"in a&&(MTA_CONFIG.stat_share_app=a.statShareApp);\"statPullDownFresh\"in a&&(MTA_CONFIG.stat_pull_down_fresh=a.statPullDownFresh);\"statReachBottom\"in a&&(MTA_CONFIG.stat_reach_bottom=a.statReachBottom);\"ignoreParams\"in a&&(MTA_CONFIG.ignore_params=a.ignoreParams);\"statParam\"in a&&(MTA_CONFIG.stat_param=a.statParam);setSID();try{\"lauchOpts\"in a&&(MTA.Data.lanchInfo=a.lauchOpts,\r\n MTA.Data.lanchInfo.landing=1)}catch(b){}\"autoReport\"in a&&a.autoReport&&initOnload()}},Page:{init:function(){var a=getCurrentPages()[getCurrentPages().length-1];a.onShow&&!function(){var b=a.onShow;a.onShow=function(){if(!0===MTA.Data.show){var a=MTA.Data.lastPageQuery;MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath()}MTA.Data.show=!0;MTA.Page.stat();b.apply(this,arguments)}}();MTA_CONFIG.stat_pull_down_fresh&&a.onPullDownRefresh&&\r\n!function(){var b=a.onPullDownRefresh;a.onPullDownRefresh=function(){MTA.Event.stat(MTA_CONFIG.prefix+\"pulldownfresh\",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_reach_bottom&&a.onReachBottom&&!function(){var b=a.onReachBottom;a.onReachBottom=function(){MTA.Event.stat(MTA_CONFIG.prefix+\"reachbottom\",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_share_app&&a.onShareAppMessage&&!function(){var b=a.onShareAppMessage;a.onShareAppMessage=function(){MTA.Event.stat(MTA_CONFIG.prefix+\r\n \"shareapp\",{url:a.__route__});return b.apply(this,arguments)}}()},multiStat:function(a,b){if(1==b)MTA.Page.stat(a),!0;else{var c=getCurrentPages()[getCurrentPages().length-1];c.onShow&&!function(){var b=c.onShow;c.onShow=function(){MTA.Page.stat(a);b.call(this,arguments)}}()}},stat:function(a){if(\"\"!=MTA_CONFIG.app_id){var b=[],c=getExtentInfo();a&&(c.r2=a);a=[getMainInfo(),c,getBasicInfo()];if(MTA.Data.lanchInfo){a.push({ht:MTA.Data.lanchInfo.scene});MTA.Data.pageQuery&&MTA.Data.pageQuery._mta_ref_id&&\r\na.push({rarg:MTA.Data.pageQuery._mta_ref_id});try{1==MTA.Data.lanchInfo.landing&&(c.ext+=\";lp=1\",MTA.Data.lanchInfo.landing=0)}catch(e){}}a.push({rdm:\"/\",rurl:0>=MTA.Data.lastPageUrl.length?MTA.Data.pageUrl+getQuery(MTA.Data.lastPageQuery):encodeURIComponent(MTA.Data.lastPageUrl+getQuery(MTA.Data.lastPageQuery))});a.push({rand:+new Date});c=0;for(var d=a.length;c<d;c++)for(var f in a[c])a[c].hasOwnProperty(f)&&b.push(f+\"=\"+(\"undefined\"==typeof a[c][f]?\"\":a[c][f]));wx.request({url:MTA_CONFIG.api_base+\r\n\"?\"+b.join(\"&\").toLowerCase()})}}},Event:{stat:function(a,b){if(\"\"!=MTA_CONFIG.event_id){var c=[],d=getMainInfo(),f=getExtentInfo();d.dm=\"wxapps.click\";d.url=a;f.r2=MTA_CONFIG.event_id;var e=\"undefined\"===typeof b?{}:b;var k=[],g;for(g in e)e.hasOwnProperty(g)&&k.push(encodeURIComponent(g)+\"=\"+encodeURIComponent(e[g]));e=k.join(\";\");f.r5=e;e=0;d=[d,f,getBasicInfo(),{rand:+new Date}];for(f=d.length;e<f;e++)for(var h in d[e])d[e].hasOwnProperty(h)&&c.push(h+\"=\"+(\"undefined\"==typeof d[e][h]?\"\":d[e][h]));\r\n wx.request({url:MTA_CONFIG.api_base+\"?\"+c.join(\"&\").toLowerCase()})}}},Data:{userInfo:null,lanchInfo:null,pageQuery:null,lastPageQuery:null,pageUrl:\"\",lastPageUrl:\"\",show:!1}};module.exports=MTA;"]}
\ No newline at end of file
# 小程序mta上报
## 安装
```
npm install mta-wechat-analysis --save
```
## 引入上报
```
import mta from 'mta-wechat-analysis';
```
## 小程序添加可信域名
在小程序开发设置中,将https://pingtas.qq.com 添加为request可信域名
## 相关代码
```
// 初始化,这是示例代码,应用的接入代码请到官网每个应用对应的“应用管理”进行拷贝
mta.App.init({
"appID":"500013092",
"eventID":"500015824", // 高级功能-自定义事件统计ID,配置开通后在初始化处填写
"lauchOpts":options, //渠道分析,需在onLaunch方法传入options,如onLaunch:function(options){...}
"statPullDownFresh":true, // 使用分析-下拉刷新次数/人数,必须先开通自定义事件,并配置了合法的eventID
"statShareApp":true, // 使用分析-分享次数/人数,必须先开通自定义事件,并配置了合法的eventID
"statReachBottom":true // 使用分析-页面触底次数/人数,必须先开通自定义事件,并配置了合法的eventID
"autoReport": true, //开启自动上报
"statParam": true, //每个页面均加入参数上报
"ignoreParams": ['test_adt'] //statParam为true时,如果不想上报的参数可配置忽略
});
/**
autoReport值为false时,发起上报需在每个页面page.onload调用以下方法
页面初始化
**/
mta.Page.init();
// 自定义事件上报
mta.Event.stat("ico_search", {"query":"特斯拉"});
```
更多文档说明,参考[官方文档](http://mta.qq.com/docs/wechat_mini_program.html)
\ No newline at end of file
var MTA_CONFIG={app_id:"",event_id:"",api_base:"https://pingtas.qq.com/pingd",prefix:"_mta_",version:"1.3.9",stat_share_app:!1,stat_pull_down_fresh:!1,stat_reach_bottom:!1,stat_param:!0};function getNetworkType(a){wx.getNetworkType({success:function(b){a(b.networkType)}})}
function getSystemInfo(){var a=wx.getSystemInfoSync();return{adt:encodeURIComponent(a.model),scl:a.pixelRatio,scr:a.windowWidth+"x"+a.windowHeight,lg:a.language,fl:a.version,jv:encodeURIComponent(a.system),tz:encodeURIComponent(a.platform)}}function getUID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+"auid")}catch(a){}}function setUID(){try{var a=getRandom();wx.setStorageSync(MTA_CONFIG.prefix+"auid",a);return a}catch(b){}}
function getSID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+"ssid")}catch(a){}}function setSID(){try{var a="s"+getRandom();wx.setStorageSync(MTA_CONFIG.prefix+"ssid",a);return a}catch(b){}}function getRandom(a){for(var b=[0,1,2,3,4,5,6,7,8,9],c=10;1<c;c--){var d=Math.floor(10*Math.random()),f=b[d];b[d]=b[c-1];b[c-1]=f}for(c=d=0;5>c;c++)d=10*d+b[c];return(a||"")+(d+""+ +new Date)}
function getPagePath(){try{var a=getCurrentPages(),b="/";0<a.length&&(b=a.pop().__route__);return b}catch(c){console.log("get current page path error:"+c)}}function getMainInfo(){var a={dm:"wechat.apps.xx",url:encodeURIComponent(getPagePath()+getQuery(MTA.Data.pageQuery)),pvi:"",si:"",ty:0};a.pvi=function(){var b=getUID();b||(b=setUID(),a.ty=1);return b}();a.si=function(){var a=getSID();a||(a=setSID());return a}();return a}
function getBasicInfo(){var a=getSystemInfo();getNetworkType(function(a){try{wx.setStorageSync(MTA_CONFIG.prefix+"ntdata",a)}catch(c){}});a.ct=wx.getStorageSync(MTA_CONFIG.prefix+"ntdata")||"4g";return a}function getExtentInfo(){var a=MTA.Data.userInfo;var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);a=b.join(";");return{r2:MTA_CONFIG.app_id,r4:"wx",ext:"v="+MTA_CONFIG.version+(null!==a&&""!==a?";ui="+encodeURIComponent(a):"")}}
function getQuery(a){if(!MTA_CONFIG.stat_param||!a)return"";a=ignoreParams(a);var b=[],c;for(c in a)b.push(c+"="+a[c]);return 0<b.length?"?"+b.join("&"):""}function ignoreParams(a){if(1>MTA_CONFIG.ignore_params.length)return a;var b={},c;for(c in a)0<=MTA_CONFIG.ignore_params.indexOf(c)||(b[c]=a[c]);return b}
function initOnload(){var a=Page;Page=function(b){var c=b.onLoad;b.onLoad=function(a){c&&c.call(this,a);MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath();MTA.Data.show=!1;MTA.Page.init()};a(b)}}
var MTA={App:{init:function(a){"appID"in a&&(MTA_CONFIG.app_id=a.appID);"eventID"in a&&(MTA_CONFIG.event_id=a.eventID);"statShareApp"in a&&(MTA_CONFIG.stat_share_app=a.statShareApp);"statPullDownFresh"in a&&(MTA_CONFIG.stat_pull_down_fresh=a.statPullDownFresh);"statReachBottom"in a&&(MTA_CONFIG.stat_reach_bottom=a.statReachBottom);"ignoreParams"in a&&(MTA_CONFIG.ignore_params=a.ignoreParams);"statParam"in a&&(MTA_CONFIG.stat_param=a.statParam);setSID();try{"lauchOpts"in a&&(MTA.Data.lanchInfo=a.lauchOpts,
MTA.Data.lanchInfo.landing=1)}catch(b){}"autoReport"in a&&a.autoReport&&initOnload()}},Page:{init:function(){var a=getCurrentPages()[getCurrentPages().length-1];a.onShow&&!function(){var b=a.onShow;a.onShow=function(){if(!0===MTA.Data.show){var a=MTA.Data.lastPageQuery;MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath()}MTA.Data.show=!0;MTA.Page.stat();b.apply(this,arguments)}}();MTA_CONFIG.stat_pull_down_fresh&&a.onPullDownRefresh&&
!function(){var b=a.onPullDownRefresh;a.onPullDownRefresh=function(){MTA.Event.stat(MTA_CONFIG.prefix+"pulldownfresh",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_reach_bottom&&a.onReachBottom&&!function(){var b=a.onReachBottom;a.onReachBottom=function(){MTA.Event.stat(MTA_CONFIG.prefix+"reachbottom",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_share_app&&a.onShareAppMessage&&!function(){var b=a.onShareAppMessage;a.onShareAppMessage=function(){MTA.Event.stat(MTA_CONFIG.prefix+
"shareapp",{url:a.__route__});return b.apply(this,arguments)}}()},multiStat:function(a,b){if(1==b)MTA.Page.stat(a),!0;else{var c=getCurrentPages()[getCurrentPages().length-1];c.onShow&&!function(){var b=c.onShow;c.onShow=function(){MTA.Page.stat(a);b.call(this,arguments)}}()}},stat:function(a){if(""!=MTA_CONFIG.app_id){var b=[],c=getExtentInfo();a&&(c.r2=a);a=[getMainInfo(),c,getBasicInfo()];if(MTA.Data.lanchInfo){a.push({ht:MTA.Data.lanchInfo.scene});MTA.Data.pageQuery&&MTA.Data.pageQuery._mta_ref_id&&
a.push({rarg:MTA.Data.pageQuery._mta_ref_id});try{1==MTA.Data.lanchInfo.landing&&(c.ext+=";lp=1",MTA.Data.lanchInfo.landing=0)}catch(e){}}a.push({rdm:"/",rurl:0>=MTA.Data.lastPageUrl.length?MTA.Data.pageUrl+getQuery(MTA.Data.lastPageQuery):encodeURIComponent(MTA.Data.lastPageUrl+getQuery(MTA.Data.lastPageQuery))});a.push({rand:+new Date});c=0;for(var d=a.length;c<d;c++)for(var f in a[c])a[c].hasOwnProperty(f)&&b.push(f+"="+("undefined"==typeof a[c][f]?"":a[c][f]));wx.request({url:MTA_CONFIG.api_base+
"?"+b.join("&").toLowerCase()})}}},Event:{stat:function(a,b){if(""!=MTA_CONFIG.event_id){var c=[],d=getMainInfo(),f=getExtentInfo();d.dm="wxapps.click";d.url=a;f.r2=MTA_CONFIG.event_id;var e="undefined"===typeof b?{}:b;var k=[],g;for(g in e)e.hasOwnProperty(g)&&k.push(encodeURIComponent(g)+"="+encodeURIComponent(e[g]));e=k.join(";");f.r5=e;e=0;d=[d,f,getBasicInfo(),{rand:+new Date}];for(f=d.length;e<f;e++)for(var h in d[e])d[e].hasOwnProperty(h)&&c.push(h+"="+("undefined"==typeof d[e][h]?"":d[e][h]));
wx.request({url:MTA_CONFIG.api_base+"?"+c.join("&").toLowerCase()})}}},Data:{userInfo:null,lanchInfo:null,pageQuery:null,lastPageQuery:null,pageUrl:"",lastPageUrl:"",show:!1}};module.exports=MTA;
\ No newline at end of file
{
"_from": "mta-wechat-analysis@^1.3.7",
"_id": "mta-wechat-analysis@1.3.9",
"_inBundle": false,
"_integrity": "sha512-Q5OiYECoiFqBX9UzXbDPAtBar0MId5LUzf6ourgeSBBILpW1FOc0lp6SfnZlezs2KN3MjY66TOesFdgWNyiTRA==",
"_location": "/mta-wechat-analysis",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "mta-wechat-analysis@^1.3.7",
"name": "mta-wechat-analysis",
"escapedName": "mta-wechat-analysis",
"rawSpec": "^1.3.7",
"saveSpec": null,
"fetchSpec": "^1.3.7"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/mta-wechat-analysis/-/mta-wechat-analysis-1.3.9.tgz",
"_shasum": "a1eb83433d9f26af451a503459773062c2436d28",
"_spec": "mta-wechat-analysis@^1.3.7",
"_where": "G:\\company\\booking\\xcx-book",
"author": {
"name": "yinalin"
},
"bundleDependencies": false,
"deprecated": false,
"description": "mta wechat mini app analysis",
"keywords": [
"mta",
"wechat",
"analysis"
],
"license": "ISC",
"main": "index.js",
"name": "mta-wechat-analysis",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.3.9"
}
... ... @@ -199,7 +199,7 @@
</view>
<view class="reserve reserve-click flex-vc">
<formids class="flex-vc" bindclick="reserveEvent" id="reserve-button">
<view class="text">{{hasOnlineReserve?'包间预订':'联系餐厅'}}</view>
<view class="text">{{hasOnlineReserve?'订包间':'联系餐厅'}}</view>
</formids>
</view>
... ...
// pages/reserve/findSeller.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
eventChannel:null,
onLoad: function (options) {
this.eventChannel = this.getOpenerEventChannel()
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
this.eventChannel.on('acceptDataFromMapPage', findSellerData=> {
console.log('findSellerData',findSellerData)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
howEvent(e){
//console.log('howEvent',e)
this.eventChannel.emit('findSellerData',e.detail)
wx.navigateBack()
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText":"周到安排",
"usingComponents": {
"nav":"/components/nav/nav",
"how":"/components/reserve/search/how/index"
}
}
\ No newline at end of file
... ...
<!--pages/reserve/findSeller.wxml-->
<nav id="nav">周到安排</nav>
<how bindevent="howEvent" hasPage></how>
... ...
/* pages/reserve/findSeller.wxss */
\ No newline at end of file
... ...
... ... @@ -475,6 +475,9 @@ Page({
if(this.data.hasSuggestion){
param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
}
if(this.findSellerData){
param=Object.assign(param,this.findSellerData.paramObj)
}
this.selectComponent('#list').getList(param);
this.param=param;
let now_sid=[];
... ... @@ -850,7 +853,18 @@ Page({
tags:this.param.tags,
centre_pos:this.param.centre_pos,
hasSuggestion:this.data.hasSuggestion?1:''
},'./indexList')
},'./indexList'),
success: res=> {
// 通过eventChannel向被打开页面传送数据
if(this.findSellerData){
res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData)
}
res.eventChannel.on('findSellerData',findSellerData=>{
console.log('findSellerData',findSellerData)
this.findSellerData=findSellerData
setTimeout(()=>{this.getMarkers();},0)
})
}
});
},
setTSLocal(){
... ... @@ -871,4 +885,21 @@ Page({
}
this.setData(sdobj)
},
findSellerData:null,
findSeller(){
wx.navigateTo({
url: './findSeller',
success: res=> {
// 通过eventChannel向被打开页面传送数据
if(this.findSellerData){
res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData)
}
res.eventChannel.on('findSellerData',findSellerData=>{
console.log('findSellerData',findSellerData)
this.findSellerData=findSellerData
setTimeout(()=>{this.getMarkers();},0)
})
}
})
},
})
\ No newline at end of file
... ...
... ... @@ -14,7 +14,7 @@
enable-scroll
enable-rotate
subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
style="width: 100%; height: {{map.height+30}}px;"></map>
style="width: 100%; height: {{map.height+60}}px;"></map>
<formids url="/pages/reserve/search" style="position: fixed;">
<cover-view
class="flex-ll"
... ... @@ -31,14 +31,14 @@
</formids>
</view>
<view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}">
<cover-view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</cover-view>
<cover-view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</cover-view>
<cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}">
<cover-view class="line"></cover-view>
<cover-view class="text">
<cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view>
</cover-view>
</cover-view>
<view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</view>
<view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view>
<view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}">
<view class="line"></view>
<view class="text">
<view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view>
</view>
</view>
<view class="transverse-search flex-ll">
<view
bindtap="caixiShow"
... ... @@ -57,6 +57,10 @@
bindtap="tagsChange"
data-id="{{item.id}}">{{item.name}}</view>
</block>
<view class="fingSeller flex-ll" bindtap="findSeller">
<view class="icon"></view>
<view>查找餐厅</view>
</view>
</view>
<view class="transverse-list">
<swiper
... ... @@ -99,8 +103,14 @@
</view>
</view>
<view class="info" wx:elif="{{hasSearchLimit}}">
<view class="info-msg Semibold">未找到符合要求的餐厅</view>
<view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view>
<view class="info-txt">修改或减少条件,获取更多餐厅</view>
<button class="button-none flex-lr info-button"
style="display: flex;margin-top: 50rpx;margin-left: 0;"
open-type="contact">
<view>人工帮订</view>
<view class="info-button-gt"></view>
</button>
</view>
<view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal">
<view class="info-msg Semibold">你可以切换到其他城市看看</view>
... ...
... ... @@ -97,12 +97,12 @@ page{
}
.picker{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
}
.picker .input{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
margin-right: 10rpx;
}
.picker .more{
... ... @@ -192,7 +192,7 @@ page{
margin-left: 30rpx;
}
.empty-txt .seller .empty .info .info-msg{
margin-bottom: 40rpx;
margin-bottom: 14rpx;
font-size: 34rpx;
margin-top: 78rpx;
height: 48rpx;
... ... @@ -209,8 +209,8 @@ page{
padding: 0 20rpx;
color: #F05522;
font-size: 28rpx;
width: 146rpx;
max-width: 146rpx;
min-width: 146rpx;
max-width: 170rpx;
box-sizing: border-box;
}
.info-button-gt{
... ... @@ -228,24 +228,44 @@ page{
background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png");
}
.transverse-search .tags{
height: 50rpx;
line-height: 50rpx;
background-color: #F0F0F9;
border-radius: 4rpx;
margin-right: 30rpx;
padding: 0 16rpx;
height: 30rpx;
line-height: 30rpx;
/*background-color: #F0F0F9;*/
/*border-radius: 4rpx;*/
padding: 0 22rpx;
border-right:2rpx solid #E0E0E0;
}
.transverse-search .tags:first-child{
padding-left: 0;
}
.transverse-search .tags:last-child{
margin-right: 0;
border-right-width:0;
}
.transverse-search .tags.active{
background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);
color:#8B5318;
/*background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);*/
color:#C0A369;
font-weight: 900;
}
.fingSeller{
height: 70rpx;
line-height: 70rpx;
width: 172rpx;
box-shadow:-12rpx 0 10rpx -8rpx rgba(178,177,177,0.5);
box-sizing: border-box;
padding-left: 28rpx;
font-weight:600;
color:rgba(240,85,34,1);
}
.fingSeller .icon{
width: 32rpx;
height: 30rpx;
margin-right: 6rpx;
background-image: url("http://qn.colorcun.com/reserve/images/find.png");
background-size: 100% 100%;
}
/* seller-view start*/
/* seller-view start*/
.seller-view{
height: 470rpx;
position:fixed;
... ...
... ... @@ -240,5 +240,8 @@ Page({
// }
// })
return sellers;
},
dispalySearchHow(){
this.selectComponent('#search-how').show();
}
})
\ No newline at end of file
... ...
... ... @@ -8,6 +8,7 @@
"getpos":"/components/userinfo/getpos",
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"caixi":"/components/reserve/caixi",
"search-how":"/components/reserve/search/how/index",
"hr":"/components/hr"
}
}
\ No newline at end of file
... ...
<!--pages/reserve/indexList.wxml-->
<nav>周到安排</nav>
<view class="header">
<view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}">
<view class="searchAddrView" bindtap="dispalySearchHow">
<view class="searchAddr flex-ll">
<image class="icon" src="http://qn.colorcun.com/reserve/images/find-black.png"></image>
<input style="width: 100%;" placeholder="您好,几位,什么时候"
type="text"
value="{{keyword}}"/>
</view>
</view>
<view class="transverse-search flex-lr {{hasDisabled?'disabled':''}}">
<view
bindtap="caixiShow"
class="tags {{multiIndex[0]>0?'active':''}}"
>
<view class="picker flex-lr">
<view class="picker flex-cc">
<view class="input">
<block wx:if="{{multiIndex[0]==0}}">菜系</block>
<block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
... ... @@ -52,4 +60,5 @@
</view>
<caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}"
bindactive="caixiActive" id="caixi"
></caixi>
\ No newline at end of file
></caixi>
<search-how id="search-how"></search-how>
... ...
... ... @@ -13,32 +13,38 @@
width: 100%;
margin: 0 auto;
font-size: 24rpx;
padding-left: 20rpx;
}
.transverse-search .tags{
height: 50rpx;
line-height: 50rpx;
background-color: #F0F0F9;
border-radius: 4rpx;
margin-right: 30rpx;
padding: 0 16rpx;
height: 30rpx;
line-height: 30rpx;
/*background-color: #F0F0F9;*/
/*border-radius: 4rpx;*/
padding: 0 22rpx;
border-right:2rpx solid #E0E0E0;
text-align: center;
width: 25%;
box-sizing: border-box;
}
.transverse-search .tags:first-child{
padding-left: 0;
}
.transverse-search .tags:last-child{
margin-right: 0;
border-right-width:0;
}
.transverse-search .tags.active{
background-color: #F4DAB9;
color:#8B5318;
/*background-color: #F4DAB9;*/
color:#C0A369;
font-weight: 900;
}
.picker{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
}
.picker .input{
height: 50rpx;
line-height: 50rpx;
height: 30rpx;
line-height: 30rpx;
margin-right: 10rpx;
}
.picker .more{
... ... @@ -58,7 +64,7 @@
}
.pages{
width: 100%;
margin: 81rpx auto 0;
margin: 151rpx auto 0;
color:#fff;
font-size: 28rpx;
}
... ... @@ -96,4 +102,28 @@
}
.empty view.empry-info2{
margin-top: 20rpx;
}
.searchAddrView{
width: 100%;
height: 70rpx;
background-color: #ffffff;
z-index: 9;
}
.searchAddr {
width: 90%;
height: 60rpx;
background-color: #F5F5F5;
border-radius: 30rpx;
line-height: 60rpx;
color:#999999;
line-height: 60rpx;
font-size: 28rpx;
margin:0 auto;
}
.searchAddr .icon{
min-width: 32rpx;
width:32rpx;
height: 30rpx;
margin: 0 20rpx;
}
\ No newline at end of file
... ...
... ... @@ -29,7 +29,9 @@
"projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"simulatorPluginLibVersion": {
"qywx_simulator_plugin": "1.2.0"
},
"condition": {
"search": {
"current": -1,
... ... @@ -576,6 +578,13 @@
"scene": null
},
{
"id": -1,
"name": "pages/reserve/findSeller",
"pathName": "pages/reserve/findSeller",
"query": "",
"scene": null
},
{
"id": 71,
"name": "pages/reserve/detail",
"pathName": "pages/reserve/detail",
... ...
... ... @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") {
case 6:week="六";break
}
result=result.replace('WW',week);
if(format.indexOf('DAY')>0){
if(format.indexOf('DAY')>-1){
// 获取当天 0 点的时间戳
var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000;
... ...