正在显示
27 个修改的文件
包含
614 行增加
和
140 行删除
@@ -35,12 +35,14 @@ | @@ -35,12 +35,14 @@ | ||
35 | </view> | 35 | </view> |
36 | </view> | 36 | </view> |
37 | 37 | ||
38 | - <view class=" flexBox" > | ||
39 | - <view class="tips" v-if="isBtn"> | ||
40 | - {{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{info.city !=='' ? '-' : ''}} 距您{{info.distance || '0'}}km | 38 | + <view class=" flexBox" style="width: 100%;"> |
39 | + <view class="tips" v-if="isBtn" style="width: 70%;"> | ||
40 | + {{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{(info.city !=='' && !isBtn) ? '-' : ''}} <text v-if="!isBtn">距您{{info.distance || '0'}}km</text> | ||
41 | </view> | 41 | </view> |
42 | - <view class="font" style="justify-content: flex-end; width: 100%;"> | ||
43 | - <text>{{info.price}}</text> <text style="font-size: 26rpx;">/月</text> | 42 | + <view class="font" style="justify-content: flex-end; " :style="!isBtn ? 'width: 100%' : ''"> |
43 | + <text>{{info.price}}</text> | ||
44 | + <!-- <text>**</text> --> | ||
45 | + <text style="font-size: 26rpx;">万/月</text> | ||
44 | </view> | 46 | </view> |
45 | 47 | ||
46 | </view> | 48 | </view> |
@@ -61,7 +63,9 @@ | @@ -61,7 +63,9 @@ | ||
61 | </view> | 63 | </view> |
62 | 64 | ||
63 | <view class="font" style="justify-content: flex-end;" v-if="info.price"> | 65 | <view class="font" style="justify-content: flex-end;" v-if="info.price"> |
64 | - <text>{{info.price}}</text> <text style="font-size: 26rpx;">/月</text> | 66 | + <text>{{info.price}}</text> |
67 | + <!-- <text>**</text> --> | ||
68 | + <text style="font-size: 26rpx;">万/月</text> | ||
65 | </view> | 69 | </view> |
66 | </view> | 70 | </view> |
67 | <view class="flexBox"> | 71 | <view class="flexBox"> |
@@ -12,7 +12,9 @@ | @@ -12,7 +12,9 @@ | ||
12 | </view> | 12 | </view> |
13 | </view> | 13 | </view> |
14 | <view class="font oneh" style="width: 30vw;" v-if="info.price && info.price !== ''"> | 14 | <view class="font oneh" style="width: 30vw;" v-if="info.price && info.price !== ''"> |
15 | - {{info.price}} <text style="font-size: 26rpx;">/月</text> | 15 | + <!-- <text>{{info.price}}</text> --> |
16 | + <text>**</text> | ||
17 | + <text style="font-size: 26rpx;">万/月</text> | ||
16 | </view> | 18 | </view> |
17 | </view> | 19 | </view> |
18 | <view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" > | 20 | <view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" > |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/Frame3007@2x.png" | 3 | <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/Frame3007@2x.png" |
4 | style="width: 100vw;height: 100vh;" mode=""></image> | 4 | style="width: 100vw;height: 100vh;" mode=""></image> |
5 | <view class="btn"> | 5 | <view class="btn"> |
6 | - <u-button @click="go" style="width: 30%;" text="点击进入" shape="circle" type="primary"></u-button> | 6 | + <u-button @click="go" style="width: 80%;" text="点击进入" shape="circle" type="primary"></u-button> |
7 | </view> | 7 | </view> |
8 | <view class="btn1"> | 8 | <view class="btn1"> |
9 | <u-button @click="goindex" text="跳过" shape="circle" type="info" :plain="true"></u-button> | 9 | <u-button @click="goindex" text="跳过" shape="circle" type="info" :plain="true"></u-button> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | methods: { | 20 | methods: { |
21 | go() { | 21 | go() { |
22 | uni.reLaunch({ | 22 | uni.reLaunch({ |
23 | - url: '/pages/index/login' | 23 | + url: '/pages/index/index' |
24 | }) | 24 | }) |
25 | }, | 25 | }, |
26 | goindex() { | 26 | goindex() { |
@@ -38,10 +38,12 @@ | @@ -38,10 +38,12 @@ | ||
38 | .btn { | 38 | .btn { |
39 | width: 100%; | 39 | width: 100%; |
40 | position: absolute; | 40 | position: absolute; |
41 | - bottom: 94rpx; | ||
42 | - | 41 | + bottom: 80rpx; |
42 | + height: 112rpx; | ||
43 | + // background: linear-gradient(134.7deg, #46baecff 0%, #2f67d3ff 100%); | ||
44 | + // box-shadow: 0 16rpx 24rpx 0 #1d6bbb5e; | ||
43 | /deep/ .u-button { | 45 | /deep/ .u-button { |
44 | - width: 30% !important; | 46 | + width: 80% !important; |
45 | } | 47 | } |
46 | } | 48 | } |
47 | 49 |
@@ -12,9 +12,7 @@ | @@ -12,9 +12,7 @@ | ||
12 | <view class="" style="width: 65vw;" @click.stop="goRot('/pages/subPages/moreSearch')"> | 12 | <view class="" style="width: 65vw;" @click.stop="goRot('/pages/subPages/moreSearch')"> |
13 | <view class="searchcity"> | 13 | <view class="searchcity"> |
14 | <view class="flexBox oneh" style="justify-content: center;" @click.stop="goRot('/pages/subPages/moreChoose')"> | 14 | <view class="flexBox oneh" style="justify-content: center;" @click.stop="goRot('/pages/subPages/moreChoose')"> |
15 | - <view class="city " style="max-width: 120rpx; | ||
16 | - overflow: hidden; | ||
17 | - text-overflow: ellipsis;"> | 15 | + <view class="city " style="max-width: 120rpx;overflow: hidden;text-overflow: ellipsis;"> |
18 | {{city_name ? city_name : '城市'}} | 16 | {{city_name ? city_name : '城市'}} |
19 | </view> | 17 | </view> |
20 | <image class="img1" src="/static/icon/xia.png" mode=""></image> | 18 | <image class="img1" src="/static/icon/xia.png" mode=""></image> |
@@ -4,16 +4,17 @@ | @@ -4,16 +4,17 @@ | ||
4 | <view class="desc"> | 4 | <view class="desc"> |
5 | 为您推荐更多相关信息 | 5 | 为您推荐更多相关信息 |
6 | </view> | 6 | </view> |
7 | - <!-- <view class="content"> | 7 | + <view class="content"> |
8 | <u-grid :col="3"> | 8 | <u-grid :col="3"> |
9 | - <view class="box" v-for="(item,index) in list" :class="isActive===index? 'click-hover':''" | 9 | + <view class="box" style="position: relative;" v-for="(item,index) in list" :class="item.isCheck ? 'click-hover':''" |
10 | @click="checked(index)"> | 10 | @click="checked(index)"> |
11 | <image style="width: 150rpx; height: 150rpx;" :src="item.image_url" mode=""></image> | 11 | <image style="width: 150rpx; height: 150rpx;" :src="item.image_url" mode=""></image> |
12 | + <image src="/static/Frame@2x (1).png" v-if="item.isCheck" style="width: 32rpx; height: 32rpx; position: absolute; top: 0; right: 0;" mode=""></image> | ||
12 | <p style="color: #3375d8ff;font-size: 30rpx;font-weight: 400;">{{item.name}}</p> | 13 | <p style="color: #3375d8ff;font-size: 30rpx;font-weight: 400;">{{item.name}}</p> |
13 | </view> | 14 | </view> |
14 | </u-grid> | 15 | </u-grid> |
15 | - </view> --> | ||
16 | - <view class="" > | 16 | + </view> |
17 | + <!-- <view class="" > | ||
17 | <u-checkbox-group | 18 | <u-checkbox-group |
18 | v-model="checkboxValue1" | 19 | v-model="checkboxValue1" |
19 | placement="column" | 20 | placement="column" |
@@ -32,7 +33,7 @@ | @@ -32,7 +33,7 @@ | ||
32 | </view> | 33 | </view> |
33 | 34 | ||
34 | </u-checkbox-group> | 35 | </u-checkbox-group> |
35 | - </view> | 36 | + </view> --> |
36 | <view class="bom"> | 37 | <view class="bom"> |
37 | <u-button type="primary" @click="goIndex">进入平台</u-button> | 38 | <u-button type="primary" @click="goIndex">进入平台</u-button> |
38 | </view> | 39 | </view> |
@@ -48,6 +49,7 @@ | @@ -48,6 +49,7 @@ | ||
48 | return { | 49 | return { |
49 | isActive: 0, | 50 | isActive: 0, |
50 | flag: '', | 51 | flag: '', |
52 | + arr:[], | ||
51 | checkboxValue1:'', | 53 | checkboxValue1:'', |
52 | list: [ | 54 | list: [ |
53 | 55 | ||
@@ -58,31 +60,37 @@ | @@ -58,31 +60,37 @@ | ||
58 | checkboxChange(e){ | 60 | checkboxChange(e){ |
59 | if(e.length == 0){ | 61 | if(e.length == 0){ |
60 | uni.showToast({ | 62 | uni.showToast({ |
61 | - title:'请勾选选项后重试' | 63 | + title:'请勾选选项后重试', |
64 | + icon:'none' | ||
62 | }) | 65 | }) |
63 | }else if(e.length>3){ | 66 | }else if(e.length>3){ |
64 | this.checkboxValue1 = e.pop() | 67 | this.checkboxValue1 = e.pop() |
65 | uni.showToast({ | 68 | uni.showToast({ |
66 | - title:'最多勾选三项' | 69 | + title:'最多勾选三项', |
70 | + icon:'none' | ||
67 | }) | 71 | }) |
68 | return | 72 | return |
69 | } | 73 | } |
70 | }, | 74 | }, |
71 | goIndex(val) { | 75 | goIndex(val) { |
72 | console.log(this.checkboxValue1) | 76 | console.log(this.checkboxValue1) |
73 | - if(this.checkboxValue1.length == 0){ | 77 | + if(this.arr.length == 0){ |
74 | uni.showToast({ | 78 | uni.showToast({ |
75 | - title:'请勾选后重试' | 79 | + title:'请勾选后重试', |
80 | + icon:'none' | ||
76 | }) | 81 | }) |
77 | - }else if(this.checkboxValue1.length > 3){ | 82 | + }else if(this.arr.length > 3){ |
78 | uni.showToast({ | 83 | uni.showToast({ |
79 | - title:'最多勾选三项,请取消多余勾选后重试' | 84 | + title:'最多勾选三项,请取消多余勾选后重试', |
85 | + icon:'none' | ||
80 | }) | 86 | }) |
81 | }else{ | 87 | }else{ |
82 | - uni.$u.http.post('/api/common/add_category_rec', { | ||
83 | - ids: this.checkboxValue1.toString() | ||
84 | - }).then(res => { | ||
85 | - console.log(this.flag); | 88 | + let arrs = this.arr.map(item => item.id) |
89 | + console.log(arrs.toString()); | ||
90 | + // uni.$u.http.post('/api/common/add_category_rec', { | ||
91 | + // ids: this.checkboxValue1.toString() | ||
92 | + // }).then(res => { | ||
93 | + // console.log(this.flag); | ||
86 | if (this.flag == '买') { | 94 | if (this.flag == '买') { |
87 | uni.switchTab({ | 95 | uni.switchTab({ |
88 | url: '/pages/index/buy' | 96 | url: '/pages/index/buy' |
@@ -92,23 +100,43 @@ | @@ -92,23 +100,43 @@ | ||
92 | url: '/pages/index/sell' | 100 | url: '/pages/index/sell' |
93 | }) | 101 | }) |
94 | } | 102 | } |
95 | - }).catch(err => { | ||
96 | - console.log(err); | ||
97 | - }) | 103 | + // }).catch(err => { |
104 | + // console.log(err); | ||
105 | + // }) | ||
98 | } | 106 | } |
99 | 107 | ||
100 | 108 | ||
101 | }, | 109 | }, |
102 | checked(idx) { | 110 | checked(idx) { |
103 | - this.isActive = idx | ||
104 | - console.log(idx); | 111 | + // console.log(this.list[idx].isCheck); |
112 | + if(!this.list[idx].isCheck){ | ||
113 | + this.arr = this.list.filter(item => item.isCheck == true) | ||
114 | + // console.log(this.arr); | ||
115 | + if(this.arr.length > 2){ | ||
116 | + uni.showToast({ | ||
117 | + title:'最多勾选三项,请取消多余勾选后重试', | ||
118 | + icon:'none' | ||
119 | + }) | ||
120 | + return | ||
121 | + } | ||
122 | + this.list[idx].isCheck = !this.list[idx].isCheck | ||
123 | + }else{ | ||
124 | + this.list[idx].isCheck = !this.list[idx].isCheck | ||
125 | + } | ||
126 | + | ||
105 | } | 127 | } |
106 | }, | 128 | }, |
107 | onLoad(option) { | 129 | onLoad(option) { |
108 | console.log(option); | 130 | console.log(option); |
109 | this.flag = option.val | 131 | this.flag = option.val |
110 | uni.$u.http.get('/api/common/category_rec').then(res => { | 132 | uni.$u.http.get('/api/common/category_rec').then(res => { |
111 | - this.list = res.data | 133 | + this.list = res.data.map(item => { |
134 | + return{ | ||
135 | + ...item, | ||
136 | + isCheck: false | ||
137 | + } | ||
138 | + | ||
139 | + }) | ||
112 | }).catch(err => { | 140 | }).catch(err => { |
113 | console.log(err); | 141 | console.log(err); |
114 | }) | 142 | }) |
@@ -163,11 +191,13 @@ | @@ -163,11 +191,13 @@ | ||
163 | } | 191 | } |
164 | 192 | ||
165 | .click-hover { | 193 | .click-hover { |
166 | - | ||
167 | - background-color: #ecf2feff; | ||
168 | - | 194 | + border: 2rpx solid #3375d8ff; |
195 | + background: #ecf2feff; | ||
169 | } | 196 | } |
197 | + .imgbox{ | ||
198 | + background-image: url('/static/Frame@2x (1).png'); | ||
170 | 199 | ||
200 | + } | ||
171 | .bom { | 201 | .bom { |
172 | margin-bottom: 16rpx; | 202 | margin-bottom: 16rpx; |
173 | position: fixed; | 203 | position: fixed; |
@@ -20,22 +20,22 @@ height: 320rpx;" mode=""></image> | @@ -20,22 +20,22 @@ height: 320rpx;" mode=""></image> | ||
20 | } | 20 | } |
21 | }, | 21 | }, |
22 | onShow() { | 22 | onShow() { |
23 | - wx.login({ | ||
24 | - provider: 'weixin', //使用微信登录 | ||
25 | - success(res) { | ||
26 | - console.log(res); | ||
27 | - }, | ||
28 | - complete(res) { | ||
29 | - console.log(res); | ||
30 | - this.code = res.code | ||
31 | - uni.$u.http.get(`/api/common/code?code=${this.code}`).then((res) => { | ||
32 | - uni.hideLoading() | ||
33 | - uni.setStorageSync('token', res.data.token || '') | ||
34 | - }).catch(err => { | ||
35 | - console.log(err); | ||
36 | - }) | ||
37 | - } | ||
38 | - }); | 23 | + // wx.login({ |
24 | + // provider: 'weixin', //使用微信登录 | ||
25 | + // success(res) { | ||
26 | + // console.log(res); | ||
27 | + // }, | ||
28 | + // complete(res) { | ||
29 | + // console.log(res); | ||
30 | + // this.code = res.code | ||
31 | + // uni.$u.http.get(`/api/common/code?code=${this.code}`).then((res) => { | ||
32 | + // uni.hideLoading() | ||
33 | + // uni.setStorageSync('token', res.data.token || '') | ||
34 | + // }).catch(err => { | ||
35 | + // console.log(err); | ||
36 | + // }) | ||
37 | + // } | ||
38 | + // }); | ||
39 | }, | 39 | }, |
40 | methods: { | 40 | methods: { |
41 | have(val) { | 41 | have(val) { |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | </button> | 20 | </button> |
21 | <button v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" @click="mobileLogin" class="loginBtn">一键授权登录 | 21 | <button v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" @click="mobileLogin" class="loginBtn">一键授权登录 |
22 | </button> | 22 | </button> |
23 | - <!-- <view class="codeLogin" @click="goCodeLoGin">短信验证码登录 </view> --> | 23 | + <view class="codeLogin" @click="goCodeLoGin">短信验证码登录 </view> |
24 | </view> | 24 | </view> |
25 | <view class="agree"> | 25 | <view class="agree"> |
26 | <u-checkbox-group @change="checkboxGroupChange"> | 26 | <u-checkbox-group @change="checkboxGroupChange"> |
@@ -106,6 +106,7 @@ | @@ -106,6 +106,7 @@ | ||
106 | provider: 'weixin', //使用微信登录 | 106 | provider: 'weixin', //使用微信登录 |
107 | success(res) { | 107 | success(res) { |
108 | console.log(res); | 108 | console.log(res); |
109 | + | ||
109 | }, | 110 | }, |
110 | complete(res) { | 111 | complete(res) { |
111 | console.log(res); | 112 | console.log(res); |
@@ -114,8 +115,30 @@ | @@ -114,8 +115,30 @@ | ||
114 | uni.hideLoading() | 115 | uni.hideLoading() |
115 | uni.setStorageSync('token', res.data.token || '') | 116 | uni.setStorageSync('token', res.data.token || '') |
116 | uni.setStorageSync('reToken', res.data.token || '') | 117 | uni.setStorageSync('reToken', res.data.token || '') |
117 | - uni.navigateTo({ | ||
118 | - url: "/pages/index/index" | 118 | + uni.$u.http.post(`/api/common/mobile`,{ |
119 | + code: e.detail.code | ||
120 | + }).then(res => { | ||
121 | + console.log(res); | ||
122 | + }) | ||
123 | + uni.switchTab({ | ||
124 | + url: "/pages/index/buy" | ||
125 | + }) | ||
126 | + let ids = uni.getStorageSync('ids') | ||
127 | + uni.$u.http.post('/api/common/add_category_rec', { | ||
128 | + ids: ids | ||
129 | + }).then(res => { | ||
130 | + // console.log(this.flag); | ||
131 | + // if (this.flag == '买') { | ||
132 | + // uni.switchTab({ | ||
133 | + // url: '/pages/index/buy' | ||
134 | + // }) | ||
135 | + // } else { | ||
136 | + // uni.switchTab({ | ||
137 | + // url: '/pages/index/sell' | ||
138 | + // }) | ||
139 | + // } | ||
140 | + }).catch(err => { | ||
141 | + console.log(err); | ||
119 | }) | 142 | }) |
120 | }).catch(err => { | 143 | }).catch(err => { |
121 | console.log(err); | 144 | console.log(err); |
1 | <template> | 1 | <template> |
2 | <view class="main"> | 2 | <view class="main"> |
3 | - <u-swiper | ||
4 | - :list="imgList" | ||
5 | - @change="change" | ||
6 | - @click="click" | ||
7 | - ></u-swiper> | 3 | + <u-swiper :list="imgList" @change="change" @click="click"></u-swiper> |
8 | <view class="items" v-for="item in list"> | 4 | <view class="items" v-for="item in list"> |
9 | <view class=""> | 5 | <view class=""> |
10 | <image src="/static/icon/1816.png" v-if="item.type == 1" | 6 | <image src="/static/icon/1816.png" v-if="item.type == 1" |
@@ -36,7 +32,7 @@ | @@ -36,7 +32,7 @@ | ||
36 | data() { | 32 | data() { |
37 | return { | 33 | return { |
38 | list: [], | 34 | list: [], |
39 | - imgList:[], | 35 | + imgList: [], |
40 | status: 'loadmore', | 36 | status: 'loadmore', |
41 | loadText: { | 37 | loadText: { |
42 | loadmore: '轻轻上拉加载更多...', | 38 | loadmore: '轻轻上拉加载更多...', |
@@ -55,16 +51,16 @@ | @@ -55,16 +51,16 @@ | ||
55 | const formattedDate = `${year}-${month}-${day}`; | 51 | const formattedDate = `${year}-${month}-${day}`; |
56 | return formattedDate | 52 | return formattedDate |
57 | }, | 53 | }, |
58 | - change(){ | 54 | + change() { |
59 | 55 | ||
60 | }, | 56 | }, |
61 | - click(e){ | 57 | + click(e) { |
62 | console.log(e); | 58 | console.log(e); |
63 | - if(this.imgList[e].type == 2){ | 59 | + if (this.imgList[e].type == 2) { |
64 | uni.navigateTo({ | 60 | uni.navigateTo({ |
65 | url: `/pages/subPages/outer?url=${this.imgList[e].image}` | 61 | url: `/pages/subPages/outer?url=${this.imgList[e].image}` |
66 | }) | 62 | }) |
67 | - }else{ | 63 | + } else { |
68 | uni.navigateTo({ | 64 | uni.navigateTo({ |
69 | url: `/pages/subPages/detail?id=${this.imgList[e].equip_id}` | 65 | url: `/pages/subPages/detail?id=${this.imgList[e].equip_id}` |
70 | }) | 66 | }) |
@@ -76,7 +72,7 @@ | @@ -76,7 +72,7 @@ | ||
76 | page: this.page, | 72 | page: this.page, |
77 | pagenum: 10 | 73 | pagenum: 10 |
78 | }).then(res => { | 74 | }).then(res => { |
79 | - this.status ='loadmore' | 75 | + this.status = 'loadmore' |
80 | if (this.page === 1) { | 76 | if (this.page === 1) { |
81 | this.list = [] | 77 | this.list = [] |
82 | } | 78 | } |
@@ -89,11 +85,11 @@ | @@ -89,11 +85,11 @@ | ||
89 | console.log(err); | 85 | console.log(err); |
90 | }) | 86 | }) |
91 | }, | 87 | }, |
92 | - getBanner(){ | 88 | + getBanner() { |
93 | uni.$u.http.get('/api/message/banner').then(res => { | 89 | uni.$u.http.get('/api/message/banner').then(res => { |
94 | console.log(res); | 90 | console.log(res); |
95 | this.imgList = res.data.map(item => { | 91 | this.imgList = res.data.map(item => { |
96 | - return{ | 92 | + return { |
97 | url: item.image_url, | 93 | url: item.image_url, |
98 | image: item.url, | 94 | image: item.url, |
99 | equip_id: item.equip_id, | 95 | equip_id: item.equip_id, |
@@ -113,8 +109,23 @@ | @@ -113,8 +109,23 @@ | ||
113 | }, | 109 | }, |
114 | 110 | ||
115 | onLoad() { | 111 | onLoad() { |
112 | + let token = uni.getStorageSync('token') | ||
113 | + if (token) { | ||
116 | this.getList() | 114 | this.getList() |
117 | this.getBanner() | 115 | this.getBanner() |
116 | + } else { | ||
117 | + uni.showToast({ | ||
118 | + title: '请登陆后重试', | ||
119 | + icon: 'none' | ||
120 | + }) | ||
121 | + | ||
122 | + setTimeout(() => { | ||
123 | + uni.redirectTo({ | ||
124 | + url: '/pages/index/login' | ||
125 | + }) | ||
126 | + }, 2000) | ||
127 | + } | ||
128 | + | ||
118 | } | 129 | } |
119 | } | 130 | } |
120 | </script> | 131 | </script> |
@@ -125,6 +125,8 @@ | @@ -125,6 +125,8 @@ | ||
125 | console.log(res); | 125 | console.log(res); |
126 | if(res.code == 1){ | 126 | if(res.code == 1){ |
127 | this.info = res.data | 127 | this.info = res.data |
128 | + uni.setStorageSync('phone',res.data.mobile) | ||
129 | + uni.setStorageSync('kfphone',res.data.cooperation_phone) | ||
128 | }else{ | 130 | }else{ |
129 | this.info = {} | 131 | this.info = {} |
130 | } | 132 | } |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | - {{item.city}}</p> | 95 | - {{item.city}}</p> |
96 | <p class="oneh" | 96 | <p class="oneh" |
97 | style=" color: #e63d27ff;font-weight: 600;font-size: 32rpx;width: 15vw;"> | 97 | style=" color: #e63d27ff;font-weight: 600;font-size: 32rpx;width: 15vw;"> |
98 | - {{item.price}}万</p> | 98 | + **万</p> |
99 | </view> | 99 | </view> |
100 | </view> | 100 | </view> |
101 | 101 |
@@ -230,7 +230,7 @@ | @@ -230,7 +230,7 @@ | ||
230 | border-radius: 50%; | 230 | border-radius: 50%; |
231 | } | 231 | } |
232 | /deep/ .u-popup__content{ | 232 | /deep/ .u-popup__content{ |
233 | - padding: 80rpx; | 233 | + padding: 80rpx 80rpx 0 80rpx;; |
234 | } | 234 | } |
235 | .avatar .camera { | 235 | .avatar .camera { |
236 | width: 48rpx; | 236 | width: 48rpx; |
@@ -207,11 +207,26 @@ | @@ -207,11 +207,26 @@ | ||
207 | console.log(this.model1.userInfo); | 207 | console.log(this.model1.userInfo); |
208 | }, | 208 | }, |
209 | onLoad(option) { | 209 | onLoad(option) { |
210 | + let token = uni.getStorageSync('token') | ||
211 | + if (token) { | ||
210 | console.log(option); | 212 | console.log(option); |
211 | let info = JSON.parse(option.info) | 213 | let info = JSON.parse(option.info) |
212 | this.model1.userInfo = info | 214 | this.model1.userInfo = info |
213 | this.model1.userInfo.name = info.brand.name | 215 | this.model1.userInfo.name = info.brand.name |
214 | console.log(this.model1.userInfo); | 216 | console.log(this.model1.userInfo); |
217 | + } else { | ||
218 | + uni.showToast({ | ||
219 | + title: '请登陆后重试', | ||
220 | + icon: 'none' | ||
221 | + }) | ||
222 | + | ||
223 | + setTimeout(() => { | ||
224 | + uni.redirectTo({ | ||
225 | + url: '/pages/index/login' | ||
226 | + }) | ||
227 | + }, 2000) | ||
228 | + } | ||
229 | + | ||
215 | }, | 230 | }, |
216 | } | 231 | } |
217 | </script> | 232 | </script> |
1 | <template> | 1 | <template> |
2 | - <view style="margin: 24rpx 0;"> | 2 | + <view class="u-page__item"> |
3 | + <u-collapse | ||
4 | + accordion | ||
5 | + v-for="item in itemArr" | ||
6 | + @close="close" | ||
7 | + > | ||
8 | + <view class="" @click="backHub(item)"> | ||
9 | + <u-collapse-item | ||
10 | + :title="item.name" | ||
11 | + > | ||
12 | + <text class="u-collapse-content" v-if="item.children && item.children.length>0" v-for="item1 in item.children" @click="backHub1(item1)">{{item1.name}}</text> | ||
13 | + </u-collapse-item> | ||
14 | + </view> | ||
15 | + | ||
16 | + </u-collapse> | ||
17 | + </view> | ||
18 | + <!-- <view style="margin: 24rpx 0;"> | ||
3 | <u-index-list :index-list="indexList"> | 19 | <u-index-list :index-list="indexList"> |
4 | <template v-for="(item, index) in itemArr"> | 20 | <template v-for="(item, index) in itemArr"> |
5 | <!-- #ifdef APP-NVUE --> | 21 | <!-- #ifdef APP-NVUE --> |
22 | + <!-- <u-index-anchor :text="indexList[index]"></u-index-anchor> --> | ||
23 | + | ||
24 | + <!-- <u-index-item> --> --> | ||
25 | + <!-- #ifndef APP-NVUE | ||
6 | <u-index-anchor :text="indexList[index]"></u-index-anchor> | 26 | <u-index-anchor :text="indexList[index]"></u-index-anchor> |
7 | - <!-- #endif --> | ||
8 | - <u-index-item> | ||
9 | - <!-- #ifndef APP-NVUE --> | ||
10 | - <u-index-anchor :text="indexList[index]"></u-index-anchor> | ||
11 | - <!-- #endif --> | ||
12 | - <view class="list-cell" v-for="(cell, index1) in item.list" @click="backHub(cell)"> | 27 | + <!-- #endif --> --> |
28 | + <!-- <view class="list-cell" v-for="(cell, index1) in item.list" @click="backHub(cell)"> | ||
13 | {{cell.name}} | 29 | {{cell.name}} |
14 | </view> | 30 | </view> |
15 | </u-index-item> | 31 | </u-index-item> |
16 | </template> | 32 | </template> |
17 | - </u-index-list> | 33 | + </u-index-list> --> |
18 | </view> | 34 | </view> |
19 | </template> | 35 | </template> |
20 | 36 | ||
@@ -23,6 +39,7 @@ | @@ -23,6 +39,7 @@ | ||
23 | data() { | 39 | data() { |
24 | return { | 40 | return { |
25 | indexList: [], | 41 | indexList: [], |
42 | + | ||
26 | itemArr: [ | 43 | itemArr: [ |
27 | 44 | ||
28 | ] | 45 | ] |
@@ -30,7 +47,14 @@ | @@ -30,7 +47,14 @@ | ||
30 | }, | 47 | }, |
31 | methods: { | 48 | methods: { |
32 | backHub(item){ | 49 | backHub(item){ |
33 | - //选择品牌后跳转 | 50 | + if(item.children && item.children.length > 0){ |
51 | + return | ||
52 | + }else{ | ||
53 | + this.backHub1(item) | ||
54 | + } | ||
55 | + | ||
56 | + }, | ||
57 | + backHub1(item){ | ||
34 | let pages = getCurrentPages(); //获取所有页面栈实例列表 | 58 | let pages = getCurrentPages(); //获取所有页面栈实例列表 |
35 | let prevPage = pages[ pages.length - 2 ]; //上一页页面实例 | 59 | let prevPage = pages[ pages.length - 2 ]; //上一页页面实例 |
36 | prevPage.$vm.xh_id = item.id; | 60 | prevPage.$vm.xh_id = item.id; |
@@ -43,7 +67,7 @@ | @@ -43,7 +67,7 @@ | ||
43 | // console.log('open', e) | 67 | // console.log('open', e) |
44 | }, | 68 | }, |
45 | close(e) { | 69 | close(e) { |
46 | - // console.log('close', e) | 70 | + console.log('close', e) |
47 | }, | 71 | }, |
48 | change(e) { | 72 | change(e) { |
49 | // console.log('change', e) | 73 | // console.log('change', e) |
@@ -51,8 +75,8 @@ | @@ -51,8 +75,8 @@ | ||
51 | }, | 75 | }, |
52 | onLoad() { | 76 | onLoad() { |
53 | uni.$u.http.get('/api/index/xinghao_list').then(res => { | 77 | uni.$u.http.get('/api/index/xinghao_list').then(res => { |
54 | - this.indexList = res.data.word | ||
55 | - this.itemArr = res.data.list | 78 | + // this.indexList = res.data.word |
79 | + this.itemArr = res.data.data | ||
56 | }).catch(err => { | 80 | }).catch(err => { |
57 | console.log(err); | 81 | console.log(err); |
58 | }) | 82 | }) |
@@ -77,4 +101,28 @@ | @@ -77,4 +101,28 @@ | ||
77 | line-height: 24px; | 101 | line-height: 24px; |
78 | background-color: #fff; | 102 | background-color: #fff; |
79 | } | 103 | } |
104 | + .u-page { | ||
105 | + padding: 0; | ||
106 | + | ||
107 | + &__item { | ||
108 | + | ||
109 | + &__title { | ||
110 | + color: $u-tips-color; | ||
111 | + background-color: $u-bg-color; | ||
112 | + padding: 15px; | ||
113 | + font-size: 15px; | ||
114 | + | ||
115 | + &__slot-title { | ||
116 | + color: $u-primary; | ||
117 | + font-size: 14px; | ||
118 | + } | ||
119 | + } | ||
120 | + } | ||
121 | + } | ||
122 | + | ||
123 | + .u-collapse-content { | ||
124 | + color: $u-tips-color; | ||
125 | + font-size: 14px; | ||
126 | + margin: 15rpx 10rpx; | ||
127 | + } | ||
80 | </style> | 128 | </style> |
@@ -28,17 +28,20 @@ | @@ -28,17 +28,20 @@ | ||
28 | <u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择" | 28 | <u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择" |
29 | border="none"></u--input> | 29 | border="none"></u--input> |
30 | <u-icon slot="right" name="arrow-right"></u-icon> | 30 | <u-icon slot="right" name="arrow-right"></u-icon> |
31 | - <view class="posBox" style="top:194rpx; left:32rpx"> | 31 | + <view class="posBox" style="top:190rpx; left:32rpx"> |
32 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | 32 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> |
33 | </view> | 33 | </view> |
34 | </u-form-item> | 34 | </u-form-item> |
35 | <u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.region" borderBottom ref="item1" @click="goMap"> | 35 | <u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.region" borderBottom ref="item1" @click="goMap"> |
36 | + <view class=""> | ||
36 | <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" | 37 | <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" |
37 | border="none"></u--input> | 38 | border="none"></u--input> |
38 | <u-icon slot="right" name="arrow-right"></u-icon> | 39 | <u-icon slot="right" name="arrow-right"></u-icon> |
39 | - <view class="posBox" style="top:276rpx; left:32rpx"> | 40 | + <view class="posBox" style="top:270rpx; left:32rpx"> |
40 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | 41 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> |
41 | </view> | 42 | </view> |
43 | + </view> | ||
44 | + | ||
42 | </u-form-item> | 45 | </u-form-item> |
43 | 46 | ||
44 | 47 | ||
@@ -63,7 +66,10 @@ | @@ -63,7 +66,10 @@ | ||
63 | <u--input v-model="model1.userInfo.hours" border="none"></u--input> | 66 | <u--input v-model="model1.userInfo.hours" border="none"></u--input> |
64 | </u-form-item> --> | 67 | </u-form-item> --> |
65 | <u-form-item label="意向价格" labelWidth="200rpx" prop="userInfo.price" borderBottom ref="item1"> | 68 | <u-form-item label="意向价格" labelWidth="200rpx" prop="userInfo.price" borderBottom ref="item1"> |
69 | + <view class="flexb"> | ||
66 | <u--input type="number" v-model="model1.userInfo.price" border="none"></u--input> | 70 | <u--input type="number" v-model="model1.userInfo.price" border="none"></u--input> |
71 | + <text>万元</text> | ||
72 | + </view> | ||
67 | </u-form-item> | 73 | </u-form-item> |
68 | <u-form-item label="设备亮点" labelWidth="200rpx" prop="userInfo.bright" labelPosition="top" borderBottom ref="item1"> | 74 | <u-form-item label="设备亮点" labelWidth="200rpx" prop="userInfo.bright" labelPosition="top" borderBottom ref="item1"> |
69 | <u--input v-model="model1.userInfo.bright" border="none"></u--input> | 75 | <u--input v-model="model1.userInfo.bright" border="none"></u--input> |
@@ -167,6 +173,8 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -167,6 +173,8 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
167 | onLoad(option) { | 173 | onLoad(option) { |
168 | console.log(option); | 174 | console.log(option); |
169 | this.flag = option.val | 175 | this.flag = option.val |
176 | + let token = uni.getStorageSync('token') | ||
177 | + if(token){ | ||
170 | if(option.info){ | 178 | if(option.info){ |
171 | let info = JSON.parse(option.info) | 179 | let info = JSON.parse(option.info) |
172 | console.log(info); | 180 | console.log(info); |
@@ -174,7 +182,18 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -174,7 +182,18 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
174 | this.model1.userInfo.name = (info.brand && info.brand.name) | 182 | this.model1.userInfo.name = (info.brand && info.brand.name) |
175 | console.log(this.model1.userInfo); | 183 | console.log(this.model1.userInfo); |
176 | } | 184 | } |
185 | + }else{ | ||
186 | + uni.showToast({ | ||
187 | + title:'请登陆后重试', | ||
188 | + icon:'none' | ||
189 | + }) | ||
177 | 190 | ||
191 | + setTimeout(() => { | ||
192 | + uni.redirectTo({ | ||
193 | + url:'/pages/index/login' | ||
194 | + }) | ||
195 | + }, 2000) | ||
196 | + } | ||
178 | 197 | ||
179 | 198 | ||
180 | }, | 199 | }, |
@@ -208,6 +227,7 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -208,6 +227,7 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
208 | }).then(res => { | 227 | }).then(res => { |
209 | this.model1.userInfo.dList = [] | 228 | this.model1.userInfo.dList = [] |
210 | console.log(res); | 229 | console.log(res); |
230 | + | ||
211 | res && res.data && res.data.forEach(item => { | 231 | res && res.data && res.data.forEach(item => { |
212 | this.model1.userInfo.dList.push({...item, value:''}) | 232 | this.model1.userInfo.dList.push({...item, value:''}) |
213 | }) | 233 | }) |
@@ -135,9 +135,24 @@ | @@ -135,9 +135,24 @@ | ||
135 | this.nav = '发布求租' | 135 | this.nav = '发布求租' |
136 | } | 136 | } |
137 | } | 137 | } |
138 | + let token = uni.getStorageSync('token') | ||
139 | + if (token) { | ||
138 | let info = JSON.parse(option && option.info) | 140 | let info = JSON.parse(option && option.info) |
139 | this.model1.userInfo = info | 141 | this.model1.userInfo = info |
140 | this.model1.userInfo.name = info.brand.name | 142 | this.model1.userInfo.name = info.brand.name |
143 | + } else { | ||
144 | + uni.showToast({ | ||
145 | + title: '请登陆后重试', | ||
146 | + icon: 'none' | ||
147 | + }) | ||
148 | + | ||
149 | + setTimeout(() => { | ||
150 | + uni.redirectTo({ | ||
151 | + url: '/pages/index/login' | ||
152 | + }) | ||
153 | + }, 2000) | ||
154 | + } | ||
155 | + | ||
141 | 156 | ||
142 | }, | 157 | }, |
143 | onShow() { | 158 | onShow() { |
1 | <template> | 1 | <template> |
2 | <view class="main" style="display: flex; flex-wrap: wrap; margin-top: 40rpx;"> | 2 | <view class="main" style="display: flex; flex-wrap: wrap; margin-top: 40rpx;"> |
3 | <view class="box" v-for="(item,index) in fileList"> | 3 | <view class="box" v-for="(item,index) in fileList"> |
4 | - <u-upload :fileList="item.url" @afterRead="(event) => afterRead(event,item,index)" @delete="deletePic" | ||
5 | - width="200rpx" height="200rpx" name="1" multiple :maxCount="1"></u-upload> | 4 | + <u-upload :fileList="item.url" @afterRead="(event) => afterRead(event,item,index)" @delete="(event) => deletePic(event,index)" |
5 | + width="200rpx" height="200rpx" name="1" multiple :maxCount="1"> | ||
6 | + <image :src="imggList[index].url" | ||
7 | + mode="widthFix" style="width: 220rpx;height:220rpx;"></image> | ||
8 | + </u-upload> | ||
9 | + | ||
6 | <!-- <u-upload ref="uUpload" :action="action" :auto-upload="true" ></u-upload> --> | 10 | <!-- <u-upload ref="uUpload" :action="action" :auto-upload="true" ></u-upload> --> |
7 | <!-- <u-upload | 11 | <!-- <u-upload |
8 | :action="action" :auto-upload="true" :fileList="item.url" | 12 | :action="action" :auto-upload="true" :fileList="item.url" |
@@ -24,6 +28,7 @@ | @@ -24,6 +28,7 @@ | ||
24 | return { | 28 | return { |
25 | action: config.baseUrl + '/api/common/upload', | 29 | action: config.baseUrl + '/api/common/upload', |
26 | fileList1: [], | 30 | fileList1: [], |
31 | + imggList:[], | ||
27 | info: {}, | 32 | info: {}, |
28 | flag: null, | 33 | flag: null, |
29 | fileList: [ | 34 | fileList: [ |
@@ -103,14 +108,16 @@ | @@ -103,14 +108,16 @@ | ||
103 | icon:'none' | 108 | icon:'none' |
104 | }) | 109 | }) |
105 | } | 110 | } |
106 | - | 111 | + this.imggList = res.data[0].image_arr.map(item => { |
112 | + return{ | ||
113 | + url: item.pic | ||
114 | + } | ||
115 | + }) | ||
107 | this.fileList = res.data[0].image_arr.map(item => { | 116 | this.fileList = res.data[0].image_arr.map(item => { |
108 | return{ | 117 | return{ |
109 | title: item.value, | 118 | title: item.value, |
110 | url:[ | 119 | url:[ |
111 | - { | ||
112 | - url:item.pic | ||
113 | - } | 120 | + |
114 | ] | 121 | ] |
115 | } | 122 | } |
116 | }) | 123 | }) |
@@ -206,10 +213,7 @@ | @@ -206,10 +213,7 @@ | ||
206 | }) | 213 | }) |
207 | }, | 214 | }, |
208 | // 删除图片 | 215 | // 删除图片 |
209 | - deletePic(event) { | ||
210 | - console.log(event); | ||
211 | - console.log(this.fileList); | ||
212 | - let idx = this.fileList.findIndex(item => item.url[0].url == event.file.url) | 216 | + deletePic(event,idx) { |
213 | this.fileList[idx].url = [] | 217 | this.fileList[idx].url = [] |
214 | }, | 218 | }, |
215 | // 新增图片 | 219 | // 新增图片 |
pages/subPages/addUs.vue
0 → 100644
1 | +<template> | ||
2 | + <view> | ||
3 | + <image src="../../static/img-brand@2x.png" style="width: 100%; height: 438rpx;" mode=""></image> | ||
4 | + <view class="box"> | ||
5 | + <view class="" style="padding: 32rpx; background: white;position: relative;"> | ||
6 | + <u--form labelPosition="left" :model="info" :rules="rules" ref="uForm"> | ||
7 | + <u-form-item label="公司名称" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"> | ||
8 | + <u--input v-model="info.name" placeholder="请输入公司名称" border="none"></u--input> | ||
9 | + </u-form-item> | ||
10 | + <u-form-item label="公司类型" labelWidth="200rpx" prop="userInfo.contract_name" borderBottom | ||
11 | + ref="item1"> | ||
12 | + <u--input v-model="info.contract_name" placeholder="请选择公司类型" border="none"></u--input> | ||
13 | + </u-form-item> | ||
14 | + <u-form-item label="主营产品" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> | ||
15 | + <u--input v-model="info.product_ids" placeholder="请选择主营产品" border="none"></u--input> | ||
16 | + </u-form-item> | ||
17 | + <u-form-item label="营业执照" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> | ||
18 | + <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple | ||
19 | + :maxCount="1" width="250" height="150"> | ||
20 | + <image src="/static/img-zhizhao@2x.png" mode="widthFix" style="width: 250px;height: 150px;"> | ||
21 | + </image> | ||
22 | + </u-upload> | ||
23 | + </u-form-item> | ||
24 | + <u-form-item label="公司资质" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> | ||
25 | + <u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple | ||
26 | + :maxCount="1" width="250" height="150"> | ||
27 | + <image src="/static/img-zhizhao@2x(1).png" mode="widthFix" | ||
28 | + style="width: 250px;height: 150px;"></image> | ||
29 | + </u-upload> | ||
30 | + </u-form-item> | ||
31 | + </u--form> | ||
32 | + <view style="margin-top: 40rpx;"> | ||
33 | + <u-button text="提交" type="primary" @click="submit"></u-button> | ||
34 | + </view> | ||
35 | + </view> | ||
36 | + </view> | ||
37 | + </view> | ||
38 | +</template> | ||
39 | + | ||
40 | +<script> | ||
41 | + import config from '@/common/config' | ||
42 | + export default { | ||
43 | + data() { | ||
44 | + return { | ||
45 | + info:{}, | ||
46 | + action: config.baseUrl + '/api/common/upload', | ||
47 | + fileList1: [], | ||
48 | + fileList2: [], | ||
49 | + } | ||
50 | + }, | ||
51 | + onShow() { | ||
52 | + let pagearr = getCurrentPages(); //获取应用页面栈 | ||
53 | + let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 | ||
54 | + console.log('option:', currentPage) //获取页面传递的信息 | ||
55 | + this.model1.userInfo.category_id = currentPage.$vm.category_id || (this.model1.userInfo.category && this.model1.userInfo.category.id) || '' | ||
56 | + this.model1.userInfo.name = currentPage.$vm.name || (this.model1.userInfo.category && this.model1.userInfo.category.name) || '' | ||
57 | + }, | ||
58 | + methods: { | ||
59 | + submit(){ | ||
60 | + console.log(this.info); | ||
61 | + }, | ||
62 | + goChoose(){ | ||
63 | + uni.navigateTo({ | ||
64 | + url: '/pages/subPages/more?val=2' | ||
65 | + }) | ||
66 | + }, | ||
67 | + deletePic(event) { | ||
68 | + this[`fileList${event.name}`].splice(event.index, 1) | ||
69 | + }, | ||
70 | + // 新增图片 | ||
71 | + async afterRead(event) { | ||
72 | + console.log(event); | ||
73 | + // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 | ||
74 | + let lists = [].concat(event.file) | ||
75 | + let fileListLen = this[`fileList${event.name}`].length | ||
76 | + lists.map((item) => { | ||
77 | + this[`fileList${event.name}`].push({ | ||
78 | + ...item, | ||
79 | + status: 'uploading', | ||
80 | + message: '上传中' | ||
81 | + }) | ||
82 | + }) | ||
83 | + for (let i = 0; i < lists.length; i++) { | ||
84 | + const result = await this.uploadFilePromise(lists[i].url) | ||
85 | + let item = this[`fileList${event.name}`][fileListLen] | ||
86 | + this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { | ||
87 | + status: 'success', | ||
88 | + message: '', | ||
89 | + url: result | ||
90 | + })) | ||
91 | + fileListLen++ | ||
92 | + } | ||
93 | + }, | ||
94 | + uploadFilePromise(url) { | ||
95 | + return new Promise((resolve, reject) => { | ||
96 | + let a = uni.uploadFile({ | ||
97 | + url: this.action, // 仅为示例,非真实的接口地址 | ||
98 | + filePath: url, | ||
99 | + name: 'file', | ||
100 | + formData: { | ||
101 | + user: 'test' | ||
102 | + }, | ||
103 | + success: (res) => { | ||
104 | + setTimeout(() => { | ||
105 | + resolve(JSON.parse(res.data).data.fullurl) | ||
106 | + }, 1000) | ||
107 | + } | ||
108 | + }); | ||
109 | + }) | ||
110 | + }, | ||
111 | + } | ||
112 | + } | ||
113 | +</script> | ||
114 | + | ||
115 | +<style scoped lang="scss"> | ||
116 | + .box { | ||
117 | + border-radius: 20rpx 20rpx 0 0; | ||
118 | + opacity: 1; | ||
119 | + background: #ffffffff; | ||
120 | + } | ||
121 | +</style> |
@@ -101,13 +101,14 @@ | @@ -101,13 +101,14 @@ | ||
101 | title: '加载中' | 101 | title: '加载中' |
102 | }) | 102 | }) |
103 | uni.$u.http.post('/api/sms/send', { | 103 | uni.$u.http.post('/api/sms/send', { |
104 | - event: 'register', | 104 | + event: 'mobilelogin', |
105 | mobile: this.phone | 105 | mobile: this.phone |
106 | }).then(r => { | 106 | }).then(r => { |
107 | uni.hideLoading() | 107 | uni.hideLoading() |
108 | console.log(r); | 108 | console.log(r); |
109 | uni.showToast({ | 109 | uni.showToast({ |
110 | title: r.msg, | 110 | title: r.msg, |
111 | + icon: 'none' | ||
111 | }) | 112 | }) |
112 | if (r.code == 1) { | 113 | if (r.code == 1) { |
113 | 114 | ||
@@ -136,6 +137,7 @@ | @@ -136,6 +137,7 @@ | ||
136 | uni.navigateBack() | 137 | uni.navigateBack() |
137 | }, | 138 | }, |
138 | login() { | 139 | login() { |
140 | + | ||
139 | console.log(this.type); | 141 | console.log(this.type); |
140 | if (!this.phone.length) return uni.showToast({ | 142 | if (!this.phone.length) return uni.showToast({ |
141 | title: '请先输入手机号', | 143 | title: '请先输入手机号', |
@@ -160,34 +162,63 @@ | @@ -160,34 +162,63 @@ | ||
160 | uni.showLoading({ | 162 | uni.showLoading({ |
161 | title: '加载中' | 163 | title: '加载中' |
162 | }) | 164 | }) |
165 | + let that = this | ||
166 | + wx.login({ | ||
167 | + provider: 'weixin', //使用微信登录 | ||
168 | + success(res) { | ||
169 | + console.log(res); | ||
170 | + | ||
171 | + }, | ||
172 | + complete(res) { | ||
173 | + console.log(res); | ||
174 | + uni.$u.http.get(`/api/common/code?code=${res.code}`).then((res) => { | ||
175 | + // console.log(res); | ||
176 | + // uni.hideLoading() | ||
177 | + uni.setStorageSync('token', res.data.token || '') | ||
178 | + uni.setStorageSync('reToken', res.data.token || '') | ||
163 | uni.$u.http.post('/api/user/mobilelogin', { | 179 | uni.$u.http.post('/api/user/mobilelogin', { |
164 | - mobile: this.phone, | ||
165 | - captcha: this.code | 180 | + mobile: that.phone, |
181 | + captcha: that.code | ||
166 | }).then(r => { | 182 | }).then(r => { |
167 | uni.hideLoading() | 183 | uni.hideLoading() |
168 | - console.log(r); | 184 | + // console.log(r); |
185 | + if(r.code == 1){ | ||
186 | + uni.switchTab({ | ||
187 | + url: "/pages/index/buy" | ||
188 | + }) | ||
189 | + }else{ | ||
169 | uni.showToast({ | 190 | uni.showToast({ |
170 | - title:r.msg | 191 | + title:r.msg, |
192 | + icon:'none' | ||
171 | }) | 193 | }) |
172 | - if (r.code == 1) { | 194 | + } |
195 | + | ||
173 | 196 | ||
174 | - // console.log(r); | ||
175 | - uni.setStorageSync('userInfo', r.data.userinfo) | ||
176 | - uni.setStorageSync('token', r.data.userinfo.token) | ||
177 | - uni.removeStorageSync('ScanningId') | ||
178 | - console.log('type:', this.type, '用户信息:', r.data.userinfo); | ||
179 | - if (this.type && r.data.userinfo.authentication != '已认证') { | ||
180 | - uni.reLaunch({ | ||
181 | - url: `/pages/index/index` | ||
182 | }) | 197 | }) |
183 | - } else { | ||
184 | - uni.navigateBack({ | ||
185 | - delta: 2, | 198 | + |
199 | + let ids = uni.getStorageSync('ids') | ||
200 | + uni.$u.http.post('/api/common/add_category_rec', { | ||
201 | + ids: ids | ||
202 | + }).then(res => { | ||
203 | + // console.log(this.flag); | ||
204 | + // if (this.flag == '买') { | ||
205 | + // uni.switchTab({ | ||
206 | + // url: '/pages/index/buy' | ||
207 | + // }) | ||
208 | + // } else { | ||
209 | + // uni.switchTab({ | ||
210 | + // url: '/pages/index/sell' | ||
211 | + // }) | ||
212 | + // } | ||
213 | + }).catch(err => { | ||
214 | + console.log(err); | ||
215 | + }) | ||
216 | + }).catch(err => { | ||
217 | + console.log(err); | ||
186 | }) | 218 | }) |
187 | } | 219 | } |
220 | + }); | ||
188 | 221 | ||
189 | - } | ||
190 | - }) | ||
191 | }, | 222 | }, |
192 | } | 223 | } |
193 | } | 224 | } |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
32 | <view class="" style="color:#E63D27"> | 32 | <view class="" style="color:#E63D27"> |
33 | - {{info.price}}/月 | 33 | + **万/月 |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
36 | <view class="flexBox" style="justify-content: space-evenly;margin-top: 40rpx;"> | 36 | <view class="flexBox" style="justify-content: space-evenly;margin-top: 40rpx;"> |
@@ -122,9 +122,11 @@ | @@ -122,9 +122,11 @@ | ||
122 | <view class="imgbox" v-for="item in info.image_list"> | 122 | <view class="imgbox" v-for="item in info.image_list"> |
123 | <image :src="item" mode="" @click="preImg = true; imgDes = item"></image> | 123 | <image :src="item" mode="" @click="preImg = true; imgDes = item"></image> |
124 | </view> | 124 | </view> |
125 | - <view class="" v-if="info.image_list.length == 0"> | ||
126 | - <u-empty> | ||
127 | - </u-empty> | 125 | + <view class="flexBox" style="justify-content: center; flex-direction: column;" v-if="info.image_list.length == 0"> |
126 | + <image src="../../static/Group@2x.png" mode="" style="width: 200rpx; height: 200rpx;"></image> | ||
127 | + <view class="" style="color: #3a4b63ff;font-size: 20rpx;font-weight: 400;"> | ||
128 | + 车主还没有上传图片~~ | ||
129 | + </view> | ||
128 | </view> | 130 | </view> |
129 | </view> | 131 | </view> |
130 | <p style="color: #000000e6;font-size: 32rpx;font-weight: 500;margin-bottom: 24rpx;">相似设备</p> | 132 | <p style="color: #000000e6;font-size: 32rpx;font-weight: 500;margin-bottom: 24rpx;">相似设备</p> |
1 | <template> | 1 | <template> |
2 | <view style="height: 100vh;"> | 2 | <view style="height: 100vh;"> |
3 | - <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg0.png" style="width: 100%; height:100vh;" mode=""></image> | ||
4 | - <view class="box" style="position: absolute;top:60%; padding: 32rpx;"> | 3 | + <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg0.png" style="width: 100%; height:100vh;" |
4 | + mode=""></image> | ||
5 | + <view class="box" style="position: absolute;top:740rpx; padding: 32rpx;"> | ||
5 | <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm"> | 6 | <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm"> |
6 | <u-form-item label="公司名称" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"> | 7 | <u-form-item label="公司名称" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"> |
7 | - <u--input v-model="model1.userInfo.name" placeholder="请输入" border="none"></u--input> | 8 | + |
9 | + | ||
10 | + <view> | ||
11 | + <u--input v-model="model1.userInfo.name1" @input="inputCorpName" placeholder="请输入公司名称" | ||
12 | + border="none"></u--input> | ||
13 | + </view> | ||
14 | + <!-- --> | ||
15 | + <view class="select_box" v-if="select"> | ||
16 | + <view v-for="item in filterArr" > | ||
17 | + <view class="select_one" @click="mySelect"> | ||
18 | + <rich-text ></rich-text> | ||
19 | + </view> | ||
20 | + </view> | ||
21 | + </view> | ||
8 | </u-form-item> | 22 | </u-form-item> |
9 | - <u-form-item label="主营产品" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> | ||
10 | - <u--input v-model="model1.userInfo.product_ids" placeholder="请输入" border="none"></u--input> | 23 | + <u-form-item label="主营产品" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom @click="goChoose" |
24 | + ref="item1"> | ||
25 | + <u--input v-model="model1.userInfo.name" disabled placeholder="请选择主营产品" disabledColor="#ffffffeb" | ||
26 | + border="none"></u--input> | ||
27 | + <u-icon slot="right" name="arrow-right"></u-icon> | ||
11 | </u-form-item> | 28 | </u-form-item> |
12 | <u-form-item label="联系人" labelWidth="200rpx" prop="userInfo.contract_name" borderBottom ref="item1"> | 29 | <u-form-item label="联系人" labelWidth="200rpx" prop="userInfo.contract_name" borderBottom ref="item1"> |
13 | - <u--input v-model="model1.userInfo.contract_name" placeholder="请输入" border="none"></u--input> | 30 | + <u--input v-model="model1.userInfo.contract_name" placeholder="请输入联系人姓名" border="none"></u--input> |
14 | </u-form-item> | 31 | </u-form-item> |
15 | <u-form-item label="联系电话" labelWidth="200rpx" prop="userInfo.contract_mobile" borderBottom ref="item1"> | 32 | <u-form-item label="联系电话" labelWidth="200rpx" prop="userInfo.contract_mobile" borderBottom ref="item1"> |
16 | - <u--input v-model="model1.userInfo.contract_mobile" placeholder="请输入" border="none"></u--input> | 33 | + <u--input v-model="model1.userInfo.contract_mobile" placeholder="请输入联系人电话" border="none"></u--input> |
17 | </u-form-item> | 34 | </u-form-item> |
18 | </u--form> | 35 | </u--form> |
19 | <view style="margin-top: 40rpx;"> | 36 | <view style="margin-top: 40rpx;"> |
20 | <u-button text="提交" type="primary" @click="submit"></u-button> | 37 | <u-button text="提交" type="primary" @click="submit"></u-button> |
21 | </view> | 38 | </view> |
22 | </view> | 39 | </view> |
40 | + <view class="font"> | ||
41 | + 合作加盟: {{kfPhone}} | ||
42 | + </view> | ||
23 | </view> | 43 | </view> |
24 | </template> | 44 | </template> |
25 | 45 | ||
@@ -27,22 +47,98 @@ | @@ -27,22 +47,98 @@ | ||
27 | export default { | 47 | export default { |
28 | data() { | 48 | data() { |
29 | return { | 49 | return { |
30 | - model1:{ | ||
31 | - userInfo:{ | ||
32 | - | 50 | + isSelect: '', |
51 | + select: false, | ||
52 | + kfPhone:'', | ||
53 | + filterArr: [], | ||
54 | + model1: { | ||
55 | + userInfo: { | ||
56 | + name: '', | ||
57 | + contract_mobile: '' | ||
33 | } | 58 | } |
34 | } | 59 | } |
35 | } | 60 | } |
36 | }, | 61 | }, |
62 | + onShow() { | ||
63 | + let pagearr = getCurrentPages(); //获取应用页面栈 | ||
64 | + let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 | ||
65 | + console.log('option:', currentPage) //获取页面传递的信息 | ||
66 | + this.model1.userInfo.product_ids = currentPage.$vm.category_id || '' | ||
67 | + this.model1.userInfo.name = currentPage.$vm.name || '' | ||
68 | + this.model1.userInfo.contract_mobile = uni.getStorageSync('phone') | ||
69 | + this.kfPhone = uni.getStorageSync('kfphone') | ||
70 | + }, | ||
37 | methods: { | 71 | methods: { |
72 | + // 修改企业名称 | ||
73 | + inputCorpName(e) { | ||
74 | + console.log(e); | ||
75 | + this.isSelect= false | ||
76 | + this.select= true | ||
77 | + let value = e; | ||
78 | + this.model1.userInfo.name1 = value | ||
79 | + this.filterArr= [] | ||
80 | + | ||
81 | + if (value == '') { | ||
82 | + this.filterArr = [] | ||
83 | + } | ||
84 | + // 获取企业 | ||
85 | + this.getCom(value) | ||
86 | + }, | ||
87 | + getCom(value) { | ||
88 | + // 调取企业接口 | ||
89 | + wx.showLoading({ | ||
90 | + title: '加载中', | ||
91 | + }) | ||
92 | + uni.$u.http.post('/manager/common/tianyanchaSearch', { | ||
93 | + word: value | ||
94 | + }).then(r => { | ||
95 | + wx.hideLoading() | ||
96 | + if (r.code == 1) { | ||
97 | + r.data.forEach((item, index) => { | ||
98 | + if (item.name.includes(value)) { | ||
99 | + this.filterArr = [...this.data.filterArr, { | ||
100 | + filter_text: this.join(item.name, value), | ||
101 | + filter_name: item.name, | ||
102 | + filter_id: item.id, | ||
103 | + creditCode: item.creditCode | ||
104 | + }] | ||
105 | + } | ||
106 | + }); | ||
38 | 107 | ||
39 | - submit(){ | ||
40 | - uni.$u.http.post('/api/user/company_join',this.model1.userInfo).then(res => { | 108 | + } |
109 | + }) | ||
110 | + }, | ||
111 | + mySelect(e) { | ||
112 | + console.log(e); | ||
113 | + // 当前选中的值值 | ||
114 | + console.log(e.currentTarget.dataset.name, "9999999999999"); | ||
115 | + this.select=false | ||
116 | + this.isSelect= true //选择了公司 | ||
117 | + this.model1.userInfo.name1 = e.currentTarget.dataset.name | ||
118 | + this.recordCom(e.currentTarget.dataset.name) | ||
119 | + }, | ||
120 | + recordCom(value) { | ||
121 | + uni.$u.http.post('/manager/common/tianyanchaBaseinfo', { | ||
122 | + company_name: value | ||
123 | + }).then(r => { | ||
124 | + if (r.code == 1) { | ||
125 | + console.log('记录成功', r) | ||
126 | + } | ||
127 | + }) | ||
128 | + }, | ||
129 | + goChoose() { | ||
130 | + uni.navigateTo({ | ||
131 | + url: '/pages/subPages/more?val=2' | ||
132 | + }) | ||
133 | + }, | ||
134 | + submit() { | ||
135 | + delete this.model1.userInfo.name1 | ||
136 | + uni.$u.http.post('/api/user/company_join', this.model1.userInfo).then(res => { | ||
41 | uni.showToast({ | 137 | uni.showToast({ |
42 | - title:res.msg, | ||
43 | - icon:'none' | 138 | + title: res.msg, |
139 | + icon: 'none' | ||
44 | }) | 140 | }) |
45 | - if(res.code == 1){ | 141 | + if (res.code == 1) { |
46 | setTimeout(() => { | 142 | setTimeout(() => { |
47 | uni.navigateBack() | 143 | uni.navigateBack() |
48 | }, 1000) | 144 | }, 1000) |
@@ -54,11 +150,52 @@ | @@ -54,11 +150,52 @@ | ||
54 | } | 150 | } |
55 | </script> | 151 | </script> |
56 | 152 | ||
57 | -<style scoped> | ||
58 | -.box{ | 153 | +<style scoped lang="scss"> |
154 | + .select_box { | ||
155 | + background-color: #fff; | ||
156 | + padding: 0 20rpx; | ||
157 | + width: 100%; | ||
158 | + position: absolute; | ||
159 | + right: 0; | ||
160 | + top: 101%; | ||
161 | + z-index: 1; | ||
162 | + overflow: hidden; | ||
163 | + text-align: left; | ||
164 | + animation: myfirst 0.5s; | ||
165 | + font-size: 30rpx; | ||
166 | + } | ||
167 | + | ||
168 | + .select_one { | ||
169 | + padding-left: 20rpx; | ||
170 | + text-align: right; | ||
171 | + width: 100%; | ||
172 | + height: 60rpx; | ||
173 | + position: relative; | ||
174 | + line-height: 60rpx; | ||
175 | + border-bottom: 1px solid #efebeb; | ||
176 | + } | ||
177 | + | ||
178 | + .box { | ||
59 | width: 82vw; | 179 | width: 82vw; |
60 | border-radius: 16rpx; | 180 | border-radius: 16rpx; |
61 | background: #ffffffeb; | 181 | background: #ffffffeb; |
62 | - margin-left:5%; | ||
63 | -} | 182 | + margin-left: 5%; |
183 | + } | ||
184 | + | ||
185 | + .font { | ||
186 | + position: absolute; | ||
187 | + bottom: 66rpx; | ||
188 | + left: 135rpx; | ||
189 | + color: #ffffffff; | ||
190 | + font-size: 40rpx; | ||
191 | + font-weight: 700; | ||
192 | + font-family: "Alibaba PuHuiTi"; | ||
193 | + text-align: center; | ||
194 | + line-height: 44rpx; | ||
195 | + letter-spacing: 0.6rpx; | ||
196 | + } | ||
197 | + | ||
198 | + /deep/ .u-input { | ||
199 | + background: rgb(236, 238, 241) !important; | ||
200 | + } | ||
64 | </style> | 201 | </style> |
static/Frame@2x (1).png
0 → 100644
2.3 KB
static/Group@2x.png
0 → 100644
9.9 KB
static/img-brand@2x.png
0 → 100644
435.7 KB
static/img-zhizhao@2x(1).png
0 → 100644
12.7 KB
static/img-zhizhao@2x.png
0 → 100644
12.2 KB
-
请 注册 或 登录 后发表评论