baibx месяцев назад: 8
Родитель
Сommit
61a173b8f0

+ 54 - 18
com.sharemao.core.task/src/main/java/com/sharemao/core/task/iot2/ct/CTAPI.java

@@ -42,24 +42,7 @@ public class CTAPI
42 42
 	
43 43
 	public static void main(String[] args) 
44 44
 	{
45
-//		String url="http://pushdata-java.china-m2m.com/apigateway/job/api/getToken?source=232&key=b7d6afe944ea4dcb828eaa39d77cc231";
46
-//		String html=HttpUtil.get(url);
47
-//		System.out.println(html);
48
-//		JSONObject resJson = JSONObject.parseObject(html);
49
-//		if(resJson.getIntValue("code")==1)
50
-//		{
51
-//			String token=resJson.getString("token");
52
-//			System.out.println(token);
53
-//			int ttl=resJson.getIntValue("ttl");
54
-//			System.out.println(ttl);
55
-//		}
56 45
 
57
-//		String token=getToken(42);
58
-//		String content=quicksm(token,"89860861192580060550",42);
59
-//		System.out.println(content);
60
-
61
-
62
-        zysm("898604F61925C0225986",null);
63 46
 	}
64 47
 	
65 48
 	public static String getToken(int index)
@@ -243,6 +226,54 @@ public class CTAPI
243 226
             if (code.equals("200") && data != null) {
244 227
                 token = data.getString("token");
245 228
             }
229
+        }
230
+        if(index==68 || index==69 || index==84)//铂明
231
+        {
232
+            String openId;
233
+            String appId;
234
+            String channelId;
235
+            if (index==68) {
236
+                appId="C5010100A23100111720247";
237
+                openId="GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
238
+                channelId="236";
239
+            } else if (index==69){
240
+                appId="C5010531Aq5201817914";
241
+                openId="GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
242
+                channelId="216";
243
+            } else {
244
+                openId = "GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
245
+                appId = "C5010250AIOT2022111118533438412";
246
+                channelId = "237";
247
+            }
248
+            String times = String.valueOf(System.currentTimeMillis()/1000);
249
+            Map<String, String> receivedData = new HashMap<>();
250
+            receivedData.put("appId", appId);
251
+            receivedData.put("channelId", channelId);
252
+            receivedData.put("times", times);
253
+            TreeMap<String, String> sortedData = new TreeMap<>(receivedData);
254
+            // 构建待签名字符串
255
+            StringBuilder stringA = new StringBuilder();
256
+            stringA.append(openId);
257
+            for (Map.Entry<String, String> entry : sortedData.entrySet()) {
258
+                String key = entry.getKey();
259
+                String value = entry.getValue();
260
+                if (value != null && !value.isEmpty()) {
261
+                    stringA.append(key).append(value);
262
+                }
263
+            }
264
+            // 拼接key,并进行sha1 运算
265
+            stringA.append(openId);
266
+            String sign = sha1(stringA.toString()).toUpperCase();
267
+            String url="http://db.jinmaiiot.com:7021/api/external/getToken?appId="+appId+"&openId="+openId+"&times="+times+"&sign="+sign+"&channelId="+channelId;
268
+            String content=HttpUtil.get(url);
269
+            log.info(content);
270
+            JSONObject resJson = JSONObject.parseObject(content);
271
+            JSONArray result = resJson.getJSONArray("result");
272
+            if(result!=null&&result.size()>0)
273
+            {
274
+                JSONObject data = result.getJSONObject(0);
275
+                token = data.getString("token");
276
+            }
246 277
         }
247 278
 		return token;
248 279
 	}
@@ -354,7 +385,12 @@ public class CTAPI
354 385
 	{
355 386
 		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
356 387
 		Operator op=account.get(index);
357
-		String appid=op.getUser();
388
+		String appid;
389
+        if (op!=null){
390
+            appid=op.getUser();
391
+        } else {
392
+            appid="1";
393
+        }
358 394
 		
359 395
 		String re="未实名";
360 396
 		String url="https://api.iot.10086.cn/v5/ec/query/sim-real-name-status?transid="+appid+"&token="+token+"&iccid="+iccid;

+ 83 - 0
com.sharemao.core.task/src/main/java/com/sharemao/core/task/iot2/ct/RealNameV2.java

@@ -0,0 +1,83 @@
1
+package com.sharemao.core.task.iot2.ct;
2
+
3
+import com.nianzai.base.dao.util.DAOHelper;
4
+import com.sharemao.core.task.iot.bw.BW;
5
+import org.apache.commons.logging.Log;
6
+import org.apache.commons.logging.LogFactory;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+import java.util.Objects;
11
+
12
+public class RealNameV2 {
13
+
14
+	private static final Log log = LogFactory.getLog(RealNameV2.class);
15
+	
16
+	public static void main(String[] args) 
17
+	{
18
+
19
+        realname();
20
+    }
21
+
22
+    public static void realname()
23
+	{
24
+	 	String sql="select * from iccid_to_realname";
25
+	   	List<Map<String,Object>> simlist=DAOHelper.find("mifi", sql);
26
+		if(simlist!=null && simlist.size()>0)
27
+		{
28
+			int k=0;
29
+			for(Map<String,Object> m:simlist)
30
+			{
31
+				String iccid=m.get("iccid").toString();
32
+				int kasid=Integer.parseInt(m.get("kasid").toString());
33
+                String token=CTAPI.getToken(kasid);
34
+				if (kasid==27) {
35
+					iccid = iccid.toUpperCase();
36
+				}
37
+				String resettm=m.get("resettm")==null?"":m.get("resettm").toString();
38
+				String status;
39
+                if (kasid==59){
40
+                    status = CTAPI.zysm(iccid,resettm);
41
+                } else if(kasid==23 || kasid==25 || kasid==26 || kasid==46 || kasid==47 || kasid==50 || kasid==66 || kasid==67){
42
+                    status = BW.getRealname(iccid,resettm);
43
+                } else {
44
+                    status =CTAPI.sm(token, iccid,kasid,resettm);
45
+                }
46
+
47
+				int i=0;
48
+				while("TOKEN不存在或已过期,请重新获取".equals(status))
49
+				{
50
+					i+=1;
51
+					try {
52
+						Thread.sleep(30000);
53
+					} catch (InterruptedException e) {
54
+						e.printStackTrace();
55
+					}
56
+					token=CTAPI.getToken(kasid);
57
+                    if (kasid==59){
58
+                        status = CTAPI.zysm(iccid,resettm);
59
+                    } else if(kasid==23 || kasid==25 || kasid==26 || kasid==46 || kasid==47 || kasid==50 || kasid==66 || kasid==67 || kasid==89 || kasid==90){
60
+                        status = BW.getRealname(iccid,resettm);
61
+                    } else {
62
+                        status = CTAPI.sm(token, iccid, kasid, resettm);
63
+                    }
64
+					if (i==10) {
65
+						break;
66
+					}
67
+				}
68
+
69
+				log.info("kasid="+kasid+",iccid="+iccid+",status="+status);
70
+
71
+				if(!"TOKEN不存在或已过期,请重新获取".equals(status)) {
72
+					String up="update iccidtemp set realstate='"+status+"' where iccid='"+iccid+"'";
73
+					DAOHelper.execute("ufiiccid", up);
74
+                    if ("已实名".equals(status)) {
75
+                        String del = "delete from iccid_to_realname where iccid='" + iccid + "'";
76
+                        DAOHelper.execute("mifi", del);
77
+                    }
78
+				}
79
+				k++;
80
+			}
81
+		}
82
+	}
83
+}

+ 48 - 0
com.sharemao.web.fe/src/main/java/ink/mifi/fe/tools/CTAPI.java

@@ -219,6 +219,54 @@ public class CTAPI
219 219
                 token = data.getString("token");
220 220
             }
221 221
 		}
222
+        if(index==68 || index==69 || index==84)//铂明
223
+        {
224
+            String openId;
225
+            String appId;
226
+            String channelId;
227
+            if (index==68) {
228
+                appId="C5010100A23100111720247";
229
+                openId="GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
230
+                channelId="236";
231
+            } else if (index==69){
232
+                appId="C5010531Aq5201817914";
233
+                openId="GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
234
+                channelId="216";
235
+            } else {
236
+                openId = "GFLaxxfVMG4DGkgcdZEEg4zexmje3dq4";
237
+                appId = "C5010250AIOT2022111118533438412";
238
+                channelId = "237";
239
+            }
240
+            String times = String.valueOf(System.currentTimeMillis()/1000);
241
+            Map<String, String> receivedData = new HashMap<>();
242
+            receivedData.put("appId", appId);
243
+            receivedData.put("channelId", channelId);
244
+            receivedData.put("times", times);
245
+            TreeMap<String, String> sortedData = new TreeMap<>(receivedData);
246
+            // 构建待签名字符串
247
+            StringBuilder stringA = new StringBuilder();
248
+            stringA.append(openId);
249
+            for (Map.Entry<String, String> entry : sortedData.entrySet()) {
250
+                String key = entry.getKey();
251
+                String value = entry.getValue();
252
+                if (value != null && !value.isEmpty()) {
253
+                    stringA.append(key).append(value);
254
+                }
255
+            }
256
+            // 拼接key,并进行sha1 运算
257
+            stringA.append(openId);
258
+            String sign = sha1(stringA.toString()).toUpperCase();
259
+            String url="http://db.jinmaiiot.com:7021/api/external/getToken?appId="+appId+"&openId="+openId+"&times="+times+"&sign="+sign+"&channelId="+channelId;
260
+            String content=HttpUtil.get(url);
261
+            log.info(content);
262
+            JSONObject resJson = JSONObject.parseObject(content);
263
+            JSONArray result = resJson.getJSONArray("result");
264
+            if(result!=null&&result.size()>0)
265
+            {
266
+                JSONObject data = result.getJSONObject(0);
267
+                token = data.getString("token");
268
+            }
269
+        }
222 270
 		return token;
223 271
 	}
224 272
 	

+ 46 - 0
com.sharemao.web.fe/src/main/java/ink/mifi/fe/tools/RealController.java

@@ -3,6 +3,7 @@ package ink.mifi.fe.tools;
3 3
 import java.io.BufferedReader;
4 4
 import java.io.IOException;
5 5
 import java.util.HashMap;
6
+import java.util.List;
6 7
 import java.util.Map;
7 8
 
8 9
 import org.apache.commons.logging.Log;
@@ -282,5 +283,50 @@ public class RealController
282 283
 		JsonViewEx jex=new JsonViewEx(new HashMap<String,Object>(),"success", 0);
283 284
 		return jex;
284 285
 	}
286
+
287
+	//saveIccid
288
+	@Path(value="/saveIccid.do")
289
+	public JsonViewEx saveIccid(Context context)
290
+	{
291
+        String iccid = null;
292
+        try {
293
+            BufferedReader reader = context.getRequest().getReader();
294
+            StringBuilder jsonInput = new StringBuilder();
295
+            String line;
296
+            while ((line = reader.readLine()) != null) {
297
+                jsonInput.append(line);
298
+            }
299
+            String jsonData = jsonInput.toString();
300
+            if (!Tools.isEmpty(jsonData)){
301
+                JSONObject resJson = JSONObject.parseObject(jsonData);
302
+                iccid = resJson.getString("iccid");
303
+            }
304
+        } catch (Exception ex) {
305
+            ex.printStackTrace();
306
+            return new JsonViewEx(new HashMap<String,Object>(),"success", 1);
307
+        }
308
+        if (!Tools.isEmpty(iccid)){
309
+            String sql = "select kasid from iccidtemp where iccid='"+iccid+"'";
310
+            List<Map<String, Object>> list = RCPService.getIccidService().getMapList(sql);
311
+            if (list != null && !list.isEmpty()) {
312
+                String kasid = list.get(0).get("kasid").toString();
313
+                String crttm = DateTimeUtil.longtime();
314
+                String sql2="select * from iccid_to_realname where iccid='"+iccid+"'";
315
+                List<Map<String, Object>> list2 = RCPService.getBaseService().getMapList(sql2);
316
+                if (list2 != null && !list2.isEmpty()){
317
+                    String sql3 = "update iccid_to_realname set kasid="+kasid+",crttm='"+crttm+"' where iccid='"+iccid+"'";
318
+                    RCPService.getBaseService().execSql(sql3);
319
+                } else {
320
+                    String sql4 = "insert into iccid_to_realname(iccid,kasid,crttm) values('"+iccid+"',"+kasid+",'"+crttm+"')";
321
+                    RCPService.getBaseService().execSql(sql4);
322
+                }
323
+            }
324
+        }
325
+
326
+        JsonViewEx jex=new JsonViewEx(new HashMap<String,Object>(),"success", 0);
327
+		return jex;
328
+	}
329
+
330
+
285 331
 }
286 332
 

+ 36 - 0
com.sharemao.web.fe/src/main/webapp/sming1.jsp

@@ -167,5 +167,41 @@
167 167
       clipboard.on('error', function (e) {
168 168
         console.log(e);
169 169
       });
170
+
171
+      document.querySelector('.save .btn').addEventListener('click', function(event) {
172
+        // 阻止默认跳转行为
173
+        event.preventDefault();
174
+
175
+        // 获取需要传递的数据
176
+        const iccid = document.getElementById('devid').value;
177
+        const simcard = document.getElementById('simcard1').value;
178
+
179
+        // 创建 XMLHttpRequest 对象
180
+        const xhr = new XMLHttpRequest();
181
+        const url = '/rn/saveIccid.do'; // 替换为实际后台接口地址
182
+
183
+        // 配置请求
184
+        xhr.open('POST', url, true);
185
+        xhr.setRequestHeader('Content-Type', 'application/json');
186
+
187
+        // 处理响应
188
+        xhr.onreadystatechange = function() {
189
+            if (xhr.readyState === 4) {
190
+                if (xhr.status === 200) {
191
+                    console.log('请求成功');
192
+                } else {
193
+                    console.error('请求失败:', xhr.statusText);
194
+                }
195
+            }
196
+        };
197
+
198
+        // 发送请求
199
+        xhr.send(JSON.stringify({
200
+            iccid: iccid,
201
+            simcard: simcard
202
+        }));
203
+        window.location.href = '${cturl}';
204
+    });
205
+
170 206
     </script>
171 207
 </html>

+ 17 - 1
com.sharemao.web.xw3/src/main/java/com/sharemao/web/wx/ctrl/AuthCtrl.java

@@ -1,5 +1,6 @@
1 1
 package com.sharemao.web.wx.ctrl;
2 2
 
3
+import java.net.URLEncoder;
3 4
 import java.util.Arrays;
4 5
 import java.util.Map;
5 6
 
@@ -46,6 +47,14 @@ public class AuthCtrl
46 47
 		String accessToken="";
47 48
 		String wxCode = para.get("code");
48 49
 
50
+//        String f = para.get("f");
51
+//        if (!Tools.isEmpty(f)) {
52
+//            openid=para.get("openid");
53
+//            if (!Tools.isEmpty(openid)) {
54
+//                session.setAttribute("openid", openid);
55
+//            }
56
+//        }
57
+
49 58
 		if(Tools.isEmpty(openid) && !GzhUtil.isEmpty(wxCode))
50 59
 		{
51 60
 			Map<String,String> m=GzhUtil.getOpenId(wxCode,Constants.appId,Constants.appSecret);
@@ -83,7 +92,14 @@ public class AuthCtrl
83 92
 				if(Tools.isEmpty(defaultdev)) {
84 93
 					return new TextView("/device/getDevInfo.do");
85 94
 				} else {
86
-					return new TextView("/consumer/getPkgsByDevId.do");
95
+//                    if ("866162073362932".equals(defaultdev)) {
96
+//                        String url="http://xcwx.jimi.link/user/index.do?f=1&&sn=" + defaultdev + "&openid=" + openid;
97
+//                        url = URLEncoder.encode(url);
98
+//                        log.info("url="+url);
99
+//                        String path = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb06cf14f96dd7149&redirect_uri=" + url + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
100
+//                        return new TextView(path);
101
+//                    }
102
+                    return new TextView("/consumer/getPkgsByDevId.do");
87 103
 				}
88 104
 			}
89 105
 		}

+ 5 - 4
com.sharemao.web.xw3/src/main/java/com/sharemao/web/wx/ctrl/PayCtrl.java

@@ -267,8 +267,8 @@ public class PayCtrl
267 267
 			JSONArray dataJson = resJson.getJSONArray("data");
268 268
 			context.getRequest().setAttribute("cons", dataJson);
269 269
 		}
270
-//		return new TextView("/pkgordersyb.jsp");
271
-		return new TextView("/pkgorder.jsp");
270
+		return new TextView("/pkgordersyb.jsp");
271
+//		return new TextView("/pkgorder.jsp");
272 272
 	}
273 273
 
274 274
 	/**
@@ -433,8 +433,8 @@ public class PayCtrl
433 433
         if("151992".equals(appuid)) {
434 434
             return new TextView("/pkgordersyb.jsp");
435 435
         }
436
-//		return new TextView("/pkgordersyb.jsp");
437
-		return new TextView("/pkgorder.jsp");
436
+		return new TextView("/pkgordersyb.jsp");
437
+//		return new TextView("/pkgorder.jsp");
438 438
 	}
439 439
 	
440 440
 	/**
@@ -1803,6 +1803,7 @@ public class PayCtrl
1803 1803
         Map<String, String> m = GzhUtil.getOpenId(wxCode, Constants.appId, Constants.appSecret);
1804 1804
         String openid = m.get("openId");
1805 1805
         context.getRequest().getSession().setAttribute("openid", openid);
1806
+        context.getRequest().setAttribute("u", "/mifi/testwxpay.do");
1806 1807
         return new TextView("/testwx.jsp");
1807 1808
     }
1808 1809
     @Path(value = "/testwxpay.do")

+ 106 - 90
com.sharemao.web.xw3/src/main/webapp/pkgorder.jsp

@@ -24,94 +24,104 @@
24 24
 	<script language="javascript" type="text/javascript" src="/static/js/swiper-bundle.min.js"></script>
25 25
 	<style>
26 26
 	.form-wallet{
27
-	    border-bottom: 1px solid #f0f0f0;
28
-	}
29
-	.form-wallet .form-item{
30
-	    border-bottom: none;
31
-	}
32
-	.wallet-money{
33
-	    display: none;
34
-	    width: 100%;
35
-	    padding: 2px 25px;
36
-	    height:65px;
37
-	    position: relative;
38
-	}
39
-	.wallet-money.show{
40
-	    display: block;
41
-	}
42
-	.wallet-container{
43
-	    display: block;
44
-	    width: 100%;
45
-	    min-height:45px;
46
-	    position: relative;
47
-	    list-style: none;
48
-	    overflow: hidden;
49
-	    z-index: 1;
50
-	}
51
-	.wallet-container .swiper-slide{
52
-	    display: block;
53
-	    width: 33.33%;
54
-	    height: 45px;
55
-	    position: relative;
56
-	    border-radius: 8px;
57
-	    overflow: hidden;
58
-	    background-color: #FFFFFF;
59
-	    border: 1px solid #e8e8e8;
60
-	}
61
-	.wallet-container .swiper-slide.cur{
62
-	    border: 1px solid #cb5f1f;
63
-	}
64
-	.wallet-container .swiper-slide img{
65
-	    display: block;
66
-	    width: 100%;
67
-	    max-height: auto;
68
-	}
69
-	.wallet-container .swiper-slide .sum{
70
-	    position: relative;
71
-	    display: flex;
72
-	    justify-content: center;
73
-	    align-items: center;
74
-	    width: 100%;
75
-	    height: 100%;
76
-	    font-size: 14px;
77
-	    font-family: Arial;
78
-	    font-weight: bold;
79
-	    text-align: center;
80
-	    padding-top: 10px;
81
-	}
82
-	.wallet-container .swiper-slide .sum::after{
83
-	    content: '';
84
-	    position: absolute;
85
-	    top: 0;
86
-	    left: 0;
87
-	    display: block;
88
-	    width: 100%;
89
-	    height: 10px;
90
-	    background-color: #dd170e;
91
-	}
92
-	.swiper-button-prev{
93
-	    left: 0;
94
-	}
95
-	.swiper-button-next{
96
-	    right: 0;
97
-	}
98
-	.swiper-button-prev,.swiper-button-next{
99
-	    top: 17px;
100
-	    margin-top: 0;
101
-	    width: 15px;
102
-	    height: 15px;
103
-	    opacity: 0.6;
104
-	}
105
-	.swiper-button-disabled{
106
-	    opacity: 0.2;
107
-	}
108
-	.swiper-button-next:after,.swiper-button-prev:after{
109
-	    color: #929292;
110
-	    font-size: 18px;
111
-	}
112
-	.swiper-button-next:hover:after,.swiper-button-prev:hover:after{
113
-	    color: #FF6600;
114
-	}
27
+        border-bottom: 1px solid #f0f0f0;
28
+    }
29
+    .form-wallet .form-item{
30
+        border-bottom: none;
31
+    }
32
+    .wallet-money{
33
+        display: none;
34
+        width: 100%;
35
+        padding: 2px 25px;
36
+        height:65px;
37
+        position: relative;
38
+    }
39
+    .wallet-money.show{
40
+        display: block;
41
+    }
42
+    .wallet-container{
43
+        display: block;
44
+        width: 100%;
45
+        min-height:45px;
46
+        position: relative;
47
+        list-style: none;
48
+        overflow: hidden;
49
+        z-index: 1;
50
+    }
51
+    .wallet-container .swiper-slide{
52
+        display: block;
53
+        width: 33.33%;
54
+        height: 45px;
55
+        position: relative;
56
+        border-radius: 8px;
57
+        overflow: hidden;
58
+        background-color: #FFFFFF;
59
+        border: 1px solid #e8e8e8;
60
+    }
61
+    .wallet-container .swiper-slide.cur{
62
+        border: 1px solid #cb5f1f;
63
+    }
64
+    .wallet-container .swiper-slide img{
65
+        display: block;
66
+        width: 100%;
67
+        max-height: auto;
68
+    }
69
+    .wallet-container .swiper-slide .sum{
70
+        position: relative;
71
+        display: block;
72
+        justify-content: center;
73
+        align-items: center;
74
+        width: 100%;
75
+        height: 100%;
76
+        font-size: 14px;
77
+        line-height: 2;
78
+        font-family: Arial;
79
+        font-weight: bold;
80
+        text-align: center;
81
+        padding-top: 0;
82
+    }
83
+    .wallet-container .swiper-slide .sum i{
84
+        display: block;
85
+        width: 100%;
86
+        font-size: 9px;
87
+        height: 15px;
88
+        line-height: 16px;
89
+        color: #FFF;
90
+        background-color: #dd170e;
91
+    }
92
+    .wallet-container .swiper-slide .sum::after{
93
+        content: '';
94
+        position: absolute;
95
+        top: 0;
96
+        left: 0;
97
+        display: none;
98
+        width: 100%;
99
+        height: 10px;
100
+        background-color: #dd170e;
101
+    }
102
+    .swiper-button-prev{
103
+        left: 0;
104
+    }
105
+    .swiper-button-next{
106
+        right: 0;
107
+    }
108
+    .swiper-button-prev,.swiper-button-next{
109
+        top: 17px;
110
+        margin-top: 0;
111
+        width: 15px;
112
+        height: 15px;
113
+        opacity: 0.6;
114
+    }
115
+    .swiper-button-disabled{
116
+        opacity: 0.2;
117
+    }
118
+    .swiper-button-next:after,.swiper-button-prev:after{
119
+        color: #929292;
120
+        font-size: 18px;
121
+    }
122
+    .swiper-button-next:hover:after,.swiper-button-prev:hover:after{
123
+        color: #FF6600;
124
+    }
115 125
 	</style>
116 126
 </head>
117 127
 
@@ -226,7 +236,10 @@
226 236
                 <div class="swiper-wrapper">
227 237
 					<c:forEach var="item" items="${cons}">
228 238
 						<div class="swiper-slide" data-id="${item.id}" data-jine="${item.jine}">
229
-	                        <div class="sum">${item.jine}</div>
239
+                            <div class="sum">
240
+                                <i class="bar">赠送${item.zsong}元</i>
241
+                                <span>${item.jine}</span>
242
+                            </div>
230 243
 	                    </div>
231 244
 				    </c:forEach> 
232 245
                 </div>
@@ -270,7 +283,10 @@
270 283
 		        <div class="swiper-wrapper">
271 284
 					<c:forEach var="item" items="${cons}">
272 285
 						<div class="swiper-slide" data-id="${item.id}" data-jine="${item.jine}">
273
-		                    <div class="sum">${item.jine}</div>
286
+                            <div class="sum">
287
+                                <i class="bar">赠送${item.zsong}元</i>
288
+                                <span>${item.jine}</span>
289
+                            </div>
274 290
 		                </div>
275 291
 				    </c:forEach> 
276 292
 		        </div>

+ 106 - 90
com.sharemao.web.xw3/src/main/webapp/pkgordersyb.jsp

@@ -24,94 +24,104 @@
24 24
 	<script language="javascript" type="text/javascript" src="/static/js/swiper-bundle.min.js"></script>
25 25
 	<style>
26 26
 	.form-wallet{
27
-	    border-bottom: 1px solid #f0f0f0;
28
-	}
29
-	.form-wallet .form-item{
30
-	    border-bottom: none;
31
-	}
32
-	.wallet-money{
33
-	    display: none;
34
-	    width: 100%;
35
-	    padding: 2px 25px;
36
-	    height:65px;
37
-	    position: relative;
38
-	}
39
-	.wallet-money.show{
40
-	    display: block;
41
-	}
42
-	.wallet-container{
43
-	    display: block;
44
-	    width: 100%;
45
-	    min-height:45px;
46
-	    position: relative;
47
-	    list-style: none;
48
-	    overflow: hidden;
49
-	    z-index: 1;
50
-	}
51
-	.wallet-container .swiper-slide{
52
-	    display: block;
53
-	    width: 33.33%;
54
-	    height: 45px;
55
-	    position: relative;
56
-	    border-radius: 8px;
57
-	    overflow: hidden;
58
-	    background-color: #FFFFFF;
59
-	    border: 1px solid #e8e8e8;
60
-	}
61
-	.wallet-container .swiper-slide.cur{
62
-	    border: 1px solid #cb5f1f;
63
-	}
64
-	.wallet-container .swiper-slide img{
65
-	    display: block;
66
-	    width: 100%;
67
-	    max-height: auto;
68
-	}
69
-	.wallet-container .swiper-slide .sum{
70
-	    position: relative;
71
-	    display: flex;
72
-	    justify-content: center;
73
-	    align-items: center;
74
-	    width: 100%;
75
-	    height: 100%;
76
-	    font-size: 14px;
77
-	    font-family: Arial;
78
-	    font-weight: bold;
79
-	    text-align: center;
80
-	    padding-top: 10px;
81
-	}
82
-	.wallet-container .swiper-slide .sum::after{
83
-	    content: '';
84
-	    position: absolute;
85
-	    top: 0;
86
-	    left: 0;
87
-	    display: block;
88
-	    width: 100%;
89
-	    height: 10px;
90
-	    background-color: #dd170e;
91
-	}
92
-	.swiper-button-prev{
93
-	    left: 0;
94
-	}
95
-	.swiper-button-next{
96
-	    right: 0;
97
-	}
98
-	.swiper-button-prev,.swiper-button-next{
99
-	    top: 17px;
100
-	    margin-top: 0;
101
-	    width: 15px;
102
-	    height: 15px;
103
-	    opacity: 0.6;
104
-	}
105
-	.swiper-button-disabled{
106
-	    opacity: 0.2;
107
-	}
108
-	.swiper-button-next:after,.swiper-button-prev:after{
109
-	    color: #929292;
110
-	    font-size: 18px;
111
-	}
112
-	.swiper-button-next:hover:after,.swiper-button-prev:hover:after{
113
-	    color: #FF6600;
114
-	}
27
+        border-bottom: 1px solid #f0f0f0;
28
+    }
29
+    .form-wallet .form-item{
30
+        border-bottom: none;
31
+    }
32
+    .wallet-money{
33
+        display: none;
34
+        width: 100%;
35
+        padding: 2px 25px;
36
+        height:65px;
37
+        position: relative;
38
+    }
39
+    .wallet-money.show{
40
+        display: block;
41
+    }
42
+    .wallet-container{
43
+        display: block;
44
+        width: 100%;
45
+        min-height:45px;
46
+        position: relative;
47
+        list-style: none;
48
+        overflow: hidden;
49
+        z-index: 1;
50
+    }
51
+    .wallet-container .swiper-slide{
52
+        display: block;
53
+        width: 33.33%;
54
+        height: 45px;
55
+        position: relative;
56
+        border-radius: 8px;
57
+        overflow: hidden;
58
+        background-color: #FFFFFF;
59
+        border: 1px solid #e8e8e8;
60
+    }
61
+    .wallet-container .swiper-slide.cur{
62
+        border: 1px solid #cb5f1f;
63
+    }
64
+    .wallet-container .swiper-slide img{
65
+        display: block;
66
+        width: 100%;
67
+        max-height: auto;
68
+    }
69
+    .wallet-container .swiper-slide .sum{
70
+        position: relative;
71
+        display: block;
72
+        justify-content: center;
73
+        align-items: center;
74
+        width: 100%;
75
+        height: 100%;
76
+        font-size: 14px;
77
+        line-height: 2;
78
+        font-family: Arial;
79
+        font-weight: bold;
80
+        text-align: center;
81
+        padding-top: 0;
82
+    }
83
+    .wallet-container .swiper-slide .sum i{
84
+        display: block;
85
+        width: 100%;
86
+        font-size: 9px;
87
+        height: 15px;
88
+        line-height: 16px;
89
+        color: #FFF;
90
+        background-color: #dd170e;
91
+    }
92
+    .wallet-container .swiper-slide .sum::after{
93
+        content: '';
94
+        position: absolute;
95
+        top: 0;
96
+        left: 0;
97
+        display: none;
98
+        width: 100%;
99
+        height: 10px;
100
+        background-color: #dd170e;
101
+    }
102
+    .swiper-button-prev{
103
+        left: 0;
104
+    }
105
+    .swiper-button-next{
106
+        right: 0;
107
+    }
108
+    .swiper-button-prev,.swiper-button-next{
109
+        top: 17px;
110
+        margin-top: 0;
111
+        width: 15px;
112
+        height: 15px;
113
+        opacity: 0.6;
114
+    }
115
+    .swiper-button-disabled{
116
+        opacity: 0.2;
117
+    }
118
+    .swiper-button-next:after,.swiper-button-prev:after{
119
+        color: #929292;
120
+        font-size: 18px;
121
+    }
122
+    .swiper-button-next:hover:after,.swiper-button-prev:hover:after{
123
+        color: #FF6600;
124
+    }
115 125
 	</style>
116 126
 </head>
117 127
 
@@ -226,7 +236,10 @@
226 236
                 <div class="swiper-wrapper">
227 237
 					<c:forEach var="item" items="${cons}">
228 238
 						<div class="swiper-slide" data-id="${item.id}" data-jine="${item.jine}">
229
-	                        <div class="sum">${item.jine}</div>
239
+	                        <div class="sum">
240
+                                <i class="bar">赠送${item.zsong}元</i>
241
+	                            <span>${item.jine}</span>
242
+	                        </div>
230 243
 	                    </div>
231 244
 				    </c:forEach> 
232 245
                 </div>
@@ -270,7 +283,10 @@
270 283
 		        <div class="swiper-wrapper">
271 284
 					<c:forEach var="item" items="${cons}">
272 285
 						<div class="swiper-slide" data-id="${item.id}" data-jine="${item.jine}">
273
-		                    <div class="sum">${item.jine}</div>
286
+                            <div class="sum">
287
+                                <i class="bar">赠送${item.zsong}元</i>
288
+                                <span>${item.jine}</span>
289
+                            </div>
274 290
 		                </div>
275 291
 				    </c:forEach> 
276 292
 		        </div>

+ 2 - 1
com.sharemao.web.xw3/src/main/webapp/testwx.jsp

@@ -119,6 +119,7 @@
119 119
 
120 120
 
121 121
     <input  name="amount" id="trxamt"/>
122
+    <input type="hidden" value="${u}" id="u"/>
122 123
 
123 124
         <input type="button" class="btn" value="支付" />
124 125
 
@@ -130,7 +131,7 @@
130 131
 		$(".btn").click(function(e){
131 132
 		    var param = {};
132 133
 		    param['amt']=$("#trxamt").val();
133
-            $.post('/mifi/testwxpay.do',param,function(res){
134
+            $.post($("#u").val(),param,function(res){
134 135
 				    $('.mask').hide();
135 136
 				    if(typeof(res) === 'string'){
136 137
 				        res = JSON.parse(res);