diff --git a/pages/creator/imgDetail.vue b/pages/creator/imgDetail.vue index 325c9a4..1e13099 100644 --- a/pages/creator/imgDetail.vue +++ b/pages/creator/imgDetail.vue @@ -207,23 +207,27 @@ var videoAd = null; //跳转开通VIP界面 goOpenVip() { let that = this; + that.isShowDownLoadBox() + uni.navigateTo({ + url:'/pages/userInfo/vip/vip' + }) //判断是否为ios,ios则提示不支持 - 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' - }) - } } }); + // 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' + // }) + // } // } // }); }, //加载激励视频广告 diff --git a/pages/userInfo/userInfo.vue b/pages/userInfo/userInfo.vue index e7e7feb..21d253f 100644 --- a/pages/userInfo/userInfo.vue +++ b/pages/userInfo/userInfo.vue @@ -10,8 +10,10 @@ {{userInfo.username}} - - + + 画意人 + 高级画意师 + 画意值:{{goldNum}} 点击登录 @@ -36,7 +38,7 @@ - 我的会员 + 会员中心 @@ -46,7 +48,7 @@ - 兑换绘画次数 + 兑换绘画点数 @@ -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 = { code: res.code, encryptedData: userInfo.encryptedData, @@ -196,9 +198,6 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons uni.showToast({ title: '登录成功!', icon: 'none', - success() { - this.queryGoldNum(); - } }) } }) @@ -211,7 +210,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons }).catch(res => {}) }, // 获取用户信息 - getUserInfoLogin() { + async getUserInfoLogin() { uni.getSetting({ success: (settingObj) => { if (settingObj.authSetting['scope.userInfo'] === undefined || settingObj.authSetting['scope.userInfo']) { diff --git a/pages/userInfo/vip/vip.vue b/pages/userInfo/vip/vip.vue index 0aac118..7be7851 100644 --- a/pages/userInfo/vip/vip.vue +++ b/pages/userInfo/vip/vip.vue @@ -1,5 +1,5 @@ @@ -97,33 +102,56 @@ active: 0, disabled: false, vipInfo: undefined, + systemInfo: undefined, 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-shuazi", iconColor: "#667dc9", bgColor: "#d5e2e9", info: "独享VIP素材", description: "万张热门表情模板等你diy"}, - {icon: "icon-tupian", iconColor: "#9474c3", bgColor: "#e7d7fb", info: "专属VIP板块", description: "让你成为斗图届的王者"}, - {icon: "icon-tupianliebiao", iconColor: "#d68353", bgColor: "#f4e1d3", info: "专辑一键保存", description: "轻松下载专辑内所有图"}, + {icon: "icon-shuazi", iconColor: "#667dc9", bgColor: "#d5e2e9", info: "情侣头像私人定制", description: "不要再和别人撞情头啦"}, + {icon: "icon-tupian", iconColor: "#9474c3", bgColor: "#e7d7fb", 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-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: "更多精彩权益"}, ], purchaseList: [ "意境会员下载的全部内容,仅限个人使用,禁止商用。", "会员市场可以叠加购买,续费后过期时间顺延", "会员购买时立即生效,会员生效时常为购买时间加购买时长,比如您在2020年5月1日12点30分购买了一个月会员 (31天),则在2020年6月1日12点31分期", - "会员权益会在会员到期后失效,但是使用会员权益添加并未删除的部分内容可以继续使用", + "会员权益会在会员到期后失效", "购买会员后不支持退款", ], - autoRenewalList: [ - "付款:用户确认购买并付款后记入iTunes账户;", - "续费:苹果账户iTunes账户会在到期前24小时内扣费,扣费成功后订阅周期顺延一个订阅周期;", - "取消续订: 如需取消续订,请在订阅周期到期前24小时之前,手动在iTunes/AppleID设置管理中关闭自动续费功能,如到期前24小时内取消,依然会自动扣款再订阅一个周期。", - ] + // autoRenewalList: [ + // "付款:用户确认购买并付款后记入iTunes账户;", + // "续费:苹果账户iTunes账户会在到期前24小时内扣费,扣费成功后订阅周期顺延一个订阅周期;", + // "取消续订: 如需取消续订,请在订阅周期到期前24小时之前,手动在iTunes/AppleID设置管理中关闭自动续费功能,如到期前24小时内取消,依然会自动扣款再订阅一个周期。", + // ] } }, 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 async checkIsVip() { let that = this; @@ -163,15 +191,30 @@ const res_add = await addVipOrder({ vipId: data.id }) - let orderNo = res_add.data.data; - const res_uni = await unifiedOrder({ - orderNo, - sceneCode: 1, - payType: 'dypay', - }) - let {orderId,orderToken} = res_uni.data.data.dyThirdInOrderVo - this.tikPay(orderId,orderToken) - + //console.log('res_add',res_add) + if(res_add.data.code === 200){ + let orderNo = res_add.data.data; + const res_uni = await unifiedOrder({ + orderNo, + sceneCode: 1, + payType: 'dypay', + }) + //console.log('res_uni',res_uni) + if(res_uni.data.code === 200){ + let {orderId,orderToken} = res_uni.data.data.dyThirdInOrderVo + 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) { tt.pay({ @@ -194,13 +237,14 @@ }) }, //会员说明 - openIntro(){ - console.log("打开会员说明") - }, + // openIntro(){ + // console.log("打开会员说明") + // }, }, onShow() { this.userInfo = uni.getStorageSync('userInfo') this.checkIsVip(); + this.getSystemInfo(); }, created() { if (!this.userInfo) { @@ -226,10 +270,32 @@ padding: 30rpx; background: #fff; 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 { margin: 30px 0; @include flex(center, space-between); + + .vip-box__item { width: 30%;