wangfukang 16 hours ago
parent
commit
cc91e6d563
  1. 7
      package2/IdleTrad/chat.vue
  2. 15
      package2/IdleTrad/detail.vue
  3. 147
      package2/group/groupBuySingle.vue
  4. 30
      package2/login/login.vue
  5. 30
      package2/myCenter/goodsList.vue
  6. 21
      package2/myCenter/myPost.vue
  7. 44
      package2/myCenter/partTimeJobRegister.vue

7
package2/IdleTrad/chat.vue

@ -109,11 +109,8 @@
return this.isWant ? (this.goods.expectedPrice || 0) : (this.goods.price || 0)
},
peerName() {
if (!this.goods || !this.session) return '校园同学'
if (this.isWant) {
return this.selfId == String(this.session.buyerId) ? '供货同学' : (this.goods.userName || '求购同学')
}
return this.selfId == String(this.session.sellerId) ? '买家同学' : (this.goods.userName || '卖家同学')
if (!this.goods) return '校园同学'
return this.goods.userName || (this.isWant ? '求购同学' : '卖家同学')
},
peerAvatar() {
return this.defaultAvatar

15
package2/IdleTrad/detail.vue

@ -51,7 +51,7 @@
<view class="card seller-card" v-if="goods">
<image class="avatar" :src="goods.userAvatar || defaultAvatar" mode="aspectFill"></image>
<view class="seller-main">
<view class="seller-name">半径卖家<text>已实名</text></view>
<view class="seller-name">{{goods.userName || (isWant ? '求购同学' : '半径卖家')}}<text>已实名</text></view>
<view class="online">{{goods.sellerOnlineStatus || '3天内在线'}}</view>
</view>
<view class="seller-tip">线下面交</view>
@ -82,13 +82,13 @@
<image :src="item.userAvatar || defaultAvatar" mode="aspectFill"></image>
<view class="comment-main">
<view class="comment-name">
半径同学
{{item.userName || '校园同学'}}
<text v-if="item.sellerReply">卖家</text>
</view>
<view class="comment-content">{{item.content}}</view>
<view class="reply-list" v-if="item.replies && item.replies.length">
<view class="reply-item" v-for="reply in item.replies" :key="reply.id">
<text class="reply-name">半径同学</text>
<text class="reply-name">{{reply.userName || '校园同学'}}</text>
<text class="seller-badge" v-if="reply.sellerReply">卖家</text>
<text class="reply-target" v-if="reply.replyToUserName"> 回复 {{reply.replyToUserName}}</text>
<text>{{reply.content}}</text>
@ -199,7 +199,7 @@
showCommentInput: false,
commentSubmitting: false,
replyTarget: {},
defaultAvatar: '',
defaultAvatar: '/static/images/img/songshu.png',
defaultShareImage: '/static/images/img/songshu.png',
currentUserId: uni.getStorageSync('id') || '',
currentImageIndex: 0,
@ -391,6 +391,7 @@
const replyTarget = { ...(this.replyTarget || {}) }
const payload = {
goodsId: this.id,
...this.getCachedUserProfile(),
content
}
if (replyTarget && replyTarget.id) {
@ -552,6 +553,12 @@
uni.makePhoneCall({
phoneNumber: String(phone)
})
},
getCachedUserProfile() {
return {
userName: uni.getStorageSync('nickName') || uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '',
userAvatar: uni.getStorageSync('avatar') || uni.getStorageSync('avatarUrl') || uni.getStorageSync('headimgurl') || ''
}
}
}
}

147
package2/group/groupBuySingle.vue

@ -404,7 +404,7 @@
</view>
</view>
</view>
<scroll-view scroll-y style="max-height: 50vh;">
<scroll-view scroll-y class="popup-spec-scroll">
<view class="goods-spec" v-if="parsedSpecs.length > 0">
<view class="spec1" v-for="(spec, sIndex) in parsedSpecs" :key="sIndex">
<view class="spec11">
@ -438,7 +438,8 @@
</view>
</view>
</template>
<view class="spec11" v-if="moreBuyList.length > 0 && isPintuan" style="display: flex;">
<view class="spec11 popup-more-buy-title" v-if="moreBuyList.length > 0 && isPintuan"
style="display: flex;">
<view style="flex: 1;">
搭配小食
</view>
@ -458,12 +459,12 @@
</view>
</view>
<view class="goods-team" v-if="moreBuyList.length > 0 && isPintuan" style="height: 300rpx;">
<view class="goods-team popup-more-buy-goods" v-if="moreBuyList.length > 0 && isPintuan">
<view :class="spec.isChecked ? 'team-check1' : 'team2'" v-for="(spec, sIndex) in moreBuyList"
:key="sIndex" @tap="selectMoreBuy(spec,sIndex)">
<view>
<img :src="spec.productPicture" alt=""
style="width: 70px;height: 70px;background-size: 100%;border-radius: 10px;">
style="width: 112rpx;height: 112rpx;background-size: 100%;border-radius: 10px;">
</view>
<view class="team11" style="margin-top:10rpx;">
{{spec.attributeListPrice | sliceMsg}}
@ -476,9 +477,9 @@
</view>
</view>
</view>
<view style="width: 100%;height: 160rpx;"></view>
<view class="popup-bottom-placeholder"></view>
</scroll-view>
<view class="bottom popup-bottom-bar" style="padding-bottom: 40rpx;height: 160rpx;z-index: 10;">
<view class="bottom popup-bottom-bar" style="padding-bottom: 24rpx;height: 132rpx;z-index: 10;">
<view v-if="isPintuan" class="pintuan1">
<template v-if="!groupId">
<view class="pintuan2 group-face-btn" @tap.stop="submitPintuan(true)">
@ -615,7 +616,7 @@
@tap="selectMoreBuy(spec,sIndex)">
<view>
<img :src="spec.productPicture" alt=""
style="width: 70px;height: 70px;background-size: 100%;border-radius: 10px;">
style="width: 112rpx;height: 112rpx;background-size: 100%;border-radius: 10px;">
</view>
<view class="team11" style="margin-top:10rpx;">
{{spec.attributeListPrice | sliceMsg}}
@ -630,7 +631,7 @@
</view>
</scroll-view>
</view>
<view class="box1" style="display: flex;padding: 40rpx;"
<view class="box1 pay-option-card" style="display: flex;"
v-if="groupdeliveryType == 2 && !isStoreGroupOrder">
<view style="flex: 1;">
<view style="height: 42rpx;line-height: 42rpx;display: flex;">
@ -662,7 +663,7 @@
</view>
</view>
</view>
<view class="box1" style="display: flex;padding: 40rpx;">
<view class="box1 pay-option-card" style="display: flex;">
<view style="flex: 1;">
<view style="height: 42rpx;line-height: 42rpx;display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4c8e0cc311db4d38ab43e019673c4b8c.png"
@ -4094,9 +4095,39 @@
linear-gradient(180deg, #ffffff 0%, #f7fffb 100%);
}
.group-order-popup {
max-height: 88vh;
overflow: hidden;
}
.group-order-popup .popup-product-card {
padding: 14rpx 18rpx;
margin-bottom: 10rpx;
}
.group-order-popup .goods-img {
width: 128rpx;
height: 128rpx;
}
.group-order-popup .goods-name {
font-size: 28rpx;
line-height: 38rpx;
}
.group-order-popup .goods-content-center {
margin: 8rpx 0;
}
.popup-spec-scroll {
max-height: 44vh;
padding: 0 20rpx;
box-sizing: border-box;
}
.popup-rally-title,
.join-popup-title {
padding: 8rpx 20rpx 22rpx;
padding: 6rpx 20rpx 14rpx;
text-align: center;
}
@ -4131,6 +4162,52 @@
box-shadow: 0 12rpx 26rpx rgba(0, 35, 28, 0.06);
}
.popup-more-buy-title {
height: 72rpx;
line-height: 72rpx;
}
.popup-more-buy-title .goods-num {
height: 48rpx;
line-height: 48rpx;
}
.popup-more-buy-title .num-plus {
width: 48rpx;
height: 48rpx;
line-height: 48rpx;
}
.popup-more-buy-goods {
height: 236rpx;
min-height: 236rpx;
}
.popup-more-buy-goods .team2,
.popup-more-buy-goods .team-check1,
.pay-more-buy-item {
width: 166rpx;
height: 218rpx;
margin: 8rpx 20rpx 0 0;
padding: 8rpx 8rpx 0;
box-sizing: border-box;
}
.popup-more-buy-goods .team11,
.pay-more-buy-item .team11 {
margin-top: 6rpx !important;
font-size: 22rpx;
line-height: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.popup-bottom-placeholder {
width: 100%;
height: 132rpx;
}
.popup-origin-price {
color: #ff4d38;
font-weight: 900;
@ -4161,29 +4238,31 @@
}
.pay-popup {
height: auto;
max-height: 92vh;
background: #fff;
border-radius: 40rpx 40rpx 0 0;
padding-top: 34rpx;
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
padding-top: 22rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
overflow: hidden;
}
.pay-popup-content {
height: 100%;
max-height: calc(92vh - 42rpx - env(safe-area-inset-bottom));
margin-top: 0;
overflow-y: auto;
}
.pay-summary-card {
padding: 28rpx 30rpx 24rpx;
padding: 20rpx 30rpx 18rpx;
}
.pay-more-buy-card {
padding: 20rpx 30rpx 28rpx;
padding: 14rpx 30rpx 20rpx;
}
.pay-more-buy-title {
height: 78rpx;
line-height: 78rpx;
height: 64rpx;
line-height: 64rpx;
}
.pay-more-buy-scroll {
@ -4200,26 +4279,38 @@
flex-shrink: 0;
}
.pay-more-buy-scroll {
height: 226rpx;
}
.pay-popup-content > .box1 {
margin-bottom: 16rpx;
}
.pay-option-card {
padding: 26rpx 36rpx;
}
.pay-countdown {
display: flex;
align-items: center;
justify-content: center;
min-height: 54rpx;
min-height: 44rpx;
color: #586963;
font-size: 26rpx;
}
.pay-amount {
margin-top: 8rpx;
margin-top: 2rpx;
text-align: center;
font-size: 30rpx;
font-weight: 800;
line-height: 84rpx;
line-height: 70rpx;
color: #00231C;
}
.pay-amount text {
font-size: 62rpx;
font-size: 56rpx;
}
.minimum-pay-tip {
@ -4239,8 +4330,8 @@
}
.pay-fee-list {
margin-top: 14rpx;
padding: 18rpx 22rpx;
margin-top: 8rpx;
padding: 14rpx 20rpx;
border-radius: 22rpx;
background: #f8fbf9;
border: 1rpx solid #edf3f0;
@ -4292,7 +4383,7 @@
}
.pay-refund-tip {
margin-top: 16rpx;
margin-top: 10rpx;
text-align: center;
color: #f0441f;
font-size: 24rpx;
@ -4302,13 +4393,13 @@
.pay-confirm-btn {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
width: 90%;
height: 100rpx;
height: 88rpx;
border-radius: 100rpx;
text-align: center;
font-size: 28rpx;
font-weight: 700;
line-height: 100rpx;
margin: 40rpx auto;
line-height: 88rpx;
margin: 24rpx auto 18rpx;
}
.popup-bottom-bar {

30
package2/login/login.vue

@ -117,10 +117,11 @@
provider: 'weixin',
success(loginRes) {
that.getWechatProfile().then((profile) => {
that.cacheWechatProfile(profile)
that.tui.request('/user/login', 'post', {
jsCode: loginRes.code,
customId: that.customId,
wechatName: profile.nickName || '半径里同学',
wechatName: profile.nickName || uni.getStorageSync('nickname') || '半径里同学',
userType: '2'
}, false, false).then((res) => {
that.loginLoading = false
@ -165,6 +166,20 @@
})
})
},
cacheWechatProfile(profile = {}) {
const nickname = profile.nickName || profile.nickname || ''
const avatar = profile.avatarUrl || profile.avatar || ''
if (nickname) {
uni.setStorageSync('nickName', nickname)
uni.setStorageSync('nickname', nickname)
uni.setStorageSync('userName', nickname)
}
if (avatar) {
uni.setStorageSync('avatarUrl', avatar)
uni.setStorageSync('avatar', avatar)
uni.setStorageSync('headimgurl', avatar)
}
},
getPhoneNumber(e) {
if (this.phoneLoading) return
if (!e.detail.code) {
@ -202,7 +217,18 @@
if (result.worker !== undefined) uni.setStorageSync('worker', result.worker)
uni.setStorageSync('wayValue', '0')
if (result.user) {
uni.setStorageSync('nickname', result.user.nickname)
const nickname = result.user.nickname || uni.getStorageSync('nickname') || uni.getStorageSync('nickName') || ''
const avatar = result.user.avatar || uni.getStorageSync('avatar') || uni.getStorageSync('avatarUrl') || ''
if (nickname) {
uni.setStorageSync('nickName', nickname)
uni.setStorageSync('nickname', nickname)
uni.setStorageSync('userName', nickname)
}
if (avatar) {
uni.setStorageSync('avatarUrl', avatar)
uni.setStorageSync('avatar', avatar)
uni.setStorageSync('headimgurl', avatar)
}
uni.setStorageSync('id', result.user.id)
uni.setStorageSync('unionid', result.user.unionid)
uni.setStorageSync('miniProgramOpenid', result.user.miniProgramOpenid)

30
package2/myCenter/goodsList.vue

@ -164,6 +164,8 @@
</template>
<script>
const RECOMMEND_CATEGORY_ID = 'tuijian'
export default {
data() {
return {
@ -254,6 +256,9 @@
if (res.code == 200) {
if(type == 'shopList'){
this.shopList[index].isPush = value
if (this.categoryId == RECOMMEND_CATEGORY_ID && value != 1) {
this.shopList.splice(index, 1)
}
}else{
this.shopList1[index].isPush = value
}
@ -351,9 +356,12 @@
//
getShareList(type) {
let data = {}
const isSearch = type == 'search'
const isRecommend = !isSearch && this.categoryId == RECOMMEND_CATEGORY_ID
if (type == 'search') {
this.gateType = 'search'
data = {
shopId: this.shopId,
categoryId: "",
searchStr: this.searchName,
pageNum: this.pageNum,
@ -362,23 +370,25 @@
} else {
this.gateType = ''
data = {
categoryId: this.categoryId,
shopId: this.shopId,
categoryId: isRecommend ? "" : this.categoryId,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '10'
pageSize: isRecommend ? '1000' : '10'
}
}
let that = this
this.tui.request("/app/product/getShareList", "POST", data, false, false).then((res) => {
if (res.code == 200) {
const records = res.result.records || []
this.pages = res.result.pages || 1
const goodsList = isRecommend ? records.filter(item => item.isPush == 1) : records
this.pages = isRecommend ? 1 : (res.result.pages || 1)
if (type == 'search') {
this.shopList = []
if (this.pageNum == 1) {
this.shopList1 = records
this.shopList1 = goodsList
} else {
this.shopList1 = [...this.shopList1, ...records]
this.shopList1 = [...this.shopList1, ...goodsList]
}
for(let i=0;i<this.shopList1.length;i++){
this.shopList1[i].isShow = false
@ -386,9 +396,9 @@
} else {
this.shopList1 = []
if (this.pageNum == 1) {
this.shopList = records
this.shopList = goodsList
} else {
this.shopList = [...this.shopList, ...records]
this.shopList = [...this.shopList, ...goodsList]
}
for(let i=0;i<this.shopList.length;i++){
this.shopList[i].isShow = false
@ -424,7 +434,11 @@
shopId:this.shopId
}, false, true).then((res) => {
if (res.code == 200) {
this.indexList = res.result;
const categoryList = res.result || []
this.indexList = [{
categoryName: '推荐',
id: RECOMMEND_CATEGORY_ID
}, ...categoryList];
if (this.indexList.length == 0) return;
for (var i = 0; i < this.indexList.length; i++) {
if (i == 0) {

21
package2/myCenter/myPost.vue

@ -22,6 +22,10 @@
<view class="search-clear" v-if="titleKeyword" @tap="clearSearch">清空</view>
<view class="search-btn" @tap="handleSearch">搜索</view>
</view>
<view class="swipe-tip" v-if="canManageCurrentTab">
<uni-icons type="info" size="15" color="#24b979"></uni-icons>
<text>左滑卡片可编辑上下架或删除</text>
</view>
<scroll-view scroll-y class="list" :class="{ 'list--with-search': canManageCurrentTab }" @scrolltolower="loadMore">
<u-swipe-action v-if="canManageCurrentTab">
<u-swipe-action-item
@ -471,7 +475,22 @@
height: calc(100vh - 210rpx);
}
.list--with-search {
height: calc(100vh - 296rpx);
height: calc(100vh - 364rpx);
}
.swipe-tip {
height: 52rpx;
margin: 0 24rpx 16rpx;
padding: 0 20rpx;
display: flex;
align-items: center;
border-radius: 26rpx;
background: #eafaf3;
color: #4f7368;
font-size: 22rpx;
box-sizing: border-box;
}
.swipe-tip text {
margin-left: 8rpx;
}
.card {
margin: 18rpx 24rpx 0;

44
package2/myCenter/partTimeJobRegister.vue

@ -24,15 +24,18 @@
<view class="box1">
<view class="reg-name">
<text style="color:red;">*</text> 学生证上传 <text
学生证上传 <text
style="font-weight: 400;color: #777;font-size: 11px;">身份信息仅用于认证身份平台会严格保密</text>
</view>
<view class="reg-value">
<img @tap="pictureAdd('mentou')"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/89d37db7e34c490da24c5dd62183bf2d.png" alt=""
style="width: 160rpx;height: 160rpx;background-size: 100%;margin-right: 20rpx;" />
<img @tap="largeImg" :src="formData.studentCard" alt=""
style="width: 160rpx;height: 160rpx;background-size: 100%;" />
<view class="student-card-preview" v-if="formData.studentCard">
<img @tap="largeImg" :src="formData.studentCard" alt=""
style="width: 160rpx;height: 160rpx;background-size: 100%;" />
<view class="student-card-delete" @tap.stop="clearStudentCard">×</view>
</view>
</view>
</view>
<view class="box1">
@ -670,6 +673,10 @@
this.bigImg = this.formData.studentCard;
this.$refs.imgPopup.open()
},
clearStudentCard() {
this.formData.studentCard = ''
this.bigImg = ''
},
waimaOrpaotui(type) {
if (type == 'waima') {
this.formData.waima = !this.formData.waima
@ -898,10 +905,6 @@
title: '请填写姓名',
icon: 'none'
});
if (!this.formData.studentCard) return uni.showToast({
title: '请上传学生证',
icon: 'none'
});
if (!this.formData.waima && !this.formData.paotui) return uni.showToast({
title: '请至少选择一种兼职类型',
icon: 'none'
@ -1124,6 +1127,33 @@
height: 500rpx;
}
.student-card-preview {
display: inline-block;
position: relative;
width: 160rpx;
height: 160rpx;
vertical-align: top;
}
.student-card-preview img {
display: block;
}
.student-card-delete {
position: absolute;
top: -14rpx;
right: -14rpx;
width: 36rpx;
height: 36rpx;
line-height: 34rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.65);
color: #fff;
font-size: 30rpx;
text-align: center;
z-index: 2;
}
.liangge-popup-content {
background: #fff;
border-radius: 10px;

Loading…
Cancel
Save