Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-01 16:07:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
353b436843fef948a3d1e5ee2adc4cf5ccc3442f
353b4368
1 parent
f1420412
时间格式化方法统一调用
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
37 deletions
src/components/activity-card.vue
src/pages/activityDetail/index.vue
src/pages/my/index.vue
src/pages/myCreateActivity/index.vue
src/pages/myFollowUser/index.vue
src/pages/userInfo/index.vue
src/utils/tools.js
src/components/activity-card.vue
View file @
353b436
...
...
@@ -66,7 +66,7 @@
import { ref, defineProps, computed } from 'vue'
import icon_address from '@/images/icon/address@2x.png'
import Taro from '@tarojs/taro'
import
moment from '@/utils/moment.min
.js'
import
{ formatDate } from '@/utils/tools
.js'
const props = defineProps({
data: Object,
...
...
@@ -77,10 +77,6 @@ const props = defineProps({
// return false
// })
const formatDate = (date) => {
return moment(date).format('YYYY-MM-DD HH:mm')
}
const formatStatus = (item) => {
if (item?.is_end) {
return '已结束';
...
...
src/pages/activityDetail/index.vue
View file @
353b436
<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
0-31 17:17:34
* @LastEditTime: 2022-1
1-01 16:02:50
* @FilePath: /swx/src/pages/activityDetail/index.vue
* @Description: 活动详情页
-->
...
...
@@ -150,7 +150,7 @@ import activityBar from '@/components/activity-bar.vue'
import Taro from '@tarojs/taro'
import PosterBuilder from '@/components/PosterBuilder/index.vue';
import { ref, onMounted } from "vue";
import
moment from '@/utils/moment.min
.js'
import
{ formatDate } from '@/utils/tools
.js'
import { infoUserAPI } from '@/api/User/index';
import { qrCodeActivityAPI } from '@/api/Activity/index';
import icon_share from '@/images/icon/share.png'
...
...
@@ -166,10 +166,6 @@ onMounted(async () => {
}
})
const formatDate = (date) => {
return moment(date).format('YYYY-MM-DD HH:mm')
}
const show_share = ref(false);
const share_options = [
{ name: '微信', icon: 'wechat', openType: 'share' },
...
...
src/pages/my/index.vue
View file @
353b436
<!--
* @Date: 2022-09-21 14:51:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-01 1
3:44:31
* @LastEditTime: 2022-11-01 1
6:05:33
* @FilePath: /swx/src/pages/my/index.vue
* @Description: 我的页面
-->
...
...
@@ -110,7 +110,7 @@ import "./index.less";
import { $ } from '@tarojs/extend'
import mixin from '@/utils/mixin';
import { infoUserAPI } from '@/api/User/index';
import
moment from '@/utils/moment.min
.js'
import
{ formatDate } from '@/utils/tools
.js'
export default {
name: "myPage",
...
...
@@ -131,9 +131,9 @@ export default {
if (code) {
data.activity_list.forEach(item => {
item.server_time = data.server_time;
item.reg_begin_time =
this.
formatDate(item.reg_begin_time);
item.reg_end_time =
this.
formatDate(item.reg_end_time);
item.activity_time =
this.
formatDate(item.activity_time);
item.reg_begin_time = formatDate(item.reg_begin_time);
item.reg_end_time = formatDate(item.reg_end_time);
item.activity_time = formatDate(item.activity_time);
})
this.activity_list = data.activity_list;
this.nickname = data.user.nickname;
...
...
@@ -151,9 +151,6 @@ export default {
}
},
methods: {
formatDate (date) {
return moment(date).format('YYYY-MM-DD HH:mm')
},
// 创建的活动
createActivity () {
if (!this.host_id) {
...
...
src/pages/myCreateActivity/index.vue
View file @
353b436
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-01 16:0
0:09
* @LastEditTime: 2022-11-01 16:0
6:26
* @FilePath: /swx/src/pages/myCreateActivity/index.vue
* @Description: 创建的活动页面
-->
...
...
@@ -118,9 +118,9 @@ import { $ } from '@tarojs/extend'
import mixin from '@/utils/mixin';
import { getCurrentPageParam } from "@/utils/weapp";
import { hostListAPI } from '@/api/Host/index'
import moment from '@/utils/moment.min.js'
import { addListAPI, endActivityAPI, delActivityAPI, copyActivityAPI } from '@/api/Activity/index';
import { hostStore } from '@/stores/host'
import { formatDate } from '@/utils/tools.js'
export default {
name: "myCreateActivityPage",
...
...
@@ -163,7 +163,7 @@ export default {
this.activity_count = data.activity_count ? data.activity_count : 0;
this.volunteer_count = data.volunteer_count ? data.volunteer_count : 0;
this.player_count = data.player_count ? data.player_count : 0;
this.server_time =
this.
formatDate(data.server_time);
this.server_time = formatDate(data.server_time);
this.activity_list.forEach(item => {
item.server_time = this.server_time
});
...
...
@@ -219,9 +219,6 @@ export default {
};
},
methods: {
formatDate (date) {
return moment(date).format('YYYY-MM-DD HH:mm')
},
onScrollToLower () {
if(!this.flag){
return
...
...
src/pages/myFollowUser/index.vue
View file @
353b436
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
0-31 17:15:17
* @LastEditTime: 2022-1
1-01 16:06:39
* @FilePath: /swx/src/pages/myFollowUser/index.vue
* @Description: 陪伴的用户页面
-->
...
...
@@ -122,11 +122,7 @@ import { $ } from '@tarojs/extend'
import mixin from '@/utils/mixin';
import { getCurrentPageParam } from "@/utils/weapp";
import { hostListAPI } from '@/api/Host/index'
import moment from '@/utils/moment.min.js'
const formatDate = (date) => {
return moment(date).format('YYYY-MM-DD HH:mm')
}
import { formatDate } from '@/utils/tools.js'
const onPhoneClick = (number) => {
Taro.makePhoneCall({
...
...
src/pages/userInfo/index.vue
View file @
353b436
<!--
* @Date: 2022-09-29 16:32:03
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
0-31 17:16:24
* @LastEditTime: 2022-1
1-01 16:06:56
* @FilePath: /swx/src/pages/userInfo/index.vue
* @Description: 用户资料
-->
...
...
@@ -119,7 +119,7 @@ import "./index.less";
import { infoMemberAPI } from '@/api/Member/index';
import { getCurrentPageParam } from "@/utils/weapp";
import mixin from '@/utils/mixin';
import
moment from '@/utils/moment.min
.js'
import
{ formatDate } from '@/utils/tools
.js'
export default {
name: "userInfoPage",
...
...
@@ -180,9 +180,6 @@ export default {
},
onPartnerCancel (event) {
this.show_partner_popup = false;
},
formatDate (date) {
return moment(date).format('YYYY-MM-DD HH:mm')
}
}
};
...
...
src/utils/tools.js
View file @
353b436
/*
* @Date: 2022-04-18 15:59:42
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
0-31 17:26:32
* @LastEditTime: 2022-1
1-01 16:01:31
* @FilePath: /swx/src/utils/tools.js
* @Description: 文件描述
*/
...
...
Please
register
or
login
to post a comment