Commit 6cea6c57ec506713448d965d4bbe25c6c24e0aae

Authored by zhiyangdu
1 parent d92b6ff1

党建积分商城

src/pages/partyBuildingGoodDetails/partyBuildingGoodDetails.vue
... ... @@ -318,7 +318,7 @@ export default {
318 318 title: "",
319 319 message: "兑换将会消耗" + this.goodsInfo.num + "积分值" + '<br/>' + "确定兑换吗?",
320 320 confirmButtonText: "确定",
321   - confirmButtonCallback: this.addLuckHealthOrderconfirm,
  321 + confirmButtonCallback: this.addLuckIntegralOrderconfirm,
322 322 showCancelButton: true,
323 323 cancelButtonText: "取消"
324 324 };
... ... @@ -329,7 +329,7 @@ export default {
329 329 }
330 330 },
331 331 // 确定兑换回调
332   - addLuckHealthOrderconfirm () {
  332 + addLuckIntegralOrderconfirm () {
333 333 /**
334 334 * 判断shop_type是否等于1等于1为实物弹出填写地址,其他商品直接走兑换接口
335 335 */
... ... @@ -351,7 +351,7 @@ export default {
351 351 // isExchange为false才可兑换防止连续点击
352 352 if (!this.isExchange) {
353 353 // 兑换
354   - this.addLuckHealthOrder();
  354 + this.addLuckIntegralOrder();
355 355 }
356 356 }
357 357 },
... ... @@ -367,16 +367,16 @@ export default {
367 367 /**
368 368 * 积分值兑换接口
369 369 */
370   - addLuckHealthOrder (addressId) {
  370 + addLuckIntegralOrder (addressId) {
371 371 // 加载中提示
372 372 Indicator.open("加载中...");
373 373 // 获取证书请求接口
374   - this.http("/Api/" + this.getApiVersion().LuckDraw + "/addLuckHealthOrder", {
  374 + this.http("/Api/" + this.getApiVersion().LuckDraw + "/addLuckIntegralOrder", {
375 375 uid: this.getStore("uid"),
376 376 id: this.$route.query.goodsId, // 商品ID
377 377 num: 1, // 数量
378 378 addressId: this.currentAddress.id || "" // 实物商品ID
379   - }, this.addLuckHealthOrderCallback, {
  379 + }, this.addLuckIntegralOrderCallback, {
380 380 method: "POST"
381 381 });
382 382 },
... ... @@ -386,7 +386,7 @@ export default {
386 386 * @param {Object} res [服务器返回数据]
387 387 * @param {Object} ext [扩展参数]
388 388 */
389   - addLuckHealthOrderCallback (res, ext) {
  389 + addLuckIntegralOrderCallback (res, ext) {
390 390  
391 391 // 加载完成
392 392 Indicator.close();
... ... @@ -445,29 +445,7 @@ export default {
445 445 */
446 446 jumpClientIntegralList () {
447 447 // 判断APP内
448   - if (this.isCNLive.value) {
449   - // 跳转封装
450   - if (typeof this.$parent.gotoDetail === 'function') {
451   - // 设置跳转参数
452   - let params = {
453   - type: '34',
454   - to: this.mode == 'prod' ? "http://wjjh5.cnlive.com/cnStepApp.html?isShowTitle=true&type=web" : "http://wjjh5test.cnlive.com/cnStepApp.html?isShowTitle=true&type=web",
455   - shop_type: ''
456   - };
457   - console.log(params);
458   - // 页面跳转
459   - this.$parent.gotoDetail(params);
460   - }
461   -
462   - // (判断app内是否有该方法)
463   - // if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) {
464   - // // 跳转到原生的任务列表
465   - // window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} });
466   - // } else if (window.obj && window.obj.jumpClientIntegralList) {
467   - // // 跳转到原生的任务列表
468   - // window.obj.jumpClientIntegralList();
469   - // }
470   - }
  448 + window.location.href = "http://wjjh5" + (this.mode == 'pred' ? "" : "test") + ".cnlive.com/cnStepApp.html?isShowTitle=true&type=web"
471 449 },
472 450 /**
473 451 * 积分值商品详情页页面接口
... ... @@ -580,7 +558,7 @@ export default {
580 558 this.$set(this.addressModalOptions, 'phone', this.currentAddress.phone);
581 559 this.$set(this.addressModalOptions, 'address', this.currentAddress.address);
582 560 this.$set(this.addressModalOptions, 'confirmButtonText', '确定');
583   - this.$set(this.addressModalOptions, 'confirmButtonCallback', this.addLuckHealthOrder);
  561 + this.$set(this.addressModalOptions, 'confirmButtonCallback', this.addLuckIntegralOrder);
584 562 this.$set(this.addressModalOptions, 'cancelButtonText', '更换地址');
585 563 this.$set(this.addressModalOptions, 'cancelButtonClass', 'btn-yellow');
586 564 this.$set(this.addressModalOptions, 'cancelButtonCallback', this.toAddressList);
... ...
src/pages/partyBuildingPointsMall/partyBuildingPointsMall.vue
... ... @@ -124,21 +124,21 @@ export default {
124 124 },
125 125 //方法表示一个具体的操作,主要书写业务逻辑;
126 126 methods: {
127   - /**
128   - * 跳转到兑换记录详情页
129   - * @param {Object} item [数据对象]
130   - */
  127 + /**
  128 + * 跳转到兑换记录详情页
  129 + * @param {Object} item [数据对象]
  130 + */
131 131 toExchangeRecord () {
132   - // 校验登录
133   - if (this.$parent.checkLogin()) {
134   - this.$router.push({
135   - path: '/pointsExchangeRecords',
136   - query: {
137   - uid: this.getStore("uid"),
138   - type: this.$route.query.type // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城 10 党建积分商城
139   - }
140   - })
141   - }
  132 + // 校验登录
  133 + if (this.$parent.checkLogin()) {
  134 + this.$router.push({
  135 + path: '/pointsExchangeRecords',
  136 + query: {
  137 + uid: this.getStore("uid"),
  138 + type: this.$route.query.type // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城 10 党建积分商城
  139 + }
  140 + })
  141 + }
142 142 },
143 143 /**
144 144 * 上拉加载
... ... @@ -218,29 +218,13 @@ export default {
218 218 toDetail (item) {
219 219 // 校验登录
220 220 if (this.$parent.checkLogin()) {
221   - if (this.isCNLive.value) {
222   - 通用跳转跳转到商品详情页新打开webview
223   - if (typeof this.$parent.gotoDetail === 'function') {
224   -
225   - // 设置跳转参数
226   - let params = {
227   - type: '5',
228   - to: window.location.origin + '/html/select_good/1/#/healthGoodDetails?goodsId=' + item.id,
229   - shop_type: ''
230   - };
231   -
232   - // 页面跳转
233   - this.$parent.gotoDetail(params);
  221 + // 路由跳转到党建答题积分商品详情页
  222 + this.$router.push({
  223 + path: "/partyBuildingGoodDetails",
  224 + query: {
  225 + goodsId: item.id
234 226 }
235   - } else {
236   - // 路由跳转到党建答题积分商品详情页
237   - this.$router.push({
238   - path: "/partyBuildingGoodDetails",
239   - query: {
240   - goodsId: item.id
241   - }
242   - });
243   - }
  227 + });
244 228 }
245 229 },
246 230 /**
... ... @@ -265,7 +249,7 @@ export default {
265 249 this.$parent.callApp();
266 250 }
267 251 },
268   - // 积分商场首页
  252 + // 积分商场首页
269 253 /**
270 254 * 获取积分商场首页信息
271 255 * * @param {string} uid [用户id]
... ... @@ -278,7 +262,7 @@ export default {
278 262 // 请求接口
279 263 this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/integralNewIndex", {
280 264 uid: this.getStore("uid"),
281   - goods_id:this.$route.query.user_selected_goods_id || 0 // 记录从优选库那个商品点击进入进来的
  265 + goods_id: this.$route.query.user_selected_goods_id || 0 // 记录从优选库那个商品点击进入进来的
282 266 }, this.integralMallIndexCallback, {
283 267 method: "POST"
284 268 });
... ... @@ -368,9 +352,9 @@ export default {
368 352 /*设置标题 */
369 353 this.$set(this.backs, 'title', "积分商城");
370 354 }
371   - if( this.$parent.checkLogin()){
372   - // 获取积分商城商品信息接口
373   - this.integralMallIndex();
  355 + if (this.$parent.checkLogin()) {
  356 + // 获取积分商城商品信息接口
  357 + this.integralMallIndex();
374 358 }
375 359 },
376 360 mounted () {
... ...