confirm.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="box">
  3. <view class="topBox"></view>
  4. <view class="yuanhu"></view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. components: {
  10. },
  11. data() {
  12. return {
  13. userInfo:'',
  14. goodsnum:1,
  15. id:'',
  16. info:'',
  17. }
  18. },
  19. onLoad(opt) {
  20. //this.id=opt.id;
  21. this.userInfo = uni.getStorageSync("userInfo");
  22. //this.openGoodsDetailById()
  23. },
  24. methods: {
  25. openGoodsDetailById(){
  26. this.$http('openMall/openGoodsDetailById', {
  27. id:this.id
  28. },'GET').then(res => {
  29. this.info=res.data
  30. })
  31. },
  32. goINdex(){
  33. uni.switchTab({
  34. url:'../index/index'
  35. })
  36. },
  37. calculation(type){
  38. if(type==1){
  39. if(this.goodsnum>1){
  40. this.goodsnum--
  41. }
  42. }else{
  43. if(this.info.oneQty>this.goodsnum){
  44. this.goodsnum++
  45. }
  46. }
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="less">
  52. .box{
  53. background: #F4F5F7;
  54. min-height: 100vh;
  55. }
  56. .topBox{
  57. height: 150rpx;
  58. background: #FF0000;
  59. width: 750rpx;
  60. }
  61. .yuanhu{
  62. width: 750rpx;
  63. height: 20rpx;
  64. background: #FF0000;
  65. border-radius: 0 0 100% 100%;
  66. }
  67. </style>