Commit 53022cbfe3eff48988bee040281e67e7820ca084

Authored by zhiyangdu
1 parent 8472b787

健康商城详情页优化

src/pages/healthGoodDetails/healthGoodDetails.less
... ... @@ -142,8 +142,17 @@
142 142 display:flex;
143 143 justify-content: center;
144 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 153 .btn{
146   - width: 690px;
  154 + flex: 1;
  155 + margin: 20px 30px;
147 156 height: 90px;
148 157 line-height: 90px;
149 158 background: #F5A623;
... ...
src/pages/healthGoodDetails/healthGoodDetails.vue
... ... @@ -41,7 +41,7 @@
41 41 <!-- 标题 -->
42 42 <div v-if="goodsInfo && goodsInfo.title" class="title">
43 43 {{goodsInfo.title}}
44   - </div>
  44 + </div>
45 45 <!-- 积分 -->
46 46 <div class="title-t">
47 47 <span v-if="goodsInfo && goodsInfo.prices" class="price">¥{{goodsInfo.prices}}</span>
... ... @@ -96,11 +96,18 @@
96 96 </column-list-box>
97 97 </div>
98 98 </div>
99   - <!-- 页脚 -->
100   - <div class="footer">
  99 + <!-- 有积分页脚显示 -->
  100 + <!-- <div class="footer">
101 101 <div class="btn" @click="exchange">
102 102 立即兑换
103 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 111 </div>
105 112 <!-- 地址信息组件 -->
106 113 <app-address-toast ref="itemsInfo" @toUpdate="toLinkPointsMall" v-show="pointsToast_control"></app-address-toast>
... ... @@ -164,6 +171,18 @@ export default {
164 171 }
165 172 },
166 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 186 // 调用back返回上一页
168 187 // this.back();
169 188 // this.$router.push({
... ... @@ -239,11 +258,19 @@ export default {
239 258 },
240 259 // 确定兑换回调
241 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 282 }
256 283 },
257 284 /**
258   - * 积分商品详情页页面接口
  285 + * 积分兑换接口
259 286 */
260 287 addIntegralOrder () {
261 288 // 加载中提示
... ... @@ -271,7 +298,7 @@ export default {
271 298 },
272 299  
273 300 /**
274   - * 积分商品详情页页面接口回调
  301 + * 积分兑换接口回调
275 302 * @param {Object} res [服务器返回数据]
276 303 * @param {Object} ext [扩展参数]
277 304 */
... ... @@ -293,9 +320,7 @@ export default {
293 320 }, 1500);
294 321 // 提示语判断
295 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 324 tipMessage = "红包已存入您的账户,可前往“我的”—“我的卡券查看”"
300 325 } else if (datas.shop_type == 3) {
301 326 tipMessage = "付费音频已存入您的账户,可前往“我的”—“我的付费内容”—“已购内容收听”"
... ... @@ -305,8 +330,9 @@ export default {
305 330 message: tipMessage,
306 331 messageAlign: "center",
307 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 337 this.$set(this.$parent, "showOptions", options);
312 338 // 显示通用浮层
... ... @@ -332,13 +358,10 @@ export default {
332 358 }
333 359 },
334 360 // 填写地址
335   - addAddressCallback (params) {
336   - // 如果是实物弹起填写地址弹窗
337   - if (params.shopType == 1) {
  361 + addAddressCallback () {
338 362 this.pointsToast_control = true;
339 363 // 礼品兑换弹框派发
340 364 this.$refs.itemsInfo.getItemInfo(this.goodsInfo, params.id)
341   - }
342 365 },
343 366 /**
344 367 * 跳转赚取积分页面
... ...