| | |
| | | <script> |
| | | export default { |
| | | onLaunch: function() { |
| | | console.log('App Launch') |
| | | |
| | | }, |
| | | onShow: function() { |
| | | console.log('App Show') |
| | | |
| | | }, |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | longPressActions: { |
| | | itemList: ['发送给朋友', '保存图片', '收藏'], |
| | | success: function(data) { |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | | |
| | | } |
| | | } |
| | | }); |
| | |
| | | }, |
| | | getproblem() { |
| | | getproblem().then((resp => { |
| | | console.log(resp, '问题类型') |
| | | |
| | | this.columns = [resp.data.map(item => { |
| | | return item.name |
| | | })] |
| | |
| | | videos: this.videos.join(','), |
| | | } |
| | | save(data).then(resp => { |
| | | console.log(resp, '保存'); |
| | | |
| | | if (resp.code == 200) { |
| | | uni.showToast({ |
| | | title: '保存成功', |
| | |
| | | }) |
| | | }, |
| | | confirmone(e) { |
| | | console.log(e, 'eeee'); |
| | | |
| | | this.time = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.showDate = false |
| | | }, |
| | | confirmtwo(e) { |
| | | console.log(e, 'eeee'); |
| | | |
| | | this.problemType = e.value[0] |
| | | this.showList = false |
| | | }, |
| | |
| | | this.showList = false |
| | | }, |
| | | goTopagelocation() { |
| | | console.log('0000000000000000'); |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/location/location' |
| | | }) |
| | |
| | | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], //从相册选择 |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: config.imageUrl, |
| | |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | | |
| | | this.images = [...this.images, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes'); |
| | | |
| | | this.videos = [...this.videos, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | |
| | | methods: { |
| | | open() { |
| | | getInfo().then(resp => { |
| | | console.log(resp, '党员信息'); |
| | | |
| | | if(resp.code==200){ |
| | | this.info =resp.data |
| | | } |
| | |
| | | methods: { |
| | | Allread() { |
| | | getread().then(resp => { |
| | | console.log(resp, '====='); |
| | | |
| | | this.getMessagelist() |
| | | }) |
| | | }, |
| | | getBanner() { |
| | | getBanner().then(resp => { |
| | | console.log(resp, '获取banner'); |
| | | |
| | | this.bannerlist = resp.data |
| | | }) |
| | | }, |
| | | getappletcinfo() { |
| | | getappletcinfo().then(resp => { |
| | | console.log(resp, '-----判断角色'); |
| | | |
| | | this.userInfo = resp.data |
| | | this.member = resp.data ? 2 : 1 |
| | | uni.setStorageSync('userInfo', resp.data) |
| | |
| | | pageSize: 5 |
| | | } |
| | | getMessagelist(data).then(resp => { |
| | | console.log(resp, '获取消息列表'); |
| | | |
| | | if (resp.data.records.length < 5 && this.pageNum == 1) { |
| | | this.msgListTotal = resp.data.records |
| | | this.isLoading = true |
| | |
| | | 1) |
| | | this.noreadlists = this.msgLists.filter(item => item.readStatus === 0) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | | console.log(this.msgListTotal, 'this.msgListTotal'); |
| | | |
| | | }) |
| | | }, |
| | | changeActive(value) { |
| | |
| | | |
| | | }, |
| | | change() { |
| | | console.log('1111'); |
| | | |
| | | }, |
| | | |
| | | onClick() { |
| | | this.isClick = true |
| | | console.log('this.isClick', this.isClick); |
| | | |
| | | }, |
| | | goTopage() { |
| | | uni.navigateTo({ |
| | |
| | | result.id = index + 1 |
| | | return result |
| | | }); |
| | | console.log(this.locationList); |
| | | |
| | | } |
| | | }) |
| | | return |
| | |
| | | ak: '3mHKIXMArjgIkgADzOlTYp4XssNSNkwr' // 替换为你自己的 AK |
| | | }, |
| | | success: (res) => { |
| | | console.log(res, '-------'); |
| | | |
| | | if (res.data.status === 0) { |
| | | this.searchResults = res.data.results; |
| | | this.latitude = res.data.results[0].location.lat |
| | |
| | | }, |
| | | onReady() { |
| | | this.map = new BMapGL.Map("container"); // 创建地图实例 |
| | | console.log(this.map); |
| | | |
| | | // uni.getLocation({ |
| | | // type: 'wgs84', |
| | | // success: (res) => { |
| | |
| | | const longitude = position.coords.longitude; |
| | | const accuracy = position.coords.accuracy; // 精度,单位米 |
| | | |
| | | console.log(`纬度: ${latitude}, 经度: ${longitude}, 精度: ${accuracy}`); |
| | | |
| | | // 在这里可以使用获取到的经纬度信息,例如在地图上显示位置等。 |
| | | } |
| | | |
| | | function error(err) { |
| | | console.log(err); |
| | | |
| | | switch (err.code) { |
| | | case err.PERMISSION_DENIED: |
| | | console.error("用户拒绝了位置请求。"); |
| | |
| | | item.id = index + 1 |
| | | return item |
| | | }) |
| | | console.log(this.locationList); |
| | | |
| | | }) |
| | | this.map.addEventListener('click', (e) => { |
| | | this.clearMarkers() |
| | |
| | | var myGeo = new BMapGL.Geocoder(); |
| | | // 根据坐标得到地址描述 |
| | | myGeo.getLocation(new BMapGL.Point(e.latlng.lng, e.latlng.lat), (result) => { |
| | | console.log(result, 'result'); |
| | | |
| | | this.locationList = result.surroundingPois.map((item, index) => { |
| | | item.id = index + 1 |
| | | return item |
| | |
| | | }); |
| | | // }, |
| | | // error:err=>{ |
| | | // console.log(err,'err'); |
| | | // |
| | | // } |
| | | // }); |
| | | |
| | |
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, |
| | | onLoad(params) { |
| | | onShow(params) { |
| | | this.id = params.id |
| | | if (params.type) { |
| | | this.type = false |
| | |
| | | item.height = uni.$u.addUnit(rowHeight) |
| | | rows.push(item) |
| | | } |
| | | // console.log(rows); |
| | | // |
| | | return rows |
| | | }, |
| | | uTitleWidth() { |
| | |
| | | // width: `${this.startX + this.deltaX}px` |
| | | // } |
| | | // }) |
| | | // // console.log(this.startX + this.deltaX); |
| | | // // |
| | | // animation.transition(button, { |
| | | // styles: { |
| | | // transform: `translateX(${this.startX + this.deltaX}px)` |
| | |
| | | this.barStyle = { |
| | | width: `${width}px` |
| | | } |
| | | // console.log('width', width); |
| | | // |
| | | if (drag) { |
| | | this.$emit('drag', { |
| | | value |
| | |
| | | |
| | | // 开发环境才提示,生产环境不会提示 |
| | | if (process.env.NODE_ENV === 'development') { |
| | | console.log(`\n %c uView V${version} %c https://uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;'); |
| | | |
| | | } |
| | | |
| | | export default { |
| | |
| | | * @param m solar month |
| | | * @param d solar day |
| | | * @return JSON object |
| | | * @eg:console.log(calendar.solar2lunar(1987,11,01)); |
| | | * @eg: |
| | | */ |
| | | solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31 |
| | | // 年份限定、上限 |
| | |
| | | * @param d lunar day |
| | | * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可] |
| | | * @return JSON object |
| | | * @eg:console.log(calendar.lunar2solar(1987,9,10)); |
| | | * @eg: |
| | | */ |
| | | lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1 |
| | | var isLeapMonth = !!isLeapMonth |