xhj 2 år sedan
förälder
incheckning
688df64765
2 ändrade filer med 10 tillägg och 24 borttagningar
  1. 6 12
      card/create/create.vue
  2. 4 12
      match/activityManage/activityManage.vue

+ 6 - 12
card/create/create.vue

@@ -192,20 +192,11 @@ export default {
 	async onLoad(opt) {
 		this.isEdit = opt.isEdit?true:false;
 		this.id = opt.id;
-		if(opt.saleNo){
-			console.log(opt.saleNo)
-			this.saleNo = opt.saleNo
-			req.setStorage('saleNo',this.saleNo)
-		}else{
-			console.log(req.getStorage('saleNo'))
-			opt.saleNo = req.getStorage('saleNo')
-			this.saleNo = opt.saleNo
-		}
 		
 		await req.silenceLogin(opt.saleNo)
 		console.log('getUserCard')
+		await this.getUserInfo()
 		this.getUserCard()
-		this.getEmploymentInfo()
 	},
 
 	methods: {
@@ -214,13 +205,16 @@ export default {
 				req.getRequest('/api/user/info',{},res=>{
 					this.avatar = res.avatar;
 					this.phone = res.mobile;
+					this.saleNo = res.saleNo
+					req.setStorage('saleNo',this.saleNo)
+					// this.getEmploymentInfo()
 					resolve();
 				})
 			})
 		},
 		getEmploymentInfo(){
 			return new Promise((resolve,reject)=>{
-				req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:req.getStorage('userInfo').saleNo},res=>{
+				req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:this.saleNo},res=>{
 					if(res.name){
 						this.employmentInfo = res;
 						this.realName = this.employmentInfo.name;
@@ -243,7 +237,7 @@ export default {
 				this.userCard = res
 				if(!res){
 					this.isEdit = true
-					this.getUserInfo()
+					// this.getUserInfo()
 				}else{
 					if(!this.isEdit){
 						if(res.auditState==0){

+ 4 - 12
match/activityManage/activityManage.vue

@@ -28,7 +28,7 @@
 							<image src="../static/images/person.png"></image>
 							{{item.person}}人
 						</view>
-						<view class="act-edit" @click="jumpUrl('/match/activityEdit/activityEdit?id='+item.id)">修改</view>
+						<view class="act-edit" v-if="item.state!=2&&pcId&&pcId==item.creator" @click="jumpUrl('/match/activityEdit/activityEdit?id='+item.id)">修改</view>
 					</view>
 				</view>
 			</view>
@@ -62,21 +62,13 @@
 				},
 				searchVal:'',
 				total:0,
-				saleNo:null
+				saleNo:null,
+				pcId:null
 			}
 		},
 		async onLoad(opt) {
-			if(opt.saleNo){
-				console.log(opt.saleNo)
-				this.saleNo = opt.saleNo
-				req.setStorage('saleNo',this.saleNo)
-			}else{
-				console.log(req.getStorage('saleNo'))
-				opt.saleNo = req.getStorage('saleNo')
-				this.saleNo = opt.saleNo
-			}
-			
 			await req.silenceLogin(opt.saleNo)
+			this.pcId = req.getStorage('userInfo').pcId
 			this.getPageList()
 		},
 		onShow() {