1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <view class="box">
- <view class="topBox"></view>
- <view class="yuanhu"></view>
- </view>
- </template>
- <script>
- export default {
- components: {
-
- },
- data() {
- return {
- userInfo:'',
- goodsnum:1,
- id:'',
- info:'',
- }
- },
- onLoad(opt) {
- //this.id=opt.id;
- this.userInfo = uni.getStorageSync("userInfo");
- //this.openGoodsDetailById()
- },
-
- methods: {
- openGoodsDetailById(){
- this.$http('openMall/openGoodsDetailById', {
- id:this.id
- },'GET').then(res => {
- this.info=res.data
- })
- },
- goINdex(){
- uni.switchTab({
- url:'../index/index'
- })
- },
- calculation(type){
- if(type==1){
- if(this.goodsnum>1){
- this.goodsnum--
- }
- }else{
- if(this.info.oneQty>this.goodsnum){
- this.goodsnum++
- }
- }
- }
-
- }
- }
- </script>
- <style scoped lang="less">
- .box{
- background: #F4F5F7;
- min-height: 100vh;
- }
- .topBox{
- height: 150rpx;
- background: #FF0000;
- width: 750rpx;
- }
- .yuanhu{
- width: 750rpx;
- height: 20rpx;
- background: #FF0000;
- border-radius: 0 0 100% 100%;
- }
- </style>
|