浏览代码

Signed-off-by: xiezongxing <xx123456>

xiezongxing 2 年之前
父节点
当前提交
24ce59a033
共有 3 个文件被更改,包括 12 次插入63 次删除
  1. 7 60
      pages/intergalShop/confirm.vue
  2. 3 3
      pages/intergalShop/goodsDetail.vue
  3. 2 0
      pages/user/user.vue

+ 7 - 60
pages/intergalShop/confirm.vue

@@ -1,31 +1,7 @@
 <template>
     <block>
         <view class="content">
-            <!-- yidu_tc/pages/jifen/integral/pay/pay.wxml -->
-
-            <!-- <view class="p-common" bindtap="selectAddress" wx:if="{{info.type_lxm == 1}}">
-  <image class="p-img" src="/yidu_tc/static/image/icon/position_icon.png" wx:if="{{!address}}"></image>
-  <text wx:if="{{!address}}">选择收货地址</text>
-  <view class="iflexC" wx:if="{{address}}">
-    <text>{{address.province}}{{address.city}}{{address.district}}</text>
-    <text>{{address.address}}</text>
-    <text>{{address.consigner}} {{address.phone}}</text>
-  </view>
-  <text class="shareicon icon-fanhui-right"></text>
-</view> -->
-
             <view class="fui-cell-group" style="margin: 0 0px 10px 0px; border-radius: 10px">
-                <!-- <view class="nav" wx:if="{{info.shipping==1}}"> -->
-<!--                <view class="nav">
-                    <view class="shippingType">配送方式</view>
-
-                    <view class="shopWrap">
-                        <view data-send_type="express"  data-receive_type="2" @tap="dispatchtype" :class="send_type == 'express' ? 'red' : 'default'">
-                            快递配送
-                        </view>
-                    </view>
-                </view> -->
-      
                 <view class="fui-cell-group" @tap="wx_address" >
                     <view class="fui-cell" hover-class="none">
                         <image class="fui-cell-icon" src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/f04e851e4d2ff9f050a9d080a89d49f2.png"></image>
@@ -44,17 +20,6 @@
                 </view>
 
             </view>
-
-
-<!--            <view class="busInfo">
-                <view>{{ centerInfo.name }}</view>
-                <image
-                    @tap="callPhone"
-                    :data-phone="centerInfo.phone"
-                    src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/f55e923965eedbbbe46ea5eb6fed9da5.png"
-                    mode="widthFix"
-                ></image>
-            </view> -->
             <view class="p-common iflex goodsInfo">
                 <image class="p-goodsImg" :src="info.image" mode="aspectFit"></image>
                 <view class="p-goods">
@@ -63,16 +28,8 @@
                     <view class="p-goodsTips" v-if="select_sku.length > 0">{{ select_sku }}</view>
                 </view>
             </view>
-            <!-- <view class="p-common iflex">
-  <text>买家留言:</text>
-  <input placeholder="请填写留言" placeholder-style="font-size: 24rpx" bindinput="msgInput"></input>
-</view> -->
 
             <view class="p-common radius">
-           <!--     <view class="ibetween p-list icenterY">
-                    <text>商品价格:</text>
-                    <text class="p-con">¥ {{ info.price }}</text>
-                </view> -->
                 <view class="ibetween p-list">
                     <text>商品积分:</text>
                     <text class="p-con">{{ info.sales_price }} 积分</text>
@@ -206,20 +163,11 @@ export default {
     methods: {
 		async getinfo() {
 			// 获取商品详情
-				
-			let data = await this.$api.request('/product/detail','GET',{
+			let data = await this.$api.request('/order/create','POST',{
 				id:this.id
 			});
-			
-			
-			data.desc = data.desc.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"');
-		
-			console.log(data)
-		
-			this.info = data;
-		
-		
-		
+			this.info = data.product[0];
+			this.info.delivery_id = data.delivery[0].id;
 		},
 		
         callPhone(e) {
@@ -357,7 +305,7 @@ export default {
 				delivery_id: this.info.delivery_id,
 				coupon_id: 0,
 				remark: '积分换购',
-				product_id: this.info.product_id,
+				product_id: this.info.id,
 				spec: this.info.spec,
 				number: 1,
 				cart: '',
@@ -368,12 +316,11 @@ export default {
 		   
 		   this.runing = false
 		   
-		   console.log(data)
 		   if(data){
-				
+			uni.navigateTo({
+				url:'/pages/order/order?state=2'
+			});
 		   }
-		   
-		   
         },
 
    

+ 3 - 3
pages/intergalShop/goodsDetail.vue

@@ -303,15 +303,15 @@
 			async getinfo() {
 				// 获取商品详情
 					
-				let data = await this.$api.request('/order/create','GET',{
+				let data = await this.$api.request('/product/detail','GET',{
 					id:this.id
 				});
 				
 				
 				data.desc = data.desc.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"');
-			
+							
 				console.log(data)
-
+				
 				this.info = data;
 
 

+ 2 - 0
pages/user/user.vue

@@ -205,6 +205,8 @@
 							provider: 'weixin'
 						});
 						if (loginRes.hasOwnProperty('code')) {
+							console.log(res.userInfo);
+							console.log('#################');
 							let data = await this.$api.request('/user/registerUserGroup?code=' + loginRes.code, 'POST', res.userInfo);
 							const userInfo = await this.$wechatMiniLogin(true);
 							this.login(userInfo)