wepyjs / wepy-wechat-demo Goto Github PK
View Code? Open in Web Editor NEWwepy仿微信聊天界面
License: MIT License
wepy仿微信聊天界面
License: MIT License
我在本地调试,tab能切换过去,远程调试也可以,但预览的话,tab就切换不了页面了,这是什么原因?
按照readme操作后,用微信开发者工具导入dist目录,如果项目详情本地设置中将JS编译为ES5,会报错:
app.js错误: TypeError: Cannot set property 'Promise' of undefined at index.js? [sm]:14 at WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1 at d.runWith (WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1) at V (WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1) at r (WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1) at app.js? [sm]:4 at WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1 at d.runWith (WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1) at V (WASubContext.js?t=wechat&s=1706771605796&v=3.3.4:1) at VM589 appservice.js:7(env: Windows,mp,1.06.2401020; lib: 3.3.4)
如题
请问是不是没有上传全局控制文件app.jason ?
When I use wepy.request, it throws this error:
Cannot read property 'then' of undefined;at App lifeCycleMethod onLaunch function
不更新了吗?能改成客服接待吗?
Cloning into 'wepy-wechat-demo'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
macos上安装运行之后的样式全乱掉了啊?wpy文件中的样式没有编译打包到wxss中。
没看到tabBar相关的配置
VM137:1 thirdScriptError
sdk uncaught third Error
Cannot set property 'Promise' of undefined
TypeError: Cannot set property 'Promise' of undefined
at http://127.0.0.1:50701/appservice/npm/wepy-async-function/index.js:15:11
at require (http://127.0.0.1:50701/appservice/__dev__/WAService.js:18:26712)
at http://127.0.0.1:50701/appservice/__dev__/WAService.js:18:26461
at http://127.0.0.1:50701/appservice/app.js:23:1
at require (http://127.0.0.1:50701/appservice/__dev__/WAService.js:18:26712)
at http://127.0.0.1:50701/appservice/appservice:1047:9
就是混淆代码,让生成的代码不容易被理解、修改。
请问怎么实现?
如题。
微信小程序开发工具打开的打包后的文件。
如果我想断点看js里面的值,请问如何操作的呢?
抱歉,误报。请close
WAService.js:3 Uncaught Error: module "npm/babel-runtime/regenerator/index.js" is not defined
WAService.js:3 Uncaught Error: module "npm/babel-runtime/core-js/object/get-prototype-of.js" is not defined
点击某人进入聊天界面总是报这个错:
WAService.js:10 navigateTo with an already exist webviewId 348
请问这个是什么问题呢?
如果当前的tab有列表在滑动,此时点击其他tab的时候不会立即切换,请问有什么解决办法吗
git clone
npm install
wepy build
wepy-cli版本 1.7.3
报错如下:
/Users/huixisheng/WorkspacesLab/wepy-wechat-demo/src/app.wpy
38:16 error Missing space before value for key 'globalData' key-spacing
✖ 1 problem (1 error, 0 warnings)
/usr/local/lib/node_modules/wepy-cli/lib/compile-wpy.js:478
var mainPages = wpy.config.pages.map(function (v) {
^
TypeError: Cannot read property 'map' of undefined
at Object.compile (/usr/local/lib/node_modules/wepy-cli/lib/compile-wpy.js:478:46)
https://github.com/Tencent/wepy/tree/2.0.x/packages/cli
npm link
命令修改为wepy2
➜ wepy-wechat-demo git:(2.0) ✗ wepy2 build
[15:47:58] ERR! init Make sure module "@wepy/compiler-sass" is installed. If not please try "npm install @wepy/compiler-sass --save-dev".
[15:47:58] ERR! init Can't resolve '@wepy/compiler-sass' in '/Users/huixisheng/WorkspacesLab/wepy-wechat-demo'
[15:47:58] ERR! init Make sure module "@wepy/compiler-babel" is installed. If not please try "npm install @wepy/compiler-babel --save-dev".
[15:47:58] ERR! init Can't resolve '@wepy/compiler-babel' in '/Users/huixisheng/WorkspacesLab/wepy-wechat-demo'
[15:47:58] ERR! init Initialize failed
@wepy/compiler-sass
包没有发布,手动安装。建议官方发布下
[15:49:43] ERR! babel Message:
[15:49:43] ERR! babel Plugin/Preset files are not allowed to export objects, only functions. In /Users/huixisheng/WorkspacesLab/wepy-wechat-demo/node_modules/babel-preset-es2015/lib/index.js
[15:49:43] ERR! babel File:
[15:49:43] ERR! babel /Users/huixisheng/WorkspacesLab/wepy-wechat-demo/src/app.wpy
[15:49:43] ERR! Plugin/Preset files are not allowed to export objects, only functions. In /Users/huixisheng/WorkspacesLab/wepy-wechat-demo/node_modules/babel-preset-es2015/lib/index.js
[15:49:43] ERR! compile Compile failed. Add "--log trace" to see more details
修改
babel: {
sourceMap: true,
presets: [
"@babel/preset-env",
// "es2015",
// "stage-1"
],
[15:51:34] ERR! Can't resolve '@wepy/use-promisify' in '/Users/huixisheng/WorkspacesLab/wepy-wechat-demo/src'
[15:51:34] ERR! compile Compile failed. Add "--log trace" to see more details
手动安装 @wepy/use-promisify
[15:52:58] info vendor building vendor
[15:52:58] ERR! TypeError: Cannot read property 'forEach' of undefined
[15:52:58] ERR! at Compile.scriptDepFix (/Users/huixisheng/WorkspacesLab/wepy/packages/cli/core/plugins/scriptDepFix.js:7:24)
[15:52:58] ERR! at forEach (/Users/huixisheng/WorkspacesLab/wepy/packages/cli/core/hook.js:34:20)
[15:52:58] ERR! at Array.forEach (<anonymous>)
[15:52:58] ERR! at Compile.hookSeq
...
(/Users/huixisheng/WorkspacesLab/wepy/packages/cli/core/compile.js:243:29)\n at <anonymous>' }
[15:52:58] ERR! compile Compile failed.
添加判断
if (Array.isArray(parsed.parser.deps)) {
parsed.parser.deps.forEach((dep, i) => {
编译通过,预览有报错
wepy如何引入第三方css,比如weui?
之前也有使用h5+css3实现了个仿微信聊天室项目,可以看看。挺不错的一个项目
https://www.cnblogs.com/xiaoyan2017/p/9266179.html
return binding.readdir(pathModule._makeLong(path), options.encoding);
^
Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:945:18)
at Object.getInstalledBinaries (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/extensions.js:121:13)
at foundBinariesList (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/usr/local/lib/node_modules/wepy-cli/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.