? ???? WeChat?? ???? ?? ?? ??? ???? ?? js? ?? ?????. ASP.NET????? ??? ??? ? ??? ? ????. ?? ???,
? ?????. ?? ??? ?? ???? ???? ???? ?? ? ???? ??? ??? ?? ??? ?? ????. ?? ??? ????? js? ?? ???????. .
? ?? ??? ??? ?? ?????:
??, ??, ? ?? ??? ?? js? ?? ?????.
js ??? ??? ????
<script> var dataForWeixin = { appId: "", MsgImg: "Christmas/201012189457639.gif",//顯示圖片 TLImg: "Christmas/201012189457639.gif",//顯示圖片 url: "Christmas/6.html?stra=!u738B!u4F1F",//跳轉(zhuǎn)地址 title: "將我的思念和祝福送給您,頤養(yǎng)源祝大家圣誕快樂",//標題內(nèi)容 desc: "將我的思念和祝福送給您,頤養(yǎng)源祝大家圣誕快樂",//描述內(nèi)容 fakeid: "", callback: function () { } }; (function () { var onBridgeReady = function () { WeixinJSBridge.on('menu:share:appmessage', function (argv) { WeixinJSBridge.invoke('sendAppMessage', { "appid": dataForWeixin.appId, "img_url": dataForWeixin.MsgImg, "img_width": "120", "img_height": "120", "link": dataForWeixin.url, "desc": dataForWeixin.desc, "title": dataForWeixin.title }, function (res) { (dataForWeixin.callback)(); }); }); WeixinJSBridge.on('menu:share:timeline', function (argv) { (dataForWeixin.callback)(); WeixinJSBridge.invoke('shareTimeline', { "img_url": dataForWeixin.TLImg, "img_width": "120", "img_height": "120", "link": dataForWeixin.url, "desc": dataForWeixin.desc, "title": dataForWeixin.title }, function (res) { }); }); WeixinJSBridge.on('menu:share:weibo', function (argv) { WeixinJSBridge.invoke('shareWeibo', { "content": dataForWeixin.title, "url": dataForWeixin.url }, function (res) { (dataForWeixin.callback)(); }); }); WeixinJSBridge.on('menu:share:facebook', function (argv) { (dataForWeixin.callback)(); WeixinJSBridge.invoke('shareFB', { "img_url": dataForWeixin.TLImg, "img_width": "120", "img_height": "120", "link": dataForWeixin.url, "desc": dataForWeixin.desc, "title": dataForWeixin.title }, function (res) { }); }); }; if (document.addEventListener) { document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false); } else if (document.attachEvent) { document.attachEvent('WeixinJSBridgeReady', onBridgeReady); document.attachEvent('onWeixinJSBridgeReady', onBridgeReady); } })(); </script>
? ?? WeChat ?? js ??:
/**! * 微信內(nèi)置瀏覽器的Javascript API,功能包括: * * 1、分享到微信朋友圈 * 2、分享給微信好友 * 3、分享到騰訊微博 * 4、新的分享接口,包含朋友圈、好友、微博的分享(for iOS) * 5、隱藏/顯示右上角的菜單入口 * 6、隱藏/顯示底部瀏覽器工具欄 * 7、獲取當前的網(wǎng)絡狀態(tài) * 8、調(diào)起微信客戶端的圖片播放組件 * 9、關(guān)閉公眾平臺Web頁面 */ var WeixinApi = (function () { "use strict"; /** * 分享到微信朋友圈 * @param {Object} data 待分享的信息 * @p-config {String} appId 公眾平臺的appId(服務號可用) * @p-config {String} imgUrl 圖片地址 * @p-config {String} link 鏈接地址 * @p-config {String} desc 描述 * @p-config {String} title 分享的標題 * * @param {Object} callbacks 相關(guān)回調(diào)方法 * @p-config {Boolean} async ready方法是否需要異步執(zhí)行,默認false * @p-config {Function} ready(argv) 就緒狀態(tài) * @p-config {Function} dataLoaded(data) 數(shù)據(jù)加載完成后調(diào)用,async為true時有用,也可以為空 * @p-config {Function} cancel(resp) 取消 * @p-config {Function} fail(resp) 失敗 * @p-config {Function} confirm(resp) 成功 * @p-config {Function} all(resp) 無論成功失敗都會執(zhí)行的回調(diào) */ function weixinShareTimeline(data, callbacks) { callbacks = callbacks || {}; var shareTimeline = function (theData) { WeixinJSBridge.invoke('shareTimeline', { "appid":theData.appId ? theData.appId : '', "img_url":theData.imgUrl, "link":theData.link, "desc":theData.title, "title":theData.desc, // 注意這里要分享出去的內(nèi)容是desc "img_width":"640", "img_height":"640" }, function (resp) { switch (resp.err_msg) { // share_timeline:cancel 用戶取消 case 'share_timeline:cancel': callbacks.cancel && callbacks.cancel(resp); break; // share_timeline:confirm 發(fā)送成功 case 'share_timeline:confirm': case 'share_timeline:ok': callbacks.confirm && callbacks.confirm(resp); break; // share_timeline:fail 發(fā)送失敗 case 'share_timeline:fail': default: callbacks.fail && callbacks.fail(resp); break; } // 無論成功失敗都會執(zhí)行的回調(diào) callbacks.all && callbacks.all(resp); }); }; WeixinJSBridge.on('menu:share:timeline', function (argv) { if (callbacks.async && callbacks.ready) { window["_wx_loadedCb_"] = callbacks.dataLoaded || new Function(); if(window["_wx_loadedCb_"].toString().indexOf("_wx_loadedCb_") > 0) { window["_wx_loadedCb_"] = new Function(); } callbacks.dataLoaded = function (newData) { window["_wx_loadedCb_"](newData); shareTimeline(newData); }; // 然后就緒 callbacks.ready && callbacks.ready(argv); } else { // 就緒狀態(tài) callbacks.ready && callbacks.ready(argv); shareTimeline(data); } }); } /** * 發(fā)送給微信上的好友 * @param {Object} data 待分享的信息 * @p-config {String} appId 公眾平臺的appId(服務號可用) * @p-config {String} imgUrl 圖片地址 * @p-config {String} link 鏈接地址 * @p-config {String} desc 描述 * @p-config {String} title 分享的標題 * * @param {Object} callbacks 相關(guān)回調(diào)方法 * @p-config {Boolean} async ready方法是否需要異步執(zhí)行,默認false * @p-config {Function} ready(argv) 就緒狀態(tài) * @p-config {Function} dataLoaded(data) 數(shù)據(jù)加載完成后調(diào)用,async為true時有用,也可以為空 * @p-config {Function} cancel(resp) 取消 * @p-config {Function} fail(resp) 失敗 * @p-config {Function} confirm(resp) 成功 * @p-config {Function} all(resp) 無論成功失敗都會執(zhí)行的回調(diào) */ function weixinSendAppMessage(data, callbacks) { callbacks = callbacks || {}; var sendAppMessage = function (theData) { WeixinJSBridge.invoke('sendAppMessage', { "appid":theData.appId ? theData.appId : '', "img_url":theData.imgUrl, "link":theData.link, "desc":theData.desc, "title":theData.title, "img_width":"640", "img_height":"640" }, function (resp) { switch (resp.err_msg) { // send_app_msg:cancel 用戶取消 case 'send_app_msg:cancel': callbacks.cancel && callbacks.cancel(resp); break; // send_app_msg:confirm 發(fā)送成功 case 'send_app_msg:confirm': case 'send_app_msg:ok': callbacks.confirm && callbacks.confirm(resp); break; // send_app_msg:fail 發(fā)送失敗 case 'send_app_msg:fail': default: callbacks.fail && callbacks.fail(resp); break; } // 無論成功失敗都會執(zhí)行的回調(diào) callbacks.all && callbacks.all(resp); }); }; WeixinJSBridge.on('menu:share:appmessage', function (argv) { if (callbacks.async && callbacks.ready) { window["_wx_loadedCb_"] = callbacks.dataLoaded || new Function(); if(window["_wx_loadedCb_"].toString().indexOf("_wx_loadedCb_") > 0) { window["_wx_loadedCb_"] = new Function(); } callbacks.dataLoaded = function (newData) { window["_wx_loadedCb_"](newData); sendAppMessage(newData); }; // 然后就緒 callbacks.ready && callbacks.ready(argv); } else { // 就緒狀態(tài) callbacks.ready && callbacks.ready(argv); sendAppMessage(data); } }); } /** * 分享到騰訊微博 * @param {Object} data 待分享的信息 * @p-config {String} link 鏈接地址 * @p-config {String} desc 描述 * * @param {Object} callbacks 相關(guān)回調(diào)方法 * @p-config {Boolean} async ready方法是否需要異步執(zhí)行,默認false * @p-config {Function} ready(argv) 就緒狀態(tài) * @p-config {Function} dataLoaded(data) 數(shù)據(jù)加載完成后調(diào)用,async為true時有用,也可以為空 * @p-config {Function} cancel(resp) 取消 * @p-config {Function} fail(resp) 失敗 * @p-config {Function} confirm(resp) 成功 * @p-config {Function} all(resp) 無論成功失敗都會執(zhí)行的回調(diào) */ function weixinShareWeibo(data, callbacks) { callbacks = callbacks || {}; var shareWeibo = function (theData) { WeixinJSBridge.invoke('shareWeibo', { "content":theData.desc, "url":theData.link }, function (resp) { switch (resp.err_msg) { // share_weibo:cancel 用戶取消 case 'share_weibo:cancel': callbacks.cancel && callbacks.cancel(resp); break; // share_weibo:confirm 發(fā)送成功 case 'share_weibo:confirm': case 'share_weibo:ok': callbacks.confirm && callbacks.confirm(resp); break; // share_weibo:fail 發(fā)送失敗 case 'share_weibo:fail': default: callbacks.fail && callbacks.fail(resp); break; } // 無論成功失敗都會執(zhí)行的回調(diào) callbacks.all && callbacks.all(resp); }); }; WeixinJSBridge.on('menu:share:weibo', function (argv) { if (callbacks.async && callbacks.ready) { window["_wx_loadedCb_"] = callbacks.dataLoaded || new Function(); if(window["_wx_loadedCb_"].toString().indexOf("_wx_loadedCb_") > 0) { window["_wx_loadedCb_"] = new Function(); } callbacks.dataLoaded = function (newData) { window["_wx_loadedCb_"](newData); shareWeibo(newData); }; // 然后就緒 callbacks.ready && callbacks.ready(argv); } else { // 就緒狀態(tài) callbacks.ready && callbacks.ready(argv); shareWeibo(data); } }); } /** * 新的分享接口 * @param {Object} data 待分享的信息 * @p-config {String} appId 公眾平臺的appId(服務號可用) * @p-config {String} imgUrl 圖片地址 * @p-config {String} link 鏈接地址 * @p-config {String} desc 描述 * @p-config {String} title 分享的標題 * * @param {Object} callbacks 相關(guān)回調(diào)方法 * @p-config {Boolean} async ready方法是否需要異步執(zhí)行,默認false * @p-config {Function} ready(argv,shareTo) 就緒狀態(tài) * @p-config {Function} dataLoaded(data) 數(shù)據(jù)加載完成后調(diào)用,async為true時有用,也可以為空 * @p-config {Function} cancel(resp,shareTo) 取消 * @p-config {Function} fail(resp,shareTo) 失敗 * @p-config {Function} confirm(resp,shareTo) 成功 * @p-config {Function} all(resp,shareTo) 無論成功失敗都會執(zhí)行的回調(diào) */ function weixinGeneralShare(data, callbacks) { callbacks = callbacks || {}; var generalShare = function (general,theData) { // 如果是分享到朋友圈,則需要把title和desc交換一下 if(general.shareTo == 'timeline') { var title = theData.title; theData.title = theData.desc || title; theData.desc = title; } // 分享出去 general.generalShare({ "appid":theData.appId ? theData.appId : '', "img_url":theData.imgUrl, "link":theData.link, "desc":theData.desc, "title":theData.title, "img_width":"640", "img_height":"640" }, function (resp) { switch (resp.err_msg) { // general_share:cancel 用戶取消 case 'general_share:cancel': callbacks.cancel && callbacks.cancel(resp ,general.shareTo); break; // general_share:confirm 發(fā)送成功 case 'general_share:confirm': case 'general_share:ok': callbacks.confirm && callbacks.confirm(resp ,general.shareTo); break; // general_share:fail 發(fā)送失敗 case 'general_share:fail': default: callbacks.fail && callbacks.fail(resp ,general.shareTo); break; } // 無論成功失敗都會執(zhí)行的回調(diào) callbacks.all && callbacks.all(resp ,general.shareTo); }); }; WeixinJSBridge.on('menu:general:share', function (general) { if (callbacks.async && callbacks.ready) { window["_wx_loadedCb_"] = callbacks.dataLoaded || new Function(); if(window["_wx_loadedCb_"].toString().indexOf("_wx_loadedCb_") > 0) { window["_wx_loadedCb_"] = new Function(); } callbacks.dataLoaded = function (newData) { window["_wx_loadedCb_"](newData); generalShare(general,newData); }; // 然后就緒 callbacks.ready && callbacks.ready(general,general.shareTo); } else { // 就緒狀態(tài) callbacks.ready && callbacks.ready(general,general.shareTo); generalShare(general,data); } }); } /** * 加關(guān)注(此功能只是暫時先加上,不過因為權(quán)限限制問題,不能用,如果你的站點是部署在*.qq.com下,也許可行) * @param {String} appWeixinId 微信公眾號ID * @param {Object} callbacks 回調(diào)方法 * @p-config {Function} fail(resp) 失敗 * @p-config {Function} confirm(resp) 成功 */ function addContact(appWeixinId,callbacks){ callbacks = callbacks || {}; WeixinJSBridge.invoke("addContact", { webtype: "1", username: appWeixinId }, function (resp) { var success = !resp.err_msg || "add_contact:ok" == resp.err_msg || "add_contact:added" == resp.err_msg; if(success) { callbacks.success && callbacks.success(resp); }else{ callbacks.fail && callbacks.fail(resp); } }) } /** * 調(diào)起微信Native的圖片播放組件。 * 這里必須對參數(shù)進行強檢測,如果參數(shù)不合法,直接會導致微信客戶端crash * * @param {String} curSrc 當前播放的圖片地址 * @param {Array} srcList 圖片地址列表 */ function imagePreview(curSrc,srcList) { if(!curSrc || !srcList || srcList.length == 0) { return; } WeixinJSBridge.invoke('imagePreview', { 'current' : curSrc, 'urls' : srcList }); } /** * 顯示網(wǎng)頁右上角的按鈕 */ function showOptionMenu() { WeixinJSBridge.call('showOptionMenu'); } /** * 隱藏網(wǎng)頁右上角的按鈕 */ function hideOptionMenu() { WeixinJSBridge.call('hideOptionMenu'); } /** * 顯示底部工具欄 */ function showToolbar() { WeixinJSBridge.call('showToolbar'); } /** * 隱藏底部工具欄 */ function hideToolbar() { WeixinJSBridge.call('hideToolbar'); } /** * 返回如下幾種類型: * * network_type:wifi wifi網(wǎng)絡 * network_type:edge 非wifi,包含3G/2G * network_type:fail 網(wǎng)絡斷開連接 * network_type:wwan 2g或者3g * * 使用方法: * WeixinApi.getNetworkType(function(networkType){ * * }); * * @param callback */ function getNetworkType(callback) { if (callback && typeof callback == 'function') { WeixinJSBridge.invoke('getNetworkType', {}, function (e) { // 在這里拿到e.err_msg,這里面就包含了所有的網(wǎng)絡類型 callback(e.err_msg); }); } } /** * 關(guān)閉當前微信公眾平臺頁面 */ function closeWindow() { WeixinJSBridge.call("closeWindow"); } /** * 當頁面加載完畢后執(zhí)行,使用方法: * WeixinApi.ready(function(Api){ * // 從這里只用Api即是WeixinApi * }); * @param readyCallback */ function wxJsBridgeReady(readyCallback) { if (readyCallback && typeof readyCallback == 'function') { var Api = this; var wxReadyFunc = function () { readyCallback(Api); }; if (typeof window.WeixinJSBridge == "undefined"){ if (document.addEventListener) { document.addEventListener('WeixinJSBridgeReady', wxReadyFunc, false); } else if (document.attachEvent) { document.attachEvent('WeixinJSBridgeReady', wxReadyFunc); document.attachEvent('onWeixinJSBridgeReady', wxReadyFunc); } }else{ wxReadyFunc(); } } } return { version :"2.0", ready :wxJsBridgeReady, shareToTimeline :weixinShareTimeline, shareToWeibo :weixinShareWeibo, shareToFriend :weixinSendAppMessage, generalShare :weixinGeneralShare, addContact :addContact, showOptionMenu :showOptionMenu, hideOptionMenu :hideOptionMenu, showToolbar :showToolbar, hideToolbar :hideToolbar, getNetworkType :getNetworkType, imagePreview :imagePreview, closeWindow :closeWindow }; })();
?? ????. WeChat?? js ??? ???? ?? ??? ??? ??? ??? ????.
? ??? js? ???? WeChat ?? ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP? JS? ???? ?? ?? ??? ??? ?? ?? ?? ??? ?? ???? ?? ???? ?? ?? ????? ??, ??, ??? ?? ???? ??? ???? ??? ?? ????? ??? ? ??? ?????. ??? ?? ??. ? ????? ?? ?? ??? ?? PHP ? JS? ???? ?? ?? ??? ??? ??? ?????. 1. ?? ???? ?? ?? ??? ???? ???. 1. PHP? ???? ?? 2. HTML5 ? Canvas? ???? ???? 3

?? ?? ? ?? ??? ?? ????? ???? ?? ???? ?????. ?? ?? ?? ???? ??? ?? ??? JS???. ? ??????? ?? ?? ? ??? ???? ?? ??? ?? ??? ?? ??? ??? ????. ???? ???? ?? ?? ? ??? ??? ?? ??? ?? ??? ?? ???? ??? ??? ????? ??? ????. ?? ??? ?? ???? ???? ?????. js? ???? ??? ?? ??? ???? ??? ?????? ??? ?? ??? ????? JavaScript, HTML, CSS, WebRTC ? ?? ????? ?? ? ??? ???? ???. ??? ?? ??? ?? ? ???? ??? ????? ???. ? ??? ????? ?? ??? ??? ????.

?? ??? ?? ?? ??: PHP ? JS?? ?? ??? ??? ??? ?????. ???? ??? ??? ???? ?? ??? ?? ????? ??? ?? ? ??? ?????. ????? ???? ????? ?? ??? ???? ????? ??? ??? ?? ?????. PHP? JS? ???? ?? ??? ??? ??? ??? ???? ? ?? ??? ??? ? ??? ?? ?? ???? ??? ?? ? ????. ???? ??? ??? ???? ??? ???? ?? ?????. ??? ?????

JS ? Baidu Map? ???? ?? ? ??? ???? ?? Baidu Map? ?? ??, ?? ?? ? ?? ??? ???? ?? ? ??? ?? ???? ?? ???? ?? ??? ??????. ? ???? JS? Baidu Map API? ???? ?? ?? ??? ???? ??? ???? ???? ?? ??? ?????. 1. ?? ??? ? API? ???? ?? ?? ??? ? ?? ???(http://lbsyun.baidu.com/)?? ??? ??? ???? ??????? ???? ???. ?? ??

JS ? Baidu Maps? ???? ?? ? ?? ??? ???? ?? ??: ???? ??? ??? ??? ???? ??? ???? ?? ????? ?????. ??? ?? ??? ???? ??? ??? ?? ????? ???? ? ??? ? ? ????. ? ????? JS ? Baidu Map API? ???? ?? ??? ??? ???? ??? ???? ???? ?? ??? ?????. ?? ??: ???? ?? Baidu ??? ??, ?????? ??, ?? AP ?? ?? ??? ???? ???.

JS ? Baidu Maps? ???? ?? ?? ??? ?? ??? ???? ?? ??: ? ????? ??? ?? ? ??? ??? ???? ?? ?? ??? ???? ?? ??? ????. ????? ?? ??? ??? ?? ???? ????? ???? ??? ?????. ? ???? JS? Baidu Map API? ???? ??? ?? ??? ?? ??? ???? ??? ???? ???? ?? ??? ?????. ??: Baidu Map API ?? ???? ?? ?? ??? ?? Baidu Map API ??? ??? ? ????.

??? ??? ??? ???? ?? ?? ??? ?? ? ?? ???? ??? ?????. ?? ???? ?? ??? ??? ?? ??? ???? ???? ?? ??? ??? ??? ? ??? ?? ????? ???? ??? ?? ?????. ? ????? PHP? JS? ?? ??? ???? ??? ?? ?? ??? ??? ??? ????? ???? ???? ?? ??? ?????. 1. ?? ?? ??? ?? ?? ?? ??? ??? ??? ???? ?? ?? ?? ??? ?????? ???? ???. ???? ??? ???? ??????.

js? vue? ??: 1. ? ??? ??? JS 2. ????? ???????? Vue.js? ?? 3. JS? Vue? ?? ???? ?? 4. JS? Vue? ?? ?? Vue.
