作者 王晓刚
1 个管道 的构建 通过 耗费 14 秒

广告详情

@@ -3,12 +3,10 @@ @@ -3,12 +3,10 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment=""> 4 <list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment="">
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 - <change beforePath="$PROJECT_DIR$/application/home/controller/Collect.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Collect.php" afterDir="false" />  
7 <change beforePath="$PROJECT_DIR$/application/home/controller/Goods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Goods.php" afterDir="false" /> 6 <change beforePath="$PROJECT_DIR$/application/home/controller/Goods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Goods.php" afterDir="false" />
8 <change beforePath="$PROJECT_DIR$/application/home/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Index.php" afterDir="false" /> 7 <change beforePath="$PROJECT_DIR$/application/home/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Index.php" afterDir="false" />
9 - <change beforePath="$PROJECT_DIR$/application/home/controller/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/User.php" afterDir="false" /> 8 + <change beforePath="$PROJECT_DIR$/application/home/controller/Question.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Question.php" afterDir="false" />
10 <change beforePath="$PROJECT_DIR$/application/home/view/goods/content_detail.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/view/goods/content_detail.html" afterDir="false" /> 9 <change beforePath="$PROJECT_DIR$/application/home/view/goods/content_detail.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/view/goods/content_detail.html" afterDir="false" />
11 - <change beforePath="$PROJECT_DIR$/public/assets/advertising/css/advDetail.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/assets/advertising/css/advDetail.css" afterDir="false" />  
12 </list> 10 </list>
13 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 11 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
14 <option name="TRACKING_ENABLED" value="true" /> 12 <option name="TRACKING_ENABLED" value="true" />
@@ -25,29 +23,17 @@ @@ -25,29 +23,17 @@
25 <file leaf-file-name="index.html" pinned="false" current-in-tab="false"> 23 <file leaf-file-name="index.html" pinned="false" current-in-tab="false">
26 <entry file="file://$PROJECT_DIR$/application/home/view/index/index.html"> 24 <entry file="file://$PROJECT_DIR$/application/home/view/index/index.html">
27 <provider selected="true" editor-type-id="text-editor"> 25 <provider selected="true" editor-type-id="text-editor">
28 - <state relative-caret-position="476"> 26 + <state relative-caret-position="731">
29 <caret line="43" column="57" selection-start-line="43" selection-start-column="30" selection-end-line="43" selection-end-column="57" /> 27 <caret line="43" column="57" selection-start-line="43" selection-start-column="30" selection-end-line="43" selection-end-column="57" />
30 </state> 28 </state>
31 </provider> 29 </provider>
32 </entry> 30 </entry>
33 </file> 31 </file>
34 - <file leaf-file-name="content_detail.html" pinned="false" current-in-tab="true"> 32 + <file leaf-file-name="content_detail.html" pinned="false" current-in-tab="false">
35 <entry file="file://$PROJECT_DIR$/application/home/view/goods/content_detail.html"> 33 <entry file="file://$PROJECT_DIR$/application/home/view/goods/content_detail.html">
36 <provider selected="true" editor-type-id="text-editor"> 34 <provider selected="true" editor-type-id="text-editor">
37 - <state relative-caret-position="407">  
38 - <caret line="282" column="22" selection-start-line="282" selection-start-column="22" selection-end-line="282" selection-end-column="22" />  
39 - <folding>  
40 - <element signature="n#style#0;n#div#2;n#div#4;n#div#0;n#body#0;n#html#0;n#!!top" expanded="true" />  
41 - </folding>  
42 - </state>  
43 - </provider>  
44 - </entry>  
45 - </file>  
46 - <file leaf-file-name="advDetail.css" pinned="false" current-in-tab="false">  
47 - <entry file="file://$PROJECT_DIR$/public/assets/advertising/css/advDetail.css">  
48 - <provider selected="true" editor-type-id="text-editor">  
49 - <state relative-caret-position="305">  
50 - <caret line="40" column="37" selection-start-line="40" selection-start-column="37" selection-end-line="40" selection-end-column="37" /> 35 + <state relative-caret-position="1836">
  36 + <caret line="173" column="12" selection-start-line="173" selection-start-column="12" selection-end-line="173" selection-end-column="12" />
51 </state> 37 </state>
52 </provider> 38 </provider>
53 </entry> 39 </entry>
@@ -55,17 +41,8 @@ @@ -55,17 +41,8 @@
55 <file leaf-file-name="User.php" pinned="false" current-in-tab="false"> 41 <file leaf-file-name="User.php" pinned="false" current-in-tab="false">
56 <entry file="file://$PROJECT_DIR$/application/home/controller/User.php"> 42 <entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
57 <provider selected="true" editor-type-id="text-editor"> 43 <provider selected="true" editor-type-id="text-editor">
58 - <state relative-caret-position="674">  
59 - <caret line="185" column="14" selection-start-line="185" selection-start-column="14" selection-end-line="185" selection-end-column="14" />  
60 - </state>  
61 - </provider>  
62 - </entry>  
63 - </file>  
64 - <file leaf-file-name="User.php" pinned="false" current-in-tab="false">  
65 - <entry file="file://$PROJECT_DIR$/application/home/model/User.php">  
66 - <provider selected="true" editor-type-id="text-editor">  
67 - <state relative-caret-position="238">  
68 - <caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" /> 44 + <state relative-caret-position="3026">
  45 + <caret line="187" column="56" selection-start-line="187" selection-start-column="56" selection-end-line="187" selection-end-column="56" />
69 </state> 46 </state>
70 </provider> 47 </provider>
71 </entry> 48 </entry>
@@ -73,8 +50,8 @@ @@ -73,8 +50,8 @@
73 <file leaf-file-name="Index.php" pinned="false" current-in-tab="false"> 50 <file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
74 <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php"> 51 <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
75 <provider selected="true" editor-type-id="text-editor"> 52 <provider selected="true" editor-type-id="text-editor">
76 - <state relative-caret-position="623">  
77 - <caret line="123" column="52" selection-start-line="123" selection-start-column="52" selection-end-line="123" selection-end-column="52" /> 53 + <state relative-caret-position="2567">
  54 + <caret line="159" column="57" selection-start-line="159" selection-start-column="57" selection-end-line="159" selection-end-column="57" />
78 </state> 55 </state>
79 </provider> 56 </provider>
80 </entry> 57 </entry>
@@ -82,17 +59,17 @@ @@ -82,17 +59,17 @@
82 <file leaf-file-name="Goods.php" pinned="false" current-in-tab="false"> 59 <file leaf-file-name="Goods.php" pinned="false" current-in-tab="false">
83 <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php"> 60 <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
84 <provider selected="true" editor-type-id="text-editor"> 61 <provider selected="true" editor-type-id="text-editor">
85 - <state relative-caret-position="606">  
86 - <caret line="78" column="22" selection-start-line="78" selection-start-column="22" selection-end-line="78" selection-end-column="22" /> 62 + <state relative-caret-position="419">
  63 + <caret line="87" selection-start-line="87" selection-end-line="87" />
87 </state> 64 </state>
88 </provider> 65 </provider>
89 </entry> 66 </entry>
90 </file> 67 </file>
91 - <file leaf-file-name="Question.php" pinned="false" current-in-tab="false"> 68 + <file leaf-file-name="Question.php" pinned="false" current-in-tab="true">
92 <entry file="file://$PROJECT_DIR$/application/home/controller/Question.php"> 69 <entry file="file://$PROJECT_DIR$/application/home/controller/Question.php">
93 <provider selected="true" editor-type-id="text-editor"> 70 <provider selected="true" editor-type-id="text-editor">
94 - <state relative-caret-position="510">  
95 - <caret line="46" column="13" selection-start-line="46" selection-start-column="13" selection-end-line="46" selection-end-column="13" /> 71 + <state relative-caret-position="606">
  72 + <caret line="115" column="16" selection-start-line="115" selection-start-column="16" selection-end-line="115" selection-end-column="16" />
96 </state> 73 </state>
97 </provider> 74 </provider>
98 </entry> 75 </entry>
@@ -100,7 +77,7 @@ @@ -100,7 +77,7 @@
100 <file leaf-file-name="helper.php" pinned="false" current-in-tab="false"> 77 <file leaf-file-name="helper.php" pinned="false" current-in-tab="false">
101 <entry file="file://$PROJECT_DIR$/thinkphp/helper.php"> 78 <entry file="file://$PROJECT_DIR$/thinkphp/helper.php">
102 <provider selected="true" editor-type-id="text-editor"> 79 <provider selected="true" editor-type-id="text-editor">
103 - <state relative-caret-position="289"> 80 + <state relative-caret-position="4352">
104 <caret line="279" column="63" selection-start-line="279" selection-start-column="56" selection-end-line="279" selection-end-column="63" /> 81 <caret line="279" column="63" selection-start-line="279" selection-start-column="56" selection-end-line="279" selection-end-column="63" />
105 </state> 82 </state>
106 </provider> 83 </provider>
@@ -137,11 +114,14 @@ @@ -137,11 +114,14 @@
137 <find>sun_05</find> 114 <find>sun_05</find>
138 <find>collect_img</find> 115 <find>collect_img</find>
139 <find>bottom_collect</find> 116 <find>bottom_collect</find>
140 - <find>quest_ans</find>  
141 <find>btn_all</find> 117 <find>btn_all</find>
142 <find>btn_msg</find> 118 <find>btn_msg</find>
143 - <find>quest_condition</find>  
144 <find>detail_qust</find> 119 <find>detail_qust</find>
  120 + <find>right_btn</find>
  121 + <find>new_time</find>
  122 + <find>is_where_satisfy</find>
  123 + <find>quest_ans</find>
  124 + <find>quest_condition</find>
145 </findStrings> 125 </findStrings>
146 <replaceStrings> 126 <replaceStrings>
147 <replace /> 127 <replace />
@@ -153,7 +133,6 @@ @@ -153,7 +133,6 @@
153 <component name="IdeDocumentHistory"> 133 <component name="IdeDocumentHistory">
154 <option name="CHANGED_PATHS"> 134 <option name="CHANGED_PATHS">
155 <list> 135 <list>
156 - <option value="$PROJECT_DIR$/application/admin/view/user_money_log/index.html" />  
157 <option value="$PROJECT_DIR$/application/admin/controller/UserMoneyLog.php" /> 136 <option value="$PROJECT_DIR$/application/admin/controller/UserMoneyLog.php" />
158 <option value="$PROJECT_DIR$/public/assets/js/backend/user_money_log.js" /> 137 <option value="$PROJECT_DIR$/public/assets/js/backend/user_money_log.js" />
159 <option value="$PROJECT_DIR$/application/admin/view/user_money_log_audit/index.html" /> 138 <option value="$PROJECT_DIR$/application/admin/view/user_money_log_audit/index.html" />
@@ -199,11 +178,12 @@ @@ -199,11 +178,12 @@
199 <option value="$PROJECT_DIR$/application/home/view/user/authorization_view.html" /> 178 <option value="$PROJECT_DIR$/application/home/view/user/authorization_view.html" />
200 <option value="$PROJECT_DIR$/application/common/controller/WechatBase.php" /> 179 <option value="$PROJECT_DIR$/application/common/controller/WechatBase.php" />
201 <option value="$PROJECT_DIR$/application/home/controller/Collect.php" /> 180 <option value="$PROJECT_DIR$/application/home/controller/Collect.php" />
202 - <option value="$PROJECT_DIR$/application/home/controller/Index.php" />  
203 - <option value="$PROJECT_DIR$/application/home/controller/Goods.php" />  
204 <option value="$PROJECT_DIR$/public/assets/advertising/css/advDetail.css" /> 181 <option value="$PROJECT_DIR$/public/assets/advertising/css/advDetail.css" />
  182 + <option value="$PROJECT_DIR$/application/home/controller/Index.php" />
205 <option value="$PROJECT_DIR$/application/home/controller/User.php" /> 183 <option value="$PROJECT_DIR$/application/home/controller/User.php" />
  184 + <option value="$PROJECT_DIR$/application/home/controller/Goods.php" />
206 <option value="$PROJECT_DIR$/application/home/view/goods/content_detail.html" /> 185 <option value="$PROJECT_DIR$/application/home/view/goods/content_detail.html" />
  186 + <option value="$PROJECT_DIR$/application/home/controller/Question.php" />
207 </list> 187 </list>
208 </option> 188 </option>
209 </component> 189 </component>
@@ -461,28 +441,8 @@ @@ -461,28 +441,8 @@
461 <workItem from="1572223206994" duration="28857000" /> 441 <workItem from="1572223206994" duration="28857000" />
462 <workItem from="1572309778506" duration="26117000" /> 442 <workItem from="1572309778506" duration="26117000" />
463 <workItem from="1572395935540" duration="28313000" /> 443 <workItem from="1572395935540" duration="28313000" />
464 - <workItem from="1572483209367" duration="27197000" />  
465 - </task>  
466 - <task id="LOCAL-00010" summary="调试授权">  
467 - <created>1571979769963</created>  
468 - <option name="number" value="00010" />  
469 - <option name="presentableId" value="LOCAL-00010" />  
470 - <option name="project" value="LOCAL" />  
471 - <updated>1571979769963</updated>  
472 - </task>  
473 - <task id="LOCAL-00011" summary="调试授权">  
474 - <created>1572329583925</created>  
475 - <option name="number" value="00011" />  
476 - <option name="presentableId" value="LOCAL-00011" />  
477 - <option name="project" value="LOCAL" />  
478 - <updated>1572329583925</updated>  
479 - </task>  
480 - <task id="LOCAL-00012" summary="调试授权">  
481 - <created>1572329761583</created>  
482 - <option name="number" value="00012" />  
483 - <option name="presentableId" value="LOCAL-00012" />  
484 - <option name="project" value="LOCAL" />  
485 - <updated>1572329761584</updated> 444 + <workItem from="1572483209367" duration="35426000" />
  445 + <workItem from="1572568391799" duration="2840000" />
486 </task> 446 </task>
487 <task id="LOCAL-00013" summary="证书"> 447 <task id="LOCAL-00013" summary="证书">
488 <created>1572331840264</created> 448 <created>1572331840264</created>
@@ -806,27 +766,48 @@ @@ -806,27 +766,48 @@
806 <option name="project" value="LOCAL" /> 766 <option name="project" value="LOCAL" />
807 <updated>1572507400807</updated> 767 <updated>1572507400807</updated>
808 </task> 768 </task>
809 - <option name="localTasksCounter" value="59" /> 769 + <task id="LOCAL-00059" summary="广告详情">
  770 + <created>1572519039581</created>
  771 + <option name="number" value="00059" />
  772 + <option name="presentableId" value="LOCAL-00059" />
  773 + <option name="project" value="LOCAL" />
  774 + <updated>1572519039582</updated>
  775 + </task>
  776 + <task id="LOCAL-00060" summary="广告详情">
  777 + <created>1572519147942</created>
  778 + <option name="number" value="00060" />
  779 + <option name="presentableId" value="LOCAL-00060" />
  780 + <option name="project" value="LOCAL" />
  781 + <updated>1572519147942</updated>
  782 + </task>
  783 + <task id="LOCAL-00061" summary="广告详情">
  784 + <created>1572519181391</created>
  785 + <option name="number" value="00061" />
  786 + <option name="presentableId" value="LOCAL-00061" />
  787 + <option name="project" value="LOCAL" />
  788 + <updated>1572519181391</updated>
  789 + </task>
  790 + <option name="localTasksCounter" value="62" />
810 <servers /> 791 <servers />
811 </component> 792 </component>
812 <component name="TimeTrackingManager"> 793 <component name="TimeTrackingManager">
813 - <option name="totallyTimeSpent" value="240735000" /> 794 + <option name="totallyTimeSpent" value="251804000" />
814 </component> 795 </component>
815 <component name="ToolWindowManager"> 796 <component name="ToolWindowManager">
816 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> 797 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
817 <editor active="true" /> 798 <editor active="true" />
818 <layout> 799 <layout>
  800 + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13965885" />
819 <window_info anchor="bottom" id="TODO" order="6" /> 801 <window_info anchor="bottom" id="TODO" order="6" />
820 <window_info anchor="bottom" id="调试" order="7" /> 802 <window_info anchor="bottom" id="调试" order="7" />
  803 + <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
821 <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" weight="0.32997763" /> 804 <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" weight="0.32997763" />
  805 + <window_info anchor="right" id="Database" order="3" />
822 <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" /> 806 <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
823 <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" /> 807 <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
  808 + <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
824 <window_info anchor="bottom" id="Terminal" order="7" weight="0.32997763" /> 809 <window_info anchor="bottom" id="Terminal" order="7" weight="0.32997763" />
825 <window_info anchor="bottom" id="运行" order="7" /> 810 <window_info anchor="bottom" id="运行" order="7" />
826 - <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.1380597" />  
827 - <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />  
828 - <window_info anchor="right" id="Database" order="3" />  
829 - <window_info id="Structure" order="1" side_tool="true" weight="0.25" />  
830 <window_info id="Favorites" order="2" side_tool="true" /> 811 <window_info id="Favorites" order="2" side_tool="true" />
831 <window_info anchor="bottom" id="找到" order="8" weight="0.32997763" /> 812 <window_info anchor="bottom" id="找到" order="8" weight="0.32997763" />
832 <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> 813 <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -841,26 +822,26 @@ @@ -841,26 +822,26 @@
841 </layout> 822 </layout>
842 <layout-to-restore> 823 <layout-to-restore>
843 <window_info anchor="bottom" id="找到" order="14" weight="0.32997763" /> 824 <window_info anchor="bottom" id="找到" order="14" weight="0.32997763" />
844 - <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> 825 + <window_info anchor="bottom" id="运行" order="10" />
845 <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> 826 <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
846 <window_info anchor="bottom" id="Version Control" order="8" show_stripe_button="false" /> 827 <window_info anchor="bottom" id="Version Control" order="8" show_stripe_button="false" />
847 - <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />  
848 <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.1380597" /> 828 <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.1380597" />
849 <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> 829 <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
850 <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> 830 <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
  831 + <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
851 <window_info anchor="bottom" id="TODO" order="6" /> 832 <window_info anchor="bottom" id="TODO" order="6" />
852 - <window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />  
853 <window_info anchor="bottom" id="Run" order="2" /> 833 <window_info anchor="bottom" id="Run" order="2" />
854 - <window_info anchor="bottom" id="运行" order="10" /> 834 + <window_info anchor="bottom" id="Message" order="0" />
855 <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> 835 <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
856 <window_info anchor="right" id="Database" order="3" /> 836 <window_info anchor="right" id="Database" order="3" />
857 <window_info anchor="bottom" id="Terminal" order="11" weight="0.32997763" /> 837 <window_info anchor="bottom" id="Terminal" order="11" weight="0.32997763" />
858 <window_info anchor="bottom" id="Event Log" order="12" side_tool="true" weight="0.32997763" /> 838 <window_info anchor="bottom" id="Event Log" order="12" side_tool="true" weight="0.32997763" />
859 - <window_info anchor="bottom" id="Find" order="1" /> 839 + <window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />
860 <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> 840 <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
861 - <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> 841 + <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
862 <window_info anchor="bottom" id="调试" order="13" /> 842 <window_info anchor="bottom" id="调试" order="13" />
863 - <window_info anchor="bottom" id="Message" order="0" /> 843 + <window_info anchor="bottom" id="Find" order="1" />
  844 + <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
864 <window_info id="Favorites" order="2" side_tool="true" /> 845 <window_info id="Favorites" order="2" side_tool="true" />
865 </layout-to-restore> 846 </layout-to-restore>
866 </component> 847 </component>
@@ -993,9 +974,6 @@ @@ -993,9 +974,6 @@
993 <provider selected="true" editor-type-id="text-editor"> 974 <provider selected="true" editor-type-id="text-editor">
994 <state relative-caret-position="776"> 975 <state relative-caret-position="776">
995 <caret line="178" column="5" lean-forward="true" selection-start-line="82" selection-start-column="4" selection-end-line="178" selection-end-column="5" /> 976 <caret line="178" column="5" lean-forward="true" selection-start-line="82" selection-start-column="4" selection-end-line="178" selection-end-column="5" />
996 - <folding>  
997 - <element signature="e#40#74#0#PHP" expanded="true" />  
998 - </folding>  
999 </state> 977 </state>
1000 </provider> 978 </provider>
1001 </entry> 979 </entry>
@@ -1003,9 +981,6 @@ @@ -1003,9 +981,6 @@
1003 <provider selected="true" editor-type-id="text-editor"> 981 <provider selected="true" editor-type-id="text-editor">
1004 <state relative-caret-position="453"> 982 <state relative-caret-position="453">
1005 <caret line="131" column="44" lean-forward="true" selection-start-line="131" selection-start-column="44" selection-end-line="131" selection-end-column="44" /> 983 <caret line="131" column="44" lean-forward="true" selection-start-line="131" selection-start-column="44" selection-end-line="131" selection-end-column="44" />
1006 - <folding>  
1007 - <element signature="e#40#74#0#PHP" expanded="true" />  
1008 - </folding>  
1009 </state> 984 </state>
1010 </provider> 985 </provider>
1011 </entry> 986 </entry>
@@ -1062,9 +1037,6 @@ @@ -1062,9 +1037,6 @@
1062 <provider selected="true" editor-type-id="text-editor"> 1037 <provider selected="true" editor-type-id="text-editor">
1063 <state relative-caret-position="544"> 1038 <state relative-caret-position="544">
1064 <caret line="37" column="43" selection-start-line="37" selection-start-column="43" selection-end-line="37" selection-end-column="43" /> 1039 <caret line="37" column="43" selection-start-line="37" selection-start-column="43" selection-end-line="37" selection-end-column="43" />
1065 - <folding>  
1066 - <element signature="e#129#163#0#PHP" expanded="true" />  
1067 - </folding>  
1068 </state> 1040 </state>
1069 </provider> 1041 </provider>
1070 </entry> 1042 </entry>
@@ -1075,9 +1047,6 @@ @@ -1075,9 +1047,6 @@
1075 <provider selected="true" editor-type-id="text-editor"> 1047 <provider selected="true" editor-type-id="text-editor">
1076 <state relative-caret-position="578"> 1048 <state relative-caret-position="578">
1077 <caret line="76" column="20" selection-start-line="76" selection-start-column="20" selection-end-line="76" selection-end-column="49" /> 1049 <caret line="76" column="20" selection-start-line="76" selection-start-column="20" selection-end-line="76" selection-end-column="49" />
1078 - <folding>  
1079 - <element signature="e#40#74#0#PHP" expanded="true" />  
1080 - </folding>  
1081 </state> 1050 </state>
1082 </provider> 1051 </provider>
1083 </entry> 1052 </entry>
@@ -1156,9 +1125,6 @@ @@ -1156,9 +1125,6 @@
1156 <provider selected="true" editor-type-id="text-editor"> 1125 <provider selected="true" editor-type-id="text-editor">
1157 <state relative-caret-position="306"> 1126 <state relative-caret-position="306">
1158 <caret line="63" selection-start-line="63" selection-end-line="63" selection-end-column="28" /> 1127 <caret line="63" selection-start-line="63" selection-end-line="63" selection-end-column="28" />
1159 - <folding>  
1160 - <element signature="n#style#0;n#html#0;n#!!top" />  
1161 - </folding>  
1162 </state> 1128 </state>
1163 </provider> 1129 </provider>
1164 </entry> 1130 </entry>
@@ -1171,18 +1137,11 @@ @@ -1171,18 +1137,11 @@
1171 </entry> 1137 </entry>
1172 <entry file="file://$PROJECT_DIR$/thinkphp/helper.php"> 1138 <entry file="file://$PROJECT_DIR$/thinkphp/helper.php">
1173 <provider selected="true" editor-type-id="text-editor"> 1139 <provider selected="true" editor-type-id="text-editor">
1174 - <state relative-caret-position="289"> 1140 + <state relative-caret-position="4352">
1175 <caret line="279" column="63" selection-start-line="279" selection-start-column="56" selection-end-line="279" selection-end-column="63" /> 1141 <caret line="279" column="63" selection-start-line="279" selection-start-column="56" selection-end-line="279" selection-end-column="63" />
1176 </state> 1142 </state>
1177 </provider> 1143 </provider>
1178 </entry> 1144 </entry>
1179 - <entry file="file://$PROJECT_DIR$/application/home/view/index/index.html">  
1180 - <provider selected="true" editor-type-id="text-editor">  
1181 - <state relative-caret-position="476">  
1182 - <caret line="43" column="57" selection-start-line="43" selection-start-column="30" selection-end-line="43" selection-end-column="57" />  
1183 - </state>  
1184 - </provider>  
1185 - </entry>  
1186 <entry file="file://$PROJECT_DIR$/application/home/controller/Collect.php"> 1145 <entry file="file://$PROJECT_DIR$/application/home/controller/Collect.php">
1187 <provider selected="true" editor-type-id="text-editor"> 1146 <provider selected="true" editor-type-id="text-editor">
1188 <state relative-caret-position="527"> 1147 <state relative-caret-position="527">
@@ -1190,60 +1149,64 @@ @@ -1190,60 +1149,64 @@
1190 </state> 1149 </state>
1191 </provider> 1150 </provider>
1192 </entry> 1151 </entry>
1193 - <entry file="file://$PROJECT_DIR$/application/home/controller/Question.php"> 1152 + <entry file="file://$PROJECT_DIR$/application/home/controller/Member.php">
1194 <provider selected="true" editor-type-id="text-editor"> 1153 <provider selected="true" editor-type-id="text-editor">
1195 - <state relative-caret-position="510">  
1196 - <caret line="46" column="13" selection-start-line="46" selection-start-column="13" selection-end-line="46" selection-end-column="13" />  
1197 - </state> 1154 + <state relative-caret-position="-2142" />
1198 </provider> 1155 </provider>
1199 </entry> 1156 </entry>
1200 - <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php"> 1157 + <entry file="file://$PROJECT_DIR$/public/assets/advertising/css/advDetail.css">
1201 <provider selected="true" editor-type-id="text-editor"> 1158 <provider selected="true" editor-type-id="text-editor">
1202 - <state relative-caret-position="606">  
1203 - <caret line="78" column="22" selection-start-line="78" selection-start-column="22" selection-end-line="78" selection-end-column="22" /> 1159 + <state relative-caret-position="305">
  1160 + <caret line="40" column="37" selection-start-line="40" selection-start-column="37" selection-end-line="40" selection-end-column="37" />
1204 </state> 1161 </state>
1205 </provider> 1162 </provider>
1206 </entry> 1163 </entry>
1207 - <entry file="file://$PROJECT_DIR$/application/home/controller/Member.php"> 1164 + <entry file="file://$PROJECT_DIR$/application/home/view/index/index.html">
1208 <provider selected="true" editor-type-id="text-editor"> 1165 <provider selected="true" editor-type-id="text-editor">
1209 - <state relative-caret-position="-2142" /> 1166 + <state relative-caret-position="731">
  1167 + <caret line="43" column="57" selection-start-line="43" selection-start-column="30" selection-end-line="43" selection-end-column="57" />
  1168 + </state>
1210 </provider> 1169 </provider>
1211 </entry> 1170 </entry>
1212 - <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php"> 1171 + <entry file="file://$PROJECT_DIR$/application/home/model/User.php">
1213 <provider selected="true" editor-type-id="text-editor"> 1172 <provider selected="true" editor-type-id="text-editor">
1214 - <state relative-caret-position="623">  
1215 - <caret line="123" column="52" selection-start-line="123" selection-start-column="52" selection-end-line="123" selection-end-column="52" /> 1173 + <state relative-caret-position="238">
  1174 + <caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" />
1216 </state> 1175 </state>
1217 </provider> 1176 </provider>
1218 </entry> 1177 </entry>
1219 - <entry file="file://$PROJECT_DIR$/public/assets/advertising/css/advDetail.css"> 1178 + <entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
1220 <provider selected="true" editor-type-id="text-editor"> 1179 <provider selected="true" editor-type-id="text-editor">
1221 - <state relative-caret-position="305">  
1222 - <caret line="40" column="37" selection-start-line="40" selection-start-column="37" selection-end-line="40" selection-end-column="37" /> 1180 + <state relative-caret-position="3026">
  1181 + <caret line="187" column="56" selection-start-line="187" selection-start-column="56" selection-end-line="187" selection-end-column="56" />
1223 </state> 1182 </state>
1224 </provider> 1183 </provider>
1225 </entry> 1184 </entry>
1226 - <entry file="file://$PROJECT_DIR$/application/home/model/User.php"> 1185 + <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
1227 <provider selected="true" editor-type-id="text-editor"> 1186 <provider selected="true" editor-type-id="text-editor">
1228 - <state relative-caret-position="238">  
1229 - <caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" /> 1187 + <state relative-caret-position="2567">
  1188 + <caret line="159" column="57" selection-start-line="159" selection-start-column="57" selection-end-line="159" selection-end-column="57" />
1230 </state> 1189 </state>
1231 </provider> 1190 </provider>
1232 </entry> 1191 </entry>
1233 - <entry file="file://$PROJECT_DIR$/application/home/controller/User.php"> 1192 + <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
1234 <provider selected="true" editor-type-id="text-editor"> 1193 <provider selected="true" editor-type-id="text-editor">
1235 - <state relative-caret-position="674">  
1236 - <caret line="185" column="14" selection-start-line="185" selection-start-column="14" selection-end-line="185" selection-end-column="14" /> 1194 + <state relative-caret-position="419">
  1195 + <caret line="87" selection-start-line="87" selection-end-line="87" />
1237 </state> 1196 </state>
1238 </provider> 1197 </provider>
1239 </entry> 1198 </entry>
1240 <entry file="file://$PROJECT_DIR$/application/home/view/goods/content_detail.html"> 1199 <entry file="file://$PROJECT_DIR$/application/home/view/goods/content_detail.html">
1241 <provider selected="true" editor-type-id="text-editor"> 1200 <provider selected="true" editor-type-id="text-editor">
1242 - <state relative-caret-position="407">  
1243 - <caret line="282" column="22" selection-start-line="282" selection-start-column="22" selection-end-line="282" selection-end-column="22" />  
1244 - <folding>  
1245 - <element signature="n#style#0;n#div#2;n#div#4;n#div#0;n#body#0;n#html#0;n#!!top" expanded="true" />  
1246 - </folding> 1201 + <state relative-caret-position="1836">
  1202 + <caret line="173" column="12" selection-start-line="173" selection-start-column="12" selection-end-line="173" selection-end-column="12" />
  1203 + </state>
  1204 + </provider>
  1205 + </entry>
  1206 + <entry file="file://$PROJECT_DIR$/application/home/controller/Question.php">
  1207 + <provider selected="true" editor-type-id="text-editor">
  1208 + <state relative-caret-position="606">
  1209 + <caret line="115" column="16" selection-start-line="115" selection-start-column="16" selection-end-line="115" selection-end-column="16" />
1247 </state> 1210 </state>
1248 </provider> 1211 </provider>
1249 </entry> 1212 </entry>
@@ -72,11 +72,27 @@ class Goods extends WechatBase @@ -72,11 +72,27 @@ class Goods extends WechatBase
72 if(empty($user)){ 72 if(empty($user)){
73 $this->error('查无此人'); 73 $this->error('查无此人');
74 } 74 }
  75 + //判断用户是否答过题
  76 + $is_answer = Db::name('user_question_answer')->where(['goods_id'=>$goods_id,'user_id'=>$this->user_id])->find();
  77 + if(empty($is_answer)){
  78 + $data['is_answer'] = 0;//未答过
  79 + }else{
  80 + $data['is_answer'] = 1;//答过题
  81 + }
  82 + //数据回显
  83 + $question = json_decode($data['question'],true);
  84 + foreach($question as $key => $q){
  85 + $user_question_answer = Db::name('user_question_answer')->where(['user_id'=>$this->user_id,'goods_id'=>$goods_id,'question_key'=>$key])->find();
  86 + $question[$key]['answer'] = $user_question_answer;
  87 + //判断答题是否全部正确
  88 +
  89 + }
  90 + $data['question'] = $question;
75 //判断用户是否完成答题条件 91 //判断用户是否完成答题条件
76 if(empty($user['mobile']) || empty($user['name']) || empty($user['card'])){ 92 if(empty($user['mobile']) || empty($user['name']) || empty($user['card'])){
77 - $user['is_satisfy'] = 0; 93 + $user['is_satisfy'] = 0;//不满足
78 }else{ 94 }else{
79 - $user['is_satisfy'] = 1; 95 + $user['is_satisfy'] = 1;//满足
80 } 96 }
81 $this->assign('user',$user); 97 $this->assign('user',$user);
82 $this->assign('data',$data); 98 $this->assign('data',$data);
@@ -104,6 +104,11 @@ class Index extends WechatBase @@ -104,6 +104,11 @@ class Index extends WechatBase
104 $this->success('SUCCESS','',$data); 104 $this->success('SUCCESS','',$data);
105 } 105 }
106 106
  107 + /**
  108 + * 收藏操作
  109 + * @throws \think\Exception
  110 + * @throws \think\exception\PDOException
  111 + */
107 public function collect(){ 112 public function collect(){
108 $type = $this->request->param('type',0,'intval'); 113 $type = $this->request->param('type',0,'intval');
109 $goods_id = $this->request->param('goods_id',0,'intval'); 114 $goods_id = $this->request->param('goods_id',0,'intval');
@@ -126,6 +131,58 @@ class Index extends WechatBase @@ -126,6 +131,58 @@ class Index extends WechatBase
126 $this->success('SUCCESS'); 131 $this->success('SUCCESS');
127 } 132 }
128 133
  134 + /**
  135 + * 判断距离是否满足条件
  136 + * @throws \think\db\exception\DataNotFoundException
  137 + * @throws \think\db\exception\ModelNotFoundException
  138 + * @throws \think\exception\DbException
  139 + */
  140 + public function distance_where(){
  141 + $param = $this->request->param();
  142 + $validate = new \think\Validate([
  143 + 'user_id' => 'require',
  144 + 'longitude' => 'require',
  145 + 'latitude' => 'require',
  146 + 'goods_id' => 'require',
  147 + ]);
  148 + $validate->message([
  149 + 'user_id' => 'user_id参数错误',
  150 + 'longitude.require' => 'longitude参数错误!',
  151 + 'latitude.require' => 'latitude参数错误!',
  152 + 'goods_id.require' => 'goods_id参数错误!',
  153 + ]);
  154 + if (!$validate->check($param)) {
  155 + $this->error($validate->getError());
  156 + }
  157 + $goods = Db::name('goods')->where(['id'=>$param['goods_id']])->find();
  158 + $user = Db::name('user')->where(['id'=>$param['user_id']])->find();
  159 + $user['age'] = getAge($user['birthday']);//年龄
  160 + $distance = distance($goods,$param);//根据两地经纬度获取距离
  161 + $is_distance = 1;
  162 + //判断距离条件是否满足
  163 + if($goods['distance'] != 0){
  164 + if($distance > $goods['distance']){
  165 + $is_distance = 0;
  166 + $this->success('SUCCESS','',['is_where_satisfy'=>$is_distance]);
  167 + }
  168 + }
  169 + //判断性别
  170 + if($goods['sex'] != 0){
  171 + if($user['gender'] == $goods['sex']){
  172 + $is_distance = 0;
  173 + $this->success('SUCCESS','',['is_where_satisfy'=>$is_distance]);
  174 + }
  175 + }
  176 + //判断年龄是否满足
  177 + if($goods['min_age'] != 0 || $goods['max_age'] != 0){
  178 + if($goods['min_age'] <= $user['age'] && $user['age'] <= $goods['max_age']){
  179 + $is_distance = 0;
  180 + $this->success('SUCCESS','',['is_where_satisfy'=>$is_distance]);
  181 + }
  182 + }
  183 + $this->success('SUCCESS','',['is_where_satisfy'=>$is_distance]);
  184 + }
  185 +
129 186
130 187
131 } 188 }
@@ -16,7 +16,7 @@ use think\Db; @@ -16,7 +16,7 @@ use think\Db;
16 class Question extends WechatBase 16 class Question extends WechatBase
17 { 17 {
18 /** 18 /**
19 - * 获取题 19 + * 获取题(废弃)
20 * @throws \think\db\exception\DataNotFoundException 20 * @throws \think\db\exception\DataNotFoundException
21 * @throws \think\db\exception\ModelNotFoundException 21 * @throws \think\db\exception\ModelNotFoundException
22 * @throws \think\exception\DbException 22 * @throws \think\exception\DbException
@@ -86,32 +86,35 @@ class Question extends WechatBase @@ -86,32 +86,35 @@ class Question extends WechatBase
86 * @throws \think\exception\PDOException 86 * @throws \think\exception\PDOException
87 */ 87 */
88 public function push_answer(){ 88 public function push_answer(){
89 - $question_ids = $this->request->param('question_ids'); 89 + $question_keys = $this->request->param('question_key');
90 $answers = $this->request->param('answers'); 90 $answers = $this->request->param('answers');
91 $goods_id = $this->request->param('goods_id',0,'intval'); 91 $goods_id = $this->request->param('goods_id',0,'intval');
92 $user_id = $this->request->param('user_id',0,'intval'); 92 $user_id = $this->request->param('user_id',0,'intval');
93 - if(empty($question_ids) || empty($answers) || empty($types) || empty($goods_id) || empty($user_id)){ 93 + if(empty($question_keys) || empty($answers) || empty($types) || empty($goods_id) || empty($user_id)){
94 $this->error('404'); 94 $this->error('404');
95 } 95 }
96 $user = Db::name('user')->where(['id'=>$user_id])->find();//用户信息 96 $user = Db::name('user')->where(['id'=>$user_id])->find();//用户信息
97 $goods = Db::name('goods')->where(['id'=>$goods_id])->find();//广告信息 97 $goods = Db::name('goods')->where(['id'=>$goods_id])->find();//广告信息
98 - $merchant = Db::name('user')->where(['id'=>$goods['user_id']])->find();//商户信息 98 + $admin = Db::name('admin')->where(['id'=>$goods['admin_id']])->find();//商户信息
99 //判断广告信息是否过期 99 //判断广告信息是否过期
100 if($goods['end_time'] < time()){ 100 if($goods['end_time'] < time()){
101 $this->error('广告已过截止时间'); 101 $this->error('广告已过截止时间');
102 } 102 }
103 Db::startTrans(); 103 Db::startTrans();
104 //清空上次答题记录 104 //清空上次答题记录
105 - $result1 = Db::name('question_user_answer')->where(['user_id'=>$user_id,'goods_id'=>$goods_id,['question_id'=>['in',$question_ids]]])->delete();  
106 - foreach($question_ids as $key => $question_id){  
107 - if(empty($queston_id)){  
108 - $this->error("第".($key+1)."个question_id不能为空"); 105 + $result1 = Db::name('question_user_answer')->where(['user_id'=>$user_id,'goods_id'=>$goods_id])->delete();
  106 + foreach($question_keys as $key => $question_key){
  107 + if(empty($question_key)){
  108 + $this->error("第".($key+1)."个question_key不能为空");
109 } 109 }
110 if(empty($answers[$key])){ 110 if(empty($answers[$key])){
111 $this->error("第".($key+1)."个answer不能为空"); 111 $this->error("第".($key+1)."个answer不能为空");
112 } 112 }
113 //判断是否正确 113 //判断是否正确
114 - $question = Db::name('question')->where(['id'=>$question_id])->find(); 114 + $question = json_decode($goods['question'],true);
  115 + if(empty($question[$question_key])){
  116 +
  117 + }
115 if($question['question_answer'] == $answers[$key]){ 118 if($question['question_answer'] == $answers[$key]){
116 $is_correct = 1; 119 $is_correct = 1;
117 }else{ 120 }else{
@@ -120,7 +123,7 @@ class Question extends WechatBase @@ -120,7 +123,7 @@ class Question extends WechatBase
120 } 123 }
121 $arr['user_id'] = $user_id; 124 $arr['user_id'] = $user_id;
122 $arr['goods_id'] = $goods_id; 125 $arr['goods_id'] = $goods_id;
123 - $arr['question_id'] = $question_id; 126 + $arr['question_id'] = $question_key;
124 $arr['answer'] = $answers[$key]; 127 $arr['answer'] = $answers[$key];
125 $arr['type'] = $question['type']; 128 $arr['type'] = $question['type'];
126 $arr['is_correct'] = $is_correct; 129 $arr['is_correct'] = $is_correct;
@@ -141,7 +144,7 @@ class Question extends WechatBase @@ -141,7 +144,7 @@ class Question extends WechatBase
141 $this->error('您已获得过该广告的奖励'); 144 $this->error('您已获得过该广告的奖励');
142 } 145 }
143 //判断商家余额是否够用 146 //判断商家余额是否够用
144 - if($merchant['money'] < $goods['exp']){ 147 + if($admin['money'] < $goods['exp']){
145 $this->error('商家余额不足'); 148 $this->error('商家余额不足');
146 } 149 }
147 //用户获得奖励 150 //用户获得奖励
@@ -159,10 +162,10 @@ class Question extends WechatBase @@ -159,10 +162,10 @@ class Question extends WechatBase
159 } 162 }
160 $result4 = Db::name('user')->where(['id'=>$user_id])->update(['exp'=>$user['exp']+$goods['exp']]); 163 $result4 = Db::name('user')->where(['id'=>$user_id])->update(['exp'=>$user['exp']+$goods['exp']]);
161 //扣除商家余额 164 //扣除商家余额
162 - $arr2['user_id'] = $merchant['id'];  
163 - $arr2['before_money'] = $merchant['money']; 165 + $arr2['user_id'] = $admin['id'];
  166 + $arr2['before_money'] = $admin['money'];
164 $arr2['money'] = $goods['exp']; 167 $arr2['money'] = $goods['exp'];
165 - $arr2['after_money'] = $merchant['money']-$goods['exp']; 168 + $arr2['after_money'] = $admin['money']-$goods['exp'];
166 $arr2['type'] = 5; 169 $arr2['type'] = 5;
167 $arr2['goods_id'] = $goods_id; 170 $arr2['goods_id'] = $goods_id;
168 $arr2['createtime'] = time(); 171 $arr2['createtime'] = time();
@@ -25,8 +25,7 @@ @@ -25,8 +25,7 @@
25 <div class="detail_qust"> 25 <div class="detail_qust">
26 <div class="quest_box quest_ans"> 26 <div class="quest_box quest_ans">
27 <div class="quest_title">题目</div> 27 <div class="quest_title">题目</div>
28 - {php}$question = json_decode($data['question'],true);{/php}  
29 - {foreach name="$question" item="q"} 28 + {foreach name="$data.question" item="q"}
30 {if condition="$q['question_type'] eq 2"} 29 {if condition="$q['question_type'] eq 2"}
31 <div class="quest_single"> 30 <div class="quest_single">
32 <div class="question"> 31 <div class="question">
@@ -133,146 +132,18 @@ @@ -133,146 +132,18 @@
133 </div> 132 </div>
134 {include file="public/js" /} 133 {include file="public/js" /}
135 <script> 134 <script>
136 - //全局变量  
137 - var goods_id = "{$data.id}";//用户id  
138 - var user_id = "{$user.id}";//广告id  
139 - var is_satisfy = "{$user.is_satisfy}";//是否满足答题条件(用户是否完善信息)  
140 - var is_where_satisfy = 0;//是否满足商户条件  
141 -  
142 - // 观看X时间后出现题  
143 - function init(){  
144 - var contenTimer = null;  
145 - let timer = "{$data.view_time*1000}";  
146 - contenTimer = setInterval(function() {  
147 - $(".detail_qust").show();  
148 - $(".quest_box").removeClass("quest_ans");  
149 - // 重新答题  
150 - $(".error_btn").hide();  
151 - // 未满足答题条件  
152 - // $(".quest_condition").hide();  
153 - $(".detail_top").css("margin-bottom", "0");  
154 - clearInterval(contenTimer);  
155 - }, timer);  
156 - }  
157 -  
158 - function showQuest() {  
159 - // 是否满足答题条件  
160 - var satisfy = 2;  
161 - if (satisfy == 1) {  
162 - // 满足  
163 - $(".quest_ans").show()  
164 - } else {  
165 - $(".quest_condition").show()  
166 - }  
167 - };  
168 -  
169 - // 判断是否完善信息  
170 - var either = 1;  
171 - if (either == 1) {  
172 - // 未完善信息  
173 - $(".btn_msg").click(function() {  
174 - window.location.href = "personalMsg.html"  
175 - })  
176 - } else {  
177 - $(".btn_msg").addClass("btn_all");  
178 - }  
179 -  
180 - // 查看更多 完善信息  
181 - $(".btn_more").click(function() {  
182 - window.location.href = "{:url('home/index/index')}"  
183 - })  
184 -  
185 - // 选择答案  
186 - $(".ans_single").click(function() {  
187 - $(this).find(".answer_word").addClass("choice_ans");  
188 - $(this).find(".choice_img").attr("src", "__CDN__/assets/advertising/img/sun_07@2x.png");  
189 - $(this).siblings().find(".answer_word").removeClass("choice_ans");  
190 - $(this).siblings().find(".choice_img").attr("src", "__CDN__/assets/advertising/img/sun_06@2x.png");  
191 - })  
192 -  
193 -  
194 -  
195 - // 提交答案  
196 - function submit() {  
197 - $(".adv_detail").css('height', "100vh")  
198 - $(".submit_modal").show();  
199 - $(".submit_modal_box").show();  
200 - }  
201 - // 查看更多 答题错误  
202 - function checkMore() {  
203 - // 弹窗消失  
204 - $(".adv_detail").css('height', "auto");  
205 - $(".submit_modal").hide();  
206 - $(".submit_modal_box").hide();  
207 - // 重新答题  
208 - $(".error_btn").show();  
209 - $(".right_btn").hide();  
210 - // 重新答题倒计时  
211 - let newTime = 300;  
212 - let newTimer = setInterval(function() {  
213 - newTime--;  
214 - $(".new_time").text(changeTime(newTime));  
215 - if (newTime == 0) {  
216 - clearInterval(newTimer);  
217 - window.location.reload();  
218 - }  
219 - }, 1000);  
220 - }  
221 -  
222 -  
223 - 135 + $(function(){
  136 + //全局变量
  137 + var goods_id = "{$data.id}";//用户id
  138 + var user_id = "{$user.id}";//广告id
  139 + var is_satisfy = "{$user.is_satisfy}";//是否满足答题条件(用户是否完善信息)
  140 + var is_where_satisfy = '';//是否满足商户条件
224 141
225 - // 底部链接跳转  
226 - function Jump() {  
227 - var webSite = $(".jump_a").text();  
228 - window.location.href = webSite;  
229 - };  
230 142
231 - // 是否收藏  
232 - $(".bottom_collect").click(function() {  
233 - var img = $('.collect_img').find('img').attr('src');  
234 - var type = '';  
235 - if(img == '/assets/advertising/img/sun_08@2x.png'){  
236 - //取消收藏操作  
237 - type = 2;  
238 - }else if(img == '/assets/advertising/img/sun_05@2x.png'){  
239 - //收藏操作  
240 - type = 1;  
241 - }  
242 - $.ajax({  
243 - url:"{:url('home/index/collect')}",  
244 - type:"POST",  
245 - data:{'type':type,'goods_id':goods_id,'user_id':user_id},  
246 - success:function(res){  
247 - if(res.code == 1){  
248 - toast('操作成功');  
249 - if (type == 1) {  
250 - // 收藏  
251 - let url = "__CDN__/assets/advertising/img/sun_08@2x.png";  
252 - $(".collect_img_link").attr("src", url);  
253 - $(".bottom_collect").css("color", "#FB7A17");  
254 - } else {  
255 - let url = "__CDN__/assets/advertising/img/sun_05@2x.png";  
256 - $(".collect_img_link").attr("src", url);  
257 - $(".bottom_collect").css("color", "#BDC4CE");  
258 - }  
259 - }else{  
260 - toast('与服务器断开连接');  
261 - }  
262 - },  
263 - error:function(res){  
264 - toast('与服务器断开连接');  
265 - }  
266 - });  
267 - });  
268 - </script>  
269 - <script>  
270 - $(function(){  
271 var city = ''; 143 var city = '';
272 var lat = ''; 144 var lat = '';
273 var lng = ''; 145 var lng = '';
274 //定位当前位置 146 //定位当前位置
275 - // 地图定位  
276 var geolocation = new qq.maps.Geolocation("LQNBZ-F3L34-EQMUR-DILMD-LBR4Q-GDFOH", "myapp"); 147 var geolocation = new qq.maps.Geolocation("LQNBZ-F3L34-EQMUR-DILMD-LBR4Q-GDFOH", "myapp");
277 var positionNum = 0; 148 var positionNum = 0;
278 var options = { 149 var options = {
@@ -280,10 +151,10 @@ @@ -280,10 +151,10 @@
280 }; 151 };
281 152
282 function showPosition(position) { 153 function showPosition(position) {
283 - alert(JSON.stringify(position));  
284 city = position.city; //城市 154 city = position.city; //城市
285 lat = position.lat; //经度 155 lat = position.lat; //经度
286 lng = position.lng; //纬度 156 lng = position.lng; //纬度
  157 + //保存到用户表
287 $.ajax({ 158 $.ajax({
288 url:"{:url('home/user/location')}", 159 url:"{:url('home/user/location')}",
289 type:"POST", 160 type:"POST",
@@ -298,18 +169,157 @@ @@ -298,18 +169,157 @@
298 error:function(res){ 169 error:function(res){
299 toast('与服务器断开连接') 170 toast('与服务器断开连接')
300 } 171 }
301 - }) 172 + });
  173 + //判断商户条件是否满足
  174 + $.ajax({
  175 + url:"{:url('home/index/distance_where')}",
  176 + type:"POST",
  177 + data:{'user_id':user_id,'longitude':lng,'latitude':lat,'goods_id':goods_id},
  178 + success:function(res){
  179 + if(res.code == 1){
  180 + is_where_satisfy = res.data.is_where_satisfy;
  181 + if (is_satisfy == '1' && is_where_satisfy == '1') {
  182 + init();
  183 + }else{
  184 + $(".quest_condition").show();
  185 + }
  186 + }else{
  187 + toast('与服务器断开连接')
  188 + }
  189 + },
  190 + error:function(){
  191 + toast('与服务器断开连接');
  192 + }
  193 + });
302 } 194 }
303 195
304 function showErr() { 196 function showErr() {
305 toast('定位失败'); 197 toast('定位失败');
306 }; 198 };
307 - $(function() {  
308 - //定位  
309 - geolocation.getLocation(showPosition, showErr, options); 199 + //定位
  200 + geolocation.getLocation(showPosition, showErr, options);
  201 +
  202 +
  203 +
  204 +
  205 + // 观看X时间后出现题
  206 + function init(){
  207 + var contenTimer = null;
  208 + let timer = "{$data.view_time*1000}";
  209 + contenTimer = setInterval(function() {
  210 + $(".detail_qust").show();
  211 + $(".quest_box").removeClass("quest_ans");
  212 + // 重新答题
  213 + $(".error_btn").hide();
  214 + // 未满足答题条件
  215 + // $(".quest_condition").hide();
  216 + $(".detail_top").css("margin-bottom", "0");
  217 + clearInterval(contenTimer);
  218 + }, timer);
  219 + }
  220 +
  221 + /*// 判断是否完善信息
  222 + var either = 1;
  223 + if (either == 1) {
  224 + // 未完善信息
  225 + $(".btn_msg").click(function() {
  226 + window.location.href = "personalMsg.html"
  227 + })
  228 + } else {
  229 + $(".btn_msg").addClass("btn_all");
  230 + }*/
  231 +
  232 + // 查看更多
  233 + $(".btn_more").click(function() {
  234 + window.location.href = "{:url('home/index/index')}"
  235 + })
  236 +
  237 + // 选择答案
  238 + $(".ans_single").click(function() {
  239 + $(this).find(".answer_word").addClass("choice_ans");
  240 + $(this).find(".choice_img").attr("src", "__CDN__/assets/advertising/img/sun_07@2x.png");
  241 + $(this).siblings().find(".answer_word").removeClass("choice_ans");
  242 + $(this).siblings().find(".choice_img").attr("src", "__CDN__/assets/advertising/img/sun_06@2x.png");
  243 + });
  244 +
  245 +
  246 +
  247 + // 提交答案
  248 + function submit() {
  249 + $(".adv_detail").css('height', "100vh")
  250 + $(".submit_modal").show();
  251 + $(".submit_modal_box").show();
  252 + }
  253 + // 查看更多 答题错误
  254 + function checkMore() {
  255 + // 弹窗消失
  256 + $(".adv_detail").css('height', "auto");
  257 + $(".submit_modal").hide();
  258 + $(".submit_modal_box").hide();
  259 + // 重新答题
  260 + $(".error_btn").show();
  261 + $(".right_btn").hide();
  262 + // 重新答题倒计时
  263 + let newTime = 300;
  264 + let newTimer = setInterval(function() {
  265 + newTime--;
  266 + $(".new_time").text(changeTime(newTime));
  267 + if (newTime == 0) {
  268 + clearInterval(newTimer);
  269 + window.location.reload();
  270 + }
  271 + }, 1000);
  272 + }
  273 +
  274 +
  275 +
  276 +
  277 + // 底部链接跳转
  278 + function Jump() {
  279 + var webSite = $(".jump_a").text();
  280 + window.location.href = webSite;
  281 + };
  282 +
  283 + // 是否收藏
  284 + $(".bottom_collect").click(function() {
  285 + var img = $('.collect_img').find('img').attr('src');
  286 + var type = '';
  287 + if(img == '/assets/advertising/img/sun_08@2x.png'){
  288 + //取消收藏操作
  289 + type = 2;
  290 + }else if(img == '/assets/advertising/img/sun_05@2x.png'){
  291 + //收藏操作
  292 + type = 1;
  293 + }
  294 + $.ajax({
  295 + url:"{:url('home/index/collect')}",
  296 + type:"POST",
  297 + data:{'type':type,'goods_id':goods_id,'user_id':user_id},
  298 + success:function(res){
  299 + if(res.code == 1){
  300 + toast('操作成功');
  301 + if (type == 1) {
  302 + // 收藏
  303 + let url = "__CDN__/assets/advertising/img/sun_08@2x.png";
  304 + $(".collect_img_link").attr("src", url);
  305 + $(".bottom_collect").css("color", "#FB7A17");
  306 + } else {
  307 + let url = "__CDN__/assets/advertising/img/sun_05@2x.png";
  308 + $(".collect_img_link").attr("src", url);
  309 + $(".bottom_collect").css("color", "#BDC4CE");
  310 + }
  311 + }else{
  312 + toast('与服务器断开连接');
  313 + }
  314 + },
  315 + error:function(res){
  316 + toast('与服务器断开连接');
  317 + }
  318 + });
310 }); 319 });
311 - }); 320 + })
312 </script> 321 </script>
  322 +
313 </body> 323 </body>
314 324
315 325
@@ -180,7 +180,7 @@ input:disabled { @@ -180,7 +180,7 @@ input:disabled {
180 /* 导航栏 */ 180 /* 导航栏 */
181 181
182 .nav { 182 .nav {
183 - position: fixed; 183 + /*position: fixed;*/
184 bottom: 0; 184 bottom: 0;
185 left: 0; 185 left: 0;
186 width: 100%; 186 width: 100%;