Commit 5edc2711717461d9555751f3823999383158e100
1 parent
058f5420
积分商城样式优化
Showing
2 changed files
with
327 additions
and
297 deletions
src/pages/pointsMall/pointsMall.less
src/pages/pointsMall/pointsMall.vue
| 1 | 1 | <template> |
| 2 | -<div rel="pointsMall"> | |
| 2 | + <div rel="pointsMall"> | |
| 3 | 3 | <!-- H5唤起App组件 --> |
| 4 | - <call-app-box | |
| 5 | - class="call-app-box" | |
| 6 | - :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 7 | - ref="callApp" | |
| 8 | - v-if="!isCNLive.value" | |
| 9 | - :callApps="$parent.callApps" | |
| 10 | - > | |
| 11 | - </call-app-box> | |
| 12 | - <div class="main_box"> | |
| 13 | - <!-- pl --> | |
| 14 | - <div class="pl" :style="'padding-top: ' + $parent.top.value + 'px'" :class="{'is-open-app': $parent.isOpenApp.value,'is-cnlive': isCNLive.value, 'hide': $route.query.hideBack == true}"></div> | |
| 15 | - <div class="share_back-box" :style="'background-color: rgba(255, 233, 234,' + opacity + ')'"> | |
| 16 | - <back-box | |
| 17 | - v-if="isCNLive.value" | |
| 18 | - :class="{'hide': $route.query.hideBack == true}" | |
| 19 | - :style="'padding-top: ' + $parent.top.value + 'px;'" ref="navBox" | |
| 20 | - @back="back" | |
| 21 | - :backs="backs"> | |
| 22 | - </back-box> | |
| 23 | - <!-- 分享下拉选择项 --> | |
| 24 | - <van-popup class="popup_box" v-model="isCNLive.value && showShareItems" @click-overlay="onShowShareItems" :overlay-style="{ top:(parseInt($parent.top.value) + 109)+ 'px' }" :style="'top: ' + (parseInt($parent.top.value) + 76)+ 'px'"> | |
| 25 | - <share-item | |
| 26 | - :class="{'hide': $route.query.hideBack == true}" | |
| 4 | + <call-app-box class="call-app-box" | |
| 5 | + :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 6 | + ref="callApp" | |
| 7 | + v-if="!isCNLive.value" | |
| 8 | + :callApps="$parent.callApps"> | |
| 9 | + </call-app-box> | |
| 10 | + <div class="main_box"> | |
| 11 | + <!-- pl --> | |
| 12 | + <div class="pl" | |
| 13 | + :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 14 | + :class="{'is-open-app': $parent.isOpenApp.value,'is-cnlive': isCNLive.value, 'hide': $route.query.hideBack == true}"></div> | |
| 15 | + <div class="share_back-box" | |
| 16 | + :style="'background-color: rgba(255, 233, 234,' + opacity + ')'"> | |
| 17 | + <back-box v-if="isCNLive.value" | |
| 18 | + :class="{'hide': $route.query.hideBack == true}" | |
| 19 | + :style="'padding-top: ' + $parent.top.value + 'px;'" | |
| 20 | + ref="navBox" | |
| 21 | + @back="back" | |
| 22 | + :backs="backs"> | |
| 23 | + </back-box> | |
| 24 | + <!-- 分享下拉选择项 --> | |
| 25 | + <van-popup class="popup_box" | |
| 26 | + v-model="isCNLive.value && showShareItems" | |
| 27 | + @click-overlay="onShowShareItems" | |
| 28 | + :overlay-style="{ top:(parseInt($parent.top.value) + 109)+ 'px' }" | |
| 29 | + :style="'top: ' + (parseInt($parent.top.value) + 76)+ 'px'"> | |
| 30 | + <share-item :class="{'hide': $route.query.hideBack == true}" | |
| 27 | 31 | @back="back" |
| 28 | 32 | :backs="backs" |
| 29 | 33 | :shareItems="shareItems"></share-item> |
| 30 | - </van-popup> | |
| 31 | - </div> | |
| 32 | - <div class="top_main"> | |
| 33 | - <!-- 积分 --> | |
| 34 | - <div class="left"> | |
| 35 | - <div class="title_t">我的积分</div> | |
| 36 | - <div class="number">{{myGrade || 0}}</div> | |
| 37 | - </div> | |
| 38 | - <!-- 商品类型 --> | |
| 39 | - <div class="item_box" v-if="navs && navs.length"> | |
| 40 | - <div class="item" v-for="(item, index) in navs" :key="index" @click="jumpApp(index+1)"> | |
| 41 | - <img :src="item.simg" alt=""/> | |
| 42 | - <div class="text">{{item.title}}</div> | |
| 43 | - </div> | |
| 44 | - </div> | |
| 45 | - </div> | |
| 46 | - <!-- 为你推荐商品列表 --> | |
| 47 | - <div class="list-box"> | |
| 48 | - <!-- 排行榜描述 --> | |
| 49 | - <div class="ranking_desc" @click="jumpApp(4)"> | |
| 50 | - <div>品质优选 好物随心兑</div> | |
| 51 | - <img src="static/img/pointsMall/right_icon2.png" alt=""/> | |
| 52 | - </div> | |
| 53 | - <!-- 商品展示样式 2 --> | |
| 54 | - <div class="ranking_box"> | |
| 55 | - <goods-item-2 class="item" v-for="(item, index) in goodsLists" :key="index" @jump="toDetail" | |
| 34 | + </van-popup> | |
| 35 | + </div> | |
| 36 | + <div class="top_main"> | |
| 37 | + <!-- 积分 --> | |
| 38 | + <div class="left"> | |
| 39 | + <div class="title_t">我的积分</div> | |
| 40 | + <div class="number">{{myGrade || 0}}</div> | |
| 41 | + </div> | |
| 42 | + <!-- 商品类型 --> | |
| 43 | + <div class="item_box" | |
| 44 | + v-if="navs && navs.length"> | |
| 45 | + <div class="item" | |
| 46 | + v-for="(item, index) in navs" | |
| 47 | + :key="index" | |
| 48 | + @click="jumpApp(index+1)"> | |
| 49 | + <img :src="item.simg" | |
| 50 | + alt="" /> | |
| 51 | + <div class="text">{{item.title}}</div> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <!-- 为你推荐商品列表 --> | |
| 56 | + <div class="list-box"> | |
| 57 | + <!-- 排行榜描述 --> | |
| 58 | + <div class="ranking_desc" | |
| 59 | + @click="jumpApp(4)"> | |
| 60 | + <div>品质优选 好物随心兑</div> | |
| 61 | + <img src="static/img/pointsMall/right_icon2.png" | |
| 62 | + alt="" /> | |
| 63 | + </div> | |
| 64 | + <!-- 商品展示样式 2 --> | |
| 65 | + <div class="ranking_box"> | |
| 66 | + <goods-item-2 class="item" | |
| 67 | + v-for="(item, index) in goodsLists" | |
| 68 | + :key="index" | |
| 69 | + @jump="toDetail" | |
| 56 | 70 | :item="item" |
| 57 | 71 | pid="5"> |
| 58 | - <!-- 添加flag --> | |
| 59 | - <flag slot="flag" v-if="flags && flags.icon && flags.icon[index]" | |
| 60 | - :flag="flags.icon[index]" | |
| 61 | - :position="flags.position" | |
| 62 | - :width="flags.width"> | |
| 63 | - </flag> | |
| 64 | - </goods-item-2> | |
| 65 | - </div> | |
| 66 | - </div> | |
| 67 | - | |
| 68 | - <!-- 满减红包 --> | |
| 69 | - <div v-if="redEnvelopeFull && redEnvelopeFull.list && redEnvelopeFull.list.length" ref="fullReductionBox"> | |
| 70 | - <div class="tab_item_box"> | |
| 71 | - <div class="item active">满减红包</div> | |
| 72 | - <!-- 分割线 --> | |
| 73 | - <div class="line"> </div> | |
| 74 | - <div class="item">满减红包 精品推荐</div> | |
| 75 | - <div @click="toMore(2)" class="more">更多<img src="static/img/icon_more_arrow_right.png" class="" alt=""/></div> | |
| 76 | - </div> | |
| 77 | - <!-- 商品样式 7 列表 --> | |
| 78 | - <goods-item-2 class="item" v-for="(item, index) in redEnvelopeFull.list" :key="index" @jump="toDetail" | |
| 72 | + <!-- 添加flag --> | |
| 73 | + <flag slot="flag" | |
| 74 | + v-if="flags && flags.icon && flags.icon[index]" | |
| 75 | + :flag="flags.icon[index]" | |
| 76 | + :position="flags.position" | |
| 77 | + :width="flags.width"> | |
| 78 | + </flag> | |
| 79 | + </goods-item-2> | |
| 80 | + </div> | |
| 81 | + </div> | |
| 82 | + | |
| 83 | + <!-- 满减红包 --> | |
| 84 | + <div v-if="redEnvelopeFull && redEnvelopeFull.list && redEnvelopeFull.list.length" | |
| 85 | + ref="fullReductionBox"> | |
| 86 | + <div class="tab_item_box"> | |
| 87 | + <div class="item active">满减红包</div> | |
| 88 | + <!-- 分割线 --> | |
| 89 | + <div class="line"> </div> | |
| 90 | + <div class="item">满减红包 精品推荐</div> | |
| 91 | + <div @click="toMore(2)" | |
| 92 | + class="more">更多<img src="static/img/icon_more_arrow_right.png" | |
| 93 | + class="" | |
| 94 | + alt="" /></div> | |
| 95 | + </div> | |
| 96 | + <div class="list-box2"> | |
| 97 | + <!-- 商品样式 7 列表 --> | |
| 98 | + <goods-item-2 class="item" | |
| 99 | + v-if="parseInt(index)<3" | |
| 100 | + v-for="(item, index) in redEnvelopeFull.list" | |
| 101 | + :key="index" | |
| 102 | + @jump="toDetail" | |
| 79 | 103 | :item="item" |
| 80 | 104 | pid="5"> |
| 81 | - </goods-item-2> | |
| 82 | - <!-- <column-list-box class="column-list-box" @jump="toDetail" | |
| 105 | + </goods-item-2> | |
| 106 | + </div> | |
| 107 | + <!-- <column-list-box class="column-list-box" @jump="toDetail" | |
| 83 | 108 | :lists="redEnvelopeFull" |
| 84 | 109 | com="7" company="1"> |
| 85 | 110 | </column-list-box> --> |
| 86 | - </div> | |
| 87 | - | |
| 88 | - | |
| 89 | - <!-- 实物商品 --> | |
| 90 | - <div> | |
| 91 | - <div class="tab_item_box"> | |
| 92 | - <div class="item active">好物兑换</div> | |
| 93 | - <!-- 分割线 --> | |
| 94 | - <div class="line"> </div> | |
| 95 | - <div class="item">实物商品 分值浏览</div> | |
| 96 | - <!-- <div @click="toMore(1)" class="more">更多<img src="static/img/icon_more_arrow_right.png" alt=""/></div> --> | |
| 97 | - </div> | |
| 98 | - <!-- 筛选按钮 --> | |
| 99 | - <card-tabs :tags="tags" :phyicalGoods="phyicalGoods" @tabChange="tabChange" @loadMore="loadMore" @toDetail="toDetail"> | |
| 100 | - </card-tabs> | |
| 101 | - </div> | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + <!-- 实物商品 --> | |
| 114 | + <div> | |
| 115 | + <div class="tab_item_box"> | |
| 116 | + <div class="item active">好物兑换</div> | |
| 117 | + <!-- 分割线 --> | |
| 118 | + <div class="line"> </div> | |
| 119 | + <div class="item">实物商品 分值浏览</div> | |
| 120 | + <!-- <div @click="toMore(1)" class="more">更多<img src="static/img/icon_more_arrow_right.png" alt=""/></div> --> | |
| 102 | 121 | </div> |
| 103 | - <!-- 回到顶部按钮 --> | |
| 104 | - <goto-top | |
| 105 | - class="goto_top_box" | |
| 106 | - :top="parseInt(150)"> | |
| 107 | - </goto-top> | |
| 108 | -</div> | |
| 122 | + <!-- 筛选按钮 --> | |
| 123 | + <card-tabs :tags="tags" | |
| 124 | + :phyicalGoods="phyicalGoods" | |
| 125 | + @tabChange="tabChange" | |
| 126 | + @loadMore="loadMore" | |
| 127 | + @toDetail="toDetail"> | |
| 128 | + </card-tabs> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 131 | + <!-- 回到顶部按钮 --> | |
| 132 | + <goto-top class="goto_top_box" | |
| 133 | + :top="parseInt(150)"> | |
| 134 | + </goto-top> | |
| 135 | + </div> | |
| 109 | 136 | </template> |
| 110 | 137 | |
| 111 | 138 | <script> |
| ... | ... | @@ -135,11 +162,11 @@ export default { |
| 135 | 162 | shareItems: null, // 分享下拉菜单 |
| 136 | 163 | showShareItems: false, // 非向下拉菜单显示隐藏 |
| 137 | 164 | flags: null, // 产品排名flag |
| 138 | - tags:{ | |
| 139 | - list:null, | |
| 140 | - value:null, | |
| 165 | + tags: { | |
| 166 | + list: null, | |
| 167 | + value: null, | |
| 141 | 168 | }, // tabs数据 |
| 142 | - refreshGrade:false, // 是否刷新积分 | |
| 169 | + refreshGrade: false, // 是否刷新积分 | |
| 143 | 170 | version: this.$route.query.version, //长版本号(ios) |
| 144 | 171 | ver: this.$route.query.version //短版本号(Android) |
| 145 | 172 | } |
| ... | ... | @@ -166,27 +193,27 @@ export default { |
| 166 | 193 | }, |
| 167 | 194 | //方法表示一个具体的操作,主要书写业务逻辑; |
| 168 | 195 | methods: { |
| 169 | - /** | |
| 170 | - * tab切换筛选 | |
| 171 | - */ | |
| 172 | - tabChange(index){ | |
| 173 | - if (this.isCNLive.value) { | |
| 174 | - this.tabIndex = index; | |
| 175 | - // 获取商品列表数据tab切换只获取一次数据 | |
| 176 | - if(!this.phyicalGoods[this.tabIndex].isCall){ | |
| 177 | - this.getIntegralNewGoodsList(this.phyicalGoods[index].page); | |
| 178 | - } | |
| 179 | - }else{ | |
| 180 | - this.$parent.callApp(); | |
| 181 | - } | |
| 196 | + /** | |
| 197 | + * tab切换筛选 | |
| 198 | + */ | |
| 199 | + tabChange (index) { | |
| 200 | + if (this.isCNLive.value) { | |
| 201 | + this.tabIndex = index; | |
| 202 | + // 获取商品列表数据tab切换只获取一次数据 | |
| 203 | + if (!this.phyicalGoods[this.tabIndex].isCall) { | |
| 204 | + this.getIntegralNewGoodsList(this.phyicalGoods[index].page); | |
| 205 | + } | |
| 206 | + } else { | |
| 207 | + this.$parent.callApp(); | |
| 208 | + } | |
| 182 | 209 | }, |
| 183 | 210 | /** |
| 184 | 211 | * 上拉加载 |
| 185 | 212 | */ |
| 186 | 213 | loadMore () { |
| 187 | - if (this.phyicalGoods[this.tabIndex].loading === false && this.phyicalGoods[this.tabIndex].isMore === false){ | |
| 188 | - this.$set(this.phyicalGoods[this.tabIndex], "page" , ++ this.phyicalGoods[this.tabIndex].page); | |
| 189 | - this.getIntegralNewGoodsList(this.phyicalGoods[this.tabIndex].page); | |
| 214 | + if (this.phyicalGoods[this.tabIndex].loading === false && this.phyicalGoods[this.tabIndex].isMore === false) { | |
| 215 | + this.$set(this.phyicalGoods[this.tabIndex], "page", ++this.phyicalGoods[this.tabIndex].page); | |
| 216 | + this.getIntegralNewGoodsList(this.phyicalGoods[this.tabIndex].page); | |
| 190 | 217 | } |
| 191 | 218 | }, |
| 192 | 219 | /** |
| ... | ... | @@ -195,21 +222,21 @@ export default { |
| 195 | 222 | * @param {int}type [类型1为实物 2为虚拟物品 3为红包] |
| 196 | 223 | */ |
| 197 | 224 | getIntegralNewGoodsList (page) { |
| 198 | - // 加载中 | |
| 199 | - this.$set(this.phyicalGoods[this.tabIndex], "loading", true); | |
| 200 | - | |
| 201 | - // 加载中提示 | |
| 202 | - // Indicator.open("加载中..."); | |
| 203 | - | |
| 204 | - // 请求接口 | |
| 205 | - this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/integralNewGoodsList", { | |
| 206 | - type: 1, | |
| 207 | - // uid: this.getStore("uid"), | |
| 208 | - page: page || 1, | |
| 209 | - tags_value: this.tags.value // 筛选 | |
| 210 | - }, this.getIntegralNewGoodsListCallback, { | |
| 211 | - method: "POST" | |
| 212 | - }); | |
| 225 | + // 加载中 | |
| 226 | + this.$set(this.phyicalGoods[this.tabIndex], "loading", true); | |
| 227 | + | |
| 228 | + // 加载中提示 | |
| 229 | + // Indicator.open("加载中..."); | |
| 230 | + | |
| 231 | + // 请求接口 | |
| 232 | + this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/integralNewGoodsList", { | |
| 233 | + type: 1, | |
| 234 | + // uid: this.getStore("uid"), | |
| 235 | + page: page || 1, | |
| 236 | + tags_value: this.tags.value // 筛选 | |
| 237 | + }, this.getIntegralNewGoodsListCallback, { | |
| 238 | + method: "POST" | |
| 239 | + }); | |
| 213 | 240 | }, |
| 214 | 241 | |
| 215 | 242 | /** |
| ... | ... | @@ -266,111 +293,111 @@ export default { |
| 266 | 293 | * @param {Object} type [数据类型] |
| 267 | 294 | * 1赚取积分2我的收藏3我的订单4兑换排行榜 |
| 268 | 295 | */ |
| 269 | - jumpApp(type){ | |
| 270 | - if (this.isCNLive.value){ | |
| 271 | - if(type == 1){ | |
| 272 | - this.jumpClientIntegralList(); | |
| 273 | - }else if(type == 2){ | |
| 274 | - this.toExchangeOrder(1) | |
| 275 | - }else if(type == 3){ | |
| 276 | - this.toExchangeOrder(2); | |
| 277 | - }else if(type == 4){ | |
| 278 | - this.toExchangeOrder(3); | |
| 279 | - } | |
| 280 | - }else{ | |
| 281 | - this.$parent.callApp(); | |
| 282 | - } | |
| 296 | + jumpApp (type) { | |
| 297 | + if (this.isCNLive.value) { | |
| 298 | + if (type == 1) { | |
| 299 | + this.jumpClientIntegralList(); | |
| 300 | + } else if (type == 2) { | |
| 301 | + this.toExchangeOrder(1) | |
| 302 | + } else if (type == 3) { | |
| 303 | + this.toExchangeOrder(2); | |
| 304 | + } else if (type == 4) { | |
| 305 | + this.toExchangeOrder(3); | |
| 306 | + } | |
| 307 | + } else { | |
| 308 | + this.$parent.callApp(); | |
| 309 | + } | |
| 283 | 310 | }, |
| 284 | 311 | /** |
| 285 | 312 | * @param {Object} type [数据类型] |
| 286 | 313 | * 1平台客服2分享好友3积分规则 |
| 287 | 314 | */ |
| 288 | - jumpType(item){ | |
| 289 | - this.showShareItems = false; | |
| 290 | - if(item.params == 1){ | |
| 291 | - if (this.isCNLive.value) { | |
| 292 | - let options; | |
| 293 | - if (this.isAndroid.value) { | |
| 294 | - if (this.ver != "") { | |
| 295 | - var ver = this.ver ? this.ver.replace(/\.*/g, "") : ""; | |
| 296 | - } | |
| 297 | - var isVer = 1909; | |
| 298 | - if (ver > isVer) { | |
| 299 | - // (判断app内是否有该方法) | |
| 300 | - if (window.obj && window.obj.jumpCustomerService) { | |
| 301 | - // 跳转到原生的客服页面 | |
| 302 | - window.obj.jumpCustomerService(); | |
| 303 | - } | |
| 304 | - } else { | |
| 305 | - // 提示用积分兑换兑换 | |
| 306 | - options = { | |
| 307 | - message: "当前版本过旧,请升级最新版本", | |
| 308 | - messageAlign: "center", | |
| 309 | - confirmButtonText: "去更新", | |
| 310 | - confirmButtonCallback: this.appUpdate, | |
| 311 | - showCancelButton: true, | |
| 312 | - cancelButtonText: "取消" | |
| 313 | - }; | |
| 314 | - } | |
| 315 | - } else if (this.isiPhone.value || this.isiPad.value) { | |
| 316 | - if (this.version != "") { | |
| 317 | - var version = this.version ? this.version.replace(/\.*/g, "") : ""; | |
| 318 | - } | |
| 319 | - if (this.mode == "prod") { | |
| 320 | - var isVer = 205; | |
| 321 | - } else { | |
| 322 | - var isVer = 205; | |
| 323 | - } | |
| 324 | - if (version > isVer) { | |
| 325 | - // (判断app内是否有该方法) | |
| 326 | - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpCustomerService) { | |
| 327 | - // 跳转到原生的客服页面 | |
| 328 | - window.webkit.messageHandlers.jumpCustomerService.postMessage({ body: {} }); | |
| 329 | - } | |
| 330 | - } else { | |
| 331 | - // 提示用积分兑换兑换 | |
| 332 | - options = { | |
| 333 | - message: "当前版本过旧,请升级最新版本", | |
| 334 | - messageAlign: "center", | |
| 335 | - confirmButtonText: "去更新", | |
| 336 | - confirmButtonCallback: this.appUpdate, | |
| 337 | - showCancelButton: true, | |
| 338 | - cancelButtonText: "取消" | |
| 339 | - }; | |
| 340 | - } | |
| 315 | + jumpType (item) { | |
| 316 | + this.showShareItems = false; | |
| 317 | + if (item.params == 1) { | |
| 318 | + if (this.isCNLive.value) { | |
| 319 | + let options; | |
| 320 | + if (this.isAndroid.value) { | |
| 321 | + if (this.ver != "") { | |
| 322 | + var ver = this.ver ? this.ver.replace(/\.*/g, "") : ""; | |
| 323 | + } | |
| 324 | + var isVer = 1909; | |
| 325 | + if (ver > isVer) { | |
| 326 | + // (判断app内是否有该方法) | |
| 327 | + if (window.obj && window.obj.jumpCustomerService) { | |
| 328 | + // 跳转到原生的客服页面 | |
| 329 | + window.obj.jumpCustomerService(); | |
| 341 | 330 | } |
| 342 | - // 调用showModal层参数 | |
| 343 | - this.$set(this.$parent, "showOptions", options); | |
| 344 | - // 显示通用浮层 | |
| 345 | - this.$parent.$refs.showModal.showLayer(); | |
| 346 | - } | |
| 347 | - }else if(item.params == 2){ | |
| 348 | - // 判断分享 | |
| 349 | - if (typeof this.$parent.toShare === 'function') { | |
| 350 | - this.$parent.toShare(45, "1", ""); | |
| 351 | - } | |
| 352 | - }else if(item.params == 3){ | |
| 353 | - // 通用跳转跳转到商品详情页新打开webview | |
| 354 | - if (typeof this.$parent.gotoDetail === 'function') { | |
| 355 | - // 设置跳转参数 | |
| 356 | - let params = { | |
| 357 | - type: '34', | |
| 358 | - to: 'http://wjjh5'+(this.mode == 'prod'?'':'test') + '.cnlive.com/integralRules.html?type=web', | |
| 359 | - shop_type: '' | |
| 331 | + } else { | |
| 332 | + // 提示用积分兑换兑换 | |
| 333 | + options = { | |
| 334 | + message: "当前版本过旧,请升级最新版本", | |
| 335 | + messageAlign: "center", | |
| 336 | + confirmButtonText: "去更新", | |
| 337 | + confirmButtonCallback: this.appUpdate, | |
| 338 | + showCancelButton: true, | |
| 339 | + cancelButtonText: "取消" | |
| 360 | 340 | }; |
| 361 | - // 页面跳转 | |
| 362 | - this.$parent.gotoDetail(params); | |
| 363 | 341 | } |
| 342 | + } else if (this.isiPhone.value || this.isiPad.value) { | |
| 343 | + if (this.version != "") { | |
| 344 | + var version = this.version ? this.version.replace(/\.*/g, "") : ""; | |
| 345 | + } | |
| 346 | + if (this.mode == "prod") { | |
| 347 | + var isVer = 205; | |
| 348 | + } else { | |
| 349 | + var isVer = 205; | |
| 350 | + } | |
| 351 | + if (version > isVer) { | |
| 352 | + // (判断app内是否有该方法) | |
| 353 | + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpCustomerService) { | |
| 354 | + // 跳转到原生的客服页面 | |
| 355 | + window.webkit.messageHandlers.jumpCustomerService.postMessage({ body: {} }); | |
| 356 | + } | |
| 357 | + } else { | |
| 358 | + // 提示用积分兑换兑换 | |
| 359 | + options = { | |
| 360 | + message: "当前版本过旧,请升级最新版本", | |
| 361 | + messageAlign: "center", | |
| 362 | + confirmButtonText: "去更新", | |
| 363 | + confirmButtonCallback: this.appUpdate, | |
| 364 | + showCancelButton: true, | |
| 365 | + cancelButtonText: "取消" | |
| 366 | + }; | |
| 367 | + } | |
| 368 | + } | |
| 369 | + // 调用showModal层参数 | |
| 370 | + this.$set(this.$parent, "showOptions", options); | |
| 371 | + // 显示通用浮层 | |
| 372 | + this.$parent.$refs.showModal.showLayer(); | |
| 373 | + } | |
| 374 | + } else if (item.params == 2) { | |
| 375 | + // 判断分享 | |
| 376 | + if (typeof this.$parent.toShare === 'function') { | |
| 377 | + this.$parent.toShare(45, "1", ""); | |
| 364 | 378 | } |
| 379 | + } else if (item.params == 3) { | |
| 380 | + // 通用跳转跳转到商品详情页新打开webview | |
| 381 | + if (typeof this.$parent.gotoDetail === 'function') { | |
| 382 | + // 设置跳转参数 | |
| 383 | + let params = { | |
| 384 | + type: '34', | |
| 385 | + to: 'http://wjjh5' + (this.mode == 'prod' ? '' : 'test') + '.cnlive.com/integralRules.html?type=web', | |
| 386 | + shop_type: '' | |
| 387 | + }; | |
| 388 | + // 页面跳转 | |
| 389 | + this.$parent.gotoDetail(params); | |
| 390 | + } | |
| 391 | + } | |
| 365 | 392 | }, |
| 366 | - // App升级跳转 | |
| 393 | + // App升级跳转 | |
| 367 | 394 | appUpdate () { |
| 368 | 395 | if (this.isiPhone.value || this.isiPad.value) { |
| 369 | 396 | window.location.href = "http://itunes.apple.com/cn/app/id1337575478?mt=8"; |
| 370 | 397 | } else if (this.isAndroid.value) { |
| 371 | - if(this.mode == "prod"){ | |
| 398 | + if (this.mode == "prod") { | |
| 372 | 399 | window.location.href = "http://wjj.ys1.cnliveimg.com/download/ac/1910/strike-1.9.1.0-release.apk"; |
| 373 | - }else{ | |
| 400 | + } else { | |
| 374 | 401 | window.location.href = "http://wjjtest.ys1.cnliveimg.com/download/debug_ac/1910/strike-1.9.1.0-debug.apk"; |
| 375 | 402 | } |
| 376 | 403 | } |
| ... | ... | @@ -378,7 +405,7 @@ export default { |
| 378 | 405 | /** |
| 379 | 406 | * 显示分享弹框 |
| 380 | 407 | */ |
| 381 | - onShowShareItems(){ | |
| 408 | + onShowShareItems () { | |
| 382 | 409 | this.showShareItems = !this.showShareItems; |
| 383 | 410 | }, |
| 384 | 411 | /** |
| ... | ... | @@ -418,7 +445,7 @@ export default { |
| 418 | 445 | if (this.isCNLive.value) { |
| 419 | 446 | // 校验登录 |
| 420 | 447 | if (this.$parent.checkLogin()) { |
| 421 | - if(type ==1){ | |
| 448 | + if (type == 1) { | |
| 422 | 449 | this.$router.push({ |
| 423 | 450 | path: '/pointsMyCollection', |
| 424 | 451 | query: { |
| ... | ... | @@ -426,7 +453,7 @@ export default { |
| 426 | 453 | type: 3 // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城 |
| 427 | 454 | } |
| 428 | 455 | }); |
| 429 | - }else if(type ==2){ | |
| 456 | + } else if (type == 2) { | |
| 430 | 457 | this.$router.push({ |
| 431 | 458 | path: '/pointsExchangeRecords', |
| 432 | 459 | query: { |
| ... | ... | @@ -434,7 +461,7 @@ export default { |
| 434 | 461 | type: 3 // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城 |
| 435 | 462 | } |
| 436 | 463 | }); |
| 437 | - }else if(type == 3){ | |
| 464 | + } else if (type == 3) { | |
| 438 | 465 | this.$router.push({ |
| 439 | 466 | path: '/exchangeRanking', |
| 440 | 467 | query: { |
| ... | ... | @@ -454,7 +481,7 @@ export default { |
| 454 | 481 | jumpClientIntegralList () { |
| 455 | 482 | // 判断APP内 |
| 456 | 483 | if (this.isCNLive.value) { |
| 457 | - // 校验登录 | |
| 484 | + // 校验登录 | |
| 458 | 485 | if (this.$parent.checkLogin()) { |
| 459 | 486 | // (判断app内是否有该方法) |
| 460 | 487 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) { |
| ... | ... | @@ -464,7 +491,7 @@ export default { |
| 464 | 491 | // 跳转到原生的任务列表 |
| 465 | 492 | window.obj.jumpClientIntegralList(); |
| 466 | 493 | } |
| 467 | - } | |
| 494 | + } | |
| 468 | 495 | } else { |
| 469 | 496 | this.$parent.callApp(); |
| 470 | 497 | } |
| ... | ... | @@ -475,22 +502,22 @@ export default { |
| 475 | 502 | */ |
| 476 | 503 | toDetail (item) { |
| 477 | 504 | if (this.isCNLive.value) { |
| 478 | - // 校验登录 | |
| 479 | - if (this.$parent.checkLogin()) { | |
| 480 | - // 通用跳转跳转到商品详情页新打开webview | |
| 481 | - if (typeof this.$parent.gotoDetail === 'function') { | |
| 482 | - | |
| 483 | - // 设置跳转参数 | |
| 484 | - let params = { | |
| 485 | - type: '5', | |
| 486 | - to: window.location.origin + '/html/select_good/1/#/goodDetails?goodsId=' + item.id, | |
| 487 | - shop_type: '' | |
| 488 | - }; | |
| 489 | - | |
| 490 | - // 页面跳转 | |
| 491 | - this.$parent.gotoDetail(params); | |
| 492 | - } | |
| 493 | - } | |
| 505 | + // 校验登录 | |
| 506 | + if (this.$parent.checkLogin()) { | |
| 507 | + // 通用跳转跳转到商品详情页新打开webview | |
| 508 | + if (typeof this.$parent.gotoDetail === 'function') { | |
| 509 | + | |
| 510 | + // 设置跳转参数 | |
| 511 | + let params = { | |
| 512 | + type: '5', | |
| 513 | + to: window.location.origin + '/html/select_good/1/#/goodDetails?goodsId=' + item.id, | |
| 514 | + shop_type: '' | |
| 515 | + }; | |
| 516 | + | |
| 517 | + // 页面跳转 | |
| 518 | + this.$parent.gotoDetail(params); | |
| 519 | + } | |
| 520 | + } | |
| 494 | 521 | } else { |
| 495 | 522 | this.$parent.callApp(); |
| 496 | 523 | } |
| ... | ... | @@ -554,7 +581,7 @@ export default { |
| 554 | 581 | // 请求接口 |
| 555 | 582 | this.http("/Api/" + (this.getApiVersion().LuckDraw) + "/integralNewIndex", { |
| 556 | 583 | uid: this.getStore("uid"), |
| 557 | - goods_id:this.$route.query.user_selected_goods_id || 0 // 记录从优选库那个商品点击进入进来的 | |
| 584 | + goods_id: this.$route.query.user_selected_goods_id || 0 // 记录从优选库那个商品点击进入进来的 | |
| 558 | 585 | }, this.integralMallIndexCallback, { |
| 559 | 586 | method: "POST" |
| 560 | 587 | }); |
| ... | ... | @@ -576,26 +603,26 @@ export default { |
| 576 | 603 | let { data: datas } = res; |
| 577 | 604 | this.info = datas |
| 578 | 605 | /* 积分商场首页信息 开始 */ |
| 579 | - if(this.refreshGrade == true){ | |
| 580 | - /*用户信息 */ | |
| 581 | - this.$set(this, "myGrade", datas.grade); | |
| 582 | - }else{ | |
| 583 | - /*用户信息 */ | |
| 606 | + if (this.refreshGrade == true) { | |
| 607 | + /*用户信息 */ | |
| 608 | + this.$set(this, "myGrade", datas.grade); | |
| 609 | + } else { | |
| 610 | + /*用户信息 */ | |
| 584 | 611 | this.$set(this, "myGrade", datas.grade); |
| 585 | 612 | /*为你推荐 */ |
| 586 | 613 | this.$set(this, "goodsLists", datas.hot_goods); |
| 587 | 614 | /*tabs数据 */ |
| 588 | 615 | this.$set(this.tags, "list", datas.tags); |
| 589 | - for(var i=0; i<= this.tags.list.length; i++){ | |
| 590 | - this.$set(this.phyicalGoods, i, | |
| 591 | - { | |
| 592 | - loading: true, | |
| 593 | - distance: 50, | |
| 594 | - page: 1, | |
| 595 | - isCall: false, // 是否调用接口 | |
| 596 | - isMore: false, | |
| 597 | - list: [], | |
| 598 | - }); | |
| 616 | + for (var i = 0; i <= this.tags.list.length; i++) { | |
| 617 | + this.$set(this.phyicalGoods, i, | |
| 618 | + { | |
| 619 | + loading: true, | |
| 620 | + distance: 50, | |
| 621 | + page: 1, | |
| 622 | + isCall: false, // 是否调用接口 | |
| 623 | + isMore: false, | |
| 624 | + list: [], | |
| 625 | + }); | |
| 599 | 626 | } |
| 600 | 627 | // 获取商品列表全部商品数据 |
| 601 | 628 | this.getIntegralNewGoodsList(this.phyicalGoods[0].page); |
| ... | ... | @@ -699,15 +726,15 @@ export default { |
| 699 | 726 | |
| 700 | 727 | // 设置产品排名flag对象 |
| 701 | 728 | this.$set(this, 'flags', { |
| 702 | - icon: [ | |
| 703 | - 'static/img/icon_n1.png', | |
| 704 | - 'static/img/icon_n2.png', | |
| 705 | - 'static/img/icon_n3.png' | |
| 706 | - ], | |
| 707 | - position: { | |
| 708 | - top: -6, | |
| 709 | - left: 20 | |
| 710 | - } | |
| 729 | + icon: [ | |
| 730 | + 'static/img/icon_n1.png', | |
| 731 | + 'static/img/icon_n2.png', | |
| 732 | + 'static/img/icon_n3.png' | |
| 733 | + ], | |
| 734 | + position: { | |
| 735 | + top: -6, | |
| 736 | + left: 20 | |
| 737 | + } | |
| 711 | 738 | }); |
| 712 | 739 | // 判断是否在App内 |
| 713 | 740 | if (this.isCNLive.value) { |
| ... | ... | @@ -730,29 +757,29 @@ export default { |
| 730 | 757 | // 设置标题 |
| 731 | 758 | this.$set(this.backs, 'title', '积分商城'); |
| 732 | 759 | // 右上角三个点下拉菜单 |
| 733 | - this.$set(this, 'shareItems', [ | |
| 734 | - { | |
| 735 | - simg: 'static/img/pointsMall/share01.png', | |
| 736 | - title: '平台客服', | |
| 737 | - icon: 'static/img/pointsMall/right_icon.png', | |
| 738 | - func: this.jumpType, | |
| 739 | - params: 1, | |
| 740 | - }, | |
| 741 | - { | |
| 742 | - simg: 'static/img/pointsMall/share02.png', | |
| 743 | - title: '分享好友', | |
| 744 | - icon: 'static/img/pointsMall/right_icon.png', | |
| 745 | - func: this.jumpType, | |
| 746 | - params: 2, | |
| 747 | - }, | |
| 748 | - { | |
| 749 | - simg: 'static/img/pointsMall/share03.png', | |
| 750 | - title: '积分规则', | |
| 751 | - icon: 'static/img/pointsMall/right_icon.png', | |
| 752 | - func: this.jumpType, | |
| 753 | - params: 3, | |
| 754 | - } | |
| 755 | - ]); | |
| 760 | + this.$set(this, 'shareItems', [ | |
| 761 | + { | |
| 762 | + simg: 'static/img/pointsMall/share01.png', | |
| 763 | + title: '平台客服', | |
| 764 | + icon: 'static/img/pointsMall/right_icon.png', | |
| 765 | + func: this.jumpType, | |
| 766 | + params: 1, | |
| 767 | + }, | |
| 768 | + { | |
| 769 | + simg: 'static/img/pointsMall/share02.png', | |
| 770 | + title: '分享好友', | |
| 771 | + icon: 'static/img/pointsMall/right_icon.png', | |
| 772 | + func: this.jumpType, | |
| 773 | + params: 2, | |
| 774 | + }, | |
| 775 | + { | |
| 776 | + simg: 'static/img/pointsMall/share03.png', | |
| 777 | + title: '积分规则', | |
| 778 | + icon: 'static/img/pointsMall/right_icon.png', | |
| 779 | + func: this.jumpType, | |
| 780 | + params: 3, | |
| 781 | + } | |
| 782 | + ]); | |
| 756 | 783 | } |
| 757 | 784 | // 获取积分商城商品信息接口 |
| 758 | 785 | this.integralMallIndex(); |
| ... | ... | @@ -780,11 +807,11 @@ export default { |
| 780 | 807 | } |
| 781 | 808 | // 分享详情页 |
| 782 | 809 | if (typeof this.$parent.getShareData === "function") { |
| 783 | - this.$parent.getShareData({ | |
| 784 | - type: 45, | |
| 785 | - id: this.$route.query.id || 1, | |
| 786 | - url: "" | |
| 787 | - }); | |
| 810 | + this.$parent.getShareData({ | |
| 811 | + type: 45, | |
| 812 | + id: this.$route.query.id || 1, | |
| 813 | + url: "" | |
| 814 | + }); | |
| 788 | 815 | } |
| 789 | 816 | } |
| 790 | 817 | |
| ... | ... | @@ -810,8 +837,8 @@ export default { |
| 810 | 837 | @import 'pointsMall'; |
| 811 | 838 | </style> |
| 812 | 839 | <style> |
| 813 | -.goto_top_box{ | |
| 814 | - z-index:2 !important; | |
| 840 | +.goto_top_box { | |
| 841 | + z-index: 2 !important; | |
| 815 | 842 | } |
| 816 | 843 | </style> |
| 817 | 844 | ... | ... |