Commit 52b61eb87423f9764169f5de4080992fc521e34a

Authored by zhiyangdu
1 parent 8257256f

还原填写地址组件组装到兑换记录页面

src/components/appAddressToast/appAddressToast.vue
@@ -132,8 +132,7 @@ export default { @@ -132,8 +132,7 @@ export default {
132 confirm () { 132 confirm () {
133 // 最新地址信息回传给父组件 133 // 最新地址信息回传给父组件
134 // this.$parent.addressInfo = this.addressInfo; 134 // this.$parent.addressInfo = this.addressInfo;
135 - // this.addLuckDrawAddress();  
136 - this.$emit("toUpdate", this.addressInfo.id); 135 + this.addLuckDrawAddress();
137 // 隐藏弹框 136 // 隐藏弹框
138 this.$parent.pointsToast_control = false; 137 this.$parent.pointsToast_control = false;
139 }, 138 },
@@ -151,42 +150,42 @@ export default { @@ -151,42 +150,42 @@ export default {
151 * *@param {string} id [商品id] 150 * *@param {string} id [商品id]
152 * *@param {string} id_card [身份证id] 151 * *@param {string} id_card [身份证id]
153 */ 152 */
154 - // addLuckDrawAddress () {  
155 - // // 加载中提示  
156 - // Indicator.open("加载中...");  
157 - // // 请求接口  
158 - // this.http(  
159 - // "/Api/" + this.getApiVersion().LuckDraw + "/addLuckIntegralAddress",  
160 - // {  
161 - // uid: this.getStore("uid"),  
162 - // addressId: this.addressInfo.id,  
163 - // id: this.itemInfo.id // 商品ID  
164 - // },  
165 - // this.addLuckDrawAddressCallback,  
166 - // {  
167 - // method: "POST"  
168 - // // ext: this.itemInfo  
169 - // }  
170 - // );  
171 - // }, 153 + addLuckDrawAddress () {
  154 + // 加载中提示
  155 + Indicator.open("加载中...");
  156 + // 请求接口
  157 + this.http(
  158 + "/Api/" + this.getApiVersion().LuckDraw + "/addLuckIntegralAddress",
  159 + {
  160 + uid: this.getStore("uid"),
  161 + addressId: this.addressInfo.id,
  162 + id: this.itemInfo.id // 商品ID
  163 + },
  164 + this.addLuckDrawAddressCallback,
  165 + {
  166 + method: "POST"
  167 + // ext: this.itemInfo
  168 + }
  169 + );
  170 + },
172 171
173 /** 172 /**
174 * 提交中奖的商品信息 173 * 提交中奖的商品信息
175 * @param {object} res [服务器返回数据] 174 * @param {object} res [服务器返回数据]
176 * @param {object} ext [扩展参数] 175 * @param {object} ext [扩展参数]
177 */ 176 */
178 - // addLuckDrawAddressCallback (res, ext) {  
179 - // // 加载完成  
180 - // Indicator.close();  
181 - // // 返回处理  
182 - // if (res.code == 200) {  
183 - // Toast("提交成功等待发货");  
184 - // this.$emit("toUpdate", this.itemInfo, this.addressInfo);  
185 - // } else {  
186 - // // 兑换礼品失败  
187 - // Toast(res.message);  
188 - // }  
189 - // } 177 + addLuckDrawAddressCallback (res, ext) {
  178 + // 加载完成
  179 + Indicator.close();
  180 + // 返回处理
  181 + if (res.code == 200) {
  182 + Toast("提交成功等待发货");
  183 + this.$emit("toUpdate", this.itemInfo, this.addressInfo);
  184 + } else {
  185 + // 兑换礼品失败
  186 + Toast(res.message);
  187 + }
  188 + }
190 } 189 }
191 }; 190 };
192 </script> 191 </script>