Commit 95ae7661 by 颜景龙

增加微信支持

parent 69bccb6e
正在显示 包含 18 行增加4 行删除
......@@ -547,6 +547,7 @@
var id = getUrlParam('id');
var customerUserId = getUrlParam('customerUserId');
var type = getUrlParam('type');
$(document).ready(function() {
......@@ -559,6 +560,10 @@
if (id && customerUserId) {
if (type === "weixin") {
$('#return-img').remove();
}
$.ajax({
type: 'POST',
url: HTTP_URL+"/wedofit/gift/info",
......
......@@ -89,7 +89,7 @@
var HTTP_URL = CONSTANT.getConstant();
var id = getUrlParam('id');
var customerUserId = getUrlParam('customerUserId');
var type = getUrlParam('type');
$(document).ready(function() {
$(window).ready(function(){
......@@ -104,6 +104,10 @@
}, 200);
if (id && customerUserId) {
if (type === "weixin") {
$('#return-img').remove();
}
$.ajax({
type: 'get',
url: HTTP_URL+"/wedofit/gift/isHasGift/"+customerUserId,
......@@ -113,9 +117,14 @@
if (result.code == 0 && result.data) {
$('<button type="submit" id="submitBtn" class="zbtn zbtn-full zbtn-lg submit-btn">参加活动</button>').appendTo($("body"));
$("#submitBtn").on('click', function(e){
if (id && customerUserId) {
location.href = './gift.html?id=' + id + "&customerUserId=" + customerUserId;
var resultHref = '';
if (id && customerUserId && !type) {
resultHref = './gift.html?id=' + id + "&customerUserId=" + customerUserId;
} else if (id && customerUserId && type) {
resultHref = './gift.html?id=' + id + "&customerUserId=" + customerUserId + "&type=" + type;
}
location.href = resultHref;
});
}
},
......
......@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "http-server -a 0.0.0.0 -p 9091"
"start": "http-server -a 0.0.0.0 -p 8080"
},
"author": "",
"license": "ISC"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!
注册登录 后发表评论