微信授權登錄提示code-2
appid和appsecret應該是移動應用,而非網頁應用
微信授權登錄提示code:-100/自定義基座無法微信登錄和分享
開發者賬號配置的應用簽名應該是md5加密后的值,而不是原字符串
生產環境proxyTable不生效,導致接口500
兩種解決辦法:
①入口文件使用網絡地址,且和接口在同一域名下
②(推薦)
入口文件依舊是index.html
在config/prod.env和config/dev.env下添加API_ROOT
'use strict'module.exports = { NODE_ENV: '"production"', API_ROOT: '"http://cross.precision-wechat.com"'}在main.js里設置baseUrl
axios.defaults.baseURL = process.env.API_ROOT
css內背景圖片使用相對路徑,打包測試不出現
修改config/index,js內的這一行
// Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', assetsPublicPath: './',
import進來的樣式表沒有被lib-flexible轉為rem
轉換寫法,改為<style scoped src='../../assets/css/formReset.css'></style>
ApplePay沙盒測試登錄app store失敗
不能直接登錄app store,需要在點擊付款時登錄沙盒賬號
微博分享閃退
Dcloud的鍋,在授權失敗時授權層會閃現閃退,授權失敗有兩種情況,1網絡問題授權失敗2你沒安裝新浪微博,要再加一層判斷,如果授權失敗則進行提示。
plus.share.getServices(function(s){ s.forEach(function(item) { if(item.id === 'sinaweibo') { $this.shares = item; } }); if($this.shares.authenticated) { // 已授權 $this.shares.send($this.sinashareMsg, function() { plus.nativeUI.toast($this.langs.SHARE_SUCCESS); }, function(e) { plus.nativeUI.toast($this.langs.SHARE_FAIL); }) }else { // 未授權 $this.shares.authorize(function() { $this.shares.send($this.sinashareMsg, function() { plus.nativeUI.toast($this.langs.SHARE_SUCCESS); }, function(e) { plus.nativeUI.toast($this.langs.SHARE_FAIL); }) }, function(e) { // 授權失敗 plus.nativeUI.toast($this.langs.SHARE_FAIL); }) } }, function(e){ plus.nativeUI.toast(e.message); });IOS真機測試,el-input光標全滿,輸入時錯位
設置line-height=字體大小
iPhone X底部有個安全區,導致fixed+bottom的導航沒有保持在最底部
打包后在index.html`
<meta name="viewport" content="width=device-width,initial-scale=1.0">`的content里加一句`viewport-fit=cover`
使用plus.createWebview創建webview打開第三方鏈接出現的諸多問題
①在打開的連接中執行一段腳本
新聞熱點
疑難解答
圖片精選