Ver Fonte

上传文件至 'pages/mine'

linwenxin há 4 meses atrás
pai
commit
93fc797f53
5 ficheiros alterados com 1666 adições e 0 exclusões
  1. 293 0
      pages/mine/applySalesman.vue
  2. 212 0
      pages/mine/collection.vue
  3. 811 0
      pages/mine/index.vue
  4. 169 0
      pages/mine/mallCode.vue
  5. 181 0
      pages/mine/wxCode.vue

+ 293 - 0
pages/mine/applySalesman.vue

@@ -0,0 +1,293 @@
+<template>
+	<view class="app-container">
+		<view class="banner">
+			<image src="@/static/mine/apply.png" mode="widthFix"></image>
+		</view>
+		<view class="main">
+			<view class="title">请输入您登录企业微信的手机号码</view>
+			
+			<view class="form">
+				<view class="row">
+					<view class="row-c">
+						<view class="left">+86</view>
+						<view class="input">
+							<input type="text" placeholder="请输入手机号码" v-model="phone">
+						</view>
+					</view>
+				</view>
+				<view class="row">
+					<view class="row-c">
+						<view class="left">验证码</view>
+						<view class="input">
+							<input type="text" placeholder="请输入短信验证码" v-model="code">
+						</view>
+					</view>
+					<view class="btn" :class="!phone || countDown != 60 ? 'disabled': ''" @tap="getCode">{{countDown == 60 ? getCodeText : countDown+'s'}}</view>
+				</view>
+			</view>
+			<view class="tips" >{{countDown != 60 ? '验证码已发送,请注意查收短信':''}}</view>
+			
+			<view class="button" :class="!phone || !code ? 'disabled': ''" @tap="submitForm">确定</view>
+			
+		</view>
+		
+		<view class="code-container" v-show="isShowCode">
+			<view class="title">请完成安全验证</view>
+			<pt-images-verification ref="verification" :top="codeObj.yHeight" :bgImg="codeObj.bigImage" :maskImg="codeObj.smallImage" :isSuccess="codeObj.isSuccess" :isFail="codeObj.isFail" @refresh="refresh" @finish="finish"></pt-images-verification>
+			<view class="button" @tap="isShowCode = false">关闭</view>
+		</view>
+		<div class="global-mask" v-show="isShowCode"></div>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				phone: '',
+				code: '',
+				getCodeText: '获取验证码',
+				countDown: 60,
+				timer: null,
+				
+				isShowCode: false,
+				codeObj: {
+					bigImage: '',
+					smallImage: '',
+					key: '',
+					yHeight: '',
+					isSuccess: false,
+					isFail: false,
+				}
+			}
+		},
+		onLoad() {
+			
+		},
+		methods: {
+			// 获取验证码
+			getCode() {
+				if(!this.phone) {
+					this.$toast('请先填写手机号码');
+					return false;
+				}
+				if(this.countDown != 60) {
+					this.$toast('请勿频繁获取验证码');
+					return false;
+				}
+				if(!(/^1[3456789]\d{9}$/.test(this.phone))) {
+					this.$toast('请填写正确的手机号码');
+					return false;
+				}
+				
+				// this.init();
+				this.isShowCode = true;
+				this.$refs.verification.refresh();
+				
+			},
+			
+			// 提交表单
+			submitForm() {
+				if(!this.phone) {
+					this.$toast('请先填写手机号码');
+					return false;
+				}
+				if(!(/^1[3456789]\d{9}$/.test(this.phone))) {
+					this.$toast('请填写正确的手机号码');
+					return false;
+				}
+				if(!this.code) {
+					this.$toast('请先填写验证码');
+					return false;
+				}
+				
+				this.$axios({
+					url: '/worker/bind',
+					params: {
+						phone: this.phone,
+						code: this.code
+					},
+					isLoading: 1
+				}).then(res => {
+					this.$successToast('申请成功');
+					setTimeout(() => {
+						uni.navigateBack({
+							delta: 1
+						})
+					}, 1500)
+				})
+				
+			},
+			
+			// 获取图片验证码
+			init(){
+				this.$axios({
+					url: '/common/getVerifi',
+					method: 'get',
+					params: {},
+					isLoading: 1
+				}).then(res => {
+					this.codeObj = res.data;
+				})
+			},
+			// 刷新验证码
+			refresh(){
+				this.init()
+			},
+			// 验证结束
+			finish(value){
+				console.log(value);
+				this.$axios({
+					url: '/worker/sms/send',
+					params: {
+						phone: this.phone,
+						key: this.codeObj.key,
+						vrifyCode: Math.round(value)
+					},
+					isLoading: 1
+				}).then(res => {
+					this.codeObj.isSuccess = true;
+					this.codeObj.isFail = false;
+					setTimeout(() => {
+						this.isShowCode = false;
+						this.$toast('短信发送成功');
+					}, 1500)
+					this.countDown--;
+					this.timer = setInterval(() => {
+						this.countDown--;
+						if (this.countDown == 0) {
+							this.countDown = 60;
+							this.getCodeText = '重新获取';
+							clearInterval(this.timer)
+						}
+					}, 1000)
+				}).catch(res => {
+					this.codeObj.isSuccess = false;
+					this.codeObj.isFail = true;
+					setTimeout(() => {
+						this.$refs.verification.refresh();
+					}, 1500)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.app-container {
+		background: #F4F2F2;
+		box-sizing: border-box;
+	}
+	.banner {
+		image {
+			width: 100%;
+		}
+	}
+	.code-container {
+		position: fixed;
+		top: calc(50vh - 150px);
+		left: calc(50vw - 170px);
+		z-index: 999;
+		background: #FFFFFF;
+		padding: 20px;
+		border-radius: 10rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		.title {
+			font-size: 28rpx;
+			color: #333333;
+			width: 100%;
+			text-align: left;
+			margin-bottom: 10px;
+		}
+		.button {
+			margin-top: 20px;
+			color: #666666;
+			width: 200rpx;
+			line-height: 60rpx;
+			border: 1px solid #eaeaea;
+			border-radius: 10rpx;
+			text-align: center;
+		}
+	}
+	.main {
+		padding: 50rpx;
+		.title {
+			font-size: 32rpx;
+			color: #333333;
+			text-align: center;
+		}
+		.button {
+			margin-top: 120rpx;
+			width: 100%;
+			text-align: center;
+			line-height: 88rpx;
+			border-radius: 88rpx;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			background: linear-gradient(-90deg,#ff3f42 0%, #fe781f 100%);
+			&.disabled {
+				background: #C1C1C1;
+			}
+		}
+		.tips {
+			font-size: 24rpx;
+			color: #FE781F;
+			line-height: 24rpx;
+			margin-top: 20rpx;
+			height: 24rpx;
+			margin-left: 10rpx;
+		}
+		.form {
+			margin-top: 60rpx;
+			.row {
+				&:last-child {
+					margin-top: 40rpx;
+					display: flex;
+					align-items: flex-end;
+					.btn {
+						width: 180rpx;
+						height: 50rpx;
+						border-radius: 50rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						font-size: 24rpx;
+						color: #FFFFFF;
+						background: linear-gradient(-90deg,#ff3f42 0%, #fe781f 100%);
+						margin-left: 30rpx;
+						&.disabled {
+							background: #C1C1C1;
+						}
+					}
+				}
+				.row-c {
+					height: 60rpx;
+					display: flex;
+					align-items: center;
+					border-bottom: 1px solid #D1D1D1;
+					.left {
+						width: 140rpx;
+						height: 28rpx;
+						border-right: 1px solid #D1D1D1;
+						font-size: 30rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						flex-shrink: 0;
+					}
+					.input {
+						width: 100%;
+						input {
+							font-size: 30rpx;
+							width: 100%;
+							padding: 0 25rpx;
+							box-sizing: border-box;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 212 - 0
pages/mine/collection.vue

@@ -0,0 +1,212 @@
+<template>
+	<view class="app-container">
+		<view class="list-container">
+			<block v-for="(item, index) in dataList" :key='index'>
+				<view class="item" @tap="toGoodsDetail(item.goodsId)" @longpress="handleDelete(item.goodsFavoriteId)">
+					<image :src="item.imgUrl" mode="aspectFill"></image>
+					<view class="content">
+						<view class="title ellipsis-2">{{item.goodsName}}</view>
+						<view class="bottom">
+							<view class="price">
+								<view class="price-1">¥{{item.goodsPrice | numToFixed}}</view>
+								<view class="price-2">¥{{item.orgGoodsPrice | numToFixed}}</view>
+							</view>
+							<view class="btn"><image src="@/static/icon/cart.png" mode="aspectFill"></image></view>
+						</view>
+					</view>
+				</view>
+			</block>
+		</view>
+		<no-data v-if="!dataList.length" :showText="'暂无收藏商品'"></no-data>
+		<loading-text v-if="dataList.length"  :loading="loading" :noMore="noMore" ></loading-text>
+		
+		<modal-dialog showText="确定要取消收藏吗?" :isShowDialog="isDialog" @cancel="isDialog = false" @confirm="confirmDelete"></modal-dialog>
+		
+		<!-- <drag-button :isDock="true" :customBar="true" ref="dragButton"></drag-button> -->
+	</view>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+	import modalDialog from '@/components/modalDialog.vue';
+	// import dragButton from '@/components/drag-button.vue';
+	
+	export default {
+		components:{
+			modalDialog,
+			// dragButton
+		},
+		data() {
+			return {
+				dataList: [],
+				pageNum: 1,
+				pageSize: 8,
+				noMore: false,
+				loading: false,
+				deleteId: null,
+				isDialog: false,
+			}
+		},
+		
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId'])
+		},
+		
+		onShow() {
+			// this.$refs.dragButton.init();
+		},
+		
+		onLoad() {
+			this.getGoodsList();
+		},
+		
+		// 下拉刷新
+		onPullDownRefresh() {
+			this.pageNum = 1;
+			this.getGoodsList();
+		},
+		
+		// 上拉加载
+		onReachBottom() {
+			this.getGoodsList(1);
+		},
+		
+		methods: {
+			// 获取商品列表
+			getGoodsList(loadMore) {
+				if(this.noMore && loadMore)return;
+				this.noMore = false
+				if(!loadMore){
+					this.pageNum = 1;
+				}else{
+					this.loading = true;
+				}
+				this.$axios({
+					url: '/goods/favorite/query',
+					method: 'get',
+					params: {
+						pageNum: this.pageNum,
+						pageSize: this.pageSize,
+						userId: this.userId,
+					},
+					isLoading: !loadMore
+				}).then(res => {
+					let _list = res.data.list;
+					let pageTotal = res.data.pages;
+					if(this.pageNum >= pageTotal){
+						this.noMore = true;
+					}
+					if (_list && _list.length) {
+						this.pageNum += 1
+					}
+					if (loadMore) {
+						this.dataList = this.dataList.concat(_list);
+						this.loading = false;
+					} else {
+						this.dataList = _list;
+					}
+					
+					uni.stopPullDownRefresh();
+				})
+			},
+			
+			handleDelete(id) {
+				this.deleteId = id;
+				this.isDialog = true;
+			},
+			
+			// 取消收藏
+			confirmDelete() {
+				this.$axios({
+					url: '/goods/favorite/del',
+					params: {
+						goodFavoriteId: this.deleteId
+					},
+					isLoading: 1,
+				}).then(res => {
+					this.isDialog = false;
+					this.$successToast('取消收藏成功');
+					this.getGoodsList();
+				})
+			},
+			
+			toGoodsDetail(id) {
+				uni.navigateTo({
+					url: '/packageGoods/pages/detail?id=' + id
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.app-container {
+		background: #F4F2F2;
+		box-sizing: border-box;
+	}
+	.list-container {
+		display: flex;
+		flex-wrap: wrap;
+		padding: 20rpx;
+		.item {
+			width: 348rpx;
+			background: #FFFFFF;
+			margin-right: 14rpx;
+			margin-bottom: 20rpx;
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			image {
+				width: 348rpx;
+				height: 348rpx;
+			}
+			.content {
+				padding: 15rpx 20rpx;
+				.title {
+					font-size: 30rpx;
+					color: #333333;
+					line-height: 36rpx;
+					font-weight: 600;
+					height: 72rpx;
+				}
+				.bottom {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					margin-top: 10rpx;
+					.price {
+						display: flex;
+						flex-direction: column;
+					}
+					.price-1 {
+						font-size: 32rpx;
+						color: #FF3F42;
+						line-height: 36rpx;
+					}
+					.price-2 {
+						font-size: 26rpx;
+						color: #666666;
+						line-height: 30rpx;
+						text-decoration: line-through;
+					}
+					.btn {
+						width: 60rpx;
+						height: 60rpx;
+						background: #FE781F;
+						border-radius: 50%;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						image {
+							width: 41rpx;
+							height: 36rpx;
+							display: block;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 811 - 0
pages/mine/index.vue

@@ -0,0 +1,811 @@
+<template>
+	<view class="app-container">
+		<custom :bgColor="'bg-them'" :backColor="'#FFFFFF'" :isBack="false" v-show="isCustom">
+			<text slot="content" style="color: #FFFFFF; font-size: 36rpx;">我的</text>
+		</custom>
+		
+		<view class="top-container">
+			<image src="@/static/home/top_bg.png" mode="widthFix" class="bg"></image>
+			
+			<view class="content">
+				<view class="title" :style="cuStyle">我的</view>
+				
+				<view class="user" v-if="isLogin">
+					<view class="left" @tap="isShowInfoDialog = true">
+						<block v-if="detail.avatar">
+							<image :src="detail.avatar" mode="aspectFill" v-if="detail.avatar.indexOf('http') >= 0"></image>
+							<image :src="imageUrl + detail.avatar" mode="aspectFill" v-else></image>
+						</block>
+						
+						<view class="main" v-if="isServiceUser">
+							<view class="name">{{detail.serviceWorkerBean.workerRealName}}</view>
+							<view class="text" v-if="detail.serviceWorkerBean.websit">{{detail.serviceWorkerBean.websit}}</view>
+						</view>
+						<view class="main" v-else>
+							<view class="name">{{detail.nickName}}</view>
+						</view>
+					</view>
+					<view class="code" v-if="isServiceUser">
+						<image src="@/static/mine/code.png" @tap="navigatePage('/pages/mine/mallCode')"></image>
+						<text>商城二维码</text>
+					</view>
+				</view>
+				<view class="user" @tap="navigatePage('/pages/login/index')" v-else>
+					<view class="left">
+						<image :src="configInfo.minLogo3" mode="aspectFill"></image>
+						<view class="main">
+							<view class="name">请先登录</view>
+						</view>
+					</view>
+				</view>
+				
+				<view class="order">
+					<view class="top">
+						<view class="left">我的订单</view>
+						<view class="right" @tap="toMyOrder('')">查看全部订单<image src="../../static/icon/right.png"></image></view>
+					</view>
+					<view class="list">
+						<view class="item" @tap="toMyOrder('NOPAY')">
+							<view class="image"><image src="../../static/mine/order_icon1.png"></image><text v-if="count.noPay > 0">{{count.noPay}}</text></view>
+							<view>待付款</view>
+						</view>
+						<view class="item" @tap="toMyOrder('DFH')">
+							<view class="image"><image src="../../static/mine/order_icon2.png"></image><text v-if="count.dfh > 0">{{count.dfh}}</text></view>
+							<view>待发货</view>
+						</view>
+						<view class="item" @tap="toMyOrder('YFH')">
+							<view class="image"><image src="../../static/mine/order_icon3.png"></image><text v-if="count.yfh > 0">{{count.yfh}}</text></view>
+							<view>待收货</view>
+						</view>
+						<view class="item" @tap="toMyOrder('OVER')">
+							<view class="image"><image src="../../static/mine/order_icon4.png"></image><text v-if="count.ywc > 0">{{count.ywc}}</text></view>
+							<view>已完成</view>
+						</view>
+						<view class="item" @tap="toMyOrder('REFUND')">
+							<view class="image"><image src="../../static/mine/order_icon5.png"></image><text v-if="count.sh > 0">{{count.sh}}</text></view>
+							<view>售后服务</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="list-container">
+			
+			
+			<view class="group" v-if="userInfo && !userInfo.mobile">
+				<view class="item" @tap="isShowPhoneDialog = true">
+					<view class="left">
+						<image src="/static/mine/mine_icon1.png"></image>获取手机号码
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view>
+			
+			<!-- <view class="group" v-if="!isServiceUser">
+				<view class="item" @tap="navigatePage('/pages/mine/applySalesman')">
+					<view class="left">
+						<image src="/static/mine/mine_icon1.png"></image>申请成为业务员
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view> -->
+			<!-- <view class="group" v-if="isHeadUser">
+				<view class="item" @tap="navigatePage('/pages/mine/groupbuy/list')">
+					<view class="left">
+						<image src="/static/mine/mine_icon12.png"></image>我的团购
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view> -->
+			<view class="group" v-if="isServiceUser || isHeadUser">
+				<view class="item" @tap="navigatePage('/pages/mine/profit/list')" v-if="isServiceUser || isHeadUser">
+					<view class="left">
+						<image src="/static/mine/mine_icon7.png"></image>我的收益
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<view class="item" @tap="navigatePage('/pages/mine/ranking/list')" v-if="isServiceUser">
+					<view class="left">
+						<image src="/static/mine/mine_icon10.png"></image>销售排行榜
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view>
+			<view class="group" v-if="isServiceUser">
+				<view class="item" @tap="navigatePage('/pages/mine/discode/list')" v-if="hasExchangeCode">
+					<view class="left">
+						<image src="/static/mine/mine_icon13.png"></image>我的优惠码
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<view class="item" @tap="navigatePage('/pages/mine/discount/list')" v-if="isInnerrUser">
+					<view class="left">
+						<image src="/static/mine/mine_icon14.png"></image>用户减免金额{{isExamineUser ? '审核':'申请'}}
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view>
+			<view class="group" v-if="isServiceUser">
+				<view class="item" @tap="navigatePage('/pages/mine/mallCode')">
+					<view class="left">
+						<image src="/static/mine/mine_icon9.png"></image>商城二维码
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<!-- <view class="item" @tap="navigatePage('/pages/mine/wxCode')">
+					<view class="left">
+						<image src="/static/mine/mine_icon9.png"></image>企微二维码
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view> -->
+			</view>
+			<view class="group">
+				<!-- <view class="item" @tap="navigatePage('/pages/mine/exchange/index')">
+					<view class="left">
+						<image src="/static/mine/mine_icon15.png"></image>兑换中心
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view> -->
+				<view class="item" @tap="navigatePage('/pages/mine/coupon/list')">
+					<view class="left">
+						<image src="/static/mine/mine_icon4.png"></image>我的优惠券
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<!-- v-if="keyilingqude" -->
+				<view class="item" @tap="navigatePage('/pages/index/coupon')">
+					<view class="left">
+						<image src="/static/mine/mine_icon4.png"></image>可领取优惠券
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				
+				<view class="item" @tap="navigatePage('/pages/mine/address/list')">
+					<view class="left">
+						<image src="/static/mine/mine_icon5.png"></image>我的收货地址
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+			</view>
+			<view class="group">
+				<view class="item" @tap="navigatePage('/pages/mine/collection')">
+					<view class="left">
+						<image src="/static/mine/mine_icon2.png"></image>我的收藏
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<!-- <view class="item" v-if="!isServiceUser" @tap="toMyManager">
+					<view class="left">
+						<image src="/static/mine/mine_icon3.png"></image>我的客户经理
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view> -->
+				<view class="item" v-if="isServiceUser" @tap="navigatePage('/pages/mine/customer/list')">
+					<view class="left">
+						<image src="/static/mine/mine_icon8.png"></image>我的客户列表
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view>
+				<!-- <view class="item" @tap="navigatePage('/pages/mine/workOrder/list')">
+					<view class="left">
+						<image src="/static/mine/mine_icon11.png"></image>我的工单信息
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</view> -->
+			</view>
+			<view class="group">
+				<button class="item" open-type="contact">
+					<view class="left">
+						<image src="/static/mine/mine_icon6.png"></image>联系客服
+					</view>
+					<view class="right"><image src="/static/icon/right.png"></image></view>
+				</button>
+			</view>
+		</view>
+		
+		<modal-dialog showTitle="我的客户经理" :showText="myManagerDetail.workName + ' ' + myManagerDetail.workPhone" :isShowDialog="isManagerDialog" @cancel="isManagerDialog = false" @confirm="callPhone(myManagerDetail.workPhone)" confirmText="拨打电话"></modal-dialog>
+		
+		<!-- <drag-button :isDock="true" :customBar="false" ref="dragButton"></drag-button> -->
+		
+		<u-popup :round="10" :show="isShowInfoDialog">
+			<view class="info-dialog">
+				<view class="content">
+					<view class="title">获取您的头像和昵称</view>
+					<view class="text">为了方便识别您的身份,请授权您的头像和昵称</view>
+				</view>
+				<view class="form">
+					<view class="item">
+						<view class="label">头像</view>
+						<view class="value">
+							<button open-type="chooseAvatar" @chooseavatar="chooseAvatar">
+								<image :src="imageUrl + infoForm.avatar" v-if="infoForm.avatar"></image>
+								<view class="empty" v-else>请选择</view>
+							</button>
+						</view>
+					</view>
+					<view class="item">
+						<view class="label">昵称</view>
+						<view class="value">
+							<input
+								type="nickname"
+							    placeholder="请输入昵称"
+							    border="none"
+							    v-model="infoForm.nickname"
+								@change="getNickname"
+							></input>
+						</view>
+					</view>
+				</view>
+				<view class="btn">
+					<button @tap="isShowInfoDialog = false">取消</button>
+					<button type="primary" @tap="saveUserInfo()">提交</button>
+				</view>
+			</view>
+		</u-popup>
+		
+		<u-popup :round="10" :show="isShowPhoneDialog">
+		  <view class="phone-dialog">
+		    <view class="content">
+		      <view>申请获取以下权限</view>
+		      <text>获得你的公开信息(手机号码)</text>
+		    </view>
+		    <view class="btn">
+		      <button @tap="isShowPhoneDialog = false">取消</button>
+		      <button
+		        type="primary"
+		        open-type="getPhoneNumber"
+		        @getphonenumber="getPhoneNumber"
+		      >
+		        确定授权
+		      </button>
+		    </view>
+		  </view>
+		</u-popup>
+		
+	</view>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+	import modalDialog from '@/components/modalDialog.vue';
+	// import dragButton from '@/components/drag-button.vue';
+	import { uploadImg } from '@/api/axios.js';
+	
+	export default {
+		components:{
+			modalDialog,
+			// dragButton
+		},
+		data() {
+			return {
+				isShowPhoneDialog: false,
+				imageUrl: this.$imageUrl,
+				configInfo: uni.getStorageSync('configInfo'),
+				detail: {}, // 信息详情
+				myManagerDetail: {}, // 我的客户经理信息
+				count: {}, // 订单数量统计
+				scrollTop: 0, // 滚动高度(用于控制自定义导航)
+				isCustom: false, // 是否显示自定义导航
+				isManagerDialog: false, // 是否显示联系客户经理弹窗
+				
+				isShowInfoDialog: false, // 是否显示获取用户信息弹窗
+				infoForm: {
+					avatar: '',
+					nickname: '',
+				},
+				keyilingqude:false,
+			}
+		},
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId']),
+			cuStyle(){
+				return `height:${this.CustomBar-this.StatusBar}px; padding-top:${this.StatusBar}px;`
+			},
+			isServiceUser() { // 是否业务员
+				return this.detail.type === 'SERVICE';
+			},
+			isHeadUser() { // 是否团长
+				return false //this.detail.promotionGroupLeader;
+			},
+			isExamineUser() { // 是否审核人员
+				return this.detail.promotionApplyExamineby;
+			},
+			isInnerrUser() { // 是否内部人员
+				return this.detail.innerr;
+			},
+			hasExchangeCode() { // 是否有优惠码权限
+				return this.detail.isExchangeCode;
+			},
+		},
+		watch: {
+			scrollTop() {
+				if(this.scrollTop > 100) {
+					this.isCustom = true;
+				}else {
+					this.isCustom = false;
+				}
+			}
+		},
+		onLoad() {
+			if(!this.isLogin) {
+				uni.navigateTo({
+					url: '/pages/login/index'
+				})
+			}
+		},
+		onShow() {
+			this.$axios({
+				url: '/couponNew/list/all',
+				method: 'get',
+				params: {
+					userId: this.userId
+				},
+			}).then(res => {
+				this.keyilingqude = !!res.data.length
+			})
+			
+			if(this.userId && this.isLogin) {
+				this.getDetail();
+				this.getCount();
+			}
+			
+			// this.$refs.dragButton.init();
+		},
+		onPageScroll(res) {
+			this.scrollTop = res.scrollTop;
+		},
+		methods: {
+			
+			// 获取手机号
+			getPhoneNumber(e) {
+				if(e?.detail?.iv &&e?.detail?.encryptedData){
+					this.$axios({
+					  url: '/user/mobile/grant',
+					  params: {
+						userId: this.userId,
+						iv: e.detail.iv,
+						encryptedData: e.detail.encryptedData,
+					  },
+					}).then((res) => {
+					  uni.setStorageSync('token', res.data.token);
+					  uni.setStorageSync('isActiveLogout', false);
+            this.isShowPhoneDialog = false;
+            this.$getUserInfo();
+					});
+				}
+			},
+			
+			
+			// 获取个人信息
+			async getDetail() {
+				this.detail = await this.$getUserInfo();
+				
+				if(!this.detail.openId) {
+					return uni.navigateTo({
+						url: '/pages/login/index?isNotOpenid=' + true
+					})
+				}
+			},
+			
+			// 获取订单数量
+			getCount() {
+				this.$axios({
+					url: '/order/count',
+					method: 'get',
+					params: {
+						userId: this.userId
+					}
+				}).then(res => {
+					this.count = res.data;
+				})
+			},
+			
+			// 跳转页面
+			navigatePage(url) {
+				if(!this.isLogin) {
+					return uni.navigateTo({
+						url: '/pages/login/index'
+					})
+				}
+				if(!url) {
+					return this.$toast('跳转链接错误');
+				}
+				uni.navigateTo({
+					url
+				})
+			},
+			
+			// 我的客户经理
+			toMyManager() {
+				if(!this.isLogin) {
+					return uni.navigateTo({
+						url: '/pages/login/index'
+					})
+				}
+				this.$axios({
+					url: '/user/parent',
+					method: 'get',
+					params: {
+						userId: this.userId
+					}
+				}).then(res => {
+					if(!res.data) {
+						return this.$toast('您暂无客户经理');
+					}else {
+						this.myManagerDetail = res.data;
+						this.isManagerDialog = true;
+					}
+				})
+			},
+			
+			// 拨打电话
+			callPhone(number) {
+				uni.makePhoneCall({
+				    phoneNumber: number
+				});
+			},
+			
+			// 去我的订单列表
+			toMyOrder(tab) {
+				if(!this.isLogin) {
+					return uni.navigateTo({
+						url: '/pages/login/index'
+					})
+				}
+				uni.navigateTo({
+					url: '/pages/mine/order/list?tab=' + tab
+				})
+			},
+			
+			// 选择头像
+			chooseAvatar(e) {
+				uploadImg({
+					path: e.detail.avatarUrl,
+					name: e.detail.avatarUrl,
+				}).then(data => {
+					this.infoForm.avatar = data.url;
+				})
+			},
+			
+			// 用户昵称审核完毕
+			getNickname(e) {
+				this.infoForm.nickname = e.detail.value;
+			},
+			
+			// 保存用户信息
+			saveUserInfo() {
+				if(!this.infoForm.avatar) {
+					return this.$toast('请先上传头像');
+				}
+				if(!this.infoForm.nickname) {
+					return this.$toast('请先输入昵称');
+				}
+				
+				this.$axios({
+					url: '/user/userinfo/save',
+					params: {
+						userId: this.userId,
+						avatarUrl: this.infoForm.avatar,
+						nickName: this.infoForm.nickname,
+					},
+				}).then(res => {
+					this.isShowInfoDialog = false;
+					this.getDetail();
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.app-container {
+		background: #F4F2F2;
+		box-sizing: border-box;
+		padding-bottom: 80rpx;
+	}
+	.top-container {
+		position: relative;
+		.bg {
+			display: block;
+			width: 750rpx;
+			position: absolute;
+			top: 0;
+			z-index: 0;
+		}
+		.content {
+			width: 710rpx;
+			padding: 0 20rpx;
+			position: relative;
+			z-index: 1;
+		}
+		.title {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			color: #FFFFFF;
+			font-size: 36rpx;
+		}
+		.user {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 40rpx;
+			.left {
+				display: flex;
+				align-items: center;
+				image {
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 50%;
+					border: 2px solid #FFFFFF;
+					margin-right: 20rpx;
+				}
+				.main {
+					width: 360rpx;
+					display: flex;
+					flex-direction: column;
+					.name {
+						font-size: 32rpx;
+						color: #FFFFFF;
+						line-height: 36rpx;
+					}
+					.text {
+						font-size: 24rpx;
+						color: #FFFFFF;
+						line-height: 30rpx;
+						margin-top: 12rpx;
+					}
+				}
+			}
+			.code {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+				flex-shrink: 0;
+				margin-right: 30rpx;
+				image {
+					width: 52rpx;
+					height: 52rpx;
+					display: block;
+				}
+				text {
+					font-size: 20rpx;
+					line-height: 20rpx;
+					color: #FFFFFF;
+					margin-top: 12rpx;
+				}
+			}
+		}
+		.order {
+			margin-top: 20rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			.top {
+				height: 88rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 0 20rpx;
+				.left {
+					font-size: 32rpx;
+					color: #333333;
+				}
+				.right {
+					display: flex;
+					align-items: center;
+					font-size: 24rpx;
+					color: #999999;
+					image {
+						width: 16rpx;
+						height: 28rpx;
+						margin-left: 12rpx;
+					}
+				}
+			}
+			.list {
+				display: flex;
+				border-top: 1px solid #eaeaea;
+				padding: 10rpx 0 24rpx;
+				.item {
+					width: 20%;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					.image {
+						position: relative;
+					}
+					image {
+						width: 60rpx;
+						height: 60rpx;
+						display: block;
+					}
+					text {
+						position: absolute;
+						right: -12rpx;
+						top: -8rpx;
+						z-index: 11;
+						background: #FF3F42;
+						width: 32rpx;
+						height: 32rpx;
+						line-height: 32rpx;
+						text-align: center;
+						border-radius: 32rpx;
+						font-size: 20rpx;
+						color: #FFFFFF;
+					}
+					view {
+						font-size: 28rpx;
+						line-height: 28rpx;
+						color: #333333;
+						margin-top: 10rpx;
+					}
+				}
+			}
+		}
+	}
+	.list-container {
+		padding: 0 20rpx;
+		margin-top: 20rpx;
+		padding-bottom: 20rpx;
+		.group {
+			margin-bottom: 20rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:last-child {
+				margin-bottom: 0;
+			}
+			.item {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				height: 88rpx;
+				border-bottom: 1px solid #eaeaea;
+				padding: 0 20rpx;
+				background: #FFFFFF;
+				color: #333333;
+				&:last-child {
+					border: none;
+				}
+				&::after {
+					border: none;
+				}
+				.left {
+					display: flex;
+					align-items: center;
+					font-size: 30rpx;
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						margin-right: 20rpx;
+					}
+				}
+				.right {
+					image {
+						width: 16rpx;
+						height: 28rpx;
+						display: block;
+					}
+				}
+			}
+		}
+	}
+	
+	.info-dialog {
+		padding: 40rpx 40rpx 80rpx;
+		box-sizing: border-box;
+		.content {
+			.title {
+				font-size: 32rpx;
+				font-weight: 500;
+			}
+			.text {
+				font-size: 24rpx;
+				color: #999999;
+				margin-top: 20rpx;
+			}
+		}
+		.form {
+			.item {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-top: 30rpx;
+				.label {
+					color: #666666;
+				}
+				.value {
+					button {
+						padding: 0;
+						background: none;
+						border: none;
+						&::after {
+							border: none;
+						}
+					}
+					input {
+						width: 500rpx;
+						height: 68rpx;
+						text-align: right !important;
+					}
+					image {
+						width: 88rpx;
+						height: 88rpx;
+						border-radius: 88rpx;
+						display: block;
+					}
+					.empty {
+						width: 88rpx;
+						height: 88rpx;
+						border-radius: 88rpx;
+						background: #f5f5f5;
+						text-align: center;
+						line-height: 88rpx;
+						font-size: 24rpx;
+						color: #999999;
+					}
+				}
+			}
+		}
+		.btn {
+			display: flex;
+			justify-content: center;
+			margin-top: 60rpx;
+			button::after { 
+				border: none;
+			}
+			button {
+				width: 180rpx;
+				height: 70rpx;
+				line-height: 70rpx;
+				margin: 0;
+				font-size: 28rpx;
+				margin: 0 30rpx;
+				&:first-child {
+					background: #f5f5f5;
+					color: $theme-color;
+				}
+				&:last-child {
+					background: $theme-color;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+
+	
+	.phone-dialog {
+	  padding: 40rpx;
+	  box-sizing: border-box;
+	  .content {
+	    margin-top: 30rpx;
+	    margin-bottom: 30rpx;
+	    line-height: 50rpx;
+	    text {
+	      color: #9d9d9d;
+	    }
+	  }
+	  .btn {
+	    display: flex;
+	    justify-content: center;
+	    margin-top: 60rpx;
+	    button::after {
+	      border: none;
+	    }
+	    button {
+	      width: 180rpx;
+	      height: 70rpx;
+	      line-height: 70rpx;
+	      margin: 0;
+	      font-size: 28rpx;
+	      margin: 0 30rpx;
+	      &:first-child {
+	        background: #f5f5f5;
+	        color: #00ba5c;
+	      }
+	    }
+	  }
+	}
+</style>

+ 169 - 0
pages/mine/mallCode.vue

@@ -0,0 +1,169 @@
+<template>
+	<view class="app-container">
+		<view class="card-container">
+			<view class="top">
+				<view class="title">请扫描进入商城</view>
+				<view class="main">
+					<image src="/static/bg_logo.png" class="mall"></image>
+					<image :src="qrCode" class="code"></image>
+					<view class="btn" @tap="save()">保存二维码</view>
+				</view>
+				<view class="info">
+					<view class="name">{{configInfo.minAppName}}</view>
+					<view class="text">小程序二维码</view>
+				</view>
+			</view>
+			<view class="bottom">
+				<image :src="configInfo.minLogo2" mode="heightFix"></image>
+			</view>
+		</view>
+		<view class="tips">扫一扫二维码,进入商城小程序</view>
+	</view>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+	
+	export default {
+		data() {
+			return {
+				configInfo: uni.getStorageSync('configInfo'),
+				qrCode: '',
+			}
+		},
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId']),
+		},
+		
+		onLoad() {
+			this.getDetail();
+		},
+		
+		methods: {
+			// 获取个人信息
+			getDetail() {
+				this.$axios({
+					url: '/user/qrcode/bind',
+					method: 'get',
+					params: {
+						userId: this.userId
+					}
+				}).then(res => {
+					this.qrCode = res.data;
+				})
+			},
+			
+			// 保存图片
+			save() {
+				uni.downloadFile({
+				    url: this.qrCode,
+				    success: (res) => {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success: () => {
+								this.$successToast('保存成功');
+							}
+						});
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.app-container {
+		background: #F4F2F2;
+		padding: 40rpx 40rpx 0;
+		box-sizing: border-box;
+	}
+	.tips {
+		font-size: 28rpx;
+		line-height: 28rpx;
+		color: #999999;
+		text-align: center;
+		margin: 60rpx 0 20rpx;
+	}
+	.card-container {
+		width: 670rpx;
+		border-radius: 20rpx;
+		background: #FFFFFF;
+		box-shadow: -20px 0px 40px 20px rgba(155,155,155,0.30); 
+		overflow: hidden;
+		.top {
+			background: #F65759;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			height: 800rpx;
+			.title {
+				font-family: 'PingFang SC';
+				font-size: 50rpx;
+				color: #FFFFFF;
+				line-height: 160rpx;
+			}
+			.main {
+				position: relative;
+				display: flex;
+				margin-top: 20rpx;
+				.mall {
+					width: 600rpx;
+					height: 600rpx;
+					display: block;
+				}
+				.code {
+					width: 360rpx;
+					height: 360rpx;
+					display: block;
+					position: absolute;
+					top: 0;
+					left: 120rpx;
+					border-radius: 5rpx;
+				}
+				.btn {
+					width: 160rpx;
+					height: 48rpx;
+					display: block;
+					position: absolute;
+					top: 400rpx;
+					left: 220rpx;
+					border-radius: 5rpx;
+					border: 1px solid #ffffff;
+					line-height: 48rpx;
+					text-align: center;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					opacity: .8;
+				}
+			}
+			.info {
+				width: 600rpx;
+				text-align: right;
+				margin-top: -100rpx;
+				.name {
+					font-size: 36rpx;
+					color: #FFFFFF;
+					height: 36rpx;
+					line-height: 36rpx;
+				}
+				.text {
+					font-size: 28rpx;
+					color: #FFFFFF;
+					height: 28rpx;
+					line-height: 28rpx;
+					margin-top: 20rpx;
+				}
+			}
+		}
+		.bottom {
+			height: 140rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			image {
+				height: 60rpx;
+				display: block;
+			}
+		}
+	}
+</style>

+ 181 - 0
pages/mine/wxCode.vue

@@ -0,0 +1,181 @@
+<template>
+	<view class="app-container">
+		<view class="card-container">
+			<view class="top">
+				<view class="title">请加我的企业微信</view>
+				<view class="main">
+					<image src="/static/mine/wx.png" class="wx"></image>
+					<image :src="detail.workQrcode2 ? detail.workQrcode2 : detail.workQrcode" class="code"></image>
+					<!-- <image :src="detail.avatar" class="avatar"></image> -->
+					<view class="btn" @tap="save()">保存二维码</view>
+				</view>
+				<view class="info">
+					<view class="name">{{detail.workName}}</view>
+					<view class="text">{{configInfo.companyName}}</view>
+				</view>
+			</view>
+			<view class="bottom">
+				<image :src="configInfo.minLogo2" mode="heightFix"></image>
+			</view>
+		</view>
+		<view class="tips">扫一扫二维码,添加我的企业微信</view>
+	</view>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+	
+	export default {
+		data() {
+			return {
+				configInfo: uni.getStorageSync('configInfo'),
+				detail: {},
+			}
+		},
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId']),
+		},
+		
+		onLoad() {
+			this.getDetail();
+		},
+		
+		methods: {
+			// 获取个人信息
+			getDetail() {
+				this.$axios({
+					url: '/user/user/detail',
+					method: 'get',
+					params: {
+						userId: this.userId
+					}
+				}).then(res => {
+					this.detail = res.data;
+				})
+			},
+			
+			// 保存图片
+			save() {
+				uni.downloadFile({
+				    url: this.detail.workQrcode2 ? this.detail.workQrcode2 : this.detail.workQrcode,
+				    success: (res) => {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success: () => {
+								this.$successToast('保存成功');
+							}
+						});
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.app-container {
+		background: #F4F2F2;
+		padding: 40rpx 40rpx 0;
+		box-sizing: border-box;
+	}
+	.tips {
+		font-size: 28rpx;
+		line-height: 28rpx;
+		color: #999999;
+		text-align: center;
+		margin: 60rpx 0 20rpx;
+	}
+	.card-container {
+		width: 670rpx;
+		border-radius: 20rpx;
+		background: #FFFFFF;
+		box-shadow: -20px 0px 40px 20px rgba(155,155,155,0.30); 
+		overflow: hidden;
+		.top {
+			background: #006FE2;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			.title {
+				font-family: 'PingFang SC';
+				font-size: 50rpx;
+				color: #FFFFFF;
+				line-height: 160rpx;
+			}
+			.main {
+				position: relative;
+				display: flex;
+				padding-top: 44rpx;
+				margin-top: 20rpx;
+				.wx {
+					width: 508rpx;
+					height: 440rpx;
+					display: block;
+				}
+				.code {
+					width: 360rpx;
+					height: 360rpx;
+					display: block;
+					position: absolute;
+					top: 0;
+					left: 74rpx;
+					border-radius: 5rpx;
+				}
+				.btn {
+					width: 160rpx;
+					height: 48rpx;
+					display: block;
+					position: absolute;
+					top: 380rpx;
+					left: 170rpx;
+					border-radius: 5rpx;
+					border: 1px solid #ffffff;
+					line-height: 48rpx;
+					text-align: center;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					opacity: .8;
+				}
+				.avatar {
+					width: 88rpx;
+					height: 88rpx;
+					display: block;
+					position: absolute;
+					top: 131rpx;
+					left: 205rpx;
+					border-radius: 5rpx;
+					padding: 5rpx;
+					background: #FFFFFF;
+				}
+			}
+			.info {
+				width: 360rpx;
+				text-align: right;
+				margin-bottom: 58rpx;
+				.name {
+					font-size: 36rpx;
+					color: #FFFFFF;
+					height: 36rpx;
+					line-height: 36rpx;
+				}
+				.text {
+					font-size: 28rpx;
+					color: #FFFFFF;
+					height: 28rpx;
+					line-height: 28rpx;
+					margin-top: 20rpx;
+				}
+			}
+		}
+		.bottom {
+			height: 140rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			image {
+				height: 60rpx;
+				display: block;
+			}
+		}
+	}
+</style>