|
|
|
@ -1,4 +1,5 @@ |
|
|
|
<template> |
|
|
|
<page-meta :page-style="officialAccountPopupVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta> |
|
|
|
<view class="release-page"> |
|
|
|
<view class="header" :style="{ paddingTop: statusBarTop + 'px' }"> |
|
|
|
<view class="back" @tap="back"> |
|
|
|
@ -101,6 +102,22 @@ |
|
|
|
<view class="audit-desc">发布内容正在提交审核,请勿重复点击</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="official-account-mask" v-if="officialAccountPopupVisible" @tap="closeOfficialAccountPopup"> |
|
|
|
<view class="official-account-card" @tap.stop> |
|
|
|
<view class="official-account-close" @tap="closeOfficialAccountPopup">×</view> |
|
|
|
<view class="official-account-title">关注公众号</view> |
|
|
|
<view class="official-account-desc">关注后,有新的咨询会及时通知你</view> |
|
|
|
<image |
|
|
|
show-menu-by-longpress |
|
|
|
class="official-account-qr" |
|
|
|
:src="officialAccountQr" |
|
|
|
mode="aspectFill" |
|
|
|
@tap="previewOfficialAccountQr" |
|
|
|
></image> |
|
|
|
<view class="official-account-tip">长按二维码识别关注</view> |
|
|
|
<view class="official-account-btn" @tap="closeOfficialAccountPopup">知道了</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<ie-auth-dialog /> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -138,6 +155,9 @@ |
|
|
|
submitLocked: false, |
|
|
|
keyboardOpen: false, |
|
|
|
auditTitle: '提交中,等待审核', |
|
|
|
officialAccountPopupVisible: false, |
|
|
|
officialAccountQr: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg', |
|
|
|
officialAccountResolve: null, |
|
|
|
editorIns: null, |
|
|
|
editorToolbarConfig: { |
|
|
|
keys: ['bold', 'italic', 'underline', 'header', 'listOrdered', 'listBullet', 'align', 'image', 'removeFormat', 'clear'], |
|
|
|
@ -506,7 +526,9 @@ |
|
|
|
if (res) { |
|
|
|
submitSuccess = true |
|
|
|
this.auditTitle = this.isEdit ? '保存成功,等待审核' : '提交成功,等待审核' |
|
|
|
setTimeout(() => uni.navigateBack(), 800) |
|
|
|
this.submitting = false |
|
|
|
await this.handlePublishOfficialAccount(res) |
|
|
|
setTimeout(() => uni.navigateBack(), 300) |
|
|
|
} |
|
|
|
} finally { |
|
|
|
if (!submitSuccess) { |
|
|
|
@ -515,6 +537,36 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
handlePublishOfficialAccount(result) { |
|
|
|
const user = result && result.user ? result.user : null |
|
|
|
if (user) { |
|
|
|
uni.setStorageSync('officialAccountOpenid', user.officialAccountOpenid || '') |
|
|
|
} |
|
|
|
const officialAccountOpenid = user ? user.officialAccountOpenid : uni.getStorageSync('officialAccountOpenid') |
|
|
|
if (officialAccountOpenid) { |
|
|
|
return Promise.resolve() |
|
|
|
} |
|
|
|
return this.openOfficialAccountPopup() |
|
|
|
}, |
|
|
|
openOfficialAccountPopup() { |
|
|
|
return new Promise((resolve) => { |
|
|
|
this.officialAccountResolve = resolve |
|
|
|
this.officialAccountPopupVisible = true |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeOfficialAccountPopup() { |
|
|
|
this.officialAccountPopupVisible = false |
|
|
|
if (this.officialAccountResolve) { |
|
|
|
this.officialAccountResolve() |
|
|
|
this.officialAccountResolve = null |
|
|
|
} |
|
|
|
}, |
|
|
|
previewOfficialAccountQr() { |
|
|
|
uni.previewImage({ |
|
|
|
current: this.officialAccountQr, |
|
|
|
urls: [this.officialAccountQr] |
|
|
|
}) |
|
|
|
}, |
|
|
|
fishAuthDialogOptions() { |
|
|
|
return { |
|
|
|
badge: '校园二手', |
|
|
|
@ -860,6 +912,84 @@ |
|
|
|
line-height: 34rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-mask { |
|
|
|
position: fixed; |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
top: 0; |
|
|
|
bottom: 0; |
|
|
|
z-index: 1300; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
padding: 40rpx; |
|
|
|
background: rgba(12, 31, 25, 0.46); |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-card { |
|
|
|
position: relative; |
|
|
|
width: 590rpx; |
|
|
|
padding: 46rpx 42rpx 38rpx; |
|
|
|
border-radius: 36rpx; |
|
|
|
background: #fff; |
|
|
|
text-align: center; |
|
|
|
box-shadow: 0 26rpx 64rpx rgba(19, 70, 54, 0.22); |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-close { |
|
|
|
position: absolute; |
|
|
|
right: 22rpx; |
|
|
|
top: 18rpx; |
|
|
|
width: 54rpx; |
|
|
|
height: 54rpx; |
|
|
|
line-height: 50rpx; |
|
|
|
border-radius: 50%; |
|
|
|
color: #8b9b96; |
|
|
|
font-size: 44rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-title { |
|
|
|
color: #17362f; |
|
|
|
font-size: 34rpx; |
|
|
|
font-weight: 900; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-desc { |
|
|
|
margin-top: 12rpx; |
|
|
|
color: #6f817c; |
|
|
|
font-size: 24rpx; |
|
|
|
line-height: 36rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-qr { |
|
|
|
width: 330rpx; |
|
|
|
height: 330rpx; |
|
|
|
margin: 30rpx auto 0; |
|
|
|
display: block; |
|
|
|
border-radius: 24rpx; |
|
|
|
background: #f5f8f6; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-tip { |
|
|
|
margin-top: 18rpx; |
|
|
|
color: #1a9a72; |
|
|
|
font-size: 24rpx; |
|
|
|
font-weight: 800; |
|
|
|
} |
|
|
|
|
|
|
|
.official-account-btn { |
|
|
|
height: 78rpx; |
|
|
|
margin-top: 30rpx; |
|
|
|
border-radius: 42rpx; |
|
|
|
background: linear-gradient(135deg, #37c990, #19af7e); |
|
|
|
color: #fff; |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: 900; |
|
|
|
line-height: 78rpx; |
|
|
|
} |
|
|
|
|
|
|
|
@keyframes audit-bounce { |
|
|
|
0%, |
|
|
|
80%, |
|
|
|
|