Browse Source

hotfix:优化细节

feature-1.1-dev
Penny 3 years ago
parent
commit
21e4fd90b9
  1. 30
      pages/creator/imgDetail.vue
  2. 15
      pages/userInfo/userInfo.vue
  3. 112
      pages/userInfo/vip/vip.vue

30
pages/creator/imgDetail.vue

@ -207,23 +207,27 @@ var videoAd = null;
//VIP //VIP
goOpenVip() { goOpenVip() {
let that = this; let that = this;
//iosios
uni.getSystemInfo({ success(res) { console.log(res.osName)
if(res.osName === 'ios'){
return uni.showToast({
title: 'ios暂不支持.如已开通请关联绑定会员卡',
duration: 2500,
icon: 'none',
success() {
that.isShowDownLoadBox();
}
})
}else{
that.isShowDownLoadBox() that.isShowDownLoadBox()
uni.navigateTo({ uni.navigateTo({
url:'/pages/userInfo/vip/vip' url:'/pages/userInfo/vip/vip'
}) })
} } }); //iosios
// uni.getSystemInfo({ // success(res) { // console.log(res.osName)
// if(res.osName === 'ios'){
// return uni.showToast({
// title: 'ios.',
// duration: 2500,
// icon: 'none',
// success() {
// that.isShowDownLoadBox();
// }
// })
// }else{
// that.isShowDownLoadBox()
// uni.navigateTo({
// url:'/pages/userInfo/vip/vip'
// })
// } // } // });
}, },
//广 //广

15
pages/userInfo/userInfo.vue

@ -10,7 +10,9 @@
<view v-if="userInfo.username"> <view v-if="userInfo.username">
<view class="username"> <view class="username">
{{userInfo.username}} {{userInfo.username}}
<uni-icons class="vip-icon" custom-prefix="iconfont" type="icon-VIP" size="14" :color="isVip === true ? primaryColor : noVipColor "/> <uni-icons class="vip-icon" custom-prefix="iconfont" type="icon-VIP" size="18" :color="isVip === true ? primaryColor : noVipColor "/>
<view v-if="isVip === false">画意人</view>
<view v-if="isVip === true">高级画意师</view>
</view> </view>
<view class="gold-info">画意值{{goldNum}}</view> <view class="gold-info">画意值{{goldNum}}</view>
</view> </view>
@ -36,7 +38,7 @@
<view class="list-menu"> <view class="list-menu">
<view class="list-menu-item" @click="toLink('/pages/userInfo/vip/vip')"> <view class="list-menu-item" @click="toLink('/pages/userInfo/vip/vip')">
<uni-icons class="list-menu-icon" type="vip" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" type="vip" size="20" :color="primaryColor" />
<view class="text">我的会员</view> <view class="text">会员中心</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons>
</view> </view>
<view class="list-menu-item" @click="toLink()"> <view class="list-menu-item" @click="toLink()">
@ -46,7 +48,7 @@
</view> </view>
<view class="list-menu-item" @click="$noMultipleClicks(useCdk)"> <view class="list-menu-item" @click="$noMultipleClicks(useCdk)">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-xunhuanjiagongcishu" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-xunhuanjiagongcishu" size="20" :color="primaryColor" />
<view class="text">兑换绘画</view> <view class="text">兑换绘画</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons>
</view> </view>
</view> </view>
@ -167,7 +169,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
} }
}, },
loginFunc(res, userInfo) { async loginFunc(res, userInfo) {
const params = { const params = {
code: res.code, code: res.code,
encryptedData: userInfo.encryptedData, encryptedData: userInfo.encryptedData,
@ -196,9 +198,6 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
uni.showToast({ uni.showToast({
title: '登录成功!', title: '登录成功!',
icon: 'none', icon: 'none',
success() {
this.queryGoldNum();
}
}) })
} }
}) })
@ -211,7 +210,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
}).catch(res => {}) }).catch(res => {})
}, },
// //
getUserInfoLogin() { async getUserInfoLogin() {
uni.getSetting({ uni.getSetting({
success: (settingObj) => { success: (settingObj) => {
if (settingObj.authSetting['scope.userInfo'] === undefined || settingObj.authSetting['scope.userInfo']) { if (settingObj.authSetting['scope.userInfo'] === undefined || settingObj.authSetting['scope.userInfo']) {

112
pages/userInfo/vip/vip.vue

@ -1,5 +1,5 @@
<template> <template>
<view > <view>
<view class="container"> <view class="container">
<view class="header"> <view class="header">
<view class="vip-info"> <view class="vip-info">
@ -11,13 +11,13 @@
<view class="vip-info__tips" v-if="vipInfo.isVip == '1'">到期时间为{{vipInfo.endTime}}</view> <view class="vip-info__tips" v-if="vipInfo.isVip == '1'">到期时间为{{vipInfo.endTime}}</view>
</view> </view>
</view> </view>
<view class="vip-explan" v-if="vipInfo.isVip == '0'"> <!-- <view class="vip-explan" v-if="vipInfo.isVip == '0'">
会员说明 会员说明
<uni-icons type="help" size="20" color="#eee" @click="openIntro()"/> <uni-icons type="help" size="20" color="#eee" @click="openIntro()"/>
</view> </view> -->
</view> </view>
<view class="vip-box"> <view class="vip-box" v-if="systemInfo != 'ios'">
<view class="vip-box__item" :class="{'item-active':active == index}" @click="change(index)" <view class="vip-box__item" :class="{'item-active':active == index}" @click="change(index)"
v-for="(item,index) in vipList" :key="index"> v-for="(item,index) in vipList" :key="index">
<view class="title"> <view class="title">
@ -35,7 +35,12 @@
</view> </view>
</view> </view>
<button class="sumbit-btn" @click="openVip" :disabled="disabled"> <view class="" v-if="systemInfo === 'ios'">
<view class="iosStyle">由于相关政策,ios端暂不支持开通会员,请谅解.您可通过联系"次元意境"官方客服了解详情</view>
<button class="linkToUs" size="mini" open-type="im" data-im-id="DimenMusicHub">联系客服</button>
</view>
<button class="sumbit-btn" @click="openVip" :disabled="disabled" v-if="systemInfo != 'ios'">
立即开通 立即开通
</button> </button>
@ -67,7 +72,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="auto-renewal-instructions instructions"> <!-- <view class="auto-renewal-instructions instructions">
<view class="instructions-title title">自动续费说明</view> <view class="instructions-title title">自动续费说明</view>
<view class="ul"> <view class="ul">
<view class="li" v-for="item in autoRenewalList"> <view class="li" v-for="item in autoRenewalList">
@ -75,7 +80,7 @@
<view class="content">{{ item }}</view> <view class="content">{{ item }}</view>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
</template> </template>
@ -97,33 +102,56 @@
active: 0, active: 0,
disabled: false, disabled: false,
vipInfo: undefined, vipInfo: undefined,
systemInfo: undefined,
memberBenefits: [ memberBenefits: [
{icon: "icon-wuguanggao", iconColor: "#b07838", bgColor: "#fbefc5", info: "免看全部广告", description: "无需看广告解锁,直接用"}, {icon: "icon-wuguanggao", iconColor: "#b07838", bgColor: "#fbefc5", info: "下载图片免广告", description: "无需看广告解锁,直接用"},
{icon: "icon-biaoqing", iconColor: "#d58859", bgColor: "#fae1d8", info: "千万表情免费用", description: "超全超有趣的表情库,海量表情免费用"}, {icon: "icon-biaoqing", iconColor: "#d58859", bgColor: "#fae1d8", info: "千万表情免费用", description: "超全超有趣的表情库,海量表情免费用"},
{icon: "icon-shuazi", iconColor: "#667dc9", bgColor: "#d5e2e9", info: "独享VIP素材", description: "万张热门表情模板等你diy"}, {icon: "icon-shuazi", iconColor: "#667dc9", bgColor: "#d5e2e9", info: "情侣头像私人定制", description: "不要再和别人撞情头啦"},
{icon: "icon-tupian", iconColor: "#9474c3", bgColor: "#e7d7fb", info: "专属VIP板块", description: "让你成为斗图届的王者"}, {icon: "icon-tupian", iconColor: "#9474c3", bgColor: "#e7d7fb", info: "头像壁纸随心选", description: "让您成为朋友圈最靓的仔"},
{icon: "icon-tupianliebiao", iconColor: "#d68353", bgColor: "#f4e1d3", info: "专辑一键保存", description: "轻松下载专辑内所有图"}, {icon: "icon-tupian", iconColor: "#9474c3", bgColor: "#e7d7fb", info: "专属客服", description: "全天候为您服务"},
{icon: "icon-tupianliebiao", iconColor: "#d68353", bgColor: "#f4e1d3", info: "AI作画高级设置", description: "超精细设置,让您的作品别具一格"},
{icon: "icon-zuanshi", iconColor: "#9e7438", bgColor: "#fbefc5", info: "尊贵身份", description: "专属会员身份标识"}, {icon: "icon-zuanshi", iconColor: "#9e7438", bgColor: "#fbefc5", info: "尊贵身份", description: "专属会员身份标识"},
{icon: "icon-neirongguanli", iconColor: "#916bd4", bgColor: "#e7d7f7", info: "每周精选内容推送", description: "热点再也不会错过啦"}, {icon: "icon-neirongguanli", iconColor: "#916bd4", bgColor: "#e7d7f7", info: "每周精选内容推送", description: "热点再也不会错过啦"},
{icon: "icon-weixin", iconColor: "#6eae9c", bgColor: "#d5ebec", info: "微信小程序互通", description: "意境小程序自动同步权益"}, {icon: "icon-weixin", iconColor: "#6eae9c", bgColor: "#d5ebec", info: "多端互通", description: "意境小程序同步权益"},
{icon: "icon-jingqingqidai", iconColor: "#d5d5d7", bgColor: "#f2f3f5", info: "敬请期待", description: "更多精彩权益"}, {icon: "icon-jingqingqidai", iconColor: "#d5d5d7", bgColor: "#f2f3f5", info: "敬请期待", description: "更多精彩权益"},
], ],
purchaseList: [ purchaseList: [
"意境会员下载的全部内容,仅限个人使用,禁止商用。", "意境会员下载的全部内容,仅限个人使用,禁止商用。",
"会员市场可以叠加购买,续费后过期时间顺延", "会员市场可以叠加购买,续费后过期时间顺延",
"会员购买时立即生效,会员生效时常为购买时间加购买时长,比如您在2020年5月1日12点30分购买了一个月会员 (31天),则在2020年6月1日12点31分期", "会员购买时立即生效,会员生效时常为购买时间加购买时长,比如您在2020年5月1日12点30分购买了一个月会员 (31天),则在2020年6月1日12点31分期",
"会员权益会在会员到期后失效,但是使用会员权益添加并未删除的部分内容可以继续使用", "会员权益会在会员到期后失效",
"购买会员后不支持退款", "购买会员后不支持退款",
], ],
autoRenewalList: [ // autoRenewalList: [
"付款:用户确认购买并付款后记入iTunes账户;", // ":iTunes;",
"续费:苹果账户iTunes账户会在到期前24小时内扣费,扣费成功后订阅周期顺延一个订阅周期;", // ":iTunes24;",
"取消续订: 如需取消续订,请在订阅周期到期前24小时之前,手动在iTunes/AppleID设置管理中关闭自动续费功能,如到期前24小时内取消,依然会自动扣款再订阅一个周期。", // ": 24iTunes/AppleID24",
] // ]
} }
}, },
methods: { methods: {
//
async linkToUs(){
tt.openAwemeUserProfile({
success: (res) => {
console.log(res);
}
});
},
//
async getSystemInfo() {
let that = this;
//
uni.getSystemInfo({
success(res) {
that.systemInfo = res.osName
console.log('系统信息为:',that.systemInfo)
}
});
},
//vip //vip
async checkIsVip() { async checkIsVip() {
let that = this; let that = this;
@ -163,15 +191,30 @@
const res_add = await addVipOrder({ const res_add = await addVipOrder({
vipId: data.id vipId: data.id
}) })
//console.log('res_add',res_add)
if(res_add.data.code === 200){
let orderNo = res_add.data.data; let orderNo = res_add.data.data;
const res_uni = await unifiedOrder({ const res_uni = await unifiedOrder({
orderNo, orderNo,
sceneCode: 1, sceneCode: 1,
payType: 'dypay', payType: 'dypay',
}) })
//console.log('res_uni',res_uni)
if(res_uni.data.code === 200){
let {orderId,orderToken} = res_uni.data.data.dyThirdInOrderVo let {orderId,orderToken} = res_uni.data.data.dyThirdInOrderVo
this.tikPay(orderId,orderToken) this.tikPay(orderId,orderToken);
}else{
return uni.showToast({
title: res_uni.data.msg,
icon: 'none'
})
}
}else{
return uni.showToast({
title: res_add.data.msg,
icon: 'none'
})
}
}, },
tikPay(order_id, order_token) { tikPay(order_id, order_token) {
tt.pay({ tt.pay({
@ -194,13 +237,14 @@
}) })
}, },
// //
openIntro(){ // openIntro(){
console.log("打开会员说明") // console.log("")
}, // },
}, },
onShow() { onShow() {
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
this.checkIsVip(); this.checkIsVip();
this.getSystemInfo();
}, },
created() { created() {
if (!this.userInfo) { if (!this.userInfo) {
@ -226,11 +270,33 @@
padding: 30rpx; padding: 30rpx;
background: #fff; background: #fff;
border-radius: 0 0 60rpx 60rpx; border-radius: 0 0 60rpx 60rpx;
.iosStyle{
color:red;
font-size:35rpx;
}
.linkToUs{
width: 400rpx;
height: 80rpx;
margin-top: 30rpx;
//bottom: 50rpx;
background-color: $uni-primary;
border-radius: 50rpx;
//padding-bottom: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
font-size: 16px;
color: $uni-white;
}
.vip-box { .vip-box {
margin: 30px 0; margin: 30px 0;
@include flex(center, space-between); @include flex(center, space-between);
.vip-box__item { .vip-box__item {
width: 30%; width: 30%;
height: 300rpx; height: 300rpx;

Loading…
Cancel
Save