gcz 2 年之前
父節點
當前提交
332c76d575

+ 17 - 8
components/cartfixed.vue

@@ -29,15 +29,24 @@
 				this.$u.api.cartList().then(res=>{
 					if(isAdd){
 						if(res.data.total==this.cartTotal){
-							this.$refs.uToast.show({
-								type:"success",
-								message:'已在购物车'
-							});
+							uni.showToast({
+								title:'已在购物车',
+								icon:'success'
+							})
+							
+							// this.$refs.uToast.show({
+							// 	type:"success",
+							// 	message:'已在购物车'
+							// });
 						}else{
-							this.$refs.uToast.show({
-								type:"success",
-								message:'加入成功'
-							});
+							uni.showToast({
+								title:'加入成功',
+								icon:'success'
+							})
+							// this.$refs.uToast.show({
+							// 	type:"success",
+							// 	message:'加入成功'
+							// });
 						}
 					}
 					this.cartTotal = res.data.total;

+ 1 - 1
credits/credits.vue

@@ -45,7 +45,7 @@
 								¥{{item.salePrice}}
 								<text class="vip-icon">VIP</text>
 							</view>
-							<view class="price" v-else>¥{{item.salePrice}}</view>
+							<view class="price" v-else>¥ {{ item.exchangeType==0?0:item.salePrice}}</view>
 							<view class="bottom u-flex u-row-between">
 								<text>+{{item.exchangeCredit}}积分</text>
 								<text class="btn">兑换</text>

+ 2 - 0
shopping/cart.vue

@@ -428,6 +428,8 @@
 	
 }
 .cart-bottom{
+	position: relative;
+	z-index: 1001;
 	height: 98rpx;
 	.inner{
 		position: fixed;

+ 2 - 0
shopping/evaluate.vue

@@ -34,6 +34,7 @@
 				 width="140rpx"
 				 height="140rpx"
 			    :fileList="fileList"
+				@beforeRead="beforeRead"
 			    @afterRead="afterRead"
 				@delete="deletePic"
 				:previewImage="true"
@@ -97,6 +98,7 @@
 			},
 			submit(){
 				this.params.contentImgList = this.fileList.map(item =>{
+					console.log('contentImgList===',item);
 					if(item.message=='成功'){
 						return item.url.url
 					}

+ 12 - 4
shopping/order.vue

@@ -23,8 +23,9 @@
 						:class="item.class"
 						@click="goOrderDetails(item.id)" :key="item.id">
 						<view class="top u-flex u-row-between">
-							<text v-if="item.orderType==2">[积分]</text>
-							<text>订单号:{{item.orderNum||''}}</text>
+							<text>
+								<text v-if="item.orderType==2">[积分]</text>订单号:{{item.orderNum||''}}
+							</text>
 							<text class="status">{{item.status|filterOrderState}}</text>
 						</view>
 						<view class="center">
@@ -93,7 +94,7 @@
 					3:[{name:'查看物流',fun:'logistics',class:''},{name:'评价',fun:'evaluate',class:'green'}],
 					// 4:[{name:'查看物流',fun:'logistics',class:''},{name:'评价',fun:'evaluate',class:'green'}],
 					5:[{name:'查看退款',fun:'viewRefund',class:'green'}],
-					// 6:[{name:'查看退款',fun:'viewRefund',class:'green'}],
+					6:[{name:'查看物流',fun:'logistics',class:''},{name:'查看评价',fun:'viewEvaluate',class:'green'}],
 					7:[{name:'查看退款',fun:'viewRefund',class:'green'}]
 				},
 				orderBadge:{
@@ -200,6 +201,7 @@
 			/*若希望重新加载列表,只需调用此方法即可(内部会自动page.num=1,再主动触发up.callback)*/
 			reloadList() {
 				this.mescroll.resetUpScroll();
+				this.statisticsOrder();
 			},
 			tabsClick(item){
 				// this.status = item.status;
@@ -221,7 +223,8 @@
 				  refund:this.refund,
 				  cancelOrder:this.cancelOrder,
 				  viewRefund:this.viewRefund,
-				  confirmReceipt:this.confirmReceipt
+				  confirmReceipt:this.confirmReceipt,
+				  viewEvaluate:this.viewEvaluate
 				};
 				// console.log('funObj[fun]',funObj[fun]);
 				if (fun in funObj) {
@@ -307,6 +310,11 @@
 				    }
 				})
 			},
+			viewEvaluate(item){
+				uni.$u.route('/shopping/orderdetails', {
+					id: item.id
+				});
+			},
 			statisticsOrder(){
 				this.$u.api.statisticsOrder().then(res=>{
 					let data = res.data || {};

+ 1 - 1
shopping/orderdetails.vue

@@ -14,7 +14,7 @@
 				<view class="left u-flex">
 					<u--image :showLoading="false" :src="staticUrl+'/img/car.png'" width="48rpx" height="48rpx"></u--image>
 					<view class="text">
-						<view class="status">{{orderDetails.detailList[0].status|filterDilevery}}</view>
+						<view class="status">{{orderDetails.status|filterOrderState}}</view>
 						<view>{{orderDetails.createTime}}</view>
 					</view>
 				</view>

+ 6 - 2
shopping/paysuccess.vue

@@ -12,13 +12,17 @@
 	export default {
 		data() {
 			return {
+				fromPage:'',
 				title:'付款成功'
 			}
 		},
 		onShow() {		
 		},
-		onLoad() {
-
+		onLoad(page) {
+			this.fromPage = page.fromPage;
+			if(this.fromPage=='nocash'){
+				this.title = '兑换成功'
+			}
 		},
 		methods: {
 			btnClick(){

+ 2 - 1
shopping/productdetails.vue

@@ -30,7 +30,8 @@
 					<text class="exchangeCredit" v-if="details.isCredit==1">+{{details.exchangeCredit}}积分</text>
 				</view>
 				<view class="" v-else>
-					<text class="price">¥ <text class="price-num">{{details.salePrice}}</text></text>
+					<text v-if="details.exchangeType==0" class="price">¥ <text class="price-num">0</text></text>
+					<text v-else class="price">¥ <text class="price-num">{{details.salePrice}}</text></text>
 					<text class="exchangeCredit" v-if="details.isCredit==1">+{{details.exchangeCredit}}积分</text>
 				</view>
 			</view>

+ 1 - 1
shopping/refund.vue

@@ -15,7 +15,7 @@
 						<u-icon slot="right" name="arrow-right"></u-icon>
 					</u-form-item>
 					<u-form-item label="补充说明">
-						<u--textarea v-model="remark" placeholder="请输入内容" ></u--textarea>
+						<u--textarea v-model="model.remark" placeholder="请输入内容" ></u--textarea>
 					</u-form-item>
 				</u--form>
 			</view>

+ 11 - 5
shopping/submitorder.vue

@@ -284,11 +284,17 @@
 						that.$u.api.submitOrder(param).then(res=>{
 							console.log('res',res.data);
 							that.cansubmit = true;
-							uni.$u.route('/shopping/pay', {
-								orderId: res.data.orderId,
-								fromPage:this.fromPage,
-								payAmount:res.data.payAmount
-							});
+							if(res.data.payAmount>0){
+								uni.$u.route('/shopping/pay', {
+									orderId: res.data.orderId,
+									fromPage:that.fromPage,
+									payAmount:res.data.payAmount
+								});
+							}else{
+								uni.$u.route('/shopping/paysuccess', {
+									fromPage:'nocash'
+								});
+							}
 						}).catch(err=>{
 							that.cansubmit = true;
 							console.log('submitOrder',err);

+ 4 - 0
static/css/common.scss

@@ -44,6 +44,10 @@
 	text-align: center;
 	margin-bottom: 40rpx;
 	margin-top: 20rpx;
+	&.gray{
+		background-color: #ddd;
+		color: #999;
+	}
 }
 .view-wrap{
 	background-color: #fff;