当前位置: 首页 > news >正文

社交网站 设计西宁做网站公司电话

社交网站 设计,西宁做网站公司电话,单页网站制作 在线 支付,群晖 搭建wordpressuniapp因为要兼容小程序等#xff0c;会重写wx对象#xff0c;导致引入的jweixin-1.6.0.js中对象不生效。 综合网络资料#xff0c;有两种解决方案#xff1a; 一#xff0c;通过npm工具引入 npm install jweixin-module --save 实际上是借用了wx的另一个对象jWeixin …uniapp因为要兼容小程序等会重写wx对象导致引入的jweixin-1.6.0.js中对象不生效。 综合网络资料有两种解决方案 一通过npm工具引入 npm install jweixin-module --save 实际上是借用了wx的另一个对象jWeixin //main.jsimport jWeixin from jweixin-module Vue.prototype.$wx jWeixin // index.jsthis.$wx.config({debug: true,appId,timestamp,nonceStr,signature,jsApiList, }) this.$wx.ready(() {}) 参考文章uniapp开发h5 调用微信sdk 全网最全指南 血泪史! 二手动引入 鉴于uniapp会重写wx的特性在初始化后可以再手动引入js覆盖原有的wx对象 // 新增模板 template.html !DOCTYPE html html langzh-CNheadmeta charsetutf-8 /meta http-equivX-UA-Compatible contentIEedge /title% htmlWebpackPlugin.options.title %/title!-- Open Graph data --!-- meta propertyog:title contentTitle Here / --!-- meta propertyog:url contenthttp://www.example.com/ / --!-- meta propertyog:image contenthttp://example.com/image.jpg / --!-- meta propertyog:description contentDescription Here / --scriptvar coverSupport CSS in window typeof CSS.supports function (CSS.supports(top: env(a)) || CSS.supports(top: constant(a)))document.write(meta nameviewport contentwidthdevice-width, user-scalableno, initial-scale1.0, maximum-scale1.0, minimum-scale1.0 (coverSupport ? , viewport-fitcover : ) /)/scriptlink relstylesheet href% BASE_URL %static/index.% VUE_APP_INDEX_CSS_HASH %.css //headbodynoscriptstrongPlease enable JavaScript to continue./strong/noscriptdiv idapp/div!-- built files will be auto injected --/body!-- scriptwindow.wx {}/scriptscript typetext/javascript srchttp://res.wx.qq.com/open/js/jweixin-1.2.0.js/script -- /html// manifest.json h5 : {optimization : {treeShaking : {enable : true}},sdkConfigs : {maps : {}},router : {// base : /process-client/,mode : history},devServer : {disableHostCheck : true,proxy : {/api : {target : http://xxx.xx.xxx.xxx:xxx,changeOrigin : true,secure : false,logLevel : debug,pathRewrite : {^/api : }}},https : false},template : template.html} // utils/wx-sdk.jsexport const createdScript (callback) {window.wx nullconst script1 document.createElement(script)script1.setAttribute(type, text/javascript)script1.setAttribute(src, https://res.wx.qq.com/open/js/jweixin-1.2.0.js)document.head.appendChild(script1)script1.onload function () {window.wx window.jWeixincallback callback()} }// App.vuescript import { createdScript } from /utils/wx-sdk.js export default {onShow: function () {console.log(App Show)createdScript(() {api({url: window.location.href}).then(([err, res]) {if (err) {return}wx.config({debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。appId: res.appId, // 必填企业微信的corpIDtimestamp: Number(res.timestamp), // 必填生成签名的时间戳nonceStr: res.nonceStr, // 必填生成签名的随机串signature: res.signature, // 必填签名见 附录-JS-SDK使用权限签名算法jsApiList: []})})})}, } /script
http://www.zqtcl.cn/news/217653/

相关文章:

  • 合肥做网站的公司百度做兼职去哪个网站
  • 重庆市城市建设规划官方网站一款app从开发到上线的流程
  • 微网站开发难吗登录qq网页版
  • 网站不备案能解析吗网站开发项目中职责
  • 三优科技 网站开发网站开发实训报告总结
  • 离线推广网站规划书常用的网站都有哪些
  • 成都 视频网站建设网站邮件推送
  • 深圳均安网站制作温州网站优化案例
  • 做网站需要哪些流程网站建设中项目经理的职责
  • 专业低价建设微网站微商城怎么样在wordpress上添加播放视频
  • 网站制作经费预算表域名备案信息查询系统
  • 苏州网站建设找苏州聚尚网络推荐南昌个人网站制作怎么做
  • 普法网站建设wordpress伪静态404错误
  • 易语言如何做浏网站湛江高端网站开发
  • 窦各庄网站建设wordpress 意见反馈
  • 建站公司还有前途吗海拉尔做网站的公司
  • 素材网站有哪些如何做简单视频网站
  • 如何做网站公证宁波网站建设公司比较好
  • 网站建设公司行情新网站建设风格
  • 30天网站建设实录 pdf微信分销工具
  • 深圳电子商务网站 开发招标文件范本
  • 常州网站制作包括哪些网站商城模板
  • wordpress下拉式菜单哈尔滨seo优化公司
  • 网站添加百度地图标注怎么在百度免费推广
  • 如何用照片做模板下载网站南京做网站seo的
  • 网站建设平台方案设计删除网站内容
  • 建设部人才交流中心网站wordpress theauthor
  • 物联网网站开发公司比较还做的调查网站
  • 网站建设教程 冰美人视频全国网站建设排名
  • 对网站策划的看法公司宣传册设计与制作图片