浏览代码

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

caojunjie 4 年之前
父节点
当前提交
3ca7dd7826

+ 7 - 9
components/mi-map/mi-map.vue

@@ -8,13 +8,13 @@
 				<image class="left" :src="myPositionIcon" mode="" @tap="toMyLocation"></image>
 				<view class="right">
 					<text class="title">我的位置</text>
-					<text class="text">{{myAddress}}</text>
+					<text class="text">{{myAddress.addressInfo}}</text>
 				</view>
 			</view>
 
 			<view class="start-place">
 				<view class="place">
-					<text class="text">{{addressObj.address}}</text>
+					<text class="text">{{addressObj.address.addressInfo}}</text>
 				</view>
 				<view class="tip">{{descText}}</view>
 			</view>
@@ -109,7 +109,6 @@
 				this.longitude = res.longitude;
 				this.latitude = res.latitude;
 				this.myAddress = await this.getAddressName(res);
-
 				this.addressObj = Object.assign({}, this.addressObj, {
 					longitude: res.longitude,
 					latitude: res.latitude,
@@ -160,7 +159,7 @@
 						poi_options: "page_size=1;page_index=1",
 						output: 'jsonp',
 						success: (e) => {
-							res(e.result.formatted_addresses.recommend);
+							res({addressInfo:e.result.formatted_addresses.recommend,province:e.result.address_component.province,city:e.result.address_component.city,district:e.result.address_component.district,});
 						},
 						fail: err => {
 							res(err);
@@ -271,14 +270,12 @@
 			.start-place {
 				width: 700rpx;
 				height: 100rpx;
-				margin: 0 auto;
-				margin: 0 auto;
 				box-shadow: 0rpx 3rpx 20rpx rgba(0, 0, 0, 0.2);
 				background: #fff;
 				border-radius: 10rpx;
 				margin-top: 20rpx;
 				.place {
-					margin-left: 10rpx;
+					margin-left: 20rpx;
 					.title {
 						font-size: 24rpx;
 						font-weight: bold;
@@ -287,7 +284,7 @@
 
 					.text {
 						margin-top: 20rpx;
-						font-size: 20rpx;
+						font-size: 24rpx;
 						color: #3384FF;
 						font-weight: bold;
 						width: 700rpx;
@@ -300,7 +297,8 @@
 				}
 
 				.tip {
-					font-size: 0.57rem;
+					margin-left: 20rpx;
+					font-size:20rpx;
 					color: #666;
 				}
 			}

+ 1 - 0
pages/home/index.vue

@@ -74,6 +74,7 @@
 			}
 		},
 		onLoad() {
+			console.log("@@@")
 			uni.$on('login', (data) => {
 				this.loginStatus = data.msg
 			})

+ 93 - 31
pages/login/register_2.vue

@@ -39,10 +39,10 @@
 						</view>
 						<u-input v-model="form.code" placeholder="请输入验证码" type="number" />
 						<view class="" slot="right">
-							<u-button size="mini" type="primary" @click="getCode" shape="circle" :loading="codeLoading" >{{codeText}}</u-button>
+							<u-button size="mini" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
 						</view>
 					</u-form-item>
-					<u-form-item prop="region">
+<!-- 					<u-form-item prop="region">
 						<view style="margin-right: 10rpx;">
 							<u-icon name="map" size="36"></u-icon>
 						</view>
@@ -51,6 +51,15 @@
 						<view class="" slot="right">
 							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
 						</view>
+					</u-form-item> -->
+					<u-form-item prop="region">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="map" size="36"></u-icon>
+						</view>
+						<u-input placeholder="点击选择省市区" v-model="form.region" :disabled="true" @click="inMap"></u-input>
+						<view class="" slot="right">
+							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
+						</view>
 					</u-form-item>
 					<u-form-item prop="addressInfo">
 						<view style="margin-right: 10rpx;">
@@ -104,7 +113,18 @@
 						required: true,
 						message: '请输入门店名称',
 						trigger: 'blur,change'
-					}],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return this.$u.test.chinese(value);
+						},
+						message: '门店名称必须为中文',
+						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+						trigger: ['change','blur'],
+					},
+					],
 					company: [{
 						required: true,
 						message: '请输入公司名称',
@@ -114,16 +134,51 @@
 						required: true,
 						message: '请输入联系人',
 						trigger: 'blur,change'
+					},{
+						min: 3,
+						max: 5,
+						message: '姓名长度在3到5个字符',
+						trigger: ['change','blur'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return this.$u.test.chinese(value);
+						},
+						message: '姓名必须为中文',
+						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+						trigger: ['change','blur'],
 					}],
 					phone: [{
 						required: true,
 						message: '请输入联系电话',
 						trigger: 'blur,change'
+					},
+					{
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return this.$u.test.mobile(value);
+						},
+						message: '手机号码不正确',
+						// 触发器可以同时用blur和change,二者之间用英文逗号隔开
+						trigger: ['change','blur'],
 					}],
 					code: [{
 						required: true,
 						message: '请输入验证码',
 						trigger: 'blur,change'
+					},
+					{
+						min: 6,
+						max: 6,
+						message: '验证码为6位数',
+						trigger: 'change',
+					},
+					{
+						type: 'number',
+						message: '验证码只能为数字',
+						trigger: ['change','blur'],
 					}],
 					region: [{
 						required: true,
@@ -137,65 +192,72 @@
 					}],
 				},
 				dataUrl: "",
-				codeLoading:false,
-				modelshow:false,
-				modelcontent:"如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照"
+				codeLoading: false,
+				modelshow: false,
+				modelcontent: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照"
 			};
 		},
 		created() {
 			uni.$on('licenseData', (data) => {
-				this.form.store = data.company.words
+				if(data.company.words!="无"){
+					this.form.store = data.company.words
+				}
 				this.form.company = data.company.words
-				this.form.name = data.person.words
+				if(data.company.words!="无"){
+					this.form.name = data.person.words
+				}
+				
 			})
 			uni.$on('addressData', (data) => {
 				this.form.latitude = data.latitude
 				this.form.longitude = data.longitude
-				this.form.addressInfo = data.address
+				this.address=data.address
+				this.form.region=this.address.province+"-"+this.address.city+"-"+this.address.district
+				this.form.addressInfo =this.address.addressInfo
 			})
 			uni.$on('dataUrl', (data) => {
 				this.dataUrl = data
 			})
 			uni.getSystemInfo({
-			    success:res=>{
-					this.SystemInfo=res
+				success: res => {
+					this.SystemInfo = res
 					console.log(res)
-			    }
+				}
 			});
-			if(this.SystemInfo.platform=='ios'){
+			if (this.SystemInfo.platform == 'ios') {
 				this.judgeIosPermission('location')
 				uni.showModal({
 					title: "温馨提示",
 					content: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照?",
 					confirmText: "确认",
-					showCancel:false
+					showCancel: false
 				})
-			}else{
+			} else {
 				this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
-				this.modelshow=true
+				this.modelshow = true
 			}
-			
+
 		},
 		methods: {
 			judgeIosPermission(permisionID) {
 				let result = permision.judgeIosPermission(permisionID)
-				if(!result){
+				if (!result) {
 					this.getLocation()
-				}else{
+				} else {
 					this.getLocation()
 				}
 			},
 			async requestAndroidPermission(permisionID) {
-			    let result = await permision.requestAndroidPermission(permisionID)
+				let result = await permision.requestAndroidPermission(permisionID)
 				if (result == 1) {
-				    this.getLocation()
+					this.getLocation()
 				} else if (result == 0) {
-				    this.getLocation()
+					this.getLocation()
 				} else {
-				    this.getLocation()
+					this.getLocation()
 				}
 			},
-			getLocation(){
+			getLocation() {
 				let that = this
 				uni.getLocation({
 					type: 'wgs84',
@@ -260,13 +322,13 @@
 			},
 			getCode() {
 				if (this.form.phone) {
-					this.codeLoading=true
+					this.codeLoading = true
 					request({
 						url: '/sailun/appStoreBasicInfo/sendCode',
 						method: 'post',
 						data: {
 							"phoneNumber": parseInt(this.form.phone),
-							"opreaType":"0"
+							"opreaType": "0"
 						},
 					}).then(res => {
 						console.log(res)
@@ -283,7 +345,7 @@
 					}).catch(err => {
 						console.log(err)
 					}).finally(() => {
-						this.codeLoading=false
+						this.codeLoading = false
 						// 通知验证码组件内部开始倒计时
 					})
 				} else {
@@ -292,10 +354,10 @@
 
 			},
 			regionConfirm(e) {
-				this.form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
-				this.form.province = e.province.label;
-				this.form.city = e.city.label;
-				this.form.district = e.area.label;
+				// this.form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
+				// this.form.province = e.province.label;
+				// this.form.city = e.city.label;
+				// this.form.district = e.area.label;
 			},
 			inMap() {
 				this.$u.route({

+ 21 - 41
pages/login/register_3.vue

@@ -44,7 +44,7 @@
 					</scroll-view>
 				</view>
 			</u-popup>
-			<u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
+			<u-card v-if="querybrandList.length" :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
 				<view slot="head">
 					<view class="u-flex">
 						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
@@ -78,9 +78,9 @@
 						<view style="margin-right: 10rpx;">
 							<u-icon name="order" size="36"></u-icon>
 						</view>
-						<u-radio-group v-model="item.taskNum" :disabled="item.disabledGroup" @change="changeRadiogroup">
-							<u-radio v-for="(i, index) in tasknameList" :key="index" :name="i.task">
-								{{i.task}}
+						<u-radio-group v-model="item.taskNum" :disabled="item.disabledGroup" @change="changeRadiogroup(item)">
+							<u-radio v-for="(i, index) in tasknameList" :key="index" :name="i.signLv">
+								{{i.signLv}}
 							</u-radio>
 						</u-radio-group>
 					</u-form-item>
@@ -165,7 +165,7 @@
 					if (res.data.code == 0) {
 						this.agentList = res.data.Data.data
 						this.agentList = this.agentList.reduce((res, item, index, array) => {
-							for (let i = 0; i < array[index].regionBrandList.length; i++) {
+							for (let i = 0; i < array[index].regionBrandList.length; ++i) {
 								res.push({
 									brand: array[index].regionBrandList[i],
 									brandCode: array[index].regionBrandList[i],
@@ -178,12 +178,10 @@
 							}
 							return res;
 						}, []);
-						this.brandList=this.agentList.reduce((res, item, index, array) => {
+						this.brandList=[...new Set(this.agentList.reduce((res, item, index, array) => {
 							res.push(item.brand)
 							return res;
-						}, []);
-						this.brandList=[...new Set(this.brandList)]
-						this.brandList=this.brandList.reduce((res, item, index, array) => {
+						}, []))].reduce((res, item, index, array) => {
 							res.push({brand:item})
 							return res;
 						}, []);
@@ -207,7 +205,6 @@
 					if (res.data.code == 0) {
 					this.querybrandList=res.data.data
 					this.querybrandList = this.querybrandList.filter(item => this.cooperations.indexOf(item.brandCode) > -1)
-					console.log(this.querybrandList)
 					}
 					if (res.data.code == 500) {
 						this.$u.toast(res.data.msg);
@@ -225,13 +222,14 @@
 					data: {},
 				}).then(res => {
 					if (res.data.code == 0) {
-						this.taskList = res.data.data
-						this.tasknameList = this.taskList.reduce((res, item) => {
-							res.push({
-								task: item.signLv,
-							})
-							return res;
-						}, []);
+						this.tasknameList = res.data.data
+						this.tasknameList.push({
+							brand: null,
+							brandCode: null,
+							mainId:null,
+							numTask:null,
+							signLv: "无"
+						})
 					}
 					if (res.data.code == 500) {
 						this.$u.toast(res.data.msg);
@@ -245,30 +243,12 @@
 			checkboxGroupChange(e) {
 				this.cooperations = e
 			},
-			changeRadiogroup(){
-				console.log(this.checkedAgentlist)
-			// 	let repeat=[]
-			// 	this.checkedAgentlist.reduce((res, item, index, array) => {
-			// 		return repeat.push({brand:item.brand,taskNum:item.taskNum})
-			// 	}, []);
-			
-			// let arrD = [];
-			// const map = new Map();
-			// repeat.forEach(v => {  if (map.get(v.brand) && arrD.every(vD => vD.brand != v.brand)) {
-			//     arrD.push(v);
-			// } else {
-			//     map.set(v.brand, v);
-			// }
-			// });
-			// var zdys = (repeat|| []).findIndex((profile) => profile.brand === arrD[0].brand);
-			 
-			// console.log(zdys);
-			// repeat.forEach((item,index,array)=>{
-			// 	if(!array[index].taskNum){
-					
-			// 	}
-			// })
-			
+			changeRadiogroup(item){
+				if(item.taskNum=="无"){
+					this.checkedAgentlist.filter(e=>(e.brand===item.brand&&e.agent_id!=item.agent_id)).forEach(e=>e.disabledGroup=false)
+				}else{
+					this.checkedAgentlist.filter(e=>(e.brand===item.brand&&e.agent_id!=item.agent_id)).forEach(e=>e.disabledGroup=true)
+				}
 			},
 			getCooperation() {
 				if (this.cooperations != null) {

+ 6 - 9
pages/me/Reward-details/index.vue

@@ -8,10 +8,10 @@
 					<view class="content">
 						<u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
 						 :is-scroll="false" :current="current" @change="change"></u-tabs>
-						<u-select @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand" value-name="brandId" label-name="brandName" :list="brandList"></u-select>
+						<u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand" value-name="brandId" label-name="brandName" :list="brandList"></u-select>
 						<u-calendar style=" color: #fff;" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
 						<view @click="search">
-							<u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @custom="handleSearch" :show-action="true" :animation="true"></u-search>
+							<u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch" :show-action="false" :animation="true"></u-search>
 						</view>
 					</view>
 					<view v-if="count!=0">
@@ -19,8 +19,6 @@
 						<view class="content-one-view">
 						</view>
 						<view class="content-one-text">获得奖励:{{item.money}}元</view>
-			
-			
 						<view class="content-two">
 							<view class="">
 								轮胎型号
@@ -110,6 +108,9 @@
 		methods: {
 			// 获取奖励明细
 			data() {
+				uni.showLoading({
+					title: '加载中...'
+				});
 				request({
 						url: '/myPage/getPageScanRewordList',
 						method: 'post',
@@ -165,10 +166,7 @@
 						}
 					}).then(res => {
 						console.log(res)
-						// this.datalist = res.data.data
 						this.datalist = this.datalist.concat(res.data.data)
-						console.log(res.data.data)
-						console.log(this.datalist)
 						this.count = res.data.count
 						// 判断扫码类型
 						for (var i = 0; i < res.data.data.length; i++) {
@@ -201,7 +199,6 @@
 						}
 					}).then(res => {
 						this.brandList = JSON.parse(JSON.stringify(res.data.data))	
-						
 					}).catch(err => {
 						console.log(err)
 					})
@@ -216,11 +213,11 @@
 			// 搜索框
 			handleSearch(e) {
 				console.log(e)
+				this.datalist = []
 				this.data()
 			},
 			// 点击获取品牌
 			confirm(e) {
-				
 				console.log(e)
 				console.log(e[0].label)
 				this.label = e[0].label

+ 1 - 27
pages/me/Settlement-center/index.vue

@@ -84,34 +84,14 @@
 							'userId':this.$store.state.storeInfo.userId
 						}
 					}).then(res => {
-						console.log(res)
 						console.log(res.data)
 						this.datalist = res.data.data
 						this.Arry.length = this.datalist.length
+						// 每个新建数组长度为空,全选为false
 						for(var i=0;i<this.datalist.length;i++){
 							this.Arry[i] = []
 							this.checkboxList[i] = false
 						}
-						console.log(this.checkboxList)
-						console.log(res.data.data[0].storegentBrandList)
-						// 遍历
-						if (this.choice == 0) {
-							for (var l = 0; l < res.data.data.length; l++) {
-								this.storegentBrandList = res.data.data[l].storegentBrandList
-								for (var i = 0; i < res.data.data[l].storegentBrandList.length; i++) {
-									// this.checkboxList[i] = false
-								}
-							}
-						} else {
-							for (var l = 0; l < res.data.data.length; l++) {
-								this.storegentBrandList = res.data.data[l].storegentBrandList
-								for (var i = 0; i < res.data.data[l].storegentBrandList.length; i++) {
-									// this.checkboxList[i] = true
-								}
-							}
-						}
-
-
 					}).catch(err => {
 						console.log(err + "")
 					})
@@ -193,17 +173,11 @@
 			},
 			// 选中任一checkbox时,由checkbox-group触发
 			checkboxGroupChange(e) {
-				// console.log(e);
-				// console.log("###");
 			},
 			// 全选
 			checkedAll(index,e) {
-				console.log(e)
-				// this.isCheckedAll = !this.isCheckedAll
-				// this.Arry[index] = []
 				console.log(index,e)
 				let newArr=[]
-				// this.isCheckedAll = !this.isCheckedAll
 				if(this.Arry[index].length == e.storegentBrandList.filter((item)=>{
 					return item.usableMoney != 0
 				}).length ){

+ 95 - 61
pages/me/Statistical-task/index.vue

@@ -23,8 +23,10 @@
 						</view>
 					</view>
 					<view class="content-one">
-						<canvas :canvas-id="'mouthPie' + index" :id="'mouthPie' + index" class="charts" @touchstart="touchPie($event,'mouthPie' + index)"></canvas>
-						<canvas :canvas-id="'quarterPie' + index" :id="'quarterPie' + index" class="charts" @touchstart="touchPie($event,'quarterPie' + index)"></canvas>
+						<!--  -->
+						<canvas :canvas-id="'mouthPie' + index" :id="'mouthPie' + index" class="charts" @touchstart="touchPie($event,'mouthPie' + index)" ></canvas>
+						<!-- -->
+						<canvas :canvas-id="'quarterPie' + index" :id="'quarterPie' + index" class="charts"  @touchstart="touchPie($event,'quarterPie' + index)"></canvas>
 					</view>
 				</view>
 			</view>
@@ -43,7 +45,7 @@
 		isJSON
 	} from '@/common/checker.js';
 	var _self;
-	var canvaPie = null;
+	// var canvaPie = null;
 
 	export default {
 		data() {
@@ -81,14 +83,19 @@
 			}
 		},
 		onLoad() {
+			
 			_self = this;
 			_self.cWidth = uni.upx2px(370);
 			_self.cHeight = uni.upx2px(320);
 			// this.showPie('canvasRing')
 		},
 		created() {
+			
+		},
+		onShow() {
 			this.getDate()
 		},
+		
 		methods: {
 			getDate() {
 				request({
@@ -101,46 +108,11 @@
 						}
 					}).then(res => {
 						console.log(res)
-						console.log(this.$store.state.storeInfo.storeId)
 						this.orderList = res.data.data
+						this.getPieData()
 						
 						
-						for(var i=0;i<res.data.data.length;i++){
-							let  monthPie = {
-								series: []
-							};
-							let quarterPie = {
-								series: []
-							}
-							for(var j=0;j<res.data.data[i].storeMonthList.length;j++){
-								let monthObj = {
-									data:null,
-									name:'',
-									percent:''
-								}
-								let quarterObj = {
-									data:null,
-									name:'',
-									percent:'',
-								}
-								
-								monthObj.data = res.data.data[i].storeMonthList[j].data
-								monthObj.name = res.data.data[i].storeMonthList[j].name
-								monthObj.percent = res.data.data[i].storeMonthList[j].percent
-								quarterObj.data = res.data.data[i].storeQuarterList[j].data
-								quarterObj.name = res.data.data[i].storeQuarterList[j].name
-								quarterObj.percent = res.data.data[i].storeQuarterList[j].percent
-								
-								console.log('^^^^',monthObj)
-								console.log('9999999',quarterObj)
-								monthPie.series.push(monthObj)
-								quarterPie.series.push(quarterObj)
-							}
-							
-							console.log(`mouthPie${i}`,monthPie,quarterPie)
-							 this.showPie(`mouthPie${i}`,monthPie);
-							 this.showPie(`quarterPie${i}`,quarterPie)
-						}
+						// this.showPie('mouthPie0',monthPie);
 					}).catch(err => {
 						console.log(err)
 					})
@@ -151,8 +123,66 @@
 						}, 300)
 					})
 			},
-			showPie(canvasId, chartData,percent) {
-				console.log('8888888',canvasId,chartData,percent)
+			getPieData(){
+				console.log('5555')
+				for(var i=0;i<this.orderList.length;i++){
+					var  monthPie = {
+						series: []
+					};
+					var quarterPie = {
+						series: []
+					}
+					for(var j=0;j<this.orderList[i].storeMonthList.length;j++){
+						let monthObj = {
+							data:null,
+							name:'',
+							percent:'',
+							format:(val)=>{
+									console.log(val)
+									// return val.toFixed(0) + ''
+									return val * 100 + '%'
+									}
+							
+						}
+						let quarterObj = {
+							data:null,
+							name:'',
+							percent:'',
+							format:(val)=>{
+									console.log(val)
+									// return val.toFixed(0) + ''
+									
+									return val * 100 + '%'
+									}
+						}
+						
+						
+						monthObj.data = this.orderList[i].storeMonthList[j].data
+						monthObj.name = this.orderList[i].storeMonthList[j].name
+						monthObj.percent = this.orderList[i].storeMonthList[j].percent
+						
+						quarterObj.data = this.orderList[i].storeQuarterList[j].data
+						quarterObj.name = this.orderList[i].storeQuarterList[j].name
+						quarterObj.percent = this.orderList[i].storeQuarterList[j].percent
+						
+						// console.log('^^^^',monthObj)
+						// console.log('9999999',quarterObj)
+						monthPie.series.push(monthObj)
+						quarterPie.series.push(quarterObj)
+						// console.log(quarterPie.series[0].format)
+					}
+					
+					// console.log(`mouthPie${i}`,monthPie,quarterPie)
+					
+					 this.showPie(`mouthPie${i}`,monthPie);
+					 this.showPie(`quarterPie${i}`,quarterPie)
+					// this[`${this.refVal}`]
+				}
+				// this.showPie('mouthPie0',monthPie);
+			},
+			showPie(canvasId, chartData) {
+				console.log('88888')
+				console.log(canvasId,chartData)
 				canvasObj[canvasId]=new uCharts({
 					$this: _self,
 					canvasId: canvasId,
@@ -164,9 +194,9 @@
 						position: 'bottom',
 						float: 'center',
 						itemGap: 10,
-						padding: 2,
+						padding: 0,
 						lineHeight: 26,
-						margin: 1,
+						margin: 6,
 						//backgroundColor:'rgba(41,198,90,0.2)',
 						//borderColor :'rgba(41,198,90,0.5)',
 						borderWidth: 1
@@ -191,9 +221,9 @@
 					},
 					extra: {
 						pie: {
-							offsetAngle: 0,
-							ringWidth: 15 * _self.pixelRatio,
-							labelWidth: 1
+							ringWidth: 12 * _self.pixelRatio,
+							labelWidth: 0.1,
+							offsetAngle:0
 						}
 					},
 				});
@@ -210,7 +240,11 @@
 			// 	});
 			// },
 			touchPie(e,id){
-				console.log(e)
+				console.log(e,id)
+				
+				// canvaPie.touchLegend(e, {
+				// 	animation: false
+				// });
 				canvasObj[id].showToolTip(e, {
 						format: function (item) {
 								return item.name + ':' + item.data 
@@ -232,9 +266,9 @@
 		height: 331rpx;
 		background: url(../../../static/sailun/background.png) no-repeat;
 		background-size: 750rpx 331rpx;
-
+	
 	}
-
+	
 	.qiun-charts-one {
 		width: 6rpx;
 		height: 30rpx;
@@ -243,7 +277,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-two {
 		position: relative;
 		top: -18rpx;
@@ -251,7 +285,7 @@
 		font-size: 26rpx;
 		font-weight: bold;
 	}
-
+	
 	.content {
 		width: 702rpx;
 		height: 410rpx;
@@ -261,23 +295,23 @@
 		margin: 0 auto;
 		position: relative;
 		top: 20rpx;
-
+	
 		margin-bottom: 40rpx;
-
+	
 	}
-
+	
 	.content-one {
 		display: flex;
 		justify-content: space-between;
 	}
-
+	
 	.charts {
 		width: 380rpx;
 		height: 450rpx;
 		position: relative;
 		top: -20rpx;
 	}
-
+	
 	.qiun-charts-three>view:nth-child(1) {
 		width: 24rpx;
 		height: 24rpx;
@@ -287,7 +321,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-three>view:nth-child(2) {
 		width: 180rpx;
 		height: 22rpx;
@@ -301,12 +335,12 @@
 		left: 40rpx;
 		border-top-right-radius: 12rpx;
 	}
-
+	
 	.qiun-charts-four {
 		position: relative;
 		right: 200rpx;
 	}
-
+	
 	.qiun-charts-four>view:nth-child(1) {
 		width: 24rpx;
 		height: 24rpx;
@@ -316,7 +350,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-four>view:nth-child(2) {
 		width: 150rpx;
 		height: 22rpx;

+ 35 - 15
pages/me/Write-off-management/index.vue

@@ -9,6 +9,9 @@
 					<view class="order-one">
 					</view>
 					<text class="order-one-text">核销金额:¥{{res.amount}}</text>
+					<view class="order-one-view">
+						{{b2bStatus}}
+					</view>
 					<view class="order-one-xian">
 					</view>
 					<view class="order-two">
@@ -21,10 +24,18 @@
 					</view>
 					<view class="order-two">
 						<view class="">
-							核审时间
+							审核时间
+						</view>
+						<view class="">
+							{{res.agentAuditTime}}
+						</view>
+					</view>
+					<view class="order-two">
+						<view class="">
+							{{res.brandName}}轮胎
 						</view>
 						<view class="">
-							{{res.b2bAuditTime}}
+							¥{{res.amount}}
 						</view>
 					</view>
 					<view class="order-two">
@@ -101,15 +112,13 @@
 						// 页数
 						this.pages = res.data.data.pages
 						for (let i = 0; i < res.data.data.records.length; i++) {
-							console.log(res.data.data.records[i].b2bStatus)
-							if (res.data.data.records[i].b2bStatus == 0) {
+							console.log(res.data.data.records[i].status)
+							if (res.data.data.records[i].status == 0) {
 								this.b2bStatus = "待审核"
-							} else if (res.data.data.records[i].b2bStatus == 1) {
-								this.b2bStatus = "审核未通过"
-							} else if (res.data.data.records[i].b2bStatus == 2) {
-								this.b2bStatus = "审核通过"
+							} else if (res.data.data.records[i].status == 2) {
+								this.b2bStatus = "已审核"
 							} else {
-								this.b2bStatus = "已过期"
+								this.b2bStatus = "已失效"
 							}
 						}
 
@@ -158,14 +167,12 @@
 						// this.orderList = this.orderList.concat(res.data.data.records)
 						for (let i = 0; i < res.data.data.records.length; i++) {
 							console.log(res.data.data.records[i].b2bStatus)
-							if (res.data.data.records[i].b2bStatus == 0) {
+							if (res.data.data.records[i].status == 0) {
 								this.b2bStatus = "待审核"
-							} else if (res.data.data.records[i].b2bStatus == 1) {
-								this.b2bStatus = "审核未通过"
-							} else if (res.data.data.records[i].b2bStatus == 2) {
-								this.b2bStatus = "审核通过"
+							} else if (res.data.data.records[i].status == 2) {
+								this.b2bStatus = "已审核"
 							} else {
-								this.b2bStatus = "已过期"
+								this.b2bStatus = "已失效"
 							}
 						}
 					}).catch(err => {
@@ -213,6 +220,19 @@
 		width: 100%;
 		// padding-left:30rpx;
 	}
+	.order-one-view{
+		width: 120rpx;
+		line-height: 40rpx;
+		background-color: #0094FE;
+		position: relative;
+		left: 575rpx;
+		top: -35rpx;
+		border-top-left-radius:50rpx;
+		border-bottom-left-radius:50rpx;
+		font-size: 12rpx;
+		color: #fff;
+		text-align: center;
+	}
 
 	// 插件代码
 	.order {

+ 11 - 0
pages/me/index.vue

@@ -206,6 +206,7 @@
 </template>
 
 <script>
+	import {mapState,mapMutations} from 'vuex'
 	import {
 		request
 	} from '../../common/request/request'
@@ -238,10 +239,19 @@
 				}
 			}
 		},
+		computed: {
+			...mapState(['undataStore'])
+		},
 		created() {
 			this.getMyinfo()
 		},
+		onShow() {
+			if(this.undataStore){
+				this.getMyinfo()
+			}
+		},
 		methods: {
+			...mapMutations(["outStore"]),
 			getMyinfo() {
 				request({
 					url: '/myapp/selectStore',
@@ -255,6 +265,7 @@
 					console.log(err)
 				}).finally(() => {
 					this.loading = false;
+					this.outStore();
 					uni.hideLoading();
 				})
 			},

+ 2 - 1
pages/me/setting/setting.vue

@@ -72,12 +72,13 @@
 			};
 		},
 		created() {
+			this.getMyinfo();
 			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
 				console.log(wgtinfo);
 				console.log(wgtinfo.version); //版本号
 				this.edition_s = wgtinfo.version
 			})
-			this.getMyinfo();
+			
 		},
 		methods: {
 			...mapMutations(["logout"]),

+ 2 - 2
pages/msg/System-message/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 系统消息页面 -->
 	<view class="header">
-		<view class="content" v-for="(item,index) in orderList" @click="inDetails" :key="index">
+		<view class="content" v-for="(item,index) in orderList" :key="index">
 			<view class="content-one">
 				<text class="content-one-first">{{item.msgTitle}}</text>
 				<text class="content-one-second">{{item.data}}</text>
@@ -13,7 +13,7 @@
 			<text class="content-three">
 				{{msgContent.replace(/<[^>]+>/g,"")}}
 			</text>
-			<view class="content-five" v-if="item.sendUserId==17||item.sendUserId==19">
+			<view class="content-five" @click="inDetails" v-if="item.sendUserId==17||item.sendUserId==19">
 				<text class="content-five-first">查看订单详情</text>
 				<text class="content-five-second">
 					<u-icon name="arrow-right"></u-icon>

+ 8 - 2
store/index.js

@@ -66,8 +66,8 @@ const store = new Vuex.Store({
 		showToastDuration : 4000,
 		showServerErrorMsg: '连接服务器异常!',
 		hasLogin:false,//用户是否登录
-		storeInfo:{}//存放用户账号数据
-		
+		storeInfo:{},//存放用户账号数据
+		undataStore:false	
 	},
 	mutations: {
 		$uStore(state, payload) {
@@ -111,6 +111,12 @@ const store = new Vuex.Store({
 			uni.removeStorage({
 				key:"token"
 			})
+		},
+		inStore(state){
+			state.undataStore=true;
+		},
+		outStore(state){
+			state.undataStore=false;
 		}
 	}
 })