Bladeren bron

Signed-off-by: zhaoxw <287208713@qq.com>
xddds

zhaoxw 4 jaren geleden
bovenliggende
commit
20f63106e8
6 gewijzigde bestanden met toevoegingen van 23 en 32 verwijderingen
  1. 3 3
      config/api.js
  2. 4 1
      pages/cart/cart.vue
  3. 1 13
      pages/index/index.vue
  4. 1 1
      pagesGood/goodDetails.vue
  5. 12 12
      pagesGood/shopDetails.vue
  6. 2 2
      pagesMain/entrustList.vue

+ 3 - 3
config/api.js

@@ -1,9 +1,9 @@
-const WX_API_BASE = 'https://www.qianjiadi.com/'
+// const WX_API_BASE = 'https://www.qianjiadi.com/'
 // const WX_API_BASE = 'https://hubw.jihengcc.cn/'
+const WX_API_BASE = 'http://ch.jihengcc.cn:17080/'
 // const WX_API_BASE = 'https://hubw.jihengcc.cn/'
 // const WX_API_BASE = 'http://hubw.jihengcc.cn:17080/'
-// const WX_API_BASE = 'http://172.18.1.227:8765/'
-
+// const WX_API_BASE = 'http://172.18.1.227:8765/' // jichaoming
 module.exports = {
 	//  微信登录
 	WxLogin: WX_API_BASE + 'app/auth/user/wx/login',

+ 4 - 1
pages/cart/cart.vue

@@ -280,6 +280,8 @@
 
 		.cart-box {
 			width: calc(100% - 30px);
+			min-height: calc(100vh - 40px - 50px);
+			overflow: visible;
 			position: absolute;
 			top: 50px;
 			bottom: 0;
@@ -445,8 +447,9 @@
 						width: 110px;
 						display: block;
 						float: right;
-						background-color: #52A63A;
+						// background-color: #52A63A;
 						margin-top: 7px;
+						margin-right: 15px;
 						padding: 0;
 						text-align: center;
 					}

+ 1 - 13
pages/index/index.vue

@@ -28,28 +28,16 @@
 				wxLoginData: null,
 				wxPhoneData: null,
 				userNmae: '',
-				timer: false,
 				tipxx: '',
 			}
 		},
 		onReady() {
 			this.appLoginWx()
-			setTimeout(() => {
-				this.timer = true
-			}, 10)
 		},
 		methods: {
 			getPhoneNumber(e) {
-				if (this.wxLoginData && this.timer) {
+				if (this.wxLoginData) {
 					let _that = this
-					wx.checkSession({
-						success(res) {
-							_that.tipxx = '未过期'
-						},
-						fail(err) {
-							_that.tipxx = '已过期'
-						}
-					})
 					uni.setStorage({
 						key: 'wxPhoneData',
 						data: {

+ 1 - 1
pagesGood/goodDetails.vue

@@ -235,7 +235,7 @@
 							});
 						} else {
 							uni.navigateTo({
-								url: '/pagesMain/entrustList?productId=' + this.goodId + '&tenantCode=' + this.goodData.tenantCode +
+								url: '/pagesMain/entrustList?productId=' + this.goodData.productId + '&tenantCode=' + this.goodData.tenantCode +
 									'&productName=' + this.goodData.productName + '&areaSize=' + this.goodData.areaSize
 							});
 						}

+ 12 - 12
pagesGood/shopDetails.vue

@@ -11,7 +11,7 @@
 		<view class="shop-image">
 			<swiper class="swiper" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="500">
 				<swiper-item v-for="(item,index) in shopData.storeImgUrl" :key="index">
-					<cover-image :src="item.imgPath"></cover-image>
+					<cover-image :src="item"></cover-image>
 				</swiper-item>
 			</swiper>
 		</view>
@@ -76,7 +76,7 @@
 					name: '',
 					logo: '',
 					soldCount: '',
-					storeImgUrl: '',
+					storeImgUrl: [],
 				},
 				tabIndex: 0,
 				tabList: [{
@@ -117,14 +117,13 @@
 				pageIndex2: 1,
 				isOver2: false,
 				sortGoodsList: [],
-				queryNode: null,
 				isSet: false,
 			}
 		},
 		onLoad(options) {
 			this.goodId = options.goodId
 			NET.request(API.getShopDetail + '/' + this.goodId, {}, 'GET').then(res => {
-				res.data.storeImgUrl = res.data.storeImgUrl && res.data.storeImgUrl.length ? res.data.storeImgUrl : []
+				res.data.storeImgUrl = res.data.storeImgUrl && res.data.storeImgUrl.length ? res.data.storeImgUrl.split(',') : []
 				this.shopData = res.data
 			}).catch(res => {
 				this.$refs.uTips.show({
@@ -132,6 +131,13 @@
 					type: 'warning',
 				})
 			})
+			this.getAllGoodsList()
+		},
+		onReady() {
+			let queryNode = uni.createSelectorQuery().in(this);
+			queryNode.select('#shopBox').boundingClientRect(data => {
+				this.winWidth = data.width
+			}).exec();
 			NET.request(API.getCategoryByShop + this.goodId, {}, 'GET').then(res => {
 				this.categoryList = res.data
 				this.selectSort = res.data.length ? res.data[0].productCategoryId : ''
@@ -142,13 +148,6 @@
 					type: 'warning',
 				})
 			})
-			this.getAllGoodsList()
-		},
-		onReady() {
-			this.queryNode = uni.createSelectorQuery().in(this);
-			this.queryNode.select('#shopBox').boundingClientRect(data => {
-				this.winWidth = data.width
-			}).exec();
 		},
 		methods: {
 			//  切换tab
@@ -226,8 +225,9 @@
 			},
 			//  动态渲染宽度
 			setWidth() {
+				let queryNode = uni.createSelectorQuery().in(this);
 				this.categoryList.forEach((site, index) => {
-					this.queryNode.select('#categoryCol' + index).boundingClientRect(data => {
+					queryNode.select('#categoryCol' + index).boundingClientRect(data => {
 						if (data.width > this.winWidth * 0.66) {
 							site.width = 100
 						} else if (data.width > this.winWidth * 0.33) {

+ 2 - 2
pagesMain/entrustList.vue

@@ -60,10 +60,10 @@
 			//  获取委托
 			getEntrustList() {
 				NET.request(API.getEvaluateList, {
-					productId: this.productId,
+					productId: this.productData.productId,
 					pageIndex: this.pageIndex,
 					pageSize: 10,
-				}, 'GET').then(res => {
+				}, 'POST').then(res => {
 					this.isOver = res.data.list.length != 10
 					this.plantList = this.plantList.concat(res.data.list)
 					this.entrustTotle = res.data.total