|
|
|
@ -1,19 +1,13 @@ |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
|
|
|
|
<image :src="configList.img_4" |
|
|
|
class="page-bg" |
|
|
|
mode="aspectFill"></image> |
|
|
|
|
|
|
|
|
|
|
|
<image :src="configList.img_6" |
|
|
|
class="logo" |
|
|
|
mode="widthFix"></image> |
|
|
|
|
|
|
|
<image :src="configList.img_9" |
|
|
|
class="page-bg" |
|
|
|
mode="widthFix"></image> |
|
|
|
|
|
|
|
|
|
|
|
<image :src="configList.img_4" class="page-bg" mode="aspectFill"></image> |
|
|
|
|
|
|
|
|
|
|
|
<image :src="configList.img_6" class="logo" mode="widthFix"></image> |
|
|
|
|
|
|
|
<image :src="configList.img_9" class="page-bg" mode="widthFix"></image> |
|
|
|
|
|
|
|
<view class="info"> |
|
|
|
<view class="title"> |
|
|
|
{{ userInfo.nickName }} |
|
|
|
@ -26,48 +20,101 @@ |
|
|
|
艺术开启您的专属品鉴之旅 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<image :src="configList.img_8" |
|
|
|
class="logo" |
|
|
|
mode="widthFix"></image> |
|
|
|
|
|
|
|
|
|
|
|
<image :src="configList.img_8" class="logo" mode="widthFix"></image> |
|
|
|
|
|
|
|
<view class="position"> |
|
|
|
<view class="btn" |
|
|
|
@click="next"> |
|
|
|
<view class="btn" @click="next"> |
|
|
|
点击进入 |
|
|
|
</view> |
|
|
|
<text class="second-color">{{ configList.bg_title }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex' |
|
|
|
import { |
|
|
|
mapState |
|
|
|
} from 'vuex' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
} |
|
|
|
}, |
|
|
|
computed : { |
|
|
|
return {} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
onShow() { |
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
if (uni.getStorageSync('token')) { |
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
next(){ |
|
|
|
next() { |
|
|
|
// wx.requestSubscribeMessage({ |
|
|
|
// tmplIds: ['TEMPLATE_ID'], // 替换为你的模板ID |
|
|
|
// success(res) { |
|
|
|
// if (res['TEMPLATE_ID'] === 'accept') { |
|
|
|
// console.log('用户已同意订阅'); |
|
|
|
// // 执行后续逻辑,例如发送消息 |
|
|
|
// } else if (res['TEMPLATE_ID'] === 'reject') { |
|
|
|
// console.log('用户拒绝订阅'); |
|
|
|
// // 引导用户到设置页面开启权限 |
|
|
|
// wx.showModal({ |
|
|
|
// title: '提示', |
|
|
|
// content: '您已拒绝订阅消息,请到设置中开启权限。', |
|
|
|
// success(modalRes) { |
|
|
|
// if (modalRes.confirm) { |
|
|
|
// wx.openSetting(); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
uni.requestSubscribeMessage({ |
|
|
|
//此处填写刚才申请模板的模板ID |
|
|
|
tmplIds: [ |
|
|
|
'ZREm8r0Bgv-W0W48DHw83nUMYYOdaslI99MTlqgR0ZI', |
|
|
|
'0GqFy6mBu1bmoHsSugtKoQ64aFs1oQXy6sZOE1FlDcw' |
|
|
|
], |
|
|
|
success (res) { |
|
|
|
success(res) { |
|
|
|
console.log(res) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/introduce' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if ( |
|
|
|
res['ZREm8r0Bgv-W0W48DHw83nUMYYOdaslI99MTlqgR0ZI'] === 'accept' && |
|
|
|
res['0GqFy6mBu1bmoHsSugtKoQ64aFs1oQXy6sZOE1FlDcw'] === 'accept' |
|
|
|
) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/introduce' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '您已拒绝订阅消息,请到设置中开启权限。', |
|
|
|
success(modalRes) { |
|
|
|
if (modalRes.confirm) { |
|
|
|
wx.openSetting(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
fail(err) { |
|
|
|
if (err.errCode === 20004) { |
|
|
|
console.log('用户关闭了主开关'); |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '检测到您未开启订阅权限,请前往设置开启。', |
|
|
|
success(modalRes) { |
|
|
|
if (modalRes.confirm) { |
|
|
|
wx.openSetting(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
console.error('订阅失败:', err); |
|
|
|
} |
|
|
|
}, |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
@ -75,31 +122,37 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.page{ |
|
|
|
.page { |
|
|
|
width: 100%; |
|
|
|
.logo{ |
|
|
|
|
|
|
|
.logo { |
|
|
|
width: 600rpx; |
|
|
|
margin: 50rpx 75rpx; |
|
|
|
} |
|
|
|
.info{ |
|
|
|
|
|
|
|
.info { |
|
|
|
text-align: center; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 40rpx; |
|
|
|
font-weight: bold; |
|
|
|
margin: 40rpx 0 20rpx 0; |
|
|
|
} |
|
|
|
.list{ |
|
|
|
|
|
|
|
.list { |
|
|
|
line-height: 50rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.position{ |
|
|
|
|
|
|
|
.position { |
|
|
|
position: absolute; |
|
|
|
bottom: 130rpx; |
|
|
|
left: 75rpx; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
.btn{ |
|
|
|
|
|
|
|
.btn { |
|
|
|
border-radius: 40rpx; |
|
|
|
padding: 30rpx 0; |
|
|
|
background: $uni-color-primary; |
|
|
|
@ -109,7 +162,8 @@ |
|
|
|
width: 600rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.second-color{ |
|
|
|
|
|
|
|
.second-color { |
|
|
|
color: $uni-color-primary; |
|
|
|
margin-top: 20rpx; |
|
|
|
font-size: 26rpx; |
|
|
|
|