binding.vue
2.0 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
<div class='binding'>
<view class="binding_title">绑定客户</view>
<view class="binding_input">
<input type="text" placeholder="请填写推荐码" placeholder-class="bind_input" v-model="code">
</view>
<view class="content">{{content}}</view>
<view class="binding_btn" @click="set_sure">确定</view>
</div>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
code: "",
content: ""
}
},
methods: {
set_sure() {
let t = this;
let url = "api/person/bindKehu";
let param = {
code: t.code
};
app.post(url, param, 'get').then(r => {
console.log('1234567890',r)
uni.setStorageSync('re_id',1)
uni.switchTab({
url: '/pages/taocangoumai/taocangoumai'
})
}).catch(err => {
console.log(err)
t.content = err.msg
})
}
},
onLoad(options) {
},
mounted() {
},
created() {
}
}
</script>
<style>
.binding {
width: 686rpx;
background: rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 10rpx;
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -30%);
padding: 60rpx 48rpx 56rpx;
box-sizing: border-box;
}
.binding_title {
font-size: 44rpx;
font-weight: bold;
line-height: 60rpx;
color: rgba(6, 18, 30, 1);
}
.content {
margin-top: 20rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 36rpx;
color: rgba(206, 21, 0, 1);
}
.binding_input {
margin-top: 134rpx;
border-bottom: 1rpx solid rgba(235, 235, 235, 1);
padding-bottom: 36rpx;
}
.bind_input {
font-size: 32rpx;
font-weight: 400;
line-height: 44rpx;
color: rgba(210, 210, 210, 1);
text-align: center;
}
.binding_btn {
margin-top: 110rpx;
height: 100rpx;
background: rgba(243, 152, 0, 1);
box-shadow: 0rpx 4rpx 18rpx rgba(0, 0, 0, 0.04);
opacity: 1;
border-radius: 10rpx;
font-size: 32rpx;
font-weight: 400;
line-height: 100rpx;
color: rgba(255, 255, 255, 1);
text-align: center;
}
</style>