diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1006f0a --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +miniprogram_npm +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/app.js b/app.js index 5ecbfa1..1ab7d35 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,11 @@ import userApi from './api/user'; import commonApi from './api/common'; +// import Push from '@tencentcloud/donut-push'; const token = wx.getStorageSync('accessToken'); -console.log(1) App({ verifyCodeWaitingTime:60, onLaunch() { + // this.registerPush = registerPush; wx.setInnerAudioOption({ obeyMuteSwitch:false }); @@ -147,3 +148,27 @@ App({ summary:null } }) + + +const registerPush = ()=>{ + const sdkAppID = 0; // 消息推送 SDKAppID + const appKey = ''; // 消息推送 客户端密钥 + return new Promise((resolve) => { + Push.setRegistrationID(userid) + .then((res) => { + console.info("设置注册用户ID", res); + return Push.registerPush(sdkAppID, appKey); + }).then((res) => { + console.info("注册推送服务", res); + return Push.getRegistrationID(); + }).then((res) => { + console.info("完成注册", res); + resolve(true) + }) + .catch((e) => { + console.error("注册失败", e); + resolve(true) + }); + Push.addPushListener(Push.EventName.ON_NOTIFICATION_CLICKED, ); + }) +} \ No newline at end of file diff --git a/app.wxss b/app.wxss index 47127aa..b83b1e1 100644 --- a/app.wxss +++ b/app.wxss @@ -397,6 +397,9 @@ switch .wx-switch-input::after { height: 40rpx; } +img-uploader{ + display: block; +} diff --git a/components/img-uploader/index.wxss b/components/img-uploader/index.wxss index c639ea4..2a4239b 100644 --- a/components/img-uploader/index.wxss +++ b/components/img-uploader/index.wxss @@ -1,6 +1,3 @@ -img-uploader{ - display: block; -} .img-area{ display: flex; flex-wrap: wrap; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9c7da53 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "beefast-mini-deliveryman", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "beefast-mini-deliveryman", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@tencentcloud/donut-push": "^8.4.1" + } + }, + "node_modules/@tencentcloud/donut-push": { + "version": "8.4.1", + "resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz", + "integrity": "sha512-i/gnO3OuYjWCNU0x2u7aI6FK6+dH+iK+wKDKmgD6X2p0tpkJpQ4XFvxe42GC8rQ+UYcgIHCoWVv738uRymmUdQ==" + } + }, + "dependencies": { + "@tencentcloud/donut-push": { + "version": "8.4.1", + "resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz", + "integrity": "sha512-i/gnO3OuYjWCNU0x2u7aI6FK6+dH+iK+wKDKmgD6X2p0tpkJpQ4XFvxe42GC8rQ+UYcgIHCoWVv738uRymmUdQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a95f7e9 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "beefast-mini-deliveryman", + "version": "1.0.0", + "description": "", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://git.ibtc.work/deliveryman/beefast-mini-deliveryman.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@tencentcloud/donut-push": "^8.4.1" + } +} diff --git a/pages/index/index.wxss b/pages/index/index.wxss index a0f782e..97d1a34 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -514,6 +514,7 @@ padding:0 20rpx; font-size: 24rpx; color: #555555; + margin:0; } .left-panel .actions .item.button{ font-weight: normal; diff --git a/project.config.json b/project.config.json index 79a9651..a04d956 100644 --- a/project.config.json +++ b/project.config.json @@ -1,4 +1,5 @@ { + "miniprogramRoot": "./", "compileType": "miniprogram", "libVersion": "trial", "packOptions": { @@ -12,7 +13,13 @@ "minified": true, "enhance": true, "showShadowRootInWxmlPanel": true, - "packNpmRelationList": [], + "packNpmManually": true, + "packNpmRelationList": [ + { + "packageJsonPath": "./package.json", + "miniprogramNpmDistDir": "./" + } + ], "babelSetting": { "ignore": [], "disablePlugins": [], @@ -28,6 +35,6 @@ "appid": "wxcc9b05f43951f1c0", "projectArchitecture": "multiPlatform", "simulatorPluginLibVersion": { - "wxext14566970e7e9f62": "3.6.5-25" + "wxext14566970e7e9f62": "3.6.5-24" } } \ No newline at end of file