Commit 5274a1814da980057a3d096f61bd9ba2500ecc8d

Authored by zhiyangdu
1 parent 9bf7c85c

判断积分不足跳转任务列表

src/pages/goodDetails/goodDetails.vue
@@ -259,8 +259,22 @@ export default { @@ -259,8 +259,22 @@ export default {
259 // 显示通用浮层 259 // 显示通用浮层
260 this.$parent.$refs.showModal.showLayer(); 260 this.$parent.$refs.showModal.showLayer();
261 } else if (res.code == 400) { 261 } else if (res.code == 400) {
262 -  
263 // 获取积分商品详情页失败 262 // 获取积分商品详情页失败
  263 + //
  264 + // 显示查看地址弹框
  265 + let options = {
  266 + title: "积分不足",
  267 + message: "你的积分不足" + "<br>" + "赚取更多积分,请至任务列表",
  268 + messageAlign: "center",
  269 + confirmButtonText: "确定",
  270 + confirmButtonCallback: this.jumpClientIntegralList,
  271 + showCancelButton: true,
  272 + cancelButtonText: "取消"
  273 + };
  274 + this.$set(this.$parent, "showOptions", options);
  275 + // 显示通用浮层
  276 + this.$parent.$refs.showModal.showLayer();
  277 + } else {
264 Toast(res.message); 278 Toast(res.message);
265 } 279 }
266 }, 280 },
@@ -274,6 +288,23 @@ export default { @@ -274,6 +288,23 @@ export default {
274 } 288 }
275 }, 289 },
276 /** 290 /**
  291 + * 跳转赚取积分页面
  292 + * @param {Object} item [数据对象]
  293 + */
  294 + jumpClientIntegralList () {
  295 + // 判断APP内
  296 + if (this.isCNLive.value) {
  297 + // (判断app内是否有该方法)
  298 + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) {
  299 + // 跳转到原生的任务列表
  300 + window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} });
  301 + } else if (window.obj && window.obj.jumpClientIntegralList) {
  302 + // 跳转到原生的任务列表
  303 + window.obj.jumpClientIntegralList();
  304 + }
  305 + }
  306 + },
  307 + /**
277 * 积分商品详情页页面接口 308 * 积分商品详情页页面接口
278 */ 309 */
279 getGoodsInfo () { 310 getGoodsInfo () {