admin
2025-02-25 30d8e227e8d823b6c38c3b9c90ac2df03b63befe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.yeshi.fanli.util.factory;
 
import com.yeshi.fanli.entity.taobao.ClientTBPid;
import org.yeshi.utils.JsonUtil;
 
import net.sf.json.JSONObject;
 
public class JumpDetailParamsFactory {
 
 
    /**
     * 百川的跳转参数
     * 
     * @param clientTBPid
     * @param auctionId
     * @return
     */
    public static String createWEEXParams(ClientTBPid clientTBPid, String auctionId) {
        JSONObject data = new JSONObject();
        if (clientTBPid != null)
            data.put("tbPidInfo", JsonUtil.getGson().toJson(clientTBPid));
        data.put("id", auctionId);
        return data.toString();
    }
 
    /**
     * web的跳转参数
     * 
     * @param url
     * @return
     */
    public static String createWEBParams(String url) {
        JSONObject data = new JSONObject();
        data.put("url", url);
        return data.toString();
    }
 
    /**
     * weex的跳转参数
     * 
     * @param url
     * @return
     */
    public static String createWEEXParams(String url) {
        JSONObject data = new JSONObject();
        data.put("url", url);
        return data.toString();
    }
 
    /**
     * 商品详情的跳转参数
     * 
     * @param goodsType
     * @param auctionId
     * @return
     */
    public static String createGoodsParams(String auctionId, Integer goodsType) {
        JSONObject data = new JSONObject();
        data.put("id", auctionId);
        if (goodsType != null)
            data.put("goodsType", goodsType);
        return data.toString();
    }
 
}