d48fd4cd by joe

部分功能修改

1 parent 2fd73dd4
1 let global_view_coupon_url = "http://www.baidu.com";
2 let global_view_integral_url = "http://www.bing.com";
...\ No newline at end of file ...\ No newline at end of file
1
2 let global_wx_appid = "wx9fc8816188c0ef2a";
3 let global_view_coupon_url = "https://clubwxuat.hm.liby.com.cn/integral/weixin_integral.htm?appId=wx9fc8816188c0ef2a";
4 let global_view_integral_url = "https://clubwxuat.hm.liby.com.cn/integral/weixin_integral.htm?appId=wx9fc8816188c0ef2a";
5 let global_wx_oauth_url = "http://clubwxuat.hm.liby.com.cn/api/getOpenId.htm";
6 let golbal_api_proxy = "https://ow.go.qudone.com";
7
8
9 // if (location.href.indexOf("//k.wxpai.cn") > 0) {
10 // base = "https://api.k.wxpai.cn/bizproxy"
11 // wxOauthUrl = "";
12 // }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -14,14 +14,10 @@ Vue.use(Toast); ...@@ -14,14 +14,10 @@ Vue.use(Toast);
14 // axios.defaults.baseURL = "" 14 // axios.defaults.baseURL = ""
15 15
16 // 服务器地址 16 // 服务器地址
17 let base = "https://ow.go.qudone.com"; 17 let base = golbal_api_proxy;
18 let baseWxAppid = "wx9fc8816188c0ef2a"; 18 let baseWxAppid = global_wx_appid;
19 let wxOauthUrl = "http://clubwxuat.hm.liby.com.cn/api/getOpenId.htm"; 19 let wxOauthUrl = global_wx_oauth_url;
20 if (location.href.indexOf("//k.wxpai.cn") > 0) { 20
21 base = "https://api.k.wxpai.cn/bizproxy"
22 baseWxAppid = "wx9fc8816188c0ef2a";
23 wxOauthUrl = "http://clubwxuat.hm.liby.com.cn/api/getOpenId.htm";
24 }
25 21
26 let whileList = [ 22 let whileList = [
27 "https://api.k.wxpai.cn/bizproxy/kdapi/file/upload" 23 "https://api.k.wxpai.cn/bizproxy/kdapi/file/upload"
...@@ -46,7 +42,7 @@ axios.interceptors.request.use( ...@@ -46,7 +42,7 @@ axios.interceptors.request.use(
46 // 响应拦截器 42 // 响应拦截器
47 axios.interceptors.response.use( 43 axios.interceptors.response.use(
48 response => { 44 response => {
49 if(!response){ 45 if (!response) {
50 return; 46 return;
51 } 47 }
52 if (response.status === 200) { 48 if (response.status === 200) {
...@@ -57,7 +53,7 @@ axios.interceptors.response.use( ...@@ -57,7 +53,7 @@ axios.interceptors.response.use(
57 store.removeSession(); 53 store.removeSession();
58 store.saveRedirectUrl(); 54 store.saveRedirectUrl();
59 Router.push("/"); 55 Router.push("/");
60 } else { 56 } else {
61 Toast(response.data.errMsg); 57 Toast(response.data.errMsg);
62 } 58 }
63 return Promise.reject(response); 59 return Promise.reject(response);
...@@ -144,6 +140,13 @@ export const store = { ...@@ -144,6 +140,13 @@ export const store = {
144 } 140 }
145 localStorage.setItem("_jiajia_childrenhost_redirect", JSON.stringify(data)); 141 localStorage.setItem("_jiajia_childrenhost_redirect", JSON.stringify(data));
146 }, 142 },
143 saveWorksRedirectUrl(worksCode) {
144 let data = {
145 route: "/list",
146 params: { worksCode: worksCode }
147 };
148 localStorage.setItem("_jiajia_childrenhost_redirect", JSON.stringify(data));
149 },
147 getRedirectUrl() { 150 getRedirectUrl() {
148 let dataStr = localStorage.getItem("_jiajia_childrenhost_redirect"); 151 let dataStr = localStorage.getItem("_jiajia_childrenhost_redirect");
149 if (dataStr) { 152 if (dataStr) {
...@@ -209,16 +212,16 @@ export const request = { ...@@ -209,16 +212,16 @@ export const request = {
209 let requestUrl = url.indexOf("://") >= 0 ? `${url}` : `${base}${url}`; 212 let requestUrl = url.indexOf("://") >= 0 ? `${url}` : `${base}${url}`;
210 return axios.post(requestUrl, formData, formDataHeaders) 213 return axios.post(requestUrl, formData, formDataHeaders)
211 }, 214 },
212 build(url, params){ 215 build(url, params) {
213 let fullUrl = `${base}${url}`; 216 let fullUrl = `${base}${url}`;
214 let split = ""; 217 let split = "";
215 for(let key in params){ 218 for (let key in params) {
216 if(split){ 219 if (split) {
217 split = "&"; 220 split = "&";
218 } else { 221 } else {
219 split = "?" 222 split = "?"
220 } 223 }
221 fullUrl += split + key +"="+params[key]; 224 fullUrl += split + key + "=" + params[key];
222 } 225 }
223 return fullUrl; 226 return fullUrl;
224 }, 227 },
......

965 Bytes | W: | H:

2.28 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.46 KB | W: | H:

3.26 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.5 KB | W: | H:

7.34 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.6 KB | W: | H:

7.01 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

30.3 KB | W: | H:

30.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

5.93 KB | W: | H:

9.13 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
...@@ -26,16 +26,16 @@ ...@@ -26,16 +26,16 @@
26 <span class="tip">优惠券可以在立乐家商城购物当现金使用</span> 26 <span class="tip">优惠券可以在立乐家商城购物当现金使用</span>
27 </div> 27 </div>
28 <div 28 <div
29 class="sys-btn-02 base-top" 29 class="sys-btn-02 base-top-2"
30 @click="toViewIntegralHandler" 30 @click="toViewIntegralHandler"
31 v-if="data.drawResult.prizeType == 'integral'" 31 v-if="data.drawResult.prizeType == 'integral'"
32 >前往查看</div> 32 >前往查看</div>
33 <div 33 <div
34 class="sys-btn-02 base-top" 34 class="sys-btn-02 base-top-2"
35 @click="toViewCouponHandler" 35 @click="toViewCouponHandler"
36 v-if="data.drawResult.prizeType == 'coupon'" 36 v-if="data.drawResult.prizeType == 'coupon'"
37 >前往使用</div> 37 >前往使用</div>
38 <div class="sys-btn-02" @click="modelBtnClickHandler">返回抽奖</div> 38 <div class="sys-btn-02" @click="modelBtnClickHandler">返回</div>
39 </div> 39 </div>
40 </div> 40 </div>
41 41
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
214 214
215 .prize-name { 215 .prize-name {
216 font-size: 28px; 216 font-size: 28px;
217 margin-bottom: 30px; 217 // margin-bottom: 30px;
218 font-weight: bold; 218 font-weight: bold;
219 } 219 }
220 220
...@@ -244,6 +244,11 @@ export default { ...@@ -244,6 +244,11 @@ export default {
244 .base-top { 244 .base-top {
245 margin-top: 60px !important; 245 margin-top: 60px !important;
246 } 246 }
247
248 .base-top-2 {
249 margin-top: 80px !important;
250 }
251
247 .content { 252 .content {
248 padding-bottom: 60px; 253 padding-bottom: 60px;
249 } 254 }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 position: relative; 19 position: relative;
20 left: 0; 20 left: 0;
21 top: 0; 21 top: 0;
22 z-index: 999; 22 z-index: 99;
23 } 23 }
24 </style> 24 </style>
25 25
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -31,10 +31,18 @@ export default { ...@@ -31,10 +31,18 @@ export default {
31 }, 31 },
32 methods: { 32 methods: {
33 init() { 33 init() {
34 let params = this.analysisParams();
35 let worksCode = params["worksCode"];
36 if (worksCode) {
37 store.saveWorksRedirectUrl(worksCode);
38 let link = location.origin + location.pathname;
39 location.href = link;
40 return;
41 }
42
34 if (store.getSession()) { 43 if (store.getSession()) {
35 this.$router.push("/index"); 44 this.toNextPath();
36 } else { 45 } else {
37 let params = this.analysisParams();
38 if (params["openId"]) { 46 if (params["openId"]) {
39 this.loginParam.openid = params["openId"]; 47 this.loginParam.openid = params["openId"];
40 this.loginParam.accessToken = params["access_token"]; 48 this.loginParam.accessToken = params["access_token"];
...@@ -60,12 +68,15 @@ export default { ...@@ -60,12 +68,15 @@ export default {
60 store.toWxLogin(); 68 store.toWxLogin();
61 } else { 69 } else {
62 store.putSession(res.sessionId); 70 store.putSession(res.sessionId);
63 let path = store.getRedirectUrl(); 71 this.toNextPath();
64 path = !path ? "/index" : path;
65 store.delRedirectUrl();
66 this.$router.push(path);
67 } 72 }
68 }); 73 });
74 },
75 toNextPath() {
76 let path = store.getRedirectUrl();
77 path = !path ? "/index" : path;
78 store.delRedirectUrl();
79 this.$router.push(path);
69 } 80 }
70 }, 81 },
71 created() { 82 created() {
......
...@@ -346,7 +346,7 @@ export default { ...@@ -346,7 +346,7 @@ export default {
346 position: fixed; 346 position: fixed;
347 left: 0; 347 left: 0;
348 top: 30px; 348 top: 30px;
349 z-index: 2000; 349 z-index: 100;
350 } 350 }
351 .btn-prize-list{ 351 .btn-prize-list{
352 width: 166px; 352 width: 166px;
...@@ -356,6 +356,6 @@ export default { ...@@ -356,6 +356,6 @@ export default {
356 position: fixed; 356 position: fixed;
357 right: 0; 357 right: 0;
358 top: 30px; 358 top: 30px;
359 z-index: 2000; 359 z-index: 100;
360 } 360 }
361 </style> 361 </style>
......
...@@ -77,6 +77,9 @@ export default { ...@@ -77,6 +77,9 @@ export default {
77 // this.searchWorksHandler(); 77 // this.searchWorksHandler();
78 // }, 78 // },
79 toWorksViewHandler(code) { 79 toWorksViewHandler(code) {
80 let link = location.origin + location.pathname;
81 link += "?worksCode=" + code;
82 as.setShare(link, null, null, null);
80 this.$emit("worksDetail", { worksCode: code }); 83 this.$emit("worksDetail", { worksCode: code });
81 }, 84 },
82 searchWorksHandler(action) { 85 searchWorksHandler(action) {
...@@ -92,32 +95,34 @@ export default { ...@@ -92,32 +95,34 @@ export default {
92 }); 95 });
93 } 96 }
94 console.log("this.listForm === ", this.listForm); 97 console.log("this.listForm === ", this.listForm);
95 httpGet({ url: urls.list, data: this.listForm }).then(res => { 98 httpGet({ url: urls.list, data: this.listForm })
96 Toast.clear(); 99 .then(res => {
97 let list = []; 100 Toast.clear(true);
98 if (this.listForm.page != 1) { 101 let list = [];
99 list = this.worksList; 102 if (this.listForm.page != 1) {
100 } 103 list = this.worksList;
104 }
101 105
102 let tempList = []; 106 let tempList = [];
103 for (let index = 0; index < res.list.length; index++) { 107 for (let index = 0; index < res.list.length; index++) {
104 if (index % 2 == 0) { 108 if (index % 2 == 0) {
105 tempList = []; 109 tempList = [];
106 list.push(tempList); 110 list.push(tempList);
111 }
112 tempList.push(res.list[index]);
107 } 113 }
108 tempList.push(res.list[index]); 114 // console.log(list);
109 }
110 // console.log(list);
111 115
112 // list = list.concat(res.list); 116 // list = list.concat(res.list);
113 this.worksList = list; 117 this.worksList = list;
114 118
115 // 加载更多 119 // 加载更多
116 this.hasMore = res.list.length == this.listForm.size; 120 this.hasMore = res.list.length == this.listForm.size;
117 this.isLoading = false; 121 this.isLoading = false;
118 }).catch(e=>{ 122 })
119 Toast.clear(); 123 .catch(e => {
120 }); 124 Toast.clear(true);
125 });
121 }, 126 },
122 refreshMore() { 127 refreshMore() {
123 // console.log("refresh more"); 128 // console.log("refresh more");
...@@ -126,6 +131,9 @@ export default { ...@@ -126,6 +131,9 @@ export default {
126 } 131 }
127 }, 132 },
128 created() { 133 created() {
134 // if (!this.isLoading && this.listForm.page == 0) {
135 // this.refreshMore();
136 // }
129 // this.initActvity(); 137 // this.initActvity();
130 } 138 }
131 }; 139 };
...@@ -161,7 +169,7 @@ export default { ...@@ -161,7 +169,7 @@ export default {
161 padding-left: 20px; 169 padding-left: 20px;
162 font-size: 28px; 170 font-size: 28px;
163 position: relative; 171 position: relative;
164 z-index: 1000; 172 z-index: 100;
165 } 173 }
166 } 174 }
167 175
...@@ -171,7 +179,7 @@ export default { ...@@ -171,7 +179,7 @@ export default {
171 background: url(../../../assets/imgs/list-search-btn.png); 179 background: url(../../../assets/imgs/list-search-btn.png);
172 background-size: 100%; 180 background-size: 100%;
173 position: relative; 181 position: relative;
174 z-index: 1000; 182 z-index: 100;
175 } 183 }
176 } 184 }
177 185
...@@ -227,7 +235,7 @@ export default { ...@@ -227,7 +235,7 @@ export default {
227 .worksPraise { 235 .worksPraise {
228 width: 28px; 236 width: 28px;
229 height: 24px; 237 height: 24px;
230 background: url(../../../assets/imgs/list-heart-red.png); 238 background: url(../../../assets/imgs/list-heart-red.png) no-repeat;
231 background-size: 100%; 239 background-size: 100%;
232 } 240 }
233 } 241 }
......
...@@ -99,7 +99,6 @@ export default { ...@@ -99,7 +99,6 @@ export default {
99 }, 99 },
100 methods: { 100 methods: {
101 praiseHandler() { 101 praiseHandler() {
102 as.setShare("","","","");
103 Toast.loading({ 102 Toast.loading({
104 mask: true, 103 mask: true,
105 message: "请稍等..." 104 message: "请稍等..."
...@@ -119,7 +118,6 @@ export default { ...@@ -119,7 +118,6 @@ export default {
119 } 118 }
120 }); 119 });
121 }, 120 },
122
123 showShareHandler() { 121 showShareHandler() {
124 // 出现分享层 122 // 出现分享层
125 this.$emit("showShare"); 123 this.$emit("showShare");
...@@ -297,6 +295,6 @@ export default { ...@@ -297,6 +295,6 @@ export default {
297 position: fixed; 295 position: fixed;
298 left: 0; 296 left: 0;
299 top: 30px; 297 top: 30px;
300 z-index: 1000; 298 z-index: 100;
301 } 299 }
302 </style> 300 </style>
......
...@@ -277,6 +277,6 @@ export default { ...@@ -277,6 +277,6 @@ export default {
277 position: fixed; 277 position: fixed;
278 left: 0; 278 left: 0;
279 top: 30px; 279 top: 30px;
280 z-index: 1000; 280 z-index: 100;
281 } 281 }
282 </style> 282 </style>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 5
6 <works-list-view 6 <works-list-view
7 v-model="formData" 7 v-model="formData"
8 v-if="init" 8 v-if="init && listVisiabled"
9 v-show="listVisiabled" 9 v-show="listVisiabled"
10 v-on:showRule="showRuleHandler" 10 v-on:showRule="showRuleHandler"
11 v-on:worksDetail="showWorksDetail" 11 v-on:worksDetail="showWorksDetail"
...@@ -90,22 +90,47 @@ export default { ...@@ -90,22 +90,47 @@ export default {
90 }; 90 };
91 }, 91 },
92 methods: { 92 methods: {
93 initUrlQuery() {
94 let worksCode = this.$route.query.worksCode;
95 console.log("worksCode === ", worksCode);
96 if (worksCode) {
97 Toast.loading({
98 mask: true,
99 message: "加载中..."
100 });
101 console.log("get data === ", worksCode);
102 httpGet({ url: urls.getWorks, data: { worksCode: worksCode } }).then(
103 res => {
104 if (res && res.data) {
105 this.memberWorks.data = res.data;
106 this.memberWorks.isMy = res.isMy;
107 this.listVisiabled = false;
108 }
109 this.initActivity();
110 Toast.clear();
111 }
112 );
113 } else {
114 console.log("init activity");
115 this.initActivity();
116 }
117 },
93 initActivity() { 118 initActivity() {
94 Toast.loading({ 119 this.init = true;
95 mask: true, 120 // Toast.loading({
96 message: "加载中..." 121 // mask: true,
97 }); 122 // message: "加载中..."
98 123 // });
99 httpGet({ url: urls.myWork }).then(res => { 124 // httpGet({ url: urls.myWork }).then(res => {
100 this.init = true; 125 // this.init = true;
101 this.formData = res.data || {}; 126 // this.formData = res.data || {};
102 if (!res.data) { 127 // if (!res.data) {
103 this.formEdit = true; 128 // this.formEdit = true;
104 } else { 129 // } else {
105 this.formEdit = false; 130 // this.formEdit = false;
106 } 131 // }
107 Toast.clear(); 132 // Toast.clear();
108 }); 133 // });
109 }, 134 },
110 showRuleHandler() { 135 showRuleHandler() {
111 this.model.show = true; 136 this.model.show = true;
...@@ -150,7 +175,8 @@ export default { ...@@ -150,7 +175,8 @@ export default {
150 } 175 }
151 }, 176 },
152 created() { 177 created() {
153 this.initActivity(); 178 this.initUrlQuery();
179 // this.initActivity();
154 }, 180 },
155 components: { 181 components: {
156 BottomTool, 182 BottomTool,
......
1 <template> 1 <template>
2 <div class="home"> 2 <div class="home">
3 <head-view></head-view> 3 <head-view></head-view>
4 <div class="btn-back" @click="backHandler"></div>
4 5
5 <div class="sys-container-panel content"> 6 <div class="sys-container-panel content">
6 <div class="container-title">{{title}}</div> 7 <div class="container-title">{{title}}</div>
...@@ -100,7 +101,10 @@ export default { ...@@ -100,7 +101,10 @@ export default {
100 // location.href = global_view_integral_url; 101 // location.href = global_view_integral_url;
101 // break; 102 // break;
102 // } 103 // }
103 } 104 },
105 backHandler(){
106 window.history.go(-1);
107 },
104 }, 108 },
105 components: { 109 components: {
106 BottomTool, 110 BottomTool,
...@@ -193,4 +197,16 @@ export default { ...@@ -193,4 +197,16 @@ export default {
193 color: #a1a1a1; 197 color: #a1a1a1;
194 } 198 }
195 } 199 }
200
201 .btn-back {
202 width: 170px;
203 height: 52px;
204 background: url(../../assets/imgs/list-btn-back.png) no-repeat;
205 background-size: 100%;
206 position: fixed;
207 left: 0;
208 top: 30px;
209 z-index: 100;
210 }
211
196 </style> 212 </style>
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
4 <div class="container-title">我要报名</div> 4 <div class="container-title">我要报名</div>
5 <div class="head-line"></div> 5 <div class="head-line"></div>
6 <div class="edit"> 6 <div class="edit">
7 <u @click="formEditHandler"> 7 <div class="btn-edit" @click="formEditHandler">
8 <van-icon name="edit" />信息编辑 8 <div class="icon-edit"></div>
9 </u> 9 <u>信息编辑</u>
10 </div>
10 </div> 11 </div>
11 <div class="swipe"> 12 <div class="swipe">
12 <van-swipe :autoplay="5000"> 13 <van-swipe :autoplay="5000">
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
37 <div class="label">竞赛宣言:</div> 38 <div class="label">竞赛宣言:</div>
38 <div class="msg">{{formData.slogan}}</div> 39 <div class="msg">{{formData.slogan}}</div>
39 </div> 40 </div>
40 41
41 <div class="text-container space top"> 42 <div class="text-container space top">
42 <div class="label">我的简介:</div> 43 <div class="label">我的简介:</div>
43 <div class="msg">{{formData.profile}}</div> 44 <div class="msg">{{formData.profile}}</div>
...@@ -129,15 +130,30 @@ export default { ...@@ -129,15 +130,30 @@ export default {
129 130
130 .edit { 131 .edit {
131 width: 630px; 132 width: 630px;
132 text-align: right; 133 display: flex;
133 u { 134 justify-content: flex-end;
134 font-size: 24px; 135
135 color: #5db288; 136 .btn-edit {
136 position: relative; 137 width: auto;
137 z-index: 1000;
138 display: flex; 138 display: flex;
139 align-items: center; 139 align-items: center;
140 justify-content: flex-end; 140
141 .icon-edit {
142 width: 21px;
143 height: 26px;
144 background: url(../../../assets/imgs/edit-pancel.png) no-repeat;
145 background-size: 100%;
146 }
147
148 u {
149 font-size: 24px;
150 color: #5db288;
151 position: relative;
152 z-index: 1000;
153 display: flex;
154 align-items: center;
155 justify-content: flex-end;
156 }
141 } 157 }
142 } 158 }
143 159
......
...@@ -137,13 +137,13 @@ export default { ...@@ -137,13 +137,13 @@ export default {
137 } else { 137 } else {
138 return; 138 return;
139 } 139 }
140 let title = "我C位出道,需要你的一票"; 140 // let title = "我C位出道,需要你的一票";
141 let desc = this.formData.profile || null; 141 // let desc = this.formData.profile || null;
142 let imgurl = 142 // let imgurl =
143 this.formData.worksList.length > 0 143 // this.formData.worksList.length > 0
144 ? this.formData.worksList[0].worksUrl 144 // ? this.formData.worksList[0].worksUrl
145 : null; 145 // : null;
146 as.setShare(link, title, desc, imgurl); 146 as.setShare(link, "", "", "");
147 } 147 }
148 }, 148 },
149 components: { 149 components: {
......
...@@ -72,6 +72,8 @@ const router = new Router({ ...@@ -72,6 +72,8 @@ const router = new Router({
72 }); 72 });
73 73
74 router.beforeEach((to, from, next) => { 74 router.beforeEach((to, from, next) => {
75 let link = location.origin + location.pathname;
76 as.setShare(link, null, null, null);
75 const title = to.meta && to.meta.title; 77 const title = to.meta && to.meta.title;
76 if (title) { 78 if (title) {
77 document.title = title; 79 document.title = title;
......