提交 10e4f3d9 作者: wk

最近7天天气 项目详情 我的人员信息 新闻列表

父级 20b38073
......@@ -161,8 +161,12 @@ const params = {
url: "/ydt/api/v1/navigation/list/recently_used",
method: "get"
},
saveAppConfig: {
url: "/ydt/api/v1/navigation/save",
method: "post"
},
getMessages: {
url: "/api/v1/common_check/msg_notify/list",
url: "/plat/api/v1/common_check/msg_notify/list",
method: "get"
},
/* 数据智管 */
......@@ -212,7 +216,12 @@ const params = {
getFormDetailList: {
url: "/plat/api/v1/common_check/check_record/form_detail_list",
method: "get"
}
},
//获取应用列表
getAppList: {
url: "/proxy/adminc/v1/system_manage/p_app/application",
method: "get"
},
}
export default buildParam(params)
......@@ -83,7 +83,7 @@
},
bgColor: {
type: String,
default: '#f8f8f8'
default: '#F5F5F5'
},
padding: {
type: String,
......
......@@ -42,7 +42,8 @@
"path": "pages/monitor/monitor",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
......@@ -305,6 +306,30 @@
"navigationStyle": "custom"
}
}, {
"path": "pages/mine/projectInfo/projectInfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/mine/projectHistory/projectHistory",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/index/bussConfig/bussConfig",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
],
"globalStyle": {
......
......@@ -13,7 +13,7 @@
<view class="title">消息中心</view>
<image src="../../static/message.png" class="image"></image>
</view>
<view class="count">2</view>
<view class="count">{{messageCount}}</view>
</view>
<view class="line"></view>
<view class="item">
......@@ -31,23 +31,64 @@
<image src="../../static/ic-rqyy.png" class="rq-image"></image>
<text class="text">本周人气最佳:物料收发存(地磅)</text>
</view>
<view class="app-content">
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="app-group-content">
<view class="app-group-item" v-for="(item,index) in apps" :key="index">
<view class="title">{{item.group_name||"其他"}}</view>
<uni-grid column="4" class="grid-container">
<uni-grid-item class="grid-item" v-for="(model,modelIndex) in item.data" :key="modelIndex"
@click="toIndex(model)">
<image
:src="'https://release-console.oss-cn-hangzhou.aliyuncs.com/intecons/uniimage/'+model.logo+'.png'"
class="image" />
<view class="single-text" style="color: #666666;font-size: 28rpx;margin-top: 10rpx;">
{{model.app_name}}
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
</view>
<uni-tabbar currentPage="1"></uni-tabbar>
</view>
</template>
<script>
import Api from "../../api/api.js"
export default {
data() {
return {
title: '欢迎您访问一点通',
statusBarHeight: 20
statusBarHeight: 20,
messageCount: 0,
groups: [],
apps: [],
current: 0,
tabs: ["生活服务", "综合办公", "岗位工作"],
requestParam: {
page: 1,
per_page: 500,
authed: 1,
showed: 1,
app_endpoint: 2,
is_publish: 1,
app_sort: 1
},
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
this.getAppGroup()
},
onShow() {
this.getMessages()
},
methods: {
tabChange(e) {
this.current = e
},
toMessage() {
uni.navigateTo({
url: "/pages/gallery/message/message"
......@@ -62,7 +103,105 @@
uni.navigateTo({
url: "/pages/gallery/dataManager/dataManager"
})
}
},
getMessages() {
Api.getMessages({
data: {
"page": 1,
"page_size": 5,
"is_page": 1
}
}).then((result) => {
console.log("消息列表", result);
if (result.code == 0) {
this.messageCount = result.data.total_count
} else {
this.$toast.showToast(result.msg)
}
})
},
getAppGroup() {
Api.getCodeList({
data: {
"code_type": "applicationGroup"
}
}).then((result) => {
if (result.code == 0) {
let list = result.data[0].sub_data
this.groups = []
for (var i = 0; i < list.length; i++) {
this.groups.push({
"key": list[i].value,
"val": list[i].name
})
}
this.groups.push({
"key": "0",
"val": "其他"
})
this.getAppList()
} else {
this.origin_data = []
if (result.code == 10201) {
this.refreshToken()
} else {
this.$toast.showToast(result.msg)
}
}
})
},
getAppList: function() {
let that = this
Api.getAppList({
data: this.requestParam
}).then((result) => {
if (result.code === 0) {
let list = result.data.list
that.apps = that.sortGroup(list)
console.log(that.apps);
if (that.groups.length > 0) {
for (var i = 0; i < that.apps.length; i++) {
for (var j = 0; j < that.groups.length; j++) {
if (that.groups[j].key == that.apps[i].app_group) {
that.apps[i].group_name = that.groups[j].val
}
}
}
}
} else {
if (result.code === -1) {
this.$toast.showToast(result.msg)
if (result.action === 'Laravel_public_permission_fail') {
that.refreshToken()
}
}
}
})
},
sortGroup: function(arr) {
var map = {},
dest = [];
for (var i = 0; i < arr.length; i++) {
var app = arr[i];
if (!map[app.app_group]) {
dest.push({
app_group: app.app_group,
data: [app]
});
map[app.app_group] = app;
} else {
for (var j = 0; j < dest.length; j++) {
var dj = dest[j];
if (dj.app_group == app.app_group) {
dj.data.push(app);
break;
}
}
}
}
return dest
},
}
}
</script>
......@@ -197,5 +336,55 @@
margin: 0 10rpx 0 30rpx;
}
}
.app-content {
display: flex;
flex-direction: column;
.app-group-content {
display: flex;
flex-direction: column;
.app-group-item {
display: flex;
padding: 30rpx;
margin: 20rpx 30rpx 0 30rpx;
flex-direction: column;
border-radius: 30rpx;
background: #fff;
.title {
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.grid-container {
display: flex;
margin-top: 30rpx;
.grid-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 50rpx;
height: 50rpx;
}
text {
margin-top: 10rpx;
font-weight: 400;
font-size: 24rpx;
color: #333;
}
}
}
}
}
}
}
</style>
......@@ -33,7 +33,7 @@
}
},
onLoad() {
this.getMessages()
},
onPullDownRefresh() {
this.page = 1
......
<template>
<view class="content">
<titleBar title="常用业务设置"></titleBar>
<view class="sel-content">
<view class="title-content">
<view style="font-weight: 400;font-size: 28rpx;color: #333;flex: 1;">设置常用业务</view>
<view style="font-weight: 600;font-size: 28rpx;color: #333;">恢复默认</view>
<view style="font-weight: 600;font-size: 28rpx;color: #333;margin-left: 30rpx;" @click="sureConfig">完成
</view>
</view>
<view class="sel-app-content">
<view class="title">常用业务</view>
<view class="app-list">
<view class="menu-item" v-for="(item,index) in selList" :key="index">
<view class="logo-content">
<image src="../../../static/ic-sjzg.png" class="logo"></image>
<image src="../../../static/delete-ic.png" class="del"></image>
</view>
<view class="text">积分商城</view>
</view>
</view>
</view>
</view>
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="app-list-content">
<view class="app-content" v-for="(item,index) in appList">
<view class="title">便捷服务</view>
<view class="app-list">
<view class="menu-item" v-for="(app,appIndex) in selList" :key="appIndex">
<view class="logo-content">
<image src="../../../static/ic-sjzg.png" class="logo"></image>
<image src="../../../static/add-ic.png" class="del"></image>
</view>
<view class="text">积分商城</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
selList: [{}],
appList: [{}],
current: 0,
tabs: ["生活服务", "综合办公", "岗位工作"],
}
},
onLoad() {
//获取当前设置常用应用
//获取所有的应用
},
methods: {
tabChange(e) {
this.current = e
},
getDefaultApp() {
Api.getNormalApp({
}).then((result) => {
})
},
sureConfig() {
uni.$emit("refreshApp")
}
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.sel-content {
display: flex;
flex-direction: column;
margin: 30rpx 30rpx 0 30rpx;
.title-content {
display: flex;
flex-direction: row;
align-items: center;
}
.sel-app-content {
display: flex;
flex-direction: column;
border-radius: 30rpx;
margin-top: 30rpx;
padding: 30rpx;
background-color: #fff;
.title {
font-weight: 600;
font-size: 28rpx;
color: #333;
}
.app-list {
display: flex;
margin-top: 30rpx;
flex-direction: row;
.menu-item {
display: flex;
flex: 0 0 25%;
flex-direction: column;
margin-bottom: 10px;
justify-content: center;
align-items: center;
.logo-content {
position: relative;
width: 62rpx;
height: 62rpx;
.logo {
width: 50rpx;
height: 50rpx;
position: absolute;
bottom: 0;
left: 0;
}
.del {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 0;
right: 0;
}
}
.text {
font-size: 24rpx;
color: #333;
margin-top: 10rpx;
}
}
}
}
}
.app-list-content {
display: flex;
flex-direction: column;
margin: 0 30rpx;
.app-content {
display: flex;
flex-direction: column;
border-radius: 30rpx;
margin-top: 30rpx;
padding: 30rpx;
background-color: #fff;
.title {
font-weight: 600;
font-size: 28rpx;
color: #333;
}
.app-list {
display: flex;
margin-top: 30rpx;
flex-direction: row;
.menu-item {
display: flex;
flex: 0 0 25%;
flex-direction: column;
margin-bottom: 10px;
justify-content: center;
align-items: center;
.logo-content {
position: relative;
width: 62rpx;
height: 62rpx;
.logo {
width: 50rpx;
height: 50rpx;
position: absolute;
bottom: 0;
left: 0;
}
.del {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 0;
right: 0;
}
}
.text {
font-size: 24rpx;
color: #333;
margin-top: 10rpx;
}
}
}
}
}
}
</style>
......@@ -11,7 +11,7 @@
</view>
<view class="line"></view>
<view class="login-info-content">
<view class="login-info">{{userInfo.user.user_name||"您好"}},欢迎登录</view>
<view class="login-info">{{userInfo.user.user_name||"您好"}},欢迎登录 {{nowTime}}</view>
<view class="address-content">
<image src="../../static/loc.png" class="loc-image"></image>
<view class="address">{{address}}</view>
......@@ -19,7 +19,7 @@
</view>
</view>
<!-- <view class="banner-content" :style="{top:statusBarHeight+116+'px'}"> -->
<ls-swiper :list="banners" imgKey="url" :loop="true" :dots='true' :autoplay='true' height='142'
<ls-swiper :list="banners" imgKey="coverImg" :loop="true" :dots='true' :autoplay='true' height='142'
@clickItem="clickItem()" v-if="isCompShow('OnePointBanner')" />
<!-- </view> -->
</view>
......@@ -45,6 +45,7 @@
<view :class="isRecentlySel?'tab-text-sel':'tab-text'">最进访问业务</view>
<view :class="isRecentlySel?'tab-line-sel':'tab-line'"></view>
</view>
<image src="../../static/ic-setting.png" class="image" @click="toSetting"></image>
</view>
<uni-grid column="2" v-if="isOrg">
<uni-grid-item v-for="(app,index) in appList" :key="index">
......@@ -102,7 +103,7 @@
</view>
</view>
</view>
<drag-ball x="300" y="450"></drag-ball>
<!-- <drag-ball x="300" y="450" v-if="false"></drag-ball> -->
<uni-tabbar currentPage="0"></uni-tabbar>
</view>
</template>
......@@ -115,9 +116,9 @@
return {
title: '欢迎您访问一点通',
banners: [{
"url": "../../static/banner.png"
"coverImg": "../../static/banner.png"
}, {
"url": "https://img.redocn.com/sheying/20150804/gongdi_4770950.jpg"
"coverImg": "https://img.redocn.com/sheying/20150804/gongdi_4770950.jpg"
}],
statusBarHeight: 20,
isCommonSel: true,
......@@ -133,400 +134,64 @@
scoreDetail: {},
city: "杭州市",
address: "浙江省杭州市西湖区",
weather: {
"city": "\u676d\u5dde",
"cityid": 382,
"citycode": 101210101,
"date": "2022-12-28",
"week": "\u661f\u671f\u4e09",
"weather": "\u5c0f\u96e8",
"temp": "4",
"temphigh": "7",
"templow": "3",
"img": "7",
"humidity": "77",
"pressure": "1027",
"windspeed": "5.7",
"winddirect": "\u5317\u98ce",
"windpower": "4\u7ea7",
"updatetime": "2022-12-28 15:38:00",
"index": [{
"iname": "\u7a7a\u8c03\u6307\u6570",
"ivalue": "\u8f83\u5c11\u5f00\u542f",
"detail": "\u60a8\u5c06\u611f\u5230\u5f88\u8212\u9002\uff0c\u4e00\u822c\u4e0d\u9700\u8981\u5f00\u542f\u7a7a\u8c03\u3002"
},
{
"iname": "\u8fd0\u52a8\u6307\u6570",
"ivalue": "\u8f83\u4e0d\u5b9c",
"detail": "\u6709\u626c\u6c99\u6216\u6d6e\u5c18\uff0c\u5efa\u8bae\u9002\u5f53\u505c\u6b62\u6237\u5916\u8fd0\u52a8\uff0c\u9009\u62e9\u5728\u5ba4\u5185\u8fdb\u884c\u8fd0\u52a8\uff0c\u4ee5\u907f\u514d\u5438\u5165\u66f4\u591a\u6c99\u5c18\uff0c\u6709\u635f\u5065\u5eb7\u3002"
},
{
"iname": "\u7d2b\u5916\u7ebf\u6307\u6570",
"ivalue": "\u6700\u5f31",
"detail": "\u5c5e\u5f31\u7d2b\u5916\u7ebf\u8f90\u5c04\u5929\u6c14\uff0c\u65e0\u9700\u7279\u522b\u9632\u62a4\u3002\u82e5\u957f\u671f\u5728\u6237\u5916\uff0c\u5efa\u8bae\u6d82\u64e6SPF\u57288-12\u4e4b\u95f4\u7684\u9632\u6652\u62a4\u80a4\u54c1\u3002"
},
{
"iname": "\u611f\u5192\u6307\u6570",
"ivalue": "\u8f83\u6613\u53d1",
"detail": "\u5929\u6c14\u8f83\u51c9\uff0c\u8f83\u6613\u53d1\u751f\u611f\u5192\uff0c\u8bf7\u9002\u5f53\u589e\u52a0\u8863\u670d\u3002\u4f53\u8d28\u8f83\u5f31\u7684\u670b\u53cb\u5c24\u5176\u5e94\u8be5\u6ce8\u610f\u9632\u62a4\u3002"
},
{
"iname": "\u6d17\u8f66\u6307\u6570",
"ivalue": "\u4e0d\u5b9c",
"detail": "\u4e0d\u5b9c\u6d17\u8f66\uff0c\u672a\u676524\u5c0f\u65f6\u5185\u6709\u96e8\uff0c\u5982\u679c\u5728\u6b64\u671f\u95f4\u6d17\u8f66\uff0c\u96e8\u6c34\u548c\u8def\u4e0a\u7684\u6ce5\u6c34\u53ef\u80fd\u4f1a\u518d\u6b21\u5f04\u810f\u60a8\u7684\u7231\u8f66\u3002"
},
{
"iname": "\u7a7a\u6c14\u6c61\u67d3\u6269\u6563\u6307\u6570",
"ivalue": "\u826f",
"detail": "\u6c14\u8c61\u6761\u4ef6\u6709\u5229\u4e8e\u7a7a\u6c14\u6c61\u67d3\u7269\u7a00\u91ca\u3001\u6269\u6563\u548c\u6e05\u9664\uff0c\u53ef\u5728\u5ba4\u5916\u6b63\u5e38\u6d3b\u52a8\u3002"
},
{
"iname": "\u7a7f\u8863\u6307\u6570",
"ivalue": "\u51b7",
"detail": "\u5929\u6c14\u51b7\uff0c\u5efa\u8bae\u7740\u68c9\u670d\u3001\u7fbd\u7ed2\u670d\u3001\u76ae\u5939\u514b\u52a0\u7f8a\u6bdb\u886b\u7b49\u51ac\u5b63\u670d\u88c5\u3002\u5e74\u8001\u4f53\u5f31\u8005\u5b9c\u7740\u539a\u68c9\u8863\u3001\u51ac\u5927\u8863\u6216\u539a\u7fbd\u7ed2\u670d\u3002"
}
],
"aqi": {
"so2": "9",
"so224": "",
"no2": "45",
"no224": "",
"co": "1.1",
"co24": "",
"o3": "44",
"o38": "",
"o324": "",
"pm10": "159",
"pm1024": "",
"pm2_5": "129",
"pm2_524": "",
"iso2": "",
"ino2": "",
"ico": "",
"io3": "",
"io38": "",
"ipm10": "",
"ipm2_5": "",
"aqi": "171",
"primarypollutant": "PM25",
"quality": "\u4e2d\u5ea6\u6c61\u67d3",
"timepoint": "2022-12-28 14:00:00",
"aqiinfo": {
"level": "\u56db\u7ea7",
"color": "#FF0000",
"affect": "\u8fdb\u4e00\u6b65\u52a0\u5267\u6613\u611f\u4eba\u7fa4\u75c7\u72b6\uff0c\u53ef\u80fd\u5bf9\u5065\u5eb7\u4eba\u7fa4\u5fc3\u810f\u3001\u547c\u5438\u7cfb\u7edf\u6709\u5f71\u54cd",
"measure": "\u513f\u7ae5\u3001\u8001\u5e74\u4eba\u53ca\u5fc3\u810f\u75c5\u3001\u547c\u5438\u7cfb\u7edf\u75be\u75c5\u60a3\u8005\u907f\u514d\u957f\u65f6\u95f4\u3001\u9ad8\u5f3a\u5ea6\u7684\u6237\u5916\u953b\u70bc\uff0c\u4e00\u822c\u4eba\u7fa4\u9002\u91cf\u51cf\u5c11\u6237\u5916\u8fd0\u52a8"
}
},
"daily": [{
"date": "2022-12-28",
"week": "\u661f\u671f\u4e09",
"sunrise": "06:54",
"sunset": "17:07",
"night": {
"weather": "\u5c0f\u96e8",
"templow": "3",
"img": "7",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u5c0f\u96e8",
"temphigh": "7",
"img": "7",
"winddirect": "\u5317\u98ce",
"windpower": "3-5\u7ea7"
}
},
{
"date": "2022-12-29",
"week": "\u661f\u671f\u56db",
"sunrise": "06:55",
"sunset": "17:07",
"night": {
"weather": "\u5c0f\u96e8",
"templow": "4",
"img": "7",
"winddirect": "\u4e1c\u98ce",
"windpower": "3-5\u7ea7"
},
"day": {
"weather": "\u5c0f\u96e8",
"temphigh": "7",
"img": "7",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
}
},
{
"date": "2022-12-30",
"week": "\u661f\u671f\u4e94",
"sunrise": "06:55",
"sunset": "17:08",
"night": {
"weather": "\u591a\u4e91",
"templow": "2",
"img": "1",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u9634",
"temphigh": "7",
"img": "2",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
}
},
{
"date": "2022-12-31",
"week": "\u661f\u671f\u516d",
"sunrise": "06:55",
"sunset": "17:09",
"night": {
"weather": "\u9634",
"templow": "2",
"img": "2",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u6674",
"temphigh": "11",
"img": "0",
"winddirect": "\u4e1c\u98ce",
"windpower": "3-5\u7ea7"
}
},
{
"date": "2023-01-01",
"week": "\u661f\u671f\u65e5",
"sunrise": "06:56",
"sunset": "17:09",
"night": {
"weather": "\u5c0f\u96e8",
"templow": "4",
"img": "7",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u5c0f\u96e8",
"temphigh": "12",
"img": "7",
"winddirect": "\u4e1c\u98ce",
"windpower": "3-5\u7ea7"
}
},
{
"date": "2023-01-02",
"week": "\u661f\u671f\u4e00",
"sunrise": "06:56",
"sunset": "17:10",
"night": {
"weather": "\u5c0f\u96e8",
"templow": "5",
"img": "7",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u5c0f\u96e8",
"temphigh": "9",
"img": "7",
"winddirect": "\u4e1c\u5317\u98ce",
"windpower": "3-5\u7ea7"
}
},
{
"date": "2023-01-03",
"week": "\u661f\u671f\u4e8c",
"sunrise": "06:56",
"sunset": "17:11",
"night": {
"weather": "\u9634",
"templow": "2",
"img": "2",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
},
"day": {
"weather": "\u9634",
"temphigh": "9",
"img": "2",
"winddirect": "\u6301\u7eed\u65e0\u98ce\u5411",
"windpower": "\u5fae\u98ce"
}
}
],
"hourly": [{
"time": "15:00",
"weather": "\u591a\u4e91",
"temp": "7",
"img": "1"
},
{
"time": "16:00",
"weather": "\u591a\u4e91",
"temp": "7",
"img": "1"
},
{
"time": "17:00",
"weather": "\u5c0f\u96e8",
"temp": "7",
"img": "7"
},
{
"time": "18:00",
"weather": "\u591a\u4e91",
"temp": "7",
"img": "1"
},
{
"time": "19:00",
"weather": "\u591a\u4e91",
"temp": "6",
"img": "1"
},
{
"time": "20:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "21:00",
"weather": "\u591a\u4e91",
"temp": "5",
"img": "1"
},
{
"time": "22:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "23:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "0:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "1:00",
"weather": "\u591a\u4e91",
"temp": "5",
"img": "1"
},
{
"time": "2:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "3:00",
"weather": "\u591a\u4e91",
"temp": "5",
"img": "1"
},
{
"time": "4:00",
"weather": "\u591a\u4e91",
"temp": "5",
"img": "1"
},
{
"time": "5:00",
"weather": "\u5c0f\u96e8",
"temp": "4",
"img": "7"
},
{
"time": "6:00",
"weather": "\u591a\u4e91",
"temp": "4",
"img": "1"
},
{
"time": "7:00",
"weather": "\u591a\u4e91",
"temp": "4",
"img": "1"
},
{
"time": "8:00",
"weather": "\u5c0f\u96e8",
"temp": "4",
"img": "7"
},
{
"time": "9:00",
"weather": "\u591a\u4e91",
"temp": "5",
"img": "1"
},
{
"time": "10:00",
"weather": "\u5c0f\u96e8",
"temp": "5",
"img": "7"
},
{
"time": "11:00",
"weather": "\u5c0f\u96e8",
"temp": "6",
"img": "7"
},
{
"time": "12:00",
"weather": "\u5c0f\u96e8",
"temp": "7",
"img": "7"
},
{
"time": "13:00",
"weather": "\u591a\u4e91",
"temp": "7",
"img": "1"
},
{
"time": "14:00",
"weather": "\u5c0f\u96e8",
"temp": "7",
"img": "7"
}
]
},
weather: {},
userInfo: {},
pageTemplateComponent: [],
isWeatherShow: true,
role: "VISITOR"
role: "VISITOR",
nowTime: ""
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
let nowDate = new Date()
this.nowTime =
`${nowDate.getFullYear()}-${this.add0(nowDate.getMonth()+1)}-${this.add0(nowDate.getDate())}`
},
onShow() {
if (!getApp().globalData.isReject) {
this.loginState()
}
uni.$once("refreshApp", res => {
if (this.isCommonSel) {
this.getCommonApp()
}
})
},
onReady() {
},
methods: {
loginState() {
let that = this
uni.getStorage({
key: "token",
success(res) {
//获取用户信息
that.getUserInfo()
// that.getNews()
that.getSetting()
that.getMyScore()
that.getHomeComp()
that.getWeather()
},
fail() {
uni.redirectTo({
url: "/pages/login/authLogin/authLogin"
})
}
})
},
add0(text) {
if (text < 10) {
return "0" + text
}
return text
},
clickItem() {
uni.navigateTo({
url: "/pages/index/siteNewList/siteNewList"
url: `/pages/index/siteNewList/siteNewList?clientId=1`
})
},
toLinkOther() {
......@@ -547,6 +212,11 @@
}
})
},
toSetting() {
uni.navigateTo({
url: "/pages/index/bussConfig/bussConfig"
})
},
// 兑换商品
exchangeGood(item) {
ScoreApi.exchangeGood({
......@@ -565,11 +235,27 @@
}
})
},
getBanners() {
Api.getNews({
data: {
pageNum: 1,
pageSize: 20,
clientId: 1,
}
}).then((result) => {
if (result.code == 0) {
this.banners = result.data.list
} else {
this.$toast.showToast(result.msg)
}
})
},
getNews() {
Api.getNews({
data: {
pageNum: 1,
pageSize: 20
pageSize: 20,
clientId: 2,
}
}).then((result) => {
if (result.code == 0) {
......@@ -579,6 +265,21 @@
}
})
},
//获取常用应用
getCommonApp() {
Api.getNormalApp({
}).then((result) => {
})
},
getRecentlyApp() {
Api.getNearApp({
}).then((result) => {
})
},
toLinkScore() {
uni.navigateTo({
url: "/pages/mine/myScore/myScore"
......@@ -586,7 +287,7 @@
},
toLinkNew() {
uni.navigateTo({
url: "/pages/index/siteNewList/siteNewList"
url: `/pages/index/siteNewList/siteNewList?clientId=2`
})
},
getMyScore() {
......@@ -603,9 +304,11 @@
if (index == 0) {
this.isCommonSel = true
this.isRecentlySel = false
this.getCommonApp()
} else {
this.isCommonSel = false
this.isRecentlySel = true
this.getRecentlyApp()
}
},
toLink(app) {
......@@ -613,38 +316,6 @@
url: "/pages/mine/myScore/myScore"
})
},
loginState() {
let that = this
uni.getStorage({
key: "token",
success(res) {
//获取用户信息
that.getUserInfo()
// that.getNews()
that.getSetting()
that.getMyScore()
that.getHomeComp()
},
fail() {
uni.redirectTo({
url: "/pages/login/authLogin/authLogin"
})
// uni.showModal({
// title: '登录提示',
// content: '该账号还没登录,是否去登录',
// showCancel: true,
// confirmText: "登录",
// cancelText: "取消",
// confirmColor: '#3B73FE',
// success: res => {
// if (res.confirm) {
// that.toLogin()
// }
// }
// })
}
})
},
getHomeComp() {
Api.getHomeComp({
data: {
......@@ -762,10 +433,9 @@
type: 2,
city: this.city
}
}).then((res) => {
let result = res.data
}).then((result) => {
if (result.code == 0) {
this.weather = result.data
this.weather = result.data.result
} else {
this.$toast.showToast(result.msg)
}
......@@ -881,7 +551,7 @@
.login-info {
font-family: "MicrosoftYaHei ";
font-weight: 400;
font-size: 32rpx;
font-size: 24rpx;
text-align: left;
color: #fff;
}
......@@ -900,7 +570,7 @@
.address {
font-family: "MicrosoftYaHeiUI ";
font-weight: 400;
font-size: 24rpx;
font-size: 20rpx;
margin-left: 10rpx;
text-align: left;
color: #fff;
......@@ -1037,6 +707,11 @@
background: #FFF;
}
}
image {
width: 40rpx;
height: 40rpx;
}
}
......
......@@ -61,7 +61,15 @@
}
}).then((result) => {
if (result.code == 0) {
this.list = []
let data = result.data
data.forEach(item => {
if (item.articleLibraryId == id) {
this.newDetail = item
} else {
this.list.push(item)
}
})
} else {
this.$toast.showToast(result.msg)
}
......
......@@ -29,11 +29,14 @@
}],
page: 1,
pageSize: 20,
isHasMore: true
isHasMore: true,
clientId: 2,
key: ""
}
},
onLoad() {
// this.getNews()
onLoad(option) {
this.clientId = option.clientId
this.getNews()
},
onPullDownRefresh() {
this.page = 1
......@@ -52,13 +55,17 @@
})
},
search(e) {
this.key = e.detail.value
this.page = 1
this.getNews()
},
getNews() {
Api.getNews({
data: {
pageNum: this.page,
pageSize: this.pageSize
pageSize: this.pageSize,
clientId: this.clientId,
title: this.key
}
}).then((result) => {
uni.stopPullDownRefresh()
......
......@@ -5,15 +5,15 @@
<view class="weather-item" v-for="(item,index) in weather" :key="index">
<view class="date-content">
<view class="left">{{item.date}}</view>
<view class="right">{{item.week}}</view>
<view class="right">{{item.day.temphigh}}℃~{{item.night.templow}}</view>
</view>
<view class="day-content">
<view class="left">白天:{{item.day.weather}}</view>
<view class="right">{{item.day.temphigh}}</view>
</view>
<view class="night-content">
<view class="left">夜间:{{item.night.weather}}</view>
<view class="right">{{item.night.templow}}</view>
<view class="left">{{item.week}}</view>
<view class="weather">
<view class="right">{{item.day.weather}}</view>
<image class="image" :src="weatherIcon(item.day.img)"></image>
</view>
</view>
</view>
</view>
......@@ -31,7 +31,15 @@
this.weather = JSON.parse(options.daily)
},
methods: {
weatherIcon(img) {
if (img == 0) {
return '../../../static/sun-ic.png'
} else if (img == 1 || img == 2) {
return '../../../static/sun-cloudy-ic.png'
} else if (img == 7) {
return '../../../static/light-rain-ic.png'
}
}
}
}
</script>
......@@ -83,28 +91,24 @@
flex: 1;
}
.right {
color: #333;
font-size: 28rpx;
}
}
.weather {
display: flex;
flex-direction: row;
align-items: center;
.night-content {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20rpx;
.right {
color: #333;
font-size: 28rpx;
}
.left {
color: #333;
font-size: 28rpx;
flex: 1;
}
image {
margin-left: 20rpx;
width: 40rpx;
height: 40rpx;
}
.right {
color: #333;
font-size: 28rpx;
}
}
}
}
......
......@@ -8,9 +8,10 @@
</view>
<view class='content'>
<view>申请获取微信授权登录</view>
<!-- <text>获得你的公开信息(昵称,头像、地区等)</text> -->
<text>获得你的手机号信息</text>
</view>
<button class='bottom' type='primary' withCredentials="true" lang="zh_CN" @tap="authLogin">授权登录</button>
<button class="bottom" open-type="getPhoneNumber" type="primary"
bindgetphonenumber="onGetPhoneNumber">获取手机号码授权登录</button>
</view>
</view>
</view>
......@@ -29,6 +30,53 @@
};
},
methods: {
onGetPhoneNumber(e) {
var that = this;
wx.login({
success(res) {
if (res.code) {
console.log('步骤2获检查用户登录状态,获取用户电话号码!', res)
wx.request({
url: '这里写自己的获取授权的服务器地址',
data: {
code: res.code
},
header: {
'content-type': 'application/json'
},
success: function(res) {
console.log("步骤三获取授权码,获取授权openid,session_key", res);
var userphone = res.data.data;
wx.setStorageSync('userphoneKey', userphone);
//解密手机号
var msg = e.detail.errMsg;
var sessionID = wx.getStorageSync("userphoneKey").session_key;
var encryptedData = e.detail.encryptedData;
var iv = e.detail.iv;
if (msg == 'getPhoneNumber:ok') { //这里表示获取授权成功
wx.checkSession({
success: function() {
//这里进行请求服务端解密手机号
that.deciyption(sessionID, encryptedData,
iv);
},
fail: function() {
// that.userlogin()
}
})
}
},
fail: function(res) {
console.log("fail", res);
}
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
},
authLogin() {
if (this.unique_token !== '') {
this.checkBind()
......
......@@ -5,34 +5,34 @@
<navbar :title="title" :showBack="false"></navbar>
<view class="info-content" :style="{top:statusBarHeight+45+'px'}">
<image src="../../static/mine-bg.png" class="image"></image>
<view class="company">浙江建工XXXXX公司</view>
<view class="name">张三 项目经理</view>
<view class="project">XXXXXXXXXXX项目</view>
<view class="company">{{currentJob.org_name||""}}</view>
<view class="name">{{userInfo.user.user_name}} {{currentJob.job_name}}</view>
<view class="project">{{currentJob.dept_name}}</view>
<image src="../../static/avatar-def.png" class="avatar"></image>
</view>
</view>
<view class="func-content">
<view class="item">
<view class="item" v-if="isShow('项目信息')" @click="linkTo('/pages/mine/projectInfo/projectInfo')">
<view class="name">项目信息</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item">
<view class="line" v-if="isShow('项目信息')"></view>
<view class="item" v-if="isShow('项目过往')" @click="linkTo('/pages/mine/projectHistory/projectHistory')">
<view class="name">项目过往</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item" @click="linkTo('/pages/mine/myApproval/myApproval')">
<view class="line" v-if="isShow('项目过往')"></view>
<view class="item" @click="linkTo('/pages/mine/myApproval/myApproval')" v-if="isShow('我的审批')">
<view class="name">我的审批</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item" @click="linkTo('/pages/mine/myScore/myScore')">
<view class="line" v-if="isShow('我的审批')"></view>
<view class="item" @click="linkTo('/pages/mine/myScore/myScore')" v-if="isShow('我的积分')">
<view class="name">我的积分</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
<view class="line"></view>
<view class="item" @click="linkTo('/pages/login/joinOrg/joinOrg')">
<view class="line" v-if="isShow('我的积分')"></view>
<view class="item" @click="linkTo('/pages/login/joinOrg/joinOrg')" v-if="isShow('加入组织')">
<view class="name">加入组织</view>
<image src="../../static/right-arrow.png" class="image"></image>
</view>
......@@ -55,14 +55,47 @@
data() {
return {
title: '欢迎您访问一点通',
statusBarHeight: 20
statusBarHeight: 20,
currentJob: {},
userInfo: {
identity: {
code: "WORKER"
}
}
}
},
onLoad() {
const info = uni.getSystemInfoSync()
this.statusBarHeight = info.statusBarHeight
},
onShow() {
//用户信息
this.userInfo = getApp().globalData.userInfo
console.log("用户信息", this.userInfo);
let jobs = this.userInfo.user.job_list
console.log("岗位列表", jobs);
let currentComId = this.userInfo.user.comp_id
let job = jobs.find(item =>
item.company_id == currentComId
)
console.log("当前岗位", job);
this.currentJob = job
},
methods: {
isShow(name) {
if (name == '项目信息' || name == '项目过往') {
return this.userInfo.identity.code == 'PM' || this.userInfo.identity.code == 'WORKER'
}
if (name == '我的审批') {
return this.userInfo.identity.code == 'PM'
}
if (name == '我的积分') {
return this.userInfo.identity.code == 'WORKER'
}
if (name == '加入组织') {
return this.userInfo.identity.code == 'VISITOR'
}
},
toLinkLogin() {
uni.reLaunch({
url: "/pages/login/login/login"
......@@ -155,6 +188,7 @@
margin: 190px 30rpx 0 30rpx;
background-color: #fff;
border-radius: 30rpx;
padding-bottom: 30rpx;
.item {
display: flex;
......
<template>
<view class="content">
<titleBar title="项目过往"></titleBar>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
}
</style>
<template>
<view class="content">
<titleBar title="项目信息"></titleBar>
<view class="info-content">
<view class="name">XXXXX总承包工程项目</view>
<view class="item">
<view class="item-name">上级组织:</view>
<view class="item-value">中建XXX建工公司</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">项目二维码:</view>
<view class="item-value-blue">二维码下载</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">计划开工日期:</view>
<view class="item-value">2022/12/14</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">计划竣工日期:</view>
<view class="item-value">2023/01/14</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">项目地址:</view>
<view class="item-value">浙江省杭州市拱墅区</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">详细地址:</view>
<view class="item-value">祥符街道122号</view>
</view>
<view class="line"></view>
<view class="item">
<view class="item-name">项目地图:</view>
</view>
</view>
<map class="map-content" :longitude="longitude" :latitude="latitude"></map>
<view class="jj-content">
<view class="item">
<view class="item-name">项目简介:</view>
<view class="item-value">XXXXXXX工程是指油XXX水库引水,XX河南北两岸各建一条干渠及支斗渠等田间配套工程组成,主要解决该地区河谷两岸灌溉。</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
longitude: "122",
latitude: "36"
}
},
methods: {
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
.info-content {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx;
.name {
font-weight: 600;
margin-bottom: 30rpx;
font-size: 28rpx;
color: #333;
}
.item {
display: flex;
flex-direction: row;
align-items: center;
.item-name {
font-weight: 400;
font-size: 28rpx;
color: #999;
flex: 1;
}
.item-value {
font-weight: 400;
font-size: 28rpx;
color: #333;
}
.item-value-blue {
font-weight: 400;
font-size: 28rpx;
color: #3B73FE;
}
}
.line {
width: 630rpx;
height: 2rpx;
margin: 30rpx 0;
background: rgba(0, 0, 0, 0.1);
}
}
.map-content {
width: 690rpx;
height: 170px;
margin: 0 30rpx;
}
.jj-content {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx;
.item {
display: flex;
flex-direction: row;
.item-name {
font-weight: 400;
font-size: 28rpx;
color: #999;
flex: 1;
}
.item-value {
font-weight: 400;
width: 488rpx;
flex-wrap: wrap;
font-size: 28rpx;
color: #333;
}
}
}
}
</style>
<template>
<view>
<view class="content">
<web-view src="https://www.baidu.com/"></web-view>
<drag-ball x="300" y="450" v-if="false" image="../../static/ic-more-kb.png"></drag-ball>
<uni-tabbar currentPage="2"></uni-tabbar>
</view>
</template>
......@@ -8,7 +10,7 @@
export default {
data() {
return {
title: '欢迎您访问一点通',
}
},
methods: {
......@@ -17,6 +19,24 @@
}
</script>
<style>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
padding-bottom: 130rpx;
.header-content {
position: relative;
top: 0;
left: 0;
.header-image {
width: 750rpx;
height: 504rpx;
position: absolute;
top: 0;
left: 0;
}
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment