diff --git a/pages.json b/pages.json index 015babe..c46e177 100644 --- a/pages.json +++ b/pages.json @@ -291,6 +291,14 @@ "onReachBottomDistance": 100 } } + ,{ + "path": "pages/mine/myActivity/info", + "style": { + "navigationBarTitleText": "活动详情", + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } + }, ], "tabBar": { "color": "#000000", diff --git a/pages/activity/index.vue b/pages/activity/index.vue index 78c2fac..3901f28 100644 --- a/pages/activity/index.vue +++ b/pages/activity/index.vue @@ -2,7 +2,7 @@ @@ -55,14 +64,16 @@ import { onShow, onLoad ,onPullDownRefresh} from '@dcloudio/uni-app' import { getDicts } from "@/api/system/dict/data" import { ref, reactive, getCurrentInstance, toRefs } from 'vue' import { useStore } from 'vuex'; -import { func } from "uview-plus/libs/function/test"; +const timeFormat = uni.$u.timeFormat; const { proxy } = getCurrentInstance(); +const newData = ref(new Date().getTime()); const iconConfig = proxy.iconConfig; const tu21 = iconConfig.tu21; const tu22 = iconConfig.tu22; const tu51 = iconConfig.tu51; const tu52 = iconConfig.tu52; const tu53 = iconConfig.tu53; +const show = ref(false) const total = ref() const imgInfo = ref("") const search = ref("电音节节日活动") @@ -87,6 +98,7 @@ const data = reactive({ acTitle: null, acContent: null, startTime: null, + startTime1: null, endTime: null, state: null, addres: null, @@ -127,6 +139,7 @@ function reset() { acTitle: null, acContent: null, startTime: null, + startTime1: null, endTime: null, state: null, addres: null, @@ -159,6 +172,19 @@ function reset() { console.log("下拉刷新,",options); getList(); }) +const queryTime = () => { + show.value = true +} +//日期选择 +const confirm = (e) => { + queryParams.value.startTime1 = timeFormat(e.value, 'yyyy-mm-dd'); + show.value = false + getList() +} +const close = () =>{ + queryParams.value.startTime1=null + show.value = false +} //tabs const tabsClick =(e) =>{ if(e.state == 9){ diff --git a/pages/common/activityList/index.vue b/pages/common/activityList/index.vue index 56d81b2..2ceb6e9 100644 --- a/pages/common/activityList/index.vue +++ b/pages/common/activityList/index.vue @@ -19,10 +19,10 @@ 活动地点:{{ item.addres }} - + - - {{ getDictLabelByValue2(item.attendState).dictLabel }} + + {{ getDictLabelByValue2(item.attendState) }} @@ -70,15 +70,16 @@ const getDictLabelByValue = (state) => { return dict ? dict : '未知状态'; }; const getDictLabelByValue2 = (state) => { + if(state == null)return null; const dict = activityState2.value.find((dict) => dict.dictValue === state); - if(dict.dictValue == 0){ + if( dict== undefined | dict.dictValue == 0){ return null; } if(dict.dictValue == 1 | dict.dictValue == 2){ dict.dictLabel = "已报名" - return dict ? dict : '未知状态'; + return dict ? dict.dictLabel : '未知状态'; } - return dict ? dict : '未知状态'; + return dict ? dict.dictLabel : '未知状态'; }; onLoad((options) => { getDicts('activity_state').then(e => { diff --git a/pages/mine/myActivity/index.vue b/pages/mine/myActivity/index.vue index e86867e..e7246ea 100644 --- a/pages/mine/myActivity/index.vue +++ b/pages/mine/myActivity/index.vue @@ -191,6 +191,10 @@ const scrolltolower = async () => { console.log("没有更多数据了"); } }; +const toInfo = (item) => { + proxy.$tab.navigateTo(`/pages/mine/myActivity/info?id=${item.id}`); +} +//删除分页信息 const removePage = () => { queryParams.pageNum = 1 queryParams.pageNum = 5 diff --git a/pages/mine/myActivity/info.vue b/pages/mine/myActivity/info.vue new file mode 100644 index 0000000..940f76a --- /dev/null +++ b/pages/mine/myActivity/info.vue @@ -0,0 +1,337 @@ + + + + \ No newline at end of file