Browse Source

Merge branch 'master' of http://git.cc-lotus.info/pointToNetwork/point-app

zs 2 years ago
parent
commit
5a238a15d8
4 changed files with 14 additions and 17 deletions
  1. 2 2
      common/api.js
  2. 2 0
      pagesHome/group/.gitignore
  3. 2 1
      pagesMy/order/all.vue
  4. 8 14
      pagesMy/order/info.vue

+ 2 - 2
common/api.js

@@ -42,20 +42,20 @@ const getRequestKey = (views) => {
 				else reject();
 			},
 			fail: (err) => {
-				console.log(err);
 			},
 		});
 	});
 };
 export const requestBase = async (uri, method = 'GET', data, type) => {
 	let baseUrl = getDomain(uri, method, type);
-	let token = getToken();
+	// let token = getToken();
 	let header = {};
 	let views = JSON.stringify({
 		uri,
 		method
 	});
 	views = encodeURIComponent(views);
+	const token = uni.getStorageSync('token');
 	if (token) header.token = token;
 	if (method === 'GET') {
 		return new Promise((resolve, reject) => {

+ 2 - 0
pagesHome/group/.gitignore

@@ -0,0 +1,2 @@
+unpackage/
+.hbuilderx/

+ 2 - 1
pagesMy/order/all.vue

@@ -334,8 +334,9 @@
 						url: `/pagesMy/dough/info?id=${item._id}`
 					})
 				} else {
+					console.log(item);
 					uni.navigateTo({
-						url: `/pagesMy/order/info?id=${item._id}&status=${item.status}`
+						url: `/pagesMy/order/info?id=${item._id}&status=${item.status}&is_order=${item.is_order}`
 					})
 				}
 			},

+ 8 - 14
pagesMy/order/info.vue

@@ -40,9 +40,7 @@
 										<view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
 											<view class="goods_1">
 												<view class="url">
-													<image class="image"
-														:src="tag.goods.file&&tag.goods.file.length>0?tag.goods.file[0].url:tag.goods.goods.file[0].url"
-														mode=""></image>
+													<image class="image" :src="tag.goods.file&&tag.goods.file.length>0?tag.goods.file[0].url:tag.goods.goods.file[0].url" mode=""></image>
 												</view>
 												<view class="goodsname">
 													{{tag.goods.name}}
@@ -73,8 +71,7 @@
 												</view>
 											</view>
 											<view class="goods_2" v-if="tag.gift.length>0">赠品</view>
-											<view class="goods_3" v-if="tag.gift.length>0"
-												v-for="(tags,indexx) in tag.gift" :key="indexx">
+											<view class="goods_3" v-if="tag.gift.length>0" v-for="(tags,indexx) in tag.gift" :key="indexx">
 												<view class="left">
 													<view class="name">
 														{{tags.goods_name}}
@@ -121,9 +118,7 @@
 										<view v-if="item.is_set=='0'">
 											<view class="goods_1" v-for="(tag,indexc) in item.goods" :key="indexc">
 												<view class="url">
-													<image class="image"
-														:src="tag.file&&tag.file.length>0?tag.file[0].url:tag.goods.file[0].url"
-														mode="">
+													<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:tag.goods.file[0].url" mode="">
 													</image>
 												</view>
 												<view class="goodsname">
@@ -140,9 +135,7 @@
 										</view>
 										<view class="goods_1" v-else>
 											<view class="url">
-												<image class="image"
-													:src="item.file&&item.file.length>0?item.file[0].url:item.goods.file[0].url"
-													mode="">
+												<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:item.goods.file[0].url" mode="">
 												</image>
 											</view>
 											<view class="goodsname">
@@ -168,8 +161,7 @@
 											</view>
 										</view>
 										<view class="goods_2" v-if="item.gift.length>0">赠品</view>
-										<view class="goods_3" v-if="item.gift.length>0"
-											v-for="(tag,indexx) in item.gift" :key="indexx">
+										<view class="goods_3" v-if="item.gift.length>0" v-for="(tag,indexx) in item.gift" :key="indexx">
 											<view class="left">
 												<view class="name">
 													{{tag.goods_name}}
@@ -243,6 +235,7 @@
 			return {
 				id: '',
 				status: '',
+				is_order: false,
 				info: {},
 				// 售后状态
 				statusList: [],
@@ -252,6 +245,7 @@
 			const that = this;
 			that.$set(that, `id`, e.id);
 			that.$set(that, `status`, e.status);
+			that.$set(that, `is_order`, e.is_order);
 			await that.searchOther();
 			await that.search()
 		},
@@ -266,7 +260,7 @@
 				let res;
 				// 待付款
 				if (that.id) {
-					if (that.status == '0') {
+					if (JSON.parse(that.is_order)) {
 						res = await that.$api(`/order/${that.id}`);
 					} else {
 						res = await that.$api(`/orderDetail/${that.id}`);