瀏覽代碼

Merge branch 'main' of https://gitlab.com/tea28/client

hejie 3 年之前
父節點
當前提交
39f01ce65d
共有 3 個文件被更改,包括 25 次插入21 次删除
  1. 17 17
      src/pages/account/consignment.vue
  2. 7 4
      src/pages/sign/index.vue
  3. 1 0
      src/pages/to-pay-list/index.vue

+ 17 - 17
src/pages/account/consignment.vue

@@ -90,14 +90,14 @@ import uniPopup from '@/components/uni-popup/uni-popup.vue'
 		},
 		data() {
 			return {
-				current:2,
+				current: 0,
 				TabList:[
-					{title:'寄售中',status:2},
-					{title:'寄售成功',status:3},
-					{title:'寄售失败',status:4},
-					{title:'全部',status:1}
+					{title:'全部',status:0},
+					{title:'寄售中',status:1},
+					{title:'寄售成功',status:2},
+					{title:'寄售失败',status:3},
 				],
-				goods:[],
+				goods: [],
 				haveGoods: false, // 是否有商品
 				selectIndex:'',
 				isShow:false ,// 是否显示地址
@@ -106,7 +106,7 @@ import uniPopup from '@/components/uni-popup/uni-popup.vue'
 			};
 		},
 		onLoad:function(){
-			this.loadAddress()
+			// this.loadAddress()
 		},
 		onShow:function(options){
 			page = 1;
@@ -114,22 +114,22 @@ import uniPopup from '@/components/uni-popup/uni-popup.vue'
 			this.loadData()
 		},
 		methods:{
-			tabsChange:function(index){
+			tabsChange(index){
 				this.current = index
 			},
-			loadData:function(){
+			loadData(){
 				let that = this;
 				let data = {
-					status:this.current,
-					page:page
+					type: this.current,
+					page: page
 				}
-                u_post("ShuZiTeaYW/ojs/goodsLists",data).then(res => {
-                    if(res.status == 200){
-                        let obj = res.ojsList
+                post("goods/consignment",data).then(res => {
+                    if(res.code === 0){
+                        let obj = res.data.data.data
                         if(obj.length>0){
-                            for(var i in obj){
-                                that.goods.push(obj[i])
-                            }
+							obj.forEach(e => {
+                                that.goods.push(e)
+							});
                         }else{
                             if(page == 1){
                                 that.haveGoods = true

+ 7 - 4
src/pages/sign/index.vue

@@ -45,7 +45,7 @@
                 <image class="bou_img" src="/static/sgin/right.png" mode=""></image>
             </view>
             <view class="bou_con flex_r flex_ac flex_wrap">
-                <view class="bou_list" v-for="(item,index) in goods" :key="index" @tap="openConversion(item.goodsId)">
+                <view class="bou_list" v-for="(item,index) in goods" :key="index" @tap="openConversion(item.id)">
                     <image class="bou_l_img" :src="item.original_img" mode=""></image>
                     <view class="bou_l_con">
                         <view class="bou_l_name ellipsis">{{item.goods_name}}</view>
@@ -317,9 +317,12 @@ export default {
             }
         },
         // 点击立即兑换打开弹窗
-        openConversion: function(e) {
-            this.goodsId = e
-            this.$refs.conversion.open()
+        openConversion: function(id) {
+            uni.navigateTo({
+                url: '/pages/product/p_details?id=' + id + '&type=' + 3
+            })
+            // this.goodsId = e
+            // this.$refs.conversion.open()
         },
         // 关闭立即兑换弹窗
         closePopup: function() {

+ 1 - 0
src/pages/to-pay-list/index.vue

@@ -185,6 +185,7 @@ export default {
             }
             post('goods/submitOrder', {
                 ...this.Data,
+                // id: this.goodsInfo.goods_id,
                 address_id: this.DefaultAddress.id,
                 trade_type: type
             }).then(res => {