Quellcode durchsuchen

屏蔽经纬度

zhanghui vor 2 Jahren
Ursprung
Commit
9df24c6cfd
5 geänderte Dateien mit 38 neuen und 47 gelöschten Zeilen
  1. 1 1
      common/js/service.js
  2. 24 41
      pages/index/index.vue
  3. 1 1
      pages/login/login.vue
  4. 12 4
      pages/my/my.vue
  5. BIN
      static/ud4.png

+ 1 - 1
common/js/service.js

@@ -104,7 +104,7 @@ export default {
     // 报道打卡
     // 报道打卡
     clockIn(param) {
     clockIn(param) {
         return request({
         return request({
-            url: '/business/tech/clockIn?storeId='+param.storeId + '&longitude=' + param.longitude + '&latitude=' + param.latitude + '&timestamp=' + param.timestamp,
+            url: '/business/tech/clockIn?storeId='+param.storeId + '&timestamp=' + param.timestamp,
             method: 'POST'
             method: 'POST'
         })
         })
     },
     },

+ 24 - 41
pages/index/index.vue

@@ -2,7 +2,7 @@
 	<view class="page">
 	<view class="page">
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"  title="首页" />
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"  title="首页" />
 		<view class="flex-row tuni ">
 		<view class="flex-row tuni ">
-			<image class="profile" :src="userInfo.avatarUrl || '/static/index/nullAva.png'"></image>
+			<image class="profile" :src="userInfo.avatarUrl || '/static/ud4.png'"></image>
 			<view class="tuniMsg">
 			<view class="tuniMsg">
 				<view class="name ">
 				<view class="name ">
 					<text >{{userInfo.name}}</text>
 					<text >{{userInfo.name}}</text>
@@ -12,7 +12,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="flex-row justify-around tuni-right ">
 			<view class="flex-row justify-around tuni-right ">
-				<view class="flex-col " @click="userScanCode">
+				<view class="flex-col">
 					<view class="flex-row justify-center dakaIcon ">
 					<view class="flex-row justify-center dakaIcon ">
 						<text>{{userInfo.subNumber}}</text>
 						<text>{{userInfo.subNumber}}</text>
 					</view>
 					</view>
@@ -20,7 +20,7 @@
 						<text>预约人数</text>
 						<text>预约人数</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="flex-col " @click="userScanCode">
+				<view class="flex-col">
 					<view class="flex-row justify-center dakaIcon ">
 					<view class="flex-row justify-center dakaIcon ">
 						<u-icon name="/static/index/erweima.png" size="35"></u-icon>
 						<u-icon name="/static/index/erweima.png" size="35"></u-icon>
 					</view>
 					</view>
@@ -61,7 +61,7 @@
 		<view class="flex-row justify-center ">
 		<view class="flex-row justify-center ">
 			<view class="serviceMsg " v-if="currService">
 			<view class="serviceMsg " v-if="currService">
 				<view class="flex-row serviceInfo ">
 				<view class="flex-row serviceInfo ">
-					<image class="serviceProfile" :src="currService.avatar || '/static/logo.png'"></image>
+					<image class="serviceProfile" :src="currService.avatar || '/static/ud4.png'"></image>
 					<view class="flex-col justify-end serviceInfo-rigth ">
 					<view class="flex-col justify-end serviceInfo-rigth ">
 						<view class="flex-row justify-between ">
 						<view class="flex-row justify-between ">
 							<view class="flex-row">
 							<view class="flex-row">
@@ -115,7 +115,7 @@
 					<image class="dataNull" src="/static/index/dataNull.png"></image>
 					<image class="dataNull" src="/static/index/dataNull.png"></image>
 				</view>
 				</view>
 				<view class="flex-row justify-center dataNullText">
 				<view class="flex-row justify-center dataNullText">
-					<text>暂无服务项目</text>
+					<text>暂无服务项目,请刷新页面</text>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -145,7 +145,7 @@
 							<view class="serviceItems ">
 							<view class="serviceItems ">
 								<view class="flex-col serviceTeach "
 								<view class="flex-col serviceTeach "
 									  :class="{marginLeft28: (index+4) % 4!==0,marginTop24:index>3}" v-for="(item,index) in servicePersonList" :key="index" @click="servicePersonListIndex = index">
 									  :class="{marginLeft28: (index+4) % 4!==0,marginTop24:index>3}" v-for="(item,index) in servicePersonList" :key="index" @click="servicePersonListIndex = index">
-									<image class="serviceTeachImg"  :src="item.facePhotoUrl ||'/static/index/nullAva.png'" :class="{vBackGround: servicePersonListIndex === index}"></image>
+									<image class="serviceTeachImg"  :src="item.facePhotoUrl ||'/static/ud4.png'" :class="{vBackGround: servicePersonListIndex === index}"></image>
 									<view class="serviceTeachName">
 									<view class="serviceTeachName">
 										<text>{{item.personName}}</text>
 										<text>{{item.personName}}</text>
 									</view>
 									</view>
@@ -178,7 +178,7 @@
 
 
 				<scroll-view class="scrollY" scroll-y>
 				<scroll-view class="scrollY" scroll-y>
 					<view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}" v-for="(item,index) in selectServiceObjectList" :key="index"  @click="selectServiceObjectIndex = index">
 					<view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}" v-for="(item,index) in selectServiceObjectList" :key="index"  @click="selectServiceObjectIndex = index">
-						<image class="objectImage" :src="item.facePhotoUrl || '/static/index/dataNull.png'"></image>
+						<image class="objectImage" :src="item.facePhotoUrl || '/static/ud4.png'"></image>
 						<view class="flex-col objectName ">
 						<view class="flex-col objectName ">
 							<text>{{item.nickName}}</text>
 							<text>{{item.nickName}}</text>
 						</view>
 						</view>
@@ -234,7 +234,7 @@
 			this.storeId = uni.getStorageSync('storeId')
 			this.storeId = uni.getStorageSync('storeId')
 			this.storeName = uni.getStorageSync('storeName')
 			this.storeName = uni.getStorageSync('storeName')
 			this.getUserInfo()
 			this.getUserInfo()
-			this.currServiceInfo()
+			// this.currServiceInfo()
 
 
 
 
 		},
 		},
@@ -429,39 +429,22 @@
 					url: '/pages/scanCode/scanCode',
 					url: '/pages/scanCode/scanCode',
 					events: {
 					events: {
 						getScancode: function(data) {
 						getScancode: function(data) {
-
-							uni.getLocation({
-								type: 'gcj02',
-								success: (e) => {
-									// that.qqMap.reverseGeocoder({   //根据经纬度解析地址信息
-									// 	location: {
-									// 		latitude: e.latitude,
-									// 		longitude: e.longitude
-									// 	},
-									// })
-									that.storeId = JSON.parse(data).storeId
-									that.timestamp = JSON.parse(data).timestamp
-									uni.setStorageSync('storeId', that.storeId)
-									uni.setStorageSync('timestamp', that.timestamp)
-									let param ={
-										storeId:that.storeId,
-										timestamp:that.timestamp,
-										longitude:e.longitude,
-										latitude:e.latitude
-									}
-									console.log(param)
-									that.$api.service.clockIn(param).then(res=>{
-										uni.showToast({
-											icon: 'success',
-											duration: 2000,
-											title: '签到成功'
-										});
-										that.currServiceInfo()
-									})
-								},
-								fail:(err) =>{
-									console.log('++++++++++getLocation++fail+++++++++++',err)
-								}
+							that.storeId = JSON.parse(data).storeId
+							that.timestamp = JSON.parse(data).timestamp
+							uni.setStorageSync('storeId', that.storeId)
+							uni.setStorageSync('timestamp', that.timestamp)
+							let param ={
+								storeId:that.storeId,
+								timestamp:that.timestamp
+							}
+							console.log(param)
+							that.$api.service.clockIn(param).then(res=>{
+								uni.showToast({
+									icon: 'success',
+									duration: 2000,
+									title: '签到成功'
+								});
+								that.currServiceInfo()
 							})
 							})
 						},
 						},
 					}
 					}

+ 1 - 1
pages/login/login.vue

@@ -27,7 +27,7 @@
 					</u-form-item>
 					</u-form-item>
 				</view>
 				</view>
 
 
-				<view class="forgetPassword"><text>忘记密码?</text></view>
+<!--				<view class="forgetPassword"><text>忘记密码?</text></view>-->
 
 
 				<view class="loginButton" @click="login">
 				<view class="loginButton" @click="login">
 					<text>登录</text>
 					<text>登录</text>

+ 12 - 4
pages/my/my.vue

@@ -3,14 +3,14 @@
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"   title="我的" />
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"   title="我的" />
 			<view class="useInfo  flex-row">
 			<view class="useInfo  flex-row">
 				<view class="profileView" @click="goUserInfo">
 				<view class="profileView" @click="goUserInfo">
-					<image class="profile" :src="userInfo.avatar  || '/static/logo.png'"></image>
+					<image class="profile" :src="userInfo.avatarUrl  || '/static/ud4.png'"></image>
 				</view>
 				</view>
 				<view class="usermsg flex-col">
 				<view class="usermsg flex-col">
 					<view class="name">
 					<view class="name">
-						<text @click="goUserInfo">{{userInfo.nickName}}</text>
+						<text @click="goUserInfo">{{userInfo.name}}</text>
 					</view>
 					</view>
 					<view class="other flex-row">
 					<view class="other flex-row">
-						<text @click="goUserInfo">{{userInfo.phonenumber}}</text>
+						<text @click="goUserInfo">{{userInfo.post}}</text>
 						<u-icon name="arrow-right" color="#333333" size="18"></u-icon>
 						<u-icon name="arrow-right" color="#333333" size="18"></u-icon>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -130,7 +130,15 @@
 
 
 			getUserInfo(){
 			getUserInfo(){
 				this.$api.user.getUserInfo().then(res=>{
 				this.$api.user.getUserInfo().then(res=>{
-					this.userInfo = res.data.data.user
+					this.userInfo = res.data.data
+					this.getImgUrlByOssId(this.userInfo.avatar)
+					uni.setStorageSync('userInfo', this.userInfo )
+				})
+			},
+
+			getImgUrlByOssId(ossId){
+				this.$api.service.getImgUrlByOssId({ossId:ossId}).then(res=>{
+					this.$set(this.userInfo,'avatarUrl', res.data.data[0].url.replace(/^http:/, "https:"))
 				})
 				})
 			},
 			},
 
 

BIN
static/ud4.png