Blame view

antis-app-siberian/pages/my/code.vue 1.95 KB
fbc85b60   wwk   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  <template>
  	<view style="width:100%;background-color:#F7F7F7;min-height:100vh;background-size:100% 100%;padding-top:30%;">
  		<view
  			style="height:500rpx;width:500rpx;display:flex;align-items:center;justify-content:center;text-align:center;border:1px solid gray;background-color:white;border-radius:20rpx;margin:0 auto;">
  			<view style="margin-top:20rpx;">
  				<view>
  					<image :src="BASE_URL+'/api/File/Image/annexpic/'+imgsrc" style="width:300rpx;height:300rpx;"
  						show-menu-by-longpress="true">
  					</image>
  				</view>
  				<view style="margin-top:50rpx;">
  					<text>{{'分享人:'+user.realName}}</text>
  				</view>
  			</view>
  		</view>
  		<view class="centerview" style="margin-top:20rpx;">
  			<button  openType="share" type="primary" class="">分享小程序</button>
  		</view>
  	</view>
  
  </template>
  
  <script>
  	import BASE_URL from '../../common/config.js'
  	import service from '../../service/service.js'
  	export default {
  		onShareAppMessage(res) {
  			if (res.from === 'button') { // 来自页面内分享按钮
  				console.log(res.target)
  			}
  			return {
f3ae5820   wwk   备份
32
  				title: '朗思测评官方报名小程序',
fbc85b60   wwk   1
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  				path: '/pages/login/index?scene=' + service.getUser().id,
  				imageUrl: this.BASE_URL + '/api/File/Image/annexpic/20221222_375601989435786501.png'
  			}
  		},
  		data() {
  			return {
  				BASE_URL,
  				imgsrc: '',
  				user: null,
  				model: {
  					page: 'pages/login/index',
  					scene: '',
  				}
  			}
  		},
  		onLoad() {
  			this.ShowInfo()
  			this.ShowQRcode()
  		},
  		methods: {
  			ShowInfo() {
  				this.API.GetCustomUserInfo(service.getUser().id).then(res => {
  					if (res.code == 200) {
  						this.user = res.data
  					} else {
  						uni.showToast({
  							title: '获取用户信息失败',
  							icon: 'none'
  						})
  					}
  				})
  			},
  			ShowQRcode() {
  				this.model.scene = service.getUser().id
  				this.API.GetQRCode(this.model).then(res => {
  					console.log('这是获取信息', res)
  					this.imgsrc = res.data
  				})
  			}
  		}
  	}
  </script>
  
  <style>
  	
  </style>