diff --git a/app.js b/app.js index f48f8cf..435128c 100644 --- a/app.js +++ b/app.js @@ -178,7 +178,7 @@ App({ }, globalData:{ userInfo:null, - apiurl:"http://localhost:24382",//"http://localhost:8080",//http://localhost:24382 //https://vip.agqyjs.com + apiurl:"https://vip.agqyjs.com",//"http://localhost:8080",//http://localhost:24382 //https://vip.agqyjs.com IFRefreshCart:0, IFRefreshsell:0, IFRefreshsell0:0, diff --git a/app.json b/app.json index ead1a24..2cab830 100644 --- a/app.json +++ b/app.json @@ -68,7 +68,7 @@ "backgroundTextStyle": "light", "navigationBarTextStyle": "white", "navigationBarTitleText": "仁E森命", - "navigationBarBackgroundColor": "#1E88E5", + "navigationBarBackgroundColor": "#96C6F5", "backgroundColor": "#F2f2f2", "enablePullDownRefresh": true }, diff --git a/images/2wm_bg.png b/images/2wm_bg.png index 4828c49..77c8300 100644 Binary files a/images/2wm_bg.png and b/images/2wm_bg.png differ diff --git a/images/logo.png b/images/logo.png index 2684cf9..294f1bd 100644 Binary files a/images/logo.png and b/images/logo.png differ diff --git a/images/mydata0_ico0.png b/images/mydata0_ico0.png deleted file mode 100644 index 126bdc9..0000000 Binary files a/images/mydata0_ico0.png and /dev/null differ diff --git a/images/mydata0_ico1.png b/images/mydata0_ico1.png deleted file mode 100644 index 42e3a1c..0000000 Binary files a/images/mydata0_ico1.png and /dev/null differ diff --git a/images/mydata0_ico2.png b/images/mydata0_ico2.png deleted file mode 100644 index f65bae7..0000000 Binary files a/images/mydata0_ico2.png and /dev/null differ diff --git a/images/mydata0_ico3.png b/images/mydata0_ico3.png deleted file mode 100644 index 703a5f1..0000000 Binary files a/images/mydata0_ico3.png and /dev/null differ diff --git a/images/mydata0_ico4.png b/images/mydata0_ico4.png deleted file mode 100644 index 64a705f..0000000 Binary files a/images/mydata0_ico4.png and /dev/null differ diff --git a/images/mydata0_ico5.png b/images/mydata0_ico5.png deleted file mode 100644 index f7c6e88..0000000 Binary files a/images/mydata0_ico5.png and /dev/null differ diff --git a/images/mydata0_ico6.png b/images/mydata0_ico6.png deleted file mode 100644 index 700c055..0000000 Binary files a/images/mydata0_ico6.png and /dev/null differ diff --git a/images/mydata0_ico7.png b/images/mydata0_ico7.png deleted file mode 100644 index e5a8409..0000000 Binary files a/images/mydata0_ico7.png and /dev/null differ diff --git a/pages/articledetail/index.js b/pages/articledetail/index.js index 62f7ee4..26fa7c2 100644 --- a/pages/articledetail/index.js +++ b/pages/articledetail/index.js @@ -32,7 +32,8 @@ Page( { "content-type": "application/json" // 默认值 }, success (res) { - WxParse.wxParse('body', 'html', res.data.content, that); + let content = res.data.content; + WxParse.wxParse('body', 'html', content, that); if(res.data.type==6||res.data.type==7){ wx.setNavigationBarTitle({ title: res.data.title diff --git a/pages/articledetail/index.wxss b/pages/articledetail/index.wxss index d389d8b..5958714 100644 --- a/pages/articledetail/index.wxss +++ b/pages/articledetail/index.wxss @@ -14,34 +14,78 @@ page{ width:100%; background-color:#fff; box-sizing: border-box; - overflow: hidden; } .shopping_container .title{ - margin: 20rpx 0; + margin: 40rpx 0 30rpx 0; width:100%; text-align: center; font-weight: bold; - color: #333; + font-size: 40rpx; + color: #222; + letter-spacing: 2rpx; } .shopping_container .wxParse{ position: relative; - float: left; padding: 0; width:100%; - text-align: center; + text-align: left; box-sizing: border-box; - overflow: hidden; } -.shopping_container .wxParse view{ - text-indent: 2em; + +/* h1标题居中 - 使用flex布局确保子元素同行 */ +.shopping_container .wxParse .wxParse-h1 { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: baseline; + margin: 10px 0 !important; + padding: 0 !important; } + +.shopping_container .wxParse .wxParse-h1 view, +.shopping_container .wxParse .wxParse-h1 .wxParse-inline, +.shopping_container .wxParse .wxParse-h1 .WxEmojiView { + display: inline-block !important; +} + +/* h2标题 */ +.shopping_container .wxParse .wxParse-h2 { + text-align: left !important; + font-size: 36rpx !important; + font-weight: bold !important; + margin: 40rpx 0 20rpx 0 !important; + color: #222; + letter-spacing: 1rpx; +} + +/* 正文段落 - 优化排版 */ +.shopping_container .wxParse .wxParse-p { + display: flex; + flex-wrap: wrap; + align-items: baseline; + text-align: justify; + line-height: 2.2; + margin: 32rpx 0; + font-size: 32rpx; + color: #333; + letter-spacing: 1rpx; +} + +/* 段落内的所有view都使用inline-block,防止flex干扰 */ +.shopping_container .wxParse .wxParse-p view, +.shopping_container .wxParse .wxParse-p .wxParse-inline, +.shopping_container .wxParse .wxParse-p .WxEmojiView { + display: inline-block !important; + float: none !important; + line-height: 2.2; +} + .shopping_container .wxParse image{ position: relative; float: left; width:100%; } .shopping_container .wxParse img{ - width:100%; } .shopping_container .wxParse video{ @@ -53,5 +97,3 @@ page{ .shopping_container .wxParse.shuping video{ height:35em; } - - diff --git a/pages/index/index.js b/pages/index/index.js index 245c62f..c24b36b 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -29,6 +29,7 @@ var mp3data = null; var mp3index = 0; Page({ data: { + statusBarHeight: 0, indicatorDots: true, indicatorDots0: true, ifxn: 0, @@ -147,6 +148,16 @@ Page({ canIUseGetUserProfile: true }) } + + // 获取系统信息,用于标题位置适配 + wx.getSystemInfo({ + success: function (res) { + that.setData({ + statusBarHeight: res.statusBarHeight + }) + } + }) + wx.setBackgroundColor({ backgroundColor: "#96C6F5", }) diff --git a/pages/index/index.json b/pages/index/index.json index 08f0e86..899c453 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,3 +1,4 @@ { + "navigationStyle": "custom", "navigationBarTitleText": "仁E森命" -} \ No newline at end of file +} diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 3b7ddf0..aa617ee 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,7 +1,13 @@ + + + + + 仁E森命 + - + 操作教程 - + 发图素材 @@ -83,7 +89,7 @@ 健康知识 - + 客服专区 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 53a3c9d..c8cc3cf 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -7,8 +7,30 @@ page{ min-height: 100%; color: #000; font-size:14px; + background: linear-gradient(180deg, #96C6F5 0%, #B8DAF8 30%, #E8F4FC 60%, #F5FAFF 100%); } - .container-header{ background: linear-gradient(to bottom, #96C6F5, #B8DAF8);} + /* 背景图片:用 标签实现,覆盖整个页面容器 */ + .bg-image { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + /* 页面标题样式 */ + .page-title { + position: relative; + z-index: 1; + color: #FFFFFF; + font-size: 18px; + font-weight: 600; + text-align: center; + padding: 10px 0; + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); + letter-spacing: 0.5px; +} + .container-header{ background: transparent; position: relative; overflow: visible; min-height: 300rpx; z-index: 1;} .header{margin:0;width:100%; padding:0; padding-top: 0em; box-sizing: border-box;} .searchbox2{ display: flex; z-index: 100; flex-direction: row; margin:0; margin-top:0.3em; width:70%; height:2.8em; padding:0; box-sizing: border-box;} .searchbox2 .logobox{margin-left:0.7em;margin-right:0.35em;margin-top:0; width: 6em;height:1.6em; box-sizing:border-box;} @@ -19,14 +41,14 @@ page{ .searchbox2 .icobox image{width: 1.5em; height:1.5em; margin-top: 0.4em; margin-left: 0.6em;} .searchbox2 .icobox0{width:2.2em;height:2.2em; font-size:1em; box-sizing:border-box;margin-left: 0.6em;} .searchbox2 .icobox0 image{width: 1.8em; height:1.8em; margin-top: 0.2em; margin-left: 0.4em;} -.searchbox{ display: flex; z-index: 100; flex-direction: row; margin:0;width:100%; padding:0.8em; padding-top: 0.5em; box-sizing: border-box; } +.searchbox{ display: flex; z-index: 100; flex-direction: row; margin:0;width:100%; padding:0 0.8em; box-sizing: border-box; background: transparent; border-radius: 12rpx;} .searchbox .inpubox{flex-grow: 1;margin:0; height:2.2em; box-sizing:border-box;} .searchbox .inpubox input{ margin:0; padding-left:2.3em; width: 100%; font-size:1em; height:2.2em; outline: none; text-indent:0;box-sizing:border-box;color:#333;border:1px solid #E0E0E0;border-radius:0.5em 0 0 0.5em; background-color:#FFFFFF;} .searchbox .icobox{margin-right:-2.3em; width:2.2em;height:2.2em;box-sizing:border-box;z-index: 101;} .searchbox .icobox image{width: 1.5em; height:1.5em; margin-top: 0.4em; margin-left: 0.6em;} -.searchbox .icobox0{margin:0; margin-left:0.5em; margin-top:0.2em; width:1.8em;height:1.8em; box-sizing:border-box;z-index: 101;border-radius:50%;} +.searchbox .icobox0{margin:0; margin-left:0.5em; margin-top:0.2em; width:1.8em;height:1.8em; box-sizing:border-box;z-index: 101;border-radius:50%; background:linear-gradient(to right, #6BA3F0, #8BBDF5); display: flex; align-items: center; justify-content: center;} .searchbox .icobox0 image{width: 1.5em; height:1.5em; margin-top: 0.1em; margin-left: 0.1em;} .searchbox .searchicobox{margin:0; margin-left:0em; width:3em;height:2.2em; line-height: 2.2em; box-sizing:border-box;z-index: 102;background:linear-gradient(to right, #6BA3F0, #8BBDF5); border:1px solid #6BA3F0; border-left:0; color:#fff; text-align: center; border-radius:0 0.5em 0.5em 0;} .menu{display: flex; flex-direction: row; width: 100%;box-sizing: border-box;} @@ -144,17 +166,20 @@ page{ overflow-y: scroll; } .container0{ - margin-top: -0.8em; - padding: 0.8em; + margin-top: 1.2em; + padding: 0 0.8em; box-sizing: border-box; } .swiper{ width:100%; - background-color: #fff; + background-color: rgba(255, 255, 255, 0.95); border-radius:0.5em; - padding: 0.8em; + padding: 0; box-sizing: border-box; + box-shadow: 0 8px 30px rgba(107, 163, 240, 0.25); + backdrop-filter: blur(5px); + overflow: hidden; } .container1{ margin-top: 0em; @@ -175,7 +200,9 @@ page{ } .swiper_box { width: 100%; - min-height: 14em; + min-height: 14em; + border-radius: 0.5em; + overflow: hidden; } swiper-item image { @@ -279,7 +306,8 @@ swiper-item image { flex-direction:column; align-items: center; width: 100%; - padding:0.4em 0.4em; + margin-top: 1.2em; + padding:0 0.8em; box-sizing: border-box; z-index: 10; } @@ -287,8 +315,12 @@ swiper-item image { display: flex; flex-direction:column; width: 100%; - border-radius:0.5em; - background: linear-gradient(to bottom, #96C6F5, #B8DAF8); + border-radius:0.8em; + background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%); + box-shadow: 0 -4px 20px rgba(107, 163, 240, 0.1), 0 4px 20px rgba(107, 163, 240, 0.2); + backdrop-filter: blur(25px); + border: 1px solid rgba(255, 255, 255, 0.8); + overflow: hidden; } .mydata_box0_bo view{ display: flex; @@ -306,14 +338,14 @@ swiper-item image { align-items: center; justify-content: center; box-sizing: border-box; - font-size:0.9em; - color:#fff; + font-size:1em; + color:#333; } .mydata_box0_bo view view image{ - width: 3.5em; - height: 3.5em; - padding:0.5em 0; + width: 4em; + height: 4em; + padding:0.3em 0; overflow: hidden; } .mydata_box0_bo view view view{ @@ -478,7 +510,11 @@ swiper-item image { padding: 0.4em; padding-bottom: 6em; box-sizing:border-box; - + background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #FFFFFF 15%); + margin-top: -0.3em; + border-radius: 0.8em 0.8em 0 0; + position: relative; + z-index: 3; } .container_box_to{ display: flex; diff --git a/pages/mybusiness0/index.js b/pages/mybusiness0/index.js index 630f49a..59bbc3d 100644 --- a/pages/mybusiness0/index.js +++ b/pages/mybusiness0/index.js @@ -33,10 +33,10 @@ Page( { var userInfo = JSON.parse(userInfodata) console.log("用户信息:", userInfo); console.log("sjuLevel0:", userInfo.sjuLevel0); - // 检查是否是事业部用户 + // 检查是否是健康驿站用户 if(userInfo.sjuLevel0 != 2){ wx.showToast({ - title: "您不是事业部用户,无法查看此页面", + title: "您不是健康驿站用户,无法查看此页面", icon: "none", duration: 3000 }) diff --git a/wxParse/wxParse.wxss b/wxParse/wxParse.wxss index d495a2b..f6c7569 100644 --- a/wxParse/wxParse.wxss +++ b/wxParse/wxParse.wxss @@ -17,7 +17,6 @@ color: #666; line-height:1.5em; width: 100%; - overflow: hidden; } .wxParse img,.wxParse image{ float: left; @@ -26,10 +25,12 @@ width: 100%; } view{ - word-break:break-all; + word-break: normal; + word-wrap: break-word; + overflow-wrap: break-word; } .wxParse-inline{ - display: inline; + display: inline-block; margin: 0; padding: 0; } @@ -85,7 +86,7 @@ view{ .wxParse-s,.wxParse-strike,.wxParse-del{text-decoration:line-through} /*wxparse-自定义个性化的css样式*/ /*增加video的css样式*/ -.wxParse-strong,.wxParse-s{display: inline} +.wxParse-strong,.wxParse-s{display: inline-block} .wxParse-a{ color: deepskyblue; word-break:break-all; @@ -115,7 +116,7 @@ view{ } .wxParse-code,.wxParse-wxxxcode-style{ - display: inline; + display: inline-block; background:#f5f5f5; } .wxParse-ul{ @@ -179,7 +180,7 @@ view{ display: none; } .WxEmojiView{ - align-items: center; + display: inline-block; } .wxEmoji{ width: 16px; @@ -207,7 +208,7 @@ view{ border-top:1px solid #e0e0e0; } .wxParse-del{ - display: inline; + display: inline-block; } .wxParse-figure { overflow: hidden;