Commit 7febf6d13cb677fbe49d0bc6fa6553bf3b2e1b7e
1 parent
87a6730e
解决云测bug输入框焦点失去操作和登录检验
Showing
2 changed files
with
334 additions
and
261 deletions
src/pages/goodDetails/goodDetails.vue
| 1 | 1 | <template> |
| 2 | -<div class="good-details-box"> | |
| 2 | + <div class="good-details-box"> | |
| 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 | - <back-box | |
| 13 | - v-if="isCNLive.value" | |
| 14 | - :class="{'hide': $route.query.hideBack == true}" | |
| 15 | - class="back-box" | |
| 16 | - :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 17 | - @back="back" | |
| 18 | - :backs="backs" | |
| 19 | - > | |
| 20 | - </back-box> | |
| 21 | - <!-- pl --> | |
| 22 | - <div class="pl" :style="'padding-top: ' + $parent.top.value + 'px'" :class="{'is-cnlive': isCNLive.value, 'is-open-app': $parent.isOpenApp.value, 'hide': $route.query.hideBack == true}"></div> | |
| 23 | - <!--轮播--> | |
| 24 | - <!-- <swiper | |
| 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 | + <back-box v-if="isCNLive.value" | |
| 11 | + :class="{'hide': $route.query.hideBack == true}" | |
| 12 | + class="back-box" | |
| 13 | + :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 14 | + @back="back" | |
| 15 | + :backs="backs"> | |
| 16 | + </back-box> | |
| 17 | + <!-- pl --> | |
| 18 | + <div class="pl" | |
| 19 | + :style="'padding-top: ' + $parent.top.value + 'px'" | |
| 20 | + :class="{'is-cnlive': isCNLive.value, 'is-open-app': $parent.isOpenApp.value, 'hide': $route.query.hideBack == true}"></div> | |
| 21 | + <!--轮播--> | |
| 22 | + <!-- <swiper | |
| 25 | 23 | :style=" |
| 26 | 24 | 'margin-top:' + |
| 27 | 25 | ($parent.isBack && isCNLive.value ? 62 : 10) + |
| ... | ... | @@ -35,190 +33,256 @@ |
| 35 | 33 | }" |
| 36 | 34 | > |
| 37 | 35 | </swiper> --> |
| 38 | - <img v-if="goodsInfo && goodsInfo.simg" class="goods-img" v-lazy="goodsInfo.simg" alt=""/> | |
| 39 | - <!-- 内容 --> | |
| 40 | - <div class="main-box"> | |
| 41 | - <!-- 标题 --> | |
| 42 | - <div v-if="goodsInfo && goodsInfo.title" class="title"> | |
| 43 | - {{goodsInfo.title}} | |
| 44 | - </div> | |
| 45 | - <!-- 积分 --> | |
| 46 | - <div class="title-t"> | |
| 47 | - <div v-show="goodsInfo && goodsInfo.price>0" class="goods_tip"> | |
| 48 | - 积分+现金 | |
| 49 | - </div> | |
| 50 | - <div> | |
| 51 | - <!-- <span v-if="goodsInfo && goodsInfo.price" class="price">¥{{goodsInfo.price}}</span> --> | |
| 52 | - <span v-if="goodsInfo && goodsInfo.num" class="integral">{{parseInt(goodsInfo.num)>9999?this.formatDecimal((parseInt(goodsInfo.num) / 10000), 0) +"万":goodsInfo.num}}积分<span v-show="goodsInfo.price>0"> + {{goodsInfo.price}}元</span></span> | |
| 53 | - <!-- <span class="integral-in">积分</span> --> | |
| 54 | - </div> | |
| 55 | - </div> | |
| 56 | - <!-- 商品信息 --> | |
| 57 | - <div class="goods-info"> | |
| 58 | - <div v-show="goodsInfo && goodsInfo.content" class="good-title"> | |
| 59 | - <span class="left"></span>商品详情<span class="right"></span> | |
| 60 | - </div> | |
| 61 | - <!-- 虚拟商品展示 --> | |
| 62 | - <div v-if="goodsInfo && goodsInfo.content && goodsInfo.shop_type !=1" v-html="goodsInfo.content" class="good-desc html_box"> | |
| 63 | - </div> | |
| 64 | - <!-- 实物商品展示 --> | |
| 65 | - <div v-else-if="goodsInfo && goodsInfo.content && goodsInfo.content.length && goodsInfo.shop_type ==1" class="good-desc html_box"> | |
| 66 | - <img v-for="(item,index) in goodsInfo.content" :key=" 't' + index" :src="item" alt="商品图片"/> | |
| 67 | - </div> | |
| 68 | - <!-- 商品规格 --> | |
| 69 | - <div v-if="goodsInfo && goodsInfo.attr" class="good-title"> | |
| 70 | - <span class="left"></span>商品规格<span class="right"></span> | |
| 71 | - </div> | |
| 72 | - <div v-if="goodsInfo && goodsInfo.attr" class="item_sku_box"> | |
| 73 | - <div v-for="(item,index) in goodsInfo.attr" :key="index" class="item_sku"> | |
| 74 | - <div class="left">{{item.k}}</div> | |
| 75 | - <div class="right"><span>{{item.v}}</span></div> | |
| 76 | - </div> | |
| 77 | - </div> | |
| 78 | - <div class="good-title"> | |
| 79 | - <span class="left"></span>兑换规则<span class="right"></span> | |
| 80 | - </div> | |
| 81 | - <div class="good-desc"> | |
| 82 | - <!-- 实物 --> | |
| 83 | - <div v-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 1"> | |
| 84 | - <div class="text-left"> | |
| 85 | - <span class="blue">本商品为积分+现金的方式进行兑换。</span><br> | |
| 86 | - 用户兑换后可在我的-我的订单中查看详情及物流。 | |
| 87 | - </div> | |
| 88 | - <div class="text-left"> | |
| 89 | - <span>· 正版授权</span> | |
| 90 | - 所售商品均已官方授权,请放心购买; | |
| 91 | - </div> | |
| 92 | - <div class="text-left"> | |
| 93 | - <span>· 正品保障</span> | |
| 94 | - 独家正品保障。 | |
| 95 | - </div> | |
| 96 | - <div class="text-left"> | |
| 97 | - 客服说明:如有疑问请联系平台客服,电话:<a href="tel:010-65832485">010-65832485</a><br> | |
| 98 | - </div> | |
| 99 | - </div> | |
| 100 | - <!-- 优惠券 --> | |
| 101 | - <div v-else-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 2"> | |
| 102 | - <div class="desc_title">兑换流程</div> | |
| 103 | - <div class="text-left"> | |
| 104 | - 1、 本券以积分进行兑换,兑换后将直接进入到用户的虚拟账户中。<br> 2、 用户兑换后可在我的-我的卡券中进行查看。 | |
| 105 | - </div> | |
| 106 | - <div class="desc_title mar_top10">注意事项</div> | |
| 107 | - <div class="text-left"> | |
| 108 | - 1、 使用说明:每个手机号码只能领取一次;优惠券兑换后不退,过期不补,请兑换后尽快使用。<br> | |
| 109 | - 2、 优惠券有效期:自兑换之日起一个月。<br> | |
| 110 | - 3、 适用商品:除特殊商品外,全平台商品可用。<br> | |
| 111 | - 4、 客服说明:如有疑问请联系平台客服,电话:<a href="tel:010-65832485">010-65832485</a> | |
| 112 | - </div> | |
| 113 | - </div> | |
| 114 | - <!-- 虚拟商品 --> | |
| 115 | - <div v-else-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 3" class="text-left"> | |
| 116 | - 1、 本商品以积分进行兑换。兑换后将直接进入到用户的虚拟账户中。<br> | |
| 117 | - 2、 用户兑换后可在我的-我的付费内容中进行查看。<br> | |
| 118 | - <!-- 3、 您兑换的音频内容,音频上线期间可长期收听;<br> --> | |
| 119 | - 3、 兑换后暂不支持退款,感谢您的支持;<br> | |
| 120 | - 4、 兑换完成后若显示异常,请10分钟之后尝试;<br> | |
| 121 | - 5、您兑换的音频内容为网家家版权内容,请勿恶意转载;<br> | |
| 122 | - 6、 客服说明:如有疑问请联系平台客服,电话:<a href="tel:010-65832485">010-65832485</a><br> | |
| 123 | - 7、 具体注意事项详情可见 | |
| 124 | - <span @click="toLink" class="to-link"> | |
| 125 | - 《网家家APP购买音频内容服务协议》 | |
| 126 | - </span> | |
| 127 | - </div> | |
| 128 | - </div> | |
| 129 | - <div class="good-title"> | |
| 130 | - <span class="left"></span>相似商品<span class="right"></span> | |
| 131 | - </div> | |
| 132 | - <!-- 像是商品推荐 --> | |
| 133 | - <!-- 商品样式 7 列表 --> | |
| 134 | - <column-list-box class="column-list-box" v-if="goodsInfo && goodsInfo.list && goodsInfo.list.length" @jump="toDetail" | |
| 135 | - :lists="goodsInfo" | |
| 136 | - com="7" | |
| 137 | - goodType="1"> | |
| 138 | - </column-list-box> | |
| 36 | + <img v-if="goodsInfo && goodsInfo.simg" | |
| 37 | + class="goods-img" | |
| 38 | + v-lazy="goodsInfo.simg" | |
| 39 | + alt="" /> | |
| 40 | + <!-- 内容 --> | |
| 41 | + <div class="main-box"> | |
| 42 | + <!-- 标题 --> | |
| 43 | + <div v-if="goodsInfo && goodsInfo.title" | |
| 44 | + class="title"> | |
| 45 | + {{goodsInfo.title}} | |
| 46 | + </div> | |
| 47 | + <!-- 积分 --> | |
| 48 | + <div class="title-t"> | |
| 49 | + <div v-show="goodsInfo && goodsInfo.price>0" | |
| 50 | + class="goods_tip"> | |
| 51 | + 积分+现金 | |
| 52 | + </div> | |
| 53 | + <div> | |
| 54 | + <!-- <span v-if="goodsInfo && goodsInfo.price" class="price">¥{{goodsInfo.price}}</span> --> | |
| 55 | + <span v-if="goodsInfo && goodsInfo.num" | |
| 56 | + class="integral">{{parseInt(goodsInfo.num)>9999?this.formatDecimal((parseInt(goodsInfo.num) / 10000), 0) +"万":goodsInfo.num}}积分 | |
| 57 | + <span v-show="goodsInfo.price>0"> + {{goodsInfo.price}}元</span> | |
| 58 | + </span> | |
| 59 | + <!-- <span class="integral-in">积分</span> --> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + <!-- 商品信息 --> | |
| 63 | + <div class="goods-info"> | |
| 64 | + <div v-show="goodsInfo && goodsInfo.content" | |
| 65 | + class="good-title"> | |
| 66 | + <span class="left"></span>商品详情 | |
| 67 | + <span class="right"></span> | |
| 68 | + </div> | |
| 69 | + <!-- 虚拟商品展示 --> | |
| 70 | + <div v-if="goodsInfo && goodsInfo.content && goodsInfo.shop_type !=1" | |
| 71 | + v-html="goodsInfo.content" | |
| 72 | + class="good-desc html_box"> | |
| 73 | + </div> | |
| 74 | + <!-- 实物商品展示 --> | |
| 75 | + <div v-else-if="goodsInfo && goodsInfo.content && goodsInfo.content.length && goodsInfo.shop_type ==1" | |
| 76 | + class="good-desc html_box"> | |
| 77 | + <img v-for="(item,index) in goodsInfo.content" | |
| 78 | + :key=" 't' + index" | |
| 79 | + :src="item" | |
| 80 | + alt="商品图片" /> | |
| 81 | + </div> | |
| 82 | + <!-- 商品规格 --> | |
| 83 | + <div v-if="goodsInfo && goodsInfo.attr" | |
| 84 | + class="good-title"> | |
| 85 | + <span class="left"></span>商品规格 | |
| 86 | + <span class="right"></span> | |
| 87 | + </div> | |
| 88 | + <div v-if="goodsInfo && goodsInfo.attr" | |
| 89 | + class="item_sku_box"> | |
| 90 | + <div v-for="(item,index) in goodsInfo.attr" | |
| 91 | + :key="index" | |
| 92 | + class="item_sku"> | |
| 93 | + <div class="left">{{item.k}}</div> | |
| 94 | + <div class="right"> | |
| 95 | + <span>{{item.v}}</span> | |
| 139 | 96 | </div> |
| 97 | + </div> | |
| 98 | + </div> | |
| 99 | + <div class="good-title"> | |
| 100 | + <span class="left"></span>兑换规则 | |
| 101 | + <span class="right"></span> | |
| 140 | 102 | </div> |
| 141 | - <!-- 有积分页脚显示 --> | |
| 142 | - <div v-if="goodsInfo && goodsInfo.stock != 0"> | |
| 143 | - <!-- 积分充足 --> | |
| 144 | - <div v-if="parseInt(goodsInfo.grade || 0)>parseInt(goodsInfo.num) || parseInt(goodsInfo.grade || 0) == parseInt(goodsInfo.num)" class="footer"> | |
| 145 | - <div class="collection_box mar_left20" @click="onCell"> | |
| 146 | - <img v-if="goodsInfo.is_cell == 1" src="static/img/pointsMall/collection2.png" alt="" /> | |
| 147 | - <img v-else src="static/img/pointsMall/collection.png" alt="" /> | |
| 148 | - <div>收藏</div> | |
| 103 | + <div class="good-desc"> | |
| 104 | + <!-- 实物 --> | |
| 105 | + <div v-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 1"> | |
| 106 | + <div class="text-left"> | |
| 107 | + <span class="blue">本商品为积分+现金的方式进行兑换。</span><br> 用户兑换后可在我的-我的订单中查看详情及物流。 | |
| 149 | 108 | </div> |
| 150 | - <div class="btn" @click="exchange"> | |
| 151 | - 立即兑换 | |
| 109 | + <div class="text-left"> | |
| 110 | + <span>· 正版授权</span> | |
| 111 | + 所售商品均已官方授权,请放心购买; | |
| 112 | + </div> | |
| 113 | + <div class="text-left"> | |
| 114 | + <span>· 正品保障</span> | |
| 115 | + 独家正品保障。 | |
| 116 | + </div> | |
| 117 | + <div class="text-left"> | |
| 118 | + 客服说明:如有疑问请联系平台客服,电话: | |
| 119 | + <a href="tel:010-65832485">010-65832485</a><br> | |
| 152 | 120 | </div> |
| 153 | 121 | </div> |
| 154 | - <!-- 积分不足页脚显示 --> | |
| 155 | - <div v-if="parseInt(goodsInfo.grade || 0) < parseInt(goodsInfo.num)" class="footer"> | |
| 156 | - <div class="desc">还差{{parseInt(goodsInfo.num)-parseInt(goodsInfo.grade || 0)}}积分</div> | |
| 157 | - <div class="line"></div> | |
| 158 | - <div class="collection_box" @click="onCell"> | |
| 159 | - <img v-if="goodsInfo.is_cell == 1" src="static/img/pointsMall/collection2.png" alt="" /> | |
| 160 | - <img v-else src="static/img/pointsMall/collection.png" alt="" /> | |
| 161 | - <div>收藏</div> | |
| 122 | + <!-- 优惠券 --> | |
| 123 | + <div v-else-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 2"> | |
| 124 | + <div class="desc_title">兑换流程</div> | |
| 125 | + <div class="text-left"> | |
| 126 | + 1、 本券以积分进行兑换,兑换后将直接进入到用户的虚拟账户中。<br> 2、 用户兑换后可在我的-我的卡券中进行查看。 | |
| 127 | + </div> | |
| 128 | + <div class="desc_title mar_top10">注意事项</div> | |
| 129 | + <div class="text-left"> | |
| 130 | + 1、 使用说明:每个手机号码只能领取一次;优惠券兑换后不退,过期不补,请兑换后尽快使用。<br> 2、 优惠券有效期:自兑换之日起一个月。<br> 3、 适用商品:除特殊商品外,全平台商品可用。<br> 4、 客服说明:如有疑问请联系平台客服,电话: | |
| 131 | + <a href="tel:010-65832485">010-65832485</a> | |
| 162 | 132 | </div> |
| 163 | - <div class="btn" @click="jumpClientIntegralList"> | |
| 164 | - 获取积分 | |
| 165 | 133 | </div> |
| 134 | + <!-- 虚拟商品 --> | |
| 135 | + <div v-else-if="goodsInfo && goodsInfo.shop_type && goodsInfo.shop_type == 3" | |
| 136 | + class="text-left"> | |
| 137 | + 1、 本商品以积分进行兑换。兑换后将直接进入到用户的虚拟账户中。<br> 2、 用户兑换后可在我的-我的付费内容中进行查看。<br> | |
| 138 | + <!-- 3、 您兑换的音频内容,音频上线期间可长期收听;<br> --> | |
| 139 | + 3、 兑换后暂不支持退款,感谢您的支持;<br> 4、 兑换完成后若显示异常,请10分钟之后尝试;<br> 5、您兑换的音频内容为网家家版权内容,请勿恶意转载; | |
| 140 | + <br> 6、 客服说明:如有疑问请联系平台客服,电话: | |
| 141 | + <a href="tel:010-65832485">010-65832485</a><br> 7、 具体注意事项详情可见 | |
| 142 | + <span @click="toLink" | |
| 143 | + class="to-link"> | |
| 144 | + 《网家家APP购买音频内容服务协议》 | |
| 145 | + </span> | |
| 166 | 146 | </div> |
| 167 | 147 | </div> |
| 168 | - <!-- 有积分商品售罄 --> | |
| 169 | - <div v-else-if="goodsInfo && goodsInfo.stock == 0" class="footer"> | |
| 170 | - <div class="collection_box mar_left20" @click="onCell"> | |
| 171 | - <img v-if="goodsInfo.is_cell == 1" src="static/img/pointsMall/collection2.png" alt="" /> | |
| 172 | - <img v-else src="static/img/pointsMall/collection.png" alt="" /> | |
| 173 | - <div>收藏</div> | |
| 148 | + <div class="good-title"> | |
| 149 | + <span class="left"></span>相似商品 | |
| 150 | + <span class="right"></span> | |
| 151 | + </div> | |
| 152 | + <!-- 像是商品推荐 --> | |
| 153 | + <!-- 商品样式 7 列表 --> | |
| 154 | + <column-list-box class="column-list-box" | |
| 155 | + v-if="goodsInfo && goodsInfo.list && goodsInfo.list.length" | |
| 156 | + @jump="toDetail" | |
| 157 | + :lists="goodsInfo" | |
| 158 | + com="7" | |
| 159 | + goodType="1"> | |
| 160 | + </column-list-box> | |
| 161 | + </div> | |
| 162 | + </div> | |
| 163 | + <!-- 有积分页脚显示 --> | |
| 164 | + <div v-if="goodsInfo && goodsInfo.stock != 0"> | |
| 165 | + <!-- 积分充足 --> | |
| 166 | + <div v-if="parseInt(goodsInfo.grade || 0)>parseInt(goodsInfo.num) || parseInt(goodsInfo.grade || 0) == parseInt(goodsInfo.num)" | |
| 167 | + class="footer"> | |
| 168 | + <div class="collection_box mar_left20" | |
| 169 | + @click="onCell"> | |
| 170 | + <img v-if="goodsInfo.is_cell == 1" | |
| 171 | + src="static/img/pointsMall/collection2.png" | |
| 172 | + alt="" /> | |
| 173 | + <img v-else | |
| 174 | + src="static/img/pointsMall/collection.png" | |
| 175 | + alt="" /> | |
| 176 | + <div>收藏</div> | |
| 177 | + </div> | |
| 178 | + <div class="btn" | |
| 179 | + @click="exchange"> | |
| 180 | + 立即兑换 | |
| 181 | + </div> | |
| 182 | + </div> | |
| 183 | + <!-- 积分不足页脚显示 --> | |
| 184 | + <div v-if="parseInt(goodsInfo.grade || 0) < parseInt(goodsInfo.num)" | |
| 185 | + class="footer"> | |
| 186 | + <div class="desc">还差{{parseInt(goodsInfo.num)-parseInt(goodsInfo.grade || 0)}}积分</div> | |
| 187 | + <div class="line"></div> | |
| 188 | + <div class="collection_box" | |
| 189 | + @click="onCell"> | |
| 190 | + <img v-if="goodsInfo.is_cell == 1" | |
| 191 | + src="static/img/pointsMall/collection2.png" | |
| 192 | + alt="" /> | |
| 193 | + <img v-else | |
| 194 | + src="static/img/pointsMall/collection.png" | |
| 195 | + alt="" /> | |
| 196 | + <div>收藏</div> | |
| 197 | + </div> | |
| 198 | + <div class="btn" | |
| 199 | + @click="jumpClientIntegralList"> | |
| 200 | + 获取积分 | |
| 201 | + </div> | |
| 202 | + </div> | |
| 203 | + </div> | |
| 204 | + <!-- 有积分商品售罄 --> | |
| 205 | + <div v-else-if="goodsInfo && goodsInfo.stock == 0" | |
| 206 | + class="footer"> | |
| 207 | + <div class="collection_box mar_left20" | |
| 208 | + @click="onCell"> | |
| 209 | + <img v-if="goodsInfo.is_cell == 1" | |
| 210 | + src="static/img/pointsMall/collection2.png" | |
| 211 | + alt="" /> | |
| 212 | + <img v-else | |
| 213 | + src="static/img/pointsMall/collection.png" | |
| 214 | + alt="" /> | |
| 215 | + <div>收藏</div> | |
| 216 | + </div> | |
| 217 | + <div class="btn grey"> | |
| 218 | + 补货中 | |
| 219 | + </div> | |
| 220 | + </div> | |
| 221 | + <!-- 地址信息组件 --> | |
| 222 | + <!-- <app-address-toast ref="itemsInfo" @toUpdate="toLinkPointsMall" v-show="pointsToast_control"></app-address-toast> --> | |
| 223 | + <!-- 底部弹出层 --> | |
| 224 | + <van-popup class="popup_box" | |
| 225 | + v-model="show" | |
| 226 | + position="bottom" | |
| 227 | + :close-on-click-overlay="false"> | |
| 228 | + <div class="popup_main"> | |
| 229 | + <!-- 商品信息 --> | |
| 230 | + <div class="goods_box"> | |
| 231 | + <div class="item_pic_box"> | |
| 232 | + <img class="item_pic" | |
| 233 | + :src="goodsInfo && goodsInfo.simg" | |
| 234 | + alt="" /> | |
| 174 | 235 | </div> |
| 175 | - <div class="btn grey"> | |
| 176 | - 补货中 | |
| 236 | + <div class="right"> | |
| 237 | + <!-- 标题 --> | |
| 238 | + <div class="title"> | |
| 239 | + <div v-if="goodsInfo && goodsInfo.title" | |
| 240 | + class="title_t">{{goodsInfo.title}}</div> | |
| 241 | + <img @click="show=false" | |
| 242 | + class="close" | |
| 243 | + src="static/img/close_grey.png" | |
| 244 | + alt="" /> | |
| 245 | + </div> | |
| 246 | + <!-- 价格 --> | |
| 247 | + <div class="pirce"> | |
| 248 | + <span v-if="goodsInfo && goodsInfo.num">{{parseInt(goodsInfo.num)>9999?this.formatDecimal((parseInt(goodsInfo.num) / 10000), 0) +"万":goodsInfo.num}}积分+</span> | |
| 249 | + <span v-if="goodsInfo && goodsInfo.price">{{goodsInfo.price}}元</span> | |
| 250 | + </div> | |
| 177 | 251 | </div> |
| 178 | 252 | </div> |
| 179 | - <!-- 地址信息组件 --> | |
| 180 | - <!-- <app-address-toast ref="itemsInfo" @toUpdate="toLinkPointsMall" v-show="pointsToast_control"></app-address-toast> --> | |
| 181 | - <!-- 底部弹出层 --> | |
| 182 | - <van-popup class="popup_box" v-model="show" position="bottom" :close-on-click-overlay="false"> | |
| 183 | - <div class="popup_main"> | |
| 184 | - <!-- 商品信息 --> | |
| 185 | - <div class="goods_box"> | |
| 186 | - <div class="item_pic_box"> | |
| 187 | - <img class="item_pic" :src="goodsInfo && goodsInfo.simg" alt="" /> | |
| 188 | - </div> | |
| 189 | - <div class="right"> | |
| 190 | - <!-- 标题 --> | |
| 191 | - <div class="title"> | |
| 192 | - <div v-if="goodsInfo && goodsInfo.title" class="title_t">{{goodsInfo.title}}</div> | |
| 193 | - <img @click="show=false" class="close" src="static/img/close_grey.png" alt="" /> | |
| 194 | - </div> | |
| 195 | - <!-- 价格 --> | |
| 196 | - <div class="pirce"> | |
| 197 | - <span v-if="goodsInfo && goodsInfo.num">{{parseInt(goodsInfo.num)>9999?this.formatDecimal((parseInt(goodsInfo.num) / 10000), 0) +"万":goodsInfo.num}}积分+</span> | |
| 198 | - <span v-if="goodsInfo && goodsInfo.price">{{goodsInfo.price}}元</span> | |
| 199 | - </div> | |
| 200 | - </div> | |
| 201 | - </div> | |
| 202 | - <!--购买数量--> | |
| 203 | - <div class="num_box"> | |
| 204 | - <div class="num_tip">购买数量<span v-if="goodsInfo && goodsInfo.min_buy_num">(起购数量{{goodsInfo.min_buy_num}}件)</span></div> | |
| 205 | - <div class="right"> | |
| 206 | - <van-stepper theme="round" input-width="40px" input-size="32px" button-size="32px" v-model="stepperValue" :min="goodsInfo && goodsInfo.min_buy_num" :max="(goodsInfo && goodsInfo.stock > -1) ?goodsInfo.stock :'999'" integer async-change @change="onChange"/> | |
| 207 | - <!-- <img src="static/img/reduce.png" alt="" /> | |
| 253 | + <!--购买数量--> | |
| 254 | + <div class="num_box"> | |
| 255 | + <div class="num_tip">购买数量 | |
| 256 | + <span v-if="goodsInfo && goodsInfo.min_buy_num">(起购数量{{goodsInfo.min_buy_num}}件)</span> | |
| 257 | + </div> | |
| 258 | + <div class="right"> | |
| 259 | + <van-stepper theme="round" | |
| 260 | + input-width="40px" | |
| 261 | + input-size="32px" | |
| 262 | + button-size="32px" | |
| 263 | + v-model="stepperValue" | |
| 264 | + :min="goodsInfo && goodsInfo.min_buy_num" | |
| 265 | + :max="(goodsInfo && goodsInfo.stock > -1) ?goodsInfo.stock :'999'" | |
| 266 | + integer | |
| 267 | + async-change | |
| 268 | + @blur="onBlur" | |
| 269 | + @change="onChange" /> | |
| 270 | + <!-- <img src="static/img/reduce.png" alt="" /> | |
| 208 | 271 | <div class="num">1</div> |
| 209 | 272 | <img src="static/img/plus.png" alt="" /> --> |
| 210 | - </div> | |
| 211 | - </div> | |
| 212 | - <!-- 支付方式 --> | |
| 213 | - <div class="line_box"> | |
| 214 | - <div class="left">支付方式</div> | |
| 215 | - <div class="right">积分+现金</div> | |
| 216 | - </div> | |
| 217 | - <!-- 按钮 --> | |
| 218 | - <div @click="jumpToConfirmOrderPage(goodsInfo)" class="btn">确定</div> | |
| 219 | - </div> | |
| 220 | - </van-popup> | |
| 221 | -</div> | |
| 273 | + </div> | |
| 274 | + </div> | |
| 275 | + <!-- 支付方式 --> | |
| 276 | + <div class="line_box"> | |
| 277 | + <div class="left">支付方式</div> | |
| 278 | + <div class="right">积分+现金</div> | |
| 279 | + </div> | |
| 280 | + <!-- 按钮 --> | |
| 281 | + <div @click="jumpToConfirmOrderPage(goodsInfo)" | |
| 282 | + class="btn">确定</div> | |
| 283 | + </div> | |
| 284 | + </van-popup> | |
| 285 | + </div> | |
| 222 | 286 | </template> |
| 223 | 287 | |
| 224 | 288 | <script> |
| ... | ... | @@ -301,7 +365,7 @@ export default { |
| 301 | 365 | jumpToConfirmOrderPage (item) { |
| 302 | 366 | // 解决用户输入为0this.stepperValue未自动获取input的值问题 |
| 303 | 367 | if (this.stepperValue == 0) { |
| 304 | - this.stepperValue = 1; | |
| 368 | + this.stepperValue = 1; | |
| 305 | 369 | } |
| 306 | 370 | if ((parseInt(this.goodsInfo.stock) > -1 && parseInt(this.stepperValue) > parseInt(this.goodsInfo.stock)) || parseInt(this.stepperValue) > 999) { |
| 307 | 371 | Toast("数量超出库存范围~") |
| ... | ... | @@ -513,7 +577,7 @@ export default { |
| 513 | 577 | toShare () { |
| 514 | 578 | // 判断分享 |
| 515 | 579 | if (typeof this.$parent.toShare === 'function') { |
| 516 | - this.$parent.toShare(71, "1",(this.$route.query.goodsId? {"goodsId":this.$route.query.goodsId} : "")); | |
| 580 | + this.$parent.toShare(71, "1", (this.$route.query.goodsId ? { "goodsId": this.$route.query.goodsId } : "")); | |
| 517 | 581 | } |
| 518 | 582 | }, |
| 519 | 583 | /** |
| ... | ... | @@ -565,9 +629,9 @@ export default { |
| 565 | 629 | message: tipMessage, |
| 566 | 630 | messageAlign: "center", |
| 567 | 631 | confirmButtonText: "确定", |
| 568 | - showCancelButton: true, | |
| 632 | + showCancelButton: true, | |
| 569 | 633 | cancelButtonText: "取消", |
| 570 | - confirmButtonCallback: (this.$route.query.AppJump?this.$parent.destroy:this.jumpType), | |
| 634 | + confirmButtonCallback: (this.$route.query.AppJump ? this.$parent.destroy : this.jumpType), | |
| 571 | 635 | // confirmButtonCallback: this.addAddressCallback, |
| 572 | 636 | params: datas.shop_type |
| 573 | 637 | }; |
| ... | ... | @@ -595,10 +659,10 @@ export default { |
| 595 | 659 | } |
| 596 | 660 | }, |
| 597 | 661 | // type=2跳转原生优惠券列表3跳转原生购买内容列表 |
| 598 | - jumpType(type){ | |
| 599 | - // 判断APP内 | |
| 662 | + jumpType (type) { | |
| 663 | + // 判断APP内 | |
| 600 | 664 | if (this.isCNLive.value) { |
| 601 | - if(type == 2){ | |
| 665 | + if (type == 2) { | |
| 602 | 666 | // (判断app内是否有该方法) |
| 603 | 667 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpCoupon) { |
| 604 | 668 | // 跳转到优惠券列表 |
| ... | ... | @@ -607,8 +671,8 @@ export default { |
| 607 | 671 | // 跳转到优惠券列表 |
| 608 | 672 | window.obj.jumpCoupon(); |
| 609 | 673 | } |
| 610 | - }else if(type == 3){ | |
| 611 | - // (判断app内是否有该方法) | |
| 674 | + } else if (type == 3) { | |
| 675 | + // (判断app内是否有该方法) | |
| 612 | 676 | if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.JumpToPaidContent) { |
| 613 | 677 | // 跳转到付费内容 |
| 614 | 678 | window.webkit.messageHandlers.JumpToPaidContent.postMessage({ body: {} }); |
| ... | ... | @@ -632,16 +696,18 @@ export default { |
| 632 | 696 | jumpClientIntegralList () { |
| 633 | 697 | // 判断APP内 |
| 634 | 698 | if (this.isCNLive.value) { |
| 635 | - // (判断app内是否有该方法) | |
| 636 | - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) { | |
| 637 | - // 跳转到原生的任务列表 | |
| 638 | - window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} }); | |
| 639 | - } else if (window.obj && window.obj.jumpClientIntegralList) { | |
| 640 | - // 跳转到原生的任务列表 | |
| 641 | - window.obj.jumpClientIntegralList(); | |
| 699 | + if (this.$parent.checkLogin()) { | |
| 700 | + // (判断app内是否有该方法) | |
| 701 | + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) { | |
| 702 | + // 跳转到原生的任务列表 | |
| 703 | + window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} }); | |
| 704 | + } else if (window.obj && window.obj.jumpClientIntegralList) { | |
| 705 | + // 跳转到原生的任务列表 | |
| 706 | + window.obj.jumpClientIntegralList(); | |
| 707 | + } | |
| 642 | 708 | } |
| 643 | - }else{ | |
| 644 | - this.$parent.callApp(); | |
| 709 | + } else { | |
| 710 | + this.$parent.callApp(); | |
| 645 | 711 | } |
| 646 | 712 | }, |
| 647 | 713 | /** |
| ... | ... | @@ -688,23 +754,25 @@ export default { |
| 688 | 754 | Toast("获取积分商品详情页失败"); |
| 689 | 755 | } |
| 690 | 756 | }, |
| 691 | - /** | |
| 692 | - * 商品收藏 | |
| 693 | - */ | |
| 757 | + /** | |
| 758 | + * 商品收藏 | |
| 759 | + */ | |
| 694 | 760 | onCell () { |
| 695 | - if(this.isCNLive.value){ | |
| 696 | - // 加载中提示 | |
| 697 | - Indicator.open("加载中..."); | |
| 698 | - // 获取证书请求接口 | |
| 699 | - this.http("/Api/" + this.getApiVersion().LuckDraw + "/cell", { | |
| 700 | - pid: this.$route.query.goodsId, // 商品ID | |
| 701 | - uid: this.getStore("uid") // 用户ID | |
| 702 | - }, this.onCellCallback, { | |
| 703 | - method: "POST" | |
| 761 | + if (this.isCNLive.value) { | |
| 762 | + if (this.$parent.checkLogin()) { | |
| 763 | + // 加载中提示 | |
| 764 | + Indicator.open("加载中..."); | |
| 765 | + // 获取证书请求接口 | |
| 766 | + this.http("/Api/" + this.getApiVersion().LuckDraw + "/cell", { | |
| 767 | + pid: this.$route.query.goodsId, // 商品ID | |
| 768 | + uid: this.getStore("uid") // 用户ID | |
| 769 | + }, this.onCellCallback, { | |
| 770 | + method: "POST" | |
| 704 | 771 | }); |
| 705 | - }else{ | |
| 706 | - this.$parent.callApp(); | |
| 707 | 772 | } |
| 773 | + } else { | |
| 774 | + this.$parent.callApp(); | |
| 775 | + } | |
| 708 | 776 | }, |
| 709 | 777 | /** |
| 710 | 778 | * 商品收藏接口回调 |
| ... | ... | @@ -716,12 +784,12 @@ export default { |
| 716 | 784 | Indicator.close(); |
| 717 | 785 | // 返回处理 |
| 718 | 786 | if (res.code == 200) { |
| 719 | - if(this.goodsInfo.is_cell == 0){ | |
| 720 | - this.$set(this.goodsInfo, "is_cell",1) | |
| 721 | - Toast("已收藏"); | |
| 722 | - }else if(this.goodsInfo.is_cell == 1){ | |
| 723 | - this.$set(this.goodsInfo, "is_cell",0) | |
| 724 | - Toast("已取消"); | |
| 787 | + if (this.goodsInfo.is_cell == 0) { | |
| 788 | + this.$set(this.goodsInfo, "is_cell", 1) | |
| 789 | + Toast("已收藏"); | |
| 790 | + } else if (this.goodsInfo.is_cell == 1) { | |
| 791 | + this.$set(this.goodsInfo, "is_cell", 0) | |
| 792 | + Toast("已取消"); | |
| 725 | 793 | }; |
| 726 | 794 | } else if (res.code == 400) { |
| 727 | 795 | // 获取积分商品详情页失败 |
| ... | ... | @@ -752,6 +820,11 @@ export default { |
| 752 | 820 | Toast("数量超出库存范围~") |
| 753 | 821 | } |
| 754 | 822 | }, |
| 823 | + // 输入框失去焦点触发 | |
| 824 | + onBlur () { | |
| 825 | + // 设置滚动条位置 | |
| 826 | + window.scrollTo(0, 0); | |
| 827 | + } | |
| 755 | 828 | }, |
| 756 | 829 | //请求数据 |
| 757 | 830 | created () { |
| ... | ... | @@ -760,7 +833,7 @@ export default { |
| 760 | 833 | // 获取商品ID |
| 761 | 834 | let goodsId = this.$route.query.goodsId; |
| 762 | 835 | if (goodsId) { |
| 763 | - // 获取商品信息 | |
| 836 | + // 获取商品信息 | |
| 764 | 837 | this.getGoodsInfo(goodsId); |
| 765 | 838 | } |
| 766 | 839 | // ios从url获取安卓localStorage |
| ... | ... | @@ -823,17 +896,17 @@ export default { |
| 823 | 896 | type: 71, |
| 824 | 897 | id: "1", |
| 825 | 898 | url: "", |
| 826 | - ext: this.$route.query.goodsId ? {"goodsId":this.$route.query.goodsId} : "" | |
| 899 | + ext: this.$route.query.goodsId ? { "goodsId": this.$route.query.goodsId } : "" | |
| 900 | + }); | |
| 901 | + } | |
| 902 | + if (typeof this.$parent.getShareData === "function") { | |
| 903 | + this.$parent.getShareData({ | |
| 904 | + type: 71, | |
| 905 | + id: 1, | |
| 906 | + url: "", | |
| 907 | + ext: this.$route.query.goodsId ? { "goodsId": this.$route.query.goodsId } : "" | |
| 827 | 908 | }); |
| 828 | 909 | } |
| 829 | - if (typeof this.$parent.getShareData === "function") { | |
| 830 | - this.$parent.getShareData({ | |
| 831 | - type: 71, | |
| 832 | - id: 1, | |
| 833 | - url: "", | |
| 834 | - ext: this.$route.query.goodsId ? {"goodsId":this.$route.query.goodsId} : "" | |
| 835 | - }); | |
| 836 | - } | |
| 837 | 910 | } |
| 838 | 911 | // // 地址回选原生回调 |
| 839 | 912 | // if (this.isiPhone.value || this.isiPad.value) { | ... | ... |
src/pages/pointsMall/pointsMall.vue
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </back-box> |
| 24 | 24 | <!-- 分享下拉选择项 --> |
| 25 | 25 | <van-popup class="popup_box" |
| 26 | - v-model="isCNLive.value && showShareItems" | |
| 26 | + v-model="showShareItems" | |
| 27 | 27 | @click-overlay="onShowShareItems" |
| 28 | 28 | :overlay-style="{ top:(parseInt($parent.top.value) + 109)+ 'px' }" |
| 29 | 29 | :style="'top: ' + (parseInt($parent.top.value) + 76)+ 'px'"> |
| ... | ... | @@ -313,9 +313,9 @@ export default { |
| 313 | 313 | * 1平台客服2分享好友3积分规则 |
| 314 | 314 | */ |
| 315 | 315 | jumpType (item) { |
| 316 | - this.showShareItems = false; | |
| 317 | - if (item.params == 1) { | |
| 318 | - if (this.isCNLive.value) { | |
| 316 | + if (this.$parent.checkLogin()) { | |
| 317 | + this.showShareItems = false; | |
| 318 | + if (item.params == 1) { | |
| 319 | 319 | let options; |
| 320 | 320 | if (this.isAndroid.value) { |
| 321 | 321 | if (this.ver != "") { |
| ... | ... | @@ -370,23 +370,23 @@ export default { |
| 370 | 370 | this.$set(this.$parent, "showOptions", options); |
| 371 | 371 | // 显示通用浮层 |
| 372 | 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", ""); | |
| 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); | |
| 373 | + } else if (item.params == 2) { | |
| 374 | + // 判断分享 | |
| 375 | + if (typeof this.$parent.toShare === 'function') { | |
| 376 | + this.$parent.toShare(45, "1", ""); | |
| 377 | + } | |
| 378 | + } else if (item.params == 3) { | |
| 379 | + // 通用跳转跳转到商品详情页新打开webview | |
| 380 | + if (typeof this.$parent.gotoDetail === 'function') { | |
| 381 | + // 设置跳转参数 | |
| 382 | + let params = { | |
| 383 | + type: '34', | |
| 384 | + to: 'http://wjjh5' + (this.mode == 'prod' ? '' : 'test') + '.cnlive.com/integralRules.html?type=web', | |
| 385 | + shop_type: '' | |
| 386 | + }; | |
| 387 | + // 页面跳转 | |
| 388 | + this.$parent.gotoDetail(params); | |
| 389 | + } | |
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | }, | ... | ... |