|
@@ -182,6 +182,18 @@
|
|
|
</uni-popup-share>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <!-- 当前是赏金职位时,询问是否登录,不登录则没有赏金 -->
|
|
|
+ <uni-popup ref="loginPopup" type="dialog">
|
|
|
+ <uni-popup-dialog
|
|
|
+ type="warn"
|
|
|
+ cancelText="取消"
|
|
|
+ confirmText="登录"
|
|
|
+ title="系统提示"
|
|
|
+ content="当前为赏金职位,不登录进行分享将无法获得赏金,是否登录?"
|
|
|
+ @confirm="handleLoginConfirm"
|
|
|
+ @close="handleLoginClose" />
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
<view class="hideCanvasView">
|
|
|
<canvas class="shareCanvas" canvas-id="shareCanvas" style="width: 452px; height: 362px;"></canvas>
|
|
|
</view>
|
|
@@ -639,25 +651,38 @@ const handleUpload = () => {
|
|
|
}
|
|
|
|
|
|
// 分享
|
|
|
+const loginPopup = ref()
|
|
|
const handleClickShare = () => {
|
|
|
- if (!getAccessToken()) {
|
|
|
- uni.showToast({
|
|
|
- title:'请先登录',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- showAuthModal()
|
|
|
- return
|
|
|
- }
|
|
|
- if (showNecessaryInfoPopup()) {
|
|
|
- uni.showToast({
|
|
|
- title: '请先完善基本信息',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- showAuthModal('necessaryInfo')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (!getAccessToken()) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title:'请先登录',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // showAuthModal()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (showNecessaryInfoPopup()) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请先完善基本信息',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // showAuthModal('necessaryInfo')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ // 如果当前职位是赏金职位且没有登录的状态,则弹窗询问是否需要登录;普通职位登录与不登录都可直接分享
|
|
|
+ if (!getAccessToken() && info.value.hire) return loginPopup.value.open()
|
|
|
sharePopup.value.open()
|
|
|
}
|
|
|
+
|
|
|
+// 取消则直接弹窗分享
|
|
|
+const handleLoginClose = () => {
|
|
|
+ sharePopup.value.open()
|
|
|
+}
|
|
|
+// 确认则弹窗登录
|
|
|
+const handleLoginConfirm = () => {
|
|
|
+ showAuthModal()
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|