daisy 1 jaar geleden
bovenliggende
commit
3f5aa40415

+ 1 - 1
fore-end/API/appraise.js

@@ -147,7 +147,7 @@ function upLoadGoods(data) {
             data: {
                 "categories":  [data.gid],
                 "desc": data.desc,
-                "ownerId": 0,
+                "ownerId": wx.getStorageSync('uid'),
                 "pic": data.fileList,
                 "place": data.address,
                 "price": data.price,

+ 3 - 3
fore-end/pages/append/append.js

@@ -1,7 +1,6 @@
 // pages/append/append.js
 const { getCategoryAPI, upLoadGoods } = require('../../API/appraise')
 const { upLoad, chooseImage } = require('../../utils/util')
-const baseURL = "http://192.168.31.27:8084";
 import Toast from '@vant/weapp/toast/toast'
 
 Page({
@@ -161,9 +160,10 @@ Page({
     afterRead(e) {
         const { file } = e.detail;
         upLoad(file.url).then((res) => {
+            console.log(res);
             const { fileList = [], fileImg = [] } = this.data;
-            fileImg.push({ ...file, url: res.data });
-            fileList.push(file.url)
+            fileImg.push({ ...file, url: res.Url });
+            fileList.push(res.Url)
             this.setData({
                 fileList,
                 fileImg

+ 11 - 7
fore-end/pages/chat/chat.js

@@ -78,7 +78,8 @@ Page({
 	onLoad(options) {
 		//获取商品信息
 		this.data.toUid = options.toUid;
-		this.data.goodsId = options.goodsId;
+        this.data.goodsId = options.goodsId;
+        this.data.goods.pic = options.pic;
 		getChattingRecordOption.target = this.data.toUid;
 		let time = new Date().getTime();
 		getGoodsInfoOption = {
@@ -88,15 +89,18 @@ Page({
 		}
 		let targetId = '';
 		getGoodsInfo(getGoodsInfoOption).then((res)=>{
-			console.log(res);
-			const good = res.data.data;
+			// console.log(res);
+            const good = res.data.data;
+            if(good.Pic == null) {
+                good.Pic = this.data.goods.pic
+            }
 			this.setData({
 				goods:{
-					pic:good.Pic,
 					name: good.Title,
-					price: good.Price
-				}
-			})
+                    price: good.Price,
+                    pic: good.Pic
+                }
+            })
 		}).catch((err)=>{
 			console.log(err);
 		})

+ 2 - 1
fore-end/pages/chat/chat.json

@@ -1,3 +1,4 @@
 {
-	"usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "消息"
 }

+ 1 - 1
fore-end/pages/details/details.js

@@ -47,7 +47,7 @@ Page({
     },
     toChat() {
         wx.navigateTo({
-          url: '/pages/chat/chat?toUid=' + this.data.uid + '&goodsId=' + this.data.id,
+          url: '/pages/chat/chat?toUid=' + this.data.uid + '&goodsId=' + this.data.id + '&pic=' + this.data.pic,
         })
     },
     GoodsDetail() {

+ 1 - 1
fore-end/pages/home/home.js

@@ -68,7 +68,7 @@ Page({
         // this.getGoodsList();
         this.getRecommendGoods();
 		this.setData({
-			avatarUrl:wx.getStorageSync('avatarUrl'),
+            avatarUrl:wx.getStorageSync('avatarUrl'),
 			nickName:wx.getStorageSync('nickName')
 		})
     },

+ 1 - 1
fore-end/pages/home/home.wxss

@@ -29,7 +29,7 @@
  
 .username {
     float: left;
-    width: 530rpx;
+    width: 500rpx;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;

+ 3 - 2
fore-end/pages/myOrder/myOrder.json

@@ -1,6 +1,7 @@
 {
-	"component":true,
+    "component":true,
 	"usingComponents": {
 		"myOrder-card": "../../components/myOrderCard/index"
-	}
+    },
+    "navigationBarTitleText": "我的订单"
 }

+ 4 - 4
fore-end/pages/userchange/userchange.js

@@ -141,10 +141,10 @@ Page({
 				Toast.fail('手机号已被占用');
 			}
 		})
-		wx.setStorageSync('changeAvatarUrl', '');
-		wx.setStorageSync('changeNickName', '');
-		wx.setStorageSync('changePhoneNumber', '');
-		wx.setStorageSync('changePersonalSignatrue', '');
+		// wx.setStorageSync('changeAvatarUrl', '');
+		// wx.setStorageSync('changeNickName', '');
+		// wx.setStorageSync('changePhoneNumber', '');
+		// wx.setStorageSync('changePersonalSignatrue', '');
 		// wx.request({
 		//   url: 'http://192.168.31.28:8084',
 		//   method: 'POST',

+ 2 - 1
fore-end/pages/userchange/userchange.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "修改个人信息"
 }