Commit 6781a272d8a9085454e6c24e9a6bc7ba5e7b9d15

Authored by BigBoss
Exists in master

修改冲突

src/pages/frameDetail/frameDetail.vue
... ... @@ -291,12 +291,18 @@
291 291 class="D5"
292 292 v-if="current !==2"
293 293 >
294   - <view class="D5_fixed1" @click="consolg(goodInfo.prodIntro1)">
  294 + <view
  295 + class="D5_fixed1"
  296 + @click="consolg(goodInfo.prodIntro1)"
  297 + >
295 298 <image src="/static/img/detail/hr.png"></image>
296 299 <view>商品详细</view>
297 300 <image src="/static/img/detail/hr.png"></image>
298 301 </view>
299   - <view class="D5_all" v-html="test">
  302 + <view
  303 + class="D5_all"
  304 + v-html="test"
  305 + >
300 306 <!-- <block>
301 307 <rich-text :nodes="goodInfo.prodIntro1"></rich-text>
302 308 </block> -->
... ... @@ -309,7 +315,7 @@
309 315 class="botton_1"
310 316 >
311 317 <view class="cart_icon">
312   - <image v-bind:src="imgShop.img"/>
  318 + <image v-bind:src="imgShop.img" />
313 319 <text>{{cartNumber}}</text>
314 320 </view>
315 321 <view class="botton_image">购物车</view>
... ... @@ -321,27 +327,33 @@
321 327 >加入购物车</view>
322 328 <view
323 329 class="botton_now"
324   -
325   - @click="showBottom(false)"
  330 + @click="showBottom(false)"
326 331 >立即购买</view>
327 332 </view>
328   - </view>
329   - <BottomSheet v-if="isShowBottom" :isCart="isCart" @addCart="addCart"
330   - :pid="pid" :goodInfo="goodInfo" :isShowBottom="isShowBottom" @closeBottom="closeBottom"></BottomSheet>
  333 + </view>
  334 + <BottomSheet
  335 + v-if="isShowBottom"
  336 + :isCart="isCart"
  337 + @addCart="addCart"
  338 + :pid="pid"
  339 + :goodInfo="goodInfo"
  340 + :isShowBottom="isShowBottom"
  341 + @closeBottom="closeBottom"
  342 + ></BottomSheet>
331 343 </view>
332 344 </template>
333 345  
334 346 <script>
335   -import store from '@/store'
336   -import BottomSheet from './components/BottomSheet.vue';
337   -export default {
338   - components:{
339   - BottomSheet,
340   - },
  347 +import store from '@/store'
  348 +import BottomSheet from './components/BottomSheet.vue'
  349 +export default {
  350 + components: {
  351 + BottomSheet,
  352 + },
341 353 data () {
342   - return {
343   - isCart:Boolean,
344   - isShowBottom : false, //底部弹窗开关
  354 + return {
  355 + isCart: Boolean,
  356 + isShowBottom: false, // 底部弹窗开关
345 357 test: '',
346 358 goodType: 2,
347 359 screenItems: [
... ... @@ -382,20 +394,20 @@ export default {
382 394 label: '眼镜盒',
383 395 value: '262',
384 396 }],
385   - },
386   -
387   - pid: 0,
388   - // 购物车数据
389   - addCartList: {
390   - uid: Number,//用户的唯一识别码
391   - openid: String,
392   - mp_id: Number,//使用人
393   - sk_id: Number,//产品的sku_id
394   - num: Number,//购买数量
395   - pid: Number,//产品id
396   - price: Number,//价格
397   - checkedSKU:Object//产品信息
398   - },
  397 + },
  398 +
  399 + pid: 0,
  400 + // 购物车数据
  401 + addCartList: {
  402 + uid: Number, // 用户的唯一识别码
  403 + openid: String,
  404 + mp_id: Number, // 使用人
  405 + sk_id: Number, // 产品的sku_id
  406 + num: Number, // 购买数量
  407 + pid: Number, // 产品id
  408 + price: Number, // 价格
  409 + checkedSKU: Object, // 产品信息
  410 + },
399 411 }
400 412 },
401 413 onLoad: function ({ pid, sk_id: skId }) {
... ... @@ -414,10 +426,10 @@ export default {
414 426 this.tag = this.goodInfo.tag
415 427 this.test = this.goodInfo.prodIntro1
416 428 this.test = this.test.replace(/\<img/gi, '<img style="max-width:100%;height:auto"')
417   - // addCart
418   - this.addCartList.uid = this.$store.state.user.userInfo.uid
419   - this.addCartList.openid = this.$store.state.user.userInfo.openid
420   - this.addCartList.pid = this.goodInfo.pid
  429 + // addCart
  430 + this.addCartList.uid = this.$store.state.user.userInfo.uid
  431 + this.addCartList.openid = this.$store.state.user.userInfo.openid
  432 + this.addCartList.pid = this.goodInfo.pid
421 433 this.addCartList.price = this.goodInfo.priceArea.Min_Price
422 434 })
423 435 store.dispatch('cart/getCartList')
... ... @@ -435,15 +447,15 @@ export default {
435 447 return this.$store.state.cart.cartList.length || 0
436 448 },
437 449 },
438   - methods: {
439   - //底部弹窗开关
440   - showBottom(isCart){
441   - this.isCart = isCart;
442   - this.isShowBottom = true;
443   - },
444   - closeBottom(){
445   - this.isShowBottom = false;
446   - },
  450 + methods: {
  451 + // 底部弹窗开关
  452 + showBottom(isCart) {
  453 + this.isCart = isCart
  454 + this.isShowBottom = true
  455 + },
  456 + closeBottom() {
  457 + this.isShowBottom = false
  458 + },
447 459 // 前往购物车
448 460 toCart() {
449 461 uni.switchTab({
... ... @@ -454,19 +466,19 @@ export default {
454 466 })
455 467 },
456 468 // 加入购物车
457   - addCart (mp_id,num,checkedSKU,sk_id) {
458   - this.addCartList.mp_id = mp_id
459   - this.addCartList.sk_id = sk_id
460   - this.addCartList.num = num
461   - this.addCartList.checkedSKU = checkedSKU
462   - console.log('添加购物车的参数',this.addCartList)
463   - store.dispatch('cart/addCart', this.addCartList).then((res)=>{
464   - console.log('*-*-*-*--*-',res)
465   - // 再次请求购物车接口,实现实时更新
466   - store.dispatch('cart/getCartList', {
467   - uid: this.$store.state.user.userInfo.uid,
468   - })
469   - })
  469 + addCart (mp_id, num, checkedSKU, sk_id) {
  470 + this.addCartList.mp_id = mp_id
  471 + this.addCartList.sk_id = sk_id
  472 + this.addCartList.num = num
  473 + this.addCartList.checkedSKU = checkedSKU
  474 + console.log('添加购物车的参数', this.addCartList)
  475 + store.dispatch('cart/addCart', this.addCartList).then((res) => {
  476 + console.log('*-*-*-*--*-', res)
  477 + // 再次请求购物车接口,实现实时更新
  478 + store.dispatch('cart/getCartList', {
  479 + uid: this.$store.state.user.userInfo.uid,
  480 + })
  481 + })
470 482 },
471 483 goPerchase () {
472 484 // switch (this.updateGoodType) {
... ... @@ -712,7 +724,7 @@ export default {
712 724 color: #333333;
713 725 font-weight: bold;
714 726 }
715   - .D4_list{
  727 + .D4_list {
716 728 display: grid;
717 729 grid-row-gap: 10px;
718 730 grid-column-gap: 4px;
... ... @@ -802,7 +814,6 @@ export default {
802 814 .cart_icon {
803 815 position: relative;
804 816 image {
805   -
806 817 }
807 818 text {
808 819 position: absolute;
... ... @@ -810,13 +821,13 @@ export default {
810 821 font-size: 17px;
811 822 background-color: red;
812 823 min-height: 24px;
813   - min-width:24px;
  824 + min-width: 24px;
814 825 line-height: 24px;
815 826 right: -12%;
816 827 top: -12px;
817 828 text-align: center;
818 829 border-radius: 24px;
819   - padding:2px;
  830 + padding: 2px;
820 831 }
821 832 }
822 833 }
... ... @@ -852,11 +863,11 @@ export default {
852 863 color: #ffffff;
853 864 border-radius: 0 20px 20px 0;
854 865 }
855   -}
856   -/* 隐藏滚动条 */
857   - ::-webkit-scrollbar {
858   - width: 0;
859   - height: 0;
860   - color: transparent;
861   - }
  866 +}
  867 +/* 隐藏滚动条 */
  868 +::-webkit-scrollbar {
  869 + width: 0;
  870 + height: 0;
  871 + color: transparent;
  872 +}
862 873 </style>
... ...