|
|
@ -26,27 +26,23 @@ |
|
|
|
<!-- <uv-avatar-group :urls="urls" keyName="headImage" size="45rpx" gap="0.1"></uv-avatar-group> |
|
|
|
<view class="num">{{item.num}}人参加</view> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bottom-box-r" |
|
|
|
v-if="!item.openState" |
|
|
|
@click="toZhaomu(item)"> |
|
|
|
|
|
|
|
<view class="bottom-box-r" v-if="!item.openState" @click="toZhaomu(item)"> |
|
|
|
{{$t('components.zhaomu.zhaomuItem.joinRecruit')}} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bottom-box-r" |
|
|
|
v-else-if="item.openState == 3" |
|
|
|
@click="toZhaomu(item)"> |
|
|
|
|
|
|
|
<view class="bottom-box-r" v-else-if="item.openState == 3" @click="toZhaomu(item)"> |
|
|
|
{{$t('components.zhaomu.zhaomuItem.rejected')}} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="bottom-box-r" |
|
|
|
v-else |
|
|
|
> |
|
|
|
|
|
|
|
<view class="bottom-box-r" v-else> |
|
|
|
{{ [$t('components.zhaomu.zhaomuItem.reviewing'), $t('components.zhaomu.zhaomuItem.joined')][item.openState - 1] }} |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="tabs-box" :class="item == 1? 'bzcx-item' : 'ycx-item'"> |
|
|
|
{{item == 1? $t('components.zhaomu.zhaomuItem.guaranteed') : $t('components.zhaomu.zhaomuItem.confirmed')}} |
|
|
|
</view> |
|
|
|
<view class="tabs-box" :class="item == 1? 'bzcx-item' : 'ycx-item'">{{item == 1? $t('components.zhaomu.zhaomuItem.guaranteed') : $t('components.zhaomu.zhaomuItem.confirmed')}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -56,13 +52,13 @@ |
|
|
|
props: { |
|
|
|
item: { |
|
|
|
type: Object, |
|
|
|
default: ()=>{} |
|
|
|
default: () => {} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
iconTextArr:[], |
|
|
|
imgArr:[], |
|
|
|
iconTextArr: [], |
|
|
|
imgArr: [], |
|
|
|
urls: [ |
|
|
|
'https://cdn.uviewui.com/uview/album/1.jpg', |
|
|
|
'https://cdn.uviewui.com/uview/album/2.jpg', |
|
|
@ -70,19 +66,46 @@ |
|
|
|
] |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
item:{ |
|
|
|
handler(val){ |
|
|
|
watch: { |
|
|
|
item: { |
|
|
|
handler(val) { |
|
|
|
this.iconTextArr = val.iconText ? val.iconText.split(",") : []; |
|
|
|
this.imgArr = val.image ? val.image.split(",") : [] |
|
|
|
this.urls = val.popularizeRecruitLogList; |
|
|
|
}, |
|
|
|
immediate:true |
|
|
|
immediate: true |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
methods: { |
|
|
|
//订阅模版消息 |
|
|
|
onSubscribeMessageTap(fn) { |
|
|
|
let templateIds = [ |
|
|
|
'SQd2axWZD7KCw3jkw--tumMz9-cmP_R2FUhJzByxrP8', |
|
|
|
]; |
|
|
|
wx.requestSubscribeMessage({ |
|
|
|
tmplIds: templateIds, // 需要订阅的模板ID列表 |
|
|
|
success(res) { |
|
|
|
fn && fn(res) |
|
|
|
console.log('订阅消息调用成功', res); |
|
|
|
// res[tmplId] 表示用户是否同意订阅该模板ID对应的消息 |
|
|
|
// 例如:res['your_template_id_1'] === 'accept' 表示用户同意订阅 |
|
|
|
templateIds.forEach(tmplId => { |
|
|
|
if (res[tmplId] === 'accept') { |
|
|
|
console.log(`用户同意订阅模板ID:${tmplId}`); |
|
|
|
// 这里可以添加用户同意后的逻辑,比如发送消息等(注意:发送消息需要在后端进行) |
|
|
|
} else if (res[tmplId] === 'reject') { |
|
|
|
console.log(`用户拒绝订阅模板ID:${tmplId}`); |
|
|
|
} else { |
|
|
|
console.log(`用户对该模板ID的订阅请求:${res[tmplId]}`); // 'ban' 表示用户被禁止订阅该模板 |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
fail(err) { |
|
|
|
console.error('订阅消息调用失败', err); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
skip(val) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages_order/orderDetails' |
|
|
@ -90,13 +113,15 @@ |
|
|
|
}, |
|
|
|
toZhaomu(item) { |
|
|
|
let params = { |
|
|
|
recruitId:item.id, |
|
|
|
recruitId: item.id, |
|
|
|
} |
|
|
|
this.$api('shopUserAuth',params,res=>{ |
|
|
|
this.$emit('getData') |
|
|
|
if(res.code == 200) { |
|
|
|
this.$Toast(this.$t('components.zhaomu.zhaomuItem.joinSuccess')) |
|
|
|
} |
|
|
|
this.onSubscribeMessageTap(res => { |
|
|
|
this.$api('shopUserAuth', params, res => { |
|
|
|
this.$emit('getData') |
|
|
|
if (res.code == 200) { |
|
|
|
this.$Toast(this.$t('components.zhaomu.zhaomuItem.joinSuccess')) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -159,17 +184,19 @@ |
|
|
|
.address { |
|
|
|
display: flex; |
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
|
|
|
.img-box { |
|
|
|
width: 22rpx; |
|
|
|
height: 26rpx; |
|
|
|
margin-right: 10rpx; |
|
|
|
flex-shrink: 0; |
|
|
|
|
|
|
|
image { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -177,6 +204,7 @@ |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
.tips-box-item { |
|
|
|
padding: 0 24rpx; |
|
|
|
height: 38rpx; |
|
|
@ -187,12 +215,13 @@ |
|
|
|
color: #999999; |
|
|
|
margin-right: 14rpx; |
|
|
|
margin-bottom: 5px; |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -203,9 +232,11 @@ |
|
|
|
justify-content: space-between; |
|
|
|
height: 104rpx; |
|
|
|
padding: 0 21rpx; |
|
|
|
|
|
|
|
&-l { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.num { |
|
|
|
font-weight: 500; |
|
|
|
font-size: 25rpx; |
|
|
@ -213,6 +244,7 @@ |
|
|
|
margin-left: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
&-r { |
|
|
|
width: 180rpx; |
|
|
|
height: 53rpx; |
|
|
@ -225,7 +257,7 @@ |
|
|
|
line-height: 53rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tabs-box { |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
@ -237,11 +269,13 @@ |
|
|
|
text-align: center; |
|
|
|
line-height: 40rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.bzcx-item { |
|
|
|
background: url('@/static/image/member/bzcx-bg.png') no-repeat; |
|
|
|
background-size: 100% 100%; |
|
|
|
color: #FF9000; |
|
|
|
} |
|
|
|
|
|
|
|
.ycx-item { |
|
|
|
background: url('@/static/image/member/ycx-bg.png') no-repeat; |
|
|
|
background-size: 100% 100%; |
|
|
@ -249,5 +283,4 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |