Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
6 files modified
4 files added
| | |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | |
| | | }, |
| | | { |
| | | "path": "pages/voting/information", |
| | | "style": { |
| | | "navigationBarTitleText": "电子证件", |
| | | "navigationBarBackgroundColor": "#103289", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | |
| | | }, { |
| | | "path": "pages/exam/startexam", |
| | | "name": "startexam", |
| | |
| | | title:'电子证件', |
| | | img:'../../static/workbench/task9.png', |
| | | url:'' |
| | | } |
| | | // ,{ |
| | | // title:'模拟考试', |
| | | // img:'../../static/workbench/exam.png', |
| | | // url:'/pages/exam/startexam' |
| | | // } |
| | | ], |
| | | }], |
| | | dataTwo:[{ |
| | | title:'参与投票', |
| | | img:'../../static/workbench/task5.png', |
| | |
| | | title:'投票排行', |
| | | img:'../../static/workbench/task6.png', |
| | | url:'/pages/voting/votRanking' |
| | | }] |
| | | } |
| | | // ,{ |
| | | // title:'模拟考试', |
| | | // img:'../../static/workbench/exam.png', |
| | | // url:'/pages/exam/startexam' |
| | | // } |
| | | ] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | },mounted(){ |
| | | }, |
| | | mounted() { |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | | this.$refs.uToast.show({ |
| | | title: '功能暂未开放', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | },methods: { |
| | | }, |
| | | methods: { |
| | | //页面跳转 |
| | | goOnePage(url,index){ |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | }else if(index == "0" || index == "3" || index == "4" || index == "5"){ |
| | | } else if (index == "0" || index == "3" || index == "4") { |
| | | this.$refs.uToast.show({ |
| | | title: '功能研发中', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | } else if (index == 5) { |
| | | this.getUser(); |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url:url |
| | | }) |
| | | } |
| | | }, |
| | | //获取用户信息 |
| | | getUser() { |
| | | var that = this; |
| | | debugger |
| | | uni.request({ |
| | | url: that.$store.state.BaopiAPI + '/blade-user/detail', |
| | | method: 'GET', |
| | | data: { |
| | | cardid: that.$store.state.UserData.cardid, |
| | | isDeleted:0, |
| | | status : 1, |
| | | }, |
| | | success: (res) => { |
| | | if(res.statusCode == "200"){ |
| | | var urls="http://223.82.109.183:2080/securityInfo.html?securityNumber="+res.data.data.securitynumber; |
| | | uni.navigateTo({ |
| | | url: '../voting/information?url=' + urls |
| | | }); |
| | | }else{ |
| | | this.$refs.uToast.show({ |
| | | title: '暂无证件信息', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | goTwoPage(url,index){ |
| | | if(this.$store.state.UserData.stype != "1"){ |
| | |
| | | color: #000000; |
| | | |
| | | &::before { |
| | | content |
| | | : ""; |
| | | content: ""; |
| | | display: block; |
| | | width: 5rpx; |
| | | height: 36rpx; |
| | |
| | | <!-- <u-button type="info" @click="acc">测试</u-button> --> |
| | | <!-- <web-view :src="urls" @message="message"></web-view> --> |
| | | <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom" |
| | | :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylinesCom" |
| | | show-location="true"></map> |
| | | <view id="Umain"> |
| | | :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines" |
| | | show-location="true"> |
| | | <cover-view class="dingwBut" @click="mapControlsBack"> |
| | | <cover-image src="./map/img/dingwei.png" @click="mapControlsBack"> |
| | | </cover-image> |
| | | </cover-view> |
| | | |
| | | </map> |
| | | <view id="Umain" :style="{ height: activeHeight}" @touchstart="touchstart" @touchend="touchend" |
| | | @touchmove="touchmove"> |
| | | <view :class="['activeTip',activeTip?'isOpens':'notOpens'] " :style="{height:'30px'}"></view> |
| | | <view class="once-b"> |
| | | 任务详情 |
| | | </view> |
| | |
| | | {{ourData.num==ourData.jnum?"人数已满":'我参与'}} |
| | | </u-button> |
| | | </view> |
| | | <u-popup v-model="showIn" mode="center" border-radius="14" z-index='1000001'> |
| | | |
| | | </view> |
| | | <u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true"> |
| | | <view class="Info2"> |
| | | <view class="Info4">是否参加活动</view> |
| | | <view class="Info3"> |
| | | <u-button type="primary" @click="openAPP('oks')">参加</u-button> |
| | | <u-button type="error" @click="openAPP('nos')">取消</u-button> |
| | | </view> |
| | | <u-button class="Info5" type="primary" @click="openAPP('oks')">参加</u-button> |
| | | <u-button class="Info5" type="error" @click="openAPP('nos')">取消</u-button> |
| | | <!--<view class="Info3"> |
| | | </view> --> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import $moveWindow from "./map/js/move.js" |
| | | import $moveUniAppMap from "./map/js/moveUniAppMap.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | rid: '', |
| | | webV: null, |
| | | wv: null, |
| | | mapHeight: 0, |
| | | latitude: 28.687205773173343, |
| | | longitude: 115.8995839881188, |
| | | circles: [], //圆 |
| | | markers: [], //标记点 |
| | | mypolylines: [], |
| | | mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: [], |
| | | color: "#FE0000", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | }, |
| | | { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: [], |
| | | color: "#10a4ff", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | }, |
| | | ], |
| | | useTime: null, |
| | | useTimeSet: null, |
| | | times: 3000, |
| | |
| | | }, |
| | | bye: true, |
| | | types: '', //android? |
| | | moveDom: null, //移动实体类 |
| | | activeHeight: "auto ", //活动高度 默认自动 |
| | | afterClass: {}, |
| | | activeTip: false, //是否展开 |
| | | |
| | | mapControls: [{ |
| | | id: "1", |
| | | position: 20, |
| | | iconPath: "/static/tabbar/addSelectedIcon.png", |
| | | clickable: true, |
| | | }], //地图控件 |
| | | } |
| | | }, |
| | | methods: { |
| | | mapControlsBack() { |
| | | // console.log(1111) |
| | | this.getLocationInfo("notSet"); |
| | | // this.bye = false; |
| | | // this.timeBegin(1); |
| | | }, |
| | | touchstart(e) { |
| | | // console.log(e.changedTouches[0].clientY) |
| | | if (this.moveDom) { |
| | | this.moveDom.ListenerTouchstart(e) |
| | | } |
| | | }, |
| | | touchmove(e) { |
| | | // console.log(e.changedTouches[0].clientY) |
| | | if (this.moveDom) { |
| | | this.moveDom.ListenerTouchmove(e) |
| | | } |
| | | }, |
| | | touchend(e) { |
| | | // console.log(e.changedTouches[0].clientY) |
| | | if (this.moveDom) { |
| | | this.moveDom.ListenerTouchend(e) |
| | | } |
| | | }, |
| | | openAPP(type) { |
| | | let that = this; |
| | | if (type == "oks") { |
| | |
| | | } |
| | | } else { |
| | | this.showIn = true; |
| | | // this.openAPP('oks') |
| | | // this.$confirm('是否参与活动:' + this.ourData.rname + "?", '提示', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | |
| | | // } |
| | | // }, |
| | | timeBegin(val) { |
| | | console.log(this.bye) |
| | | // console.log(this.bye) |
| | | let that = this; |
| | | if (this.bye) { |
| | | console.log("再见") |
| | | if (that.useTime) { |
| | |
| | | } |
| | | return |
| | | } |
| | | let that = this; |
| | | if (this.useTime) { |
| | | return |
| | | } else { |
| | | //加入自己的路线基础 索引1 |
| | | // this.mypolylines[1] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | // points: [], |
| | | // color: "#10a4ff", //线的颜色 |
| | | // width: 10, //线的宽度 |
| | | // dottedLine: false, //是否虚线 |
| | | // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | // } |
| | | if (val == 1) { |
| | | that.getLocationInfo(); |
| | | } |
| | |
| | | latitude: a, |
| | | }); |
| | | }, |
| | | getLocationInfo() { |
| | | var that = this |
| | | getLocationInfo(val) { |
| | | var that = this; |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | isHighAccuracy: true, |
| | |
| | | // console.log(res, "当前位置"); |
| | | that.latitude = res.latitude |
| | | that.longitude = res.longitude |
| | | console.log(that.latitude) |
| | | console.log(that.longitude) |
| | | let d = { |
| | | id: that.ourData.id, |
| | | intlat: [res.longitude, res.latitude] |
| | | } |
| | | that.timeBeginSet(d) //30秒送数据 |
| | | // console.log(that.latitude) |
| | | // console.log(that.longitude) |
| | | that.map.moveToLocation({ |
| | | latitude: res.latitude, |
| | | longitude: res.longitude |
| | |
| | | radius: 10, //半径 |
| | | strokeWidth: 2 //描边的宽度 |
| | | }] |
| | | if (val != "notSet") { |
| | | let d = { |
| | | id: that.ourData.id, |
| | | intlat: [res.longitude, res.latitude] |
| | | } |
| | | that.timeBeginSet(d) //30秒送数据 |
| | | //加入绘制路线 |
| | | let useDataPosition = { |
| | | latitude: res.latitude, |
| | | longitude: res.longitude |
| | | } |
| | | let lat = useDataPosition.latitude + ''; |
| | | let long = useDataPosition.longitude + ''; |
| | | let oldLat = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[ |
| | | that.mypolylines[1].points.length - |
| | | 1].latitude + ''; |
| | | let oldLong = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[ |
| | | that.mypolylines[1].points.length - |
| | | 1].longitude + ''; |
| | | if (lat != oldLat && long != oldLong) { //判断如果两次位置不一样 那就添加 |
| | | that.mypolylines[1].points.push(useDataPosition); |
| | | } |
| | | // console.log(lat != oldLat && long != oldLong, 222222222222); |
| | | // console.log(that.mypolylines[1].points.length) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | markersCom() { |
| | | return this.markers.slice(0); |
| | | }, |
| | | mypolylinesCom() { |
| | | return this.mypolylines.slice(0); |
| | | }, |
| | | // mypolylinesCom() { |
| | | // // console.log(this.mypolylines,"333333333333333333333") |
| | | // return this.mypolylines.slice(0); |
| | | // }, |
| | | socketValue() { |
| | | return this.$store.state.socketValue; |
| | | } |
| | |
| | | onReady() { |
| | | let that = this; |
| | | |
| | | this.types = uni.getSystemInfoSync().platform; |
| | | this.types = uni.getSystemInfoSync(); |
| | | |
| | | var animation = uni.createAnimation({ |
| | | duration: 1000, |
| | | timingFunction: 'linear', |
| | | }) |
| | | |
| | | this.animation = animation; |
| | | |
| | | let activeHeight = 0; |
| | | this.getDom("#Umain", (res) => { |
| | | // console.log(res, 1111111111111111111111111111) |
| | | that.mapHeight = that.types.windowHeight - res.height + 30; |
| | | // that.mapHeight = 30; |
| | | that.activeHeight = res.height; |
| | | activeHeight = res.height; |
| | | let minHeight = 4 * 40 + 30 |
| | | let d = { |
| | | activeDom: "#Umain", |
| | | adaptDom: "#myMap", |
| | | uni: uni, |
| | | maxHeight: activeHeight, //在外面获取活动区域的高度, |
| | | //在构造中动态获取会实时改变这个值 |
| | | //导致改变固定的最高高度 |
| | | useHeight: minHeight, //缩小后的高度、、可设置成保留高度 |
| | | critical: (activeHeight - minHeight) / 3, //收缩程度,,可设置成总滑动距离的1/2 (maxHeight - useHeight) / 2 |
| | | fn: (res) => { |
| | | // console.log(res) |
| | | if (res.state != 'on') { |
| | | that.mapHeight = that.types.windowHeight - res.height + 30; |
| | | } else { |
| | | if (res.translate) { |
| | | that.activeTip = true; |
| | | } |
| | | if (res.translate) { |
| | | that.activeTip = false; |
| | | } |
| | | } |
| | | |
| | | if (res.translate === true) { |
| | | that.activeTip = true; |
| | | } else if (res.translate === false) { |
| | | that.activeTip = false; |
| | | } |
| | | that.activeHeight = res.height + 'px'; |
| | | } |
| | | } |
| | | that.moveDom = new $moveUniAppMap(d); |
| | | }) |
| | | // if (type == "android") { |
| | | // this.useHeight = "calc(100vh - 40px)"; |
| | | // } |
| | |
| | | // data = JSON.stringify({ |
| | | datas = { |
| | | appenUrl: "http://192.168.0.108:83/", |
| | | butCT: "beginUp", |
| | | butCT: "begin", |
| | | buttype: 0, |
| | | captain: "我", |
| | | city: "南昌市", |
| | |
| | | toStrings(d); |
| | | } |
| | | toStrings(datas); |
| | | console.log(data) |
| | | // console.log(data) |
| | | if (data.team) { |
| | | data["teams"] = data.team.split(","); |
| | | } |
| | | that.ourData = data; |
| | | |
| | | |
| | | uni.getSystemInfo({ //初始化地图高度 |
| | | success(res) { |
| | | that.mapHeight = res.windowHeight; |
| | | } |
| | | }); |
| | | // console.log(data); |
| | | // return |
| | | // console.log(options.html) |
| | |
| | | // } |
| | | that.query = uni.createSelectorQuery(); |
| | | const _this = this; |
| | | uni.getSystemInfo({ |
| | | success: (res) => { |
| | | // _this.mapHeight = (res.screenHeight - res.statusBarHeight) /2 |
| | | // setTimeout(() => { |
| | | // that.getDom('#Umain', data => { |
| | | // console.log(res.statusBarHeight, res.screenHeight, data, 'dat') |
| | | // console.log(res.screenHeight - data.height + res |
| | | // .statusBarHeight) |
| | | // _this.mapHeight = res.screenHeight - res.statusBarHeight - 420 |
| | | that.mapHeight = res.screenHeight - res.statusBarHeight - 466 |
| | | that.mapHeight = that.mapHeight |
| | | // }) |
| | | // }, 1000) |
| | | // uni.getSystemInfo({ |
| | | // success: (res) => { |
| | | // // _this.mapHeight = (res.screenHeight - res.statusBarHeight) /2 |
| | | // // setTimeout(() => { |
| | | // // that.getDom('#Umain', data => { |
| | | // // console.log(res.statusBarHeight, res.screenHeight, data, 'dat') |
| | | // // console.log(res.screenHeight - data.height + res |
| | | // // .statusBarHeight) |
| | | // // _this.mapHeight = res.screenHeight - res.statusBarHeight - 420 |
| | | // that.mapHeight = res.screenHeight - res.statusBarHeight - 466 |
| | | // that.mapHeight = that.mapHeight |
| | | // // }) |
| | | // // }, 1000) |
| | | |
| | | // that.query.select('#Umain').boundingClientRect(data => { |
| | | // console.log('11111111') |
| | | // console.log(data) |
| | | // }).exec(); |
| | | // console.log(res) |
| | | // let info = uni.createSelectorQuery().select("Umain"); |
| | | // info.boundingClientRect(function(data) { //data - 各种参数 |
| | | // console.log(data.width) // 获取元素宽度 |
| | | // }).exec() |
| | | } |
| | | }) |
| | | // // that.query.select('#Umain').boundingClientRect(data => { |
| | | // // console.log('11111111') |
| | | // // console.log(data) |
| | | // // }).exec(); |
| | | // // console.log(res) |
| | | // // let info = uni.createSelectorQuery().select("Umain"); |
| | | // // info.boundingClientRect(function(data) { //data - 各种参数 |
| | | // // console.log(data.width) // 获取元素宽度 |
| | | // // }).exec() |
| | | // } |
| | | // }) |
| | | // console.log(document.getElementById("Umain")) |
| | | // this.checkDomHeightId({ |
| | | // domName: "getElementById", |
| | |
| | | |
| | | |
| | | //画线 |
| | | console.log(data) |
| | | // console.log(data) |
| | | let line = data.line.split("(")[1].split(")")[0].split(","); |
| | | console.log(line[0].split(" ")[1]) |
| | | console.log(line[0].split(" ")[0]) |
| | | // console.log(line[0].split(" ")[1]) |
| | | // console.log(line[0].split(" ")[0]) |
| | | this.latitude = line[0].split(" ")[1]; |
| | | this.longitude = line[0].split(" ")[0]; |
| | | this.map.moveToLocation({ |
| | |
| | | }) |
| | | } |
| | | // setTimeout(() => { |
| | | this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | points: ourline, |
| | | color: "#FE0000", //线的颜色 |
| | | width: 10, //线的宽度 |
| | | dottedLine: false, //是否虚线 |
| | | arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | } |
| | | console.log(this.mypolylines) |
| | | // this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项 |
| | | // points: ourline, |
| | | // color: "#FE0000", //线的颜色 |
| | | // width: 10, //线的宽度 |
| | | // dottedLine: false, //是否虚线 |
| | | // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性 |
| | | // } |
| | | that.mypolylines[0].points = ourline; |
| | | // console.log(this.mypolylines) |
| | | // }, 1000) |
| | | this.showWindow(); |
| | | // this.getLocationInfo(data); |
| | |
| | | |
| | | <style lang="scss"> |
| | | .content { |
| | | flex: 1; |
| | | height: 100%; |
| | | // flex: 1; |
| | | // height: 100%; |
| | | overflow: hidden; |
| | | // position: relative; |
| | | } |
| | | |
| | | #Umain { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: auto; |
| | | left: 0; |
| | | bottom: 0; |
| | | background-color: #e8e8e8; |
| | | z-index: 1000000; |
| | | left: 0; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .once { |
| | |
| | | |
| | | |
| | | .Info2 { |
| | | width: 200px; |
| | | height: 100px; |
| | | width: 100%; |
| | | // height: 100px; |
| | | padding: 0 10px; |
| | | |
| | | .Info3 { |
| | |
| | | text-align: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | .Info5 { |
| | | margin-bottom: 10px !important; |
| | | width: 70%; |
| | | } |
| | | } |
| | | |
| | | .notOpens { |
| | | &::after { |
| | | content: ""; |
| | | display: block; |
| | | width: 20px; |
| | | height: 4px; |
| | | background-color: rgba(202, 202, 202, 1); |
| | | position: absolute; |
| | | top: 10px; |
| | | left: calc(50% - 10px); |
| | | border-radius: 5px; |
| | | transition: all 0.1s; |
| | | } |
| | | } |
| | | |
| | | .activeTip { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .isOpens { |
| | | &::after { |
| | | content: ""; |
| | | display: block; |
| | | width: 13px; |
| | | height: 4px; |
| | | background-color: rgba(202, 202, 202, 1); |
| | | position: absolute; |
| | | top: 10px; |
| | | left: calc(50% - 12px); |
| | | border-radius: 5px; |
| | | transform: rotate(30deg); |
| | | transition: all 0.1s; |
| | | } |
| | | |
| | | &::before { |
| | | content: ""; |
| | | display: block; |
| | | width: 13px; |
| | | height: 4px; |
| | | background-color: rgba(202, 202, 202, 1); |
| | | position: absolute; |
| | | top: 10px; |
| | | left: calc(50% - 4px); |
| | | border-radius: 5px; |
| | | transform: rotate(-30deg); |
| | | transition: all 0.1s; |
| | | } |
| | | } |
| | | |
| | | .dingwBut { |
| | | width: 80upx; |
| | | height: 80upx; |
| | | background-color: #fff; |
| | | border-radius: 20upx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: absolute; |
| | | bottom: 40upx; |
| | | right: 40upx; |
| | | |
| | | // background-color: red; |
| | | // .dingwButImg { |
| | | // width: 80%; |
| | | // height: 80%; |
| | | // } |
| | | // .icon{ |
| | | // } |
| | | // &::after{ |
| | | // content: url(map/img/dingwei.png); |
| | | // } |
| | | // .dingwButImg { |
| | | // animation: mymove 5s infinite; |
| | | // animation-timing-function: linear; |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | @keyframes mymove { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(1turn); |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | class $moveUniAppMap { |
| | | constructor(arg) { |
| | | this.activeDom = arg.activeDom; //活动dom |
| | | this.adaptDom = arg.adaptDom; //适应dom |
| | | this.windowSize = arg.uni.getSystemInfoSync(); // 设备参数含屏幕尺寸 |
| | | let doms = arg.uni.createSelectorQuery(); //获取dom参数uni工具 |
| | | this.getDoms = (name, fn) => { //fn是会回调函数,不用promis |
| | | doms.select(name).boundingClientRect((data) => { |
| | | if (fn) { |
| | | fn(data) |
| | | } |
| | | }).exec() |
| | | } |
| | | // console.log(this.windowSize) |
| | | |
| | | this.start = 0; |
| | | this.end = 0; |
| | | this.domHeight = 0; |
| | | this.openValue = false; //方向 |
| | | this.useHeight = arg.useHeight; //使用的低高度 |
| | | this.critical = arg.critical; //收缩展开的程度 |
| | | // this.getDoms(this.activeDom, (res) => { //获取dom最大高度 |
| | | this.maxHeight = arg.maxHeight; |
| | | // }) |
| | | this.fn = (res) => { |
| | | if (arg.fn) { |
| | | arg.fn(res) |
| | | } else { |
| | | console.log(res, "未设置输出函数") |
| | | } |
| | | } |
| | | |
| | | return this; |
| | | } |
| | | ListenerTouchstart(dom) { //开始移动,记录开始点和活动dom高度 |
| | | this.start = dom.changedTouches[0].clientY; |
| | | this.getDoms(this.activeDom, (res) => { //动态获取当前活动dom高度 |
| | | this.domHeight = res.height; |
| | | }) |
| | | // let d = { |
| | | // state: "start", |
| | | // height: this.maxHeight, |
| | | // }; |
| | | // // console.log(cha, "cha") |
| | | // // console.log(+endOn - +this.start, "cha") |
| | | // this.fn(d); |
| | | // console.log(this.start, "this.start") |
| | | } |
| | | ListenerTouchmove(dom) { |
| | | let endOn = dom.changedTouches[0].clientY; |
| | | // console.log(that.domHeight, that.start, endOn) |
| | | let usecha = +this.start - +endOn; |
| | | let cha = this.domHeight + usecha; |
| | | if (cha >= this.maxHeight) { |
| | | cha = this.maxHeight; |
| | | } else if (cha <= this.useHeight) { |
| | | cha = this.useHeight; |
| | | } |
| | | let translate = false; |
| | | if (usecha >= this.critical) { |
| | | translate = true; |
| | | } |
| | | if (usecha <= -this.critical) { |
| | | translate = true; |
| | | } |
| | | let d = { |
| | | state: "on", |
| | | height: cha, |
| | | translate: translate |
| | | }; |
| | | if (usecha >= 0) { |
| | | d.state = "up"; |
| | | } |
| | | // console.log(cha, "cha") |
| | | // console.log(usecha, "cha") |
| | | this.fn(d); |
| | | } |
| | | ListenerTouchend(dom) { |
| | | this.end = dom.changedTouches[0].clientY; |
| | | let cha, states; |
| | | if (this.end >= this.start) { |
| | | states = false; //方向向下收缩 |
| | | cha = this.end - this.start; |
| | | } else { |
| | | states = true; //方向向上抬起 |
| | | cha = this.start - this.end; |
| | | } |
| | | if (cha >= this.critical) { |
| | | //高 |
| | | this.judge(states, true); //程度 |
| | | } else if (cha < this.critical) { |
| | | //低 |
| | | this.judge(states, false); //程度 |
| | | } |
| | | // console.log(cha) |
| | | } |
| | | innit() { |
| | | |
| | | } |
| | | //输出事件 |
| | | judge(val, chengdu) { |
| | | let translate = ''; |
| | | if (chengdu) { |
| | | this.openValue = val; |
| | | if (val) { |
| | | this.height = this.maxHeight; //给到向上的最高高度 |
| | | } else { |
| | | this.height = this.useHeight; //给到向下的最低高度 |
| | | } |
| | | } else { |
| | | this.height = this.domHeight; //给到当前高度 |
| | | } |
| | | if (this.height == this.maxHeight) { |
| | | translate = false; |
| | | } else { |
| | | translate = true; |
| | | } |
| | | let d = { |
| | | state: this.openValue, |
| | | height: this.height, |
| | | translate: translate |
| | | }; |
| | | // console.log(d) |
| | | this.fn(d); |
| | | } |
| | | } |
| | | |
| | | export default $moveUniAppMap; |
| | |
| | | parentId: d.jsid, |
| | | jurisdiction: d.xqobjId, |
| | | cardid: d.carId, |
| | | address: d.address |
| | | address: d.address, |
| | | workunit: d.obj |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | |
| | | <u-select v-model="show" mode="mutil-column-auto" :list="roleList" @confirm="radioGroupChange"> |
| | | </u-select> |
| | | </u-form-item> |
| | | <u-form-item label="工作单位" prop="obj" left-icon="home-fill" label-width="200" :required="true"> |
| | | <u-form-item label="工作单位" prop="obj" left-icon="home-fill" label-width="200" :required="false"> |
| | | <u-input v-model="form.obj" placeholder="请输入工作单位" /> |
| | | </u-form-item> |
| | | <u-form-item label="所在地区" prop="xq" left-icon="map-fill" label-width="200" :required="true"> |
| | | <u-input v-model="form.xq" type="select" placeholder="请选择辖区" :border="true" @click="regionClick" /> |
| | | <u-input v-model="form.xq" type="select" placeholder="请选择所在地区" :border="true" @click="regionClick" /> |
| | | <u-select v-model="regionShow" mode="mutil-column-auto" :list="regionList" @confirm="regionSelect"> |
| | | </u-select> |
| | | </u-form-item> |
| | | <u-form-item label="详细地址" prop="address" left-icon="map" label-width="200" :required="true"> |
| | | <u-form-item label="详细地址" prop="address" left-icon="map" label-width="200" :required="false"> |
| | | <u-input v-model="form.address" placeholder="详细地址" /> |
| | | </u-form-item> |
| | | <u-form-item label="性别" label-width="200" left-icon="man"> |
| | |
| | | |
| | | if (value.length <= 11) { |
| | | if (phone.test(value)) { |
| | | this.form.phone = value; |
| | | return true |
| | | } else { |
| | | return callback(new Error('手机号格式不正确')); |
| | | } |
| | | } |
| | | |
| | | if (value.length <= 18) { |
| | | if (value.length > 11) { |
| | | if (identity.test(value)) { |
| | | this.form.carId = value; |
| | | return true |
| | | } else { |
| | | return callback(new Error('身份证号格式不正确')); |
| | |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | obj: [{ |
| | | required: true, |
| | | required: false, |
| | | message: '请输入工作单位', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | address: [{ |
| | | required: true, |
| | | required: false, |
| | | message: '请输入详细地址', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <web-view :src="url"></web-view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: '' |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | // 获取传递过来的链接 |
| | | this.url = e.url |
| | | } |
| | | } |
| | | </script> |
| | |
| | | logPath: '', |
| | | piAPI: apis.api, |
| | | // piAPI: 'http://223.82.109.183:2082/api/', |
| | | // piAPI: 'http://192.168.0.108:83/', |
| | | // piAPI: 'http://192.168.0.110:83/', |
| | | //piAPI: 'http://223.82.109.183:2082/api/', |
| | | BaopiAPI: 'http://223.82.109.183:2080/api/', |
| | | puserName: '', |
| | | puserID: '', |
| | | puserIphone: '', |