yuantianjiao 6 年前
父节点
当前提交
cf23867d16

+ 1
- 1
package.json 查看文件

@@ -35,7 +35,7 @@
35 35
       "eslint:recommended"
36 36
     ],
37 37
     "rules": {
38
-      "no-console": 1
38
+      "no-console": "off"
39 39
     },
40 40
     "parserOptions": {
41 41
       "parser": "babel-eslint"

+ 2
- 1
public/index.html 查看文件

@@ -5,7 +5,8 @@
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
-    <title>hello-world</title>
8
+    <link rel="stylesheet" href="//at.alicdn.com/t/font_957047_8k5bffh7y09.css">
9
+    <title>助力砍价活动</title>
9 10
   </head>
10 11
   <body>
11 12
     <noscript>

+ 23
- 5
src/App.vue 查看文件

@@ -4,12 +4,30 @@
4 4
   </div>
5 5
 </template>
6 6
 
7
+<script>
8
+import { createNamespacedHelpers } from 'vuex'
9
+const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('main')
10
+export default {
11
+  data () {
12
+    return {}
13
+  },
14
+  computed:{
15
+    ...mapIndexState({
16
+      userInfo: item => item.userInfo
17
+    })
18
+  },
19
+  methods:{
20
+    ...mapIndexActions(['setUserInfo'])
21
+  }
22
+}
23
+</script>
24
+
25
+
7 26
 <style lang="scss">
27
+@import "./assets/reset.css";
8 28
 #app {
9
-  font-family: "Avenir", Helvetica, Arial, sans-serif;
10
-  -webkit-font-smoothing: antialiased;
11
-  -moz-osx-font-smoothing: grayscale;
12
-  text-align: center;
13
-  color: #2c3e50;
29
+  width: 100%;
30
+  height: 100%;
31
+  position: relative;
14 32
 }
15 33
 </style>

二进制
src/assets/btn.png 查看文件


二进制
src/assets/kulian.png 查看文件


二进制
src/assets/paihang.png 查看文件


二进制
src/assets/pop-bg.png 查看文件


二进制
src/assets/presentClose.png 查看文件


二进制
src/assets/presentOpen.png 查看文件


+ 14
- 3
src/assets/reset.css 查看文件

@@ -3,7 +3,7 @@ html,body{width:100%;height:100%;-webkit-text-size-adjust:100%;position:relative
3 3
 @media screen and (max-width:320px){html,body{font-size:85px;}}
4 4
 @media screen and (min-width:375px){html,body{font-size:100px;}}
5 5
 @media screen and (min-width:414px){html,body{font-size:110px;}}
6
-*{margin:0;padding:0;color:#000;font-family:"微软雅黑";-webkit-tap-highlight-color:rgba(255,0,0,0);-webkit-font-smoothing:antialiased;}
6
+*{margin:0;padding:0;color:#000;font-family:"微软雅黑";-webkit-tap-highlight-color:rgba(255,0,0,0);-webkit-font-smoothing:antialiased;box-sizing: border-box;}
7 7
 body *{font-size:.13rem;}
8 8
 a{text-decoration:none;}
9 9
 a:hover{cursor:pointer;}
@@ -30,7 +30,7 @@ input[type=checkbox]{-webkit-appearance:checkbox;}
30 30
 .overflow-scroll-y-3d,.overflow-scroll-x-3d{transform:translateZ(0);-webkit-transform:translateZ(0);}
31 31
 .overflow-scroll-x::-webkit-scrollbar,.overflow-scroll-x-3d::-webkit-scrollbar{width:0;height:0;color:transparent;display:none;}
32 32
 input:focus,textarea:focus,select:focus {
33
-    outline:none;
33
+  outline:none;
34 34
 }
35 35
 textarea{
36 36
 	resize: none;
@@ -41,7 +41,7 @@ select{
41 41
 }
42 42
 
43 43
 select option {
44
-    direction: ltr;
44
+  direction: ltr;
45 45
 }
46 46
 
47 47
 *>img.cover{
@@ -61,6 +61,17 @@ select option {
61 61
 	height: 100%;
62 62
 	position: relative;
63 63
 	background: #fff;
64
+	overflow-y: scroll;
65
+  -webkit-overflow-scrolling: touch;
66
+  transform: translateZ(0);
67
+  -webkit-transform: translateZ(0);
68
+  background: #fff;
69
+}
70
+
71
+.pageContent{
72
+	width: 100%;
73
+	height: 100%;
74
+	position: relative;
64 75
 }
65 76
 
66 77
 .van-toast div{

二进制
src/assets/topImg.jpg 查看文件


+ 6
- 1
src/router.js 查看文件

@@ -11,7 +11,12 @@ export default new Router({
11 11
       // route level code-splitting
12 12
       // this generates a separate chunk (about.[hash].js) for this route
13 13
       // which is lazy-loaded when the route is visited.
14
-      component: () => import(/* webpackChunkName: "about" */ './views/supportMain/supportMain.vue')
14
+      component: () => import(/* webpackChunkName: "supportMain" */ './views/supportMain/supportMain.vue')
15
+    },
16
+    {
17
+      path: '/supportDetail',
18
+      name: 'supportDetail',
19
+      component: () => import(/* webpackChunkName: "supportDetail" */ './views/supportDetail/supportDetail.vue')
15 20
     }
16 21
   ]
17 22
 })

+ 1
- 7
src/store/index.js 查看文件

@@ -10,13 +10,7 @@ const store = new Vuex.Store({
10 10
   }
11 11
 })
12 12
 export const modules = {
13
-  login: () => require('./login').default,
14
-  main: () => require('./main').default,
15
-  menuConfig: () => require('./menuConfig').default,
16
-  material: () => require('./material').default,
17
-  management: () => require('./management').default,
18
-  user: () => require('./user').default,
19
-  reply: () => require('./reply').default,
13
+  login: () => require('./main').default,
20 14
 }
21 15
 
22 16
 Object.keys(modules).forEach((modKey) => {

+ 0
- 54
src/store/login.js 查看文件

@@ -1,54 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-
4
-export default {
5
-  namespaced: true,
6
-  state: {
7
-    remember: null,
8
-    userName: '',
9
-    passWord: ''
10
-  },
11
-  mutations: {
12
-    updateRemember (state, data) {
13
-      state.remember = data
14
-    },
15
-    updateUserName (state, data) {
16
-      state.userName = data
17
-    },
18
-    updatePassWord (state, data) {
19
-      state.passWord = data
20
-    }
21
-  },
22
-  actions: {
23
-    login (context, data) {
24
-      console.log(context)
25
-      return new Promise((resolve, reject) => {
26
-        ajax({
27
-          ...api.common.login,
28
-          data: {
29
-            ...data,
30
-          }
31
-        }).then(() => {
32
-          resolve()
33
-        }).catch(reject)
34
-      })
35
-    },
36
-    setRemember ({ commit }, data) {
37
-      localStorage.setItem('remember', data)
38
-      if (data === 'true') {
39
-        data = true
40
-      } else if (data === 'false') {
41
-        data = false
42
-      }
43
-      commit('updateRemember', data)
44
-    },
45
-    setUserName ({ commit }, data) {
46
-      localStorage.setItem('userName', data)
47
-      commit('updateUserName', data)
48
-    },
49
-    setPassWord ({ commit }, data) {
50
-      localStorage.setItem('passWord', data)
51
-      commit('updatePassWord', data)
52
-    },
53
-  }
54
-}

+ 1
- 76
src/store/main.js 查看文件

@@ -4,23 +4,11 @@ import api from '../util/api'
4 4
 export default {
5 5
   namespaced: true,
6 6
   state: {
7
-    menuData: [],
8
-    userInfo: {},
9
-    isBind: false,
10
-    meta: null
7
+    userInfo: {}
11 8
   },
12 9
   mutations: {
13 10
     updateMenu (state, data) {
14 11
       state.menuData = data || []
15
-    },
16
-    updateUserInfo (state, data) {
17
-      state.userInfo = data || {}
18
-    },
19
-    updateIsBind (state, data) {
20
-      state.isBind = data
21
-    },
22
-    updateMeta (state, data) {
23
-      state.meta = data
24 12
     }
25 13
   },
26 14
   actions: {
@@ -36,69 +24,6 @@ export default {
36 24
           resolve()
37 25
         }).catch(reject)
38 26
       })
39
-    },
40
-    logOut (context) {
41
-      context
42
-      return new Promise((resolve, reject) => {
43
-        ajax({
44
-          ...api.common.logOut
45
-        }).then(() => {
46
-          resolve()
47
-        }).catch(reject)
48
-      })
49
-    },
50
-    getMainMenu (context, data) {
51
-      return new Promise((resolve, reject) => {
52
-        ajax({
53
-          ...api.common.menu,
54
-          data: {
55
-            ...data,
56
-          }
57
-        }).then((res) => {
58
-          context.commit('updateMenu', res)
59
-          resolve()
60
-        }).catch(reject)
61
-      })
62
-    },
63
-    clearMenu (context) {
64
-      context.commit('updateMenu', '')
65
-    },
66
-    getUserInfo (context) {
67
-      return new Promise((resolve, reject) => {
68
-        ajax({
69
-          ...api.user.getUserInfo
70
-        }).then((res) => {
71
-          context.commit('updateUserInfo', res)
72
-          resolve()
73
-        }).catch(reject)
74
-      })
75
-    },
76
-    changePassWord (context, data) {
77
-      context
78
-      return new Promise((resolve, reject) => {
79
-        ajax({
80
-          ...api.user.changePassWord,
81
-          data: {
82
-            ...data
83
-          }
84
-        }).then(() => {
85
-          resolve()
86
-        }).catch(reject)
87
-      })
88
-    },
89
-    checkBind (context) {
90
-      return new Promise((resolve, reject) => {
91
-        ajax({
92
-          ...api.common.checkBind
93
-        }).then((res) => {
94
-          context.commit('updateIsBind', res)
95
-          resolve()
96
-        }).catch(reject)
97
-      })
98
-    },
99
-    setMeta (context, data) {
100
-      context.commit('updateMeta', data)
101
-
102 27
     }
103 28
   }
104 29
 }

+ 0
- 109
src/store/management.js 查看文件

@@ -1,109 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-
4
-export default {
5
-  namespaced: true,
6
-  state: {
7
-    managementList: [],
8
-    current: 1,
9
-    total: 0,
10
-    authData: {},
11
-    wechatConfig: {}
12
-  },
13
-  mutations: {
14
-    updateManagementList (state, data) {
15
-      state.managementList = data.list || []
16
-      state.total = data.pagenum
17
-    },
18
-    updateCurrent (state, data) {
19
-      state.current = data
20
-    },
21
-    updateAuthData (state, data) {
22
-      state.authData = data || {}
23
-    },
24
-    updateWechatConfig (state, data) {
25
-      state.wechatConfig = data
26
-    },
27
-  },
28
-  actions: {
29
-    getManagementList (context, data) {
30
-      return new Promise((resolve, reject) => {
31
-        ajax({
32
-          ...api.management.getManagementList,
33
-          queryData: {
34
-            ...data
35
-          }
36
-        }).then((res) => {
37
-          context.commit('updateManagementList', res)
38
-          resolve()
39
-        }).catch(reject)
40
-      })
41
-    },
42
-    addManagement (context, data) {
43
-      console.log(context)
44
-      return new Promise((resolve, reject) => {
45
-        ajax({
46
-          ...api.management.addManagement,
47
-          data: {
48
-            ...data
49
-          }
50
-        }).then(() => {
51
-          resolve()
52
-        }).catch(reject)
53
-      })
54
-    },
55
-    deleteManagement (context, data) {
56
-      console.log(context)
57
-      return new Promise((resolve, reject) => {
58
-        ajax({
59
-          ...api.management.deleteManagement,
60
-          urlData: {
61
-            ...data
62
-          }
63
-        }).then(() => {
64
-          resolve()
65
-        }).catch(reject)
66
-      })
67
-    },
68
-    changeCurrent (context, data) {
69
-      context.commit('updateCurrent', data)
70
-    },
71
-    authcode (context) {
72
-      return new Promise((resolve, reject) => {
73
-        ajax({
74
-          ...api.management.authcode
75
-        }).then((res) => {
76
-          context.commit('updateAuthData', res)
77
-          resolve()
78
-        }).catch(reject)
79
-      })
80
-    },
81
-    setAuthcode (context, data) {
82
-      console.log(context)
83
-      return new Promise((resolve, reject) => {
84
-        ajax({
85
-          ...api.management.setAuthcode,
86
-          urlData: {
87
-            ...data
88
-          }
89
-        }).then((res) => {
90
-          context.commit('updateWechatConfig', res)
91
-          resolve()
92
-        }).catch(reject)
93
-      })
94
-    },
95
-    checkAuth (context, data) {
96
-      console.log(context)
97
-      return new Promise((resolve, reject) => {
98
-        ajax({
99
-          ...api.management.checkAuth,
100
-          urlData: {
101
-            ...data
102
-          }
103
-        }).then(() => {
104
-          resolve()
105
-        }).catch(reject)
106
-      })
107
-    }
108
-  }
109
-}

+ 0
- 122
src/store/material.js 查看文件

@@ -1,122 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-
4
-export default {
5
-  namespaced: true,
6
-  state: {
7
-    img: [],
8
-    view: []
9
-  },
10
-  mutations: {
11
-    updateImg (state, data) {
12
-      state.img = data.list || []
13
-    },
14
-    updateView (state, data) {
15
-      state.view = data || []
16
-    }
17
-  },
18
-  actions: {
19
-    getImg (context, data) {
20
-      return new Promise((resolve, reject) => {
21
-        ajax({
22
-          ...api.material.getImg,
23
-          urlData: {
24
-            ...data,
25
-          },
26
-          queryData: {
27
-            page: 1,
28
-            pagesize: 10000
29
-          }
30
-        }).then(res => {
31
-          res.list = res.list || []
32
-          res.list.forEach((curr) => {
33
-            curr.checked = false
34
-            curr.media_id = curr.MediaId
35
-            curr.url = curr.Url
36
-          })
37
-          context.commit('updateImg', res)
38
-          resolve(res)
39
-        }).catch(reject)
40
-      })
41
-    },
42
-    getView (context, data) {
43
-      // return new Promise((resolve, reject) => {
44
-      //   ajax({
45
-      //     ...api.common.login,
46
-      //     data: {
47
-      //       ...data,
48
-      //     }
49
-      //   }).then(res => {
50
-      //     context.commit('updateList', res)
51
-      //     resolve(res)
52
-      //   }).catch(reject)
53
-      // })
54
-      data = [
55
-        {
56
-          "type": "media_id",
57
-          "name": "图片",
58
-          "media_id": "MEDIA_ID1",
59
-          text: "1",
60
-          url: 'http://mmbiz.qpic.cn/mmbiz_jpg/PiajxSqBRaEIQxibpLbyuSK4TssiajqknJS6dACV5IoTxppdoyfGEYScCFMqV3dgFzf2tGqy2IiciaysTlaZt6zchibA/0?wx_fmt=jpeg'
61
-        },
62
-        {
63
-          "type": "media_id",
64
-          "name": "图片",
65
-          "media_id": "MEDIA_ID1",
66
-          text: "2",
67
-          url: 'http://mmbiz.qpic.cn/mmbiz_jpg/PiajxSqBRaEIQxibpLbyuSK4TssiajqknJS6dACV5IoTxppdoyfGEYScCFMqV3dgFzf2tGqy2IiciaysTlaZt6zchibA/0?wx_fmt=jpeg'
68
-        },
69
-        {
70
-          "type": "media_id",
71
-          "name": "图片",
72
-          "media_id": "MEDIA_ID1",
73
-          text: "3dhkshfhdskjfhjkshdfhdshkjfhshdfihsifjsdnvkhsihfioshifhisohfshi",
74
-          url: 'http://mmbiz.qpic.cn/mmbiz_jpg/PiajxSqBRaEIQxibpLbyuSK4TssiajqknJS6dACV5IoTxppdoyfGEYScCFMqV3dgFzf2tGqy2IiciaysTlaZt6zchibA/0?wx_fmt=jpeg'
75
-        },
76
-      ]
77
-      data.forEach((curr) => {
78
-        curr.checked = false
79
-      })
80
-      context.commit('updateView', data)
81
-    },
82
-    deleteImg (context, data) {
83
-      console.log(context)
84
-      return new Promise((resolve, reject) => {
85
-        ajax({
86
-          ...api.material.deleteImg,
87
-          urlData: {
88
-            ...data
89
-          }
90
-        }).then(() => {
91
-          resolve()
92
-        }).catch(reject)
93
-      })
94
-    },
95
-    addImg (context, data) {
96
-      console.log(context)
97
-      return new Promise((resolve, reject) => {
98
-        ajax({
99
-          ...api.material.addImg,
100
-          data: {
101
-            ...data
102
-          }
103
-        }).then(() => {
104
-          resolve()
105
-        }).catch(reject)
106
-      })
107
-    },
108
-    reflshImg (context, data) {
109
-      console.log(context)
110
-      return new Promise((resolve, reject) => {
111
-        ajax({
112
-          ...api.material.reflshImg,
113
-          urlData: {
114
-            ...data
115
-          }
116
-        }).then(() => {
117
-          resolve()
118
-        }).catch(reject)
119
-      })
120
-    }
121
-  }
122
-}

+ 0
- 245
src/store/menuConfig.js 查看文件

@@ -1,245 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-import Vue from 'vue'
4
-// import { Message } from 'iview'
5
-
6
-const loop = (data, setTrue) => {
7
-  let returnData = {}
8
-  data.mainPlusActive = false
9
-  if (setTrue) {
10
-    if (setTrue.type === 1) {
11
-      data.mainPlusActive = true
12
-    }
13
-  }
14
-  data.button.forEach((currentValue, index) => {
15
-    currentValue.active = false
16
-    currentValue.subPlusActive = false
17
-    if (currentValue.sub_button) {
18
-      currentValue.sub_button.forEach((curr, ind) => {
19
-        curr.active = false
20
-        if (setTrue) {
21
-          if (setTrue.type === 2) {
22
-            if (index === setTrue.parentIndex && ind === setTrue.index) {
23
-              curr.active = true
24
-            }
25
-          }
26
-        }
27
-      })
28
-    }
29
-    if (setTrue) {
30
-      if (setTrue.type === 0) {
31
-        if (index === setTrue.index) {
32
-          currentValue.active = true
33
-        }
34
-      } else if (setTrue.type === 3) {
35
-        if (index === setTrue.index) {
36
-          currentValue.subPlusActive = true
37
-        }
38
-      }
39
-    }
40
-  })
41
-  returnData.mainPlusActive = data.mainPlusActive
42
-  returnData.button = []
43
-  data.button.forEach((currentValue) => {
44
-    if (currentValue.sub_button) {
45
-      currentValue.sub_button.forEach((curr, ind) => {
46
-        currentValue.sub_button.splice(ind, 1, curr)
47
-      })
48
-    }
49
-    returnData.button.push(currentValue)
50
-  })
51
-  return JSON.parse(JSON.stringify(returnData))
52
-}
53
-
54
-export default {
55
-  namespaced: true,
56
-  state: {
57
-    menuJson: {
58
-      'button': [],
59
-      mainPlusActive: false
60
-    },
61
-    changed: false
62
-  },
63
-  mutations: {
64
-    updateMenu (state, data) {
65
-      state.menuJson.button = data.button || []
66
-    },
67
-    updateAddMain (state, data) {
68
-      state.menuJson.button.push(data)
69
-      Vue.set(state.menuJson.button, state.menuJson.button.length - 1, data)
70
-    },
71
-    updateSetMain (state, data) {
72
-      if (data.item) { // data有值时,为修改
73
-        Vue.set(state.menuJson.button, data.index, data.item)
74
-        // state.menuJson.button.splice(data.index, 1, data.item)
75
-      } else { // data为空时,为删除
76
-        state.menuJson.button.splice(data.index, 1)
77
-      }
78
-    },
79
-    updateAddSub (state, data) {
80
-      if (!state.menuJson.button[data.index].sub_button) {
81
-        Vue.set(state.menuJson.button, data.index, {
82
-          ...state.menuJson.button[data.index],
83
-          sub_button: []
84
-        })
85
-      }
86
-      console.log(state.menuJson.button)
87
-      state.menuJson.button[data.index].sub_button.push(data.item)
88
-      loop(state.menuJson)
89
-    },
90
-    updateSetSub (state, data) {
91
-      if (data.item) { // data有值时,为修改
92
-        Vue.set(state.menuJson.button[data.parentIndex].sub_button, data.index, data.item)
93
-      } else { // data为空时,为删除
94
-        state.menuJson.button[data.parentIndex].sub_button.splice(data.index, 1)
95
-      }
96
-    },
97
-    updateMainActive (state, data) {
98
-      data.type = 0
99
-      state.menuJson = loop(state.menuJson, data)
100
-    },
101
-    updateSubActive (state, data) {
102
-      data.type = 2
103
-      state.menuJson = loop(state.menuJson, data)
104
-    },
105
-    updateMainPlusActive (state) {
106
-      state.menuJson = loop(state.menuJson, { type: 1 })
107
-    },
108
-    updateSubPlusActive (state, data) {
109
-      data.type = 3
110
-      state.menuJson = loop(state.menuJson, data)
111
-    },
112
-    clearMenu (state) {
113
-      state.menuJson = loop(state.menuJson)
114
-    },
115
-    updateChanged (state, data) {
116
-      state.changed = data
117
-    },
118
-  },
119
-  actions: {
120
-    getWechatMenu (context) {
121
-      return new Promise((resolve, reject) => {
122
-        ajax({
123
-          ...api.wechatMenu.getWechatMenu
124
-        }).then((res) => {
125
-          let button = []
126
-          if (res) {
127
-            button = res.menu.menu.button
128
-            res.imgList = res.imgList || []
129
-            res.imgList.forEach((c, i) => {
130
-              if (!c) {
131
-                res.imgList.splice(i, 1)
132
-              }
133
-            })
134
-            button.forEach((current) => {
135
-              if (current.type === 'click') {
136
-                current.type = 'text'
137
-                current.value = ((res.keyList.filter(item => (item || { KeyId: '' }).KeyId === current.key) || [])[0] || { Value: '' }).Value
138
-              } else if (current.type === 'media_id') {
139
-                let filter = res.imgList.filter(item => item.MediaId === current.media_id)
140
-                if (filter.length > 0) {
141
-                  current.url = filter[0].Url ? filter[0].Url : ''
142
-                }
143
-              }
144
-              if (current.sub_button) {
145
-                current.sub_button.forEach((curr) => {
146
-                  if (curr.type === 'click') {
147
-                    curr.type = 'text'
148
-                    curr.value = ((res.keyList.filter(item => (item || { KeyId: '' }).KeyId === curr.key) || [])[0] || { Value: '' }).Value
149
-                  } else if (curr.type === 'media_id') {
150
-                    let filter = res.imgList.filter(item => item.MediaId === curr.media_id)
151
-                    if (filter.length > 0) {
152
-                      curr.url = filter[0].Url ? filter[0].Url : ''
153
-                    }
154
-                  }
155
-                })
156
-              }
157
-            })
158
-          }
159
-          context.commit('updateMenu', loop({ button }))
160
-          resolve()
161
-        }).catch(reject)
162
-      })
163
-    },
164
-    clear (context, data) {
165
-      if (data.type === 0) {
166
-        data.index = context.state.menuJson.button.length - 1
167
-        context.commit('updateMainActive', data)
168
-      } else if (data.type === 1) {
169
-        context.commit('updateMainActive', data)
170
-      } else if (data.type === 2) {
171
-        data.index = context.state.menuJson.button[data.parentIndex].sub_button.length - 1
172
-        context.commit('updateSubActive', data)
173
-      } else if (data.type === 3) {
174
-        console.log('click')
175
-        context.commit('updateSubActive', data)
176
-      } else {
177
-        context.commit('clearMenu')
178
-      }
179
-    },
180
-    AddMainMenu (context, data) {
181
-      context.commit('updateAddMain', data)
182
-    },
183
-    SetMainMenu (context, data) {
184
-      context.commit('updateSetMain', data)
185
-    },
186
-    AddSubMenu (context, data) {
187
-      context.commit('updateAddSub', data)
188
-    },
189
-    SetSubMenu (context, data) {
190
-      context.commit('updateSetSub', data)
191
-    },
192
-    mainActive (context, data) {
193
-      context.commit('updateMainActive', data)
194
-    },
195
-    subActive (context, data) {
196
-      context.commit('updateSubActive', data)
197
-    },
198
-    mainPlusActive (context) {
199
-      context.commit('updateMainPlusActive')
200
-    },
201
-    subPlusActive (context, data) {
202
-      context.commit('updateSubPlusActive', data)
203
-    },
204
-    setWechatMenu (context) {
205
-      return new Promise((resolve, reject) => {
206
-        // if (context.state.menuJson.button.length <= 0) {
207
-        //   Message.warning('您未添加任何菜单,请先添加菜单后再进行发布')
208
-        //   reject()
209
-        //   return false
210
-        // }
211
-        let submitData = {
212
-          menu: {}
213
-        }
214
-        submitData.menu = context.state.menuJson
215
-        delete submitData.menu['mainPlusActive']
216
-        submitData.menu.button.forEach((currentValue) => {
217
-          delete currentValue['active']
218
-          delete currentValue['subPlusActive']
219
-          if ((currentValue.sub_button || []).length > 0) {
220
-            delete currentValue['type']
221
-            delete currentValue['media_id']
222
-            delete currentValue['url']
223
-            delete currentValue['value']
224
-            currentValue.sub_button.forEach((curr) => {
225
-              delete curr['active']
226
-            })
227
-          }
228
-        })
229
-        console.log(submitData)
230
-        let str = JSON.stringify(submitData)
231
-        ajax({
232
-          ...api.wechatMenu.setWechatMenu,
233
-          data: {
234
-            WechatJson: str
235
-          }
236
-        }).then(() => {
237
-          resolve()
238
-        }).catch(reject)
239
-      })
240
-    },
241
-    Changed (context, data) {
242
-      context.commit('updateChanged', data)
243
-    }
244
-  }
245
-}

+ 0
- 150
src/store/reply.js 查看文件

@@ -1,150 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-
4
-export default {
5
-  namespaced: true,
6
-  state: {
7
-    keywordList: [],
8
-    tagList: [],
9
-    RuleName: '',
10
-    AutoType: '',
11
-    MessageContent: '',
12
-    MessageImg: '',
13
-    MessageParagraph: '',
14
-    MessageType: '',
15
-    PairType: '',
16
-    Url: '',
17
-    Subscribe: {}
18
-  },
19
-  mutations: {
20
-    updateKeywordList (state, data) {
21
-      state.keywordList = data.list || []
22
-    },
23
-    updateSubscribe (state, data) {
24
-      state.Subscribe = data.list ? data.list[0] : {}
25
-    },
26
-    updateTagList (state, data) {
27
-      state.tagList = data || []
28
-    },
29
-    updateDetail (state, data) {
30
-      console.log(data)
31
-      state.RuleName = data.RuleName
32
-      state.AutoType = data.AutoType
33
-      state.MessageContent = data.MessageContent
34
-      state.MessageImg = data.MessageImg
35
-      state.MessageParagraph = data.MessageParagraph
36
-      state.MessageType = data.MessageType
37
-      state.PairType = data.PairType
38
-      state.Url = data.Url
39
-      let arr = data.Keywords ? data.Keywords.split(',') : []
40
-      state.tagList = arr
41
-    }
42
-  },
43
-  actions: {
44
-    getKeywordList (context, data) {
45
-      return new Promise((resolve, reject) => {
46
-        ajax({
47
-          ...api.reply.getKeywordList,
48
-          queryData: {
49
-            ...data
50
-          }
51
-        }).then((res) => {
52
-          context.commit('updateKeywordList', res)
53
-          resolve()
54
-        }).catch(reject)
55
-      })
56
-    },
57
-    getSubscribe (context, data) {
58
-      return new Promise((resolve, reject) => {
59
-        ajax({
60
-          ...api.reply.getKeywordList,
61
-          queryData: {
62
-            ...data
63
-          }
64
-        }).then((res) => {
65
-          context.commit('updateSubscribe', res)
66
-          resolve()
67
-        }).catch(reject)
68
-      })
69
-    },
70
-    getReplyDetail (context, data) {
71
-      return new Promise((resolve, reject) => {
72
-        ajax({
73
-          ...api.reply.getReplyDetail,
74
-          urlData: {
75
-            ...data
76
-          }
77
-        }).then((res) => {
78
-          context.commit('updateDetail', res)
79
-          resolve()
80
-        }).catch(reject)
81
-      })
82
-    },
83
-    setReply (context, data) {
84
-      console.log(context)
85
-      return new Promise((resolve, reject) => {
86
-        ajax({
87
-          ...api.reply.setReply,
88
-          data: {
89
-            ...data
90
-          }
91
-        }).then(() => {
92
-          resolve()
93
-        }).catch(reject)
94
-      })
95
-    },
96
-    addReply (context, data) {
97
-      console.log(context)
98
-      return new Promise((resolve, reject) => {
99
-        ajax({
100
-          ...api.reply.addReply,
101
-          data: {
102
-            ...data
103
-          }
104
-        }).then(() => {
105
-          resolve()
106
-        }).catch(reject)
107
-      })
108
-    },
109
-    deleteReply (context, data) {
110
-      console.log(context)
111
-      return new Promise((resolve, reject) => {
112
-        ajax({
113
-          ...api.reply.deleteReply,
114
-          urlData: {
115
-            ...data
116
-          }
117
-        }).then(() => {
118
-          resolve()
119
-        }).catch(reject)
120
-      })
121
-    },
122
-    changeIsUse (context, data) {
123
-      console.log(context)
124
-      return new Promise((resolve, reject) => {
125
-        ajax({
126
-          ...api.reply.changeIsUse,
127
-          urlData: {
128
-            ...data
129
-          }
130
-        }).then(() => {
131
-          resolve()
132
-        }).catch(reject)
133
-      })
134
-    },
135
-    changeTag (context, data) {
136
-      let res
137
-      if (data.type === 'add') {
138
-        context.state.tagList.push(data.data)
139
-        res = context.state.tagList
140
-      } else if (data.type === 'delete') {
141
-        let index = context.state.tagList.indexOf(data.item);
142
-        context.state.tagList.splice(index, 1)
143
-        res = context.state.tagList
144
-      } else {
145
-        res = []
146
-      }
147
-      context.commit('updateTagList', res)
148
-    }
149
-  }
150
-}

+ 0
- 121
src/store/user.js 查看文件

@@ -1,121 +0,0 @@
1
-import ajax from '../util/ajax'
2
-import api from '../util/api'
3
-
4
-export default {
5
-  namespaced: true,
6
-  state: {
7
-    userList: [],
8
-    current: 1,
9
-    total: 0,
10
-    projectList: [],
11
-    oldInfo: {}
12
-  },
13
-  mutations: {
14
-    updateUserList (state, data) {
15
-      state.userList = data.list || []
16
-      state.total = data.pagenum
17
-    },
18
-    updateCurrent (state, data) {
19
-      state.current = data
20
-    },
21
-    updateSysuserInfo (state, data) {
22
-      state.oldInfo = data
23
-    },
24
-    updateProjectList (state, data) {
25
-      state.projectList = data.list || []
26
-    },
27
-  },
28
-  actions: {
29
-    getUserList (context, data) {
30
-      return new Promise((resolve, reject) => {
31
-        ajax({
32
-          ...api.user.getUserList,
33
-          queryData: {
34
-            ...data
35
-          }
36
-        }).then((res) => {
37
-          context.commit('updateUserList', res)
38
-          resolve()
39
-        }).catch(reject)
40
-      })
41
-    },
42
-    changeCurrent(context, data){
43
-      context.commit('updateCurrent', data)
44
-    },
45
-    addUser (context, data) {
46
-      return new Promise((resolve, reject) => {
47
-        ajax({
48
-          ...api.user.addUser,
49
-          data:{
50
-            ...data
51
-          }
52
-        }).then((res) => {
53
-          console.log(res)
54
-          resolve()
55
-        }).catch(reject)
56
-      })
57
-    },
58
-    editUser (context, data) {
59
-      return new Promise((resolve, reject) => {
60
-        ajax({
61
-          ...api.user.editUser,
62
-          data: {
63
-            ...data
64
-          }
65
-        }).then((res) => {
66
-          console.log(res)
67
-          resolve()
68
-        }).catch(reject)
69
-      })
70
-    },
71
-    getSysuserInfo (context, data) {
72
-      return new Promise((resolve, reject) => {
73
-        ajax({
74
-          ...api.user.getSysuserInfo,
75
-          urlData:{
76
-            ...data
77
-          }
78
-        }).then((res) => {
79
-          context.commit('updateSysuserInfo', res)
80
-          resolve(res)
81
-        }).catch(reject)
82
-      })
83
-    },
84
-    getProjectList (context) {
85
-      return new Promise((resolve, reject) => {
86
-        ajax({
87
-          ...api.common.getProjectList,
88
-          queryData: {
89
-            page: 1,
90
-            pagesize: 10000
91
-          }
92
-        }).then((res) => {
93
-          context.commit('updateProjectList', res)
94
-          resolve(res)
95
-        }).catch(reject)
96
-      })
97
-    },
98
-    BindProject (context, data) {
99
-      console.log(context)
100
-      return new Promise((resolve, reject) => {
101
-        ajax({
102
-          ...api.user.BindProject,
103
-          urlData: { ...data }
104
-        }).then(() => {
105
-          resolve()
106
-        }).catch(reject)
107
-      })
108
-    },
109
-    UnBindProject (context, data) {
110
-      console.log(context)
111
-      return new Promise((resolve, reject) => {
112
-        ajax({
113
-          ...api.user.UnBindProject,
114
-          urlData: { ...data }
115
-        }).then(() => {
116
-          resolve()
117
-        }).catch(reject)
118
-      })
119
-    }
120
-  }
121
-}

+ 3784
- 0
src/util/area.js
文件差异内容过多而无法显示
查看文件


+ 453
- 0
src/views/supportDetail/supportDetail.vue 查看文件

@@ -0,0 +1,453 @@
1
+<template>
2
+  <div class="pageContent">
3
+    <div class="mainPage">
4
+      <div class="top">
5
+        <img :src="topImg">
6
+        <div class="top-div" v-if="status<4">
7
+          <div class="countdown" :class="{'on':status ===1,'off':status===2}" v-html="countdown()"></div>
8
+          <div class="userInfo">
9
+            <div class="avatars">
10
+              <img class="cover" src>
11
+            </div>
12
+            <div class="info">
13
+              <p>&nbsp;匿名</p>
14
+              <p>
15
+                已有
16
+                <span class="marked">0</span> 位好友帮TA砍价了,共砍掉
17
+                <span class="marked">¥0</span> 元
18
+              </p>
19
+            </div>
20
+          </div>
21
+        </div>
22
+        <div class="self-end" v-if="status==4">
23
+          <div>
24
+            恭喜你!已砍至
25
+            <span>0</span>
26
+            <span>元</span>
27
+          </div>
28
+          <div>获得一次免费拍照机会~</div>
29
+          <div>请及时前往江北新区.白马路10号.银城颐居.</div>
30
+          <div>悦见山营销中心领取</div>
31
+        </div>
32
+      </div>
33
+      <div class="active" v-if="status<4">
34
+        <h2>悦见山全家福拍摄助力砍价活动</h2>
35
+        <div class="price">
36
+          <span class="price">砍后价:¥260</span>
37
+          <span>最多砍至0元</span>
38
+        </div>
39
+        <div class="desc">
40
+          <span>原价2888元, 悦见山亲情价¥888</span>
41
+          <span>仅剩0个名额</span>
42
+        </div>
43
+      </div>
44
+      <div class="list">
45
+        <div class="title">
46
+          <img :src="paihang">
47
+          <span>砍价记录</span>
48
+        </div>
49
+        <div class="item" v-for="(item,index) in list" :key="index">
50
+          <div class="avatars">
51
+            <img class="cover" :src="paihang" alt>
52
+          </div>
53
+          <div class="info">
54
+            <p>Lina豆豆</p>
55
+            <span>2018-9-0</span>
56
+          </div>
57
+          <div class="price">
58
+            <span>已砍:</span>
59
+            <span>¥29.6</span>
60
+          </div>
61
+        </div>
62
+      </div>
63
+    </div>
64
+    <div class="dailog" v-if="showDailog" @click="showDailog = false">
65
+      <div class="dailog-box" @click.stop="1+1">
66
+        <img :src="popBg">
67
+        <div class="log1">
68
+          <div>您已成功帮好友砍掉</div>
69
+          <div>
70
+            29.6
71
+            <span>元</span>
72
+          </div>
73
+          <div>
74
+            您有一份福利待领取!去领取
75
+            <i class="iconfont icon-you"></i>
76
+          </div>
77
+          <img class="present" :src="presentClose">
78
+          <img class="btn" :src="btn">
79
+        </div>
80
+      </div>
81
+    </div>
82
+    <div class="other-end" v-if="status === 5">
83
+      <div class="box">
84
+        <p>您的好友已砍价至0元,</p>
85
+        <p>获得免费拍照机会!</p>
86
+        <div>我也要报名</div>
87
+      </div>
88
+    </div>
89
+    <div class="today-end" v-if="status === 6">
90
+      <div class="box">
91
+        <img :src="kulian">
92
+        <p>今日的主力活动已结束,</p>
93
+        <p>明天再来吧!</p>
94
+      </div>
95
+    </div>
96
+    <div class="bottom">
97
+      <div :class="{'on':status === 1,'off':status !== 1}">{{btnText}}</div>
98
+    </div>
99
+  </div>
100
+</template>
101
+
102
+<script>
103
+import topImg from '@/assets/topImg.jpg'
104
+import paihang from '@/assets/paihang.png'
105
+import popBg from '@/assets/pop-bg.png'
106
+import presentClose from '@/assets/presentClose.png'
107
+import btn from '@/assets/btn.png'
108
+import kulian from '@/assets/kulian.png'
109
+import { createNamespacedHelpers } from 'vuex'
110
+const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('main')
111
+export default {
112
+  data () {
113
+    return {
114
+      topImg,
115
+      paihang,
116
+      popBg,
117
+      presentClose,
118
+      btn,
119
+      kulian,
120
+      status: 4,
121
+      btnText: '邀请好友助力',
122
+      showDailog: false,
123
+      list: [1, 1, 1, 1, 1, 2]
124
+    }
125
+  },
126
+  computed: {
127
+    ...mapIndexState({
128
+      userInfo: item => item.userInfo
129
+    })
130
+  },
131
+  methods: {
132
+    ...mapIndexActions(['setUserInfo']),
133
+    countdown () {
134
+      let hour = 20
135
+      let minutes = 40
136
+      let seconds = 30
137
+      return `<span style='color:#fff;'>砍价倒计时</span>
138
+      <span style='padding: 0 0.03rem;background: #5e5e5e;color: #fff;border-radius:4px;'>${hour}</span>
139
+      <span style='color:#fff;'>:</span>
140
+      <span style='padding: 0 0.03rem;background: #5e5e5e;color: #fff;border-radius:4px;'>${minutes}</span>
141
+      <span style='color:#fff;'>:</span>
142
+      <span style='padding: 0 0.03rem;background: rgba(255, 66, 28, 1);color: #fff;border-radius:4px;'>${seconds}</span>`
143
+    }
144
+  }
145
+}
146
+</script>
147
+
148
+<style lang="scss" scoped>
149
+.self-end {
150
+  padding: 0.1rem;
151
+  border-bottom: 0.06rem solid rgba(235, 241, 242, 1);
152
+  div {
153
+    text-align: center;
154
+    color: #717171;
155
+    font-size: 0.12rem;
156
+    padding-bottom: 0.05rem;
157
+  }
158
+  div:nth-of-type(1) {
159
+    font-size: 0.18rem;
160
+    color: #000;
161
+    span:nth-of-type(1) {
162
+      color: #fc6243;
163
+      font-size: 36px;
164
+    }
165
+    span:nth-of-type(2) {
166
+      color: #fc6243;
167
+      font-size: 16px;
168
+    }
169
+  }
170
+  div:nth-of-type(2) {
171
+    font-size: 14px;
172
+    color: #000;
173
+  }
174
+}
175
+.today-end {
176
+  position: fixed;
177
+  top: 0;
178
+  left: 0;
179
+  width: 100%;
180
+  height: 100%;
181
+  background-color: rgba($color: #000000, $alpha: 0.3);
182
+  z-index: 1000;
183
+  display: flex;
184
+  justify-content: center;
185
+  align-items: center;
186
+  .box {
187
+    width: 2.6rem;
188
+    height: 1.7rem;
189
+    display: flex;
190
+    flex-flow: column nowrap;
191
+    justify-content: center;
192
+    align-items: center;
193
+    background: #fff;
194
+    border-radius: 0.04rem;
195
+    img {
196
+      width: 0.55rem;
197
+      margin-bottom: 0.15rem;
198
+    }
199
+    p {
200
+      font-size: 0.16rem;
201
+    }
202
+  }
203
+}
204
+.other-end {
205
+  position: fixed;
206
+  top: 0;
207
+  left: 0;
208
+  width: 100%;
209
+  height: 100%;
210
+  background-color: rgba($color: #000000, $alpha: 0.3);
211
+  z-index: 1000;
212
+  display: flex;
213
+  justify-content: center;
214
+  align-items: center;
215
+  .box {
216
+    width: 2.6rem;
217
+    height: 1.7rem;
218
+    display: flex;
219
+    flex-flow: column nowrap;
220
+    justify-content: center;
221
+    align-items: center;
222
+    background: #fff;
223
+    border-radius: 0.04rem;
224
+    p {
225
+      font-size: 0.16rem;
226
+    }
227
+    div {
228
+      padding: 0.07rem 0.25rem;
229
+      border: 1px solid #fc6243;
230
+      color: #fc6243;
231
+      border-radius: 0.04rem;
232
+      margin-top: 0.25rem;
233
+    }
234
+  }
235
+}
236
+.dailog {
237
+  position: fixed;
238
+  top: 0;
239
+  left: 0;
240
+  width: 100%;
241
+  height: 100%;
242
+  background-color: rgba($color: #000000, $alpha: 0.3);
243
+  z-index: 1000;
244
+  display: flex;
245
+  justify-content: center;
246
+  align-items: center;
247
+  .dailog-box {
248
+    width: 100%;
249
+    height: 3.9rem;
250
+    position: relative;
251
+    > img {
252
+      width: 100%;
253
+      position: absolute;
254
+      top: 0;
255
+      left: 0;
256
+      z-index: -1;
257
+    }
258
+    .log1 {
259
+      width: 100%;
260
+      height: 100%;
261
+      padding-top: 0.7rem;
262
+      text-align: center;
263
+      div:nth-of-type(1) {
264
+        font-size: 0.16rem;
265
+        text-align: center;
266
+        margin-bottom: 0.1rem;
267
+      }
268
+      div:nth-of-type(2) {
269
+        font-size: 0.64rem;
270
+        text-align: center;
271
+        margin-bottom: 0.05rem;
272
+        span {
273
+          font-size: 0.2rem;
274
+        }
275
+      }
276
+      div:nth-of-type(3) {
277
+        font-size: 0.16rem;
278
+        text-align: center;
279
+        margin-bottom: 0.12rem;
280
+        i {
281
+          color: #9a9a9a;
282
+        }
283
+      }
284
+      .present {
285
+        display: block;
286
+        width: 1.4rem;
287
+        margin: 0 auto;
288
+      }
289
+      .btn {
290
+        width: 1.8rem;
291
+      }
292
+    }
293
+  }
294
+}
295
+.top {
296
+  img {
297
+    width: 100%;
298
+  }
299
+  .top-div {
300
+    padding: 0.1rem 0.18rem;
301
+    border-bottom: 0.06rem solid rgba(235, 241, 242, 1);
302
+    .countdown {
303
+      width: 100%;
304
+      height: 0.38rem;
305
+      text-align: center;
306
+      line-height: 0.38rem;
307
+      margin-bottom: 0.15rem;
308
+      border-radius: 0.2rem;
309
+      &.on {
310
+        background: #000;
311
+      }
312
+      &.off {
313
+        background: #b8b8b8;
314
+      }
315
+    }
316
+    .userInfo {
317
+      display: flex;
318
+      .avatars {
319
+        width: 0.42rem;
320
+        height: 0.42rem;
321
+        border-radius: 50%;
322
+        img {
323
+          width: 100%;
324
+          height: 100%;
325
+        }
326
+      }
327
+      .info {
328
+        flex: 1;
329
+        padding-left: 0.05rem;
330
+        p {
331
+          padding-bottom: 0.05rem;
332
+          font-size: 0.12rem;
333
+        }
334
+        p:nth-of-type(2) {
335
+          color: #797979;
336
+        }
337
+        .marked {
338
+          color: rgba(252, 98, 67, 1);
339
+        }
340
+      }
341
+    }
342
+  }
343
+}
344
+.active {
345
+  padding: 0.1rem 0.18rem;
346
+  border-bottom: 0.06rem solid rgba(235, 241, 242, 1);
347
+  div {
348
+    margin-top: 0.08rem;
349
+  }
350
+  .price {
351
+    span {
352
+      font-size: 12px;
353
+    }
354
+    span:nth-of-type(1) {
355
+      background: rgba(252, 98, 67, 1);
356
+      border-radius: 2px;
357
+      color: #fff;
358
+      padding: 0.02rem 0.08rem;
359
+      margin-right: 0.2rem;
360
+      font-size: 0.13rem;
361
+    }
362
+  }
363
+  .desc {
364
+    display: flex;
365
+    justify-content: space-between;
366
+    align-items: center;
367
+    span {
368
+      font-size: 0.12rem;
369
+    }
370
+    span:nth-of-type(2) {
371
+      color: #797979;
372
+    }
373
+  }
374
+}
375
+.list {
376
+  padding: 0.1rem 0.18rem;
377
+  margin-bottom: 0.6rem;
378
+  .title {
379
+    display: flex;
380
+    align-items: center;
381
+    img {
382
+      width: 0.16rem;
383
+      margin-right: 0.1rem;
384
+    }
385
+  }
386
+  .item {
387
+    display: flex;
388
+    padding: 0.1rem 0;
389
+    border-bottom: 1px solid #ebebeb;
390
+    .avatars {
391
+      width: 0.4rem;
392
+      height: 0.4rem;
393
+      img {
394
+        width: 100%;
395
+        height: 100%;
396
+        border-radius: 50%;
397
+      }
398
+    }
399
+    .info {
400
+      width: 2rem;
401
+      height: 0.4rem;
402
+      padding: 0 0.08rem;
403
+      p {
404
+        font-size: 0.14rem;
405
+        width: 100%;
406
+        padding-bottom: 0.02rem;
407
+        white-space: nowrap;
408
+        overflow: hidden;
409
+        text-overflow: ellipsis;
410
+      }
411
+      span {
412
+        font-size: 0.12rem;
413
+        color: #959595;
414
+      }
415
+    }
416
+    .price {
417
+      height: 0.4rem;
418
+      line-height: 0.4rem;
419
+      text-align: right;
420
+      flex: 1;
421
+      span:nth-of-type(1) {
422
+        color: #797979;
423
+      }
424
+      span:nth-of-type(2) {
425
+        color: #fc6243;
426
+      }
427
+    }
428
+  }
429
+}
430
+.bottom {
431
+  position: fixed;
432
+  bottom: 0;
433
+  left: 0;
434
+  width: 100%;
435
+  height: 0.6rem;
436
+  padding: 0.1rem 0.25rem;
437
+  background: #fff;
438
+  div {
439
+    width: 100%;
440
+    height: 100%;
441
+    text-align: center;
442
+    line-height: 0.4rem;
443
+    border-radius: 0.2rem;
444
+    color: #fff;
445
+  }
446
+  .on {
447
+    background: rgba(252, 98, 67, 1);
448
+  }
449
+  .off {
450
+    background: #ccc;
451
+  }
452
+}
453
+</style>

+ 197
- 0
src/views/supportMain/supportMain.vue 查看文件

@@ -0,0 +1,197 @@
1
+<template>
2
+  <div class="pageContent">
3
+    <div class="mainPage">
4
+      <div class="top">
5
+        <img :src="topImg">
6
+        <div class="top-div">
7
+          <b>悦见山全家福拍摄助力砍价活动</b>
8
+          <p>时间: 2018年12月17日-12月25日</p>
9
+          <p>地点: 南京悦见山G99</p>
10
+        </div>
11
+      </div>
12
+      <div class="main">
13
+        <h2>活动详情</h2>
14
+        <div>悦见山全家福拍摄助力砍价活动</div>
15
+        <p>原价:888元</p>
16
+        <p>可邀请最多30个好友帮忙砍价,最多可砍至0元</p>
17
+        <div>套餐包含:</div>
18
+        <div>10寸专属定制水晶PVC相册1本(入册15张)</div>
19
+        <div>10寸复古精美摆台1幅</div>
20
+        <div>拍摄精修:拍摄至少60张,精修入册15张</div>
21
+        <p>照片赠送:照片全送</p>
22
+        <p>活动电话:025-86426677</p>
23
+        <p>服务案场:银城悦见山G99</p>
24
+        <p>地址:江宁区秣陵街道创新东路2号</p>
25
+        <p>*活动最终解释权归银城蓝溪郡开发商所有</p>
26
+      </div>
27
+    </div>
28
+    <div class="bottom">
29
+      <div :class="{'on':btn.status === 1,'off':btn.status !== 1}">{{btn.text}}</div>
30
+    </div>
31
+    <div class="login" v-if="login">
32
+      <div class="box">
33
+        <div class="item">
34
+          <label for="name">姓名</label>
35
+          <input type="text" v-model="name">
36
+        </div>
37
+        <div class="item">
38
+          <label for="phone">手机号</label>
39
+          <input type="tel" v-model="phone">
40
+        </div>
41
+        <div class="item">
42
+          <label for="address">住址</label>
43
+          <input type="text" v-model="address">
44
+        </div>
45
+        <textarea name="addressDetail" rows="5" placeholder="详细地址" v-model="adderssDetail"></textarea>
46
+        <div class="submit">提交</div>
47
+      </div>
48
+    </div>
49
+    <van-area :area-list="area" @confirm="confirm" @cancel="cancel"/>
50
+  </div>
51
+</template>
52
+
53
+<script>
54
+import topImg from '@/assets/topImg.jpg'
55
+import area from '@/util/area.js'
56
+import { createNamespacedHelpers } from 'vuex'
57
+const { mapState: mapIndexState, mapActions: mapIndexActions } = createNamespacedHelpers('main')
58
+export default {
59
+  data () {
60
+    return {
61
+      topImg,
62
+      area,
63
+      btn: {
64
+        text: '立即报名',
65
+        status: 1
66
+      },
67
+      login: false,
68
+      name: '',
69
+      phone: '',
70
+      address: '',
71
+      adderssDetail: ''
72
+    }
73
+  },
74
+  created () {
75
+    console.log(area)
76
+  },
77
+  computed: {
78
+    ...mapIndexState({
79
+      userInfo: item => item.userInfo
80
+    })
81
+  },
82
+  methods: {
83
+    ...mapIndexActions(['setUserInfo']),
84
+    confirm () {
85
+
86
+    },
87
+    cancel () {
88
+
89
+    }
90
+  }
91
+}
92
+</script>
93
+
94
+<style lang="scss" scoped>
95
+.top {
96
+  img {
97
+    width: 100%;
98
+  }
99
+  .top-div {
100
+    padding: 0.12rem 0.25rem;
101
+    border-bottom: 0.1rem solid rgba(235, 241, 242, 1);
102
+    b {
103
+      font-size: 0.16rem;
104
+    }
105
+    p {
106
+      font-size: 0.13rem;
107
+      padding-top: 0.04rem;
108
+    }
109
+  }
110
+}
111
+.main {
112
+  padding: 0.2rem 0.25rem 0.6rem;
113
+  h2 {
114
+    font-size: 0.16rem;
115
+    padding-bottom: 0.1rem;
116
+  }
117
+  p {
118
+    padding-bottom: 0.1rem;
119
+  }
120
+}
121
+.bottom {
122
+  position: fixed;
123
+  bottom: 0;
124
+  left: 0;
125
+  width: 100%;
126
+  height: 0.6rem;
127
+  padding: 0.1rem 0.25rem;
128
+  background: #fff;
129
+  div {
130
+    width: 100%;
131
+    height: 100%;
132
+    text-align: center;
133
+    line-height: 0.4rem;
134
+    border-radius: 0.2rem;
135
+    color: #fff;
136
+  }
137
+  .on {
138
+    background: rgba(252, 98, 67, 1);
139
+  }
140
+  .off {
141
+    background: #ccc;
142
+  }
143
+}
144
+.login {
145
+  position: fixed;
146
+  top: 0;
147
+  left: 0;
148
+  width: 100%;
149
+  height: 100%;
150
+  display: flex;
151
+  justify-content: center;
152
+  align-items: center;
153
+  background: rgba(0, 0, 0, 0.2);
154
+  .box {
155
+    width: 3.25rem;
156
+    padding: 0.3rem 0.22rem;
157
+    background: #fff;
158
+    border-radius: 0.08rem;
159
+    .item {
160
+      padding-bottom: 0.1rem;
161
+      display: flex;
162
+      height: 0.4rem;
163
+      align-items: center;
164
+      label {
165
+        width: 0.5rem;
166
+        color: rgba(168, 182, 200, 1);
167
+      }
168
+      input {
169
+        height: 100%;
170
+        flex: 1;
171
+        border-radius: 4px;
172
+        border: 1px solid rgba(168, 182, 200, 0.2);
173
+      }
174
+    }
175
+    textarea {
176
+      width: 100%;
177
+      border-radius: 4px;
178
+      border: 1px solid rgba(168, 182, 200, 0.2);
179
+      margin-bottom: 0.1rem;
180
+      padding: 0.05rem;
181
+      &::-webkit-input-placeholder {
182
+        color: rgba(168, 182, 200, 0.2);
183
+      }
184
+    }
185
+    .submit {
186
+      height: 0.48rem;
187
+      text-align: center;
188
+      line-height: 0.48rem;
189
+      border-radius: 0.24rem;
190
+      border: 1px solid rgba(255, 66, 28, 1);
191
+      color: rgba(255, 66, 28, 1);
192
+      font-size: 0.14rem;
193
+      margin-top: 0.1rem;
194
+    }
195
+  }
196
+}
197
+</style>