diff --git a/app.js b/app.js index 1413cdd..c413b36 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,7 @@ App({ wx.login({ success: res => { console.log(res); +<<<<<<< HEAD // wx.request({ // url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code, // method: 'POST', @@ -32,6 +33,32 @@ App({ // // url:'/pages/register/register' // }) // }, 2000); +======= + wx.request({ + // url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code, + url: ''+res.code, + method: 'POST', + success:(_res)=>{ + console.log(_res); + let openId = _res.data.openid; + this.globalData.openId = openId + console.log('openid',openId); + wx.request({ + // url: 'https://www.umayle.com/inland/Api/GetUserInfo.ashx?openId='+openId, + url: ''+openId, + method: 'POST', + success:(_res_)=>{ + console.log(_res_,',,,res'); + this.globalData.userInfo = _res_.data.data + if(_res_.data.code == 0 && _res_.data.message == '获取成功'){ + //跳转到列表页面 + setTimeout(() => { + wx.redirectTo({ + url:'/pages/list/list' + // url:'/pages/register/register' + }) + }, 2000); +>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72 // }else{ // //跳转到注册页面 diff --git a/app.json b/app.json index 814947d..02e178d 100644 --- a/app.json +++ b/app.json @@ -1,10 +1,21 @@ { "pages": [ +<<<<<<< HEAD "pages/map/map", "pages/start/start", "pages/index/index", "pages/list/list" +======= + "pages/list/list", + "pages/item/item", + "pages/start/start", + "pages/index/index" + + + + +>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72 ], "plugins": { "routePlan": { diff --git a/pages/index/index.js b/pages/index/index.js index d5d00de..e597af8 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -22,6 +22,7 @@ Page({ }, onLoad(options) { if (wx.getUserProfile) { +<<<<<<< HEAD // let url = 'https://www.umayle.com/inland/dist/index.html?openId='+options.openId+'&page='+options.page; // console.log(url); // this.setData({ @@ -30,6 +31,19 @@ Page({ // url: url, // canIUseGetUserProfile: true // }) +======= + //https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/dist/index.html + //let url = 'https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/dist/index.html?openId='+options.openId+'&page='+options.page; + // let url = 'https://www.umayle.com/inland/dist/index.html?openId='+options.openId+'&page='+options.page; + let url = ''+options.openId+'&page='+options.page; + console.log(url); + this.setData({ + openId: options.openId, + page: options.page, + url: url, + canIUseGetUserProfile: true + }) +>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72 } }, getUserProfile(e) { diff --git a/pages/item/item.js b/pages/item/item.js new file mode 100644 index 0000000..2218aa9 --- /dev/null +++ b/pages/item/item.js @@ -0,0 +1,50 @@ +// pages/item/item.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + title: '', + loading: true, + movie: {}, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + const _this = this; + // 拼接请求url + // const url = 'https://api.douban.com/v2/movie/subject/' + options.id; + // // 请求数据 + // wx.request({ + // url: url, + // data: {}, + // header: { + // 'content-type': 'json' // 默认值 + // }, + // success:function(res) { + // // 赋值 + // _this.setData({ + // movie: res.data, + // loading: false // 隐藏等待框 + // }) + // } + // }) + _this.setData({ + movie: {title:'日本7.2级地震',images:'111',year:'2022年7月7日',average:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',directors:'111',name:'111',casts:'111',directors:'111',summary:'1111'}, + loading: false // 隐藏等待框 + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + // 修改导航栏标题 + wx.setNavigationBarTitle({ + title: this.data.title + '<<预警信息<<详情' + }) + } +}) \ No newline at end of file diff --git a/pages/item/item.json b/pages/item/item.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/item/item.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/item/item.wxml b/pages/item/item.wxml new file mode 100644 index 0000000..2b9d6aa --- /dev/null +++ b/pages/item/item.wxml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + {{movie.title}}({{movie.year}}) + + + 描述:{{movie.average}} + + + + + + + \ No newline at end of file diff --git a/pages/item/item.wxss b/pages/item/item.wxss new file mode 100644 index 0000000..b88b2f4 --- /dev/null +++ b/pages/item/item.wxss @@ -0,0 +1,41 @@ +/* pages/item/item.wxss */ +.meta { + display: flex; + flex-direction: column; + align-items: center; + height: 1000rpx; + padding: 50rpx 40rpx; +} +.poster { + height: 50%; + margin: 20rpx; +} +.title { + font-size: 42rpx; + color: #444; +} +.info { + font-size: 15px; + color: #888; + margin-left: 20px; + padding: 20px 10px; + line-height: 28px; +} +.summary { + + margin: 30rpx auto; +} +.label { + display: block; +} +.content { + color: #666; + font-size: 20rpx; + padding: 10rpx; +} +.mainBottom{ + padding-top: 30px; +} +.main{ + margin-top: -20px; +} \ No newline at end of file diff --git a/pages/list/list.js b/pages/list/list.js index db400a7..2dff754 100644 --- a/pages/list/list.js +++ b/pages/list/list.js @@ -1,219 +1,70 @@ // pages/list/list.js -let app = getApp() -// const computedBehavior = require('miniprogram-computed') -// behaviors: [computedBehavior], Page({ + /** * 页面的初始数据 */ data: { - options: [ - { - value: "1", - label: "全部", - }, - { - value: "油船", - label: "油船", - }, - { - value: "危化品船", - label: "危化品船", - }, - ], - optionsweight: [ - { - value: "1", - label: "全部", - }, - { - value: "1000吨以上", - label: "1000吨以上", - }, - { - value: "1000吨以下", - label: "1000吨以下", - }, - ], - optionsWork: [ - { - value: "1", - label: "全部", - }, - { - value: "结构认知", - label: "结构认知", - }, - { - value: "消防演习", - label: "消防演习", - }, - { - value: "装货作业", - label: "装货作业", - }, - { - value: "卸货作业", - label: "卸货作业", - }, - { - value: "溢油演习", - label: "溢油演习", - }, - { - value: "洗舱作业", - label: "洗舱作业", - }, - { - value: "密闭空间", - label: "密闭空间", - }, - ], - modelShow: false, - video: "1", - videoSrc: "", - dataList: [], - showPicker:true, - ship: 0,//默认显示位置 - weight: 0,//默认显示位置 - type: 0,//默认显示位置 + title: '加载中...', // 状态 + list: [{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'}], // 数据列表 + type: '', // 数据类型 + loading: true, // 显示等待框 + page: 0, // page:当前页-- + tabList: [{ + title: '预警信息', + num: 0 + }, { + title: '特殊事件', + num: 0 + }], }, - filterFunc(val, target, filterArr) { - // 参数不存在或为空时,就相当于查询全部 - if (val == undefined || val == '1') { - return filterArr; - } - return filterArr.filter((p) => p[target].indexOf(val) > -1); - }, - bindPickerChange2: function (e) { - this.setData({ - ship: e.detail.value - }) - this.handleList() - }, - bindPickerweight: function (e) { - this.setData({ - weight: e.detail.value - }) - this.handleList() - }, - bindPickerwork: function (e) { - this.setData({ - type: e.detail.value - }) - this.handleList() - }, - handleModel:function(item) { - console.log(item); - wx.request({ - url: 'https://www.umayle.com/inland/Api/VideoController.ashx', - data:{ - openId: app.globalData.openId, videoId: item.currentTarget.dataset.id - }, - method: 'get', - success:(_res_)=>{ - if (_res_.data.code == 1) { - this.setData({ - modelShow : true, - video : "1" - }) - } else { - this.setData({ - modelShow : true, - video : "2", - videoSrc :item.currentTarget.dataset.video - }) - - } - } - }) - }, - handleClose() { - this.setData({ - modelShow : false, - }) - }, - handleList(){ - let objVal = {}; - objVal.ship = this.data.options[this.data.ship].value - objVal.weight = this.data.optionsweight[this.data.weight].value - objVal.type = this.data.optionsWork[this.data.type].value - wx.request({ - url: 'https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/data.json', - method: 'get', - success:(_res_)=>{ - let arr = _res_.data.data; - Object.keys(objVal).forEach((e) => { - // 调用自己定义好的筛选方法 - arr = this.filterFunc(objVal[e], e, arr); - }); - this.setData({ - dataList: arr - }) - } - }) - }, + /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { - wx.request({ - url: 'https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/data.json', - method: 'get', - success:(_res_)=>{ - this.setData({ - dataList:_res_.data.data - }) - } + // 切换tab + change: function (event) { + console.log('切换时会调用', event); + var a = event.currentTarget.dataset.pageid + this.setData({ + page: a, }) }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - wx.hideHomeButton(); - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - + // changeNext:function () { + // setTimeout(() => { + // wx.redirectTo({ + // url:'/pages/item/item' + // }) + // }, 2000); + // }, + onLoad: function (options) { // options 为 board页传来的参数 + const _this = this; + // 拼接请求url + // const url = 'https://api.douban.com/v2/movie/' + options.type; + // const url = '' + options.type; + // // 请求数据 + // wx.request({ + // url: url, + // data: {}, + // header: { + // 'content-type': 'json' // 默认值 + // }, + // success: function(res) { + // console.log(res.data); + // // 赋值 + // _this.setData({ + // title: res.data.title, + // list: res.data.subjects, + // type: options.type, + // loading: false // 关闭等待框 + // }) + // } + // }) + _this.setData({ + title: '日本7.2级地震', + list: [{id:'001',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'002',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'003',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'003',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'003',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'003',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'}], + type: '1111', + loading: false // 关闭等待框 + }) } }) \ No newline at end of file diff --git a/pages/list/list.wxml b/pages/list/list.wxml index 2b5c4c6..961def1 100644 --- a/pages/list/list.wxml +++ b/pages/list/list.wxml @@ -1,71 +1,77 @@ - - - - - - - - - - - - - - - - - + + + + + + + {{item.title}} + +
- - - - - - - - - {{ index + 1 }}.{{ item.name }} + + + + + + + + + + + + + + + + + {{item.title}} + 详情 + + + {{item.year}}{{item.content}} + + - 已观看45% + + + + + + + + + + {{item.title}} + 详情 + + + {{item.year}}{{item.content}} + + + + + + + + + + + - - - 提示 - - 您的观看次数以达到限制,如需要解锁更多视频请联系: - - - - - 沈健 - - 187 0255 8956 - - - - - 钱春和 - - 181 0159 8061 - - 确认 - - - - - - - - - \ No newline at end of file + + + diff --git a/pages/list/list.wxss b/pages/list/list.wxss index 6fbf806..599536d 100644 --- a/pages/list/list.wxss +++ b/pages/list/list.wxss @@ -1,235 +1,182 @@ -.list { +/* pages/list/list.wxss */ +/* pages/dingdan/dingdan.wxss */ +page { width: 100%; height: 100%; - display: flex; - flex-flow: row wrap; - justify-content: center; - background: url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/%E5%9C%A8%E7%BA%BF%E5%AD%A6%E4%B9%A0-%E8%83%8C%E6%99%AF.png") no-repeat; - background-size: 100% auto; -} - -.list .top { - width: 686rpx; - height: 100rpx; - display: flex; - flex-flow: row nowrap; - justify-content: space-between; - align-items: center; -} - -.list .top picker { - width: 30%; -} - -.list .top .search-input { - position: relative; - width: 100%; - height: 68rpx; - -webkit-overflow-scrolling: touch; - background: #fff; - border-radius: 22rpx; - font-size: 24rpx; - color: #1f272a; - padding-left: 36rpx; - box-sizing: border-box; -} - -.list .top .search-placeholder { - font-size: 28rpx; -} - -.list .top .phcolor { - color: #999; - font-size: 14px; -} - -.list .top .select { - width: 100%; - height: 35px; - background: #ffffff; - border-radius: 20px; - text-indent: 26px; -} - -.list .content { - width: 686rpx; - height: calc(100% - 140rpx); - margin-top: 20rpx; - overflow-y: scroll; - overflow-x: hidden; -} - -.list .content::-webkit-scrollbar { - width: 0; -} - -.list .content > view { - width: 100%; - height: 516rpx; - background: #ffffff; - border-radius: 40rpx; - margin-bottom: 40rpx; overflow: hidden; - box-shadow: 1px 1px 1px 1px #c6cae9, -1px 0px 1px 1px #c6cae9; + /* background: pink; */ } - -.list .content > view .bgpic { - width: 100%; - height: 400rpx; -} - -.list .content > view .bgpic image { - width: 100%; + +.body { height: 100%; -} - -.list .content > view .bottom { - height: 116rpx; - width: 100%; + /* background: hotpink; */ display: flex; - flex-flow: row nowrap; - justify-content: space-between; - padding: 0 10rpx; - align-items: center; - box-sizing: border-box; + flex-direction: column; } - -.list .content > view .bottom .left { - width: 70%; - display: flex; - flex-flow: row nowrap; - align-items: center; -} - -.list .content > view .bottom .left .logo { - width: 80rpx; - height: 84rpx; - background: url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/-e-icon.png") no-repeat; - background-size: 100% 100%; -} - -.list .content > view .bottom .left .title { - margin-left: 20rpx; - width: fit-content; - font-size: 32rpx; -} - -.list .content > view .bottom .right { - font-size: 32rpx; - color: #5187fd; -} - -.list .model { + +/* tab栏 */ +.swiper-tab { width: 100%; - height: 100%; - position: fixed; - top: 0; - left: 0; -} - -.list .model .contents { - width: 80%; - padding: 0 20rpx; - box-sizing: border-box; - height: 540rpx; - background: #ffffff; - border-radius: 40rpx; - position: absolute; - top: calc(50% - 270rpx); - left: 10%; - display: flex; - flex-flow: row wrap; - justify-content: center; - align-items: flex-start; -} - -.list .model .contents .title { - width: 100%; - height: 30px; - text-align: center; - font-size: 40rpx; - margin-top: 20rpx; -} - -.list .model .contents .text { - width: 80%; height: 80rpx; - line-height: 40rpx; - font-size: 32rpx; + text-align: center; + display: flex; + justify-content: space-between; + background: white; } - -.list .model .contents .people { - width: 80%; + +.selected-menu { + display: flex; + flex-direction: column; + align-items: center; + color: #2e0c77; + background: #fff; + font-size: 14px; + font-weight: bold; + font-family: PingFang SC; + font-weight: 400; + width: 50%; height: 60rpx; + line-height: 75rpx; + opacity: 1; + /* border-bottom: 2px solid #ff5050; */ + position: relative; +} + +.unselect-menu { display: flex; - flex-flow: row nowrap; + flex-direction: column; align-items: center; - justify-content: space-between; + font-size: 14px; + font-family: PingFang SC; + font-weight: 400; + color: #9f9fad; + width: 50%; + height: 60rpx; + line-height: 75rpx; + background: #fff; + opacity: 1; + position: relative; + /* border-radius: 34rpx; */ } - -.list .model .contents .people .name { - width: 35%; - display: flex; - flex-flow: row nowrap; - align-items: center; -} - -.list .model .contents .people .name .icon { - font-size: 32rpx; - color: #3669f8; - padding-top: 10rpx; -} - -.list .model .contents .people .name span { - font-size: 28rpx; - margin-left: 10rpx; -} - -.list .model .contents .people .phone { - flex: 1; - text-align: left; - font-size: 28rpx; - color: #2b61f8; -} - -.list .model .contents .handleTrue { - width: 80%; - height: 80rpx; - text-align: center; - line-height: 80rpx; - font-size: 34rpx; - letter-spacing: 4rpx; - color: #ffffff; - font-weight: 600; - background: #3669f8; - border-radius: 60rpx; -} - -.list .model .video { - width: 90%; - height: 480rpx; + +.selected-line { + background: #2e0c77; + height: 4rpx; + width: 150rpx; position: absolute; - top: calc(50% - 290rpx); - left: 5%; + /* margin-top: 10rpx; */ + bottom: -18rpx; + /* width: 60rpx; */ } - -.list .model .video .top { - width: 100%; - height: 40rpx; + +/* 内容 */ +.view-Content { + flex: 1; + overflow-y: auto; + background-color: rgb(236, 236, 236); +} + +.tabCon { + height: 100%; +} + + +/* 展示隐藏 */ +.show { + display: block; +} + +.hidden { + display: none; +} +.page-header { display: flex; - flex-flow: row wrap; - justify-content: flex-end; - padding-right: 10rpx; + justify-content: center; + border-bottom: 1rpx solid #ccc; } - -.list .model .video .top .icon { - font-size: 36rpx; - font-weight: 700; - color: rgba(255, 255, 255, 0.8); +.page-title { + padding: 20rpx 40rpx; + color: #999; + font-size: 38rpx; + text-align: center; } - -.list .model .video video { +.page-body { + display: flex; + flex: 1; + flex-direction: column; +} +.item { + display: flex; + + /* border-bottom: 1rpx solid #eee; */ + cursor: pointer; + padding-top: 20rpx; +} +.item .poster { + height: 128rpx; + margin-right: 20rpx; +} +.item .meta { + /* flex: 1; */ width: 100%; - height: calc(100% - 40rpx); - object-fit: cover; + height: 240rpx; + background-color: #fff; +} +.item .meta .titContent{ + /* width: 100%; */ + padding: 10rpx 40rpx; + /* line-height: 50rpx; */ + border-bottom: 1rpx solid #ccc; +} +.item .meta .subContent{ + padding: 20rpx 40rpx; +} +.item .meta .title,.item .meta .sub-title { + display:inline-block; + margin-bottom: 15rpx; +} +.item .meta .titleButton{ + color: blue; + float: right; + line-height: 60rpx; + font-size: 25rpx; +} +.item .meta .title { + font-size: 32rpx; + padding-top: 10rpx; + /* line-height: 50rpx; */ +} +.item .meta .sub-year { + font-size: 26rpx; + color: #c0c0c0; + margin-right: 20rpx; + display: inline; +} +.item .meta .sub-title { + font-size: 26rpx; + color: #c0c0c0; + line-height: 37rpx; + display: inline; +} +.item .meta .artists { + font-size: 26rpx; + color: #999; +} +.item .rating { + font-size: 28rpx; + font-weight: bold; + color: #f74c31; +} +.tips { + font-size: 28rpx; + text-align: center; + padding: 50rpx; + color: #ccc; +} +.tips image { + height: 40rpx; + margin-right: 20rpx; +} +.tips image,.tips text { + vertical-align: middle; } diff --git a/pages/start/images/logo.png b/pages/start/images/logo.png new file mode 100644 index 0000000..64826c6 Binary files /dev/null and b/pages/start/images/logo.png differ diff --git a/pages/start/start.js b/pages/start/start.js index a4825b4..ac548d7 100644 --- a/pages/start/start.js +++ b/pages/start/start.js @@ -7,7 +7,7 @@ Page({ * 页面的初始数据 */ data: { - + images:'images/logo.png' }, /** diff --git a/pages/start/start.wxml b/pages/start/start.wxml index 0b2b513..43ececd 100644 --- a/pages/start/start.wxml +++ b/pages/start/start.wxml @@ -1,3 +1,7 @@ - 技术支持单位:南京智工达信息科技有限公司 + + + + + \ No newline at end of file diff --git a/pages/start/start.wxss b/pages/start/start.wxss index 1ad1cfd..5fe3ac0 100644 --- a/pages/start/start.wxss +++ b/pages/start/start.wxss @@ -1,14 +1,20 @@ /* pages/start.wxss */ .start { - background-color: rgb(52, 51, 255); + /* background-color: rgb(52, 51, 255); */ + background-color: #fff; height: 100%; width: 100%; + /* background-image: url(pages/images/logo.png); */ /* background-image: url(https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/start.jpg); */ background-repeat: no-repeat; background-size: cover; background-position-x: center; } - +.img{ + width: 150px; + height: 150px; + margin-top: 40%; +} .bottomText{ position: absolute; bottom: 2rem; diff --git a/project.config.json b/project.config.json index 3593f17..c529eb8 100644 --- a/project.config.json +++ b/project.config.json @@ -56,7 +56,11 @@ "compileType": "miniprogram", "libVersion": "2.19.4", "appid": "wxa9783cf92ee95a72", +<<<<<<< HEAD "projectname": "bridgespace-app", +======= + "projectname": "inlandVessel-app", +>>>>>>> cdc45140f836a5564ba6d4f94c3e4d7e23d3df72 "condition": {}, "editorSetting": { "tabIndent": "insertSpaces",