Merge branch 'dev' into chenxuelian

This commit is contained in:
”chenxuelian“
2022-12-24 16:44:22 +08:00
25 changed files with 410 additions and 43 deletions

View File

@@ -1,8 +1,7 @@
<template>
<view class="my_avatar">
<view style="border: 1px solid #EEEEEE;border-radius: 50rpx;">
<u--image :src="avatar" width="100rpx" height="100rpx" shape="circle">
</u--image>
<u-avatar :src="avatar" size="100rpx" shape="circle"></u-avatar>
</view>
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
<u--image v-if="show==false" :src="normal" width="84rpx" height="30rpx">
@@ -10,20 +9,46 @@
<u--image v-else :src="VIP" width="84rpx" height="30rpx">
</u--image>
</view>
<text>顾发航</text>
<view style="display: flex;align-items: center;">
<text style="margin-right: 8rpx;">顾发航</text>
<u--image v-if="showEdit==true" src="/static/my/wd_icon_bj.png" width="22rpx" height="22rpx"
@click="changeAvatar()">
</u--image>
</view>
</view>
</template>
<script>
export default {
name: "myAvatar",
props: {
center: {
type: String,
default: ''
}
},
data() {
return {
show: false,
avatar: '/static/my/avatar.png',
showEdit: true,
avatar: 'https://cdn.uviewui.com/uview/album/2.jpg',
normal: '/static/my/wo_icon_pthy.png',
VIP: '/static/my/wo_icon_vip.png',
};
},
created() {
if (this.center != false) {
this.showEdit = false
}
},
methods: {
//修改头像
changeAvatar() {
uni.navigateTo({
url: '../../packageMy/changeAvatar/changeAvatar'
})
}
}
}
</script>

View File

@@ -16,10 +16,15 @@
<script>
export default {
name: "form",
name: "myForm",
data() {
return {
model: {
userInfo: {
name: '',
phone: '',
},
},
};
}
}

View File

@@ -12,7 +12,7 @@
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 16rpx;">
<view style="padding: 14rpx 22rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
@@ -22,7 +22,7 @@
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
<u-image src="/static/products/xp_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>

View File

@@ -50,7 +50,7 @@
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wx4c2099a19c69664f",
"appid": "wx8da30ba464a770ba",
"setting": {
"urlCheck": false,
"es6": false,

View File

@@ -22,7 +22,7 @@
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
<u-image src="/static/products/xp_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>

View File

@@ -0,0 +1,83 @@
<template>
<view>
<view class="change_avatar">
<u-avatar :src="avatar" size="140rpx" shape="circle" @click="changeAvatar()"></u-avatar>
</view>
<view>
<u--form labelPosition="left" :model="model">
<u-form-item label="修改昵称" prop="userInfo.name" borderBottom>
<u--input v-model="model.userInfo.name" border="none" placeholder="请输入您的昵称"
placeholderStyle="color: #CCCCCC;font-size: 24rpx;"></u--input>
</u-form-item>
</u--form>
<u-button type="success" text="确定" color="#0EBB5B"></u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
avatar: 'https://cdn.uviewui.com/uview/album/2.jpg',
model: {
userInfo: {
name: ''
},
},
}
},
methods: {
//修改头像
changeAvatar() {
uni.chooseImage({ // 从本地相册选择图片或使用相机拍照。
count: 1, //默认选择1张图片
sizeType: ['original', 'compressed'], //original 原图compressed 压缩图,默认二者都有
success: (res) => {
console.log(res.tempFilePaths[0]); //成功则返回图片的本地文件路径列表 tempFilePaths
this.avatar = res.tempFilePaths[0] //更新本地浏览头像图片
// this.update(res.tempFilePaths[0]) //上传图片
}
});
},
update(filePath) {
const _this = this
const token = uni.getStorageSync('token')
const res = uni.uploadFile({
url: _this.action, //仅为示例,非真实的接口地址
filePath: filePath,
name: 'file',
header: {
'Authorization': token
},
success: (res) => {
// console.log(JSON.parse(res.data).data) 处理格式
this.weChatRegister({
headimg: REQUEST_BASE_URL + '/' + JSON.parse(res.data).data
}) //将真实图片地址请求给后端做修改
}
});
},
}
}
</script>
<style lang="scss">
.change_avatar {
display: flex;
justify-content: center;
align-items: center;
margin: 60rpx 0;
}
.u-button {
width: 644rpx !important;
height: 86rpx !important;
background: #0EBB5B;
border-radius: 20rpx !important;
margin-top: 230rpx;
}
</style>

View File

@@ -3,7 +3,7 @@
<u-navbar :autoBack="true" title="会员中心"></u-navbar>
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
</u--image>
<myAvatar></myAvatar>
<myAvatar :center="show"></myAvatar>
<myForm></myForm>
<view class="commitment">
{{commitment}}
@@ -21,6 +21,8 @@
data() {
return {
showM: false,
//会员中心的用户名旁边不显示edit图标
show: false,
content: `请保持手机畅通<br>
客服会及时联系您`,
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'

View File

@@ -0,0 +1,146 @@
<template>
<view>
<view>
<u-tabs :list="tabsList" :scrollable="false" lineColor="#0A994A" color="#969696"
activeStyle="color:#15CA65;font-weight: bold;" :current="tabCurrent" @change="tabChange"></u-tabs>
</view>
<view v-if="tabCurrent == 0" style="background-color: #fff;">
<view v-for="(item,index) in needsList" :key="index" class="my_line"
style="padding: 24rpx 19rpx;border-bottom: 1px solid #EEEEEE;">
<text class="needs_text">{{item.needsText}}</text>
<view class="time_line">
<view class="release_time">
<text>{{item.time}}</text>
</view>
<view class="btn">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
</view>
</view>
</view>
</view>
<view v-if="tabCurrent == 1" style="background-color: #fff;">
<view v-for="(item,index) in ideasList" :key="index" class="my_line"
style="padding: 24rpx 19rpx; border-bottom: 1px solid #EEEEEE;">
<text class="needs_text">{{item.needsText}}</text>
<view class="time_line">
<view class="release_time">
<text>{{item.time}}</text>
</view>
<view class="btn">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabCurrent: 0,
tabsList: [{
name: '需求发布'
}, {
name: '创意发布'
}],
needsList: [{
needsText: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
time: '2022-12-03 09:59',
}, {
needsText: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
time: '2022-12-03 09:59',
}, ],
ideasList: [{
needsText: '产品名称产品名称产品名称',
time: '2022-12-03 09:59',
},
{
needsText: '产品名称产品名称产品名称',
time: '2022-12-03 09:59',
},
]
}
},
methods: {
tabChange(data) {
this.tabCurrent = data.index
this.needsPublishForm = {}
},
}
}
</script>
<style lang="scss">
.u-tabs {
margin-bottom: 10rpx;
.u-tabs__wrapper__nav {
background-color: #FFFFFF;
.u-tabs__wrapper__nav__item {
padding: 0 !important;
flex: 1;
}
}
}
.my_line:last-child {
border: none !important;
}
.needs_text {
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3E3E3E;
line-height: 42rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.time_line {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 14rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.release_time {
color: #969696;
}
.btn {
display: flex;
align-items: center;
justify-content: center;
.u-icon__icon {
top: 1px !important;
}
.btn_text {
color: #15CA65;
}
}
}
</style>

View File

@@ -83,6 +83,22 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
"path": "myRelease/myRelease",
"style": {
"navigationBarTitleText": "我的发布",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
}, {
"path": "changeAvatar/changeAvatar",
"style": {
"navigationBarTitleText": "修改头像",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
}]
},
{

View File

@@ -1,13 +1,20 @@
<template>
<view>
<view v-for="(item,index) in detailList" :key="index">
<u-swiper :list="swiperList" indicatorMode="line " width="750rpx" height="530rpx" radius="0" circular>
</u-swiper>
<view class="collect">
<u-icon :name="like?'heart-fill':'heart'" color="#FEAA19" size="23" @click.stop="likeTap"></u-icon>
<view class="collect_text">收藏</view>
<view class="star">
<u-image v-if="showStar==false" src="/static/detail/xp_icon_wstar.png" width="28rpx" height="28rpx"
@click="starTap">
</u-image>
<u-image v-if="showStar==true" src="/static/detail/xp_icon_star.png" width="28rpx" height="28rpx"
@click="starTap">
</u-image>
</view>
<u-image src="/static/detail/xiangqing_icon_shoucang.png" width="119rpx" height="48rpx">
</u-image>
</view>
<view class="content">
@@ -21,12 +28,30 @@
<view class="classify">
{{item.classify}}
</view>
<view class="tagOne">{{item.tagOne}}</view>
<view class="tagTwo">{{item.tagTwo}}</view>
<view class="tag_view">
<view>
<text class="tagOne">{{item.tagOne}}</text>
<text class="tagTwo">{{item.tagTwo}}</text>
</view>
<view v-if="isThumb==false" class="heart">
<u-image v-if="showHeart==false" src="/static/detail/xp_icon_heart.png" width="34rpx"
height="32rpx" @click="heartTap">
</u-image>
<u-image v-if="showHeart==true" src="/static/detail/xp_icon_ysc.png" width="34rpx"
height="32rpx" @click="heartTap">
</u-image>
<text class="thumb">点赞</text>
</view>
<view v-if="isThumb==true" class="heart">
<u-image src="/static/detail/xp_icon_ysc.png" width="34rpx" height="32rpx" @click="heartTap">
</u-image>
<text class="thumb">122</text>
</view>
</view>
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="24rpx" height="24rpx" :lazy-load="true">
<u-image src="/static/products/xp_icon_sjf.png" width="24rpx" height="24rpx">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
@@ -41,14 +66,15 @@
export default {
data() {
return {
like: false,
showStar: false,
showHeart: false,
isThumb: true,
detailList: [{
// src: '/static/detail/zhanwei_xppx.png',
title: '锅巴',
tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
classify: '薯片膨化',
tagOne: '无添加剂',
tagOne: '无添加剂1',
tagTwo: '无添加剂',
time: '2022年12月04日',
content: '<h1>一级标题</h1><br/><h2>二级标题</h2>'
@@ -60,8 +86,13 @@
}
},
methods: {
likeTap() {
this.like = !this.like
//收藏按钮
starTap() {
this.showStar = !this.showStar
},
//点赞按钮
heartTap() {
this.showHeart = !this.showHeart
}
}
}
@@ -73,17 +104,20 @@
position: absolute;
top: 16rpx;
right: 0;
background-color: #a6a6a6;
color: #fff;
border-radius: 54rpx 0px 0px 54rpx;
padding: 2px 2px 2px 3px;
.collect_text {
font-size: 26rpx;
padding: 1px;
.star {
position: absolute !important;
top: 6px !important;
right: 77rpx;
z-index: 99;
}
}
.content {
padding: 20rpx;
background-color: #fff;
@@ -140,26 +174,36 @@
padding: 1rpx 15rpx;
}
.tagOne {
.tag_view {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 14rpx;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
line-height: 28rpx;
float: left;
padding-top: 14rpx;
.tagOne {
padding-right: 20rpx;
}
.tagTwo {
font-size: 20rpx;
.heart {
display: flex;
.thumb {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
line-height: 28rpx;
padding-top: 14rpx;
color: #666666;
line-height: 33rpx;
margin-left: 14rpx;
}
}
}
}
.releaseDate {
font-size: 24rpx;

View File

@@ -19,12 +19,17 @@
<text class="grid-text">{{listItem.title}}</text>
</u-grid-item>
</u-grid>
<!-- <u-toast ref="uToast" /> -->
</view>
<!-- 分类模块下的轮播图 -->
<view>
<u-swiper :list="swiperList" indicatorMode="line" radius="0" circular></u-swiper>
</view>
<!-- <view style="width: 100px; height: 100px; z-index: 999;">
<u-button type="primary" open-type="getPhoneNumber" size="medium" @getphonenumber="getphonenumber">
获取电话号码</u-button>
</view> -->
<!-- 选项卡: 上架时间和点赞量 -->
<view>
<u-tabs :list="tabList" lineColor="#15CA65" :is-scroll="false"
@@ -115,6 +120,32 @@
url: '../../packageSearch/search/search'
})
},
getphonenumber(e) {
const {
code
} = e.detail;
console.log("手机code : ", code);
uni.login({
"provider": "weixin",
"onlyAuthorize": true, // 微信登录仅请求授权认证
success: function(event) {
const {
code
} = event
console.log("登录code", code);
//客户端成功获取授权临时票据code,向业务服务器发起登录请求。
// 调用登录接口 拿到token 传手机code,更新手机号码
},
fail: function(err) {
// 登录授权失败
// err.code是错误码
}
})
},
//点击一级分类跳转到分类页
toClassify() {
uni.navigateTo({

View File

@@ -16,6 +16,8 @@
@click="toBrowseHistory()"></u-cell>
<u-cell size="large" title="我的收藏" icon="/static/my/wo_icon_sc.png" :isLink="true"
@click="toMyCollect()"></u-cell>
<u-cell size="large" title="我的发布" icon="/static/my/wo_icon_wdfb.png" :isLink="true"
@click="toMyRelease()"></u-cell>
<u-cell size="large" title="联系客服" icon="/static/my/wo_icon_lxkf.png" :isLink="true"
@click="showModal()">
</u-cell>
@@ -32,7 +34,6 @@
export default {
data() {
return {
showM: false,
content: `138 1222 222<br>
是否拨打客服电话`,
@@ -58,12 +59,20 @@
url: '../../packageMy/browseHistory/browseHistory?id=' + 1
})
},
//跳转到我的收藏页面
toMyCollect() {
uni.navigateTo({
url: '../../packageMy/browseHistory/browseHistory?id=' + 2
})
},
//跳转到我的发布页面
toMyRelease() {
uni.navigateTo({
url: '../../packageMy/myRelease/myRelease'
})
},
// 联系客服模态框
showModal() {
this.showM = true
@@ -110,6 +119,10 @@
}
.u-cell:last-child {
border: none !important;
}
.u-icon__icon--info {
font-size: 28rpx !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

BIN
static/my/sdfb_icon_xg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
static/my/wd_icon_bj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/my/wo_icon_wdfb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

View File

@@ -1,6 +1,6 @@
.u-form {
margin-top: 20rpx;
}
.u-form-item__body__left {
width: auto !important;
@@ -20,3 +20,4 @@
.u-form-item {
background-color: #fff;
}
}

View File

@@ -1,6 +1,7 @@
.xw_content {
background: #FFFFFF;
border: 1rpx solid #EEEEEE;
border-bottom: 1rpx solid #EEEEEE;
display: flex;
padding: 29rpx 19rpx;