diff --git a/project.config.json b/project.config.json index f6772f8..5634447 100644 --- a/project.config.json +++ b/project.config.json @@ -1,75 +1,75 @@ -{ - "description": "项目配置文件", - "miniprogramRoot": "src/", - "compileType": "miniprogram", - "setting": { - "useCompilerPlugins": [ - "typescript", - "sass" - ], - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "coverView": false, - "postcss": false, - "minified": false, - "enhance": true, - "showShadowRootInWxmlPanel": false, - "packNpmManually": true, - "packNpmRelationList": [ - { - "packageJsonPath": "package.json", - "miniprogramNpmDistDir": "./src" - } - ], - "ignoreUploadUnusedFiles": true, - "compileHotReLoad": false, - "skylineRenderEnable": true, - "es6": true, - "compileWorklet": false, - "uglifyFileName": false, - "uploadWithSourceMap": true, - "minifyWXSS": true, - "minifyWXML": true, - "localPlugins": false, - "disableUseStrict": false, - "condition": false, - "swc": false, - "disableSWC": true - }, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": {}, - "srcMiniprogramRoot": "src/", - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - }, - "libVersion": "3.7.7", - "ignore": [], - "packOptions": { - "ignore": [ - { - "value": "/images/*.*", - "type": "glob" - }, - { - "value": "/images/**/*.*", - "type": "glob" - }, - { - "value": "/images/**/**/*.*", - "type": "glob" - } - ], - "include": [ - { - "value": "/images/tabbar/*.*", - "type": "glob" - } - ] - }, - "appid": "wxf9ce8010f1ad24aa" -} +{ + "description": "项目配置文件", + "miniprogramRoot": "src/", + "compileType": "miniprogram", + "setting": { + "useCompilerPlugins": [ + "typescript", + "sass" + ], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "coverView": false, + "postcss": false, + "minified": false, + "enhance": true, + "showShadowRootInWxmlPanel": false, + "packNpmManually": true, + "packNpmRelationList": [ + { + "packageJsonPath": "package.json", + "miniprogramNpmDistDir": "./src" + } + ], + "ignoreUploadUnusedFiles": true, + "compileHotReLoad": false, + "skylineRenderEnable": true, + "es6": true, + "compileWorklet": false, + "uglifyFileName": false, + "uploadWithSourceMap": true, + "minifyWXSS": true, + "minifyWXML": true, + "localPlugins": false, + "disableUseStrict": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": {}, + "srcMiniprogramRoot": "src/", + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "libVersion": "3.7.7", + "ignore": [], + "packOptions": { + "ignore": [ + { + "value": "/images/*.*", + "type": "glob" + }, + { + "value": "/images/**/*.*", + "type": "glob" + }, + { + "value": "/images/**/**/*.*", + "type": "glob" + } + ], + "include": [ + { + "value": "/images/tabbar/*.*", + "type": "glob" + } + ] + }, + "appid": "wx71ac9c27c3c3e3f4" +} \ No newline at end of file diff --git a/src/app.ts b/src/app.ts index 0526c95..f293c9d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -16,15 +16,15 @@ App({ // 测试号 wx2b0bb13edf717c1d // dev // appid:wxf9ce8010f1ad24aa - url: 'https://m.xd.hbraas.com', - upFileUrl: 'https://m.xd.hbraas.com/', - imageUrl: 'https://m.xd.hbraas.com/xd/', + // url: 'https://m.xd.hbraas.com', + // upFileUrl: 'https://m.xd.hbraas.com/', + // imageUrl: 'https://m.xd.hbraas.com/xd/', // pro // appid:wx71ac9c27c3c3e3f4 - // url: 'https://m.xd.hbsaas.com', - // upFileUrl: 'https://m.xd.hbsaas.com/', - // imageUrl: 'https://m.xd.hbsaas.com/api/xd/', + url: 'https://m.xd.hbsaas.com', + upFileUrl: 'https://m.xd.hbsaas.com/', + imageUrl: 'https://m.xd.hbsaas.com/api/xd/', loginState: '', isLogin: 0, diff --git a/src/images/icon23.png b/src/images/icon23.png new file mode 100644 index 0000000..59645f6 Binary files /dev/null and b/src/images/icon23.png differ diff --git a/src/images/title5.png b/src/images/title5.png index c840e6e..d50492b 100644 Binary files a/src/images/title5.png and b/src/images/title5.png differ diff --git a/src/pages/home/index.scss b/src/pages/home/index.scss index a1aaafb..d183f80 100644 --- a/src/pages/home/index.scss +++ b/src/pages/home/index.scss @@ -113,9 +113,21 @@ page { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; - -webkit-line-clamp: 3; + -webkit-line-clamp: 2; -webkit-box-orient: vertical; } + .more { + margin-top: 12rpx; + display: flex; + align-items: center; + gap: 10rpx; + font-size: 30rpx; + color: rgba(185, 130, 255, 1); + .icon { + width: 32rpx; + height: 32rpx; + } + } } .item2 { padding: 32rpx; @@ -290,16 +302,25 @@ page { height: 68rpx; } } - .num-line { + .wrap { display: flex; - align-items: baseline; - font-size: 72rpx; - color: rgba(185, 130, 255, 1); - font-weight: bold; - .sub { - margin-left: 10rpx; - font-size: 32rpx; - color: rgba(33, 29, 46, 1); + justify-content: space-between; + .num-line { + display: flex; + align-items: baseline; + font-size: 72rpx; + color: rgba(185, 130, 255, 1); + font-weight: bold; + .sub { + margin-left: 10rpx; + font-size: 32rpx; + color: rgba(33, 29, 46, 1); + } + } + .icon { + margin-top: 50rpx; + width: 32rpx; + height: 32rpx; } } .name { @@ -437,7 +458,7 @@ page { align-items: center; justify-content: space-between; .title { - width: 156rpx; + width: 210rpx; height: 44rpx; } .more { @@ -462,6 +483,7 @@ page { .photo { width: 100%; height: 304rpx; + display: block; border-radius: 32rpx 32rpx 0 0; } .content { @@ -470,8 +492,12 @@ page { box-sizing: border-box; background-color: #fff; border-radius: 0 0 32rpx 32rpx; + display: flex; + align-items: center; + justify-content: center; .center { - font-size: 28rpx; + font-size: 32rpx; + line-height: 44rpx; color: rgba(33, 29, 46, 1); overflow: hidden; text-overflow: ellipsis; diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index 12da163..d63b1aa 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -205,6 +205,54 @@ Page({ url: `/pages/informationDetail/index?id=${id}`, }); }, + handleSop(e) { + const { index } = e.currentTarget.dataset; + const { Id, FileList } = this.data.sopList[index]; + const params: any = FileList[0]; + if (!params) { + return; + } + wx.showLoading({ + title: '加载中', + mask: true, + }); + app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: Id as string }); + wx.downloadFile({ + url: params.FileUrl, + filePath: `${wx.env.USER_DATA_PATH}/${params.FileName}`, + success: (res) => { + if (res.statusCode === 200) { + wx.openDocument({ + showMenu: false, + filePath: res.filePath, + success: () => { + wx.hideLoading(); + }, + fail: () => { + wx.showToast({ + title: '下载文件失败', + icon: 'none', + }); + wx.hideLoading(); + }, + }); + } else { + wx.hideLoading(); + wx.showToast({ + title: '下载文件失败', + icon: 'none', + }); + } + }, + fail() { + wx.hideLoading(); + wx.showToast({ + title: '下载文件失败', + icon: 'none', + }); + }, + }); + }, handleMore() { wx.switchTab({ url: '/pages/information/index', diff --git a/src/pages/home/index.wxml b/src/pages/home/index.wxml index 56705c3..f344edc 100644 --- a/src/pages/home/index.wxml +++ b/src/pages/home/index.wxml @@ -23,7 +23,7 @@ - + {{item.Content}} + + 点击查看 + + @@ -61,9 +65,12 @@ - - {{item.Composite}} - 例入组 + + + {{item.Composite}} + 例入组 + + {{item.Content}} @@ -188,7 +195,7 @@ - + {{item.Title}} diff --git a/src/pages/informationDetail/index.scss b/src/pages/informationDetail/index.scss index 61e6714..a5f61ad 100644 --- a/src/pages/informationDetail/index.scss +++ b/src/pages/informationDetail/index.scss @@ -32,7 +32,7 @@ } } .file-card { - margin-top: 32rpx; + margin-top: 16rpx; padding: 22rpx 32rpx; background: linear-gradient(352deg, #f7f6fa 0%, #f2edff 100%); border-radius: 24rpx 24rpx 24rpx 24rpx; @@ -41,6 +41,8 @@ justify-content: space-between; gap: 24rpx; .icon { + align-self: flex-start; + flex-shrink: 0; width: 84rpx; height: 84rpx; } diff --git a/src/pages/informationDetail/index.ts b/src/pages/informationDetail/index.ts index 257ddeb..33d1152 100644 --- a/src/pages/informationDetail/index.ts +++ b/src/pages/informationDetail/index.ts @@ -53,12 +53,14 @@ Page({ }); }); }, - handlePopup() { + handlePopup(e) { + const { index } = e.currentTarget.dataset; this.setData({ popupShow: true, popupType: 'popup5', popupParams: { position: 'bottom', + index, }, }); }, @@ -75,15 +77,19 @@ Page({ }); }, handleDownload() { - const { detail } = this.data; + const { + detail, + popupParams: { index }, + } = this.data; + const params = detail.FileList[index]; wx.showLoading({ title: '加载中', mask: true, }); app.mpBehavior({ PositionId: '1', OperateType: '2', OperateId: detail.Id as string }); wx.downloadFile({ - url: detail.FileUrl, - filePath: `${wx.env.USER_DATA_PATH}/${detail.FileName}`, + url: params.FileUrl, + filePath: `${wx.env.USER_DATA_PATH}/${params.FileName}`, success: (res) => { if (res.statusCode === 200) { wx.openDocument({ diff --git a/src/pages/informationDetail/index.wxml b/src/pages/informationDetail/index.wxml index 33990f5..a02de57 100644 --- a/src/pages/informationDetail/index.wxml +++ b/src/pages/informationDetail/index.wxml @@ -7,11 +7,11 @@ {{detail.ReadCount}} - - + + - {{detail.FileName}} - {{detail.FileSizeName}} + {{item.FileName}} + {{item.FileSizeName}} 下载 diff --git a/src/pages/message/index.scss b/src/pages/message/index.scss index 34aef78..3ac283e 100644 --- a/src/pages/message/index.scss +++ b/src/pages/message/index.scss @@ -2,7 +2,7 @@ page { background-color: rgba(246, 248, 249, 1); } .page { - padding: 32rpx 30rpx; + padding: 32rpx 30rpx 0; .card { position: relative; padding: 32rpx 120rpx 32rpx 32rpx; @@ -26,6 +26,18 @@ page { font-size: 32rpx; color: rgba(33, 29, 46, 1); } + .more { + margin-top: 16rpx; + display: flex; + align-items: center; + gap: 20rpx; + font-size: 30rpx; + color: rgba(185, 130, 255, 1); + .icon { + width: 32rpx; + height: 32rpx; + } + } .status1 { margin-top: 38rpx; font-size: 40rpx; @@ -65,16 +77,26 @@ page { height: 36rpx; } } - .num-line { + .num-wrap { display: flex; - align-items: baseline; - font-size: 72rpx; - color: rgba(185, 130, 255, 1); - font-weight: bold; - .sub { - margin-left: 10rpx; - font-size: 32rpx; - color: rgba(33, 29, 46, 1); + gap: 10rpx; + .num-line { + display: flex; + align-items: baseline; + font-size: 72rpx; + color: rgba(185, 130, 255, 1); + font-weight: bold; + .sub { + margin-left: 10rpx; + font-size: 32rpx; + color: rgba(33, 29, 46, 1); + } + } + .icon { + margin-top: 50rpx; + margin-left: 20rpx; + width: 32rpx; + height: 32rpx; } } .name { @@ -84,4 +106,11 @@ page { line-height: 44rpx; } } + + .bottom { + margin: 56rpx auto 0; + display: block; + width: 234rpx; + height: 86rpx; + } } diff --git a/src/pages/message/index.wxml b/src/pages/message/index.wxml index df8b1f6..b42cbbc 100644 --- a/src/pages/message/index.wxml +++ b/src/pages/message/index.wxml @@ -8,12 +8,19 @@ {{item.Content}} + + 点击查看 + + - - {{item.Composite}} - 例入组 + + + {{item.Composite}} + 例入组 + + {{item.Content}} @@ -47,4 +54,6 @@ + +