Merge pull request 'upload file' (#53) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/53
This commit is contained in:
		
						commit
						66f21e230a
					
				@ -44,9 +44,9 @@ unescapeHTML(temp){}
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
* 上传文件(只能单文件上传)
 | 
					* 上传文件(只能单文件上传)
 | 
				
			||||||
* @param { String } url 服务器 url
 | 
					* @param { String } url 服务器 url
 | 
				
			||||||
 | 
					* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像
 | 
				
			||||||
* @param { String } filePath 要上传文件资源的路径
 | 
					* @param { String } filePath 要上传文件资源的路径
 | 
				
			||||||
* @param { String } type 上传文件验证类型 默认: img 可选: video
 | 
					 | 
				
			||||||
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
 | 
					* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
uploadFile({ url, filePath, type = 'img' } = {}) {}
 | 
					uploadFile({ url, name, filePath }) {}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
@ -216,7 +216,7 @@ export default {
 | 
				
			|||||||
					page: page,
 | 
										page: page,
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			// 意见反馈列表 
 | 
								// 意见反馈列表
 | 
				
			||||||
			getFeedbackList({ page }) {
 | 
								getFeedbackList({ page }) {
 | 
				
			||||||
				return vm.$u.post('Member/feedbackList', {
 | 
									return vm.$u.post('Member/feedbackList', {
 | 
				
			||||||
					page: page,
 | 
										page: page,
 | 
				
			||||||
@ -254,15 +254,6 @@ export default {
 | 
				
			|||||||
					file: file,
 | 
										file: file,
 | 
				
			||||||
				 });
 | 
									 });
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			// 上传图片视频
 | 
					 | 
				
			||||||
			uploadfile({ file }) {
 | 
					 | 
				
			||||||
				const params = {
 | 
					 | 
				
			||||||
					file: file
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				console.log(params);
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				return vm.$u.post('Upload/uploadfile', params);
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -17,7 +17,7 @@
 | 
				
			|||||||
					<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
 | 
										<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
 | 
				
			||||||
					<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
 | 
										<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
 | 
				
			||||||
						<image src="@/pageE/static/mine/26.png"></image>
 | 
											<image src="@/pageE/static/mine/26.png"></image>
 | 
				
			||||||
						<view>2020.05.17</view>
 | 
											<view>{{ order.add_time | date }}</view>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
@ -25,6 +25,7 @@
 | 
				
			|||||||
		<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
 | 
							<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
 | 
				
			||||||
			<view class="logistics" v-if="order.order_state == 30" @click="toLogistics">查看物流</view>
 | 
								<view class="logistics" v-if="order.order_state == 30" @click="toLogistics">查看物流</view>
 | 
				
			||||||
			<view class="comment" v-if="order.order_state == 20" @click="toComment">立即评价</view>
 | 
								<view class="comment" v-if="order.order_state == 20" @click="toComment">立即评价</view>
 | 
				
			||||||
 | 
								<view class="calcel" v-if="order.order_state == 10">取消支付</view>
 | 
				
			||||||
			<view class="payment" v-if="order.order_state == 10">立即支付</view>
 | 
								<view class="payment" v-if="order.order_state == 10">立即支付</view>
 | 
				
			||||||
			<view class="service" v-if="order.order_state == 40">联系官方客服</view>
 | 
								<view class="service" v-if="order.order_state == 40">联系官方客服</view>
 | 
				
			||||||
			<view class="submit" v-if="order.order_state == 40">提交官方审核</view>
 | 
								<view class="submit" v-if="order.order_state == 40">提交官方审核</view>
 | 
				
			||||||
@ -70,7 +71,7 @@ export default {
 | 
				
			|||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		toDetailsPage() {
 | 
							toDetailsPage() {
 | 
				
			||||||
			uni.navigateTo({
 | 
								uni.navigateTo({
 | 
				
			||||||
				url: '/pageE/order/Details?order.order_state=' + this.order.order_state
 | 
									url: '/pageE/order/Details?id=' + this.order.order_id
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		toLogistics() {
 | 
							toLogistics() {
 | 
				
			||||||
@ -184,6 +185,9 @@ export default {
 | 
				
			|||||||
		.logistics, .comment, .payment {
 | 
							.logistics, .comment, .payment {
 | 
				
			||||||
			@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
 | 
								@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							.calcel {
 | 
				
			||||||
 | 
								@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		.service {
 | 
							.service {
 | 
				
			||||||
			@include btn-class($width: 216rpx, $color: rgba(155,153,153,1));
 | 
								@include btn-class($width: 216rpx, $color: rgba(155,153,153,1));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,8 @@ export default {
 | 
				
			|||||||
					this.avatar = res.tempFilePaths[0];
 | 
										this.avatar = res.tempFilePaths[0];
 | 
				
			||||||
					common.uploadFile({ 
 | 
										common.uploadFile({ 
 | 
				
			||||||
						url: url,
 | 
											url: url,
 | 
				
			||||||
						filePath: res.tempFilePaths[0] 
 | 
											name: 'avatar',
 | 
				
			||||||
 | 
											filePath: res.tempFilePaths[0]
 | 
				
			||||||
					}).then(result => {
 | 
										}).then(result => {
 | 
				
			||||||
						this.avatar = result;
 | 
											this.avatar = result;
 | 
				
			||||||
					}, error => {
 | 
										}, error => {
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,10 @@
 | 
				
			|||||||
						</view>
 | 
											</view>
 | 
				
			||||||
						<view @click="viewProgress">
 | 
											<view @click="viewProgress">
 | 
				
			||||||
							<view class="title">预计进度</view>
 | 
												<view class="title">预计进度</view>
 | 
				
			||||||
							<view class="value">{{ memberInfo.next_grade_exppoints_diff }}</view>
 | 
												<!-- <view class="value">{{ memberInfo.next_grade_exppoints_diff }}</view> -->
 | 
				
			||||||
 | 
												<view class="value">
 | 
				
			||||||
 | 
													<image src="/static/image/mine/32.png"></image>
 | 
				
			||||||
 | 
												</view>
 | 
				
			||||||
						</view>
 | 
											</view>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
					<scroll-view scroll-y class="integral-botom" :style="{ height: richHeight }">
 | 
										<scroll-view scroll-y class="integral-botom" :style="{ height: richHeight }">
 | 
				
			||||||
@ -151,6 +154,10 @@ export default {
 | 
				
			|||||||
						font-size: 48rpx;
 | 
											font-size: 48rpx;
 | 
				
			||||||
						font-weight: 500;
 | 
											font-weight: 500;
 | 
				
			||||||
						color: rgba(255,255,255,1);
 | 
											color: rgba(255,255,255,1);
 | 
				
			||||||
 | 
											> image {
 | 
				
			||||||
 | 
												width: 52rpx;
 | 
				
			||||||
 | 
												height: 35rpx;
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,33 +1,30 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="complaints">
 | 
						<view class="complaints">
 | 
				
			||||||
		<view class="complaints-box" v-for="item in feedbackList" :key="item.fb_id">
 | 
							<scroll-view scroll-y @scrolltolower="reachBottom">
 | 
				
			||||||
			<view class="suggestions">
 | 
								<view class="complaints-box" v-for="item in feedbackList" :key="item.fb_id">
 | 
				
			||||||
				<view class="text">{{ item.fb_content }}</view>
 | 
									<view class="suggestions">
 | 
				
			||||||
				<view class="image">
 | 
										<view class="text">{{ item.fb_content }}</view>
 | 
				
			||||||
					<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
 | 
										<view class="image">
 | 
				
			||||||
 | 
											<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
 | 
				
			||||||
 | 
										</view>
 | 
				
			||||||
 | 
									</view>
 | 
				
			||||||
 | 
									<view class="reply">
 | 
				
			||||||
 | 
										<view class="reply-title">后台回复:</view>
 | 
				
			||||||
 | 
										<view class="reply-content u-line-4">{{ item.reply_content }}</view>
 | 
				
			||||||
 | 
									</view>
 | 
				
			||||||
 | 
									<view class="date">
 | 
				
			||||||
 | 
										<image src="../static/mine/26.png"></image>
 | 
				
			||||||
 | 
										<view>{{ reply_time }}</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
			<view class="reply">
 | 
								<u-empty text="暂无意见" mode="list" color="#000000" icon-size="90" margin-top="300" v-if="!feedbackList.length"></u-empty>
 | 
				
			||||||
				<view class="reply-title">后台回复:</view>
 | 
							</scroll-view>
 | 
				
			||||||
				<view class="reply-content u-line-4">{{ item.reply_content }}</view>
 | 
					 | 
				
			||||||
			</view>
 | 
					 | 
				
			||||||
			<view class="date">
 | 
					 | 
				
			||||||
				<image src="../static/mine/26.png"></image>
 | 
					 | 
				
			||||||
				<view>{{ reply_time }}</view>
 | 
					 | 
				
			||||||
			</view>
 | 
					 | 
				
			||||||
		</view>
 | 
					 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			imgList: [
 | 
					 | 
				
			||||||
				require('../static/mine/23.png'),
 | 
					 | 
				
			||||||
				require('../static/mine/23.png'),
 | 
					 | 
				
			||||||
				require('../static/mine/23.png'),
 | 
					 | 
				
			||||||
				require('../static/mine/23.png')
 | 
					 | 
				
			||||||
			],
 | 
					 | 
				
			||||||
			feedbackList: [],
 | 
								feedbackList: [],
 | 
				
			||||||
			page: 1, // 默认1
 | 
								page: 1, // 默认1
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,9 @@
 | 
				
			|||||||
				:custom-btn="true" 
 | 
									:custom-btn="true" 
 | 
				
			||||||
				:max-count="count" 
 | 
									:max-count="count" 
 | 
				
			||||||
				:auto-upload="false"
 | 
									:auto-upload="false"
 | 
				
			||||||
 | 
									:action="action"
 | 
				
			||||||
 | 
									:header="header"
 | 
				
			||||||
 | 
									:form-data="formData"
 | 
				
			||||||
			>
 | 
								>
 | 
				
			||||||
				<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
 | 
									<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
 | 
				
			||||||
					<img src="../static/mine/27.png" />
 | 
										<img src="../static/mine/27.png" />
 | 
				
			||||||
@ -20,32 +23,36 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			action: $u.http.baseUrl + 'Upload/uploadfile',
 | 
								action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
 | 
				
			||||||
			count: 4, // 最大图片数量
 | 
								count: 4, // 最大图片数量
 | 
				
			||||||
			text: '',
 | 
								text: '',
 | 
				
			||||||
			imageList: []
 | 
								imageList: [],
 | 
				
			||||||
 | 
								header: {
 | 
				
			||||||
 | 
									"authorization": 'Bearer' + " " + uni.getStorageSync('token')
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								formData: {
 | 
				
			||||||
 | 
									name: '',
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		submit() {
 | 
							submit() {
 | 
				
			||||||
			console.log(this.action);
 | 
								console.log(this.action);
 | 
				
			||||||
			console.log(this.imageList);
 | 
								console.log(this.imageList);
 | 
				
			||||||
			
 | 
								this.$refs.uUpload.upload();
 | 
				
			||||||
			// this.$refs.uUpload.upload();
 | 
					 | 
				
			||||||
			let promise = [];
 | 
								let promise = [];
 | 
				
			||||||
			this.imageList.forEach(url => {
 | 
								this.imageList.forEach(url => {
 | 
				
			||||||
				// this.uploadImage(url);
 | 
									// this.uploadImage(url);
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			Promise.all(promise).then(() => {
 | 
								// Promise.all(promise).then(() => {
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
			})
 | 
								// })
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		async uploadImage(file) {
 | 
							async beforeUpload(index, list) {
 | 
				
			||||||
			this.$u.api.uploadfile({ 
 | 
								console.log(index, list);
 | 
				
			||||||
				file: file,
 | 
								
 | 
				
			||||||
			}).then(res => {
 | 
								// let data = await this.$u.post('url');
 | 
				
			||||||
				if(res.errCode == 0) {}
 | 
								// return true; // 或者根据逻辑返回false
 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		writeFeedback() {
 | 
							writeFeedback() {
 | 
				
			||||||
			this.$u.api.writeFeedback({ 
 | 
								this.$u.api.writeFeedback({ 
 | 
				
			||||||
 | 
				
			|||||||
@ -21,17 +21,19 @@
 | 
				
			|||||||
			<view class="info-goods">
 | 
								<view class="info-goods">
 | 
				
			||||||
				<view class="goods-store">
 | 
									<view class="goods-store">
 | 
				
			||||||
					<view class="stoer-title">
 | 
										<view class="stoer-title">
 | 
				
			||||||
						<image src="../static/mine/23.png" class="store-image"></image>
 | 
											<image :src="orderInfo.extend_store.store_avatar" class="store-image"></image>
 | 
				
			||||||
						<view class="store-name">胖胖的店</view>
 | 
											<view class="store-name">{{ orderInfo.extend_store.store_name }}</view>
 | 
				
			||||||
						<image src="../static/mine/21.png" class="right-icon"></image>
 | 
											<image src="../static/mine/21.png" class="right-icon"></image>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
					<view class="store-goods">
 | 
										<view v-for="goods in orderInfo.extend_order_goods" :key="goods.goods_id">
 | 
				
			||||||
						<image src="../static/mine/23.png"></image>
 | 
											<view class="store-goods">
 | 
				
			||||||
						<view class="goods-info">
 | 
												<image :src="goods.goods_image"></image>
 | 
				
			||||||
							<view class="goods-name u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
 | 
												<view class="goods-info">
 | 
				
			||||||
							<view class="goods-order">
 | 
													<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
 | 
				
			||||||
								<view class="price">¥99</view>
 | 
													<view class="goods-order">
 | 
				
			||||||
								<view class="num">x2</view>
 | 
														<view class="price">¥{{ goods.goods_pay_price }}</view>
 | 
				
			||||||
 | 
														<view class="num">x{{ goods.goods_num }}</view>
 | 
				
			||||||
 | 
													</view>
 | 
				
			||||||
							</view>
 | 
												</view>
 | 
				
			||||||
						</view>
 | 
											</view>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
@ -55,7 +57,7 @@
 | 
				
			|||||||
					</view>
 | 
										</view>
 | 
				
			||||||
					<view>
 | 
										<view>
 | 
				
			||||||
						<view class="title">支付方式</view>
 | 
											<view class="title">支付方式</view>
 | 
				
			||||||
						<view class="price">¥0.00</view>
 | 
											<view class="price">{{ orderInfo.payment_name }}</view>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
@ -83,9 +85,8 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	onLoad(option) {
 | 
						onLoad(option) {
 | 
				
			||||||
		this.current = option.current;
 | 
					 | 
				
			||||||
		console.log(option.current);
 | 
					 | 
				
			||||||
		this.setTitle();
 | 
							this.setTitle();
 | 
				
			||||||
 | 
							this.getOrderInfo(option.id);
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		getOrderInfo(id) {
 | 
							getOrderInfo(id) {
 | 
				
			||||||
@ -98,11 +99,9 @@ export default {
 | 
				
			|||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		setTitle(){
 | 
							setTitle(){
 | 
				
			||||||
			let title = ''
 | 
								let title = '';
 | 
				
			||||||
			switch (this.current) {
 | 
								switch (this.current) {
 | 
				
			||||||
				case '1':
 | 
									case '1':
 | 
				
			||||||
					console.log(title);
 | 
					 | 
				
			||||||
					
 | 
					 | 
				
			||||||
					title = "支付成功"
 | 
										title = "支付成功"
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
				default:
 | 
									default:
 | 
				
			||||||
 | 
				
			|||||||
@ -41,7 +41,7 @@ export default {
 | 
				
			|||||||
			orderList: [],
 | 
								orderList: [],
 | 
				
			||||||
			loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
 | 
								loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
 | 
				
			||||||
			page: 0,
 | 
								page: 0,
 | 
				
			||||||
			current: 0,
 | 
								current: Number,
 | 
				
			||||||
			swiperCurrent: 0,
 | 
								swiperCurrent: 0,
 | 
				
			||||||
			swiperHeight: '',
 | 
								swiperHeight: '',
 | 
				
			||||||
			timer: true,
 | 
								timer: true,
 | 
				
			||||||
@ -51,7 +51,7 @@ export default {
 | 
				
			|||||||
		OrderItem
 | 
							OrderItem
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		current() {
 | 
							current(value) {
 | 
				
			||||||
			this.page = 0;
 | 
								this.page = 0;
 | 
				
			||||||
			this.getOrderList('again');
 | 
								this.getOrderList('again');
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@ -98,16 +98,16 @@ export default {
 | 
				
			|||||||
				if(reload) this.orderList = res.data;
 | 
									if(reload) this.orderList = res.data;
 | 
				
			||||||
				else this.orderList.push(...res.data);
 | 
									else this.orderList.push(...res.data);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			return res.data.length;
 | 
								return res;
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		reachBottom() {
 | 
							reachBottom() {
 | 
				
			||||||
			if(!this.timer) return false;
 | 
								if(!this.timer) return false;
 | 
				
			||||||
			this.timer = false;
 | 
								this.timer = false;
 | 
				
			||||||
			this.loadStatus.splice(this.current, 1, "loading");
 | 
								this.loadStatus.splice(this.current, 1, "loading");
 | 
				
			||||||
			this.page++;
 | 
								this.page++;
 | 
				
			||||||
			this.getOrderList.then(length => {
 | 
								this.getOrderList.then(res => {
 | 
				
			||||||
				this.loadStatus.splice(this.current, 1, "nomore");
 | 
									this.loadStatus.splice(this.current, 1, "nomore");
 | 
				
			||||||
				if(length == 0) this.page--;
 | 
									if(res.data.length == 0) this.page--;
 | 
				
			||||||
			}).catch(() => {
 | 
								}).catch(() => {
 | 
				
			||||||
				this.loadStatus.splice(this.current, 1, "nomore");
 | 
									this.loadStatus.splice(this.current, 1, "nomore");
 | 
				
			||||||
				this.page--;
 | 
									this.page--;
 | 
				
			||||||
 | 
				
			|||||||
@ -59,6 +59,10 @@ export default {
 | 
				
			|||||||
					title: '证件中心',
 | 
										title: '证件中心',
 | 
				
			||||||
					link: '../mine/ArticleDetails?type=1'
 | 
										link: '../mine/ArticleDetails?type=1'
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										title: '屏蔽用户',
 | 
				
			||||||
 | 
										link: './ShieldUsers'
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					title: '关于我们',
 | 
										title: '关于我们',
 | 
				
			||||||
					link: '../mine/ArticleDetails?type=2'
 | 
										link: '../mine/ArticleDetails?type=2'
 | 
				
			||||||
@ -66,7 +70,7 @@ export default {
 | 
				
			|||||||
				{
 | 
									{
 | 
				
			||||||
					title: '帮助与反馈',
 | 
										title: '帮助与反馈',
 | 
				
			||||||
					link: './feedback'
 | 
										link: './feedback'
 | 
				
			||||||
				}
 | 
									},
 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										59
									
								
								pageE/setting/ShieldUsers.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								pageE/setting/ShieldUsers.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,59 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
						<view class="shield">
 | 
				
			||||||
 | 
							<view class="shield-list" v-for="(item, index) in 5" :key="index">
 | 
				
			||||||
 | 
								<view class="infomation">
 | 
				
			||||||
 | 
									<u-avatar :src="src" size="80"></u-avatar>
 | 
				
			||||||
 | 
									<view class="nickname u-line-1">神的温柔</view>
 | 
				
			||||||
 | 
								</view>
 | 
				
			||||||
 | 
								<view class="btn">取消屏蔽</view>
 | 
				
			||||||
 | 
							</view>
 | 
				
			||||||
 | 
						</view>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								src: 'https://dmmall.sdbairui.com/uploads/home/avatar/avatar_19.jpg'
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.shield {
 | 
				
			||||||
 | 
						min-height: calc(100vh - var(--window-top));
 | 
				
			||||||
 | 
						background-color: #ECECEC;
 | 
				
			||||||
 | 
						padding-top: 1rpx;
 | 
				
			||||||
 | 
						.shield-list {
 | 
				
			||||||
 | 
							background-color: #FFF;;
 | 
				
			||||||
 | 
							display: flex;
 | 
				
			||||||
 | 
							align-items: center;
 | 
				
			||||||
 | 
							justify-content: space-between;
 | 
				
			||||||
 | 
							padding: 10rpx 30rpx;
 | 
				
			||||||
 | 
							color:rgba(51,51,51,1);
 | 
				
			||||||
 | 
							margin-bottom: 2rpx;
 | 
				
			||||||
 | 
							.infomation {
 | 
				
			||||||
 | 
								display: flex;
 | 
				
			||||||
 | 
								align-items: center;
 | 
				
			||||||
 | 
								.nickname {
 | 
				
			||||||
 | 
									width: 300rpx;
 | 
				
			||||||
 | 
									font-size: 28rpx;
 | 
				
			||||||
 | 
									margin-left: 20rpx;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							.btn {
 | 
				
			||||||
 | 
								font-size: 24rpx;
 | 
				
			||||||
 | 
								position: relative;
 | 
				
			||||||
 | 
								&::before {
 | 
				
			||||||
 | 
									position: absolute;
 | 
				
			||||||
 | 
									left: -30rpx;
 | 
				
			||||||
 | 
									top: 50%;
 | 
				
			||||||
 | 
									transform: translate(0, -50%);
 | 
				
			||||||
 | 
									content: '';
 | 
				
			||||||
 | 
									width: 1rpx;
 | 
				
			||||||
 | 
									height: 38rpx;
 | 
				
			||||||
 | 
									background: rgba(236,236,236,1);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -1,14 +1,18 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="manicure-order">
 | 
						<view class="manicure-order">
 | 
				
			||||||
		<view class="order-form">
 | 
							<view class="order-form">
 | 
				
			||||||
			<view class="order-name">
 | 
								<!-- <view class="order-name">
 | 
				
			||||||
				<view>美甲人:</view>
 | 
									<view>美甲人:</view>
 | 
				
			||||||
				<input type="text" v-model="name" />
 | 
									<input type="text" v-model="name" />
 | 
				
			||||||
			</view>
 | 
								</view> -->
 | 
				
			||||||
			<view class="order-date" @click="show=true">
 | 
								<view class="order-date" @click="show=true">
 | 
				
			||||||
				<view>美甲时间:</view>
 | 
									<view class="title">美甲时间:</view>
 | 
				
			||||||
				<img src="../static/mine/21.png" v-if="!time" />
 | 
									<image src="../static/mine/21.png" v-if="!time"></image>
 | 
				
			||||||
				<view v-else>{{ time }}</view>
 | 
									<view v-else class="time">{{ time }}</view>
 | 
				
			||||||
 | 
								</view>
 | 
				
			||||||
 | 
								<view class="order-address">
 | 
				
			||||||
 | 
									<view class="title">美甲地址:</view>
 | 
				
			||||||
 | 
									<input type="text" v-model="address" disabled />
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
		</view>
 | 
							</view>
 | 
				
			||||||
		<view class="order-btn" @click="addManicureOrder">确认订单</view>
 | 
							<view class="order-btn" @click="addManicureOrder">确认订单</view>
 | 
				
			||||||
@ -22,6 +26,7 @@ export default {
 | 
				
			|||||||
		return {
 | 
							return {
 | 
				
			||||||
			name: '',
 | 
								name: '',
 | 
				
			||||||
			time: '',
 | 
								time: '',
 | 
				
			||||||
 | 
								address: '四川省攀枝花市银江镇',
 | 
				
			||||||
			params: {
 | 
								params: {
 | 
				
			||||||
				year: true,
 | 
									year: true,
 | 
				
			||||||
				month: true,
 | 
									month: true,
 | 
				
			||||||
@ -96,8 +101,11 @@ export default {
 | 
				
			|||||||
			&:not(:last-child) {
 | 
								&:not(:last-child) {
 | 
				
			||||||
				margin-bottom: 2rpx;
 | 
									margin-bottom: 2rpx;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								.title {
 | 
				
			||||||
 | 
									font-size: 30rpx;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		.order-name {
 | 
							.order-address {
 | 
				
			||||||
			display: flex;
 | 
								display: flex;
 | 
				
			||||||
			align-items: center;
 | 
								align-items: center;
 | 
				
			||||||
			> view {
 | 
								> view {
 | 
				
			||||||
@ -105,18 +113,24 @@ export default {
 | 
				
			|||||||
				color: rgba(51,51,51,1);
 | 
									color: rgba(51,51,51,1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			> input {
 | 
								> input {
 | 
				
			||||||
 | 
									padding-left: 20rpx;
 | 
				
			||||||
				flex: 1;
 | 
									flex: 1;
 | 
				
			||||||
				text-align: right;
 | 
									font-size: 28rpx;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		.order-date {
 | 
							.order-date {
 | 
				
			||||||
			display: flex;
 | 
								display: flex;
 | 
				
			||||||
			align-items: center;
 | 
								align-items: center;
 | 
				
			||||||
			justify-content: space-between;
 | 
								justify-content: space-between;
 | 
				
			||||||
			> img {
 | 
								> image {
 | 
				
			||||||
				width: 14rpx;
 | 
									width: 14rpx;
 | 
				
			||||||
				height :24rpx;
 | 
									height :24rpx;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								.time {
 | 
				
			||||||
 | 
									padding-left: 20rpx;
 | 
				
			||||||
 | 
									flex: 1;
 | 
				
			||||||
 | 
									text-align: left;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.order-btn {
 | 
						.order-btn {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										13
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								pages.json
									
									
									
									
									
								
							@ -715,6 +715,19 @@
 | 
				
			|||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										"path": "setting/ShieldUsers",
 | 
				
			||||||
 | 
										"style": {
 | 
				
			||||||
 | 
											"navigationBarTitleText": "屏蔽用户",
 | 
				
			||||||
 | 
											"app-plus": {
 | 
				
			||||||
 | 
												"titleSize": "36px",
 | 
				
			||||||
 | 
												"titleNView": {
 | 
				
			||||||
 | 
													"titleColor": "#333333",
 | 
				
			||||||
 | 
													"backgroundColor": "#FFFFFF"
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					"path": "order/Index",
 | 
										"path": "order/Index",
 | 
				
			||||||
					"style": {
 | 
										"style": {
 | 
				
			||||||
 | 
				
			|||||||
@ -2,10 +2,10 @@
 | 
				
			|||||||
    <view class="mine">
 | 
					    <view class="mine">
 | 
				
			||||||
        <view class="mine-top">
 | 
					        <view class="mine-top">
 | 
				
			||||||
            <view class="top">
 | 
					            <view class="top">
 | 
				
			||||||
				<u-avatar :src="userInfo.member_avatar" :size="110"></u-avatar>
 | 
									<u-avatar  @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar>
 | 
				
			||||||
				<view class="user-info">
 | 
									<view class="user-info">
 | 
				
			||||||
					<view class="info-left">
 | 
										<view class="info-left">
 | 
				
			||||||
						<view class="user-nickname" @click="toOtherPage('/mine/MineInfo')">{{ userInfo.member_nickname }}</view>
 | 
											<view class="user-nickname">{{ userInfo.member_nickname }}</view>
 | 
				
			||||||
						<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
 | 
											<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
 | 
				
			||||||
							<img src="/static/image/mine/13.png" />
 | 
												<img src="/static/image/mine/13.png" />
 | 
				
			||||||
							<view class="rank-title">勋章</view>
 | 
												<view class="rank-title">勋章</view>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,23 +12,26 @@ const common = {
 | 
				
			|||||||
	/**
 | 
						/**
 | 
				
			||||||
	* 上传文件(只能单文件上传)
 | 
						* 上传文件(只能单文件上传)
 | 
				
			||||||
	* @param { String } url 服务器 url
 | 
						* @param { String } url 服务器 url
 | 
				
			||||||
 | 
						* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像
 | 
				
			||||||
	* @param { String } filePath 要上传文件资源的路径
 | 
						* @param { String } filePath 要上传文件资源的路径
 | 
				
			||||||
	* @param { String } type 上传文件验证类型 默认: img 可选: video
 | 
					 | 
				
			||||||
	* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
 | 
						* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
 | 
				
			||||||
	*/
 | 
						*/
 | 
				
			||||||
	uploadFile({ url, filePath, type = 'img' } = {}) {
 | 
						uploadFile({ url, name, filePath }) {
 | 
				
			||||||
		const token = uni.getStorageSync('token');
 | 
							const token = uni.getStorageSync('token');
 | 
				
			||||||
		const promise =  new Promise((resolve, reject) => {
 | 
							const promise =  new Promise((resolve, reject) => {
 | 
				
			||||||
			uni.uploadFile({
 | 
								uni.uploadFile({
 | 
				
			||||||
				url: url,
 | 
									url: url,
 | 
				
			||||||
				header: { "authorization": 'Bearer' + " " + token },
 | 
									header: { "authorization": 'Bearer' + " " + token },
 | 
				
			||||||
				filePath: filePath,
 | 
									filePath: filePath,
 | 
				
			||||||
				name: 'file',
 | 
									name: name,
 | 
				
			||||||
				formData: { type: type },
 | 
									formData: {
 | 
				
			||||||
 | 
										name: name,
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				success: uploadFileRes => {
 | 
									success: uploadFileRes => {
 | 
				
			||||||
					const data = JSON.parse(uploadFileRes.data);
 | 
										const data = JSON.parse(uploadFileRes.data);
 | 
				
			||||||
 | 
										// console.log(data);
 | 
				
			||||||
					if(data.errCode == 0) {
 | 
										if(data.errCode == 0) {
 | 
				
			||||||
						resolve(data.data.url);
 | 
											resolve(data.data);
 | 
				
			||||||
					} else {
 | 
										} else {
 | 
				
			||||||
						reject(data.message);
 | 
											reject(data.message);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user