|
@@ -44,12 +44,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="loading2">
|
|
|
- <div class="curtain-box2">
|
|
|
- <div class="txt rubberBand time6">
|
|
|
- </div>
|
|
|
+<div class="loading2">
|
|
|
+ <div class="curtain-box2">
|
|
|
+ <div class="txt rubberBand time6">
|
|
|
</div>
|
|
|
</div>
|
|
|
+</div>
|
|
|
<!-- 主内容 -->
|
|
|
<div class="warp">
|
|
|
<!-- 选择菜 -->
|
|
@@ -57,17 +57,17 @@
|
|
|
<img src="./img/menu_tt.png" class="tt fadeIn time4 animated js-an">
|
|
|
<div class="list">
|
|
|
<div class="item bounceIn time3 animated js-an delay3">
|
|
|
- <img src="./img/menu1.png" class="animated js-an pulse time4 delay11">
|
|
|
- </div>
|
|
|
- <div class="item bounceIn time3 animated js-an delay4">
|
|
|
- <img src="./img/menu2.png" class="animated js-an pulse time4 delay12">
|
|
|
- </div>
|
|
|
- <div class="item bounceIn time3 animated js-an delay5">
|
|
|
- <img src="./img/menu3.png" class="animated js-an pulse time4 delay13">
|
|
|
- </div>
|
|
|
- <div class="item bounceIn time3 animated js-an delay6">
|
|
|
- <img src="./img/menu4.png" class="animated js-an pulse time4 delay14">
|
|
|
- </div>
|
|
|
+ <img src="./img/menu1.png" class="animated js-an pulse time4 delay11">
|
|
|
+ </div>
|
|
|
+ <div class="item bounceIn time3 animated js-an delay4">
|
|
|
+ <img src="./img/menu2.png" class="animated js-an pulse time4 delay12">
|
|
|
+ </div>
|
|
|
+ <div class="item bounceIn time3 animated js-an delay5">
|
|
|
+ <img src="./img/menu3.png" class="animated js-an pulse time4 delay13">
|
|
|
+ </div>
|
|
|
+ <div class="item bounceIn time3 animated js-an delay6">
|
|
|
+ <img src="./img/menu4.png" class="animated js-an pulse time4 delay14">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="confirm anim-btn"></div>
|
|
|
</div>
|
|
@@ -162,10 +162,10 @@
|
|
|
<!-- 必须加在微信api资源 -->
|
|
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
|
|
<script>
|
|
|
- //解决IOS下分享签名失败问题
|
|
|
- if (navigator.userAgent.indexOf('iPhone') !== -1) {
|
|
|
- window.wechaturl = window.location + '';
|
|
|
- }
|
|
|
+ //解决IOS下分享签名失败问题
|
|
|
+ if (navigator.userAgent.indexOf('iPhone') !== -1) {
|
|
|
+ window.wechaturl = window.location + '';
|
|
|
+ }
|
|
|
//一般情况下,这样就可以自动播放了,但是一些奇葩iPhone机不可以
|
|
|
var music = document.getElementById('music').play();
|
|
|
music.volume = 0.1;
|
|
@@ -175,53 +175,91 @@
|
|
|
music.volume = 0.1;
|
|
|
}, false);
|
|
|
|
|
|
- function shareWeixin(msg) {
|
|
|
- let wechaturl = window.location.href.split('#')[0];
|
|
|
- var shareUrl = wechaturl;
|
|
|
- if (window.wechaturl !== undefined) {
|
|
|
- wechaturl = window.wechaturl;
|
|
|
- }
|
|
|
- var url = escape(wechaturl);
|
|
|
- $.post("./user/getWxConfigParam?url="+url, {}, function(resp) {
|
|
|
- if (resp.code == 'error') {
|
|
|
- console.log(resp.code);
|
|
|
- }else{
|
|
|
- wx.config({
|
|
|
- debug: false,
|
|
|
- appId: 'wx749c84daac654e1e',
|
|
|
- timestamp: resp.data.timestamp,
|
|
|
- nonceStr: resp.data.noncestr,
|
|
|
- signature: resp.data.sign,
|
|
|
- jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'showOptionMenu', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem']
|
|
|
- });
|
|
|
- wx.ready(function(){
|
|
|
- $("#cover").show();
|
|
|
- const share = {
|
|
|
- title: "我为你精心准备的美味,快享用吧!",
|
|
|
- desc: msg,
|
|
|
- imgUrl: "https://wx.ttkuaiban.com/minigame/images/share_picture.png",
|
|
|
- link: shareUrl,
|
|
|
- success: function() {
|
|
|
+ function shareWeixin(msg) {
|
|
|
+ let wechaturl = window.location.href.split('#')[0];
|
|
|
+ var shareUrl = wechaturl;
|
|
|
+ if (window.wechaturl !== undefined) {
|
|
|
+ wechaturl = window.wechaturl;
|
|
|
+ }
|
|
|
+ var url = escape(wechaturl);
|
|
|
+ $.post("./user/getWxConfigParam?url="+url, {}, function(resp) {
|
|
|
+ if (resp.code == 'error') {
|
|
|
+ console.log(resp.code);
|
|
|
+ }else{
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: 'wx749c84daac654e1e',
|
|
|
+ timestamp: resp.data.timestamp,
|
|
|
+ nonceStr: resp.data.noncestr,
|
|
|
+ signature: resp.data.sign,
|
|
|
+ jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'showOptionMenu', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem']
|
|
|
+ });
|
|
|
+ wx.ready(function(){
|
|
|
+ $("#cover").show();
|
|
|
+ const share = {
|
|
|
+ title: "我为你精心准备的美味,快享用吧!",
|
|
|
+ desc: msg,
|
|
|
+ imgUrl: "https://wx.ttkuaiban.com/minigame/images/share_picture.png",
|
|
|
+ link: shareUrl,
|
|
|
+ success: function() {
|
|
|
// alert("分享成功")
|
|
|
- window.location.href = "https://wx.ttkuaiban.com/minigame/lottery.html";
|
|
|
- },
|
|
|
- cancel: function() {
|
|
|
+ window.location.href = "https://wx.ttkuaiban.com/minigame/lottery.html";
|
|
|
+ },
|
|
|
+ cancel: function() {
|
|
|
// alert("分享失败")
|
|
|
- }
|
|
|
- };
|
|
|
- wx.onMenuShareAppMessage(share);
|
|
|
- wx.onMenuShareTimeline(share);
|
|
|
- wx.onMenuShareQQ(share);
|
|
|
- wx.onMenuShareQZone(share);
|
|
|
- wx.onMenuShareWeibo(share);
|
|
|
- });
|
|
|
- wx.error(function(res){
|
|
|
- alert("分享失败")
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- </script>
|
|
|
+ }
|
|
|
+ };
|
|
|
+ wx.onMenuShareAppMessage(share);
|
|
|
+ wx.onMenuShareTimeline(share);
|
|
|
+ wx.onMenuShareQQ(share);
|
|
|
+ wx.onMenuShareQZone(share);
|
|
|
+ wx.onMenuShareWeibo(share);
|
|
|
+ });
|
|
|
+ wx.error(function(res){
|
|
|
+ alert("分享失败")
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ $(function () {
|
|
|
+ $.post("./user/getWxConfigParam?url=https://wx.ttkuaiban.com/minigame/index.html", {}, function(resp) {
|
|
|
+ if (resp.code == 'error') {
|
|
|
+ console.log(resp.code);
|
|
|
+ }else{
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: 'wx749c84daac654e1e',
|
|
|
+ timestamp: resp.data.timestamp,
|
|
|
+ nonceStr: resp.data.noncestr,
|
|
|
+ signature: resp.data.sign,
|
|
|
+ jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'showOptionMenu', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem']
|
|
|
+ });
|
|
|
+ wx.ready(function(){
|
|
|
+ const share = {
|
|
|
+ title: "一秒变大厨,为远方的朋友做道菜吧!",
|
|
|
+ desc: "",
|
|
|
+ imgUrl: "https://wx.ttkuaiban.com/minigame/images/share_picture.png",
|
|
|
+ link: "https://wx.ttkuaiban.com/minigame/index.html",
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ cancel: function() {}
|
|
|
+ };
|
|
|
+ wx.onMenuShareAppMessage(share);
|
|
|
+ wx.onMenuShareTimeline(share);
|
|
|
+ wx.onMenuShareQQ(share);
|
|
|
+ wx.onMenuShareQZone(share);
|
|
|
+ wx.onMenuShareWeibo(share);
|
|
|
+ });
|
|
|
+
|
|
|
+ wx.error(function(res){
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ });
|
|
|
+ })
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|