Browse Source

feat: 小绿点隐藏

test2
xuesinan 4 years ago
parent
commit
31f3dc780e
  1. 1
      CHANGELOG.md
  2. 2
      components/Calendar/Calendar.vue
  3. 8
      components/Upload/Upload.vue
  4. 18
      manifest.json
  5. 61
      pages/index/index.vue
  6. BIN
      static/headimg.png
  7. BIN
      static/headimg4.png

1
CHANGELOG.md

@ -17,6 +17,7 @@
- | 给财务条传参数 | [5ff7706](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5ff7706)
- | 给财务条详情页传参 | [fa92a11](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fa92a11)
- | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc)
- | 工作台按钮 | [6e434e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/6e434e6)
- | 工作台功能 | [b674733](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b674733)
- | 广告页、引导页 | [fe87d00](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fe87d00)
- | 广告页、引导页 | [1c89806](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1c89806)

2
components/Calendar/Calendar.vue

@ -100,7 +100,7 @@ const props = defineProps({
},
});
const emit = defineEmits(['handleFindPoint', 'handleFindPoint', 'days-change', 'selected-change']);
const emit = defineEmits(['handleFindPoint', 'days-change', 'selected-change']);
const data = reactive({
weeks: ['日', '一', '二', '三', '四', '五', '六'], //

8
components/Upload/Upload.vue

@ -25,6 +25,11 @@
// wbs
const handleUpload = async cur => {
// #ifdef APP-PLUS
uni.$ui.showToast('APP暂不支持导入');
// #endif
// #ifndef APP-PLUS
if (list.value.length === 1) {
store.commit('setDomain', list.value[0].url);
@ -56,7 +61,8 @@
uni.navigateTo({
url: '/pages/business/business'
})
}
}
// #endif
};
async function getList() {

18
manifest.json

@ -79,13 +79,29 @@
}
},
"splashscreen" : {
"androidStyle" : "common"
"androidStyle" : "default"
}
},
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
"nativePlugins" : {
"GuoWei-SelectFileModule" : {
"__plugin_info__" : {
"name" : "Android文件选择 - [试用版,仅用于自定义调试基座]",
"description" : "目录方式,选择Android手机储存文件,支持多选、过滤",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=4607",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 0,
"pid" : "4607",
"parameters" : {}
}
}
}
},
/* */

61
pages/index/index.vue

@ -22,7 +22,8 @@
<view class="relative">
<!-- <view class="relative" @touchmove="onMove"> -->
<!-- 日历 -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" />
<!-- <Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" /> -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" />
<!-- 上传 导入wbs -->
<Upload @success="onUploadSuccess" @error="onUploadError" />
@ -30,7 +31,7 @@
<view class="login-box absolute" @click="toLogin">
<text v-if="!userInfo">游客</text>
<image v-else src="../../static/headimg.png" mode=""></image>
<image v-else src="../../static/headimg4.png" mode=""></image>
</view>
<!-- <u-button class="mt-4" @click="toLogin">登录</u-button> -->
@ -60,7 +61,7 @@
});
getProjects();
handleFindPoint();
// handleFindPoint();
// token
watchEffect(() => {
@ -89,16 +90,17 @@
});
}
async function handleFindPoint(start, end) {
try {
const startTime = start || dayjs().startOf('month').valueOf();
const endTime = end || dayjs().endOf('month').valueOf();
const res = await uni.$u.api.findRedPoint(startTime, endTime);
store.commit('project/setDotList', res);
} catch (error) {
console.log('error: ', error);
}
}
//
// async function handleFindPoint(start, end) {
// try {
// const startTime = start || dayjs().startOf('month').valueOf();
// const endTime = end || dayjs().endOf('month').valueOf();
// const res = await uni.$u.api.findRedPoint(startTime, endTime);
// store.commit('project/setDotList', res);
// } catch (error) {
// console.log('error: ', error);
// }
// }
//
const onDateChange = event => {
@ -148,6 +150,29 @@
uni.navigateTo({
url: '/pages/user/login'
});
} else {
uni.showModal({
content: '是否退出登录',
success: ({ confirm }) => {
if (confirm) {
signout();
}
}
})
}
}
/**
* 退出登录
*/
function signout() {
try {
store.commit('user/setToken', '');
store.commit('user/setUser', '');
uni.$storage.setStorageSync('anyringToken', '');
uni.$storage.setStorageSync('user', '');
} catch (e) {
//TODO handle the exception
}
}
</script>
@ -186,15 +211,19 @@
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #eeeeee;
text-align: center;
line-height: 50px;
line-height: 40px;
border: 1px solid #ddd;
overflow: hidden;
text {
font-size: 12px;
}
image {
display: inline-block;
width: 40px;

BIN
static/headimg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
static/headimg4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Loading…
Cancel
Save