张延森 4 年之前
父節點
當前提交
c5fde72702

+ 1
- 0
package.json 查看文件

37
     "@babel/runtime": "^7.7.7",
37
     "@babel/runtime": "^7.7.7",
38
     "@tarojs/cli": "^3.0.7",
38
     "@tarojs/cli": "^3.0.7",
39
     "@tarojs/components": "3.0.7",
39
     "@tarojs/components": "3.0.7",
40
+    "@tarojs/mini-runner": "^3.0.7",
40
     "@tarojs/runtime": "3.0.7",
41
     "@tarojs/runtime": "3.0.7",
41
     "@tarojs/taro": "3.0.7",
42
     "@tarojs/taro": "3.0.7",
42
     "qs": "^6.9.4",
43
     "qs": "^6.9.4",

+ 11
- 11
project.config.json 查看文件

5
 	"appid": "wxd9ee3a9480a4e544",
5
 	"appid": "wxd9ee3a9480a4e544",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
+		"scopeDataCheck": false,
9
+		"coverView": true,
8
 		"es6": false,
10
 		"es6": false,
9
-		"enhance": false,
10
 		"postcss": false,
11
 		"postcss": false,
12
+		"compileHotReLoad": false,
11
 		"preloadBackgroundData": false,
13
 		"preloadBackgroundData": false,
12
 		"minified": false,
14
 		"minified": false,
15
+		"autoAudits": false,
13
 		"newFeature": false,
16
 		"newFeature": false,
14
-		"coverView": true,
17
+		"uglifyFileName": false,
18
+		"uploadWithSourceMap": true,
19
+		"useIsolateContext": true,
15
 		"nodeModules": false,
20
 		"nodeModules": false,
16
-		"autoAudits": false,
21
+		"enhance": false,
22
+		"useCompilerModule": false,
23
+		"userConfirmedUseCompilerModuleSwitch": false,
17
 		"showShadowRootInWxmlPanel": true,
24
 		"showShadowRootInWxmlPanel": true,
18
-		"scopeDataCheck": false,
19
-		"uglifyFileName": false,
20
 		"checkInvalidKey": true,
25
 		"checkInvalidKey": true,
21
 		"checkSiteMap": true,
26
 		"checkSiteMap": true,
22
-		"uploadWithSourceMap": true,
23
-		"compileHotReLoad": false,
24
 		"babelSetting": {
27
 		"babelSetting": {
25
 			"ignore": [],
28
 			"ignore": [],
26
 			"disablePlugins": [],
29
 			"disablePlugins": [],
27
 			"outputPath": ""
30
 			"outputPath": ""
28
-		},
29
-		"useIsolateContext": true,
30
-		"useCompilerModule": false,
31
-		"userConfirmedUseCompilerModuleSwitch": false
31
+		}
32
 	},
32
 	},
33
 	"compileType": "miniprogram",
33
 	"compileType": "miniprogram",
34
 	"simulatorType": "wechat",
34
 	"simulatorType": "wechat",

+ 5
- 1
src/components/BannerSwiper/index.vue 查看文件

4
       <block v-for="(item, index) in List" :key="index">
4
       <block v-for="(item, index) in List" :key="index">
5
         <swiper-item>
5
         <swiper-item>
6
           <view class="swiper-item">
6
           <view class="swiper-item">
7
-            <image mode="aspectFill" class="centerLabel" :src="item.image"></image>
7
+            <image mode="aspectFill" class="centerLabel" :src="item.image" @tap="LinkTo(item)"></image>
8
           </view>
8
           </view>
9
         </swiper-item>
9
         </swiper-item>
10
       </block>
10
       </block>
28
     }
28
     }
29
   },
29
   },
30
   methods: {
30
   methods: {
31
+    LinkTo (item) {
32
+      if (item.srcId === null) return
33
+      wx.navigateTo({ url: `../../pages/HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.srcId}`})
34
+    }
31
   }
35
   }
32
 }
36
 }
33
 </script>
37
 </script>

+ 3
- 3
src/components/GetUserIcon/index.vue 查看文件

39
               scope: 'scope.userInfo',
39
               scope: 'scope.userInfo',
40
               success () {
40
               success () {
41
                 wx.getUserInfo({ // 授权成功时,获取用户信息
41
                 wx.getUserInfo({ // 授权成功时,获取用户信息
42
-                  success (res) {
43
-                    _that.EditUserInfo({ name: 'Icon', value: res.userInfo.avatarUrl })
44
-                    _that.EditUserInfo({ name: 'Name', value: res.userInfo.nickName })
42
+                  success (subRes) {
43
+                    _that.EditUserInfo({ name: 'Icon', value: subRes.userInfo.avatarUrl })
44
+                    _that.EditUserInfo({ name: 'Name', value: subRes.userInfo.nickName })
45
                   }
45
                   }
46
                 })
46
                 })
47
               }
47
               }

+ 3
- 14
src/pages/HuiAiXin/EnergyStory/index.vue 查看文件

10
 
10
 
11
         <!-- 列表 -->
11
         <!-- 列表 -->
12
         <view class="List" v-if="PageList.length">
12
         <view class="List" v-if="PageList.length">
13
-          <navigator v-for="(item, index) in PageList" :key="index" :url="`./StarOwnerDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item flex-h">
13
+          <navigator v-for="(item, index) in PageList" :key="index" :url="`../../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item flex-h">
14
             <view class="flex-item">
14
             <view class="flex-item">
15
               <text>{{item.name}}</text>
15
               <text>{{item.name}}</text>
16
               <text>副标题</text>
16
               <text>副标题</text>
57
     ScrollY
57
     ScrollY
58
   },
58
   },
59
   created () {
59
   created () {
60
-    let _that = this
61
-    wx.login({
62
-      success (res) {
63
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
64
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
65
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
66
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
67
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
68
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
69
-          }
70
-          _that.Init()
71
-        })
72
-      }
60
+    this.$authed(() => {
61
+      this.Init()
73
     })
62
     })
74
   },
63
   },
75
   methods: {
64
   methods: {

+ 3
- 14
src/pages/HuiAiXin/StarOwner/index.vue 查看文件

10
 
10
 
11
         <!-- 列表 -->
11
         <!-- 列表 -->
12
         <view class="List" v-if="PageList.length">
12
         <view class="List" v-if="PageList.length">
13
-          <navigator v-for="(item, index) in PageList" :key="index" :url="`./StarOwnerDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
13
+          <navigator v-for="(item, index) in PageList" :key="index" :url="`../../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
14
             <view class="Img">
14
             <view class="Img">
15
               <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
15
               <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
16
             </view>
16
             </view>
51
     ScrollY
51
     ScrollY
52
   },
52
   },
53
   created () {
53
   created () {
54
-    let _that = this
55
-    wx.login({
56
-      success (res) {
57
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
58
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
59
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
60
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
61
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
62
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
63
-          }
64
-          _that.Init()
65
-        })
66
-      }
54
+    this.$authed(() => {
55
+      this.Init()
67
     })
56
     })
68
   },
57
   },
69
   methods: {
58
   methods: {

+ 2
- 2
src/pages/HuiAiXin/index.vue 查看文件

20
         <view class="ListContainer" v-if="PageStarList.length">
20
         <view class="ListContainer" v-if="PageStarList.length">
21
           <scroll-view scroll-x="true">
21
           <scroll-view scroll-x="true">
22
             <view class="List">
22
             <view class="List">
23
-              <navigator v-for="(item, index) in PageStarList" :key="index" :url="`./StarOwner/StarOwnerDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
23
+              <navigator v-for="(item, index) in PageStarList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
24
                 <view class="Img">
24
                 <view class="Img">
25
                   <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
25
                   <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
26
                 </view>
26
                 </view>
41
           <navigator url="./EnergyStory/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
41
           <navigator url="./EnergyStory/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
42
         </view>
42
         </view>
43
         <view class="List" v-if="PageStoryList.length">
43
         <view class="List" v-if="PageStoryList.length">
44
-          <navigator v-for="(item, index) in PageStoryList" :key="index" url="./EnergyStory/EnergyStoryDetail/index" hover-class="other-navigator-hover" class="Item flex-h">
44
+          <navigator v-for="(item, index) in PageStoryList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item flex-h">
45
             <view class="flex-item">
45
             <view class="flex-item">
46
               <text>{{item.name}}</text>
46
               <text>{{item.name}}</text>
47
               <text>副标题</text>
47
               <text>副标题</text>

+ 34
- 17
src/pages/HuiQuanYi/OwnersNews/NewsDetail/index.vue 查看文件

1
 <template>
1
 <template>
2
   <view class="page ZiXunXiangQing">
2
   <view class="page ZiXunXiangQing">
3
-    
4
     <!-- 标题 -->
3
     <!-- 标题 -->
5
-    <view class="MainTitle">
6
-      <text>标题</text>
7
-      <text class="iconfont iconguanbi"></text>
4
+    <view class="MainTitle" v-if="Info !== null">
5
+      <text>{{Info.title}}</text>
6
+      <text class="iconfont iconguanbi" @tap="GoBack"></text>
8
     </view>
7
     </view>
9
 
8
 
10
     <!-- 内容 -->
9
     <!-- 内容 -->
11
-    <view class="Container"></view>
12
-    
10
+    <view class="Container" v-if="Info !== null">
11
+      <image mode="widthFix" class="Img" :src="Info.thumb"></image>
12
+      <text>{{Info.content}}</text>
13
+    </view>
13
   </view>
14
   </view>
14
 </template>
15
 </template>
15
 
16
 
16
 <script>
17
 <script>
17
-
18
+import { getCurrentInstance } from "@tarojs/taro"
19
+import { createNamespacedHelpers } from "vuex"
20
+const { mapActions: mapIndexActions } = createNamespacedHelpers("index")
18
 export default {
21
 export default {
19
-  name: 'ZiXunXiangQing',
20
-  data () {
22
+  name: "ZiXunXiangQing",
23
+  data() {
21
     return {
24
     return {
22
-
25
+      CurrnetId: null,
26
+      Info: null
23
     }
27
     }
24
   },
28
   },
25
-  components: {
26
-  },
27
-  created () {
28
-    this.Init()
29
+  components: {},
30
+  created() {
31
+    this.CurrnetId = getCurrentInstance().router.params.id
32
+    this.$authed(() => {
33
+      this.Init()
34
+    })
29
   },
35
   },
30
   methods: {
36
   methods: {
31
-    Init () {
37
+    ...mapIndexActions([
38
+      "GetNewsDetail", // 获取资讯详情
39
+    ]),
40
+    Init() {
41
+      this.GetNewsDetail({
42
+        urlData: { id: this.CurrnetId }
43
+      }).then((res) => {
44
+        this.Info = res.data.data || null
45
+      })
46
+    },
47
+    GoBack () {
48
+      wx.navigateBack()
32
     }
49
     }
33
-  }
50
+  },
34
 }
51
 }
35
 </script>
52
 </script>
36
 
53
 
37
 <style lang="scss">
54
 <style lang="scss">
38
-@import "page.scss";
55
+@import "page.scss"
39
 </style>
56
 </style>

+ 10
- 0
src/pages/HuiQuanYi/OwnersNews/NewsDetail/page.scss 查看文件

33
     margin-top: 40px;
33
     margin-top: 40px;
34
     padding: 0 20px;
34
     padding: 0 20px;
35
     padding-bottom: 40px;
35
     padding-bottom: 40px;
36
+    > image {
37
+      width: 100%;
38
+    }
39
+    > text {
40
+      display: block;
41
+      font-size: 28px;
42
+      line-break: 40px;
43
+      color: #666;
44
+      margin-top: 20px;
45
+    }
36
   }
46
   }
37
 }
47
 }

+ 2
- 13
src/pages/HuiQuanYi/OwnersNews/index.vue 查看文件

52
     ScrollY
52
     ScrollY
53
   },
53
   },
54
   created () {
54
   created () {
55
-    let _that = this
56
-    wx.login({
57
-      success (res) {
58
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
59
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
60
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
61
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
62
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
63
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
64
-          }
65
-          _that.Init()
66
-        })
67
-      }
55
+    this.$authed(() => {
56
+      this.Init()
68
     })
57
     })
69
   },
58
   },
70
   methods: {
59
   methods: {

+ 2
- 13
src/pages/HuiQuanYi/index.vue 查看文件

59
     BannerSwiper
59
     BannerSwiper
60
   },
60
   },
61
   created () {
61
   created () {
62
-    let _that = this
63
-    wx.login({
64
-      success (res) {
65
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
66
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
67
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
68
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
69
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
70
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
71
-          }
72
-          _that.Init()
73
-        })
74
-      }
62
+    this.$authed(() => {
63
+      this.Init()
75
     })
64
     })
76
   },
65
   },
77
   methods: {
66
   methods: {

+ 2
- 13
src/pages/HuiShengHuo/ActivityList/ActivityDetail/JoinIn/index.vue 查看文件

52
   },
52
   },
53
   created () {
53
   created () {
54
     this.CurrnetId = getCurrentInstance().router.params.id
54
     this.CurrnetId = getCurrentInstance().router.params.id
55
-    let _that = this
56
-    wx.login({
57
-      success (res) {
58
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
59
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
60
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
61
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
62
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
63
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
64
-          }
65
-          _that.Init()
66
-        })
67
-      }
55
+    this.$authed(() => {
56
+      this.Init()
68
     })
57
     })
69
   },
58
   },
70
   methods: {
59
   methods: {

+ 13
- 14
src/pages/HuiShengHuo/ActivityList/ActivityDetail/index.vue 查看文件

50
 
50
 
51
     <!-- 底部栏 -->
51
     <!-- 底部栏 -->
52
     <view class="Bottom flex-h">
52
     <view class="Bottom flex-h">
53
-      <view class="flex-item">
53
+      <view class="flex-item" @tap="LinkTo('../../index')">
54
         <image class="centerLabel" mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/huishenghuo.png"></image>
54
         <image class="centerLabel" mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/huishenghuo.png"></image>
55
       </view>
55
       </view>
56
       <view class="flex-item">
56
       <view class="flex-item">
89
   },
89
   },
90
   components: {
90
   components: {
91
   },
91
   },
92
+  onShareAppMessage () {
93
+    return {
94
+      title: this.ActivityInfo.shareTitle,
95
+      path: `/pages/HuiShengHuo/ActivityList/ActivityDetail/index?id=${this.ActivityInfo.activityId}`,
96
+      imageUrl: this.ActivityInfo.shareImg
97
+    }
98
+  },
92
   created () {
99
   created () {
93
     wx.showShareMenu({
100
     wx.showShareMenu({
94
       withShareTicket: true,
101
       withShareTicket: true,
95
       menus: ['shareAppMessage', 'shareTimeline']
102
       menus: ['shareAppMessage', 'shareTimeline']
96
     })
103
     })
97
     this.CurrnetId = getCurrentInstance().router.params.id
104
     this.CurrnetId = getCurrentInstance().router.params.id
98
-    let _that = this
99
-    wx.login({
100
-      success (res) {
101
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
102
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
103
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
104
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
105
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
106
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
107
-          }
108
-          _that.Init()
109
-        })
110
-      }
105
+    this.$authed(() => {
106
+      this.Init()
111
     })
107
     })
112
   },
108
   },
113
   methods: {
109
   methods: {
138
         })
134
         })
139
       })
135
       })
140
     },
136
     },
137
+    LinkTo (url) {
138
+      wx.switchTab({ url })
139
+    },
141
     ToJoin () { // 报名
140
     ToJoin () { // 报名
142
       wx.navigateTo({ url: `./JoinIn/index?id=${this.ActivityInfo.activityId}` })
141
       wx.navigateTo({ url: `./JoinIn/index?id=${this.ActivityInfo.activityId}` })
143
     },
142
     },

+ 2
- 13
src/pages/HuiShengHuo/ActivityList/index.vue 查看文件

77
     ScrollY
77
     ScrollY
78
   },
78
   },
79
   created () {
79
   created () {
80
-    let _that = this
81
-    wx.login({
82
-      success (res) {
83
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
84
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
85
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
86
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
87
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
88
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
89
-          }
90
-          _that.Init()
91
-        })
92
-      }
80
+    this.$authed(() => {
81
+      this.Init()
93
     })
82
     })
94
   },
83
   },
95
   methods: {
84
   methods: {

+ 28
- 22
src/pages/HuiShengHuo/PhotoList/index.vue 查看文件

14
             <text>{{item.Month}}</text>
14
             <text>{{item.Month}}</text>
15
             <view>
15
             <view>
16
               <view v-for="(subItem, subIndex) in item.List" :key="subIndex">
16
               <view v-for="(subItem, subIndex) in item.List" :key="subIndex">
17
-                <navigator url="./PhotoDetail/index" hover-class="other-navigator-hover" class="Img"></navigator>
17
+                <view class="Img" @tap="CheckBigImg(subItem.imgUrl)">
18
+                  <image mode="aspectFill" class="centerLabel" :src="subItem.imgUrl"></image>
19
+                </view>
18
               </view>
20
               </view>
19
             </view>
21
             </view>
20
           </view>
22
           </view>
22
       </view>
24
       </view>
23
 
25
 
24
     </ScrollY>
26
     </ScrollY>
27
+
28
+    <view class="BigImg" v-if="ShowBigImg" @tap="ShowBigImg = false">
29
+      <image mode="aspectFit" class="centerLabel" :src="BigImgUrl"></image>
30
+    </view>
25
   </view>
31
   </view>
26
 </template>
32
 </template>
27
 
33
 
34
   name: 'HuoDongZhaoPianQiang',
40
   name: 'HuoDongZhaoPianQiang',
35
   data () {
41
   data () {
36
     return {
42
     return {
43
+      ShowBigImg: false,
44
+      BigImgUrl: null,
37
       PageList: [],
45
       PageList: [],
38
       PageData: {
46
       PageData: {
39
         pageNum: 1,
47
         pageNum: 1,
41
       },
49
       },
42
       HasNextPage: true,
50
       HasNextPage: true,
43
       IsRefreshing: false,
51
       IsRefreshing: false,
44
-      DataLock: false,
45
-      List: [
46
-        { Month: '8月份', List: ['', '', '', '', '', '', '', '', '', ''] },
47
-        { Month: '7月份', List: ['', '', '', '', '', '', '', '', '', ''] },
48
-        { Month: '6月份', List: ['', '', '', '', '', '', '', '', '', ''] },
49
-        { Month: '5月份', List: ['', '', '', '', '', '', '', '', '', ''] }
50
-      ]
52
+      DataLock: false
51
     }
53
     }
52
   },
54
   },
53
   computed: {
55
   computed: {
59
     ScrollY
61
     ScrollY
60
   },
62
   },
61
   created () {
63
   created () {
62
-    let _that = this
63
-    wx.login({
64
-      success (res) {
65
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
66
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
67
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
68
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
69
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
70
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
71
-          }
72
-          _that.Init()
73
-        })
74
-      }
64
+    this.$authed(() => {
65
+      this.Init()
75
     })
66
     })
76
   },
67
   },
77
   methods: {
68
   methods: {
94
       this.EmptyPhotoList() // 清空照片墙列表
85
       this.EmptyPhotoList() // 清空照片墙列表
95
       this.ToGetPageList() // 获取列表
86
       this.ToGetPageList() // 获取列表
96
     },
87
     },
88
+    CheckBigImg (url) { // 查看大图
89
+      this.BigImgUrl = url
90
+      this.ShowBigImg = true
91
+    },
97
     ToGetPageList () { // 获取列表
92
     ToGetPageList () { // 获取列表
98
       this.GetPhotoList({ queryData: { ...this.PageData } }).then((res) => { // 获取照片墙列表
93
       this.GetPhotoList({ queryData: { ...this.PageData } }).then((res) => { // 获取照片墙列表
99
-        this.PageList = [...this.PhotoList]
94
+        let Arr = []
95
+        this.PhotoList.map((item) => {
96
+          let Year = new Date(item.createDate).getFullYear()
97
+          let Month = new Date(item.createDate).getMonth() + 1
98
+          Month = Month > 9 ? Month : `0${Month}`
99
+          if (Arr.length && `${Year}-${Month}` === Arr[Arr.length - 1].Month) {
100
+            Arr[Arr.length - 1].List.push({ ...item })
101
+          } else {
102
+            Arr.push({ Month: `${Year}-${Month}`, List: [{ ...item} ] })
103
+          }
104
+        })
105
+        this.PageList = Arr
100
         this.HasNextPage = res.data.data.current < res.data.data.pages
106
         this.HasNextPage = res.data.data.current < res.data.data.pages
101
         this.DataLock = false
107
         this.DataLock = false
102
         this.IsRefreshing = false
108
         this.IsRefreshing = false

+ 10
- 0
src/pages/HuiShengHuo/PhotoList/page.scss 查看文件

2
   width: 100%;
2
   width: 100%;
3
   height: 100%;
3
   height: 100%;
4
   background: #fff;
4
   background: #fff;
5
+  >.BigImg {
6
+    width: 100%;
7
+    position: absolute;
8
+    left: 0;
9
+    top: 0;
10
+    bottom: 0;
11
+    z-index: 100;
12
+    background: rgba(0, 0, 0, 0.7);
13
+    overflow: hidden;
14
+  }
5
   .PhotoList {
15
   .PhotoList {
6
     > .flex-h {
16
     > .flex-h {
7
       padding: 0 20px;
17
       padding: 0 20px;

+ 22
- 12
src/pages/HuiShengHuo/index.vue 查看文件

22
             <scroll-view scroll-x="true">
22
             <scroll-view scroll-x="true">
23
               <view class="List">
23
               <view class="List">
24
                 <view v-for="(item, index) in PhotoList" :key="index">
24
                 <view v-for="(item, index) in PhotoList" :key="index">
25
-                  <view>
26
-                    <image mode="aspectFill" class="centerLabel" :src="ToolClass.DemoImg()"></image>
25
+                  <view @tap="CheckBigImg(item.imgUrl)">
26
+                    <image mode="aspectFill" class="centerLabel" :src="item.imgUrl"></image>
27
                   </view>
27
                   </view>
28
                 </view>
28
                 </view>
29
               </view>
29
               </view>
59
         </view>
59
         </view>
60
 
60
 
61
       </ScrollY>
61
       </ScrollY>
62
+
63
+      <view class="BigImg" v-if="ShowBigImg" @tap="ShowBigImg = false">
64
+        <image mode="aspectFit" class="centerLabel" :src="BigImgUrl"></image>
65
+      </view>
62
     </view>
66
     </view>
63
   </BasicLayout>
67
   </BasicLayout>
64
 </template>
68
 </template>
73
   name: 'HuiShengHuo',
77
   name: 'HuiShengHuo',
74
   data () {
78
   data () {
75
     return {
79
     return {
80
+      ShowBigImg: false,
81
+      BigImgUrl: null,
76
       PageActivityList: [],
82
       PageActivityList: [],
77
       PagePhotoList: [],
83
       PagePhotoList: [],
78
       RequestNum: 0,
84
       RequestNum: 0,
85
       IndexBanner: x => x.IndexBanner, // 首页banner
91
       IndexBanner: x => x.IndexBanner, // 首页banner
86
       PhotoList: x => x.PhotoList, // 照片墙列表
92
       PhotoList: x => x.PhotoList, // 照片墙列表
87
       ActivityList: x => x.ActivityList // 活动列表
93
       ActivityList: x => x.ActivityList // 活动列表
88
-    }),
94
+    })
89
   },
95
   },
90
   components: {
96
   components: {
91
     ScrollY,
97
     ScrollY,
121
       this.PageActivityList = []
127
       this.PageActivityList = []
122
       this.PagePhotoList = []
128
       this.PagePhotoList = []
123
       this.GetIndexBanner({ queryData: { pageNum: 1, pageSize: 10, position: 'life' } }).then(() => { // 获取首页banner
129
       this.GetIndexBanner({ queryData: { pageNum: 1, pageSize: 10, position: 'life' } }).then(() => { // 获取首页banner
124
-        this.CheckRequestNum(2) // 判断请求接口个数
130
+        this.CheckRequestNum(3) // 判断请求接口个数
125
       }).catch(() => {
131
       }).catch(() => {
126
-        this.CheckRequestNum(2) // 判断请求接口个数
132
+        this.CheckRequestNum(3) // 判断请求接口个数
133
+      })
134
+      this.GetPhotoList({ queryData: { pageNum: 1, pageSize: 10 } }).then(() => { // 获取照片墙列表
135
+        this.CheckRequestNum(3) // 判断请求接口个数
136
+      }).catch(() => {
137
+        this.CheckRequestNum(3) // 判断请求接口个数
127
       })
138
       })
128
-      // this.GetPhotoList({ queryData: { pageNum: 1, pageSize: 10, typeId: 2 } }).then(() => { // 获取照片墙列表
129
-      //   this.CheckRequestNum(2) // 判断请求接口个数
130
-      // }).catch(() => {
131
-      //   this.CheckRequestNum(2) // 判断请求接口个数
132
-      // })
133
       this.GetActivityList({ queryData: { pageNum: 1, pageSize: 10, typeId: 2 } }).then(() => { // 获取活动列表
139
       this.GetActivityList({ queryData: { pageNum: 1, pageSize: 10, typeId: 2 } }).then(() => { // 获取活动列表
134
         this.PageActivityList = [...this.ActivityList]
140
         this.PageActivityList = [...this.ActivityList]
135
-        this.CheckRequestNum(2) // 判断请求接口个数
141
+        this.CheckRequestNum(3) // 判断请求接口个数
136
       }).catch(() => {
142
       }).catch(() => {
137
-        this.CheckRequestNum(2) // 判断请求接口个数
143
+        this.CheckRequestNum(3) // 判断请求接口个数
138
       })
144
       })
139
     },
145
     },
146
+    CheckBigImg (url) { // 查看大图
147
+      this.BigImgUrl = url
148
+      this.ShowBigImg = true
149
+    },
140
     CheckRequestNum (num) { // 判断请求接口个数
150
     CheckRequestNum (num) { // 判断请求接口个数
141
       this.RequestNum += 1
151
       this.RequestNum += 1
142
       if (this.RequestNum >= num) {
152
       if (this.RequestNum >= num) {

+ 11
- 0
src/pages/HuiShengHuo/page.scss 查看文件

1
 .page.HuiShengHuo {
1
 .page.HuiShengHuo {
2
   width: 100%;
2
   width: 100%;
3
   height: 100%;
3
   height: 100%;
4
+  position: relative;
5
+  >.BigImg {
6
+    width: 100%;
7
+    position: absolute;
8
+    left: 0;
9
+    top: 0;
10
+    bottom: 0;
11
+    z-index: 100;
12
+    background: rgba(0, 0, 0, 0.7);
13
+    overflow: hidden;
14
+  }
4
   .Banner {
15
   .Banner {
5
     width: 100%;
16
     width: 100%;
6
     padding-bottom: 38%;
17
     padding-bottom: 38%;

+ 5
- 16
src/pages/WoDe/index.vue 查看文件

13
           <view class="flex-item">
13
           <view class="flex-item">
14
             <navigator url="../SignIn/index" hover-class="other-navigator-hover" class="SiginIn" v-if="UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null">立即登录</navigator>
14
             <navigator url="../SignIn/index" hover-class="other-navigator-hover" class="SiginIn" v-if="UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null">立即登录</navigator>
15
             <text v-else>{{UserInfo.Name}}</text>
15
             <text v-else>{{UserInfo.Name}}</text>
16
-            <text v-else>{{UserInfo.Phone}}</text>
16
+            <text  v-if="!(UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null)">{{UserInfo.Phone}}</text>
17
           </view>
17
           </view>
18
         </view>
18
         </view>
19
       </view>
19
       </view>
28
         <text class="flex-item">我的报名</text>
28
         <text class="flex-item">我的报名</text>
29
         <text class="iconfont iconjiantouright"></text>
29
         <text class="iconfont iconjiantouright"></text>
30
       </navigator>
30
       </navigator>
31
-      <navigator url="./Feedback/index" hover-class="other-navigator-hover" class="flex-h">
31
+      <!-- <navigator url="./Feedback/index" hover-class="other-navigator-hover" class="flex-h">
32
         <view>
32
         <view>
33
           <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/wodeicon2.png"></image>
33
           <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/wodeicon2.png"></image>
34
         </view>
34
         </view>
35
         <text class="flex-item">意见反馈</text>
35
         <text class="flex-item">意见反馈</text>
36
         <text class="iconfont iconjiantouright"></text>
36
         <text class="iconfont iconjiantouright"></text>
37
-      </navigator>
37
+      </navigator> -->
38
     </view>
38
     </view>
39
 
39
 
40
     <!-- 授权头像获取弹窗 -->
40
     <!-- 授权头像获取弹窗 -->
62
     GetUserIcon
62
     GetUserIcon
63
   },
63
   },
64
   created () {
64
   created () {
65
-    let _that = this
66
-    wx.login({
67
-      success (res) {
68
-        _that.MainSignIn({ queryData: { code: res.code } }).then((res) => { // 获取用户信息
69
-          _that.EditUserInfo({ name: 'PersonId', value: res.data.data.person.personId })
70
-          _that.EditUserInfo({ name: 'OpenId', value: res.data.data.person.openId })
71
-          _that.EditUserInfo({ name: 'SessionKey', value: res.data.data.extraInfo.sessionKey })
72
-          if (res.data.data.person.phone !== undefined && res.data.data.person.phone !== null) {
73
-            _that.EditUserInfo({ name: 'Phone', value: res.data.data.person.phone })
74
-          }
75
-          _that.Init()
76
-        })
77
-      }
65
+    this.$authed(() => {
66
+      this.Init()
78
     })
67
     })
79
   },
68
   },
80
   methods: {
69
   methods: {

+ 17
- 2
src/store/index/index.js 查看文件

79
     }
79
     }
80
   },
80
   },
81
   actions: {
81
   actions: {
82
+    GetNewsDetail (context, payload) { // 获取资讯详情
83
+      return new Promise((resolve, reject) => {
84
+        ToolClass.WxRequest({
85
+          url: Api.GetNewsDetail.url,
86
+          method: Api.GetNewsDetail.method,
87
+          ...payload,
88
+          success (res) {
89
+            resolve(res)
90
+          },
91
+          error (res) {
92
+            reject(res)
93
+          }
94
+        })
95
+      })
96
+    },
82
     GetUserActivityList (context, payload) { // 获取我的活动列表
97
     GetUserActivityList (context, payload) { // 获取我的活动列表
83
       return new Promise((resolve, reject) => {
98
       return new Promise((resolve, reject) => {
84
         ToolClass.WxRequest({
99
         ToolClass.WxRequest({
241
     GetActivityList (context, payload) { // 获取活动列表
256
     GetActivityList (context, payload) { // 获取活动列表
242
       return new Promise((resolve, reject) => {
257
       return new Promise((resolve, reject) => {
243
         ToolClass.WxRequest({
258
         ToolClass.WxRequest({
244
-          url: Api.GetPhotoList.url,
245
-          method: Api.GetPhotoList.method,
259
+          url: Api.GetActivityList.url,
260
+          method: Api.GetActivityList.method,
246
           ...payload,
261
           ...payload,
247
           success (res) {
262
           success (res) {
248
             context.commit('UpdateActivityList', res.data.data.records)
263
             context.commit('UpdateActivityList', res.data.data.records)

+ 5
- 1
src/util/Api/index.js 查看文件

2
 const prefix = process.env.NODE_ENV === 'production' ? '' : ''
2
 const prefix = process.env.NODE_ENV === 'production' ? '' : ''
3
 
3
 
4
 const Api = {
4
 const Api = {
5
+  GetNewsDetail: { // 获取资讯详情
6
+    method: 'get',
7
+    url: `${prefix}/news/:id`
8
+  },
5
   PostActivityJoin: { // 活动报名
9
   PostActivityJoin: { // 活动报名
6
     method: 'post',
10
     method: 'post',
7
     url: `${prefix}/activity/:id/enroll`
11
     url: `${prefix}/activity/:id/enroll`
24
   },
28
   },
25
   GetPhotoList: { // 获取照片墙列表
29
   GetPhotoList: { // 获取照片墙列表
26
     method: 'get',
30
     method: 'get',
27
-    url: `${prefix}/activity`
31
+    url: `${prefix}/gallery`
28
   },
32
   },
29
   GetActivityList: { // 获取活动列表
33
   GetActivityList: { // 获取活动列表
30
     method: 'get',
34
     method: 'get',