正在显示
9 个修改的文件
包含
139 行增加
和
52 行删除
@@ -33,10 +33,17 @@ export const takeBail = (data) => request({url: 'user/user_cert_withdraw_sub',m | @@ -33,10 +33,17 @@ export const takeBail = (data) => request({url: 'user/user_cert_withdraw_sub',m | ||
33 | export const moneyLog = (page) => request({url: 'user/user_money_log',method: 'post',data:{page}}) | 33 | export const moneyLog = (page) => request({url: 'user/user_money_log',method: 'post',data:{page}}) |
34 | 34 | ||
35 | // 我的收藏 /api/user/my_fav | 35 | // 我的收藏 /api/user/my_fav |
36 | -export const myFav = (page) => request({url: 'user/my_fav',method: 'post',data:{page}}) | 36 | +export const myFav = (page,pagenum) => request({url: 'user/my_fav',method: 'post',data:{page,pagenum}}) |
37 | 37 | ||
38 | // 我的物品 /api/user/my_product | 38 | // 我的物品 /api/user/my_product |
39 | export const myProduct = (status,page,pagenum) => request({url: 'user/my_product',method: 'post',data:{status,page,pagenum}}) | 39 | export const myProduct = (status,page,pagenum) => request({url: 'user/my_product',method: 'post',data:{status,page,pagenum}}) |
40 | 40 | ||
41 | // 删除我的物品 /api/user/product_del | 41 | // 删除我的物品 /api/user/product_del |
42 | -export const delProduct = (product_id) => request({url: 'user/product_del',method: 'post',data:{product_id}}) | ||
42 | +export const delProduct = (product_id) => request({url: 'user/product_del',method: 'post',data:{product_id}}) | ||
43 | + | ||
44 | +// 个人中心资讯 /api/user/arc_list | ||
45 | +export const getCenterList = () => request({url: 'user/arc_list',method: 'post',data:{}}) | ||
46 | + | ||
47 | +// 个人中心资讯详情 /api/user/arc_detail | ||
48 | +export const arcDetail = (arc_id) => request({url: 'user/arc_detail',method: 'post',data:{arc_id}}) | ||
49 | + |
@@ -23,3 +23,5 @@ export const sendProduct = (data) => request({url: 'product/product_publish',met | @@ -23,3 +23,5 @@ export const sendProduct = (data) => request({url: 'product/product_publish',met | ||
23 | // 获取微信授权登录页面 /api/user/getAuthorizeUrl | 23 | // 获取微信授权登录页面 /api/user/getAuthorizeUrl |
24 | export const authorization = (redirect_uri) => request({url: 'user/getAuthorizeUrl',method: 'post',data:{redirect_uri}}) | 24 | export const authorization = (redirect_uri) => request({url: 'user/getAuthorizeUrl',method: 'post',data:{redirect_uri}}) |
25 | 25 | ||
26 | +// 获取微信用户openid /api/user/getOpenid | ||
27 | +export const getOpenid = (code) => request({url: 'user/getOpenid',method: 'post',data:{code}}) |
@@ -152,6 +152,14 @@ | @@ -152,6 +152,14 @@ | ||
152 | "navigationBarTitleText": "意见反馈", | 152 | "navigationBarTitleText": "意见反馈", |
153 | "enablePullDownRefresh":false | 153 | "enablePullDownRefresh":false |
154 | } | 154 | } |
155 | + }, | ||
156 | + // 个人中心详情 | ||
157 | + { | ||
158 | + "path": "pages/mine/InformationDetails", | ||
159 | + "style": { | ||
160 | + "navigationBarTitleText": "", | ||
161 | + "enablePullDownRefresh":false | ||
162 | + } | ||
155 | } | 163 | } |
156 | 164 | ||
157 | ,{ | 165 | ,{ |
@@ -34,8 +34,7 @@ | @@ -34,8 +34,7 @@ | ||
34 | </view> | 34 | </view> |
35 | 35 | ||
36 | <view class="btn"> | 36 | <view class="btn"> |
37 | -<<<<<<< HEAD | ||
38 | -======= | 37 | + |
39 | <view class="paybtn" > | 38 | <view class="paybtn" > |
40 | <input type="text" placeholder="请输入" v-model="name"> | 39 | <input type="text" placeholder="请输入" v-model="name"> |
41 | </view> | 40 | </view> |
@@ -58,7 +57,6 @@ | @@ -58,7 +57,6 @@ | ||
58 | </view> | 57 | </view> |
59 | </view> | 58 | </view> |
60 | <view class="btn"> | 59 | <view class="btn"> |
61 | ->>>>>>> b13657550df89f042b3116430c8734e3d789d7fc | ||
62 | <view class="paybtn" @click="realAuthentication"> | 60 | <view class="paybtn" @click="realAuthentication"> |
63 | 提交 | 61 | 提交 |
64 | </view> | 62 | </view> |
@@ -160,7 +160,7 @@ | @@ -160,7 +160,7 @@ | ||
160 | import Botton from "@/components/Botton.vue" | 160 | import Botton from "@/components/Botton.vue" |
161 | import {sortList,product_detail} from '@/api/index' | 161 | import {sortList,product_detail} from '@/api/index' |
162 | import {toa} from '@/utils/toast.js' | 162 | import {toa} from '@/utils/toast.js' |
163 | - import { getCategory,sendProduct,getLastInfo,payGuarantee,authorization } from '@/api/send' | 163 | + import { getCategory,sendProduct,getLastInfo,payGuarantee,authorization ,getOpenid} from '@/api/send' |
164 | export default { | 164 | export default { |
165 | name:'send', | 165 | name:'send', |
166 | components: { | 166 | components: { |
@@ -187,7 +187,8 @@ | @@ -187,7 +187,8 @@ | ||
187 | seller_mobile:'', // string 否 手机号 | 187 | seller_mobile:'', // string 否 手机号 |
188 | package_add:'', // string 是 钱包地址 | 188 | package_add:'', // string 是 钱包地址 |
189 | wechat_num:'', // string 是 微信号 | 189 | wechat_num:'', // string 是 微信号 |
190 | - } | 190 | + }, |
191 | + code:'' | ||
191 | } | 192 | } |
192 | }, | 193 | }, |
193 | onLoad(e) { | 194 | onLoad(e) { |
@@ -195,13 +196,32 @@ | @@ -195,13 +196,32 @@ | ||
195 | this.form.product_id = e.id | 196 | this.form.product_id = e.id |
196 | this.getDetail() | 197 | this.getDetail() |
197 | } | 198 | } |
199 | + this.code = e.code || '' | ||
198 | this.getLastInfo() | 200 | this.getLastInfo() |
199 | this.sortList() | 201 | this.sortList() |
200 | - | 202 | + if(this.code){ |
203 | + this.getOpenid() | ||
204 | + } | ||
205 | + | ||
201 | }, | 206 | }, |
202 | onShow() { | 207 | onShow() { |
203 | }, | 208 | }, |
204 | methods: { | 209 | methods: { |
210 | + // 获取openid | ||
211 | + async getOpenid(){ | ||
212 | + try { | ||
213 | + const res = await getOpenid(this.code) | ||
214 | + console.log('getOpenid', res) | ||
215 | + // 保存数据 | ||
216 | + } catch (err) { | ||
217 | + uni.showModal({ | ||
218 | + content: '1516', | ||
219 | + showCancel: false | ||
220 | + }); | ||
221 | + uni.showToast({ title:err,icon:'none' }) | ||
222 | + console.log('getOpenid', err) | ||
223 | + } | ||
224 | + }, | ||
205 | // 获取详情 | 225 | // 获取详情 |
206 | async getDetail(){ | 226 | async getDetail(){ |
207 | try { | 227 | try { |
pages/mine/InformationDetails.vue
0 → 100644
1 | +<template> | ||
2 | + <view class=""> | ||
3 | + <rich-text :nodes="content"></rich-text> | ||
4 | + </view> | ||
5 | +</template> | ||
6 | + | ||
7 | +<script> | ||
8 | + import { arcDetail } from '@/api/mine.js' | ||
9 | + export default { | ||
10 | + data() { | ||
11 | + return { | ||
12 | + id: '', | ||
13 | + content:'' | ||
14 | + } | ||
15 | + }, | ||
16 | + onLoad(e) { | ||
17 | + this.id = e.id | ||
18 | + this.arcDetail() | ||
19 | + }, | ||
20 | + methods: { | ||
21 | + async arcDetail(){ | ||
22 | + try { | ||
23 | + const res = await arcDetail(this.id) | ||
24 | + this.content = res.detail.content | ||
25 | + uni.setNavigationBarTitle({ | ||
26 | + title: res.detail.title | ||
27 | + }) | ||
28 | + console.log('arcDetail', res) | ||
29 | + // 保存数据 | ||
30 | + } catch (err) { | ||
31 | + uni.showToast({ title:err,icon:'none' }) | ||
32 | + console.log('arcDetail', err) | ||
33 | + } | ||
34 | + }, | ||
35 | + }, | ||
36 | + } | ||
37 | +</script> | ||
38 | + | ||
39 | +<style> | ||
40 | +</style> |
@@ -52,9 +52,13 @@ | @@ -52,9 +52,13 @@ | ||
52 | <view class="botBox"> | 52 | <view class="botBox"> |
53 | <view class="title">更多服务</view> | 53 | <view class="title">更多服务</view> |
54 | <view class="group"> | 54 | <view class="group"> |
55 | - <view class="item" v-for="(item,idx) in serviceList" :key="idx" @click="openService(idx)"> | 55 | + <view class="item" v-for="(item,idx) in serviceList" :key="idx+'j'" @click="openService(idx)"> |
56 | <image :src="`/static/bot${idx+1}.png`" mode=""></image> | 56 | <image :src="`/static/bot${idx+1}.png`" mode=""></image> |
57 | {{item.name}} | 57 | {{item.name}} |
58 | + </view> | ||
59 | + <view class="item" v-for="(item,idx) in botList" :key="item.id" @click="toBotDetail(item.id)"> | ||
60 | + <image :src="item.image_preview" mode=""></image> | ||
61 | + {{item.title}} | ||
58 | </view> | 62 | </view> |
59 | </view> | 63 | </view> |
60 | </view> | 64 | </view> |
@@ -81,7 +85,7 @@ | @@ -81,7 +85,7 @@ | ||
81 | <script> | 85 | <script> |
82 | import Botton from "@/components/Botton.vue" | 86 | import Botton from "@/components/Botton.vue" |
83 | import {toa} from '@/utils/toast.js' | 87 | import {toa} from '@/utils/toast.js' |
84 | - import { getUserInfo,logotLogin,getContactQrcode } from '@/api/mine.js' | 88 | + import { getUserInfo,logotLogin,getContactQrcode,getCenterList } from '@/api/mine.js' |
85 | 89 | ||
86 | export default { | 90 | export default { |
87 | components: { | 91 | components: { |
@@ -93,12 +97,9 @@ | @@ -93,12 +97,9 @@ | ||
93 | {name:'联系客服'}, | 97 | {name:'联系客服'}, |
94 | {name:'品牌入驻'}, | 98 | {name:'品牌入驻'}, |
95 | {name:'意见反馈'}, | 99 | {name:'意见反馈'}, |
96 | - {name:'常见问题'}, | ||
97 | - {name:'我的任务'}, | ||
98 | - {name:'我的点赞'}, | ||
99 | - {name:'历史记录'}, | ||
100 | - {name:'常用地址'}, | 100 | + {name:'常见问题'} |
101 | ], | 101 | ], |
102 | + botList:[], | ||
102 | showService:false, | 103 | showService:false, |
103 | Service:0 ,// 是否是联系客服 | 104 | Service:0 ,// 是否是联系客服 |
104 | token:'', | 105 | token:'', |
@@ -114,10 +115,22 @@ | @@ -114,10 +115,22 @@ | ||
114 | this.userInfo = uni.getStorageSync('userInfo') || '' | 115 | this.userInfo = uni.getStorageSync('userInfo') || '' |
115 | if(this.token){ | 116 | if(this.token){ |
116 | this.getUserInfo() | 117 | this.getUserInfo() |
118 | + this.getCenterList() | ||
117 | } | 119 | } |
118 | 120 | ||
119 | }, | 121 | }, |
120 | methods: { | 122 | methods: { |
123 | + async getCenterList(){ | ||
124 | + try { | ||
125 | + const res = await getCenterList() | ||
126 | + this.botList = res.list | ||
127 | + console.log('getCenterList', res) | ||
128 | + // 保存数据 | ||
129 | + } catch (err) { | ||
130 | + uni.showToast({ title:err,icon:'none' }) | ||
131 | + console.log('getCenterList', err) | ||
132 | + } | ||
133 | + }, | ||
121 | goLogin(){ | 134 | goLogin(){ |
122 | uni.navigateTo({ | 135 | uni.navigateTo({ |
123 | url:'/pages/login/login' | 136 | url:'/pages/login/login' |
@@ -130,6 +143,11 @@ | @@ -130,6 +143,11 @@ | ||
130 | }) | 143 | }) |
131 | } | 144 | } |
132 | }, | 145 | }, |
146 | + toBotDetail(id){ | ||
147 | + uni.navigateTo({ | ||
148 | + url:'/pages/mine/InformationDetails?id='+id | ||
149 | + }) | ||
150 | + }, | ||
133 | async confirmCancel(){ | 151 | async confirmCancel(){ |
134 | try { | 152 | try { |
135 | const res = await logotLogin() | 153 | const res = await logotLogin() |
1 | <template> | 1 | <template> |
2 | <view> | 2 | <view> |
3 | - <view class="misslist"> | 3 | + <u-empty |
4 | + marginTop="251" | ||
5 | + mode="list" | ||
6 | + text="暂无收藏" | ||
7 | + v-if="!list.length" | ||
8 | + > | ||
9 | + </u-empty> | ||
10 | + <view class="misslist" v-if="list.length"> | ||
4 | <custom-waterfalls-flow :value="list" :columnSpace="1.5" :seat="2" @edit="edit" @del="del" | 11 | <custom-waterfalls-flow :value="list" :columnSpace="1.5" :seat="2" @edit="edit" @del="del" |
5 | @wapperClick="wapperClick" @imageClick="wapperClick"> | 12 | @wapperClick="wapperClick" @imageClick="wapperClick"> |
6 | <template v-slot:default="item"> | 13 | <template v-slot:default="item"> |
7 | <view class="item"> | 14 | <view class="item"> |
8 | - <view class="title">{{item.title}}</view> | ||
9 | - <view class="desc">{{item.desc}}</view> | 15 | + <view class="title">{{item.name}}</view> |
16 | + <view class="desc">{{item.sort.name}}</view> | ||
10 | <view class="desc flexA"> | 17 | <view class="desc flexA"> |
11 | - 张三 | 18 | + {{item.seller_name}} |
12 | <view class="money"> | 19 | <view class="money"> |
13 | <text style="font-size: 20rpx;">¥</text>120 | 20 | <text style="font-size: 20rpx;">¥</text>120 |
14 | </view> | 21 | </view> |
@@ -17,6 +24,7 @@ | @@ -17,6 +24,7 @@ | ||
17 | </template> | 24 | </template> |
18 | </custom-waterfalls-flow> | 25 | </custom-waterfalls-flow> |
19 | </view> | 26 | </view> |
27 | + | ||
20 | </view> | 28 | </view> |
21 | </template> | 29 | </template> |
22 | 30 | ||
@@ -33,43 +41,26 @@ | @@ -33,43 +41,26 @@ | ||
33 | }, { | 41 | }, { |
34 | name: '已售出' | 42 | name: '已售出' |
35 | }], | 43 | }], |
36 | - list: [{ | ||
37 | - image: 'https://via.placeholder.com/200x500.png/ff0000', | ||
38 | - title: '比特币', | ||
39 | - desc: '所属分类:1 文博收藏品' | ||
40 | - }, { | ||
41 | - image: 'https://via.placeholder.com/200x300.png/9400D3', | ||
42 | - title: '我是标题4', | ||
43 | - desc: '描述描述描述描述描述描述描述描述4' | ||
44 | - }, | ||
45 | - { | ||
46 | - image: 'https://via.placeholder.com/100x240.png/B0E0E6', | ||
47 | - title: '我是标题5', | ||
48 | - desc: '描述描述描述描述描述描述描述描述5' | ||
49 | - }, | ||
50 | - { | ||
51 | - image: 'https://via.placeholder.com/140x280.png/7FFFAA', | ||
52 | - title: '我是标题6', | ||
53 | - desc: '描述描述描述描述描述描述描述描述6' | ||
54 | - }, | ||
55 | - { | ||
56 | - image: 'https://via.placeholder.com/40x60.png/EEE8AA', | ||
57 | - title: '我是标题7', | ||
58 | - desc: '描述描述描述描述描述描述描述描述7' | ||
59 | - } | ||
60 | - ], | 44 | + list: [], |
61 | page:1, | 45 | page:1, |
46 | + num:10, | ||
62 | lastPage:1 | 47 | lastPage:1 |
63 | } | 48 | } |
64 | }, | 49 | }, |
65 | - onLoad() { | 50 | + onShow() { |
51 | + this.page = 1 | ||
52 | + this.list= [ ] | ||
66 | this.myFav() | 53 | this.myFav() |
67 | }, | 54 | }, |
68 | methods: { | 55 | methods: { |
69 | async myFav(){ | 56 | async myFav(){ |
70 | try { | 57 | try { |
71 | - const res = await myFav(this.page) | 58 | + const res = await myFav(this.page,this.num) |
72 | console.log('myFav', res) | 59 | console.log('myFav', res) |
60 | + res.list.data.forEach(it=>{ | ||
61 | + it.image = it.images_preview[0] | ||
62 | + }) | ||
63 | + this.list = this.list.concat( res.list.data) | ||
73 | this.lastPage= res.list.last_page | 64 | this.lastPage= res.list.last_page |
74 | // 保存数据 | 65 | // 保存数据 |
75 | } catch (err) { | 66 | } catch (err) { |
@@ -84,15 +75,18 @@ | @@ -84,15 +75,18 @@ | ||
84 | console.log('del', e); | 75 | console.log('del', e); |
85 | }, | 76 | }, |
86 | wapperClick(item) { | 77 | wapperClick(item) { |
78 | + uni.navigateTo({ | ||
79 | + url:'/pages/index/detail?id='+item.id | ||
80 | + }) | ||
87 | console.log('单项点击事件', item) | 81 | console.log('单项点击事件', item) |
88 | } | 82 | } |
89 | }, | 83 | }, |
90 | // 触底触发 | 84 | // 触底触发 |
91 | onReachBottom() { | 85 | onReachBottom() { |
92 | - // if(that.page >= that.lastPage) return | ||
93 | - // that.page=that.page+1 | ||
94 | - // this.getForum() | ||
95 | - this.list = this.list.concat(this.list) | 86 | + if(this.page >= this.lastPage) return |
87 | + this.page=this.page+1 | ||
88 | + this.myFav() | ||
89 | + // this.list = this.list.concat(this.list) | ||
96 | }, | 90 | }, |
97 | } | 91 | } |
98 | </script> | 92 | </script> |
@@ -144,8 +144,8 @@ | @@ -144,8 +144,8 @@ | ||
144 | }, | 144 | }, |
145 | // 触底触发 | 145 | // 触底触发 |
146 | onReachBottom() { | 146 | onReachBottom() { |
147 | - if(that.page >= that.lastPage) return | ||
148 | - that.page=that.page+1 | 147 | + if(this.page >= this.lastPage) return |
148 | + this.page=this.page+1 | ||
149 | this.myProduct() | 149 | this.myProduct() |
150 | // this.getForum() | 150 | // this.getForum() |
151 | // this.list = this.list.concat(this.list) | 151 | // this.list = this.list.concat(this.list) |
-
请 注册 或 登录 后发表评论