1
This commit is contained in:
parent
ba4d6ac0dd
commit
f27c6e4ef0
37
App.vue
37
App.vue
@ -3,7 +3,8 @@
|
|||||||
useUpdateApp
|
useUpdateApp
|
||||||
} from '@/store/update.js';
|
} from '@/store/update.js';
|
||||||
import {
|
import {
|
||||||
cxcJurisdictionApi
|
cxcJurisdictionApi,
|
||||||
|
taskListApi
|
||||||
} from '@/api/api.js';
|
} from '@/api/api.js';
|
||||||
import {
|
import {
|
||||||
onLaunch,
|
onLaunch,
|
||||||
@ -12,17 +13,27 @@
|
|||||||
import {
|
import {
|
||||||
getLocation,
|
getLocation,
|
||||||
getWeather,
|
getWeather,
|
||||||
beforeJump
|
// beforeJump
|
||||||
} from './utils/index.js';
|
} from './utils/index.js';
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from '@/store';
|
} from '@/store';
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
|
console.log('---', todoNum.value)
|
||||||
|
|
||||||
|
// 动态更新角标
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: '1',
|
||||||
|
text: todoNum.value // 角标内容
|
||||||
|
});
|
||||||
|
|
||||||
uni.onTabBarMidButtonTap(() => {
|
uni.onTabBarMidButtonTap(() => {
|
||||||
beforeJump('/pages/task/index', () => {
|
uni.navigateTo({
|
||||||
uni.navigateTo({
|
url: '/pages/task/todotask'
|
||||||
url: '/pages/task/index?id=0'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -32,6 +43,8 @@
|
|||||||
getLocation()
|
getLocation()
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
taskList()
|
||||||
|
|
||||||
cxcJurisdictionApi({
|
cxcJurisdictionApi({
|
||||||
id: "1827997127165677570"
|
id: "1827997127165677570"
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@ -43,6 +56,18 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
const todoNum = ref(0)
|
||||||
|
const taskList = () => {
|
||||||
|
taskListApi({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 4,
|
||||||
|
_t: new Date().getTime()
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
todoNum.value = res.result.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<view :class="['content',{'gray':store.isgray==1}]">
|
<view :class="['content',{'gray':store.isgray==1}]">
|
||||||
<view class="nav">
|
<view class="nav">
|
||||||
<view class="nav_box f-row aic jcb">
|
<view class="nav_box f-row aic jcb">
|
||||||
<view class="menu" @click="showDrawer()">
|
<!-- <view class="menu" @click="showDrawer()">
|
||||||
<image src="../../static/index/menu.png" mode=""></image>
|
<image src="../../static/index/menu.png" mode=""></image>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="weather_calender f-row aic">
|
<view class="weather_calender f-row aic">
|
||||||
<view class="position f-row aic">
|
<view class="position f-row aic">
|
||||||
<image src="../../static/index/position.png" mode=""></image>
|
<image src="../../static/index/position.png" mode=""></image>
|
||||||
@ -114,14 +114,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-drawer ref="showLeft" mode="left" :width="156">
|
<!-- <uni-drawer ref="showLeft" mode="left" :width="156">
|
||||||
<view class="menu_list">
|
<view class="menu_list">
|
||||||
<view class="f-row aic jcb" v-for="item,i in menu" :key="i" @click="totask(item.path)">
|
<view class="f-row aic jcb" v-for="item,i in menu" :key="i" @click="totask(item.path)">
|
||||||
<text>{{item.text}}</text>
|
<text>{{item.text}}</text>
|
||||||
<uni-icons type="right" size="20" color="#333333"></uni-icons>
|
<uni-icons type="right" size="20" color="#333333"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-drawer>
|
</uni-drawer> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -133,7 +133,7 @@
|
|||||||
onLoad,
|
onLoad,
|
||||||
onShow,
|
onShow,
|
||||||
onPullDownRefresh,
|
onPullDownRefresh,
|
||||||
onReachBottom
|
// onReachBottom
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
bpmlistApi,
|
bpmlistApi,
|
||||||
@ -247,15 +247,15 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const menu = ref([{
|
// const menu = ref([{
|
||||||
text: '我的任务',
|
// text: '我的任务',
|
||||||
path: '/pages/task/index?id=0'
|
// path: '/pages/task/index?id=0'
|
||||||
},{
|
// },{
|
||||||
text: '历史任务',
|
// text: '历史任务',
|
||||||
path: '/pages/task/index?id=2'
|
// path: '/pages/task/index?id=2'
|
||||||
}])
|
// }])
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let pageSize = 15
|
let pageSize = 5
|
||||||
let loading = false
|
let loading = false
|
||||||
const list = ref([])
|
const list = ref([])
|
||||||
/**公文接口*/
|
/**公文接口*/
|
||||||
@ -341,7 +341,6 @@
|
|||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
pageNo = 1
|
|
||||||
loading = false
|
loading = false
|
||||||
list.value = []
|
list.value = []
|
||||||
cxcDaping()
|
cxcDaping()
|
||||||
@ -361,11 +360,11 @@
|
|||||||
fagui()
|
fagui()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onReachBottom(() => {
|
// onReachBottom(() => {
|
||||||
if (loading) return
|
// if (loading) return
|
||||||
pageNo++
|
// pageNo++
|
||||||
getlist()
|
// getlist()
|
||||||
})
|
// })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -381,21 +380,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
.menu_list {
|
// .menu_list {
|
||||||
padding: 0 30rpx;
|
// padding: 0 30rpx;
|
||||||
font-size: 28rpx;
|
// font-size: 28rpx;
|
||||||
color: #333333;
|
// color: #333333;
|
||||||
|
|
||||||
view {
|
// view {
|
||||||
height: 110rpx;
|
// height: 110rpx;
|
||||||
border-bottom: 1px solid #EFEFEF;
|
// border-bottom: 1px solid #EFEFEF;
|
||||||
}
|
// }
|
||||||
|
|
||||||
image {
|
// image {
|
||||||
width: 13rpx;
|
// width: 13rpx;
|
||||||
height: 23rpx;
|
// height: 23rpx;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
width: calc(100% - 60rpx);
|
width: calc(100% - 60rpx);
|
||||||
@ -419,12 +418,12 @@
|
|||||||
width: calc(100% - 60rpx);
|
width: calc(100% - 60rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
// .menu {
|
||||||
image {
|
// image {
|
||||||
width: 36rpx;
|
// width: 36rpx;
|
||||||
height: 46rpx;
|
// height: 46rpx;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.weather_calender {
|
.weather_calender {
|
||||||
image {
|
image {
|
||||||
|
@ -29,21 +29,21 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="f-col aic">
|
<view class="f-col aic">
|
||||||
<view class="msg f-row aic jca">
|
<view class="msg f-row aic jca">
|
||||||
<view class="box f-col aic" @click="jump('/pages/task/todotask')">
|
<!-- <view class="box f-col aic" @click="jump('/pages/task/todotask')">
|
||||||
<view class="num">
|
<view class="num">
|
||||||
{{todoNum}}
|
{{todoNum}}
|
||||||
</view>
|
</view>
|
||||||
<text>个人办公</text>
|
<text>个人办公</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="box f-col aic">
|
<view class="box f-col aic">
|
||||||
<view class="num">
|
<view class="num">
|
||||||
{{step}}
|
{{0}}
|
||||||
</view>
|
</view>
|
||||||
<text>步数</text>
|
<text>步数</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="box f-col aic" @click="jump('/pages/useredit/addressbook')">
|
<view class="box f-col aic" @click="jump('/pages/useredit/addressbook')">
|
||||||
<view class="num">
|
<view class="num">
|
||||||
34
|
0
|
||||||
</view>
|
</view>
|
||||||
<text>通讯录</text>
|
<text>通讯录</text>
|
||||||
</view>
|
</view>
|
||||||
@ -82,10 +82,6 @@
|
|||||||
import {
|
import {
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
|
||||||
userProfileApi,
|
|
||||||
taskListApi
|
|
||||||
} from '@/api/api.js';
|
|
||||||
import {
|
import {
|
||||||
queryRoleApi
|
queryRoleApi
|
||||||
} from '@/api/login.js';
|
} from '@/api/login.js';
|
||||||
@ -106,14 +102,7 @@
|
|||||||
useStore
|
useStore
|
||||||
} from '@/store';
|
} from '@/store';
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
import * as StepCounter from '../../uni_modules/wuwx-step-counter';
|
|
||||||
|
|
||||||
const step = ref(0)
|
|
||||||
StepCounter.startStepCountingUpdates({
|
|
||||||
handler: (numberOfSteps, timestamp, error) => {
|
|
||||||
step.value = numberOfSteps
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const currentVersion = ref(plus.runtime.version)
|
const currentVersion = ref(plus.runtime.version)
|
||||||
const arr = ref([
|
const arr = ref([
|
||||||
// {
|
// {
|
||||||
@ -170,21 +159,21 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onShow(() => {
|
// onShow(() => {
|
||||||
taskList()
|
// taskList()
|
||||||
})
|
// })
|
||||||
const todoNum = ref(0)
|
// const todoNum = ref(0)
|
||||||
const taskList = () => {
|
// const taskList = () => {
|
||||||
taskListApi({
|
// taskListApi({
|
||||||
pageNo: 1,
|
// pageNo: 1,
|
||||||
pageSize: 4,
|
// pageSize: 4,
|
||||||
_t: new Date().getTime()
|
// _t: new Date().getTime()
|
||||||
}).then((res) => {
|
// }).then((res) => {
|
||||||
if (res.success) {
|
// if (res.success) {
|
||||||
todoNum.value = res.result.total
|
// todoNum.value = res.result.total
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
## 0.2.0(2023-08-03)
|
|
||||||
完善 package.json 文件
|
|
@ -1,83 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "wuwx-step-counter",
|
|
||||||
"displayName": "计步器(兼容Android和iOS)",
|
|
||||||
"version": "0.2.0",
|
|
||||||
"description": "基于UTS实现,兼容Android和iOS的计步器插件",
|
|
||||||
"keywords": [
|
|
||||||
"计步器",
|
|
||||||
"计步",
|
|
||||||
"步数"
|
|
||||||
],
|
|
||||||
"repository": "https://github.com/wuwx/wuwx-step-counter",
|
|
||||||
"engines": {
|
|
||||||
"HBuilderX": "^3.6.8"
|
|
||||||
},
|
|
||||||
"dcloudext": {
|
|
||||||
"type": "uts",
|
|
||||||
"sale": {
|
|
||||||
"regular": {
|
|
||||||
"price": "0.00"
|
|
||||||
},
|
|
||||||
"sourcecode": {
|
|
||||||
"price": "0.00"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"contact": {
|
|
||||||
"qq": "11990950"
|
|
||||||
},
|
|
||||||
"declaration": {
|
|
||||||
"ads": "无",
|
|
||||||
"data": "插件不采集任何数据",
|
|
||||||
"permissions": "运动与健身"
|
|
||||||
},
|
|
||||||
"npmurl": ""
|
|
||||||
},
|
|
||||||
"uni_modules": {
|
|
||||||
"dependencies": [],
|
|
||||||
"encrypt": [],
|
|
||||||
"platforms": {
|
|
||||||
"cloud": {
|
|
||||||
"tcb": "y",
|
|
||||||
"aliyun": "y"
|
|
||||||
},
|
|
||||||
"client": {
|
|
||||||
"Vue": {
|
|
||||||
"vue2": "y",
|
|
||||||
"vue3": "y"
|
|
||||||
},
|
|
||||||
"App": {
|
|
||||||
"app-android": "y",
|
|
||||||
"app-ios": "y"
|
|
||||||
},
|
|
||||||
"H5-mobile": {
|
|
||||||
"Safari": "u",
|
|
||||||
"Android Browser": "u",
|
|
||||||
"微信浏览器(Android)": "u",
|
|
||||||
"QQ浏览器(Android)": "u"
|
|
||||||
},
|
|
||||||
"H5-pc": {
|
|
||||||
"Chrome": "u",
|
|
||||||
"IE": "u",
|
|
||||||
"Edge": "u",
|
|
||||||
"Firefox": "u",
|
|
||||||
"Safari": "u"
|
|
||||||
},
|
|
||||||
"小程序": {
|
|
||||||
"微信": "u",
|
|
||||||
"阿里": "u",
|
|
||||||
"百度": "u",
|
|
||||||
"字节跳动": "u",
|
|
||||||
"QQ": "u",
|
|
||||||
"钉钉": "u",
|
|
||||||
"快手": "u",
|
|
||||||
"飞书": "u",
|
|
||||||
"京东": "u"
|
|
||||||
},
|
|
||||||
"快应用": {
|
|
||||||
"华为": "u",
|
|
||||||
"联盟": "u"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
# wuwx-step-counter
|
|
||||||
|
|
||||||
### 使用方法
|
|
||||||
|
|
||||||
```
|
|
||||||
import * as StepCounter from '../../uni_modules/wuwx-step-counter'
|
|
||||||
|
|
||||||
StepCounter.startStepCountingUpdates({
|
|
||||||
handler: (numberOfSteps, timestamp, error) => {
|
|
||||||
console.log(numberOfSteps)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### 开发文档
|
|
||||||
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
|
|
||||||
[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
|
|
||||||
[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html)
|
|
||||||
[Hello UTS](https://gitcode.net/dcloud/hello-uts)
|
|
@ -1,58 +0,0 @@
|
|||||||
import Context from "android.content.Context";
|
|
||||||
import SensorEventListener from 'android.hardware.SensorEventListener';
|
|
||||||
import SensorEvent from 'android.hardware.SensorEvent';
|
|
||||||
import Sensor from 'android.hardware.Sensor';
|
|
||||||
import UTSAndroid from 'io.dcloud.uts.UTSAndroid';
|
|
||||||
import SensorManager from 'android.hardware.SensorManager';
|
|
||||||
|
|
||||||
type StartStepCountingUpdatesOptions = {
|
|
||||||
stepCounts: Int | null;
|
|
||||||
handler: (numberOfSteps : Float, timestamp : Date, error : any) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
type QueryStepCountStartingOptions = {
|
|
||||||
start: Date | null,
|
|
||||||
end: Date | null,
|
|
||||||
handler: (numberOfSteps : Int, error : any) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
let successHandler = (numberOfSteps : Float, timestamp : Date, error : any) => {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class StepCounterSensorEventListener implements SensorEventListener {
|
|
||||||
|
|
||||||
override onSensorChanged(event : SensorEvent) : void {
|
|
||||||
successHandler(event.values[0], new Date(), "")
|
|
||||||
}
|
|
||||||
|
|
||||||
override onAccuracyChanged(sensor : Sensor, param1 : Int) : void {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function startStepCountingUpdates(options: StartStepCountingUpdatesOptions) {
|
|
||||||
|
|
||||||
let stepCounterSensorEventListener = new StepCounterSensorEventListener();
|
|
||||||
successHandler = options.handler;
|
|
||||||
|
|
||||||
const context = UTSAndroid.getAppContext();
|
|
||||||
if (context != null) {
|
|
||||||
const sensorManager = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager
|
|
||||||
|
|
||||||
sensorManager.unregisterListener(stepCounterSensorEventListener, sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER))
|
|
||||||
sensorManager.registerListener(stepCounterSensorEventListener, sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER), SensorManager.SENSOR_DELAY_NORMAL)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function stopStepCountingUpdates() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export function queryStepCountStarting(options: QueryStepCountStartingOptions) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isStepCountingAvailable() {
|
|
||||||
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
import { CMStepCounter } from 'CoreMotion';
|
|
||||||
import { NSError, OperationQueue } from 'Foundation';
|
|
||||||
|
|
||||||
type StartStepCountingUpdatesOptions = {
|
|
||||||
stepCounts: Int | null;
|
|
||||||
handler: (numberOfSteps : Int, timestamp : Date, error : NSError | null) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
type QueryStepCountStartingOptions = {
|
|
||||||
start: Date | null,
|
|
||||||
end: Date | null,
|
|
||||||
handler: (numberOfSteps : Int, error : NSError | null) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
let stepCounter = new CMStepCounter()
|
|
||||||
|
|
||||||
export function startStepCountingUpdates(options: StartStepCountingUpdatesOptions) {
|
|
||||||
if (options.stepCounts == null) {
|
|
||||||
options.stepCounts = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
stepCounter.startStepCountingUpdates(to = OperationQueue.main, updateOn = options.stepCounts!, withHandler = options.handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function stopStepCountingUpdates() {
|
|
||||||
stepCounter.stopStepCountingUpdates()
|
|
||||||
}
|
|
||||||
|
|
||||||
export function queryStepCountStarting(options: QueryStepCountStartingOptions) {
|
|
||||||
if (options.start == null) {
|
|
||||||
let start = new Date()
|
|
||||||
start.setHours(0)
|
|
||||||
start.setMinutes(0)
|
|
||||||
start.setSeconds(0)
|
|
||||||
start.setMilliseconds(0)
|
|
||||||
options.start = start
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.end == null) {
|
|
||||||
options.end = new Date()
|
|
||||||
}
|
|
||||||
|
|
||||||
stepCounter.queryStepCountStarting(from = options.start!, to = options.end!, to = OperationQueue.main, withHandler = options.handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isStepCountingAvailable() {
|
|
||||||
CMStepCounter.isStepCountingAvailable()
|
|
||||||
}
|
|
521
unpackage/dist/dev/app-plus/app-service.js
vendored
521
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -448,12 +448,12 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
return blob;
|
return blob;
|
||||||
}
|
}
|
||||||
function download(url, name2, opts) {
|
function download(url, name, opts) {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", url);
|
xhr.open("GET", url);
|
||||||
xhr.responseType = "blob";
|
xhr.responseType = "blob";
|
||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
saveAs(xhr.response, name2, opts);
|
saveAs(xhr.response, name, opts);
|
||||||
};
|
};
|
||||||
xhr.onerror = function() {
|
xhr.onerror = function() {
|
||||||
console.error("could not download file");
|
console.error("could not download file");
|
||||||
@ -491,15 +491,15 @@ if (uni.restoreGlobal) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
function downloadSaveAs(blob, name2 = "download", opts) {
|
function downloadSaveAs(blob, name = "download", opts) {
|
||||||
const a2 = document.createElement("a");
|
const a2 = document.createElement("a");
|
||||||
a2.download = name2;
|
a2.download = name;
|
||||||
a2.rel = "noopener";
|
a2.rel = "noopener";
|
||||||
if (typeof blob === "string") {
|
if (typeof blob === "string") {
|
||||||
a2.href = blob;
|
a2.href = blob;
|
||||||
if (a2.origin !== location.origin) {
|
if (a2.origin !== location.origin) {
|
||||||
if (corsEnabled(a2.href)) {
|
if (corsEnabled(a2.href)) {
|
||||||
download(blob, name2, opts);
|
download(blob, name, opts);
|
||||||
} else {
|
} else {
|
||||||
a2.target = "_blank";
|
a2.target = "_blank";
|
||||||
click(a2);
|
click(a2);
|
||||||
@ -517,10 +517,10 @@ if (uni.restoreGlobal) {
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function msSaveAs(blob, name2 = "download", opts) {
|
function msSaveAs(blob, name = "download", opts) {
|
||||||
if (typeof blob === "string") {
|
if (typeof blob === "string") {
|
||||||
if (corsEnabled(blob)) {
|
if (corsEnabled(blob)) {
|
||||||
download(blob, name2, opts);
|
download(blob, name, opts);
|
||||||
} else {
|
} else {
|
||||||
const a2 = document.createElement("a");
|
const a2 = document.createElement("a");
|
||||||
a2.href = blob;
|
a2.href = blob;
|
||||||
@ -530,16 +530,16 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
navigator.msSaveOrOpenBlob(bom(blob, opts), name2);
|
navigator.msSaveOrOpenBlob(bom(blob, opts), name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function fileSaverSaveAs(blob, name2, opts, popup) {
|
function fileSaverSaveAs(blob, name, opts, popup) {
|
||||||
popup = popup || open("", "_blank");
|
popup = popup || open("", "_blank");
|
||||||
if (popup) {
|
if (popup) {
|
||||||
popup.document.title = popup.document.body.innerText = "downloading...";
|
popup.document.title = popup.document.body.innerText = "downloading...";
|
||||||
}
|
}
|
||||||
if (typeof blob === "string")
|
if (typeof blob === "string")
|
||||||
return download(blob, name2, opts);
|
return download(blob, name, opts);
|
||||||
const force = blob.type === "application/octet-stream";
|
const force = blob.type === "application/octet-stream";
|
||||||
const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
|
const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
|
||||||
const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
|
const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
|
||||||
@ -998,17 +998,17 @@ Only state can be modified.`);
|
|||||||
}
|
}
|
||||||
}, (api) => {
|
}, (api) => {
|
||||||
const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
|
const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now;
|
||||||
store.$onAction(({ after, onError, name: name2, args }) => {
|
store.$onAction(({ after, onError, name, args }) => {
|
||||||
const groupId = runningActionId++;
|
const groupId = runningActionId++;
|
||||||
api.addTimelineEvent({
|
api.addTimelineEvent({
|
||||||
layerId: MUTATIONS_LAYER_ID,
|
layerId: MUTATIONS_LAYER_ID,
|
||||||
event: {
|
event: {
|
||||||
time: now2(),
|
time: now2(),
|
||||||
title: "🛫 " + name2,
|
title: "🛫 " + name,
|
||||||
subtitle: "start",
|
subtitle: "start",
|
||||||
data: {
|
data: {
|
||||||
store: formatDisplay(store.$id),
|
store: formatDisplay(store.$id),
|
||||||
action: formatDisplay(name2),
|
action: formatDisplay(name),
|
||||||
args
|
args
|
||||||
},
|
},
|
||||||
groupId
|
groupId
|
||||||
@ -1020,11 +1020,11 @@ Only state can be modified.`);
|
|||||||
layerId: MUTATIONS_LAYER_ID,
|
layerId: MUTATIONS_LAYER_ID,
|
||||||
event: {
|
event: {
|
||||||
time: now2(),
|
time: now2(),
|
||||||
title: "🛬 " + name2,
|
title: "🛬 " + name,
|
||||||
subtitle: "end",
|
subtitle: "end",
|
||||||
data: {
|
data: {
|
||||||
store: formatDisplay(store.$id),
|
store: formatDisplay(store.$id),
|
||||||
action: formatDisplay(name2),
|
action: formatDisplay(name),
|
||||||
args,
|
args,
|
||||||
result
|
result
|
||||||
},
|
},
|
||||||
@ -1039,11 +1039,11 @@ Only state can be modified.`);
|
|||||||
event: {
|
event: {
|
||||||
time: now2(),
|
time: now2(),
|
||||||
logType: "error",
|
logType: "error",
|
||||||
title: "💥 " + name2,
|
title: "💥 " + name,
|
||||||
subtitle: "end",
|
subtitle: "end",
|
||||||
data: {
|
data: {
|
||||||
store: formatDisplay(store.$id),
|
store: formatDisplay(store.$id),
|
||||||
action: formatDisplay(name2),
|
action: formatDisplay(name),
|
||||||
args,
|
args,
|
||||||
error
|
error
|
||||||
},
|
},
|
||||||
@ -1052,8 +1052,8 @@ Only state can be modified.`);
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, true);
|
}, true);
|
||||||
store._customProperties.forEach((name2) => {
|
store._customProperties.forEach((name) => {
|
||||||
vue.watch(() => vue.unref(store[name2]), (newValue, oldValue) => {
|
vue.watch(() => vue.unref(store[name]), (newValue, oldValue) => {
|
||||||
api.notifyComponentUpdate();
|
api.notifyComponentUpdate();
|
||||||
api.sendInspectorState(INSPECTOR_ID);
|
api.sendInspectorState(INSPECTOR_ID);
|
||||||
if (isTimelineActive) {
|
if (isTimelineActive) {
|
||||||
@ -1062,7 +1062,7 @@ Only state can be modified.`);
|
|||||||
event: {
|
event: {
|
||||||
time: now2(),
|
time: now2(),
|
||||||
title: "Change",
|
title: "Change",
|
||||||
subtitle: name2,
|
subtitle: name,
|
||||||
data: {
|
data: {
|
||||||
newValue,
|
newValue,
|
||||||
oldValue
|
oldValue
|
||||||
@ -1304,14 +1304,14 @@ Only state can be modified.`);
|
|||||||
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
||||||
vue.toRefs(vue.ref(state ? state() : {}).value)
|
vue.toRefs(vue.ref(state ? state() : {}).value)
|
||||||
) : vue.toRefs(pinia2.state.value[id]);
|
) : vue.toRefs(pinia2.state.value[id]);
|
||||||
return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name2) => {
|
return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
|
||||||
if (name2 in localState) {
|
if (name in localState) {
|
||||||
console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name2}" in store "${id}".`);
|
console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
|
||||||
}
|
}
|
||||||
computedGetters[name2] = vue.markRaw(vue.computed(() => {
|
computedGetters[name] = vue.markRaw(vue.computed(() => {
|
||||||
setActivePinia(pinia2);
|
setActivePinia(pinia2);
|
||||||
const store2 = pinia2._s.get(id);
|
const store2 = pinia2._s.get(id);
|
||||||
return getters[name2].call(store2, store2);
|
return getters[name].call(store2, store2);
|
||||||
}));
|
}));
|
||||||
return computedGetters;
|
return computedGetters;
|
||||||
}, {}));
|
}, {}));
|
||||||
@ -1404,7 +1404,7 @@ Only state can be modified.`);
|
|||||||
actionSubscriptions = [];
|
actionSubscriptions = [];
|
||||||
pinia2._s.delete($id);
|
pinia2._s.delete($id);
|
||||||
}
|
}
|
||||||
function wrapAction(name2, action) {
|
function wrapAction(name, action) {
|
||||||
return function() {
|
return function() {
|
||||||
setActivePinia(pinia2);
|
setActivePinia(pinia2);
|
||||||
const args = Array.from(arguments);
|
const args = Array.from(arguments);
|
||||||
@ -1418,7 +1418,7 @@ Only state can be modified.`);
|
|||||||
}
|
}
|
||||||
triggerSubscriptions(actionSubscriptions, {
|
triggerSubscriptions(actionSubscriptions, {
|
||||||
args,
|
args,
|
||||||
name: name2,
|
name,
|
||||||
store,
|
store,
|
||||||
after,
|
after,
|
||||||
onError
|
onError
|
||||||
@ -1754,7 +1754,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
};
|
};
|
||||||
const _sfc_main$Q = {
|
const _sfc_main$P = {
|
||||||
__name: "login",
|
__name: "login",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@ -1926,7 +1926,7 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-e4e4508d"], ["__file", "D:/projects/cxc-szcx-uniapp/pages/login/login.vue"]]);
|
const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-e4e4508d"], ["__file", "D:/projects/cxc-szcx-uniapp/pages/login/login.vue"]]);
|
||||||
const fontData = [
|
const fontData = [
|
||||||
{
|
{
|
||||||
"font_class": "arrow-down",
|
"font_class": "arrow-down",
|
||||||
@ -2577,7 +2577,7 @@ This will fail in production.`);
|
|||||||
const reg = /^[0-9]*$/g;
|
const reg = /^[0-9]*$/g;
|
||||||
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||||||
};
|
};
|
||||||
const _sfc_main$P = {
|
const _sfc_main$O = {
|
||||||
name: "UniIcons",
|
name: "UniIcons",
|
||||||
emits: ["click"],
|
emits: ["click"],
|
||||||
props: {
|
props: {
|
||||||
@ -2631,7 +2631,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return vue.openBlock(), vue.createElementBlock(
|
return vue.openBlock(), vue.createElementBlock(
|
||||||
"text",
|
"text",
|
||||||
{
|
{
|
||||||
@ -2646,7 +2646,7 @@ This will fail in production.`);
|
|||||||
/* CLASS, STYLE */
|
/* CLASS, STYLE */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$e], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
|
const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
|
||||||
let Calendar$1 = class Calendar {
|
let Calendar$1 = class Calendar {
|
||||||
constructor({
|
constructor({
|
||||||
selected,
|
selected,
|
||||||
@ -3002,7 +3002,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
const _sfc_main$O = {
|
const _sfc_main$N = {
|
||||||
props: {
|
props: {
|
||||||
weeks: {
|
weeks: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -3036,7 +3036,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return vue.openBlock(), vue.createElementBlock(
|
return vue.openBlock(), vue.createElementBlock(
|
||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
@ -3092,7 +3092,7 @@ This will fail in production.`);
|
|||||||
/* CLASS, NEED_HYDRATION */
|
/* CLASS, NEED_HYDRATION */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$d], ["__scopeId", "data-v-3c762a01"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
|
const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$c], ["__scopeId", "data-v-3c762a01"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
|
||||||
const isObject = (val) => val !== null && typeof val === "object";
|
const isObject = (val) => val !== null && typeof val === "object";
|
||||||
const defaultDelimiters = ["{", "}"];
|
const defaultDelimiters = ["{", "}"];
|
||||||
class BaseFormatter {
|
class BaseFormatter {
|
||||||
@ -3451,7 +3451,7 @@ This will fail in production.`);
|
|||||||
const {
|
const {
|
||||||
t: t$3
|
t: t$3
|
||||||
} = initVueI18n(i18nMessages);
|
} = initVueI18n(i18nMessages);
|
||||||
const _sfc_main$N = {
|
const _sfc_main$M = {
|
||||||
name: "UniDatetimePicker",
|
name: "UniDatetimePicker",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -3944,9 +3944,9 @@ This will fail in production.`);
|
|||||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||||
},
|
},
|
||||||
// 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
|
// 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
|
||||||
checkValue(name2, value, values) {
|
checkValue(name, value, values) {
|
||||||
if (values.indexOf(value) === -1) {
|
if (values.indexOf(value) === -1) {
|
||||||
this[name2] = values[0];
|
this[name] = values[0];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 每个月的实际天数
|
// 每个月的实际天数
|
||||||
@ -4055,7 +4055,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
|
return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
|
||||||
vue.createElementVNode("view", {
|
vue.createElementVNode("view", {
|
||||||
onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
|
onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
|
||||||
@ -4332,11 +4332,11 @@ This will fail in production.`);
|
|||||||
)) : vue.createCommentVNode("v-if", true)
|
)) : vue.createCommentVNode("v-if", true)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$c], ["__scopeId", "data-v-1d532b70"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
|
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$b], ["__scopeId", "data-v-1d532b70"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
|
||||||
const {
|
const {
|
||||||
t: t$2
|
t: t$2
|
||||||
} = initVueI18n(i18nMessages);
|
} = initVueI18n(i18nMessages);
|
||||||
const _sfc_main$M = {
|
const _sfc_main$L = {
|
||||||
components: {
|
components: {
|
||||||
calendarItem,
|
calendarItem,
|
||||||
timePicker: TimePicker
|
timePicker: TimePicker
|
||||||
@ -4745,7 +4745,7 @@ This will fail in production.`);
|
|||||||
* 派发事件
|
* 派发事件
|
||||||
* @param {Object} name
|
* @param {Object} name
|
||||||
*/
|
*/
|
||||||
setEmit(name2) {
|
setEmit(name) {
|
||||||
if (!this.range) {
|
if (!this.range) {
|
||||||
if (!this.calendar.fullDate) {
|
if (!this.calendar.fullDate) {
|
||||||
this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
|
this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
|
||||||
@ -4762,7 +4762,7 @@ This will fail in production.`);
|
|||||||
fullDate,
|
fullDate,
|
||||||
extraInfo
|
extraInfo
|
||||||
} = this.calendar;
|
} = this.calendar;
|
||||||
this.$emit(name2, {
|
this.$emit(name, {
|
||||||
range: this.cale.multipleStatus,
|
range: this.cale.multipleStatus,
|
||||||
year,
|
year,
|
||||||
month,
|
month,
|
||||||
@ -4817,7 +4817,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
const _component_calendar_item = vue.resolveComponent("calendar-item");
|
const _component_calendar_item = vue.resolveComponent("calendar-item");
|
||||||
const _component_time_picker = vue.resolveComponent("time-picker");
|
const _component_time_picker = vue.resolveComponent("time-picker");
|
||||||
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
|
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
|
||||||
@ -5101,8 +5101,8 @@ This will fail in production.`);
|
|||||||
/* NEED_HYDRATION */
|
/* NEED_HYDRATION */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$b], ["__scopeId", "data-v-1d379219"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
|
const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$a], ["__scopeId", "data-v-1d379219"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
|
||||||
const _sfc_main$L = {
|
const _sfc_main$K = {
|
||||||
name: "UniDatetimePicker",
|
name: "UniDatetimePicker",
|
||||||
options: {
|
options: {
|
||||||
virtualHost: true
|
virtualHost: true
|
||||||
@ -5758,7 +5758,7 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
|
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
|
||||||
const _component_time_picker = vue.resolveComponent("time-picker");
|
const _component_time_picker = vue.resolveComponent("time-picker");
|
||||||
const _component_Calendar = vue.resolveComponent("Calendar");
|
const _component_Calendar = vue.resolveComponent("Calendar");
|
||||||
@ -6102,116 +6102,7 @@ This will fail in production.`);
|
|||||||
}, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose", "onChange"])) : vue.createCommentVNode("v-if", true)
|
}, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "startPlaceholder", "endPlaceholder", "default-value", "pleStatus", "range", "hasTime", "hideSecond", "onConfirm", "onMaskClose", "onChange"])) : vue.createCommentVNode("v-if", true)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$a], ["__scopeId", "data-v-9802168a"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
|
const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$9], ["__scopeId", "data-v-9802168a"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
|
||||||
const _sfc_main$K = {
|
|
||||||
name: "UniDrawer",
|
|
||||||
components: {},
|
|
||||||
emits: ["change"],
|
|
||||||
props: {
|
|
||||||
/**
|
|
||||||
* 显示模式(左、右),只在初始化生效
|
|
||||||
*/
|
|
||||||
mode: {
|
|
||||||
type: String,
|
|
||||||
default: ""
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 蒙层显示状态
|
|
||||||
*/
|
|
||||||
mask: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 遮罩是否可点击关闭
|
|
||||||
*/
|
|
||||||
maskClick: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 抽屉宽度
|
|
||||||
*/
|
|
||||||
width: {
|
|
||||||
type: Number,
|
|
||||||
default: 220
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visibleSync: false,
|
|
||||||
showDrawer: false,
|
|
||||||
rightMode: false,
|
|
||||||
watchTimer: null,
|
|
||||||
drawerWidth: 220
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.drawerWidth = this.width;
|
|
||||||
this.rightMode = this.mode === "right";
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clear() {
|
|
||||||
},
|
|
||||||
close(type) {
|
|
||||||
if (type === "mask" && !this.maskClick || !this.visibleSync)
|
|
||||||
return;
|
|
||||||
this._change("showDrawer", "visibleSync", false);
|
|
||||||
},
|
|
||||||
open() {
|
|
||||||
if (this.visibleSync)
|
|
||||||
return;
|
|
||||||
this._change("visibleSync", "showDrawer", true);
|
|
||||||
},
|
|
||||||
_change(param1, param2, status) {
|
|
||||||
this[param1] = status;
|
|
||||||
if (this.watchTimer) {
|
|
||||||
clearTimeout(this.watchTimer);
|
|
||||||
}
|
|
||||||
this.watchTimer = setTimeout(() => {
|
|
||||||
this[param2] = status;
|
|
||||||
this.$emit("change", status);
|
|
||||||
}, status ? 50 : 300);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
||||||
return $data.visibleSync ? (vue.openBlock(), vue.createElementBlock(
|
|
||||||
"view",
|
|
||||||
{
|
|
||||||
key: 0,
|
|
||||||
class: vue.normalizeClass([{ "uni-drawer--visible": $data.showDrawer }, "uni-drawer"]),
|
|
||||||
onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop", "prevent"]))
|
|
||||||
},
|
|
||||||
[
|
|
||||||
vue.createElementVNode(
|
|
||||||
"view",
|
|
||||||
{
|
|
||||||
class: vue.normalizeClass(["uni-drawer__mask", { "uni-drawer__mask--visible": $data.showDrawer && $props.mask }]),
|
|
||||||
onClick: _cache[0] || (_cache[0] = ($event) => $options.close("mask"))
|
|
||||||
},
|
|
||||||
null,
|
|
||||||
2
|
|
||||||
/* CLASS */
|
|
||||||
),
|
|
||||||
vue.createElementVNode(
|
|
||||||
"view",
|
|
||||||
{
|
|
||||||
class: vue.normalizeClass(["uni-drawer__content", { "uni-drawer--right": $data.rightMode, "uni-drawer--left": !$data.rightMode, "uni-drawer__content--visible": $data.showDrawer }]),
|
|
||||||
style: vue.normalizeStyle({ width: $data.drawerWidth + "px" })
|
|
||||||
},
|
|
||||||
[
|
|
||||||
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
||||||
],
|
|
||||||
6
|
|
||||||
/* CLASS, STYLE */
|
|
||||||
)
|
|
||||||
],
|
|
||||||
34
|
|
||||||
/* CLASS, NEED_HYDRATION */
|
|
||||||
)) : vue.createCommentVNode("v-if", true);
|
|
||||||
}
|
|
||||||
const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$9], ["__scopeId", "data-v-f7c32d22"], ["__file", "D:/projects/cxc-szcx-uniapp/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue"]]);
|
|
||||||
function taskListApi(config) {
|
function taskListApi(config) {
|
||||||
return https({
|
return https({
|
||||||
url: "/act/task/list",
|
url: "/act/task/list",
|
||||||
@ -6591,47 +6482,58 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
const getLocation = () => {
|
const getLocation = () => {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
uni.getLocation({
|
if (!store.positionSwitch) {
|
||||||
type: "wgs84",
|
uni.setStorageSync("position", "濮阳市");
|
||||||
success: function(position) {
|
store.setPosition("濮阳市");
|
||||||
uni.request({
|
getWeather();
|
||||||
url: "http://api.tianditu.gov.cn/geocoder",
|
} else {
|
||||||
method: "GET",
|
toast("定位刷新中");
|
||||||
data: {
|
uni.getLocation({
|
||||||
postStr: JSON.stringify({
|
type: "wgs84",
|
||||||
lon: position.longitude,
|
success: function(position) {
|
||||||
lat: position.latitude,
|
uni.request({
|
||||||
ver: 1
|
url: "http://api.tianditu.gov.cn/geocoder",
|
||||||
}),
|
method: "GET",
|
||||||
type: "geocode",
|
data: {
|
||||||
tk: "30fe0f0c1b2320e112bde797f3ddaff4"
|
postStr: JSON.stringify({
|
||||||
},
|
lon: position.longitude,
|
||||||
success: function(res) {
|
lat: position.latitude,
|
||||||
let data = res.data;
|
ver: 1
|
||||||
if (data.status == 0) {
|
}),
|
||||||
const obj = data.result.addressComponent;
|
type: "geocode",
|
||||||
let info = obj.city ? obj.city : obj.province;
|
tk: "30fe0f0c1b2320e112bde797f3ddaff4"
|
||||||
uni.setStorageSync("position", info);
|
},
|
||||||
store.setPosition(info);
|
success: function(res) {
|
||||||
getWeather(position.latitude, position.longitude);
|
let data = res.data;
|
||||||
} else {
|
if (data.status == 0) {
|
||||||
formatAppLog("log", "at utils/index.js:224", data.message);
|
const obj = data.result.addressComponent;
|
||||||
|
let info = obj.city ? obj.city : obj.province;
|
||||||
|
uni.setStorageSync("position", info);
|
||||||
|
store.setPosition(info);
|
||||||
|
getWeather(position.latitude, position.longitude);
|
||||||
|
} else {
|
||||||
|
formatAppLog("log", "at utils/index.js:223", data.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
toast("获取定位失败");
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
fail: function(err) {
|
}
|
||||||
toast("获取定位失败");
|
});
|
||||||
formatAppLog("log", "at utils/index.js:229", "地址解析失败" + err);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const getWeather = (lat, lon) => {
|
const getWeather = (lat, lon) => {
|
||||||
useStore();
|
const store = useStore();
|
||||||
let params = {};
|
let params = {};
|
||||||
params.lat = lat;
|
if (!store.positionSwitch) {
|
||||||
params.lon = lon;
|
params.q = "濮阳市";
|
||||||
weatherRequest(params);
|
weatherRequest(params);
|
||||||
|
} else {
|
||||||
|
params.lat = lat;
|
||||||
|
params.lon = lon;
|
||||||
|
weatherRequest(params);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const weatherRequest = (params) => {
|
const weatherRequest = (params) => {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@ -6650,7 +6552,6 @@ This will fail in production.`);
|
|||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
toast("天气获取失败");
|
toast("天气获取失败");
|
||||||
formatAppLog("log", "at utils/index.js:270", "天气获取失败" + err);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -6668,7 +6569,7 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
formatAppLog("error", "at utils/index.js:289", "文件下载失败", err);
|
formatAppLog("error", "at utils/index.js:282", "文件下载失败", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -6707,31 +6608,19 @@ This will fail in production.`);
|
|||||||
const changeTab = (i2) => {
|
const changeTab = (i2) => {
|
||||||
current.value = i2;
|
current.value = i2;
|
||||||
pageNo = 1;
|
pageNo = 1;
|
||||||
loading2 = false;
|
|
||||||
list.value = [];
|
list.value = [];
|
||||||
getlist();
|
getlist();
|
||||||
};
|
};
|
||||||
const changeZhidu = (i2) => {
|
const changeZhidu = (i2) => {
|
||||||
current_zhidu.value = i2;
|
current_zhidu.value = i2;
|
||||||
pageNo = 1;
|
pageNo = 1;
|
||||||
loading2 = false;
|
|
||||||
list.value = [];
|
list.value = [];
|
||||||
zhidu();
|
zhidu();
|
||||||
};
|
};
|
||||||
const res = wx.getSystemInfoSync();
|
const res = wx.getSystemInfoSync();
|
||||||
const statusHeight = res.statusBarHeight;
|
const statusHeight = res.statusBarHeight;
|
||||||
const cusnavbarheight = statusHeight + 44 + "px";
|
const cusnavbarheight = statusHeight + 44 + "px";
|
||||||
const showLeft = vue.ref(null);
|
vue.ref(null);
|
||||||
const showDrawer = (e2) => {
|
|
||||||
showLeft.value.open();
|
|
||||||
};
|
|
||||||
const closeDrawer = (e2) => {
|
|
||||||
showLeft.value.close();
|
|
||||||
};
|
|
||||||
const totask = (url) => {
|
|
||||||
closeDrawer();
|
|
||||||
jump(url);
|
|
||||||
};
|
|
||||||
const jump = (url, type, item, page) => {
|
const jump = (url, type, item, page) => {
|
||||||
if (type && type == 1 && page == "detail")
|
if (type && type == 1 && page == "detail")
|
||||||
return;
|
return;
|
||||||
@ -6747,19 +6636,10 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const menu = vue.ref([{
|
|
||||||
text: "我的任务",
|
|
||||||
path: "/pages/task/index?id=0"
|
|
||||||
}, {
|
|
||||||
text: "历史任务",
|
|
||||||
path: "/pages/task/index?id=2"
|
|
||||||
}]);
|
|
||||||
let pageNo = 1;
|
let pageNo = 1;
|
||||||
let pageSize = 15;
|
let pageSize = 5;
|
||||||
let loading2 = false;
|
|
||||||
const list = vue.ref([]);
|
const list = vue.ref([]);
|
||||||
const bpmlist = () => {
|
const bpmlist = () => {
|
||||||
loading2 = true;
|
|
||||||
bpmlistApi({
|
bpmlistApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
pageSize
|
pageSize
|
||||||
@ -6767,13 +6647,11 @@ This will fail in production.`);
|
|||||||
if (res2.success) {
|
if (res2.success) {
|
||||||
list.value = [...list.value, ...formatObj(res2.result.records, "fwbt", "fwtime", null)];
|
list.value = [...list.value, ...formatObj(res2.result.records, "fwbt", "fwtime", null)];
|
||||||
}
|
}
|
||||||
loading2 = false;
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
formatAppLog("log", "at pages/tab/index.vue:273", "err", err);
|
formatAppLog("log", "at pages/tab/index.vue:273", "err", err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const gonggaolist = () => {
|
const gonggaolist = () => {
|
||||||
loading2 = true;
|
|
||||||
gonggaolistApi({
|
gonggaolistApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
pageSize
|
pageSize
|
||||||
@ -6781,7 +6659,6 @@ This will fail in production.`);
|
|||||||
if (res2.success) {
|
if (res2.success) {
|
||||||
list.value = [...list.value, ...formatObj(res2.result.records, "neirong", "fbdw", "createTime")];
|
list.value = [...list.value, ...formatObj(res2.result.records, "neirong", "fbdw", "createTime")];
|
||||||
}
|
}
|
||||||
loading2 = false;
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
formatAppLog("log", "at pages/tab/index.vue:288", "err", err);
|
formatAppLog("log", "at pages/tab/index.vue:288", "err", err);
|
||||||
});
|
});
|
||||||
@ -6797,7 +6674,6 @@ This will fail in production.`);
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const fagui = () => {
|
const fagui = () => {
|
||||||
loading2 = true;
|
|
||||||
faguiApi({
|
faguiApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
pageSize
|
pageSize
|
||||||
@ -6805,13 +6681,11 @@ This will fail in production.`);
|
|||||||
if (res2.success) {
|
if (res2.success) {
|
||||||
list.value = [...list.value, ...formatObj(res2.result.records, "flfgmc", "ssbm", null)];
|
list.value = [...list.value, ...formatObj(res2.result.records, "flfgmc", "ssbm", null)];
|
||||||
}
|
}
|
||||||
loading2 = false;
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
formatAppLog("log", "at pages/tab/index.vue:315", "err", err);
|
formatAppLog("log", "at pages/tab/index.vue:315", "err", err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const zhidu = () => {
|
const zhidu = () => {
|
||||||
loading2 = true;
|
|
||||||
let getzhidu = current_zhidu.value == 0 ? zhiduApi : cjzhiduApi;
|
let getzhidu = current_zhidu.value == 0 ? zhiduApi : cjzhiduApi;
|
||||||
getzhidu({
|
getzhidu({
|
||||||
pageNo,
|
pageNo,
|
||||||
@ -6821,7 +6695,6 @@ This will fail in production.`);
|
|||||||
let str = current_zhidu.value == 0 ? "zbbm_dictText" : "sbbm";
|
let str = current_zhidu.value == 0 ? "zbbm_dictText" : "sbbm";
|
||||||
list.value = [...list.value, ...formatObj(res2.result.records, "zdmc", str, null)];
|
list.value = [...list.value, ...formatObj(res2.result.records, "zdmc", str, null)];
|
||||||
}
|
}
|
||||||
loading2 = false;
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
formatAppLog("log", "at pages/tab/index.vue:332", "err", err);
|
formatAppLog("log", "at pages/tab/index.vue:332", "err", err);
|
||||||
});
|
});
|
||||||
@ -6835,8 +6708,6 @@ This will fail in production.`);
|
|||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
pageNo = 1;
|
|
||||||
loading2 = false;
|
|
||||||
list.value = [];
|
list.value = [];
|
||||||
cxcDaping();
|
cxcDaping();
|
||||||
zhiban();
|
zhiban();
|
||||||
@ -6854,16 +6725,8 @@ This will fail in production.`);
|
|||||||
fagui();
|
fagui();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onReachBottom(() => {
|
|
||||||
if (loading2)
|
|
||||||
return;
|
|
||||||
pageNo++;
|
|
||||||
getlist();
|
|
||||||
});
|
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$4);
|
const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$4);
|
||||||
const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$1);
|
|
||||||
const _component_uni_drawer = resolveEasycom(vue.resolveDynamicComponent("uni-drawer"), __easycom_2$1);
|
|
||||||
return vue.openBlock(), vue.createElementBlock(
|
return vue.openBlock(), vue.createElementBlock(
|
||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
@ -6872,15 +6735,7 @@ This will fail in production.`);
|
|||||||
[
|
[
|
||||||
vue.createElementVNode("view", { class: "nav" }, [
|
vue.createElementVNode("view", { class: "nav" }, [
|
||||||
vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [
|
vue.createElementVNode("view", { class: "nav_box f-row aic jcb" }, [
|
||||||
vue.createElementVNode("view", {
|
vue.createCommentVNode(' <view class="menu" @click="showDrawer()">\r\n <image src="../../static/index/menu.png" mode=""></image>\r\n </view> '),
|
||||||
class: "menu",
|
|
||||||
onClick: _cache[0] || (_cache[0] = ($event) => showDrawer())
|
|
||||||
}, [
|
|
||||||
vue.createElementVNode("image", {
|
|
||||||
src: "/static/index/menu.png",
|
|
||||||
mode: ""
|
|
||||||
})
|
|
||||||
]),
|
|
||||||
vue.createElementVNode("view", { class: "weather_calender f-row aic" }, [
|
vue.createElementVNode("view", { class: "weather_calender f-row aic" }, [
|
||||||
vue.createElementVNode("view", { class: "position f-row aic" }, [
|
vue.createElementVNode("view", { class: "position f-row aic" }, [
|
||||||
vue.createElementVNode("image", {
|
vue.createElementVNode("image", {
|
||||||
@ -6961,7 +6816,7 @@ This will fail in production.`);
|
|||||||
vue.createTextVNode(" 值班信息 "),
|
vue.createTextVNode(" 值班信息 "),
|
||||||
vue.createElementVNode("view", {
|
vue.createElementVNode("view", {
|
||||||
class: "more",
|
class: "more",
|
||||||
onClick: _cache[1] || (_cache[1] = ($event) => jump(`/pages/zhiban/index`))
|
onClick: _cache[0] || (_cache[0] = ($event) => jump(`/pages/zhiban/index`))
|
||||||
}, [
|
}, [
|
||||||
vue.createTextVNode(" 查看更多 "),
|
vue.createTextVNode(" 查看更多 "),
|
||||||
vue.createElementVNode("image", {
|
vue.createElementVNode("image", {
|
||||||
@ -7051,7 +6906,7 @@ This will fail in production.`);
|
|||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
class: vue.normalizeClass({ "active": current_zhidu.value == 0 }),
|
class: vue.normalizeClass({ "active": current_zhidu.value == 0 }),
|
||||||
onClick: _cache[2] || (_cache[2] = ($event) => changeZhidu(0))
|
onClick: _cache[1] || (_cache[1] = ($event) => changeZhidu(0))
|
||||||
},
|
},
|
||||||
" 厂级制度 ",
|
" 厂级制度 ",
|
||||||
2
|
2
|
||||||
@ -7061,7 +6916,7 @@ This will fail in production.`);
|
|||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
class: vue.normalizeClass({ "active": current_zhidu.value == 1 }),
|
class: vue.normalizeClass({ "active": current_zhidu.value == 1 }),
|
||||||
onClick: _cache[3] || (_cache[3] = ($event) => changeZhidu(1))
|
onClick: _cache[2] || (_cache[2] = ($event) => changeZhidu(1))
|
||||||
},
|
},
|
||||||
" 上级制度 ",
|
" 上级制度 ",
|
||||||
2
|
2
|
||||||
@ -7072,7 +6927,7 @@ This will fail in production.`);
|
|||||||
vue.createElementVNode("view", {
|
vue.createElementVNode("view", {
|
||||||
style: { "padding-top": "24rpx" },
|
style: { "padding-top": "24rpx" },
|
||||||
class: "more",
|
class: "more",
|
||||||
onClick: _cache[4] || (_cache[4] = ($event) => jump(`/pages/document/index?id=${current.value}`, current.value))
|
onClick: _cache[3] || (_cache[3] = ($event) => jump(`/pages/document/index?id=${current.value}`, current.value))
|
||||||
}, [
|
}, [
|
||||||
vue.createTextVNode(" 查看更多 "),
|
vue.createTextVNode(" 查看更多 "),
|
||||||
vue.createElementVNode("image", {
|
vue.createElementVNode("image", {
|
||||||
@ -7130,51 +6985,7 @@ This will fail in production.`);
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
vue.createVNode(
|
vue.createCommentVNode(' <uni-drawer ref="showLeft" mode="left" :width="156">\r\n <view class="menu_list">\r\n <view class="f-row aic jcb" v-for="item,i in menu" :key="i" @click="totask(item.path)">\r\n <text>{{item.text}}</text>\r\n <uni-icons type="right" size="20" color="#333333"></uni-icons>\r\n </view>\r\n </view>\r\n </uni-drawer> ')
|
||||||
_component_uni_drawer,
|
|
||||||
{
|
|
||||||
ref_key: "showLeft",
|
|
||||||
ref: showLeft,
|
|
||||||
mode: "left",
|
|
||||||
width: 156
|
|
||||||
},
|
|
||||||
{
|
|
||||||
default: vue.withCtx(() => [
|
|
||||||
vue.createElementVNode("view", { class: "menu_list" }, [
|
|
||||||
(vue.openBlock(true), vue.createElementBlock(
|
|
||||||
vue.Fragment,
|
|
||||||
null,
|
|
||||||
vue.renderList(menu.value, (item, i2) => {
|
|
||||||
return vue.openBlock(), vue.createElementBlock("view", {
|
|
||||||
class: "f-row aic jcb",
|
|
||||||
key: i2,
|
|
||||||
onClick: ($event) => totask(item.path)
|
|
||||||
}, [
|
|
||||||
vue.createElementVNode(
|
|
||||||
"text",
|
|
||||||
null,
|
|
||||||
vue.toDisplayString(item.text),
|
|
||||||
1
|
|
||||||
/* TEXT */
|
|
||||||
),
|
|
||||||
vue.createVNode(_component_uni_icons, {
|
|
||||||
type: "right",
|
|
||||||
size: "20",
|
|
||||||
color: "#333333"
|
|
||||||
})
|
|
||||||
], 8, ["onClick"]);
|
|
||||||
}),
|
|
||||||
128
|
|
||||||
/* KEYED_FRAGMENT */
|
|
||||||
))
|
|
||||||
])
|
|
||||||
]),
|
|
||||||
_: 1
|
|
||||||
/* STABLE */
|
|
||||||
},
|
|
||||||
512
|
|
||||||
/* NEED_PATCH */
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
2
|
2
|
||||||
/* CLASS */
|
/* CLASS */
|
||||||
@ -7582,25 +7393,10 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const PagesTabProduct = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-6ccf0546"], ["__file", "D:/projects/cxc-szcx-uniapp/pages/tab/product.vue"]]);
|
const PagesTabProduct = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-6ccf0546"], ["__file", "D:/projects/cxc-szcx-uniapp/pages/tab/product.vue"]]);
|
||||||
const { registerUTSInterface, initUTSProxyClass, initUTSProxyFunction, initUTSPackageName, initUTSIndexClassName, initUTSClassName } = uni;
|
|
||||||
const name = "wuwxStepCounter";
|
|
||||||
const moduleName = "计步器(兼容Android和iOS)";
|
|
||||||
const moduleType = "";
|
|
||||||
const errMsg = ``;
|
|
||||||
const is_uni_modules = true;
|
|
||||||
const pkg = /* @__PURE__ */ initUTSPackageName(name, is_uni_modules);
|
|
||||||
const cls = /* @__PURE__ */ initUTSIndexClassName(name, is_uni_modules);
|
|
||||||
const startStepCountingUpdates = /* @__PURE__ */ initUTSProxyFunction(false, { moduleName, moduleType, errMsg, main: true, package: pkg, class: cls, name: "startStepCountingUpdatesByJs", params: [{ "name": "options", "type": "UTSSDKModulesWuwxStepCounterStartStepCountingUpdatesOptionsJSONObject" }], return: "" });
|
|
||||||
const _sfc_main$E = {
|
const _sfc_main$E = {
|
||||||
__name: "my",
|
__name: "my",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const step = vue.ref(0);
|
|
||||||
startStepCountingUpdates({
|
|
||||||
handler: (numberOfSteps, timestamp, error) => {
|
|
||||||
step.value = numberOfSteps;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const currentVersion = vue.ref(plus.runtime.version);
|
const currentVersion = vue.ref(plus.runtime.version);
|
||||||
const arr = vue.ref([
|
const arr = vue.ref([
|
||||||
// {
|
// {
|
||||||
@ -7655,21 +7451,6 @@ This will fail in production.`);
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onShow(() => {
|
|
||||||
taskList();
|
|
||||||
});
|
|
||||||
const todoNum = vue.ref(0);
|
|
||||||
const taskList = () => {
|
|
||||||
taskListApi({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 4,
|
|
||||||
_t: (/* @__PURE__ */ new Date()).getTime()
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
todoNum.value = res.result.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return vue.openBlock(), vue.createElementBlock(
|
return vue.openBlock(), vue.createElementBlock(
|
||||||
"view",
|
"view",
|
||||||
@ -7721,34 +7502,21 @@ This will fail in production.`);
|
|||||||
]),
|
]),
|
||||||
vue.createElementVNode("view", { class: "f-col aic" }, [
|
vue.createElementVNode("view", { class: "f-col aic" }, [
|
||||||
vue.createElementVNode("view", { class: "msg f-row aic jca" }, [
|
vue.createElementVNode("view", { class: "msg f-row aic jca" }, [
|
||||||
vue.createElementVNode("view", {
|
vue.createCommentVNode(` <view class="box f-col aic" @click="jump('/pages/task/todotask')">\r
|
||||||
class: "box f-col aic",
|
<view class="num">\r
|
||||||
onClick: _cache[2] || (_cache[2] = ($event) => jump("/pages/task/todotask"))
|
{{todoNum}}\r
|
||||||
}, [
|
</view>\r
|
||||||
vue.createElementVNode(
|
<text>个人办公</text>\r
|
||||||
"view",
|
</view> `),
|
||||||
{ class: "num" },
|
|
||||||
vue.toDisplayString(todoNum.value),
|
|
||||||
1
|
|
||||||
/* TEXT */
|
|
||||||
),
|
|
||||||
vue.createElementVNode("text", null, "个人办公")
|
|
||||||
]),
|
|
||||||
vue.createElementVNode("view", { class: "box f-col aic" }, [
|
vue.createElementVNode("view", { class: "box f-col aic" }, [
|
||||||
vue.createElementVNode(
|
vue.createElementVNode("view", { class: "num" }, vue.toDisplayString(0)),
|
||||||
"view",
|
|
||||||
{ class: "num" },
|
|
||||||
vue.toDisplayString(step.value),
|
|
||||||
1
|
|
||||||
/* TEXT */
|
|
||||||
),
|
|
||||||
vue.createElementVNode("text", null, "步数")
|
vue.createElementVNode("text", null, "步数")
|
||||||
]),
|
]),
|
||||||
vue.createElementVNode("view", {
|
vue.createElementVNode("view", {
|
||||||
class: "box f-col aic",
|
class: "box f-col aic",
|
||||||
onClick: _cache[3] || (_cache[3] = ($event) => jump("/pages/useredit/addressbook"))
|
onClick: _cache[2] || (_cache[2] = ($event) => jump("/pages/useredit/addressbook"))
|
||||||
}, [
|
}, [
|
||||||
vue.createElementVNode("view", { class: "num" }, " 34 "),
|
vue.createElementVNode("view", { class: "num" }, " 0 "),
|
||||||
vue.createElementVNode("text", null, "通讯录")
|
vue.createElementVNode("text", null, "通讯录")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -7783,7 +7551,7 @@ This will fail in production.`);
|
|||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
class: "switch",
|
class: "switch",
|
||||||
onClick: _cache[4] || (_cache[4] = ($event) => messageSwitch.value = !messageSwitch.value)
|
onClick: _cache[3] || (_cache[3] = ($event) => messageSwitch.value = !messageSwitch.value)
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
vue.withDirectives(vue.createElementVNode(
|
vue.withDirectives(vue.createElementVNode(
|
||||||
@ -8535,8 +8303,8 @@ This will fail in production.`);
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 驼峰转中横线
|
// 驼峰转中横线
|
||||||
toLine(name2) {
|
toLine(name) {
|
||||||
return name2.replace(/([A-Z])/g, "-$1").toLowerCase();
|
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -13087,12 +12855,12 @@ ${i3}
|
|||||||
}
|
}
|
||||||
return uploadFiles(chooseAll(opts), opts);
|
return uploadFiles(chooseAll(opts), opts);
|
||||||
}
|
}
|
||||||
const get_file_ext = (name2) => {
|
const get_file_ext = (name) => {
|
||||||
const last_len = name2.lastIndexOf(".");
|
const last_len = name.lastIndexOf(".");
|
||||||
const len = name2.length;
|
const len = name.length;
|
||||||
return {
|
return {
|
||||||
name: name2.substring(0, last_len),
|
name: name.substring(0, last_len),
|
||||||
ext: name2.substring(last_len + 1, len)
|
ext: name.substring(last_len + 1, len)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const get_extname = (fileExtname) => {
|
const get_extname = (fileExtname) => {
|
||||||
@ -14068,12 +13836,12 @@ ${i3}
|
|||||||
* 获取文件名和后缀
|
* 获取文件名和后缀
|
||||||
* @param {Object} name
|
* @param {Object} name
|
||||||
*/
|
*/
|
||||||
getFileExt(name2) {
|
getFileExt(name) {
|
||||||
const last_len = name2.lastIndexOf(".");
|
const last_len = name.lastIndexOf(".");
|
||||||
const len = name2.length;
|
const len = name.length;
|
||||||
return {
|
return {
|
||||||
name: name2.substring(0, last_len),
|
name: name.substring(0, last_len),
|
||||||
ext: name2.substring(last_len + 1, len)
|
ext: name.substring(last_len + 1, len)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -14127,10 +13895,10 @@ ${i3}
|
|||||||
/**
|
/**
|
||||||
* 获取父元素实例
|
* 获取父元素实例
|
||||||
*/
|
*/
|
||||||
getForm(name2 = "uniForms") {
|
getForm(name = "uniForms") {
|
||||||
let parent = this.$parent;
|
let parent = this.$parent;
|
||||||
let parentName = parent.$options.name;
|
let parentName = parent.$options.name;
|
||||||
while (parentName !== name2) {
|
while (parentName !== name) {
|
||||||
parent = parent.$parent;
|
parent = parent.$parent;
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return false;
|
return false;
|
||||||
@ -19105,17 +18873,22 @@ ${i3}
|
|||||||
__name: "App",
|
__name: "App",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
|
formatAppLog("log", "at App.vue:26", "---", todoNum.value);
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: "1",
|
||||||
|
text: todoNum.value
|
||||||
|
// 角标内容
|
||||||
|
});
|
||||||
uni.onTabBarMidButtonTap(() => {
|
uni.onTabBarMidButtonTap(() => {
|
||||||
beforeJump("/pages/task/index", () => {
|
uni.navigateTo({
|
||||||
uni.navigateTo({
|
url: "/pages/task/todotask"
|
||||||
url: "/pages/task/index?id=0"
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
useUpdateApp().checkAppUpdate();
|
useUpdateApp().checkAppUpdate();
|
||||||
getLocation();
|
getLocation();
|
||||||
});
|
});
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
taskList();
|
||||||
cxcJurisdictionApi({
|
cxcJurisdictionApi({
|
||||||
id: "1827997127165677570"
|
id: "1827997127165677570"
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@ -19126,6 +18899,18 @@ ${i3}
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
const todoNum = vue.ref(0);
|
||||||
|
const taskList = () => {
|
||||||
|
taskListApi({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 4,
|
||||||
|
_t: (/* @__PURE__ */ new Date()).getTime()
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
todoNum.value = res.result.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
return () => {
|
return () => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -19160,10 +18945,10 @@ ${i3}
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
info.value = res.result.records[0];
|
info.value = res.result.records[0];
|
||||||
imageValue.value = info.value.path.split(",").map((path) => {
|
imageValue.value = info.value.path.split(",").map((path) => {
|
||||||
const name2 = path.split("/").pop();
|
const name = path.split("/").pop();
|
||||||
const extname = name2.split(".").pop();
|
const extname = name.split(".").pop();
|
||||||
return {
|
return {
|
||||||
name: name2,
|
name,
|
||||||
extname,
|
extname,
|
||||||
url: imgUrl(path)
|
url: imgUrl(path)
|
||||||
};
|
};
|
||||||
|
7
unpackage/dist/dev/app-plus/manifest.json
vendored
7
unpackage/dist/dev/app-plus/manifest.json
vendored
@ -181,13 +181,6 @@
|
|||||||
"selectedIconPath": "/static/tab/user2.png"
|
"selectedIconPath": "/static/tab/user2.png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"midButton": {
|
|
||||||
"width": "65px",
|
|
||||||
"height": "75px",
|
|
||||||
"text": "",
|
|
||||||
"iconPath": "static/tab/todo.png",
|
|
||||||
"iconWidth": "50px"
|
|
||||||
},
|
|
||||||
"selectedIndex": 0,
|
"selectedIndex": 0,
|
||||||
"shown": true
|
"shown": true
|
||||||
}
|
}
|
||||||
|
87
unpackage/dist/dev/app-plus/pages/tab/index.css
vendored
87
unpackage/dist/dev/app-plus/pages/tab/index.css
vendored
@ -1245,76 +1245,6 @@
|
|||||||
/* 垂直间距 */
|
/* 垂直间距 */
|
||||||
/* 透明度 */
|
/* 透明度 */
|
||||||
/* 文章场景相关 */
|
/* 文章场景相关 */
|
||||||
.uni-drawer[data-v-f7c32d22] {
|
|
||||||
display: block;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
.uni-drawer__content[data-v-f7c32d22] {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
width: 220px;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: #ffffff;
|
|
||||||
transition: transform 0.3s ease;
|
|
||||||
}
|
|
||||||
.uni-drawer--left[data-v-f7c32d22] {
|
|
||||||
left: 0;
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
.uni-drawer--right[data-v-f7c32d22] {
|
|
||||||
right: 0;
|
|
||||||
transform: translateX(100%);
|
|
||||||
}
|
|
||||||
.uni-drawer__content--visible[data-v-f7c32d22] {
|
|
||||||
transform: translateX(0px);
|
|
||||||
}
|
|
||||||
.uni-drawer__mask[data-v-f7c32d22] {
|
|
||||||
display: block;
|
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
transition: opacity 0.3s;
|
|
||||||
}
|
|
||||||
.uni-drawer__mask--visible[data-v-f7c32d22] {
|
|
||||||
display: block;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 这里是uni-app内置的常用样式变量
|
|
||||||
*
|
|
||||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
|
||||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
|
||||||
*
|
|
||||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
|
||||||
*/
|
|
||||||
/* 颜色变量 */
|
|
||||||
/* 行为相关颜色 */
|
|
||||||
/* 文字基本颜色 */
|
|
||||||
/* 背景颜色 */
|
|
||||||
/* 边框颜色 */
|
|
||||||
/* 尺寸变量 */
|
|
||||||
/* 文字尺寸 */
|
|
||||||
/* 图片尺寸 */
|
|
||||||
/* Border Radius */
|
|
||||||
/* 水平间距 */
|
|
||||||
/* 垂直间距 */
|
|
||||||
/* 透明度 */
|
|
||||||
/* 文章场景相关 */
|
|
||||||
.nav[data-v-420daeb5] {
|
.nav[data-v-420daeb5] {
|
||||||
width: calc(100% - 1.875rem);
|
width: calc(100% - 1.875rem);
|
||||||
padding: 0 0.9375rem;
|
padding: 0 0.9375rem;
|
||||||
@ -1361,19 +1291,6 @@
|
|||||||
[data-v-ae0729d5] .uni-drawer {
|
[data-v-ae0729d5] .uni-drawer {
|
||||||
margin-top: var(--ae0729d5-cusnavbarheight);
|
margin-top: var(--ae0729d5-cusnavbarheight);
|
||||||
}
|
}
|
||||||
.menu_list[data-v-ae0729d5] {
|
|
||||||
padding: 0 0.9375rem;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
.menu_list uni-view[data-v-ae0729d5] {
|
|
||||||
height: 3.4375rem;
|
|
||||||
border-bottom: 1px solid #EFEFEF;
|
|
||||||
}
|
|
||||||
.menu_list uni-image[data-v-ae0729d5] {
|
|
||||||
width: 0.40625rem;
|
|
||||||
height: 0.71875rem;
|
|
||||||
}
|
|
||||||
.nav[data-v-ae0729d5] {
|
.nav[data-v-ae0729d5] {
|
||||||
width: calc(100% - 1.875rem);
|
width: calc(100% - 1.875rem);
|
||||||
padding: 0 0.9375rem;
|
padding: 0 0.9375rem;
|
||||||
@ -1393,10 +1310,6 @@
|
|||||||
bottom: 0.8125rem;
|
bottom: 0.8125rem;
|
||||||
width: calc(100% - 1.875rem);
|
width: calc(100% - 1.875rem);
|
||||||
}
|
}
|
||||||
.menu uni-image[data-v-ae0729d5] {
|
|
||||||
width: 1.125rem;
|
|
||||||
height: 1.4375rem;
|
|
||||||
}
|
|
||||||
.weather_calender uni-image[data-v-ae0729d5] {
|
.weather_calender uni-image[data-v-ae0729d5] {
|
||||||
width: 1.125rem;
|
width: 1.125rem;
|
||||||
height: 1.125rem;
|
height: 1.125rem;
|
||||||
|
Binary file not shown.
101
utils/index.js
101
utils/index.js
@ -190,63 +190,58 @@ export const getTime = () => {
|
|||||||
*/
|
*/
|
||||||
export const getLocation = () => {
|
export const getLocation = () => {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// if (!store.positionSwitch) {
|
if (!store.positionSwitch) {
|
||||||
// uni.setStorageSync('position', '濮阳市')
|
uni.setStorageSync('position', '濮阳市')
|
||||||
// store.setPosition('濮阳市')
|
store.setPosition('濮阳市')
|
||||||
// getWeather()
|
getWeather()
|
||||||
// } else {
|
} else {
|
||||||
// toast('定位刷新中')
|
toast('定位刷新中')
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(position) {
|
success: function(position) {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'http://api.tianditu.gov.cn/geocoder',
|
url: 'http://api.tianditu.gov.cn/geocoder',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: {
|
data: {
|
||||||
postStr: JSON.stringify({
|
postStr: JSON.stringify({
|
||||||
lon: position.longitude,
|
lon: position.longitude,
|
||||||
lat: position.latitude,
|
lat: position.latitude,
|
||||||
ver: 1
|
ver: 1
|
||||||
}),
|
}),
|
||||||
type: 'geocode',
|
type: 'geocode',
|
||||||
tk: '30fe0f0c1b2320e112bde797f3ddaff4'
|
tk: '30fe0f0c1b2320e112bde797f3ddaff4'
|
||||||
},
|
},
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
const obj = data.result.addressComponent
|
const obj = data.result.addressComponent
|
||||||
let info = obj.city ? obj.city : obj.province
|
let info = obj.city ? obj.city : obj.province
|
||||||
uni.setStorageSync('position', info)
|
uni.setStorageSync('position', info)
|
||||||
store.setPosition(info)
|
store.setPosition(info)
|
||||||
// toast('定位刷新成功');
|
getWeather(position.latitude, position.longitude)
|
||||||
getWeather(position.latitude, position.longitude)
|
} else {
|
||||||
} else {
|
console.log(data.message);
|
||||||
console.log(data.message);
|
}
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
toast('获取定位失败');
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
fail: function(err) {
|
}
|
||||||
toast('获取定位失败');
|
});
|
||||||
console.log('地址解析失败' + err);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
export const getWeather = (lat, lon) => {
|
export const getWeather = (lat, lon) => {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// toast('天气刷新中')
|
|
||||||
let params = {}
|
let params = {}
|
||||||
// if (!store.positionSwitch) {
|
if (!store.positionSwitch) {
|
||||||
// params.q = '濮阳市'
|
params.q = '濮阳市'
|
||||||
// weatherRequest(params)
|
weatherRequest(params)
|
||||||
// console.log('shfjshdkfj @@@@jdfg');
|
} else {
|
||||||
// } else {
|
params.lat = lat
|
||||||
params.lat = lat
|
params.lon = lon
|
||||||
params.lon = lon
|
weatherRequest(params)
|
||||||
weatherRequest(params)
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
const weatherRequest = (params) => {
|
const weatherRequest = (params) => {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
@ -263,11 +258,9 @@ const weatherRequest = (params) => {
|
|||||||
uni.setStorageSync('wenduIcon', res.data.weather[0].icon)
|
uni.setStorageSync('wenduIcon', res.data.weather[0].icon)
|
||||||
store.setWeather(Math.round(res.data.main.temp - 273.15), res.data
|
store.setWeather(Math.round(res.data.main.temp - 273.15), res.data
|
||||||
.weather[0].icon)
|
.weather[0].icon)
|
||||||
// toast('天气刷新成功');
|
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
toast('天气获取失败');
|
toast('天气获取失败');
|
||||||
console.log('天气获取失败' + err);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user