加入购物车
This commit is contained in:
		
							parent
							
								
									084fb4386b
								
							
						
					
					
						commit
						fc42af178c
					
				@ -6,7 +6,8 @@ Page({
 | 
			
		||||
     * 页面的初始数据
 | 
			
		||||
     */
 | 
			
		||||
    data: {
 | 
			
		||||
        array: ['20粒', '30粒', '50粒', '100粒']
 | 
			
		||||
        array: ['20粒', '30粒', '50粒', '100粒'],
 | 
			
		||||
        userid:0
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@ -27,6 +28,14 @@ Page({
 | 
			
		||||
            })
 | 
			
		||||
            // console.log(this.data.type, 150)
 | 
			
		||||
        })
 | 
			
		||||
        request({
 | 
			
		||||
            url:"User/validateOpenid"
 | 
			
		||||
        }).then((res)=>{
 | 
			
		||||
            console.log(res)
 | 
			
		||||
            this.setData({
 | 
			
		||||
                userid:res.data.data.user_id
 | 
			
		||||
            })
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // goshop() {
 | 
			
		||||
 | 
			
		||||
@ -38,8 +47,10 @@ Page({
 | 
			
		||||
            data: {
 | 
			
		||||
                goods_id: this.data.shopid,
 | 
			
		||||
                goods_num: 1,
 | 
			
		||||
                goods_spec:e.detail.value
 | 
			
		||||
            }
 | 
			
		||||
                goods_spec:"",
 | 
			
		||||
                user_id:this.data.userid
 | 
			
		||||
            },
 | 
			
		||||
            name:"session_id"
 | 
			
		||||
        }).then((res)=>{
 | 
			
		||||
            console.log(res)
 | 
			
		||||
            wx.switchTab({
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user