张延森 4 jaren geleden
bovenliggende
commit
c5fde72702

+ 1
- 0
package.json Bestand weergeven

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

+ 11
- 11
project.config.json Bestand weergeven

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

+ 5
- 1
src/components/BannerSwiper/index.vue Bestand weergeven

@@ -4,7 +4,7 @@
4 4
       <block v-for="(item, index) in List" :key="index">
5 5
         <swiper-item>
6 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 8
           </view>
9 9
         </swiper-item>
10 10
       </block>
@@ -28,6 +28,10 @@ export default {
28 28
     }
29 29
   },
30 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 37
 </script>

+ 3
- 3
src/components/GetUserIcon/index.vue Bestand weergeven

@@ -39,9 +39,9 @@ export default {
39 39
               scope: 'scope.userInfo',
40 40
               success () {
41 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 Bestand weergeven

@@ -10,7 +10,7 @@
10 10
 
11 11
         <!-- 列表 -->
12 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 14
             <view class="flex-item">
15 15
               <text>{{item.name}}</text>
16 16
               <text>副标题</text>
@@ -57,19 +57,8 @@ export default {
57 57
     ScrollY
58 58
   },
59 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 64
   methods: {

+ 3
- 14
src/pages/HuiAiXin/StarOwner/index.vue Bestand weergeven

@@ -10,7 +10,7 @@
10 10
 
11 11
         <!-- 列表 -->
12 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 14
             <view class="Img">
15 15
               <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
16 16
             </view>
@@ -51,19 +51,8 @@ export default {
51 51
     ScrollY
52 52
   },
53 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 58
   methods: {

+ 2
- 2
src/pages/HuiAiXin/index.vue Bestand weergeven

@@ -20,7 +20,7 @@
20 20
         <view class="ListContainer" v-if="PageStarList.length">
21 21
           <scroll-view scroll-x="true">
22 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 24
                 <view class="Img">
25 25
                   <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
26 26
                 </view>
@@ -41,7 +41,7 @@
41 41
           <navigator url="./EnergyStory/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
42 42
         </view>
43 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 45
             <view class="flex-item">
46 46
               <text>{{item.name}}</text>
47 47
               <text>副标题</text>

+ 34
- 17
src/pages/HuiQuanYi/OwnersNews/NewsDetail/index.vue Bestand weergeven

@@ -1,39 +1,56 @@
1 1
 <template>
2 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 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 14
   </view>
14 15
 </template>
15 16
 
16 17
 <script>
17
-
18
+import { getCurrentInstance } from "@tarojs/taro"
19
+import { createNamespacedHelpers } from "vuex"
20
+const { mapActions: mapIndexActions } = createNamespacedHelpers("index")
18 21
 export default {
19
-  name: 'ZiXunXiangQing',
20
-  data () {
22
+  name: "ZiXunXiangQing",
23
+  data() {
21 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 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 52
 </script>
36 53
 
37 54
 <style lang="scss">
38
-@import "page.scss";
55
+@import "page.scss"
39 56
 </style>

+ 10
- 0
src/pages/HuiQuanYi/OwnersNews/NewsDetail/page.scss Bestand weergeven

@@ -33,5 +33,15 @@
33 33
     margin-top: 40px;
34 34
     padding: 0 20px;
35 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 Bestand weergeven

@@ -52,19 +52,8 @@ export default {
52 52
     ScrollY
53 53
   },
54 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 59
   methods: {

+ 2
- 13
src/pages/HuiQuanYi/index.vue Bestand weergeven

@@ -59,19 +59,8 @@ export default {
59 59
     BannerSwiper
60 60
   },
61 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 66
   methods: {

+ 2
- 13
src/pages/HuiShengHuo/ActivityList/ActivityDetail/JoinIn/index.vue Bestand weergeven

@@ -52,19 +52,8 @@ export default {
52 52
   },
53 53
   created () {
54 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 59
   methods: {

+ 13
- 14
src/pages/HuiShengHuo/ActivityList/ActivityDetail/index.vue Bestand weergeven

@@ -50,7 +50,7 @@
50 50
 
51 51
     <!-- 底部栏 -->
52 52
     <view class="Bottom flex-h">
53
-      <view class="flex-item">
53
+      <view class="flex-item" @tap="LinkTo('../../index')">
54 54
         <image class="centerLabel" mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/huishenghuo.png"></image>
55 55
       </view>
56 56
       <view class="flex-item">
@@ -89,25 +89,21 @@ export default {
89 89
   },
90 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 99
   created () {
93 100
     wx.showShareMenu({
94 101
       withShareTicket: true,
95 102
       menus: ['shareAppMessage', 'shareTimeline']
96 103
     })
97 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 109
   methods: {
@@ -138,6 +134,9 @@ export default {
138 134
         })
139 135
       })
140 136
     },
137
+    LinkTo (url) {
138
+      wx.switchTab({ url })
139
+    },
141 140
     ToJoin () { // 报名
142 141
       wx.navigateTo({ url: `./JoinIn/index?id=${this.ActivityInfo.activityId}` })
143 142
     },

+ 2
- 13
src/pages/HuiShengHuo/ActivityList/index.vue Bestand weergeven

@@ -77,19 +77,8 @@ export default {
77 77
     ScrollY
78 78
   },
79 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 84
   methods: {

+ 28
- 22
src/pages/HuiShengHuo/PhotoList/index.vue Bestand weergeven

@@ -14,7 +14,9 @@
14 14
             <text>{{item.Month}}</text>
15 15
             <view>
16 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 20
               </view>
19 21
             </view>
20 22
           </view>
@@ -22,6 +24,10 @@
22 24
       </view>
23 25
 
24 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 31
   </view>
26 32
 </template>
27 33
 
@@ -34,6 +40,8 @@ export default {
34 40
   name: 'HuoDongZhaoPianQiang',
35 41
   data () {
36 42
     return {
43
+      ShowBigImg: false,
44
+      BigImgUrl: null,
37 45
       PageList: [],
38 46
       PageData: {
39 47
         pageNum: 1,
@@ -41,13 +49,7 @@ export default {
41 49
       },
42 50
       HasNextPage: true,
43 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 55
   computed: {
@@ -59,19 +61,8 @@ export default {
59 61
     ScrollY
60 62
   },
61 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 68
   methods: {
@@ -94,9 +85,24 @@ export default {
94 85
       this.EmptyPhotoList() // 清空照片墙列表
95 86
       this.ToGetPageList() // 获取列表
96 87
     },
88
+    CheckBigImg (url) { // 查看大图
89
+      this.BigImgUrl = url
90
+      this.ShowBigImg = true
91
+    },
97 92
     ToGetPageList () { // 获取列表
98 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 106
         this.HasNextPage = res.data.data.current < res.data.data.pages
101 107
         this.DataLock = false
102 108
         this.IsRefreshing = false

+ 10
- 0
src/pages/HuiShengHuo/PhotoList/page.scss Bestand weergeven

@@ -2,6 +2,16 @@
2 2
   width: 100%;
3 3
   height: 100%;
4 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 15
   .PhotoList {
6 16
     > .flex-h {
7 17
       padding: 0 20px;

+ 22
- 12
src/pages/HuiShengHuo/index.vue Bestand weergeven

@@ -22,8 +22,8 @@
22 22
             <scroll-view scroll-x="true">
23 23
               <view class="List">
24 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 27
                   </view>
28 28
                 </view>
29 29
               </view>
@@ -59,6 +59,10 @@
59 59
         </view>
60 60
 
61 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 66
     </view>
63 67
   </BasicLayout>
64 68
 </template>
@@ -73,6 +77,8 @@ export default {
73 77
   name: 'HuiShengHuo',
74 78
   data () {
75 79
     return {
80
+      ShowBigImg: false,
81
+      BigImgUrl: null,
76 82
       PageActivityList: [],
77 83
       PagePhotoList: [],
78 84
       RequestNum: 0,
@@ -85,7 +91,7 @@ export default {
85 91
       IndexBanner: x => x.IndexBanner, // 首页banner
86 92
       PhotoList: x => x.PhotoList, // 照片墙列表
87 93
       ActivityList: x => x.ActivityList // 活动列表
88
-    }),
94
+    })
89 95
   },
90 96
   components: {
91 97
     ScrollY,
@@ -121,22 +127,26 @@ export default {
121 127
       this.PageActivityList = []
122 128
       this.PagePhotoList = []
123 129
       this.GetIndexBanner({ queryData: { pageNum: 1, pageSize: 10, position: 'life' } }).then(() => { // 获取首页banner
124
-        this.CheckRequestNum(2) // 判断请求接口个数
130
+        this.CheckRequestNum(3) // 判断请求接口个数
125 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 139
       this.GetActivityList({ queryData: { pageNum: 1, pageSize: 10, typeId: 2 } }).then(() => { // 获取活动列表
134 140
         this.PageActivityList = [...this.ActivityList]
135
-        this.CheckRequestNum(2) // 判断请求接口个数
141
+        this.CheckRequestNum(3) // 判断请求接口个数
136 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 150
     CheckRequestNum (num) { // 判断请求接口个数
141 151
       this.RequestNum += 1
142 152
       if (this.RequestNum >= num) {

+ 11
- 0
src/pages/HuiShengHuo/page.scss Bestand weergeven

@@ -1,6 +1,17 @@
1 1
 .page.HuiShengHuo {
2 2
   width: 100%;
3 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 15
   .Banner {
5 16
     width: 100%;
6 17
     padding-bottom: 38%;

+ 5
- 16
src/pages/WoDe/index.vue Bestand weergeven

@@ -13,7 +13,7 @@
13 13
           <view class="flex-item">
14 14
             <navigator url="../SignIn/index" hover-class="other-navigator-hover" class="SiginIn" v-if="UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null">立即登录</navigator>
15 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 17
           </view>
18 18
         </view>
19 19
       </view>
@@ -28,13 +28,13 @@
28 28
         <text class="flex-item">我的报名</text>
29 29
         <text class="iconfont iconjiantouright"></text>
30 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 32
         <view>
33 33
           <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/wodeicon2.png"></image>
34 34
         </view>
35 35
         <text class="flex-item">意见反馈</text>
36 36
         <text class="iconfont iconjiantouright"></text>
37
-      </navigator>
37
+      </navigator> -->
38 38
     </view>
39 39
 
40 40
     <!-- 授权头像获取弹窗 -->
@@ -62,19 +62,8 @@ export default {
62 62
     GetUserIcon
63 63
   },
64 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 69
   methods: {

+ 17
- 2
src/store/index/index.js Bestand weergeven

@@ -79,6 +79,21 @@ export default {
79 79
     }
80 80
   },
81 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 97
     GetUserActivityList (context, payload) { // 获取我的活动列表
83 98
       return new Promise((resolve, reject) => {
84 99
         ToolClass.WxRequest({
@@ -241,8 +256,8 @@ export default {
241 256
     GetActivityList (context, payload) { // 获取活动列表
242 257
       return new Promise((resolve, reject) => {
243 258
         ToolClass.WxRequest({
244
-          url: Api.GetPhotoList.url,
245
-          method: Api.GetPhotoList.method,
259
+          url: Api.GetActivityList.url,
260
+          method: Api.GetActivityList.method,
246 261
           ...payload,
247 262
           success (res) {
248 263
             context.commit('UpdateActivityList', res.data.data.records)

+ 5
- 1
src/util/Api/index.js Bestand weergeven

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