Showing
44 changed files
with
632 additions
and
386 deletions
.gitignore
0 → 100644
.gitmodules
0 → 100644
.idea/modules.xml
deleted
100644 → 0
.idea/vcs.xml
deleted
100644 → 0
.idea/workspace.xml
deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project version="4"> | ||
| 3 | - <component name="ChangeListManager"> | ||
| 4 | - <list default="true" id="7016b20a-b56b-4f03-9b69-7a660c3cba08" name="Default" comment="查找包间在线预订调整"> | ||
| 5 | - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> | ||
| 6 | - </list> | ||
| 7 | - <ignored path="$PROJECT_DIR$/.tmp/" /> | ||
| 8 | - <ignored path="$PROJECT_DIR$/temp/" /> | ||
| 9 | - <ignored path="$PROJECT_DIR$/tmp/" /> | ||
| 10 | - <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | ||
| 11 | - <option name="TRACKING_ENABLED" value="true" /> | ||
| 12 | - <option name="SHOW_DIALOG" value="false" /> | ||
| 13 | - <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||
| 14 | - <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | ||
| 15 | - <option name="LAST_RESOLUTION" value="IGNORE" /> | ||
| 16 | - </component> | ||
| 17 | - <component name="Git.Settings"> | ||
| 18 | - <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> | ||
| 19 | - <option name="PUSH_TAGS"> | ||
| 20 | - <GitPushTagMode> | ||
| 21 | - <option name="argument" value="--follow-tags" /> | ||
| 22 | - <option name="title" value="Current Branch" /> | ||
| 23 | - </GitPushTagMode> | ||
| 24 | - </option> | ||
| 25 | - </component> | ||
| 26 | - <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
| 27 | - <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER"> | ||
| 28 | - <package-json value="$PROJECT_DIR$/package.json" /> | ||
| 29 | - </component> | ||
| 30 | - <component name="JsGulpfileManager"> | ||
| 31 | - <detection-done>true</detection-done> | ||
| 32 | - <sorting>DEFINITION_ORDER</sorting> | ||
| 33 | - </component> | ||
| 34 | - <component name="NodeModulesDirectoryManager"> | ||
| 35 | - <handled-path value="$PROJECT_DIR$/node_modules" /> | ||
| 36 | - </component> | ||
| 37 | - <component name="ProjectFrameBounds"> | ||
| 38 | - <option name="x" value="33" /> | ||
| 39 | - <option name="y" value="12" /> | ||
| 40 | - <option name="width" value="1622" /> | ||
| 41 | - <option name="height" value="933" /> | ||
| 42 | - </component> | ||
| 43 | - <component name="ProjectView"> | ||
| 44 | - <navigator currentView="ProjectPane" proportions="" version="1"> | ||
| 45 | - <flattenPackages /> | ||
| 46 | - <showMembers /> | ||
| 47 | - <showModules /> | ||
| 48 | - <showLibraryContents /> | ||
| 49 | - <hideEmptyPackages /> | ||
| 50 | - <abbreviatePackageNames /> | ||
| 51 | - <autoscrollToSource /> | ||
| 52 | - <autoscrollFromSource /> | ||
| 53 | - <sortByType /> | ||
| 54 | - <manualOrder /> | ||
| 55 | - <foldersAlwaysOnTop value="true" /> | ||
| 56 | - </navigator> | ||
| 57 | - <panes> | ||
| 58 | - <pane id="ProjectPane" /> | ||
| 59 | - <pane id="Scratches" /> | ||
| 60 | - <pane id="Scope" /> | ||
| 61 | - </panes> | ||
| 62 | - </component> | ||
| 63 | - <component name="PropertiesComponent"> | ||
| 64 | - <property name="WebServerToolWindowFactoryState" value="false" /> | ||
| 65 | - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | ||
| 66 | - <property name="settings.editor.selected.configurable" value="application.passwordSafe" /> | ||
| 67 | - </component> | ||
| 68 | - <component name="RunDashboard"> | ||
| 69 | - <option name="ruleStates"> | ||
| 70 | - <list> | ||
| 71 | - <RuleState> | ||
| 72 | - <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | ||
| 73 | - </RuleState> | ||
| 74 | - <RuleState> | ||
| 75 | - <option name="name" value="StatusDashboardGroupingRule" /> | ||
| 76 | - </RuleState> | ||
| 77 | - </list> | ||
| 78 | - </option> | ||
| 79 | - </component> | ||
| 80 | - <component name="ShelveChangesManager" show_recycled="false"> | ||
| 81 | - <option name="remove_strategy" value="false" /> | ||
| 82 | - </component> | ||
| 83 | - <component name="SvnConfiguration"> | ||
| 84 | - <configuration /> | ||
| 85 | - </component> | ||
| 86 | - <component name="TaskManager"> | ||
| 87 | - <task active="true" id="Default" summary="Default task"> | ||
| 88 | - <changelist id="7016b20a-b56b-4f03-9b69-7a660c3cba08" name="Default" comment="" /> | ||
| 89 | - <created>1581409774018</created> | ||
| 90 | - <option name="number" value="Default" /> | ||
| 91 | - <option name="presentableId" value="Default" /> | ||
| 92 | - <updated>1581409774018</updated> | ||
| 93 | - <workItem from="1581409778032" duration="490000" /> | ||
| 94 | - <workItem from="1581412123910" duration="1665000" /> | ||
| 95 | - <workItem from="1581414730285" duration="571000" /> | ||
| 96 | - <workItem from="1581417384562" duration="602000" /> | ||
| 97 | - <workItem from="1581434573578" duration="504000" /> | ||
| 98 | - <workItem from="1581470826408" duration="143000" /> | ||
| 99 | - </task> | ||
| 100 | - <task id="LOCAL-00001" summary="查找包间在线预订调整"> | ||
| 101 | - <created>1581409961223</created> | ||
| 102 | - <option name="number" value="00001" /> | ||
| 103 | - <option name="presentableId" value="LOCAL-00001" /> | ||
| 104 | - <option name="project" value="LOCAL" /> | ||
| 105 | - <updated>1581409961224</updated> | ||
| 106 | - </task> | ||
| 107 | - <option name="localTasksCounter" value="2" /> | ||
| 108 | - <servers /> | ||
| 109 | - </component> | ||
| 110 | - <component name="TimeTrackingManager"> | ||
| 111 | - <option name="totallyTimeSpent" value="3975000" /> | ||
| 112 | - </component> | ||
| 113 | - <component name="ToolWindowManager"> | ||
| 114 | - <frame x="33" y="12" width="1622" height="933" extended-state="0" /> | ||
| 115 | - <layout> | ||
| 116 | - <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" /> | ||
| 117 | - <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" /> | ||
| 118 | - <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" /> | ||
| 119 | - <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" /> | ||
| 120 | - <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" /> | ||
| 121 | - <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" /> | ||
| 122 | - <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" /> | ||
| 123 | - <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" /> | ||
| 124 | - <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" /> | ||
| 125 | - <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" /> | ||
| 126 | - <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" /> | ||
| 127 | - <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" /> | ||
| 128 | - <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" /> | ||
| 129 | - <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" /> | ||
| 130 | - <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" /> | ||
| 131 | - <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" /> | ||
| 132 | - <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" /> | ||
| 133 | - <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" /> | ||
| 134 | - </layout> | ||
| 135 | - </component> | ||
| 136 | - <component name="TypeScriptGeneratedFilesManager"> | ||
| 137 | - <option name="version" value="1" /> | ||
| 138 | - </component> | ||
| 139 | - <component name="Vcs.Log.Tabs.Properties"> | ||
| 140 | - <option name="TAB_STATES"> | ||
| 141 | - <map> | ||
| 142 | - <entry key="MAIN"> | ||
| 143 | - <value> | ||
| 144 | - <State> | ||
| 145 | - <option name="RECENTLY_FILTERED_USER_GROUPS"> | ||
| 146 | - <collection /> | ||
| 147 | - </option> | ||
| 148 | - <option name="RECENTLY_FILTERED_BRANCH_GROUPS"> | ||
| 149 | - <collection /> | ||
| 150 | - </option> | ||
| 151 | - <option name="HIGHLIGHTERS"> | ||
| 152 | - <map> | ||
| 153 | - <entry key="MERGE_COMMITS" value="false" /> | ||
| 154 | - </map> | ||
| 155 | - </option> | ||
| 156 | - <option name="COLUMN_ORDER"> | ||
| 157 | - <list> | ||
| 158 | - <option value="0" /> | ||
| 159 | - <option value="1" /> | ||
| 160 | - <option value="2" /> | ||
| 161 | - <option value="3" /> | ||
| 162 | - </list> | ||
| 163 | - </option> | ||
| 164 | - </State> | ||
| 165 | - </value> | ||
| 166 | - </entry> | ||
| 167 | - </map> | ||
| 168 | - </option> | ||
| 169 | - </component> | ||
| 170 | - <component name="VcsContentAnnotationSettings"> | ||
| 171 | - <option name="myLimit" value="2678400000" /> | ||
| 172 | - </component> | ||
| 173 | - <component name="VcsManagerConfiguration"> | ||
| 174 | - <MESSAGE value="查找包间在线预订调整" /> | ||
| 175 | - <option name="LAST_COMMIT_MESSAGE" value="查找包间在线预订调整" /> | ||
| 176 | - </component> | ||
| 177 | - <component name="XDebuggerManager"> | ||
| 178 | - <breakpoint-manager /> | ||
| 179 | - <watches-manager /> | ||
| 180 | - </component> | ||
| 181 | -</project> |
.idea/xcx-book.iml
deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<module type="WEB_MODULE" version="4"> | ||
| 3 | - <component name="NewModuleRootManager"> | ||
| 4 | - <content url="file://$MODULE_DIR$"> | ||
| 5 | - <excludeFolder url="file://$MODULE_DIR$/.tmp" /> | ||
| 6 | - <excludeFolder url="file://$MODULE_DIR$/temp" /> | ||
| 7 | - <excludeFolder url="file://$MODULE_DIR$/tmp" /> | ||
| 8 | - </content> | ||
| 9 | - <orderEntry type="inheritedJdk" /> | ||
| 10 | - <orderEntry type="sourceFolder" forTests="false" /> | ||
| 11 | - </component> | ||
| 12 | -</module> |
| @@ -32,7 +32,8 @@ | @@ -32,7 +32,8 @@ | ||
| 32 | "pages/reserve/share", | 32 | "pages/reserve/share", |
| 33 | "pages/reserve/submit", | 33 | "pages/reserve/submit", |
| 34 | "pages/me/history", | 34 | "pages/me/history", |
| 35 | - "pages/reserve/remark" | 35 | + "pages/reserve/remark", |
| 36 | + "pages/reserve/findSeller" | ||
| 36 | ], | 37 | ], |
| 37 | "subpackages": [ | 38 | "subpackages": [ |
| 38 | { | 39 | { |
components/reserve/search/how/date.js
0 → 100644
| 1 | +// components/reserve/search/how/hv/date.js | ||
| 2 | +var myBehavior = require('hv_behavior') | ||
| 3 | +const items=(function(){ | ||
| 4 | + let today=parseInt(new Date()/1000); | ||
| 5 | + let ds=[] | ||
| 6 | + for(let i=0;i<15;i++){ | ||
| 7 | + ds.push(today+86400*i) | ||
| 8 | + } | ||
| 9 | + return ds | ||
| 10 | +})() | ||
| 11 | +Component({ | ||
| 12 | + behaviors: [myBehavior], | ||
| 13 | + data:{ | ||
| 14 | + items:items, | ||
| 15 | + }, | ||
| 16 | + lifetimes: { | ||
| 17 | + attached: function () { | ||
| 18 | + // 在组件实例进入页面节点树时执行 | ||
| 19 | + this.setData({ | ||
| 20 | + spi:this.data.pi, | ||
| 21 | + }) | ||
| 22 | + }, | ||
| 23 | + detached: function () { | ||
| 24 | + // 在组件实例被从页面节点树移除时执行 | ||
| 25 | + }, | ||
| 26 | + }, | ||
| 27 | + /** | ||
| 28 | + * 组件的方法列表 | ||
| 29 | + */ | ||
| 30 | + methods: { | ||
| 31 | + | ||
| 32 | + } | ||
| 33 | +}) |
components/reserve/search/how/date.json
0 → 100644
components/reserve/search/how/date.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/hv/date.wxml--> | ||
| 2 | +<wxs src="../../../../utils/util.wxs" module="util" /> | ||
| 3 | +<swiper previous-margin="35rpx" next-margin="45rpx" | ||
| 4 | + class="tabs" | ||
| 5 | + display-multiple-items="5"> | ||
| 6 | + <swiper-item wx:for="{{items}}" wx:key="items"> | ||
| 7 | + <view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="date"> | ||
| 8 | + <view class="name">{{util.unixtoTime(item,'DAY')||util.unixtoTime(item,'周WW')}}</view> | ||
| 9 | + <view class="mmdd">{{util.unixtoTime(item,'MM.DD')}}</view> | ||
| 10 | + </view> | ||
| 11 | + </swiper-item> | ||
| 12 | +</swiper> |
components/reserve/search/how/date.wxss
0 → 100644
components/reserve/search/how/dur.js
0 → 100644
| 1 | +// components/reserve/search/how/hv/pnum.js | ||
| 2 | +var myBehavior = require('hv_behavior') | ||
| 3 | +const items=[ | ||
| 4 | + {id:1,label:'早餐'}, | ||
| 5 | + {id:2,label:'午餐'}, | ||
| 6 | + {id:3,label:'晚餐'}, | ||
| 7 | + {}, | ||
| 8 | + {}, | ||
| 9 | +] | ||
| 10 | +Component({ | ||
| 11 | + behaviors: [myBehavior], | ||
| 12 | + data:{ | ||
| 13 | + items:items, | ||
| 14 | + }, | ||
| 15 | + lifetimes: { | ||
| 16 | + attached: function () { | ||
| 17 | + // 在组件实例进入页面节点树时执行 | ||
| 18 | + console.log(this.data.pi) | ||
| 19 | + this.setData({ | ||
| 20 | + spi:this.data.pi, | ||
| 21 | + }) | ||
| 22 | + }, | ||
| 23 | + detached: function () { | ||
| 24 | + // 在组件实例被从页面节点树移除时执行 | ||
| 25 | + }, | ||
| 26 | + }, | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 组件的方法列表 | ||
| 30 | + */ | ||
| 31 | + methods: { | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | +}) |
components/reserve/search/how/dur.json
0 → 100644
components/reserve/search/how/dur.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/dur.wxml--> | ||
| 2 | +<swiper previous-margin="35rpx" next-margin="45rpx" | ||
| 3 | + class="tabs" | ||
| 4 | + display-multiple-items="5"> | ||
| 5 | + <swiper-item wx:for="{{items}}" wx:key="items"> | ||
| 6 | + <view class="item {{spi==index?'active':''}} flex-vc" | ||
| 7 | + bindtap="{{index>2?'':'checked'}}" | ||
| 8 | + data-index="{{index}}" | ||
| 9 | + data-val="{{item.id}}" | ||
| 10 | + data-type="dur"> | ||
| 11 | + <view class="name">{{item.label}}</view> | ||
| 12 | + </view> | ||
| 13 | + </swiper-item> | ||
| 14 | +</swiper> |
components/reserve/search/how/dur.wxss
0 → 100644
components/reserve/search/how/hv_behavior.js
0 → 100644
| 1 | +// components/reserve/search/how/hv.js | ||
| 2 | +import util from '../../../../utils/util' | ||
| 3 | +module.exports = Behavior({ | ||
| 4 | + properties: { | ||
| 5 | + pi: { | ||
| 6 | + type: Number, | ||
| 7 | + value:0, | ||
| 8 | + } | ||
| 9 | + }, | ||
| 10 | + data: { | ||
| 11 | + | ||
| 12 | + }, | ||
| 13 | + attached: function(){ | ||
| 14 | + | ||
| 15 | + }, | ||
| 16 | + methods: { | ||
| 17 | + gotoHere(){ | ||
| 18 | + this.data.index; | ||
| 19 | + }, | ||
| 20 | + checked(e){ | ||
| 21 | + let index=util.attr(e,'index') | ||
| 22 | + let val=util.attr(e,'val') | ||
| 23 | + let type=util.attr(e,'type') | ||
| 24 | + this.setData({ | ||
| 25 | + spi:index, | ||
| 26 | + }) | ||
| 27 | + this.triggerEvent('event',{index,val,type}) | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | +}) |
| 1 | +/* components/reserve/search/how/hv.wxss */ | ||
| 2 | +@import "../../../../app.wxss"; | ||
| 3 | +.tabs { | ||
| 4 | + height: 100rpx; | ||
| 5 | +} | ||
| 6 | +.tabs .item{ | ||
| 7 | + width:120rpx; | ||
| 8 | + height:100rpx; | ||
| 9 | + line-height: 100rpx; | ||
| 10 | + border-radius:10rpx; | ||
| 11 | + border:2rpx solid #fffff; | ||
| 12 | + font-size:30rpx; | ||
| 13 | + font-weight:600; | ||
| 14 | + color:#353535; | ||
| 15 | + text-align: center; | ||
| 16 | + box-sizing: border-box; | ||
| 17 | +} | ||
| 18 | +.tabs .item.active{ | ||
| 19 | + border-radius:10rpx; | ||
| 20 | + background:rgba(255,245,235,1); | ||
| 21 | + border:2px solid rgba(195,165,108,1); | ||
| 22 | + color:rgba(192,163,105,1); | ||
| 23 | +} |
components/reserve/search/how/index.js
0 → 100644
| 1 | +// components/reserve/search/how/index.js | ||
| 2 | +import util from '../../../../utils/util' | ||
| 3 | +Component({ | ||
| 4 | + /** | ||
| 5 | + * 组件的属性列表 | ||
| 6 | + */ | ||
| 7 | + properties: { | ||
| 8 | + hasPage:{ | ||
| 9 | + type:Boolean, | ||
| 10 | + value:false, | ||
| 11 | + }, | ||
| 12 | + date_pi:{ | ||
| 13 | + type:Number, | ||
| 14 | + value:0, | ||
| 15 | + }, | ||
| 16 | + pnum_pi:{ | ||
| 17 | + type:Number, | ||
| 18 | + value:0, | ||
| 19 | + }, | ||
| 20 | + dur_pi:{ | ||
| 21 | + type:Number, | ||
| 22 | + value:-1, | ||
| 23 | + } | ||
| 24 | + }, | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 组件的初始数据 | ||
| 28 | + */ | ||
| 29 | + data: { | ||
| 30 | + hidden:true, | ||
| 31 | + }, | ||
| 32 | + attached(){ | ||
| 33 | + this.params={} | ||
| 34 | + this.setData({ | ||
| 35 | + hidden:!this.data.hasPage | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + /** | ||
| 39 | + * 组件的方法列表 | ||
| 40 | + */ | ||
| 41 | + methods: { | ||
| 42 | + paramEvent(e){ | ||
| 43 | + console.log('paramEvent',e.detail) | ||
| 44 | + this.params[e.detail.type]=e.detail | ||
| 45 | + }, | ||
| 46 | + submit(){ | ||
| 47 | + console.log(this.params) | ||
| 48 | + let paramObj={ | ||
| 49 | + when_date:util.unixtoTime(this.params['date'].val,'YYYY-MM-DD'), | ||
| 50 | + several:this.params['pnum'].val, | ||
| 51 | + } | ||
| 52 | + if(this.params['dur'].val>=0){ | ||
| 53 | + paramObj.daily=this.params['dur'].val | ||
| 54 | + } | ||
| 55 | + this.triggerEvent('event',{ | ||
| 56 | + params:this.params, | ||
| 57 | + paramObj:paramObj, | ||
| 58 | + }) | ||
| 59 | + }, | ||
| 60 | + show(){ | ||
| 61 | + this.setData({ | ||
| 62 | + hidden:false | ||
| 63 | + }) | ||
| 64 | + }, | ||
| 65 | + hide(){ | ||
| 66 | + this.setData({ | ||
| 67 | + hidden:true | ||
| 68 | + }) | ||
| 69 | + }, | ||
| 70 | + } | ||
| 71 | +}) |
components/reserve/search/how/index.json
0 → 100644
components/reserve/search/how/index.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/index.wxml--> | ||
| 2 | +<view hidden="{{hidden}}"> | ||
| 3 | + <view class="mask" wx:if="{{!hasPage}}" bindtap="hide"></view> | ||
| 4 | + <view class="{{hasPage?'pages':'pages-window'}}"> | ||
| 5 | + <view class="title flex-lr"> | ||
| 6 | + <view class="title-name">您好,几位,什么时候</view> | ||
| 7 | + <view class="close" bindtap="hide"></view> | ||
| 8 | + </view> | ||
| 9 | + <view> | ||
| 10 | + <pnum bindevent="paramEvent" pi="{{pnum_pi}}"></pnum> | ||
| 11 | + <view style="margin: 60rpx 0"> | ||
| 12 | + <date bindevent="paramEvent" pi="{{pnum_pi}}"></date> | ||
| 13 | + </view> | ||
| 14 | + <dur bindevent="paramEvent" pi="{{dur_pi}}"></dur> | ||
| 15 | + </view> | ||
| 16 | + <view class="submit" bindtap="submit">查找餐厅</view> | ||
| 17 | + </view> | ||
| 18 | +</view> |
components/reserve/search/how/index.wxss
0 → 100644
| 1 | +/* components/reserve/search/how/index.wxss */ | ||
| 2 | +@import "../../../../app.wxss"; | ||
| 3 | +.pages{ | ||
| 4 | + padding: 20rpx 0; | ||
| 5 | +} | ||
| 6 | +.pages-window{ | ||
| 7 | + padding: 58rpx 0; | ||
| 8 | + border-radius:20rpx 20rpx 0 0; | ||
| 9 | + position: fixed; | ||
| 10 | + bottom: 0; | ||
| 11 | + background-color: #fff; | ||
| 12 | + width: 100%; | ||
| 13 | + z-index: 9999; | ||
| 14 | + height: 870rpx; | ||
| 15 | + box-sizing: border-box; | ||
| 16 | +} | ||
| 17 | +.pages .close{ | ||
| 18 | + display: none; | ||
| 19 | +} | ||
| 20 | +.title{ | ||
| 21 | + height:48rpx; | ||
| 22 | + font-size:34rpx; | ||
| 23 | + font-weight:600; | ||
| 24 | + color:rgba(53,53,53,1); | ||
| 25 | + line-height:48rpx; | ||
| 26 | + padding: 0 40rpx; | ||
| 27 | + width: calc(100% - 80rpx); | ||
| 28 | + margin-bottom: 60rpx; | ||
| 29 | +} | ||
| 30 | +.close{ | ||
| 31 | + background-image: url("http://qn.colorcun.com/reserve/images/close.png"); | ||
| 32 | + background-size: 100% 100%; | ||
| 33 | + width: 32rpx; | ||
| 34 | + height: 32rpx; | ||
| 35 | +} | ||
| 36 | +.submit{ | ||
| 37 | + height:80rpx; | ||
| 38 | + background:rgba(192,163,105,1); | ||
| 39 | + border-radius:10rpx; | ||
| 40 | + font-size:32rpx; | ||
| 41 | + font-weight:500; | ||
| 42 | + color:rgba(255,255,255,1); | ||
| 43 | + line-height:80rpx; | ||
| 44 | + text-align: center; | ||
| 45 | + margin: 0 40rpx; | ||
| 46 | + width: calc(100% - 80rpx); | ||
| 47 | + position: fixed; | ||
| 48 | + bottom: 80rpx; | ||
| 49 | +} |
components/reserve/search/how/pnum.js
0 → 100644
| 1 | +// components/reserve/search/how/hv/pnum.js | ||
| 2 | +var myBehavior = require('hv_behavior') | ||
| 3 | +const items=(function(){ | ||
| 4 | + let today=1; | ||
| 5 | + let ds=[] | ||
| 6 | + for(let i=0;i<=30;i++){ | ||
| 7 | + ds.push(today+i) | ||
| 8 | + } | ||
| 9 | + return ds | ||
| 10 | +})() | ||
| 11 | +Component({ | ||
| 12 | + behaviors: [myBehavior], | ||
| 13 | + data:{ | ||
| 14 | + items:items, | ||
| 15 | + }, | ||
| 16 | + lifetimes: { | ||
| 17 | + attached: function () { | ||
| 18 | + // 在组件实例进入页面节点树时执行 | ||
| 19 | + this.setData({ | ||
| 20 | + spi:this.data.pi==0?3:this.data.pi, | ||
| 21 | + }) | ||
| 22 | + }, | ||
| 23 | + detached: function () { | ||
| 24 | + // 在组件实例被从页面节点树移除时执行 | ||
| 25 | + }, | ||
| 26 | + }, | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 组件的方法列表 | ||
| 30 | + */ | ||
| 31 | + methods: { | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | +}) |
components/reserve/search/how/pnum.json
0 → 100644
components/reserve/search/how/pnum.wxml
0 → 100644
| 1 | +<!--components/reserve/search/how/hv/pnum.wxml--> | ||
| 2 | +<swiper previous-margin="35rpx" next-margin="45rpx" | ||
| 3 | + class="tabs" | ||
| 4 | + display-multiple-items="5"> | ||
| 5 | + <swiper-item wx:for="{{items}}" wx:key="items"> | ||
| 6 | + <view class="item {{spi==index?'active':''}} flex-vc" bindtap="checked" data-index="{{index}}" data-val="{{item}}" data-type="pnum"> | ||
| 7 | + <view class="name">{{item>30?'30位以上':item+' 位'}}</view> | ||
| 8 | + </view> | ||
| 9 | + </swiper-item> | ||
| 10 | +</swiper> |
components/reserve/search/how/pnum.wxss
0 → 100644
| 1 | -module.exports = (function() { | ||
| 2 | -var __MODS__ = {}; | ||
| 3 | -var __DEFINE__ = function(modId, func, req) { var m = { exports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; }; | ||
| 4 | -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; }; | ||
| 5 | -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; } }; | ||
| 6 | -var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; }; | ||
| 7 | -__DEFINE__(1580783104282, function(require, module, exports) { | ||
| 8 | -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)}})} | ||
| 9 | -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){}} | ||
| 10 | -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)} | ||
| 11 | -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} | ||
| 12 | -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):"")}} | ||
| 13 | -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} | ||
| 14 | -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)}} | ||
| 15 | -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, | ||
| 16 | - 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&& | ||
| 17 | -!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+ | ||
| 18 | - "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&& | ||
| 19 | -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+ | ||
| 20 | -"?"+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])); | ||
| 21 | - 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; | ||
| 22 | -}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); }) | ||
| 23 | -return __REQUIRE__(1580783104282); | ||
| 24 | -})() | ||
| 25 | -//# sourceMappingURL=index.js.map |
| 1 | -{"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;"]} |
| 1 | -# 小程序mta上报 | ||
| 2 | - | ||
| 3 | -## 安装 | ||
| 4 | - | ||
| 5 | -``` | ||
| 6 | -npm install mta-wechat-analysis --save | ||
| 7 | -``` | ||
| 8 | - | ||
| 9 | -## 引入上报 | ||
| 10 | - | ||
| 11 | -``` | ||
| 12 | -import mta from 'mta-wechat-analysis'; | ||
| 13 | -``` | ||
| 14 | - | ||
| 15 | -## 小程序添加可信域名 | ||
| 16 | - | ||
| 17 | -在小程序开发设置中,将https://pingtas.qq.com 添加为request可信域名 | ||
| 18 | - | ||
| 19 | -## 相关代码 | ||
| 20 | - | ||
| 21 | -``` | ||
| 22 | -// 初始化,这是示例代码,应用的接入代码请到官网每个应用对应的“应用管理”进行拷贝 | ||
| 23 | -mta.App.init({ | ||
| 24 | - "appID":"500013092", | ||
| 25 | - "eventID":"500015824", // 高级功能-自定义事件统计ID,配置开通后在初始化处填写 | ||
| 26 | - "lauchOpts":options, //渠道分析,需在onLaunch方法传入options,如onLaunch:function(options){...} | ||
| 27 | - "statPullDownFresh":true, // 使用分析-下拉刷新次数/人数,必须先开通自定义事件,并配置了合法的eventID | ||
| 28 | - "statShareApp":true, // 使用分析-分享次数/人数,必须先开通自定义事件,并配置了合法的eventID | ||
| 29 | - "statReachBottom":true // 使用分析-页面触底次数/人数,必须先开通自定义事件,并配置了合法的eventID | ||
| 30 | - "autoReport": true, //开启自动上报 | ||
| 31 | - "statParam": true, //每个页面均加入参数上报 | ||
| 32 | - "ignoreParams": ['test_adt'] //statParam为true时,如果不想上报的参数可配置忽略 | ||
| 33 | -}); | ||
| 34 | - | ||
| 35 | -/** | ||
| 36 | -autoReport值为false时,发起上报需在每个页面page.onload调用以下方法 | ||
| 37 | -页面初始化 | ||
| 38 | -**/ | ||
| 39 | -mta.Page.init(); | ||
| 40 | - | ||
| 41 | -// 自定义事件上报 | ||
| 42 | -mta.Event.stat("ico_search", {"query":"特斯拉"}); | ||
| 43 | - | ||
| 44 | -``` | ||
| 45 | - | ||
| 46 | - | ||
| 47 | -更多文档说明,参考[官方文档](http://mta.qq.com/docs/wechat_mini_program.html) |
| 1 | -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)}})} | ||
| 2 | -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){}} | ||
| 3 | -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)} | ||
| 4 | -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} | ||
| 5 | -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):"")}} | ||
| 6 | -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} | ||
| 7 | -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)}} | ||
| 8 | -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, | ||
| 9 | - 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&& | ||
| 10 | -!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+ | ||
| 11 | - "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&& | ||
| 12 | -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+ | ||
| 13 | -"?"+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])); | ||
| 14 | - 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; |
| 1 | -{ | ||
| 2 | - "_from": "mta-wechat-analysis@^1.3.7", | ||
| 3 | - "_id": "mta-wechat-analysis@1.3.9", | ||
| 4 | - "_inBundle": false, | ||
| 5 | - "_integrity": "sha512-Q5OiYECoiFqBX9UzXbDPAtBar0MId5LUzf6ourgeSBBILpW1FOc0lp6SfnZlezs2KN3MjY66TOesFdgWNyiTRA==", | ||
| 6 | - "_location": "/mta-wechat-analysis", | ||
| 7 | - "_phantomChildren": {}, | ||
| 8 | - "_requested": { | ||
| 9 | - "type": "range", | ||
| 10 | - "registry": true, | ||
| 11 | - "raw": "mta-wechat-analysis@^1.3.7", | ||
| 12 | - "name": "mta-wechat-analysis", | ||
| 13 | - "escapedName": "mta-wechat-analysis", | ||
| 14 | - "rawSpec": "^1.3.7", | ||
| 15 | - "saveSpec": null, | ||
| 16 | - "fetchSpec": "^1.3.7" | ||
| 17 | - }, | ||
| 18 | - "_requiredBy": [ | ||
| 19 | - "/" | ||
| 20 | - ], | ||
| 21 | - "_resolved": "https://registry.npmjs.org/mta-wechat-analysis/-/mta-wechat-analysis-1.3.9.tgz", | ||
| 22 | - "_shasum": "a1eb83433d9f26af451a503459773062c2436d28", | ||
| 23 | - "_spec": "mta-wechat-analysis@^1.3.7", | ||
| 24 | - "_where": "G:\\company\\booking\\xcx-book", | ||
| 25 | - "author": { | ||
| 26 | - "name": "yinalin" | ||
| 27 | - }, | ||
| 28 | - "bundleDependencies": false, | ||
| 29 | - "deprecated": false, | ||
| 30 | - "description": "mta wechat mini app analysis", | ||
| 31 | - "keywords": [ | ||
| 32 | - "mta", | ||
| 33 | - "wechat", | ||
| 34 | - "analysis" | ||
| 35 | - ], | ||
| 36 | - "license": "ISC", | ||
| 37 | - "main": "index.js", | ||
| 38 | - "name": "mta-wechat-analysis", | ||
| 39 | - "scripts": { | ||
| 40 | - "test": "echo \"Error: no test specified\" && exit 1" | ||
| 41 | - }, | ||
| 42 | - "version": "1.3.9" | ||
| 43 | -} |
| @@ -199,7 +199,7 @@ | @@ -199,7 +199,7 @@ | ||
| 199 | </view> | 199 | </view> |
| 200 | <view class="reserve reserve-click flex-vc"> | 200 | <view class="reserve reserve-click flex-vc"> |
| 201 | <formids class="flex-vc" bindclick="reserveEvent" id="reserve-button"> | 201 | <formids class="flex-vc" bindclick="reserveEvent" id="reserve-button"> |
| 202 | - <view class="text">{{hasOnlineReserve?'包间预订':'联系餐厅'}}</view> | 202 | + <view class="text">{{hasOnlineReserve?'订包间':'联系餐厅'}}</view> |
| 203 | </formids> | 203 | </formids> |
| 204 | </view> | 204 | </view> |
| 205 | 205 |
pages/reserve/findSeller.js
0 → 100644
| 1 | +// pages/reserve/findSeller.js | ||
| 2 | +Page({ | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * 页面的初始数据 | ||
| 6 | + */ | ||
| 7 | + data: { | ||
| 8 | + | ||
| 9 | + }, | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * 生命周期函数--监听页面加载 | ||
| 13 | + */ | ||
| 14 | + eventChannel:null, | ||
| 15 | + onLoad: function (options) { | ||
| 16 | + this.eventChannel = this.getOpenerEventChannel() | ||
| 17 | + // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | ||
| 18 | + this.eventChannel.on('acceptDataFromMapPage', findSellerData=> { | ||
| 19 | + console.log('findSellerData',findSellerData) | ||
| 20 | + }) | ||
| 21 | + }, | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 25 | + */ | ||
| 26 | + onReady: function () { | ||
| 27 | + | ||
| 28 | + }, | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 生命周期函数--监听页面显示 | ||
| 32 | + */ | ||
| 33 | + onShow: function () { | ||
| 34 | + | ||
| 35 | + }, | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 生命周期函数--监听页面隐藏 | ||
| 39 | + */ | ||
| 40 | + onHide: function () { | ||
| 41 | + | ||
| 42 | + }, | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 生命周期函数--监听页面卸载 | ||
| 46 | + */ | ||
| 47 | + onUnload: function () { | ||
| 48 | + | ||
| 49 | + }, | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 53 | + */ | ||
| 54 | + onPullDownRefresh: function () { | ||
| 55 | + | ||
| 56 | + }, | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 页面上拉触底事件的处理函数 | ||
| 60 | + */ | ||
| 61 | + onReachBottom: function () { | ||
| 62 | + | ||
| 63 | + }, | ||
| 64 | + | ||
| 65 | + howEvent(e){ | ||
| 66 | + //console.log('howEvent',e) | ||
| 67 | + this.eventChannel.emit('findSellerData',e.detail) | ||
| 68 | + wx.navigateBack() | ||
| 69 | + }, | ||
| 70 | +}) |
pages/reserve/findSeller.json
0 → 100644
pages/reserve/findSeller.wxml
0 → 100644
pages/reserve/findSeller.wxss
0 → 100644
| 1 | +/* pages/reserve/findSeller.wxss */ |
| @@ -475,6 +475,9 @@ Page({ | @@ -475,6 +475,9 @@ Page({ | ||
| 475 | if(this.data.hasSuggestion){ | 475 | if(this.data.hasSuggestion){ |
| 476 | param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` | 476 | param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` |
| 477 | } | 477 | } |
| 478 | + if(this.findSellerData){ | ||
| 479 | + param=Object.assign(param,this.findSellerData.paramObj) | ||
| 480 | + } | ||
| 478 | this.selectComponent('#list').getList(param); | 481 | this.selectComponent('#list').getList(param); |
| 479 | this.param=param; | 482 | this.param=param; |
| 480 | let now_sid=[]; | 483 | let now_sid=[]; |
| @@ -850,7 +853,18 @@ Page({ | @@ -850,7 +853,18 @@ Page({ | ||
| 850 | tags:this.param.tags, | 853 | tags:this.param.tags, |
| 851 | centre_pos:this.param.centre_pos, | 854 | centre_pos:this.param.centre_pos, |
| 852 | hasSuggestion:this.data.hasSuggestion?1:'' | 855 | hasSuggestion:this.data.hasSuggestion?1:'' |
| 853 | - },'./indexList') | 856 | + },'./indexList'), |
| 857 | + success: res=> { | ||
| 858 | + // 通过eventChannel向被打开页面传送数据 | ||
| 859 | + if(this.findSellerData){ | ||
| 860 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 861 | + } | ||
| 862 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 863 | + console.log('findSellerData',findSellerData) | ||
| 864 | + this.findSellerData=findSellerData | ||
| 865 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 866 | + }) | ||
| 867 | + } | ||
| 854 | }); | 868 | }); |
| 855 | }, | 869 | }, |
| 856 | setTSLocal(){ | 870 | setTSLocal(){ |
| @@ -871,4 +885,21 @@ Page({ | @@ -871,4 +885,21 @@ Page({ | ||
| 871 | } | 885 | } |
| 872 | this.setData(sdobj) | 886 | this.setData(sdobj) |
| 873 | }, | 887 | }, |
| 888 | + findSellerData:null, | ||
| 889 | + findSeller(){ | ||
| 890 | + wx.navigateTo({ | ||
| 891 | + url: './findSeller', | ||
| 892 | + success: res=> { | ||
| 893 | + // 通过eventChannel向被打开页面传送数据 | ||
| 894 | + if(this.findSellerData){ | ||
| 895 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 896 | + } | ||
| 897 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 898 | + console.log('findSellerData',findSellerData) | ||
| 899 | + this.findSellerData=findSellerData | ||
| 900 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 901 | + }) | ||
| 902 | + } | ||
| 903 | + }) | ||
| 904 | + }, | ||
| 874 | }) | 905 | }) |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | enable-scroll | 14 | enable-scroll |
| 15 | enable-rotate | 15 | enable-rotate |
| 16 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" | 16 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" |
| 17 | - style="width: 100%; height: {{map.height+30}}px;"></map> | 17 | + style="width: 100%; height: {{map.height+60}}px;"></map> |
| 18 | <formids url="/pages/reserve/search" style="position: fixed;"> | 18 | <formids url="/pages/reserve/search" style="position: fixed;"> |
| 19 | <cover-view | 19 | <cover-view |
| 20 | class="flex-ll" | 20 | class="flex-ll" |
| @@ -31,14 +31,14 @@ | @@ -31,14 +31,14 @@ | ||
| 31 | </formids> | 31 | </formids> |
| 32 | </view> | 32 | </view> |
| 33 | <view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}"> | 33 | <view class="seller-view {{(listMoreCount<1)?(hasSearchLimit?'disabled enabled':'disabled'):''}}"> |
| 34 | - <cover-view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</cover-view> | ||
| 35 | - <cover-view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</cover-view> | ||
| 36 | - <cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> | ||
| 37 | - <cover-view class="line"></cover-view> | ||
| 38 | - <cover-view class="text"> | ||
| 39 | - <cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view> | ||
| 40 | - </cover-view> | ||
| 41 | - </cover-view> | 34 | + <view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</view> |
| 35 | + <view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view> | ||
| 36 | + <view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> | ||
| 37 | + <view class="line"></view> | ||
| 38 | + <view class="text"> | ||
| 39 | + <view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | <view class="transverse-search flex-ll"> | 42 | <view class="transverse-search flex-ll"> |
| 43 | <view | 43 | <view |
| 44 | bindtap="caixiShow" | 44 | bindtap="caixiShow" |
| @@ -57,6 +57,10 @@ | @@ -57,6 +57,10 @@ | ||
| 57 | bindtap="tagsChange" | 57 | bindtap="tagsChange" |
| 58 | data-id="{{item.id}}">{{item.name}}</view> | 58 | data-id="{{item.id}}">{{item.name}}</view> |
| 59 | </block> | 59 | </block> |
| 60 | + <view class="fingSeller flex-ll" bindtap="findSeller"> | ||
| 61 | + <view class="icon"></view> | ||
| 62 | + <view>查找餐厅</view> | ||
| 63 | + </view> | ||
| 60 | </view> | 64 | </view> |
| 61 | <view class="transverse-list"> | 65 | <view class="transverse-list"> |
| 62 | <swiper | 66 | <swiper |
| @@ -99,8 +103,14 @@ | @@ -99,8 +103,14 @@ | ||
| 99 | </view> | 103 | </view> |
| 100 | </view> | 104 | </view> |
| 101 | <view class="info" wx:elif="{{hasSearchLimit}}"> | 105 | <view class="info" wx:elif="{{hasSearchLimit}}"> |
| 102 | - <view class="info-msg Semibold">未找到符合要求的餐厅</view> | 106 | + <view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view> |
| 103 | <view class="info-txt">修改或减少条件,获取更多餐厅</view> | 107 | <view class="info-txt">修改或减少条件,获取更多餐厅</view> |
| 108 | + <button class="button-none flex-lr info-button" | ||
| 109 | + style="display: flex;margin-top: 50rpx;margin-left: 0;" | ||
| 110 | + open-type="contact"> | ||
| 111 | + <view>人工帮订</view> | ||
| 112 | + <view class="info-button-gt"></view> | ||
| 113 | + </button> | ||
| 104 | </view> | 114 | </view> |
| 105 | <view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal"> | 115 | <view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal"> |
| 106 | <view class="info-msg Semibold">你可以切换到其他城市看看</view> | 116 | <view class="info-msg Semibold">你可以切换到其他城市看看</view> |
| @@ -97,12 +97,12 @@ page{ | @@ -97,12 +97,12 @@ page{ | ||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | .picker{ | 99 | .picker{ |
| 100 | - height: 50rpx; | ||
| 101 | - line-height: 50rpx; | 100 | + height: 30rpx; |
| 101 | + line-height: 30rpx; | ||
| 102 | } | 102 | } |
| 103 | .picker .input{ | 103 | .picker .input{ |
| 104 | - height: 50rpx; | ||
| 105 | - line-height: 50rpx; | 104 | + height: 30rpx; |
| 105 | + line-height: 30rpx; | ||
| 106 | margin-right: 10rpx; | 106 | margin-right: 10rpx; |
| 107 | } | 107 | } |
| 108 | .picker .more{ | 108 | .picker .more{ |
| @@ -192,7 +192,7 @@ page{ | @@ -192,7 +192,7 @@ page{ | ||
| 192 | margin-left: 30rpx; | 192 | margin-left: 30rpx; |
| 193 | } | 193 | } |
| 194 | .empty-txt .seller .empty .info .info-msg{ | 194 | .empty-txt .seller .empty .info .info-msg{ |
| 195 | - margin-bottom: 40rpx; | 195 | + margin-bottom: 14rpx; |
| 196 | font-size: 34rpx; | 196 | font-size: 34rpx; |
| 197 | margin-top: 78rpx; | 197 | margin-top: 78rpx; |
| 198 | height: 48rpx; | 198 | height: 48rpx; |
| @@ -209,8 +209,8 @@ page{ | @@ -209,8 +209,8 @@ page{ | ||
| 209 | padding: 0 20rpx; | 209 | padding: 0 20rpx; |
| 210 | color: #F05522; | 210 | color: #F05522; |
| 211 | font-size: 28rpx; | 211 | font-size: 28rpx; |
| 212 | - width: 146rpx; | ||
| 213 | - max-width: 146rpx; | 212 | + min-width: 146rpx; |
| 213 | + max-width: 170rpx; | ||
| 214 | box-sizing: border-box; | 214 | box-sizing: border-box; |
| 215 | } | 215 | } |
| 216 | .info-button-gt{ | 216 | .info-button-gt{ |
| @@ -228,24 +228,44 @@ page{ | @@ -228,24 +228,44 @@ page{ | ||
| 228 | background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); | 228 | background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); |
| 229 | } | 229 | } |
| 230 | .transverse-search .tags{ | 230 | .transverse-search .tags{ |
| 231 | - height: 50rpx; | ||
| 232 | - line-height: 50rpx; | ||
| 233 | - background-color: #F0F0F9; | ||
| 234 | - border-radius: 4rpx; | ||
| 235 | - margin-right: 30rpx; | ||
| 236 | - padding: 0 16rpx; | 231 | + height: 30rpx; |
| 232 | + line-height: 30rpx; | ||
| 233 | + /*background-color: #F0F0F9;*/ | ||
| 234 | + /*border-radius: 4rpx;*/ | ||
| 235 | + padding: 0 22rpx; | ||
| 236 | + border-right:2rpx solid #E0E0E0; | ||
| 237 | +} | ||
| 238 | +.transverse-search .tags:first-child{ | ||
| 239 | + padding-left: 0; | ||
| 237 | } | 240 | } |
| 238 | .transverse-search .tags:last-child{ | 241 | .transverse-search .tags:last-child{ |
| 239 | margin-right: 0; | 242 | margin-right: 0; |
| 243 | + border-right-width:0; | ||
| 240 | } | 244 | } |
| 241 | .transverse-search .tags.active{ | 245 | .transverse-search .tags.active{ |
| 242 | - background:linear-gradient(to bottom ,#F4DAB9,#E9BE94); | ||
| 243 | - color:#8B5318; | 246 | + /*background:linear-gradient(to bottom ,#F4DAB9,#E9BE94);*/ |
| 247 | + color:#C0A369; | ||
| 244 | font-weight: 900; | 248 | font-weight: 900; |
| 245 | } | 249 | } |
| 250 | +.fingSeller{ | ||
| 251 | + height: 70rpx; | ||
| 252 | + line-height: 70rpx; | ||
| 253 | + width: 172rpx; | ||
| 254 | + box-shadow:-12rpx 0 10rpx -8rpx rgba(178,177,177,0.5); | ||
| 255 | + box-sizing: border-box; | ||
| 256 | + padding-left: 28rpx; | ||
| 257 | + font-weight:600; | ||
| 258 | + color:rgba(240,85,34,1); | ||
| 259 | +} | ||
| 260 | +.fingSeller .icon{ | ||
| 261 | + width: 32rpx; | ||
| 262 | + height: 30rpx; | ||
| 263 | + margin-right: 6rpx; | ||
| 264 | + background-image: url("http://qn.colorcun.com/reserve/images/find.png"); | ||
| 265 | + background-size: 100% 100%; | ||
| 266 | +} | ||
| 246 | 267 | ||
| 247 | - | ||
| 248 | -/* seller-view start*/ | 268 | + /* seller-view start*/ |
| 249 | .seller-view{ | 269 | .seller-view{ |
| 250 | height: 470rpx; | 270 | height: 470rpx; |
| 251 | position:fixed; | 271 | position:fixed; |
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | "getpos":"/components/userinfo/getpos", | 8 | "getpos":"/components/userinfo/getpos", |
| 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | 9 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", |
| 10 | "caixi":"/components/reserve/caixi", | 10 | "caixi":"/components/reserve/caixi", |
| 11 | + "search-how":"/components/reserve/search/how/index", | ||
| 11 | "hr":"/components/hr" | 12 | "hr":"/components/hr" |
| 12 | } | 13 | } |
| 13 | } | 14 | } |
| 1 | <!--pages/reserve/indexList.wxml--> | 1 | <!--pages/reserve/indexList.wxml--> |
| 2 | <nav>周到安排</nav> | 2 | <nav>周到安排</nav> |
| 3 | <view class="header"> | 3 | <view class="header"> |
| 4 | - <view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}"> | 4 | + <view class="searchAddrView" bindtap="dispalySearchHow"> |
| 5 | + <view class="searchAddr flex-ll"> | ||
| 6 | + <image class="icon" src="http://qn.colorcun.com/reserve/images/find-black.png"></image> | ||
| 7 | + <input style="width: 100%;" placeholder="您好,几位,什么时候" | ||
| 8 | + type="text" | ||
| 9 | + value="{{keyword}}"/> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | + <view class="transverse-search flex-lr {{hasDisabled?'disabled':''}}"> | ||
| 5 | <view | 13 | <view |
| 6 | bindtap="caixiShow" | 14 | bindtap="caixiShow" |
| 7 | class="tags {{multiIndex[0]>0?'active':''}}" | 15 | class="tags {{multiIndex[0]>0?'active':''}}" |
| 8 | > | 16 | > |
| 9 | - <view class="picker flex-lr"> | 17 | + <view class="picker flex-cc"> |
| 10 | <view class="input"> | 18 | <view class="input"> |
| 11 | <block wx:if="{{multiIndex[0]==0}}">菜系</block> | 19 | <block wx:if="{{multiIndex[0]==0}}">菜系</block> |
| 12 | <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> | 20 | <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> |
| @@ -52,4 +60,5 @@ | @@ -52,4 +60,5 @@ | ||
| 52 | </view> | 60 | </view> |
| 53 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" | 61 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" |
| 54 | bindactive="caixiActive" id="caixi" | 62 | bindactive="caixiActive" id="caixi" |
| 55 | -></caixi> | ||
| 63 | +></caixi> | ||
| 64 | +<search-how id="search-how"></search-how> |
| @@ -13,32 +13,38 @@ | @@ -13,32 +13,38 @@ | ||
| 13 | width: 100%; | 13 | width: 100%; |
| 14 | margin: 0 auto; | 14 | margin: 0 auto; |
| 15 | font-size: 24rpx; | 15 | font-size: 24rpx; |
| 16 | - padding-left: 20rpx; | ||
| 17 | } | 16 | } |
| 18 | .transverse-search .tags{ | 17 | .transverse-search .tags{ |
| 19 | - height: 50rpx; | ||
| 20 | - line-height: 50rpx; | ||
| 21 | - background-color: #F0F0F9; | ||
| 22 | - border-radius: 4rpx; | ||
| 23 | - margin-right: 30rpx; | ||
| 24 | - padding: 0 16rpx; | 18 | + height: 30rpx; |
| 19 | + line-height: 30rpx; | ||
| 20 | + /*background-color: #F0F0F9;*/ | ||
| 21 | + /*border-radius: 4rpx;*/ | ||
| 22 | + padding: 0 22rpx; | ||
| 23 | + border-right:2rpx solid #E0E0E0; | ||
| 24 | + text-align: center; | ||
| 25 | + width: 25%; | ||
| 26 | + box-sizing: border-box; | ||
| 27 | +} | ||
| 28 | +.transverse-search .tags:first-child{ | ||
| 29 | + padding-left: 0; | ||
| 25 | } | 30 | } |
| 26 | .transverse-search .tags:last-child{ | 31 | .transverse-search .tags:last-child{ |
| 27 | margin-right: 0; | 32 | margin-right: 0; |
| 33 | + border-right-width:0; | ||
| 28 | } | 34 | } |
| 29 | .transverse-search .tags.active{ | 35 | .transverse-search .tags.active{ |
| 30 | - background-color: #F4DAB9; | ||
| 31 | - color:#8B5318; | 36 | + /*background-color: #F4DAB9;*/ |
| 37 | + color:#C0A369; | ||
| 32 | font-weight: 900; | 38 | font-weight: 900; |
| 33 | } | 39 | } |
| 34 | 40 | ||
| 35 | .picker{ | 41 | .picker{ |
| 36 | - height: 50rpx; | ||
| 37 | - line-height: 50rpx; | 42 | + height: 30rpx; |
| 43 | + line-height: 30rpx; | ||
| 38 | } | 44 | } |
| 39 | .picker .input{ | 45 | .picker .input{ |
| 40 | - height: 50rpx; | ||
| 41 | - line-height: 50rpx; | 46 | + height: 30rpx; |
| 47 | + line-height: 30rpx; | ||
| 42 | margin-right: 10rpx; | 48 | margin-right: 10rpx; |
| 43 | } | 49 | } |
| 44 | .picker .more{ | 50 | .picker .more{ |
| @@ -58,7 +64,7 @@ | @@ -58,7 +64,7 @@ | ||
| 58 | } | 64 | } |
| 59 | .pages{ | 65 | .pages{ |
| 60 | width: 100%; | 66 | width: 100%; |
| 61 | - margin: 81rpx auto 0; | 67 | + margin: 151rpx auto 0; |
| 62 | color:#fff; | 68 | color:#fff; |
| 63 | font-size: 28rpx; | 69 | font-size: 28rpx; |
| 64 | } | 70 | } |
| @@ -96,4 +102,28 @@ | @@ -96,4 +102,28 @@ | ||
| 96 | } | 102 | } |
| 97 | .empty view.empry-info2{ | 103 | .empty view.empry-info2{ |
| 98 | margin-top: 20rpx; | 104 | margin-top: 20rpx; |
| 105 | +} | ||
| 106 | + | ||
| 107 | +.searchAddrView{ | ||
| 108 | + width: 100%; | ||
| 109 | + height: 70rpx; | ||
| 110 | + background-color: #ffffff; | ||
| 111 | + z-index: 9; | ||
| 112 | +} | ||
| 113 | +.searchAddr { | ||
| 114 | + width: 90%; | ||
| 115 | + height: 60rpx; | ||
| 116 | + background-color: #F5F5F5; | ||
| 117 | + border-radius: 30rpx; | ||
| 118 | + line-height: 60rpx; | ||
| 119 | + color:#999999; | ||
| 120 | + line-height: 60rpx; | ||
| 121 | + font-size: 28rpx; | ||
| 122 | + margin:0 auto; | ||
| 123 | +} | ||
| 124 | +.searchAddr .icon{ | ||
| 125 | + min-width: 32rpx; | ||
| 126 | + width:32rpx; | ||
| 127 | + height: 30rpx; | ||
| 128 | + margin: 0 20rpx; | ||
| 99 | } | 129 | } |
| @@ -29,7 +29,9 @@ | @@ -29,7 +29,9 @@ | ||
| 29 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", | 29 | "projectname": "c%E7%AB%AF%E9%A2%84%E5%AE%9A", |
| 30 | "isGameTourist": false, | 30 | "isGameTourist": false, |
| 31 | "simulatorType": "wechat", | 31 | "simulatorType": "wechat", |
| 32 | - "simulatorPluginLibVersion": {}, | 32 | + "simulatorPluginLibVersion": { |
| 33 | + "qywx_simulator_plugin": "1.2.0" | ||
| 34 | + }, | ||
| 33 | "condition": { | 35 | "condition": { |
| 34 | "search": { | 36 | "search": { |
| 35 | "current": -1, | 37 | "current": -1, |
| @@ -576,6 +578,13 @@ | @@ -576,6 +578,13 @@ | ||
| 576 | "scene": null | 578 | "scene": null |
| 577 | }, | 579 | }, |
| 578 | { | 580 | { |
| 581 | + "id": -1, | ||
| 582 | + "name": "pages/reserve/findSeller", | ||
| 583 | + "pathName": "pages/reserve/findSeller", | ||
| 584 | + "query": "", | ||
| 585 | + "scene": null | ||
| 586 | + }, | ||
| 587 | + { | ||
| 579 | "id": 71, | 588 | "id": 71, |
| 580 | "name": "pages/reserve/detail", | 589 | "name": "pages/reserve/detail", |
| 581 | "pathName": "pages/reserve/detail", | 590 | "pathName": "pages/reserve/detail", |
| @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") { | @@ -29,7 +29,7 @@ function unixtoTime(ns,format="YYYY-MM-DD HH:II:SS") { | ||
| 29 | case 6:week="六";break | 29 | case 6:week="六";break |
| 30 | } | 30 | } |
| 31 | result=result.replace('WW',week); | 31 | result=result.replace('WW',week); |
| 32 | - if(format.indexOf('DAY')>0){ | 32 | + if(format.indexOf('DAY')>-1){ |
| 33 | // 获取当天 0 点的时间戳 | 33 | // 获取当天 0 点的时间戳 |
| 34 | var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000; | 34 | var timeStamp = getDate(getDate().setHours(0, 0, 0, 0)) / 1000; |
| 35 | 35 |
-
Please register or login to post a comment