index.vue
1.2 KB
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
32
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
<template>
<view class="main">
<p >欢迎使用设备乐</p>
<view class="top" @click="have(1)">
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg1.png" style="width: 686rpx;
height: 320rpx;" mode=""></image>
</view>
<view class="top" @click="have(2)">
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg2.png" style="width: 686rpx;
height: 320rpx;" mode=""></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
have(val){
uni.$u.http.post('/api/common/choose_group', {
type: val
}).then(r => {
wx.hideLoading()
console.log(r);
if(val == 1){
uni.navigateTo({
url:`/pages/index/choose?val=买`
})
}else{
uni.navigateTo({
url:`/pages/index/choose?val=卖`
})
}
}).catch(err => {
console.log(err);
})
},
}
}
</script>
<style scoped lang="scss">
.main{
background: #f6f6f6ff;
height: 100vh;
margin-left: 5%;
p{
color: #000000e6;
font-size: 56rpx;
font-weight: 500;
margin: 132rpx 0 74rpx 0;
}
.top{
height: 320rpx;
margin: auto;
border-radius: 16rpx;
margin-bottom: 64rpx;
}
}
</style>