ad8ddc13 by joe

1

1 parent 5e304d4f
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
103 </div> 103 </div>
104 <div class="rule-line"> 104 <div class="rule-line">
105 <div>5.</div> 105 <div>5.</div>
106 <div>报名截止时间9月19日23:59,投票截止时间9月20日23:59,最终入围名单将在9月21日在立乐家微信公众号公布</div> 106 <div>投票截止时间9月27日中午12:00,最终入围名单将在9月30日在立乐家微信公众号公布</div>
107 </div> 107 </div>
108 <div class="rule-line"> 108 <div class="rule-line">
109 <div>6.</div> 109 <div>6.</div>
......
...@@ -112,24 +112,32 @@ export default { ...@@ -112,24 +112,32 @@ export default {
112 mask: true, 112 mask: true,
113 message: "请稍等..." 113 message: "请稍等..."
114 }); 114 });
115 httpGet({ url: urls.index }).then(res => { 115 httpGet({ url: urls.index })
116 if (res.isSubcribe == 1) { 116 .then(res => {
117 let data = { 117 if (res.isSubcribe == 1) {
118 worksCode: this.formData.worksCode 118 let data = {
119 }; 119 worksCode: this.formData.worksCode
120 request.post(urls.praise, data).then(res => { 120 };
121 request.post(urls.praise, data).then(res => {
122 Toast.clear();
123 this.$emit("praiseSuccess");
124 });
125 } else {
121 Toast.clear(); 126 Toast.clear();
122 this.$emit("praiseSuccess"); 127 httpGet({
123 }); 128 url: urls.cache,
124 } else { 129 data: { worksCode: this.formData.worksCode }
130 }).then(res => {});
131 this.model.show = true;
132 }
133 })
134 .catch(res => {
135 console.log(res);
136 this.loading = false;
125 Toast.clear(); 137 Toast.clear();
126 httpGet({ 138 let msg = res.data && res.data.errMsg ? res.data.errMsg : "点赞失败";
127 url: urls.cache, 139 Toast(msg);
128 data: { worksCode: this.formData.worksCode } 140 });
129 }).then(res => {});
130 this.model.show = true;
131 }
132 });
133 }, 141 },
134 showShareHandler() { 142 showShareHandler() {
135 // 出现分享层 143 // 出现分享层
...@@ -143,7 +151,7 @@ export default { ...@@ -143,7 +151,7 @@ export default {
143 BizModel 151 BizModel
144 }, 152 },
145 created() { 153 created() {
146 console.log("created") 154 console.log("created");
147 let code = this.formData.worksCode; 155 let code = this.formData.worksCode;
148 let link = location.origin + location.pathname; 156 let link = location.origin + location.pathname;
149 link += "?worksCode=" + code; 157 link += "?worksCode=" + code;
......
...@@ -222,9 +222,10 @@ export default { ...@@ -222,9 +222,10 @@ export default {
222 this.$emit("submit", data); 222 this.$emit("submit", data);
223 }) 223 })
224 .catch(res => { 224 .catch(res => {
225 console.log(res);
225 this.loading = false; 226 this.loading = false;
226 Toast.clear(); 227 Toast.clear();
227 let msg = res.errMsg ? res.errMsg : "作品提交失败"; 228 let msg = res.data && res.data.errMsg ? res.data.errMsg : "作品提交失败";
228 Toast(msg); 229 Toast(msg);
229 }); 230 });
230 } 231 }
......
...@@ -97,9 +97,8 @@ export default { ...@@ -97,9 +97,8 @@ export default {
97 httpGet({ url: urls.myWork }).then(res => { 97 httpGet({ url: urls.myWork }).then(res => {
98 // this.model.index = "submit"; 98 // this.model.index = "submit";
99 // this.model.show = true; 99 // this.model.show = true;
100
101 this.init = true; 100 this.init = true;
102 Toast.clear(); 101 Toast.clear(true);
103 this.formData = res.data || {}; 102 this.formData = res.data || {};
104 if (!res.data) { 103 if (!res.data) {
105 this.formEdit = true; 104 this.formEdit = true;
......