Commit ef46d7c8e80e54e61e0922d4428802c699f7672a
Merge branch 'version_2.0.0_optimization_mall_update' of http://bj.gitlab.cnlive…
….com/w-front-end/select_good into version_2.0.0_optimization_mall_update
Showing
2 changed files
with
52 additions
and
20 deletions
src/pages/healthGoodDetails/healthGoodDetails.less
| @@ -142,8 +142,17 @@ | @@ -142,8 +142,17 @@ | ||
| 142 | display:flex; | 142 | display:flex; |
| 143 | justify-content: center; | 143 | justify-content: center; |
| 144 | align-items: center; | 144 | align-items: center; |
| 145 | + .desc{ | ||
| 146 | + height: 130px; | ||
| 147 | + font-size: 30px; | ||
| 148 | + font-weight: 400; | ||
| 149 | + color: #333333; | ||
| 150 | + line-height: 130px; | ||
| 151 | + margin: 0 30px; | ||
| 152 | + } | ||
| 145 | .btn{ | 153 | .btn{ |
| 146 | - width: 690px; | 154 | + flex: 1; |
| 155 | + margin: 20px 30px; | ||
| 147 | height: 90px; | 156 | height: 90px; |
| 148 | line-height: 90px; | 157 | line-height: 90px; |
| 149 | background: #F5A623; | 158 | background: #F5A623; |
src/pages/healthGoodDetails/healthGoodDetails.vue
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | <!-- 标题 --> | 41 | <!-- 标题 --> |
| 42 | <div v-if="goodsInfo && goodsInfo.title" class="title"> | 42 | <div v-if="goodsInfo && goodsInfo.title" class="title"> |
| 43 | {{goodsInfo.title}} | 43 | {{goodsInfo.title}} |
| 44 | - </div> | 44 | + </div> |
| 45 | <!-- 积分 --> | 45 | <!-- 积分 --> |
| 46 | <div class="title-t"> | 46 | <div class="title-t"> |
| 47 | <span v-if="goodsInfo && goodsInfo.prices" class="price">¥{{goodsInfo.prices}}</span> | 47 | <span v-if="goodsInfo && goodsInfo.prices" class="price">¥{{goodsInfo.prices}}</span> |
| @@ -96,11 +96,18 @@ | @@ -96,11 +96,18 @@ | ||
| 96 | </column-list-box> | 96 | </column-list-box> |
| 97 | </div> | 97 | </div> |
| 98 | </div> | 98 | </div> |
| 99 | - <!-- 页脚 --> | ||
| 100 | - <div class="footer"> | 99 | + <!-- 有积分页脚显示 --> |
| 100 | + <!-- <div class="footer"> | ||
| 101 | <div class="btn" @click="exchange"> | 101 | <div class="btn" @click="exchange"> |
| 102 | 立即兑换 | 102 | 立即兑换 |
| 103 | </div> | 103 | </div> |
| 104 | + </div> --> | ||
| 105 | + <!-- 积分不足页脚显示 --> | ||
| 106 | + <div class="footer"> | ||
| 107 | + <div class="desc">还差1000积分</div> | ||
| 108 | + <div class="btn" @click="jumpClientIntegralList"> | ||
| 109 | + 获取积分 | ||
| 110 | + </div> | ||
| 104 | </div> | 111 | </div> |
| 105 | <!-- 地址信息组件 --> | 112 | <!-- 地址信息组件 --> |
| 106 | <app-address-toast ref="itemsInfo" @toUpdate="toLinkPointsMall" v-show="pointsToast_control"></app-address-toast> | 113 | <app-address-toast ref="itemsInfo" @toUpdate="toLinkPointsMall" v-show="pointsToast_control"></app-address-toast> |
| @@ -164,6 +171,18 @@ export default { | @@ -164,6 +171,18 @@ export default { | ||
| 164 | } | 171 | } |
| 165 | }, | 172 | }, |
| 166 | toLinkPointsMall () { | 173 | toLinkPointsMall () { |
| 174 | + // 显示查看地址弹框 | ||
| 175 | + let options = { | ||
| 176 | + message: "兑换成功", | ||
| 177 | + messageAlign: "center", | ||
| 178 | + confirmButtonText: "我知道了", | ||
| 179 | + confirmButtonCallback:"" | ||
| 180 | + // confirmButtonCallback: this.addAddressCallback, | ||
| 181 | + // params: { shopType: datas.shop_type, id: datas.id } | ||
| 182 | + }; | ||
| 183 | + this.$set(this.$parent, "showOptions", options); | ||
| 184 | + // 显示通用浮层 | ||
| 185 | + this.$parent.$refs.showModal.showLayer(); | ||
| 167 | // 调用back返回上一页 | 186 | // 调用back返回上一页 |
| 168 | // this.back(); | 187 | // this.back(); |
| 169 | // this.$router.push({ | 188 | // this.$router.push({ |
| @@ -239,11 +258,19 @@ export default { | @@ -239,11 +258,19 @@ export default { | ||
| 239 | }, | 258 | }, |
| 240 | // 确定兑换回调 | 259 | // 确定兑换回调 |
| 241 | addIntegralOrderconfirm () { | 260 | addIntegralOrderconfirm () { |
| 242 | - // isExchange为false才可兑换防止连续点击 | ||
| 243 | - if (!this.isExchange) { | ||
| 244 | - // 兑换 | ||
| 245 | - this.addIntegralOrder(); | ||
| 246 | - } | 261 | + /** |
| 262 | + * 判断shop_type是否等于1等于1为实物弹出填写地址,其他商品直接走兑换接口 | ||
| 263 | + */ | ||
| 264 | + if(this.goodsInfo.shop_type){ | ||
| 265 | + // 实物弹出填写地址 | ||
| 266 | + this.addAddressCallback() | ||
| 267 | + }else{ | ||
| 268 | + // isExchange为false才可兑换防止连续点击 | ||
| 269 | + if (!this.isExchange) { | ||
| 270 | + // 兑换 | ||
| 271 | + this.addIntegralOrder(); | ||
| 272 | + } | ||
| 273 | + } | ||
| 247 | }, | 274 | }, |
| 248 | /** | 275 | /** |
| 249 | * 分享 | 276 | * 分享 |
| @@ -255,7 +282,7 @@ export default { | @@ -255,7 +282,7 @@ export default { | ||
| 255 | } | 282 | } |
| 256 | }, | 283 | }, |
| 257 | /** | 284 | /** |
| 258 | - * 积分商品详情页页面接口 | 285 | + * 积分兑换接口 |
| 259 | */ | 286 | */ |
| 260 | addIntegralOrder () { | 287 | addIntegralOrder () { |
| 261 | // 加载中提示 | 288 | // 加载中提示 |
| @@ -271,7 +298,7 @@ export default { | @@ -271,7 +298,7 @@ export default { | ||
| 271 | }, | 298 | }, |
| 272 | 299 | ||
| 273 | /** | 300 | /** |
| 274 | - * 积分商品详情页页面接口回调 | 301 | + * 积分兑换接口回调 |
| 275 | * @param {Object} res [服务器返回数据] | 302 | * @param {Object} res [服务器返回数据] |
| 276 | * @param {Object} ext [扩展参数] | 303 | * @param {Object} ext [扩展参数] |
| 277 | */ | 304 | */ |
| @@ -293,9 +320,7 @@ export default { | @@ -293,9 +320,7 @@ export default { | ||
| 293 | }, 1500); | 320 | }, 1500); |
| 294 | // 提示语判断 | 321 | // 提示语判断 |
| 295 | let tipMessage; | 322 | let tipMessage; |
| 296 | - if (datas.shop_type == 1) { | ||
| 297 | - tipMessage = "兑换成功" | ||
| 298 | - } else if (datas.shop_type == 2) { | 323 | + if (datas.shop_type == 2) { |
| 299 | tipMessage = "红包已存入您的账户,可前往“我的”—“我的卡券查看”" | 324 | tipMessage = "红包已存入您的账户,可前往“我的”—“我的卡券查看”" |
| 300 | } else if (datas.shop_type == 3) { | 325 | } else if (datas.shop_type == 3) { |
| 301 | tipMessage = "付费音频已存入您的账户,可前往“我的”—“我的付费内容”—“已购内容收听”" | 326 | tipMessage = "付费音频已存入您的账户,可前往“我的”—“我的付费内容”—“已购内容收听”" |
| @@ -305,8 +330,9 @@ export default { | @@ -305,8 +330,9 @@ export default { | ||
| 305 | message: tipMessage, | 330 | message: tipMessage, |
| 306 | messageAlign: "center", | 331 | messageAlign: "center", |
| 307 | confirmButtonText: "我知道了", | 332 | confirmButtonText: "我知道了", |
| 308 | - confirmButtonCallback: this.addAddressCallback, | ||
| 309 | - params: { shopType: datas.shop_type, id: datas.id } | 333 | + confirmButtonCallback:"" |
| 334 | + // confirmButtonCallback: this.addAddressCallback, | ||
| 335 | + // params: { shopType: datas.shop_type, id: datas.id } | ||
| 310 | }; | 336 | }; |
| 311 | this.$set(this.$parent, "showOptions", options); | 337 | this.$set(this.$parent, "showOptions", options); |
| 312 | // 显示通用浮层 | 338 | // 显示通用浮层 |
| @@ -332,13 +358,10 @@ export default { | @@ -332,13 +358,10 @@ export default { | ||
| 332 | } | 358 | } |
| 333 | }, | 359 | }, |
| 334 | // 填写地址 | 360 | // 填写地址 |
| 335 | - addAddressCallback (params) { | ||
| 336 | - // 如果是实物弹起填写地址弹窗 | ||
| 337 | - if (params.shopType == 1) { | 361 | + addAddressCallback () { |
| 338 | this.pointsToast_control = true; | 362 | this.pointsToast_control = true; |
| 339 | // 礼品兑换弹框派发 | 363 | // 礼品兑换弹框派发 |
| 340 | this.$refs.itemsInfo.getItemInfo(this.goodsInfo, params.id) | 364 | this.$refs.itemsInfo.getItemInfo(this.goodsInfo, params.id) |
| 341 | - } | ||
| 342 | }, | 365 | }, |
| 343 | /** | 366 | /** |
| 344 | * 跳转赚取积分页面 | 367 | * 跳转赚取积分页面 |