diff --git a/app.wxss b/app.wxss index 51ae13b..a0b1cba 100644 --- a/app.wxss +++ b/app.wxss @@ -32,4 +32,16 @@ button[type='primary'] { } button[disabled][type='primary'] { background-color: #fafafa!important; +} +/* .weui-cells_radio .weui-check[aria-checked=true]+.weui-icon-checked { + color: #438af4!important; +} */ +.weui-cells_radio .weui-check[aria-checked=false]+.weui-icon-checked { + color: #ffffff!important; +} +/* .weui-cells_radio .weui-check[aria-checked=true]+.weui-icon-checked{color:#438af4!important;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E)!important;mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E)!important} */ +.weui-cells_checkbox .weui-check[aria-checked=true]+.weui-icon-checked{color:#438af4!important;mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20strokeWidth%3D%2220%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%3E%3C%2Fcircle%3E%3C%2Fsvg%3E)!important;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20strokeWidth%3D%2220%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%3E%3C%2Fcircle%3E%3C%2Fsvg%3E)!important; +} +.weui-cells_radio .weui-check[aria-checked=true]+.weui-icon-checked{ + color:#438af4!important;mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20strokeWidth%3D%2220%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%3E%3C%2Fcircle%3E%3C%2Fsvg%3E)!important;-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20strokeWidth%3D%2220%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%3E%3C%2Fcircle%3E%3C%2Fsvg%3E)!important; } \ No newline at end of file diff --git a/images/logoImg.png b/images/logoImg.png index 0d32f04..ec30cf1 100644 Binary files a/images/logoImg.png and b/images/logoImg.png differ diff --git a/images/shoucang.png b/images/shoucang.png new file mode 100644 index 0000000..b3758c1 Binary files /dev/null and b/images/shoucang.png differ diff --git a/images/xuanzhong.svg b/images/xuanzhong.svg new file mode 100644 index 0000000..eab1507 --- /dev/null +++ b/images/xuanzhong.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages/admin/login.js b/pages/admin/login.js index c8ffbb4..59294dd 100644 --- a/pages/admin/login.js +++ b/pages/admin/login.js @@ -111,6 +111,9 @@ Page({ // 发送 res.code 到后台换取 openId, sessionKey, unionId api.requesta('/rbac/user/mplogin/','POST', {code:res.code}).then(res=>{ getApp().globalData.admintoken = res.data.token; + wx.setStorageSync('token', res.data.token) + wx.setStorageSync('session_key', res.data.session_key) + wx.setStorageSync('userinfo', res.data.userinfo) api.requesta('/rbac/user/info/', 'GET').then(res=>{ wx.hideLoading() getApp().globalData.admininfo = res.data diff --git a/pages/article/detail.wxml b/pages/article/detail.wxml index 7027727..03a6179 100644 --- a/pages/article/detail.wxml +++ b/pages/article/detail.wxml @@ -3,10 +3,11 @@ {{title}} - - 置顶 - {{ifrom}} - + + 置顶 + {{ifrom}} + {{update_time}} + diff --git a/pages/article/detail.wxss b/pages/article/detail.wxss index 08d786a..8f9aaa9 100644 --- a/pages/article/detail.wxss +++ b/pages/article/detail.wxss @@ -2,6 +2,22 @@ .page__title { font-size: 18px; } -.page { - background-color: var(--weui-BG-2); +.weui-article{ + padding: 0!important; +} +.weui-article__h1{ + padding: 24rpx 24rpx 0rpx 24rpx; + margin-bottom: 0; + background-color: #ffffff; +} +.page__desc{ + margin-top: 0; + padding: 10rpx 24rpx 15rpx 24rpx; + background-color: #ffffff; + margin-bottom: 20rpx; + display: flex; +} +.weui-article__p{ + padding: 24rpx; + background-color: #ffffff; } \ No newline at end of file diff --git a/pages/article/index.wxml b/pages/article/index.wxml index b6bca77..d031610 100644 --- a/pages/article/index.wxml +++ b/pages/article/index.wxml @@ -1,18 +1,17 @@ {{count}}条资讯 - + - 置顶 {{item.title}} - - - 发布人:{{item.ifrom}} - 发布时间:{{item.update_time}} + + 置顶 + {{item.update_time}} + {{item.ifrom}} diff --git a/pages/candidate/index.wxss b/pages/candidate/index.wxss index 6412172..f8d74e7 100644 --- a/pages/candidate/index.wxss +++ b/pages/candidate/index.wxss @@ -1,7 +1,9 @@ /* pages/candidate/index.wxss */ .searWrap{ display: flex; - margin-top: 30rpx; + /* margin-top: 30rpx; */ + padding: 20rpx 0; + background: #ffffff; } .searchBtn{ /* flex: 2; */ @@ -26,7 +28,9 @@ } .listWrap{ padding: 20rpx; + margin-top: 20rpx; box-sizing: border-box; + background: #ffffff; } .listTitle{ height: 70rpx; diff --git a/pages/cuoti/index.js b/pages/cuoti/index.js index 7688d8f..635f29f 100644 --- a/pages/cuoti/index.js +++ b/pages/cuoti/index.js @@ -9,7 +9,7 @@ Page({ answerP:false, tmtotal:0, moShi:'看题模式', - isTest:true, + isTest:false, domain:getApp().globalData.mediahost, }, radioChange: function (e) { @@ -111,13 +111,14 @@ Page({ that.setData({ isTest:false, }) - that.showOptions() }else{ that.setData({ isTest:true, answerP:false }) } + debugger; + that.showOptions() }, next: function () { var that = this @@ -137,8 +138,6 @@ Page({ }, showOptions: function () { let currentTm = this.data.currentTm; - // debugger; - console.log(currentTm) let options = [] for (let key in currentTm.options) { let option = {} @@ -148,15 +147,16 @@ Page({ }else{ option.right = false; } - + option.checked = false; option.value = '

' + currentTm.options[key].toString() + '

' - if (currentTm.user_answer && this.data.moShi == '看题模式') { + if (!this.data.isTest) { if (key == currentTm.user_answer || currentTm.user_answer.indexOf(key) != -1) { option.checked = true } } else { option.checked = false } + console.log(option) options.push(option) } this.setData({ diff --git a/pages/cuoti/index.wxml b/pages/cuoti/index.wxml index 1deb504..82a9ea0 100644 --- a/pages/cuoti/index.wxml +++ b/pages/cuoti/index.wxml @@ -7,6 +7,7 @@ (点击切换)
--> + @@ -41,7 +42,7 @@ - + @@ -61,7 +62,7 @@ - + @@ -69,9 +70,9 @@ - 回答正确! - 回答有误! - 正确答案是{{currentTm.right}},你的答案是{{currentTm.user_answer}} + 回答正确! + 回答有误! + 正确答案是{{currentTm.right}},你的答案是{{currentTm.user_answer}} 解析: {{tm_current.question.resolution}} diff --git a/pages/cuoti/index.wxss b/pages/cuoti/index.wxss index 838eee0..51a488a 100644 --- a/pages/cuoti/index.wxss +++ b/pages/cuoti/index.wxss @@ -68,3 +68,10 @@ .checkKey{ width: 70rpx; text-align: center; line-height: 70rpx;height: 70rpx;border-radius: 38rpx;border: 1rpx solid #aaaaaa; } + +/* .weui-cells_radio .weui-check[aria-checked=true]+.weui-icon-checked { + color: #438af4; +} +.weui-cells_radio .weui-check[aria-checked=false]+.weui-icon-checked { + color: #ffffff; +} */ diff --git a/pages/lianxi/index.wxml b/pages/lianxi/index.wxml index 20008d5..7551426 100644 --- a/pages/lianxi/index.wxml +++ b/pages/lianxi/index.wxml @@ -1,8 +1,10 @@ - -搜题 + + 搜题 {{workscopeName}} + + @@ -10,7 +12,6 @@ -

{{item.name}}

@@ -28,3 +29,5 @@
+ +
diff --git a/pages/lianxi/index.wxss b/pages/lianxi/index.wxss index 007ed3b..2f3b9f4 100644 --- a/pages/lianxi/index.wxss +++ b/pages/lianxi/index.wxss @@ -1,13 +1,10 @@ /* pages/lianxi/index.wxss */ .weui-panel { - margin-left:8px; - margin-right:8px; - border-radius: 8px; - /* background: linear-gradient(to right, #fad8be 0%, #fe6673 100%); */ - /* background:#00a7d0; */ background: rgba(255, 255, 255, 1); - box-shadow: 0px 4rpx 16rpx 0px rgba(140, 160, 181, 0.2); - /* background: linear-gradient(to right, #3399CC 0%, #0066CC 100%); */ + /* box-shadow: 0px 4rpx 16rpx 0px rgba(140, 160, 181, 0.2); */ +} +.weui-panel:first-of-type{ + margin-top: 0!important; } .blueBold{ color:#438af4; diff --git a/pages/lianxi/main.wxml b/pages/lianxi/main.wxml index 039cca1..fe8ee37 100644 --- a/pages/lianxi/main.wxml +++ b/pages/lianxi/main.wxml @@ -102,8 +102,8 @@
- - + +
diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 24dbbfb..e3a3a63 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -1,8 +1,8 @@ - + - + 手机号登录 浏览进入 @@ -36,13 +36,13 @@ - + 我已阅读并同意 - + 《用户服务协议》 和 - + 《隐私政策》 diff --git a/pages/login/login.wxss b/pages/login/login.wxss index 31b4956..f71c1f2 100644 --- a/pages/login/login.wxss +++ b/pages/login/login.wxss @@ -1,4 +1,7 @@ /**index.wxss**/ +page{ + background: #1576bd; +} .userinfo { display: flex; flex-direction: column; @@ -26,20 +29,20 @@ line-height: 100rpx; padding: 0; font-weight: 500; - background-color: #438af4; + background-color: #f15806; margin-top: 50rpx; } .loginBtn_visit{ background-color: #ffffff; - color: #438af4; - border: 1rpx solid #438af4; + color: #666666; + /* border: 1rpx solid #438af4; */ } .logoImg{ display: block; width: 60%; z-index: -1; margin: auto; - margin-top: -100rpx; + margin-top: 10vh; } .ceheckedIcon{ width:40rpx; @@ -47,4 +50,10 @@ border-radius: 16rpx; margin-right: 20rpx; border: 1rpx solid #cccccc; +} +.weui-footer{ + color: #ffffff; +} +.xieyi{ + color: #f5b5b5!important; } \ No newline at end of file diff --git a/pages/login/registe/registe.js b/pages/login/registe/registe.js index 117a84d..cd16610 100644 --- a/pages/login/registe/registe.js +++ b/pages/login/registe/registe.js @@ -57,11 +57,25 @@ Page({ } }, numberChange(e){ - let numb = e.detail.value.replace(/\D/g, ''); - this.setData({ - ['userinfo.ID_number1']: numb, - }) - return e.detail.value.replace(/\D/g, '') + let numb = e.detail.value; + this.setData({ + ['userinfo.ID_number1']: numb, + }) + return e.detail.value + + // let p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; + // let numb = e.detail.value; + // if(p.test(numb)){ + // this.setData({ + // ['userinfo.ID_number1']: numb, + // }) + // return e.detail.value + // }else{ + // wx.showToast({ + // icon: 'none', + // title: '请输入正确的身份证号', + // }) + // } }, deptChange(e){ let that = this; @@ -111,22 +125,26 @@ Page({ }, tijiao(){ let userinfo = this.data.userinfo; - if(userinfo.name!==''&&userinfo.name!==null&&userinfo.name!=='未知'){ - api.request('/crm/consumer/improve/', 'POST', userinfo).then(res => { - // debugger; - // console.log('信息补全成功'+res) - wx.setStorageSync('userinfo', userinfo); - app.globalData.userinfo = userinfo; - // let usIn = wx.getStorageSync('userinfo'); - // console.log(usIn) - wx.switchTab({ - url: '/pages/main/main', + let p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; + if(p.test(userinfo.ID_number1)){ + if(userinfo.name!==''&&userinfo.name!==null&&userinfo.name!=='未知'){ + api.request('/crm/consumer/improve/', 'POST', userinfo).then(res => { + wx.setStorageSync('userinfo', userinfo); + app.globalData.userinfo = userinfo; + wx.switchTab({ + url: '/pages/main/main', + }) }) - }) + }else{ + wx.showToast({ + icon: 'none', + title: '请完善信息后提交', + }) + } }else{ wx.showToast({ icon: 'none', - title: '请完善信息后提交', + title: '请输入正确的身份证号', }) } }, diff --git a/pages/login/registe/registe.wxss b/pages/login/registe/registe.wxss index 19e62e2..5257cb7 100644 --- a/pages/login/registe/registe.wxss +++ b/pages/login/registe/registe.wxss @@ -1,6 +1,9 @@ /* pages/login/logon.wxss *//**index.wxss**/ .page__bd { + margin: 20rpx; + border-radius: 10rpx; padding-bottom: 40rpx; + background: #ffffff; } .loginTypeWrap{ width: 80%; diff --git a/pages/main/main.js b/pages/main/main.js index bb95146..b412e2f 100644 --- a/pages/main/main.js +++ b/pages/main/main.js @@ -46,6 +46,11 @@ Page({ userinfo: userinfo, search: that.search.bind(that) }) + if(userinfo.role_name == '游客'||(userinfo.name!==''&&userinfo.name!==null&&userinfo.name!=='未知'&&userinfo.name!==undefined)){}else{ + wx.redirectTo({ + url: '/pages/login/registe/registe', + }) + } }else{ // debugger; app.callBackUserinfo=res=>{ @@ -55,10 +60,14 @@ Page({ userinfo: userinfo, search: that.search.bind(that) }) + if(userinfo.role_name == '游客'||(userinfo.name!==''&&userinfo.name!==null&&userinfo.name!=='未知'&&userinfo.name!==undefined)){}else{ + wx.redirectTo({ + url: '/pages/login/registe/registe', + }) + } } } } - api.request('/examtest/banner/', 'GET').then(res => { if(res.data.length>0){ let images = [] @@ -83,13 +92,6 @@ Page({ // userinfo: userinfo // }) //获取用户信息,判断返回信息是否有name,如果有不做处理,继续渲染页面,如果没有,则跳到信息完善页面 - // if(userinfo.role_name == '游客'||(userinfo.name!==''&&userinfo.name!==null&&userinfo.name!=='未知'&&userinfo.name!==undefined)){ - - // }else{ - // wx.redirectTo({ - // url: '/pages/login/registe/registe', - // }) - // } // Api.getBanners().then(res=>{ // if(res.data.length>0){ // let images = [] @@ -120,9 +122,18 @@ Page({ }, //阈值数据库 toThreshold: function () { - wx.navigateTo({ - url: '/pages/main/threshold/threshold', - }) + let perms = wx.getStorageSync('userinfo').perms; + if(perms.indexOf('threshold_view')>-1){ + wx.navigateTo({ + url: '/pages/main/threshold/threshold', + }) + }else{ + wx.showToast({ + title: '您暂无查看权限,请联系管理人员', + icon: 'none' + }) + } + }, goFile(){ wx.switchTab({ @@ -143,9 +154,6 @@ Page({ } } }) - // wx.navigateTo({ - // url: '/pages/article/detail?id=1', - // }) }, //成绩查询 goScore(){ @@ -209,7 +217,7 @@ Page({ success(res) { if (res.confirm) { wx.navigateTo({ - url: '/pages/article/detail?id=6', + url: '/pages/article/detail?id=3', }) } } diff --git a/pages/main/main.wxml b/pages/main/main.wxml index b900432..50ad85a 100644 --- a/pages/main/main.wxml +++ b/pages/main/main.wxml @@ -51,52 +51,42 @@ 参加考试 - - - - + 题库练习 - + 押卷模考 - + 自助模考 - + 错题集 {{wrongnum}} - + 收藏集 - + 考试记录 - + 视频课程 @@ -108,64 +98,16 @@ - - - - + + + + + 气味阈值数据库 + + + + \ No newline at end of file + + + + + 化合物分类 + {{array[arrayIndex]}} + + + + + + + + + + +

+ {{item.chinese_name}} + {{item.compound_cate}} +

+ + 10-6(v/v): + {{item.ppm_sign}} {{item.ppm}} + + + μg/m3: + {{item.mass_sign}}{{item.mass}} + + M(g/mol): {{item.molecular}} + CAS号:{{item.cas}} + + 气味类型: + {{item.odor_type}} + + + 阈值类型:{{item.threshold_type}} + + + 毒性信息: + + ({{item.toxicity_type}}) + {{item.toxicity}} + + + 阈值说明: + d感知阈值,r识别阈值,d&r感知阈值和识别阈值相同,ng未明确 + + + 阈值来源:{{item.source_.name}} + ——{{item.source_.author}} + ——{{item.source_.publish_year}} + +
+
+
+
+ 输入名称或CAS号查询阈值进行搜索 +
+
\ No newline at end of file diff --git a/pages/main/threshold/threshold.wxss b/pages/main/threshold/threshold.wxss index e69de29..23c2ae4 100644 --- a/pages/main/threshold/threshold.wxss +++ b/pages/main/threshold/threshold.wxss @@ -0,0 +1,64 @@ +.page{ + height:100%; + box-sizing: border-box; +} +.searchWrap { + padding: 20rpx; + display: flex; + position: fixed; + top: 0; + width: 100%; + z-index: 100; + box-sizing: border-box; + background: #efefef; + justify-content: space-between; +} +.pickers{ + width: 200rpx; + border-radius: 40rpx; + background: #ffffff; +} +.picker{ + height: 70rpx; + color: blue; + line-height: 70rpx; + text-align: center; +} +.searchInput{ + width: 60%; + height: 70rpx; + line-height: 70rpx; + padding: 10rpx 20rpx; + box-sizing: border-box; + border-radius: 35rpx; + background-color: #ffffff; +} +.searchBtn{ + flex-shrink:0; + width: 120rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; +} +.lists{ + /* height: 100%; */ + width: 100%; + overflow-y: scroll; + padding-top: 120rpx; + background: #ffffff; + box-sizing: border-box; + padding: 120rpx 20rpx 20rpx 20rpx; +} +.toptip{ + color:blue; + border:1rpx solid blue; + font-size:10px; + display: inline-block; + padding: 2rpx 8rpx 1rpx 8rpx; + border-radius: 4rpx; + vertical-align:top; +} +.listItemLable{ + width:160rpx; + display: inline-block; +} \ No newline at end of file diff --git a/pages/material/index.wxml b/pages/material/index.wxml index 56dfb99..99f8ba4 100644 --- a/pages/material/index.wxml +++ b/pages/material/index.wxml @@ -36,12 +36,10 @@
- {{item.name}} + {{item.name}} {{item.description}} - - 下载量:{{item.down_count}} - + {{item.down_count}} @@ -54,9 +52,9 @@ 《{{infoItem.name}}》 - {{infoItem.type}}{{infoItem.description}} 资料分类{{infoItem.cate}} 下载次数:{{infoItem.downcount}} + {{infoItem.description}} 下载 @@ -64,5 +62,4 @@ -
\ No newline at end of file