Browse Source

同步代码

zjm 5 years ago
parent
commit
0552fa850d

+ 10 - 0
src/main/java/com/yingying/tourist/domain/Config.java

@@ -0,0 +1,10 @@
1
+package com.yingying.tourist.domain;
2
+
3
+import lombok.Data;
4
+
5
+@Data
6
+public class Config {
7
+
8
+    private String configKey;
9
+    private String configValue;
10
+}

+ 1 - 0
src/main/java/com/yingying/tourist/domain/Question.java

@@ -10,4 +10,5 @@ public class Question {
10 10
     private String resultDestination;
11 11
     private String resultOutter;
12 12
     private String resultInner;
13
+    private String resultUrl;
13 14
 }

+ 7 - 0
src/main/java/com/yingying/tourist/mapper/ConfigMapper.java

@@ -0,0 +1,7 @@
1
+package com.yingying.tourist.mapper;
2
+
3
+import com.baomidou.mybatisplus.mapper.BaseMapper;
4
+import com.yingying.tourist.domain.Config;
5
+
6
+public interface ConfigMapper extends BaseMapper<Config> {
7
+}

+ 7 - 0
src/main/java/com/yingying/tourist/service/ConfigService.java

@@ -0,0 +1,7 @@
1
+package com.yingying.tourist.service;
2
+
3
+import com.baomidou.mybatisplus.service.IService;
4
+import com.yingying.tourist.domain.Config;
5
+
6
+public interface ConfigService extends IService<Config> {
7
+}

+ 10 - 0
src/main/java/com/yingying/tourist/service/impl/ConfigServiceImpl.java

@@ -0,0 +1,10 @@
1
+package com.yingying.tourist.service.impl;
2
+
3
+import com.yingying.tourist.domain.Config;
4
+import com.yingying.tourist.mapper.ConfigMapper;
5
+import com.yingying.tourist.service.ConfigService;
6
+import org.springframework.stereotype.Service;
7
+
8
+@Service
9
+public class ConfigServiceImpl extends BaseServiceImpl<ConfigMapper, Config> implements ConfigService {
10
+}

+ 2 - 0
src/main/java/com/yingying/tourist/vo/QuestionVo.java

@@ -11,4 +11,6 @@ public class QuestionVo {
11 11
     private String resultInner;
12 12
     private String resultIdentity;
13 13
     private String resultDescribe;
14
+    private String resultUrl;
15
+    private Boolean show;
14 16
 }

+ 9 - 3
src/main/java/com/yingying/tourist/web/QuestionController.java

@@ -3,10 +3,12 @@ package com.yingying.tourist.web;
3 3
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
4 4
 import com.yingying.tourist.business.BusinessConstant;
5 5
 import com.yingying.tourist.common.Util;
6
+import com.yingying.tourist.domain.Config;
6 7
 import com.yingying.tourist.domain.Question;
7 8
 import com.yingying.tourist.domain.User;
8 9
 import com.yingying.tourist.exception.ErrorCode;
9 10
 import com.yingying.tourist.result.MessageResult;
11
+import com.yingying.tourist.service.ConfigService;
10 12
 import com.yingying.tourist.service.QuestionService;
11 13
 import com.yingying.tourist.service.UserService;
12 14
 import com.yingying.tourist.vo.QuestionVo;
@@ -15,9 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
15 17
 import org.springframework.web.bind.annotation.GetMapping;
16 18
 import org.springframework.web.bind.annotation.RestController;
17 19
 
18
-import java.util.Arrays;
19
-import java.util.List;
20
-
21 20
 @RestController
22 21
 public class QuestionController {
23 22
 
@@ -27,6 +26,9 @@ public class QuestionController {
27 26
     @Autowired
28 27
     private UserService userService;
29 28
 
29
+    @Autowired
30
+    private ConfigService configService;
31
+
30 32
     @GetMapping("question/pick")
31 33
     public MessageResult<QuestionVo> question(String openid, String pick){
32 34
         if (Util.isNull(pick)) {
@@ -43,6 +45,10 @@ public class QuestionController {
43 45
         questionVo.setResultDestinationInfo(BusinessConstant.destinationMap.get(question.getResultOrder()));
44 46
         questionVo.setResultDescribe(BusinessConstant.describeMap.get(Util.getRandomInt(1,16)));
45 47
         questionVo.setResultIdentity(BusinessConstant.Identity.getValue(pickLast));
48
+        EntityWrapper<Config> configWrapper = new EntityWrapper<>();
49
+        configWrapper.eq("config_key", "h5_supernatant_show");
50
+        Config config = configService.selectOne(configWrapper);
51
+        questionVo.setShow("1".equals(config.getConfigValue()));
46 52
         if (Util.isNotNull(openid)) {
47 53
             EntityWrapper<User> userWrapper = new EntityWrapper<>();
48 54
             userWrapper.eq("openid", openid);

+ 1 - 0
src/main/resources/static/MP_verify_2KP7us2u8AdBTknC.txt

@@ -0,0 +1 @@
1
+2KP7us2u8AdBTknC

File diff suppressed because it is too large
+ 78 - 381
src/main/resources/static/css/bske.css


BIN
src/main/resources/static/img/1.png


BIN
src/main/resources/static/img/ban.png


BIN
src/main/resources/static/img/e.png


BIN
src/main/resources/static/img/icon.jpg


BIN
src/main/resources/static/img/subTitle.png


+ 1 - 31
src/main/resources/templates/index.html

@@ -18,8 +18,7 @@
18 18
 <script type="text/javascript" src='js/test.js'></script>
19 19
 </head>
20 20
 <body>
21
-<div class="content">
22
-	<div class="index">
21
+<div class="con">
23 22
 		<div class="centerWhite"></div>
24 23
 		<div class="centerBg"></div>
25 24
 		<div class="indecBottom"></div>
@@ -36,40 +35,11 @@
36 35
 				<span class="btnBg"></span>
37 36
 			</div>
38 37
 		</div>
39
-	</div>
40 38
 </div>
41 39
 <script type="text/javascript">
42
-	// init.showIndicator();
43 40
 	$(".testBtn").on("click",function(e){
44 41
 		window.location.href='subject';
45 42
 	});
46
-
47
-	// function getUrlParms(name){
48
-	//    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
49
-	//    var r = window.location.search.substr(1).match(reg);
50
-	//    if(r!=null) return unescape(r[2]); return null;
51
-	// }
52
-	// var code = getUrlParms("code");
53
-	// var code = '011ByPSv02OZqj1eVBTv07X0Tv0ByPSj'
54
-	// var openId = '';
55
-	// $.ajax({  
56
- //        type:'get',  
57
- //        url : init.url+'code?code='+code,  
58
- //        dataType:'JSON',
59
- //        contentType:"application/json; charset=utf-8",
60
- //        success:function(data) {  
61
- //            console.log(data);  
62
- //            openId = data.data
63
- //            init.hideIndicator();
64
- //        },  
65
- //        error:function() {  
66
- //            // alert('fail');  
67
- //            init.hideIndicator();
68
- //        }  
69
- //    }); 
70
-    // setTimeout(function(){
71
-    // 	init.hideIndicator();
72
-    // },2000)
73 43
 </script>
74 44
 </body>
75 45
 

File diff suppressed because it is too large
+ 75 - 41
src/main/resources/templates/testShare.html


+ 17 - 2
src/main/resources/templates/textSubject.html

@@ -18,7 +18,7 @@
18 18
 <script type="text/javascript" src='js/test.js'></script>
19 19
 </head>
20 20
 <body>
21
-<div class="content">
21
+<div class="con">
22 22
 	<div class="subBg"></div>
23 23
 	<div class="sub">
24 24
 		<img class="subTitle" src="img/subTitle.png" />
@@ -64,6 +64,20 @@
64 64
 </div>
65 65
 <script type="text/javascript">
66 66
 	$(function(){
67
+		function onBridgeReady(){
68
+		   WeixinJSBridge.call('hideToolbar');
69
+		}
70
+		if (typeof WeixinJSBridge == "undefined"){
71
+		    if( document.addEventListener ){
72
+		        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
73
+		    }else if (document.attachEvent){
74
+		        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
75
+		        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
76
+		    }
77
+		}else{
78
+		    onBridgeReady();
79
+		}
80
+
67 81
 		var index = 0,pick = '',pickCol = '';
68 82
 		$("#subBtn").on("click",function(e){
69 83
 			if(pickCol != ''){
@@ -82,8 +96,9 @@
82 96
 		});
83 97
 		$("#submit").on("click",function(e){
84 98
 			if(pickCol != ''){
85
-				pick = pick +','+pickCol
99
+				pick = pick +','+pickCol;
86 100
 				window.location.href='shared?pick='+pick;
101
+				index = 0,pick = '',pickCol = '';
87 102
 			}
88 103
 		});
89 104
 		$(".choice").on("click",function(e){