Commit 21a95a0a authored by 余成's avatar 余成

只能上海的才行

parent b42f8f20
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
</div> </div>
<!-- 分享按钮 --> <!-- 分享按钮 -->
<img id="sharebtn" class="sharebtn" onclick="goShare()" src="share.png" alt="" /> <!-- <img id="sharebtn" class="sharebtn" onclick="goShare()" src="share.png" alt="" /> -->
</div> </div>
<!-- 二级页面-周四专享页 --> <!-- 二级页面-周四专享页 -->
...@@ -770,11 +770,11 @@ ...@@ -770,11 +770,11 @@
// 端内展示分享按钮 端外不展示 // 端内展示分享按钮 端外不展示
if (!isInClient() || !window.CCBBridge) { // if (!isInClient() || !window.CCBBridge) {
document.getElementById("sharebtn").style.display = "none"; // document.getElementById("sharebtn").style.display = "none";
} else { // } else {
document.getElementById("sharebtn").style.display = ""; // document.getElementById("sharebtn").style.display = "";
} // }
/** /**
* 判断是否是端内 * 判断是否是端内
...@@ -793,22 +793,22 @@ ...@@ -793,22 +793,22 @@
/** /**
* 分享 * 分享
*/ */
function goShare() { // function goShare() {
var requestObj = { // var requestObj = {
action: "share", // action: "share",
params: { // params: {
// share_id:'', // // share_id:'',
text: "晋享信用生活,多重信用卡好礼优惠等你参与", // text: "晋享信用生活,多重信用卡好礼优惠等你参与",
title: "信用卡专享优惠-惠满三晋", // title: "信用卡专享优惠-惠满三晋",
url: window.location.href, // url: window.location.href,
image: "https://yun.duiba.com.cn/cdqd/0123ed88-6f63-4361-bee8-d4968a0fc407.png", // image: "https://yun.duiba.com.cn/cdqd/0123ed88-6f63-4361-bee8-d4968a0fc407.png",
type: "", // type: "",
}, // },
}; // };
console.log("分享信息", requestObj); // console.log("分享信息", requestObj);
window.CCBBridge && // window.CCBBridge &&
window.CCBBridge.requestNative(JSON.stringify(requestObj), "cbShare"); // window.CCBBridge.requestNative(JSON.stringify(requestObj), "cbShare");
} // }
/** /**
* 点击卡券 区分端内外进行跳转 * 点击卡券 区分端内外进行跳转
...@@ -854,11 +854,12 @@ ...@@ -854,11 +854,12 @@
var addComp = rs.addressComponents; var addComp = rs.addressComponents;
console.log(addComp.city); console.log(addComp.city);
//条件满足 //条件满足
if (addComp.city === "上海市") {
if (["太原市","大同市","阳泉市","长治市","晋城市","朔州市","晋中市","运城市","忻州市","临汾市","吕梁市"].include(addComp.city)) {
// 端内 // 端内
toLink(targetUrl); toLink(targetUrl);
} else { } else {
Toast("仅限上海市参与"); Toast("仅限山西省参与");
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment