Bläddra i källkod

0716-0308-h01

Zory 1 dag sedan
förälder
incheckning
a12f956499

+ 23 - 8
pages.json

@@ -4,16 +4,16 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "奥莱优品",
-				"navigationBarBackgroundColor": "#007aff",
-				"navigationBarTextStyle": "white"
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
 			}
 		},{
 			"path" : "pages/order/order",
 			"style" : 
 			{
 				"navigationBarTitleText" : "订单中心",
-				"navigationBarBackgroundColor": "#007aff",
-				"navigationBarTextStyle": "white"
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -38,8 +38,7 @@
 			{
 				"navigationBarTitleText" : "客服中心",
 				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarBackgroundColor": "#007aff",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -58,8 +57,8 @@
 			"style" : 
 			{
 				"navigationBarTitleText" : "订单详情",
-				"navigationBarBackgroundColor": "#007aff",
-				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black",
 				"usingComponents": {
 					"pay-button-sdk": "tta5a3d31e3aecfb9b11://pay-button"
 				}
@@ -133,6 +132,22 @@
 			"style": {
 				"navigationBarTitleText": ""
 			}
+		},
+		{
+			"path": "pages/user/complaint/complaint",
+			"style": {
+				"navigationBarTitleText": "我的投诉",
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/user/complaint/detail",
+			"style": {
+				"navigationBarTitleText": "投诉详情",
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
+			}
 		}
 	],
 	"tabBar": {

+ 1 - 1
pages/auth/login.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="login-logo">
 			<view class="login-logo-body">
-				<image src="/static/image/logo.png"></image>
+				<image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/logo.jpg"></image>
 				<view class="logo-text">奥莱优品</view>
 			</view>
 		</view>

+ 2 - 1
pages/goods/detail.vue

@@ -121,7 +121,8 @@
 			
 			<view class="service-popup popup-white" v-if="otherImg.length > 0">
 				<view class="rule-content">
-					<view class="content-data" v-html="goodsData.content"></view>
+					<view class="content-data" v-html="goodsData.content"></view>
+					
 					<view class="rule-img" v-for="(item,indx) in otherImg" :key="indx">
 						<image :src="item" mode="widthFix"></image>
 					</view>

+ 3 - 3
pages/order/detail.vue

@@ -34,10 +34,10 @@
 							height="200"
 							unit="rpx"
 							color="#000000"
-							:data="orderData.out_order_no">
+							:data="orderData.order_sn">
 						</ikun-qrcode>
 					</view>
-					<view class="qrcode-text">券码 {{orderData.out_order_no}} <text @click="copyOrder(orderData.out_order_no)">复制</text></view>
+					<view class="qrcode-text">券码 {{orderData.order_sn}} <text @click="copyOrder(orderData.order_sn)">复制</text></view>
 				</view>
 				<view class="status-desc success" v-if="orderData.status == 2">服务已完成,欢迎您再次使用</view>
 				<view class="status-desc" v-if="orderData.status == 3">{{ $dialog.formatMoney(orderData.pay_money,true) }} 已原路退回</view>
@@ -96,7 +96,7 @@
 				<view class="title">订单信息</view>
 				<view class="info-item">
 					<view class="name">订单编号</view>
-					<view class="right">{{ orderData.order_sn }} <text @click="copyOrder(orderData.order_sn)">复制</text></view>
+					<view class="right">{{ orderData.out_order_no }} <text @click="copyOrder(orderData.out_order_no)">复制</text></view>
 				</view>
 				<!-- <view class="info-item">
 					<view class="name">订单编号</view>

+ 121 - 0
pages/user/complaint/complaint.vue

@@ -0,0 +1,121 @@
+<template>
+	<view class="content">
+		<view class="tab-menu">
+			<view :class="orderState==0?'tab-item active':'tab-item'" @click="orderStatus(0)">全部</view>
+			<view :class="orderState==1?'tab-item active':'tab-item'" @click="orderStatus(1)">已受理</view>
+			<view :class="orderState==2?'tab-item active':'tab-item'" @click="orderStatus(2)">已回复</view>
+		</view>
+		<view class="order-body">
+			<z-paging ref="paging" show-refresher-update-time v-model="dataList" @query="queryList" :fixed="false">
+				<navigator hover-class="none" :url="'/pages/user/complaint/detail?id='+item.id" class="order-item" v-for="(item,indx) in dataList" :key="indx">
+					<view class="order-info">
+						<view class="info-item">
+							<view class="name">订单编号</view>
+							<view class="item-content">{{ item.order_sn }}</view>
+						</view>
+						<view class="info-item">
+							<view class="name">投诉事项</view>
+							<view class="item-content">{{ item.question }}</view>
+						</view>
+						<view class="order-status" v-if="item.status == 0">
+							<image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-2.svg"></image>
+						</view>
+						<view class="order-status" v-if="item.status == 1">
+							<image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-3.svg"></image>
+						</view>
+					</view>
+					<view class="order-footer">
+						<view class="footer-l">{{item.create_at}}</view>
+						<view class="footer-r">
+							<view class="btn danger">查看详情</view>
+						</view>
+					</view>
+				</navigator>
+			</z-paging>
+		</view>
+	</view>
+</template>
+
+<script>
+var app;
+import * as Api from "@/static/api/complaint.js";
+export default {
+	data() {
+		return {
+			listState:false,
+			orderState:0,
+			dataList:[],
+			storeData:null
+		}
+	},
+	onLoad() {
+		app = this;
+		app.storeData = uni.getStorageSync("contact");
+	},
+	methods: {
+		orderStatus(state) {
+			app.orderState = state;
+			app.dataList = [];
+			app.queryList(1,10)
+		},
+		queryList(pageNo, pageSize){
+			var formData = {};
+			var token = uni.getStorageSync("user_token")
+			if (!token) {
+				return false;
+			}
+			var poiId = uni.getStorageSync("poiId");
+			formData.page = pageNo;
+			formData.size = pageSize;
+			formData.status = app.orderState;
+			formData.poi = poiId;
+			app.listState = true;
+			Api.list(formData).then((res)=>{
+				app.listState = false;
+				uni.hideLoading();
+				if (res.code !== 1) {
+					this.$refs.paging.complete(false);
+					return app.$dialog.showSuccess(res.msg);
+				}
+				app.$refs.paging.complete(res.data.rows);
+			})
+		}
+	}
+}
+</script>
+
+<style>
+.order-info{position: relative;}
+.order-info .order-status{position: absolute;right: 20upx;top: 20upx;}
+.order-info .order-status image{width: 120upx;height: 120upx;transform: rotate(45deg);}
+.order-info .name{font-size: 28upx;color: #666;padding: 20upx 0;}
+.order-info .item-content{font-size: 28upx;color: #000;}
+.order-info .item-content .order-status{font-size: 28upx;color: #f00;}
+.order-info .item-content .order-status.success{color: #007aff;}
+
+.content{height: 100vh;background-color: #f8f8f8;}
+.content .tab-menu{height: 80upx;line-height: 80upx;background-color: #fff;display: flex;align-items: center;font-size: 28upx;color: #666;justify-content: space-around;}
+.content .tab-menu .tab-item{position: relative;}
+.content .tab-menu .tab-item.active{color: #007aff;}
+.content .tab-menu .tab-item.active::after{position: absolute;content: "";width: 30%;left: 35%;height: 4upx;bottom: 0;background-color: #007aff;}
+.content .order-body{height: calc(100vh - 100upx); }
+
+.order-item{background-color: #fff;padding: 0 20upx;border-radius: 10upx;width: calc(95% - 40upx);margin: 20upx auto;}
+.order-item .item-header{display: flex;align-items: center;height: 60upx;line-height: 60upx;}
+.order-item .item-header .order-status{font-size: 28upx;color: #f00;}
+.order-item .item-header .order-status.success{color: #007aff;}
+.order-item .item-header .order-time{font-size: 24upx;color: #999;margin-left: auto;margin-right: 0;}
+
+.order-footer{display: flex;text-align: right;padding: 20upx 0;border-top: 2upx solid #f8f8f8;align-items: center;}
+.order-footer .footer-l{font-size: 28upx;color: #666;}
+.order-footer .footer-r{display: flex;margin-left: auto;margin-right: 0;flex: 1;justify-content: end;gap: 20upx;}
+.order-footer .btn{width: 160upx;height: 60upx;line-height: 60upx;text-align: center;border: 2upx solid #ccc;color: #333;font-size: 28upx;border-radius: 10upx;}
+.order-footer .btn.danger{border:2upx solid #f00;color: #f00;}
+.order-footer .btn.blue{border:2upx solid #007aff;color: #007aff;}
+
+.empty-body{display: flex;align-items: center;justify-content: center;flex-direction: column;height: calc(100vh - 100upx);}
+.empty-body .img{text-align: center;font-size: 28upx;color: #666;}
+.empty-body .img image{height: 160upx;width: 160upx;}
+.empty-body .img .tip{margin-top: 20upx;}
+.empty-body .re-btn{width: 180upx;height: 80upx;line-height: 80upx;text-align: center;font-size: 28upx;color: #fff;background-color: #007aff;border-radius: 10upx;margin-top: 60upx;}
+</style>

+ 173 - 0
pages/user/complaint/detail.vue

@@ -0,0 +1,173 @@
+<template>
+	<view>
+		<view class="loading-content" v-if="loading">
+			<view class="store-header">
+				<view class="logo"><view class="skeleton-line animate"></view></view>
+				<view class="info">
+					<view class="skeleton-line animate"></view>
+					<view class="skeleton-line animate mt15"></view>
+				</view>
+			</view>
+			<view class="store-detail">
+				<view class="detail-left">
+					<view class="skeleton-line animate"></view>
+					<view class="skeleton-line animate mt15"></view>
+				</view>
+			</view>
+			<view class="store-goods">
+				<view class="goods-item" v-for="(item,index) in 3" :key="index">
+					<view class="image"><view class="skeleton-line animate"></view></view>
+					<view class="info">
+						<view class="skeleton-line animate"></view>
+						<view class="skeleton-line animate mt15"></view>
+						<view class="skeleton-line animate mt15"></view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<block v-else>
+		<view class="ts-header">
+			<view class="ts-h-title">投诉门店</view>
+			<view class="store-info">
+				<view class="store-left">
+					<view class="name">{{dataInfo.store.poi_name}}</view>
+					<view class="address">{{dataInfo.store.poi_address}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="ts-body">
+			<view class="order-status" v-if="dataInfo.status == 0">
+				<image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-2.svg"></image>
+			</view>
+			<view class="order-status" v-if="dataInfo.status == 1">
+				<image src="https://jymini.oss-cn-guangzhou.aliyuncs.com/mini/complaint-3.svg"></image>
+			</view>
+			<view class="ts-form">
+				<view class="ts-form-item">
+					<view class="form-title">具体问题 <text>*</text></view>
+					<view class="form-input">
+						{{dataInfo.question}}
+					</view>
+				</view>
+				<view class="ts-form-item">
+					<view class="form-title">问题订单 <text>*</text></view>
+					<view class="form-input">
+						{{dataInfo.order_sn}}
+					</view>
+				</view>
+				<view class="ts-form-item">
+					<view class="form-title">联系方式</view>
+					<view class="form-input">
+						{{dataInfo.mobile}}
+					</view>
+				</view>
+				<view class="ts-form-item">
+					<view class="form-title">详细补充 <text>*</text></view>
+					<view class="form-input-text">
+						{{dataInfo.content}}
+					</view>
+				</view>
+				<view class="ts-form-item">
+					<view class="form-title">回复结果 <text>*</text></view>
+					<view class="form-input-text">
+						<view class="data" v-html="dataInfo.remark"></view>
+					</view>
+				</view>
+			</view>
+		</view>
+		</block>
+	</view>
+</template>
+
+<script>
+var app;
+import * as Api from "@/static/api/complaint.js";
+export default {
+	data() {
+		return {
+			options:null,
+			disabled:false,
+			dataInfo:null,
+			loading:true
+		}
+	},
+	onLoad(options) {
+		app = this;
+		app.options = options;
+		app.getDetail()
+	},
+	methods: {
+		tipsPop(){
+			app.$refs.tspopup.close()
+		},
+		getDetail(){
+			app.loading = true;
+			Api.detail(app.options).then((res)=>{
+				app.loading = false;
+				if (res.code == 0) {
+					app.$dialog.showSuccess(validation,"none",function(){
+						uni.navigateBack()
+					});
+					return false;
+				}
+				app.dataInfo = res.data;
+			})
+		},
+		submitTs(){
+			var validation = form.validation(app.options,[
+				{name:"content",rule:["required"],msg:["请输入描述内容"]}
+			]);
+			if(validation){
+				app.$dialog.showSuccess(validation);
+				return false;
+			}
+			Api.complaint(app.options).then((res)=>{
+				if (res.code == 0) {
+					return app.$dialog.showSuccess(res.msg);
+				}
+				app.$dialog.showSuccess(res.msg,"none",function(){
+					uni.navigateBack()
+				});
+			})
+		}
+	}
+}
+</script>
+
+<style>
+page{background-color: #f8f8f8;}
+.loading-content{margin: 20upx;}
+.form-input-text{font-size: 28upx;line-height: 43upx;}
+.form-input-text image{width: 100%;}
+.form-input-text img{width: 100%;}
+.ts-popup{background-color: #fff;width: 90vw;border-radius: 20upx;}
+.ts-popup .title{font-size: 32upx;color: #333;font-weight: bold;padding: 30upx 0;text-align: center;}
+.ts-popup .sub-title{color: #f00;padding: 20upx 0;text-align: center;font-size: 28upx;}
+.ts-popup .tips-body{width: 90%;margin: 0 auto;}
+.ts-popup .tips-body .item-title{font-size: 28upx;color: #333;padding: 15upx 0;}
+.ts-popup .tips-body .item-desc{font-size: 28upx;color: #333;line-height: 46upx;margin-bottom: 20upx;}
+.ts-popup .pup-close{padding-top: 40upx;}
+.ts-popup .pup-close .pop-btn{border: 0;background-color: #f00;font-size: 32upx;color: #fff;border-radius: 0 0 20upx 20upx;padding: 15upx 0;cursor: pointer;}
+
+.ts-header{padding: 20upx 0;margin-bottom: 20upx;}
+.ts-header .ts-h-title{font-size: 28upx;color: #666;padding: 20upx;}
+.ts-header .store-info{background-color: #fff;padding: 20upx;}
+.ts-header .store-info .store-left .name{font-size: 30rpx;color: #333;font-weight: bold;line-height: 80upx;}
+.ts-header .store-info .store-left .address{font-size: 24rpx;color: #999;}
+.ts-body{background-color: #fff;padding: 20upx;position: relative;}
+
+.ts-body .order-status{position: absolute;right: 20upx;top: 20upx;}
+.ts-body .order-status image{width: 120upx;height: 120upx;transform: rotate(45deg);}
+
+.ts-form .ts-form-item{border-bottom: 2upx solid #f8f8f8;padding-bottom: 10upx;}
+.ts-form .ts-form-item:last-child{border-bottom: 0;}
+.ts-form .ts-form-item .form-title{color: #333;font-size: 28upx;padding: 20upx 0;}
+.ts-form .ts-form-item .form-title text{color: #f00;margin-left: 10upx;}
+.ts-form .ts-form-item .form-input{font-size: 28upx;color: #333;height: 80upx;display: flex;align-items: center;}
+.ts-form .ts-form-item .ts-input{height: 100%;border: 0;box-shadow: none;width: 100%;}
+.ts-form .form-input-textarea{height: 200upx;font-size: 28upx;color: #333;}
+.footer{position: fixed;bottom: 0;background-color: #fff;padding: 20upx 20upx 0 20upx;border-top: 2upx solid #f8f8f8;left: 0;right: 0;}
+.footer .footer-safe {height: env(safe-area-inset-bottom);width: 100%;}
+.footer .footer-btn{padding: 20upx 0;}
+.footer .footer-btn .btn{color: #fff;background-color: #f00;border-radius: 10upx;}
+</style>

+ 6 - 1
pages/user/user.vue

@@ -28,6 +28,11 @@
 				<view class="name">个人信息</view>
 				<view class="right"><image src="/static/image/right.png"></image></view>
 			</view>
+			<view class="menu-item" @click="$dialog.jumpUri('/pages/user/complaint/complaint')">
+				<view class="icon"><image src="/static/image/rule-rule.png"></image></view>
+				<view class="name">我的投诉</view>
+				<view class="right"><image src="/static/image/right.png"></image></view>
+			</view>
 			<view class="menu-item" @click="showService(1)">
 				<view class="icon"><image src="/static/image/service.png"></image></view>
 				<view class="name">商家客服</view>
@@ -126,7 +131,7 @@ export default {
 
 <style>
 page{background-color: #f8f8f8;}
-.user-header{background-color: #005bac;padding: 40upx;display: flex;align-items: center;background: linear-gradient(to right, #094d89, #007aff);width: calc(95% - 80upx);margin: 40upx auto;border-radius: 10upx;}
+.user-header{padding: 40upx;display: flex;align-items: center;background-color: #007aff;}
 .user-header image{width: 100upx;height: 100upx;border-radius: 100upx;}
 .user-header .user-info{margin-left: 20upx;}
 .user-header .name{font-size: 32upx;color: #fff;}

+ 13 - 0
static/api/complaint.js

@@ -0,0 +1,13 @@
+import request from '@/static/js/request.js'
+
+const apiUri = {
+	detail: '/complaint/detail',
+	list: '/complaint/list',
+}
+
+export function list(param) {
+	return request.request(apiUri.list,'GET', param,false,true,true)
+}
+export function detail(param) {
+	return request.request(apiUri.detail,'GET', param,false,true,true)
+}