Commit 9b1d8ba2 by xiexiaoqin

Merge branch 'dev' into release/1.0.0

parents c74d8633 b2658c6e
......@@ -18,31 +18,34 @@ export default async function login() {
method: 'POST',
dataType: 'json',
success: function (res) {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token;
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
getApp().globalData.userInfo = JSON.stringify({
username: oapiUser.name,
userId: oapiUser.userid,
headUrl: oapiUser.avatar,
platform: "dingtalk"
});
lock = false;
resolve(res)
if (res.data.code == 0) {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token;
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
getApp().globalData.userInfo = JSON.stringify({
username: oapiUser.name,
userId: oapiUser.userid,
headUrl: oapiUser.avatar,
platform: "dingtalk"
});
lock = false;
resolve(res)
} else {
lock = false;
reject(res.data);
}
},
fail: function (err) {
lock = false;
reject(err);
console.log('err:' + err);
}
})
},
fail: function (err) {
lock = false;
reject(err);
console.log('fail:' + err);
}
})
})
......@@ -51,7 +54,6 @@ export default async function login() {
async function waitLockRelease(retry) {
for (let i = 0; i < retry; i++) {
if (lock == false) {
console.log(i);
return;
}
await sleep(100);
......
......@@ -138,7 +138,13 @@ export function isParticipate(data) {
url: `/meet/schedule/confirm`
});
}
//会议室详情的获取重复会议动态列表
export function getMeetingRoomRepeatAffairs(groupId, page) {
return $http({
method: "get",
url: `/meet/meeting-log/scheduleTemplateMeetingLogPage?groupId=${groupId}&size=10&current=${page}`
});
}
//会议室详情的获取动态列表
export function getMeetingRoomAffairs(id) {
return $http({
......
import login from "./login";
export default function xFetch({ url, method, data, type }) {
if (type == 'binding') {
url = `${getApp().globalData.globalUrl2}${url}`
......@@ -14,23 +16,38 @@ export default function xFetch({ url, method, data, type }) {
method: method,
dataType: "json",
data: data,
// timeout: 280,
timeout: 15000,
success: function (res) {
if (res.data.code == 0) {
resolve(res);
} else {
rejects(res);
dd.alert({
content: res.data.msg || "请求数据异常",
buttonText: "确定"
});
if (res.data.code == 401) {
login();
}
alertOnce(res.data.msg || '请求异常,请重试', rejects);
}
},
fail: function (err) {
rejects({ refresh: true });
if (err && err.status == 401) {
login();
}
alertOnce('网络异常,请重试', rejects);
}
});
});
}
let alert = false;
function alertOnce(content, rejects) {
if (alert == false) {
dd.alert({
content: content,
buttonText: "确定",
success: () => {
rejects({ refresh: true });
alert = false;
}
});
}
alert = true;
}
\ No newline at end of file
......@@ -10,4 +10,14 @@ view {
.addPaddingBottom {
padding-bottom: 68rpx;
}
.btn {
font-size: 32rpx;
height: 72rpx;
line-height: 72rpx;
border-radius: 48rpx;
text-align: center;
color: #fff;
background: rgba(234, 12, 40, 1);
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ import { setGlobalStore } from "dd-store";
import exampleStore from "./stores/exampleStore";
setGlobalStore(exampleStore);
import login from "./api/login";
import { globalUrl, globalUrl2 } from './config';
App({
onLaunch(options) {
......@@ -20,9 +21,7 @@ App({
userid: "",
name: "",
userInfo: "",
// globalUrl: "https://gateway-beta.mingwork.com", //beta地址
// globalUrl2: "https://third-authentication-beta.mingwork.com"
globalUrl: "https://gateway2.mingwork.com", // 线上地址
globalUrl2: "https://third-authentication.mingwork.com" //线上地址
globalUrl: globalUrl,
globalUrl2: globalUrl2
}
});
......@@ -17,4 +17,4 @@
"allowsBounceVertical": "YES"
},
"pullRefresh": false
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<view class="sidebarContent" catchTap="preventSort">
<view class="sidebarLogo">
<template is="avater" data="{{item: userInfo}}"/>
<view>{{ userInfo.userName }}</view>
<view>{{ userInfo.username }}</view>
</view>
<view class="hasAssociated" a:if="{{relatedAppList.length !== 1}}">
<view class="associated">
......
......@@ -34,6 +34,11 @@
font-size: 34rpx;
}
.iconicon_attender {
position: relative;
top: 6rpx;
}
.participator-title {
color: rgba(25, 31, 37, 1);
font-size: 34rpx;
......
export const globalUrl = "https://gateway-beta.mingwork.com";
export const globalUrl2 = "https://third-authentication-beta.mingwork.com";
\ No newline at end of file
......@@ -63,10 +63,19 @@
justify-content: center;
}
.loadingToast view {
.loadingToast>view {
font-size: 28rpx;
color: #FFFFFF;
padding: 18rpx 26rpx;
border-radius: 40rpx;
background: rgba(0, 0, 0, .59)
background: rgba(0, 0, 0, .59);
display: flex;
justify-content: center;
align-items: center;
}
.loadingToast image {
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
}
\ No newline at end of file
......@@ -29,13 +29,28 @@
{{name ? name : 'outlook'}}
</view>
</view>
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}" onTap="{{isBind ? 'showPopup' : 'bindApp'}}">
<view class="{{isBind ? 'unBinding': 'binding'}} bindBtn {{isLoading ? 'loadingBtn' : ''}}" onTap="{{isBind ? 'showPopup' : 'bindApp'}}">
<text>{{isBind ? '解绑' : '绑定'}}</text>
</view>
</view>
<view class="loadingToast" a:if="{{isLoading}}">
<view>
账号关联中···
<view a:if="{{bindStatus==='loading'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindLoading.gif"/>
<view>
账号关联中···
</view>
</view>
<view a:elif="{{bindStatus==='success'}}">
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindSuccess.png"/>
<view>
关联成功
</view>
</view>
<view a:else>
<image class="fix-img-width-fix" mode="scaleToFill" src="./../../assests/bindFail.png"/>
<view>
关联失败
</view>
</view>
</view>
<selectpopup showSelectPopup="{{showSelectPopup}}" selectPopupList="{{selectPopupList}}" onSelectPopup="onSelectPopup" onSelectPopupCancel="onSelectPopupCancel"></selectpopup>
\ No newline at end of file
......@@ -7,6 +7,7 @@ import {
import "dingtalk-jsapi/entry/mobile";
import openLink from "dingtalk-jsapi/api/biz/util/openLink";
import create from "dd-store";
import { fail } from "assert";
let interval = "";
let requestNum = 0;
create.Page({
......@@ -18,7 +19,8 @@ create.Page({
isBind: false,
isLoading: false,
showSelectPopup: false,
selectPopupList: [{ text: "取消关联" }]
selectPopupList: [{ text: "取消关联" }],
bindStatus: "loading"
},
onLoad(e) {
this.setData({
......@@ -31,12 +33,17 @@ create.Page({
sendRequest() {
let that = this;
interval = setInterval(() => {
if (requestNum >= 300) {
if (requestNum >= 180) {
requestNum = 0;
that.setData({
isBind: false,
isLoading: false
bindStatus: "fail"
});
setTimeout(() => {
that.setData({
isLoading: false
});
}, 2000);
clearInterval(interval);
}
requestNum++;
......@@ -47,8 +54,13 @@ create.Page({
this.setData({
name: item.userName,
isBind: true,
isLoading: false
bindStatus: "success"
});
setTimeout(() => {
that.setData({
isLoading: false
});
}, 2000);
clearInterval(interval);
this.$store.data.relatedAppNeedUpdate = true;
this.update();
......@@ -62,7 +74,8 @@ create.Page({
return false;
}
this.setData({
isLoading: true
isLoading: true,
bindStatus: "loading"
});
this.sendRequest();
if (this.data.platform === "outlook") {
......
@import "../../template/loading/loading.acss";
@import "../../template/affairBlank/index.acss";
@import "../../template/fullScreen/fullScreen.acss";
@import "../../template/refresh/index.acss";
.dynamicBox {
width: 100%;
overflow: hidden;
......@@ -9,6 +10,10 @@
height: 100vh;
}
.dynamicBox_add_padding {
padding-bottom: 188rpx;
}
.dynamicList {
width: 100%;
}
......@@ -100,6 +105,7 @@
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.scroll-lock {
......
<import src="../../template/loading/loading.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<view a:if='{{refresh}}' onTap="onLoad">连接超时,请重试,刷新按钮</view>
<import src="../../template/refresh/index.axml"/>
<template is="refresh" a:if='{{refresh}}' ></template>
<block a:else>
<view hidden="{{$data.tabBarIndex === '1'}}">
<import src="../../template/affairBlank/index.axml"/>
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
<block a:if="{{!listLoading}}">
<scroll-view a:if="{{dynamicList.length > 0}}" scroll-y="{{true}}" lower-threshold="{{400}}" class="dynamicBox" onScrollToLower="onScrollToLower">
<scroll-view a:if="{{dynamicList.length > 0}}" scroll-y="{{true}}" lower-threshold="{{400}}" class="dynamicBox {{isIPX ? 'dynamicBox_add_padding' : ''}}" onScrollToLower="onScrollToLower">
<view class="dynamicList">
<swipe onSetBodyDisableScroll="setBodyDisableScroll" rightWidth="{{ 78 }}" leftWidth="{{ 0 }}" a:for="{{dynamicList}}" class="dynamicContent" key="{{item.scheduleId}}">
<view class="dynamicDetails">
......
......@@ -29,6 +29,7 @@ import create from "dd-store";
let maxClickCount = 5;
create.Page({
data: {
sign: '',
refresh: false,
$data: null,
iconDay: currentDate.getDate(),
......@@ -61,6 +62,7 @@ create.Page({
maxYear: maxYear,
todayIndex: 0,
onShow() {
//如果是重复会议重新算
if (this.$store.data.indexNeedUpdate) {
dd.setNavigationBar({
......@@ -84,13 +86,25 @@ create.Page({
this.$store.data.isIndexAffairListNeedUpdate = false;
this.update();
}
//开启一个定时器
this.timer = setInterval(() => {
this.getData()
}, 30000)
},
onHide() {
clearInterval(this.timer);
this.timer = null;
},
refresh() {
this.onLoad()
},
onLoad(event) {
if (JSON.stringify(event) != "{}") {
onLoad(query) {
console.log(query);
if (query && JSON.stringify(query) !== '{}') {
this.setData({
listLoading: false
});
const scheduleItem = JSON.parse(Object.keys(event)[0].split("=")[1]);
const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem)
......@@ -184,11 +198,11 @@ create.Page({
callBack();
}
}).catch(err => {
// if (err && err.refresh) {
// this.setData({
// refresh: true
// })
// }
if (err && err.refresh) {
this.setData({
refresh: true
})
}
});
},
//动态置顶
......@@ -289,7 +303,23 @@ create.Page({
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
}).then(res => {
this.getScheduleList(res.data.data);
//是否刷新页面
if (this.data.sign && res.data.data.sign !== this.data.sign) {
DateMap = getDateMap(this.minYear, this.maxYear);
}
if (res.data.data.sign !== this.data.sign) {
this.getScheduleList(res.data.data);
}
this.setData({
sign: res.data.data.sign
})
}).catch(err => {
if (err && err.refresh) {
this.setData({
refresh: true
})
}
});
},
//生成DateMap值
......@@ -780,7 +810,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: "0.0.10"
content: "0.0.12"
});
maxClickCount = 5;
}
......
......@@ -2,6 +2,7 @@
.affair-list {
background: #fff;
padding: 48rpx 32rpx 220rpx 32rpx;
/* height: calc(100vh - 200rpx); */
}
.affair-list-margin-top {
......@@ -113,6 +114,7 @@ page {
background: #fff;
z-index: 1;
position: relative;
width: 100%;
padding-bottom: 0;
}
......@@ -613,4 +615,14 @@ input {
.lineThrough {
text-decoration: line-through;
}
.loading-more {
color: rgba(234, 12, 40, 1);
font-size: 24rpx;
text-align: center;
width: 400rpx;
border-top: 1px solid rgba(239, 242, 245, 1);
padding-top: 32rpx;
margin: 0 auto 50rpx;
}
\ No newline at end of file
......@@ -205,7 +205,7 @@
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}} {{!isExpand&&$data.participatorList.length>1 ? 'addPadding' : ''}}" onTap="hideFileOperate">
<view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view>
<block a:if="{{!affairLoading}}">
<block a:for="{{affairList}}">
<block a:for="{{affairList}}" key="{{item.id}}">
<view a:if="{{item.category == '3' && item.taskViewList && item.taskViewList.length > 0}}" class='compose-column'>
<view class="avater task-avater">
<text class="iconfont iconicon_task1"></text>
......@@ -226,6 +226,7 @@
</view>
<view a:if="{{item.content && ((item.category == 1 || item.taskViewList && item.taskViewList.length > 0) || ( item.fileView && item.fileView.fileInfos && item.fileView.fileInfos.length > 0 ))}}" class='simple-column'>{{item.content}} {{item.createTime}}</view>
</block>
<view class="loading-more" onTap="loadAffairMore" a:if="{{current < pages}}">点击加载更多动态...</view>
<view class="affair-placeholder" a:if="{{affairList.length == 1 && affairList[0].logType == 'create_schedule'}}">
<template is="affair-placeholder" data="{{title: '添加文件', tip: '我们不开无准备的会,快来上传会议文件吧。'}}"/>
</view>
......
.refresh-bg {
position: fixed;
left: 0;
top: 0;
background: #FFFFFF;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.refresh-btn {
padding: 0 48rpx;
margin-top: 32rpx;
}
\ No newline at end of file
<template name="refresh">
<view class="refresh-bg">
<view>您的网络好像不给力,请重试</view>
<button class="btn refresh-btn" onTap="refresh">刷新</button>
</view>
</template>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment