作者 燕成杰

我的收藏、我的发布

... ... @@ -33,10 +33,17 @@ export const takeBail = (data) => request({url: 'user/user_cert_withdraw_sub',m
export const moneyLog = (page) => request({url: 'user/user_money_log',method: 'post',data:{page}})
// 我的收藏 /api/user/my_fav
export const myFav = (page) => request({url: 'user/my_fav',method: 'post',data:{page}})
export const myFav = (page,pagenum) => request({url: 'user/my_fav',method: 'post',data:{page,pagenum}})
// 我的物品 /api/user/my_product
export const myProduct = (status,page,pagenum) => request({url: 'user/my_product',method: 'post',data:{status,page,pagenum}})
// 删除我的物品 /api/user/product_del
export const delProduct = (product_id) => request({url: 'user/product_del',method: 'post',data:{product_id}})
\ No newline at end of file
export const delProduct = (product_id) => request({url: 'user/product_del',method: 'post',data:{product_id}})
// 个人中心资讯 /api/user/arc_list
export const getCenterList = () => request({url: 'user/arc_list',method: 'post',data:{}})
// 个人中心资讯详情 /api/user/arc_detail
export const arcDetail = (arc_id) => request({url: 'user/arc_detail',method: 'post',data:{arc_id}})
... ...
... ... @@ -23,3 +23,5 @@ export const sendProduct = (data) => request({url: 'product/product_publish',met
// 获取微信授权登录页面 /api/user/getAuthorizeUrl
export const authorization = (redirect_uri) => request({url: 'user/getAuthorizeUrl',method: 'post',data:{redirect_uri}})
// 获取微信用户openid /api/user/getOpenid
export const getOpenid = (code) => request({url: 'user/getOpenid',method: 'post',data:{code}})
\ No newline at end of file
... ...
... ... @@ -152,6 +152,14 @@
"navigationBarTitleText": "意见反馈",
"enablePullDownRefresh":false
}
},
// 个人中心详情
{
"path": "pages/mine/InformationDetails",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh":false
}
}
,{
... ...
... ... @@ -34,8 +34,7 @@
</view>
<view class="btn">
<<<<<<< HEAD
=======
<view class="paybtn" >
<input type="text" placeholder="请输入" v-model="name">
</view>
... ... @@ -58,7 +57,6 @@
</view>
</view>
<view class="btn">
>>>>>>> b13657550df89f042b3116430c8734e3d789d7fc
<view class="paybtn" @click="realAuthentication">
提交
</view>
... ...
... ... @@ -160,7 +160,7 @@
import Botton from "@/components/Botton.vue"
import {sortList,product_detail} from '@/api/index'
import {toa} from '@/utils/toast.js'
import { getCategory,sendProduct,getLastInfo,payGuarantee,authorization } from '@/api/send'
import { getCategory,sendProduct,getLastInfo,payGuarantee,authorization ,getOpenid} from '@/api/send'
export default {
name:'send',
components: {
... ... @@ -187,7 +187,8 @@
seller_mobile:'', // string 否 手机号
package_add:'', // string 是 钱包地址
wechat_num:'', // string 是 微信号
}
},
code:''
}
},
onLoad(e) {
... ... @@ -195,13 +196,32 @@
this.form.product_id = e.id
this.getDetail()
}
this.code = e.code || ''
this.getLastInfo()
this.sortList()
if(this.code){
this.getOpenid()
}
},
onShow() {
},
methods: {
// 获取openid
async getOpenid(){
try {
const res = await getOpenid(this.code)
console.log('getOpenid', res)
// 保存数据
} catch (err) {
uni.showModal({
content: '1516',
showCancel: false
});
uni.showToast({ title:err,icon:'none' })
console.log('getOpenid', err)
}
},
// 获取详情
async getDetail(){
try {
... ...
<template>
<view class="">
<rich-text :nodes="content"></rich-text>
</view>
</template>
<script>
import { arcDetail } from '@/api/mine.js'
export default {
data() {
return {
id: '',
content:''
}
},
onLoad(e) {
this.id = e.id
this.arcDetail()
},
methods: {
async arcDetail(){
try {
const res = await arcDetail(this.id)
this.content = res.detail.content
uni.setNavigationBarTitle({
title: res.detail.title
})
console.log('arcDetail', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
console.log('arcDetail', err)
}
},
},
}
</script>
<style>
</style>
... ...
... ... @@ -52,9 +52,13 @@
<view class="botBox">
<view class="title">更多服务</view>
<view class="group">
<view class="item" v-for="(item,idx) in serviceList" :key="idx" @click="openService(idx)">
<view class="item" v-for="(item,idx) in serviceList" :key="idx+'j'" @click="openService(idx)">
<image :src="`/static/bot${idx+1}.png`" mode=""></image>
{{item.name}}
</view>
<view class="item" v-for="(item,idx) in botList" :key="item.id" @click="toBotDetail(item.id)">
<image :src="item.image_preview" mode=""></image>
{{item.title}}
</view>
</view>
</view>
... ... @@ -81,7 +85,7 @@
<script>
import Botton from "@/components/Botton.vue"
import {toa} from '@/utils/toast.js'
import { getUserInfo,logotLogin,getContactQrcode } from '@/api/mine.js'
import { getUserInfo,logotLogin,getContactQrcode,getCenterList } from '@/api/mine.js'
export default {
components: {
... ... @@ -93,12 +97,9 @@
{name:'联系客服'},
{name:'品牌入驻'},
{name:'意见反馈'},
{name:'常见问题'},
{name:'我的任务'},
{name:'我的点赞'},
{name:'历史记录'},
{name:'常用地址'},
{name:'常见问题'}
],
botList:[],
showService:false,
Service:0 ,// 是否是联系客服
token:'',
... ... @@ -114,10 +115,22 @@
this.userInfo = uni.getStorageSync('userInfo') || ''
if(this.token){
this.getUserInfo()
this.getCenterList()
}
},
methods: {
async getCenterList(){
try {
const res = await getCenterList()
this.botList = res.list
console.log('getCenterList', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
console.log('getCenterList', err)
}
},
goLogin(){
uni.navigateTo({
url:'/pages/login/login'
... ... @@ -130,6 +143,11 @@
})
}
},
toBotDetail(id){
uni.navigateTo({
url:'/pages/mine/InformationDetails?id='+id
})
},
async confirmCancel(){
try {
const res = await logotLogin()
... ...
<template>
<view>
<view class="misslist">
<u-empty
marginTop="251"
mode="list"
text="暂无收藏"
v-if="!list.length"
>
</u-empty>
<view class="misslist" v-if="list.length">
<custom-waterfalls-flow :value="list" :columnSpace="1.5" :seat="2" @edit="edit" @del="del"
@wapperClick="wapperClick" @imageClick="wapperClick">
<template v-slot:default="item">
<view class="item">
<view class="title">{{item.title}}</view>
<view class="desc">{{item.desc}}</view>
<view class="title">{{item.name}}</view>
<view class="desc">{{item.sort.name}}</view>
<view class="desc flexA">
张三
{{item.seller_name}}
<view class="money">
<text style="font-size: 20rpx;">¥</text>120
</view>
... ... @@ -17,6 +24,7 @@
</template>
</custom-waterfalls-flow>
</view>
</view>
</template>
... ... @@ -33,43 +41,26 @@
}, {
name: '已售出'
}],
list: [{
image: 'https://via.placeholder.com/200x500.png/ff0000',
title: '比特币',
desc: '所属分类:1 文博收藏品'
}, {
image: 'https://via.placeholder.com/200x300.png/9400D3',
title: '我是标题4',
desc: '描述描述描述描述描述描述描述描述4'
},
{
image: 'https://via.placeholder.com/100x240.png/B0E0E6',
title: '我是标题5',
desc: '描述描述描述描述描述描述描述描述5'
},
{
image: 'https://via.placeholder.com/140x280.png/7FFFAA',
title: '我是标题6',
desc: '描述描述描述描述描述描述描述描述6'
},
{
image: 'https://via.placeholder.com/40x60.png/EEE8AA',
title: '我是标题7',
desc: '描述描述描述描述描述描述描述描述7'
}
],
list: [],
page:1,
num:10,
lastPage:1
}
},
onLoad() {
onShow() {
this.page = 1
this.list= [ ]
this.myFav()
},
methods: {
async myFav(){
try {
const res = await myFav(this.page)
const res = await myFav(this.page,this.num)
console.log('myFav', res)
res.list.data.forEach(it=>{
it.image = it.images_preview[0]
})
this.list = this.list.concat( res.list.data)
this.lastPage= res.list.last_page
// 保存数据
} catch (err) {
... ... @@ -84,15 +75,18 @@
console.log('del', e);
},
wapperClick(item) {
uni.navigateTo({
url:'/pages/index/detail?id='+item.id
})
console.log('单项点击事件', item)
}
},
// 触底触发
onReachBottom() {
// if(that.page >= that.lastPage) return
// that.page=that.page+1
// this.getForum()
this.list = this.list.concat(this.list)
if(this.page >= this.lastPage) return
this.page=this.page+1
this.myFav()
// this.list = this.list.concat(this.list)
},
}
</script>
... ...
... ... @@ -144,8 +144,8 @@
},
// 触底触发
onReachBottom() {
if(that.page >= that.lastPage) return
that.page=that.page+1
if(this.page >= this.lastPage) return
this.page=this.page+1
this.myProduct()
// this.getForum()
// this.list = this.list.concat(this.list)
... ...