Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信小程序编译不稳定 #92

Open
liushuai05 opened this issue Dec 5, 2023 · 0 comments
Open

微信小程序编译不稳定 #92

liushuai05 opened this issue Dec 5, 2023 · 0 comments

Comments

@liushuai05
Copy link

liushuai05 commented Dec 5, 2023

我在编译微信小程序的时候发现编译非常不稳定,很多时候编译出来无法直接预览到小程序开发工具上,提示缺少文件什么的,这些都还好重新编译就可以了,直到后来我遇到一个炸列的问题,就是我引入了微信ocr身份证识别,出现了一个很奇怪的问题,本地dev:mp-weixin运行出来能正常识别身份证,但是线上始终无法识别,后来将build:mp-weixin出来的文件直接用小程序开发者工具跑起来发现和线上一样无法识别,各种折腾,最后发现 在build:mp-weixin加上--watch后等编译完成,然后再修改一次文件(触发一下差量编译)等编译完成,居然能在小程序开发者工具中正常测试识别到身份证信息,希望官方合适一下是否存在该问题,非常感谢

下面是我的package.json文件信息

 "dependencies": {
    "@dcloudio/uni-app": "^2.0.2-3080420230530001",
    "@dcloudio/uni-app-plus": "^2.0.2-3080420230530001",
    "@dcloudio/uni-h5": "^2.0.2-3080420230530001",
    "@dcloudio/uni-i18n": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-360": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-alipay": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-baidu": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-jd": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-kuaishou": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-lark": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-qq": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-toutiao": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-vue": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-weixin": "^2.0.2-3080420230530001",
    "@dcloudio/uni-mp-xhs": "^2.0.2-3080420230530001",
    "@dcloudio/uni-quickapp-native": "^2.0.2-3080420230530001",
    "@dcloudio/uni-quickapp-webview": "^2.0.2-3080420230530001",
    "@dcloudio/uni-stacktracey": "^2.0.2-3080420230530001",
    "@dcloudio/uni-stat": "^2.0.2-3080420230530001",
    "@vue/shared": "^3.0.0",
    "babel-loader": "^9.1.3",
    "core-js": "^3.8.3",
    "flyio": "^0.6.2",
    "miniprogram-ci": "^1.9.8",
    "miniprogram-file-uploader": "^1.0.0",
    "mpvue-wxparse": "^0.6.5",
    "qqmap-wx-jssdk": "^1.0.0",
    "vue": ">= 2.6.14 < 2.7",
    "wxml2canvas": "^1.0.1"
  },
  "devDependencies": {
    "@dcloudio/types": "^3.3.2",
    "@dcloudio/uni-automator": "^2.0.2-3080420230530001",
    "@dcloudio/uni-cli-i18n": "^2.0.2-3080420230530001",
    "@dcloudio/uni-cli-shared": "^2.0.2-3080420230530001",
    "@dcloudio/uni-helper-json": "*",
    "@dcloudio/uni-migration": "^2.0.2-3080420230530001",
    "@dcloudio/uni-template-compiler": "^2.0.2-3080420230530001",
    "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.2-3080420230530001",
    "@dcloudio/vue-cli-plugin-uni": "^2.0.2-3080420230530001",
    "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.2-3080420230530001",
    "@dcloudio/webpack-uni-mp-loader": "^2.0.2-3080420230530001",
    "@dcloudio/webpack-uni-pages-loader": "^2.0.2-3080420230530001",
    "@vue/babel-preset-app": "^5.0.8",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "babel-plugin-import": "^1.11.0",
    "cross-env": "^7.0.2",
    "jest": "^25.4.0",
    "mini-types": "*",
    "miniprogram-api-typings": "*",
    "miniprogram-ci": "^1.9.8",
    "postcss-comment": "^2.0.0",
    "sass": "^1.49.8",
    "sass-loader": "^8.0.2",
    "vue-template-compiler": ">= 2.6.14 < 2.7"
  },

下面是manifest.json相关配置

"mp-weixin": {
    "appid": "wx59e1f2c08c23b166",
    "setting": {
      "urlCheck": false
    },
    "permission": {
      "scope.userLocation": {
        "desc": "你的位置信息将用于小程序定位"
      }
    },
    "requiredPrivateInfos":[
      "getLocation"
    ],
    "plugins": {
      "ocr-plugin": {
        "version": "3.1.5", 
        "provider": "wx4418e3e031e551be"
      }
    },
    "usingComponents": {
      "ocr-navigator": "plugin://ocr-plugin/ocr-navigator"
    }
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant