|
|
@@ -146,27 +146,11 @@ const handleBind = async () => {
|
|
|
const code = ref<string>('')
|
|
|
|
|
|
async function handleExchange() {
|
|
|
- if (!code.value) {
|
|
|
- uni.showToast({
|
|
|
- title: '请输入兑换码',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- try {
|
|
|
- await exchangeCode({
|
|
|
- exchangeCode: code.value,
|
|
|
- subjectId: dict.getValueByLabelMapByType('index_subject_id')['物理'],
|
|
|
- })
|
|
|
- await user.get()
|
|
|
- visible3.value = false
|
|
|
- visible5.value = true
|
|
|
- } catch (err: any) {
|
|
|
- uni.showToast({
|
|
|
- title: err.message,
|
|
|
- icon: 'error'
|
|
|
- })
|
|
|
- }
|
|
|
+ selected.value = 'exchange'
|
|
|
+ visible3.value = false
|
|
|
+}
|
|
|
+function handleExchangeHide() {
|
|
|
+ visible3.value = false
|
|
|
}
|
|
|
function handleViewAnnouncement() {
|
|
|
router.push({ path: '/pages/user/info', query: { type: 'notice' } })
|
|
|
@@ -207,6 +191,9 @@ function handleViewAnnouncement() {
|
|
|
</view> -->
|
|
|
<cl-popup v-model="visible" :size="400" :show-header="false" direction="center">
|
|
|
<view class="flex flex-col items-center justify-center gap-4 py-7 bg-slate-50">
|
|
|
+ <view class="absolute top-2 right-2" @tap="visible = false">
|
|
|
+ <cl-icon name="close-circle-fill" color="info" :size="20"></cl-icon>
|
|
|
+ </view>
|
|
|
<cl-text class="text-center " color="#09ba07" :size="30"> ——专属服务内容—— </cl-text>
|
|
|
<image src="https://oss.xiaoxiongcode.com/static/home/qr.png" show-menu-by-longpress
|
|
|
class="w-32 h-32" />
|
|
|
@@ -217,6 +204,9 @@ function handleViewAnnouncement() {
|
|
|
</cl-popup>
|
|
|
<cl-popup v-model="visible2" :size="400" :show-header="false" direction="center">
|
|
|
<view class="flex flex-col items-center justify-center gap-4 py-7 bg-slate-50">
|
|
|
+ <view class="absolute top-2 right-2" @tap="visible2 = false">
|
|
|
+ <cl-icon name="close-circle-fill" color="info" :size="20"></cl-icon>
|
|
|
+ </view>
|
|
|
<cl-text class="text-center " color="#09ba07" :size="30"> ——会员福利—— </cl-text>
|
|
|
<image src="https://oss.xiaoxiongcode.com/static/home/coding.png" class="w-32 h-32" />
|
|
|
<view class="text-center " v-if="userInfo && userInfo?.memberLevel !== 'default'">
|
|
|
@@ -232,16 +222,24 @@ function handleViewAnnouncement() {
|
|
|
</view>
|
|
|
</view>
|
|
|
</cl-popup>
|
|
|
- <cl-popup v-model="visible3" showClose :size="400" :show-header="false" direction="center">
|
|
|
- <view class="flex flex-col items-center justify-center gap-4 py-7 bg-slate-50">
|
|
|
- <cl-text class="text-center " color="#333" :size="25"> ——激活会员—— </cl-text>
|
|
|
-
|
|
|
- <input
|
|
|
- class="w-[200px] h-[40px] bg-[#F5F5F5] border-[1px] border-[#333] border-solid rounded-[20px] px-[10px]"
|
|
|
- v-model="code" placeholder="请输入兑换码"></input>
|
|
|
-
|
|
|
- <cl-button class="mt-4" size="large" type="primary" block @tap="handleExchange"> 兑换 </cl-button>
|
|
|
-
|
|
|
+ <cl-popup v-model="visible3" showClose :size="400" :show-header="false" direction="center" :pt="{
|
|
|
+ inner: {
|
|
|
+ className: '!bg-transparent'
|
|
|
+ }
|
|
|
+ }">
|
|
|
+ <view class="w-[300rpx] relative">
|
|
|
+ <image src="https://oss.xiaoxiongcode.com/static/home/6171.png" mode="widthFix"
|
|
|
+ class="w-[300rpx] relative ">
|
|
|
+ </image>
|
|
|
+ <text class=" wz-1 ">
|
|
|
+ 当前账号尚未兑换会员
|
|
|
+ </text>
|
|
|
+ <text class="wz-2 " @tap="handleExchange">
|
|
|
+ 去兑换
|
|
|
+ </text>
|
|
|
+ <text class="wz-3 " @tap="handleExchangeHide">
|
|
|
+ 取消
|
|
|
+ </text>
|
|
|
</view>
|
|
|
</cl-popup>
|
|
|
<cl-popup v-model="visible4" showClose :show-header="false" direction="center" :pt="{
|
|
|
@@ -250,6 +248,9 @@ function handleViewAnnouncement() {
|
|
|
}
|
|
|
}">
|
|
|
<view class="w-[360px] relative">
|
|
|
+ <view class="absolute top-2 right-2" @tap="visible4 = false">
|
|
|
+ <cl-icon name="close-circle-fill" color="info" :size="20"></cl-icon>
|
|
|
+ </view>
|
|
|
<image src="https://oss.xiaoxiongcode.com/static/home/6171.png" mode="widthFix"
|
|
|
class="w-[360px] relative ">
|
|
|
</image>
|
|
|
@@ -276,6 +277,9 @@ function handleViewAnnouncement() {
|
|
|
}
|
|
|
}">
|
|
|
<view class="w-[360px] relative">
|
|
|
+ <view class="absolute top-2 right-2" @tap="visible6 = false">
|
|
|
+ <cl-icon name="close-circle-fill" color="info" :size="20"></cl-icon>
|
|
|
+ </view>
|
|
|
<image src="https://oss.xiaoxiongcode.com/static/home/721.png" mode="widthFix"
|
|
|
class="w-[360px] relative ">
|
|
|
</image>
|