This commit is contained in:
魏啾
2024-04-30 18:27:43 +08:00
parent 25acfbeb91
commit 3b85017f91
24 changed files with 2846 additions and 108 deletions

View File

@@ -43,6 +43,8 @@
</view>
</view>
</view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image>
<u-loadmore height='40' :status="form.status" iconSize='24' fontSize='24' />
</view>
</view>
@@ -68,6 +70,7 @@
],
towcontentclickindex: 0,
list: [],
is_end:false,
form: {
page: 1, //页数
size: 10, //页容量
@@ -110,6 +113,9 @@
})
if (res.data.pages < this.form.page) {
this.form.status = 'nomore'
if (res.data.pageNum == 1) {
this.is_end = true
}
return false;
} else {
this.form.status = 'loading';

129
pages/user/information.vue Normal file
View File

@@ -0,0 +1,129 @@
<template>
<view class="content">
<!-- 占位符导航栏 -->
<navseat :opacity='opacity' :title='titlename' :titleshow='true'></navseat>
<view class="onecontent">
<view :style="[{'padding-top':HeighT.customBar +44+'px'}]"></view>
<view class="onecontentbox">
<image class="onecontentboximage" src="@/static/avatar.png" mode=""></image>
<view class="onecontentboxitem flex-between">
<view class="onecontentboxitemtext">
昵称
</view>
<input class="onecontentboxiteminput" type="text" placeholder="请输入昵称">
</view>
<view class="onecontentboxitem flex-between" style="border-top: 1rpx dotted #333333;">
<view class="onecontentboxitemtext">
手机号
</view>
<input class="onecontentboxiteminput" type="text" placeholder="请输入手机号">
</view>
</view>
<view class="onecontentboxitemnamber">
保存
</view>
</view>
</view>
</template>
<script>
import navseat from '@/components/navseat.vue'
export default {
components: {
navseat
},
data() {
return {
titlename: '完善信息',
opacity: false,
form: {
address: '', //地址
type: '', //品类
orderBy: '', //1.理我最近 2.销量优先 3.价格优先
other: '', //附近1KM 1选中 0不选中
page: 1, //页数
size: 10, //页容量
status: 'loadmore'
},
};
},
onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏
this.opacitys = false
} else {
this.opacitys = true
}
},
computed: {
HeighT() { //手机类型的尺寸
return this.$store.getters.is_BarHeight
},
},
};
</script>
<style scoped lang="scss">
page {
background: #F9F9F9;
}
.content {
.onecontent {
padding: 0 28rpx;
width: 100%;
height: 446rpx;
background: linear-gradient(180deg, #FFD158 0%, #F9F9F9 100%);
.onecontentbox {
position: relative;
margin-top: 116rpx;
width: 100%;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding: 75rpx 32rpx 0rpx 32rpx;
.onecontentboximage {
position: absolute;
left: 50%;
top: -60rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
transform: translateX(-50%);
}
.onecontentboxitem {
padding: 24rpx 0;
.onecontentboxitemtext{
font-family: PingFang SC, PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.onecontentboxiteminput{
text-align: right;
flex: auto;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #999999;
height: 100%;
}
}
}
.onecontentboxitemnamber{
margin-top: 84rpx;
text-align: center;
width: 100%;
padding: 20rpx 0;
background: #FFD158;
border-radius: 46rpx 46rpx 46rpx 46rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 36rpx;
color: #333333;
}
}
}
</style>

View File

@@ -2,14 +2,11 @@
<view class="container">
<view class="user-info-wrap">
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
<button open-type="chooseAvatar" @chooseavatar='onChooseAvatar'
style="padding: 0;margin: 0; width: 108rpx; height: 108rpx;border-radius: 50%;">
<image style="width: 108rpx; height: 108rpx;" v-if="userInfo.avatar" :src="userInfo.avatar"
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.avatar" :src="userInfo.avatar"
mode="aspectFill">
</image>
<image style="width: 108rpx; height: 108rpx;" v-else src="@/static/avatar.png" mode="aspectFill">
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png" mode="aspectFill">
</image>
</button>
</view>
<view class="info flex-colum-start">
<text class="phone">{{userInfo.telephone || '无'}}</text>
@@ -17,52 +14,73 @@
</view>
<view class="userinfoone">
<view class="userinfoonebox">
<view class="userinfooneboxitem flex-between">
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
v-for="(item,index) in teblist" :key="index">
<view class="userinfooneboxitemleft flex-start">
<image src="@/static/ewm.png" mode="aspectFill"></image>
<text>优惠券</text>
<image :src="item.shareImg" mode="aspectFill"></image>
<text>{{item.name}}</text>
</view>
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
</view>
</view>
</view>
<listitem></listitem>
</view>
</template>
<script>
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
import listitem from "@/components/listitem.vue";
export default {
components: {
listitem
},
data() {
return {
shopUser: {},
userInfo: {},
shopInfo: {}
shopInfo: {},
teblist: []
};
},
onShow() {
if (uni.cache.get('token')) {
this.loginwxuserInfo()
this.tbPlatformDict()
}
},
methods: {
blurname(e) {
console.log(e);
this.userlist.nickname = e.detail.value
clickinfo(item, index) {
switch (item.jumpType) {
case 'scan': //拉起相机
this.form.type = item.value
break;
case 'relative': //内部页面
uni.pro.navigateTo(relUrl)
break;
case 'absolute': //外链url
uni.navigateTo({
url: `/pages/webview/webview?url=${item.menuUrl}`
});
break;
}
},
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopUser').shopId
userId: uni.cache.get('userInfo').id
})
if (res.code == 0) {
uni.cache.set('userInfo', res.data.userInfo);
uni.cache.set('shopUser', res.data.shopUser);
uni.cache.set('shopInfo', res.data.shopInfo);
this.shopUser = uni.cache.get('shopUser')
uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
this.shopInfo = uni.cache.get('shopInfo')
}
},
async tbPlatformDict() {
let res = await this.api.tbPlatformDict({
type: 'ownMenu'
})
console.log(res)
if (res.code == 0) {
this.teblist = res.data
}
},
// / 更换头像
@@ -108,6 +126,7 @@
width: 750rpx;
background: #FFD158;
border-radius: 0rpx 0rpx 40rpx 0rpx;
.info {
flex: 1;
padding-left: $paddingSize;
@@ -130,7 +149,7 @@
.user-info-wrap::after {
position: absolute;
content: '';
bottom:40rpx;
bottom: 40rpx;
right: 0;
width: 40rpx;
height: 40rpx;
@@ -138,27 +157,32 @@
text-align: center;
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
}
.userinfoone{
.userinfoone {
position: relative;
padding: 48rpx 28rpx;
width:100%;
width: 100%;
top: -40rpx;
background: #F6F6F6;
border-radius: 40rpx 0 0rpx 0rpx;
.userinfoonebox{
.userinfoonebox {
padding: 32rpx 20rpx 32rpx 52rpx;
border-radius: 22rpx;
background: #FFFFFF;
width: 100%;
.userinfooneboxitem{
.userinfooneboxitem {
width: 100%;
margin-top: 32rpx;
.userinfooneboxitemleft{
image{
.userinfooneboxitemleft {
image {
width: 41.33rpx;
height:36.9rpx;
height: 36.9rpx;
}
text{
text {
margin-left: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
@@ -167,7 +191,8 @@
}
}
}
.userinfooneboxitem:nth-child(1){
.userinfooneboxitem:nth-child(1) {
margin-top: 0;
}
}