添加我的页面二级页面,添加会员充值页
|
|
@ -107,7 +107,7 @@ export class EventConstants {
|
|||
|
||||
static readonly JUMP_TO_DOWNLOAD_TASK_LIST = "client.jump.to.download.task.list" //跳转到下载任务列表
|
||||
|
||||
static readonly JUMP_TO_RECHARGE_DIAMOND = "client.jump.to.recharge.diamond" //跳转到钻石充值
|
||||
static readonly JUMP_TO_RECHARGE_DIAMOND = "client.jump.to.recharge.diamond" //跳转到M币充值
|
||||
|
||||
static readonly JUMP_TO_COUPON_LIST = "client.jump.to.coupon.list" //跳转优惠券列表
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export class RouterUrls {
|
|||
static readonly DOWNLOAD_HISTORY_PAGE = "pages/main/mine/history/DownloadHistoryPage"
|
||||
|
||||
/**
|
||||
* 钻石充值页
|
||||
* M币充值页
|
||||
*/
|
||||
static readonly RECHARGE_DIAMOND_PAGE = "pages/main/mine/diamond/DiamondPage"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,116 +19,6 @@ export struct BindPhoneDialog {
|
|||
|
||||
@State countDownTime: number = 0;
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
Text('绑定手机号')
|
||||
.width('auto')
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(16)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.alignRules({
|
||||
top: { anchor: '__container__', align: VerticalAlign.Top },
|
||||
left: { anchor: '__container__', align: HorizontalAlign.Start },
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End },
|
||||
})
|
||||
.margin({ top: 18 })
|
||||
.id('tv_title')
|
||||
|
||||
Image($r('app.media.ic_close'))
|
||||
.width(20)
|
||||
.height(20)
|
||||
.alignRules({
|
||||
top: { anchor: '__container__', align: VerticalAlign.Top },
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End }
|
||||
})
|
||||
.margin({ top: 12, right: 12 })
|
||||
.onClick(() => {
|
||||
this.controller.close();
|
||||
})
|
||||
|
||||
TextInput({ placeholder: '请输入手机号' })
|
||||
.height(48)
|
||||
.type(InputType.PhoneNumber)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(15)
|
||||
.placeholderColor($r('app.color.color_30ffffff'))
|
||||
.placeholderFont({ size: 15 })
|
||||
.maxLength(11)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderRadius(8)
|
||||
.margin({ top: 20, left: 16, right: 16 })
|
||||
.alignRules({
|
||||
top: { anchor: 'tv_title', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.id('et_phone')
|
||||
.onChange((value: string) => {
|
||||
this.phone = value;
|
||||
})
|
||||
|
||||
Row() {
|
||||
TextInput({ placeholder: '请输入验证码' })
|
||||
.height(48)
|
||||
.type(InputType.Number)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(15)
|
||||
.placeholderColor($r('app.color.color_30ffffff'))
|
||||
.placeholderFont({ size: 15 })
|
||||
.maxLength(6)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderRadius(8)
|
||||
.margin({ left: 16, right: 12 })
|
||||
.id('et_code')
|
||||
.onChange((value: string) => {
|
||||
this.code = value;
|
||||
})
|
||||
.layoutWeight(1)
|
||||
|
||||
Text(this.countDownTime === 0 && StrUtil.isEmpty(this.timestamp) ? '获取验证码' : this.countDownTime > 0 ? `${this.countDownTime}s` : '重新发送')
|
||||
.width(110)
|
||||
.height(48)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor($r("app.color.color_466afd"))
|
||||
.fontSize(15)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderRadius(8)
|
||||
.margin({ right: 16 })
|
||||
.onClick(() => {
|
||||
this.sendCode(this.phone);
|
||||
})
|
||||
}
|
||||
.alignRules({
|
||||
top: { anchor: 'et_phone', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.margin({ top: 14 })
|
||||
.id('layout_code')
|
||||
|
||||
Stack() {
|
||||
Button('确定', { type: ButtonType.Capsule, stateEffect: true })
|
||||
.width('100%')
|
||||
.height(46)
|
||||
.fontColor(Color.White)
|
||||
.fontSize(15)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.linearGradient({
|
||||
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.onClick(() => {
|
||||
this.bindPhone();
|
||||
})
|
||||
}
|
||||
.padding({ left: 16, right: 16 })
|
||||
.margin({ top: 55 })
|
||||
.alignRules({
|
||||
top: { anchor: 'layout_code', align: VerticalAlign.Bottom }
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(320)
|
||||
.borderRadius(20)
|
||||
.backgroundColor($r('app.color.window_background'))
|
||||
}
|
||||
|
||||
sendCode(phone: string) {
|
||||
if (StrUtil.isEmpty(this.phone)) {
|
||||
ToastUtils.show('请输入手机号');
|
||||
|
|
@ -202,4 +92,116 @@ export struct BindPhoneDialog {
|
|||
LoadingDialog.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
Text('绑定手机号')
|
||||
.width('auto')
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(16)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.alignRules({
|
||||
top: { anchor: '__container__', align: VerticalAlign.Top },
|
||||
left: { anchor: '__container__', align: HorizontalAlign.Start },
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End },
|
||||
})
|
||||
.margin({ top: 18 })
|
||||
.id('tv_title')
|
||||
|
||||
Image($r('app.media.ic_close'))
|
||||
.width(20)
|
||||
.height(20)
|
||||
.alignRules({
|
||||
top: { anchor: '__container__', align: VerticalAlign.Top },
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End }
|
||||
})
|
||||
.margin({ top: 12, right: 12 })
|
||||
.onClick(() => {
|
||||
this.controller.close();
|
||||
})
|
||||
|
||||
TextInput({ placeholder: '请输入手机号' })
|
||||
.height(48)
|
||||
.type(InputType.PhoneNumber)
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(15)
|
||||
.placeholderColor($r('app.color.color_bcbcbc'))
|
||||
.placeholderFont({ size: 15 })
|
||||
.maxLength(11)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.borderRadius(8)
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.margin({ top: 20, left: 16, right: 16 })
|
||||
.alignRules({
|
||||
top: { anchor: 'tv_title', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.id('et_phone')
|
||||
.onChange((value: string) => {
|
||||
this.phone = value;
|
||||
})
|
||||
|
||||
Row() {
|
||||
TextInput({ placeholder: '请输入验证码' })
|
||||
.height(48)
|
||||
.type(InputType.Number)
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(15)
|
||||
.placeholderColor($r('app.color.color_bcbcbc'))
|
||||
.placeholderFont({ size: 15 })
|
||||
.maxLength(6)
|
||||
.backgroundColor(Color.Transparent)
|
||||
.borderRadius(8)
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.margin({ left: 16, right: 12 })
|
||||
.id('et_code')
|
||||
.onChange((value: string) => {
|
||||
this.code = value;
|
||||
})
|
||||
.layoutWeight(1)
|
||||
|
||||
Text(this.countDownTime === 0 && StrUtil.isEmpty(this.timestamp) ? '获取验证码' : this.countDownTime > 0 ? `${this.countDownTime}s` : '重新发送')
|
||||
.width(110)
|
||||
.height(48)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor($r("app.color.color_466afd"))
|
||||
.fontSize(15)
|
||||
.borderRadius(8)
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.margin({ right: 16 })
|
||||
.onClick(() => {
|
||||
this.sendCode(this.phone);
|
||||
})
|
||||
}
|
||||
.alignRules({
|
||||
top: { anchor: 'et_phone', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.margin({ top: 14 })
|
||||
.id('layout_code')
|
||||
|
||||
Stack() {
|
||||
Button('确定', { type: ButtonType.Capsule, stateEffect: true })
|
||||
.width('100%')
|
||||
.height(46)
|
||||
.fontColor(Color.White)
|
||||
.fontSize(15)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.backgroundColor($r('app.color.color_466afd'))
|
||||
.onClick(() => {
|
||||
this.bindPhone();
|
||||
})
|
||||
}
|
||||
.padding({ left: 16, right: 16 })
|
||||
.margin({ top: 55 })
|
||||
.alignRules({
|
||||
top: { anchor: 'layout_code', align: VerticalAlign.Bottom }
|
||||
})
|
||||
}
|
||||
.width('100%')
|
||||
.height(320)
|
||||
.borderRadius(20)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ function defaultBuilder(option: EditTextDialogOption) {
|
|||
RelativeContainer() {
|
||||
Text(option.title ?? '编辑')
|
||||
.width('auto')
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontColor($r('app.color.color_212226'))
|
||||
.fontSize(18)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.alignRules( {
|
||||
|
|
@ -40,12 +40,12 @@ function defaultBuilder(option: EditTextDialogOption) {
|
|||
TextInput({ placeholder: option.hintText ?? '请输入', text: option.content})
|
||||
.width('90%')
|
||||
.height(48)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontColor($r('app.color.color_222222'))
|
||||
.fontSize(15)
|
||||
.placeholderColor($r('app.color.color_30ffffff'))
|
||||
.placeholderColor($r('app.color.color_999999'))
|
||||
.placeholderFont({ size: 15 })
|
||||
.maxLength(12)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(8)
|
||||
.margin({ top: 16 })
|
||||
.onChange((content) => {
|
||||
|
|
@ -55,13 +55,10 @@ function defaultBuilder(option: EditTextDialogOption) {
|
|||
Button('确定', { type: ButtonType.Capsule, stateEffect: true })
|
||||
.fontColor(Color.White)
|
||||
.fontSize(16)
|
||||
.linearGradient({
|
||||
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.width('90%')
|
||||
.height(46)
|
||||
.margin({ top: 30 })
|
||||
.backgroundColor($r('app.color.color_466afd'))
|
||||
.onClick(() => {
|
||||
if (StrUtil.isEmpty(option.content)) {
|
||||
ToastUtils.show('内容不能为空')
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function defaultBuilder(option: TipDialogOption) {
|
|||
.fontColor(Color.White)
|
||||
.fontSize(16)
|
||||
.backgroundColor($r("app.color.color_466afd"))
|
||||
.margin({ top: 20, bottom: 20 })
|
||||
.margin({ top: 20 })
|
||||
.onClick(() => {
|
||||
SimpleTipDialog.dismiss();
|
||||
if (option.callback?.confirm) {
|
||||
|
|
@ -42,7 +42,8 @@ function defaultBuilder(option: TipDialogOption) {
|
|||
}
|
||||
})
|
||||
}
|
||||
.padding({ top: 22, bottom: 22 })
|
||||
.width('100%')
|
||||
.padding({ top: 20, bottom: 20 })
|
||||
|
||||
Image($r('app.media.ic_close_dialog')).width(18).height(18)
|
||||
.margin({top: 10, right: 10})
|
||||
|
|
@ -56,6 +57,7 @@ function defaultBuilder(option: TipDialogOption) {
|
|||
.borderRadius(20)
|
||||
.backgroundColor(Color.White)
|
||||
.width('80%')
|
||||
.height('auto')
|
||||
}
|
||||
|
||||
export class SimpleTipDialog {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ function defaultBuilder(option: TipDialogOption) {
|
|||
}
|
||||
.margin({top: 20})
|
||||
}
|
||||
.width('100%')
|
||||
.padding({ top: 20, bottom: 20 })
|
||||
}
|
||||
.borderRadius(20)
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ export class DiamondRuleEntity {
|
|||
|
||||
static getRuleList(): Array<DiamondRuleEntity> {
|
||||
const list = new Array<DiamondRuleEntity>()
|
||||
list.push(new DiamondRuleEntity('一、固定钻石领取', '会员用户每月最后一天,系统会固定发放500钻石到用户平台账户。'))
|
||||
list.push(new DiamondRuleEntity('二、固定钻石刷新', '若会员用户在第一个月有没用完的钻石,那么会在本月最后一天重置不会留存到第二月。'))
|
||||
list.push(new DiamondRuleEntity('三、兑换钻石', '会员兑换后的钻石统一叫【兑换钻石】,【兑换钻石】不同于【固定钻石】每月刷新钻石数量;用户兑换了多少就可以使用多少,用完截止,没有时间限制,也没有每月最后一天刷新。'))
|
||||
list.push(new DiamondRuleEntity('四、重复兑换钻石', '兑换钻石可重复购买,用完截止,没有时间限制,也没有每月最后一天刷新。'))
|
||||
list.push(new DiamondRuleEntity('一、固定M币领取', '会员用户每月最后一天,系统会固定发放500M币到用户平台账户。'))
|
||||
list.push(new DiamondRuleEntity('二、固定M币刷新', '若会员用户在第一个月有没用完的M币,那么会在本月最后一天重置不会留存到第二月。'))
|
||||
list.push(new DiamondRuleEntity('三、兑换M币', '会员兑换后的M币统一叫【兑换M币】,【兑换M币】不同于【固定M币】每月刷新M币数量;用户兑换了多少就可以使用多少,用完截止,没有时间限制,也没有每月最后一天刷新。'))
|
||||
list.push(new DiamondRuleEntity('四、重复兑换M币', '兑换M币可重复购买,用完截止,没有时间限制,也没有每月最后一天刷新。'))
|
||||
return list
|
||||
}
|
||||
}
|
||||
|
|
@ -17,86 +17,156 @@ export class DownloadHistoryEntity {
|
|||
case 'b23.tv':
|
||||
case 'm.bilibili.com':
|
||||
case 'www.bilibili.com':
|
||||
return '#F4306F'
|
||||
return '#FFE1EB'
|
||||
case 'v.douyin.com':
|
||||
case 'www.iesdouyin.com':
|
||||
case 'vt.tiktok.com':
|
||||
return '#80FFFFFF'
|
||||
return '#D9D9D9'
|
||||
case 'm.toutiao.com':
|
||||
return '#F91716'
|
||||
return '#FFD9D9'
|
||||
case 'video.weibo.com':
|
||||
case 'weibo.com':
|
||||
case 'm.weibo.cn':
|
||||
case 'shop.sc.weibo.com':
|
||||
return '#DE860C'
|
||||
return '#FFF0DC'
|
||||
case 'v.kuaishou.com':
|
||||
return '#DE440D'
|
||||
return '#FFE4DA'
|
||||
case 'wxapp.tc.qq.com':
|
||||
case 'm.v.qq.com':
|
||||
return '#0D95F3'
|
||||
return '#D9F0FF'
|
||||
case 'twitter.com':
|
||||
case 'x.com':
|
||||
return '#DCF1FC'
|
||||
case 'xhslink.com':
|
||||
case 'www.xiaohongshu.com':
|
||||
return '#FFDEE2'
|
||||
case 'instagram.com':
|
||||
case 'www.instagram.com':
|
||||
return '#EEE1FE'
|
||||
case 'mr.baidu.com':
|
||||
case 'm.baidu.com':
|
||||
case 'mbd.baidu.com':
|
||||
return '#EAF1FF'
|
||||
case 'youtu.be':
|
||||
case 'youtube.com':
|
||||
case 'm.youtube.com':
|
||||
case 'www.youtube.com':
|
||||
return '#FFE8E8'
|
||||
case 'mp.weixin.qq.com':
|
||||
return '#E5FAE5'
|
||||
case 'e.tb.cn':
|
||||
case 'm.tb.cn':
|
||||
return '#FFEFE5'
|
||||
case 'www.facebook.com':
|
||||
return '#E6EFFE'
|
||||
case 'v.ixigua.com':
|
||||
case 'www.ixigua.com':
|
||||
return '#FFDCE9'
|
||||
case 'mobile.yangkeduo.com':
|
||||
return '#FDE5E6'
|
||||
case 'm.youku.com':
|
||||
return '#D9F7FF'
|
||||
case '163cn.tv':
|
||||
return '#FDE5E6'
|
||||
case 'qishui.douyin.com':
|
||||
return '#DBFBDC'
|
||||
case 'qr.1688.com':
|
||||
case 'detail.m.1688.com':
|
||||
return '#FFEDE5'
|
||||
case 'h5.pipix.com':
|
||||
return '#FFEDF0'
|
||||
case 'app.cctv.com':
|
||||
return '#E5E5E5'
|
||||
case 'vk.com':
|
||||
return '#E9F3FD'
|
||||
case 'www.finkapp.cn':
|
||||
return '#FEEBEB'
|
||||
case 'novelquickapp.com':
|
||||
return '#FFF4EA'
|
||||
case 'video.weishi.qq.com':
|
||||
return '#EAEFFE'
|
||||
case 'm.ctrip.com':
|
||||
return '#E8F2FC'
|
||||
}
|
||||
return '#F0F0F0'
|
||||
}
|
||||
|
||||
getTypeTextColor(): string {
|
||||
switch (this.domain) {
|
||||
case 'b23.tv':
|
||||
case 'm.bilibili.com':
|
||||
case 'www.bilibili.com':
|
||||
return '#FD3575'
|
||||
case 'v.douyin.com':
|
||||
case 'www.iesdouyin.com':
|
||||
case 'vt.tiktok.com':
|
||||
return '#000000'
|
||||
case 'm.toutiao.com':
|
||||
return '#FF1A19'
|
||||
case 'video.weibo.com':
|
||||
case 'weibo.com':
|
||||
case 'm.weibo.cn':
|
||||
case 'shop.sc.weibo.com':
|
||||
return '#FF9C13'
|
||||
case 'v.kuaishou.com':
|
||||
return '#FE4806'
|
||||
case 'wxapp.tc.qq.com':
|
||||
case 'm.v.qq.com':
|
||||
return '#0097FF'
|
||||
case 'twitter.com':
|
||||
case 'x.com':
|
||||
return '#139EEA'
|
||||
case 'xhslink.com':
|
||||
case 'www.xiaohongshu.com':
|
||||
return '#EA3046'
|
||||
return '#FF213C'
|
||||
case 'instagram.com':
|
||||
case 'www.instagram.com':
|
||||
return '#8D32F4'
|
||||
return '#8F35F6'
|
||||
case 'mr.baidu.com':
|
||||
case 'm.baidu.com':
|
||||
case 'mbd.baidu.com':
|
||||
return '#0D95F3'
|
||||
return '#2F73FF'
|
||||
case 'youtu.be':
|
||||
case 'youtube.com':
|
||||
case 'm.youtube.com':
|
||||
case 'www.youtube.com':
|
||||
return '#F92C2C'
|
||||
return '#FF2222'
|
||||
case 'mp.weixin.qq.com':
|
||||
return '#1DDB50'
|
||||
return '#01D200'
|
||||
case 'e.tb.cn':
|
||||
case 'm.tb.cn':
|
||||
return '#F96E12'
|
||||
return '#FF6601'
|
||||
case 'www.facebook.com':
|
||||
return '#1B6EF6'
|
||||
return '#0865FE'
|
||||
case 'v.ixigua.com':
|
||||
case 'www.ixigua.com':
|
||||
return '#F01566'
|
||||
return '#FF146B'
|
||||
case 'mobile.yangkeduo.com':
|
||||
return '#F40F18'
|
||||
return '#F30009'
|
||||
case 'm.youku.com':
|
||||
return '#0CB3E2'
|
||||
return '#00C6FE'
|
||||
case '163cn.tv':
|
||||
return '#F42C34'
|
||||
return '#F30009'
|
||||
case 'qishui.douyin.com':
|
||||
return '#20C485'
|
||||
return '#0AE515'
|
||||
case 'qr.1688.com':
|
||||
case 'detail.m.1688.com':
|
||||
return '#F65611'
|
||||
return '#FF4C00'
|
||||
case 'h5.pipix.com':
|
||||
return '#EE3958'
|
||||
return '#FF5370'
|
||||
case 'app.cctv.com':
|
||||
return '#80FFFFFF'
|
||||
return '#000000'
|
||||
case 'vk.com':
|
||||
return '#1E82F3'
|
||||
return '#2888F5'
|
||||
case 'www.finkapp.cn':
|
||||
return '#F62C2C'
|
||||
return '#FC4040'
|
||||
case 'novelquickapp.com':
|
||||
return '#F18221'
|
||||
return '#FF9436'
|
||||
case 'video.weishi.qq.com':
|
||||
return '#2E5DF0'
|
||||
return '#3565FB'
|
||||
case 'm.ctrip.com':
|
||||
return '#177DF0'
|
||||
return '#1E82E9'
|
||||
}
|
||||
return '#33FFFFFF'
|
||||
}
|
||||
|
||||
getTypeTextColor(): string {
|
||||
switch (this.domain) {
|
||||
case 'v.douyin.com':
|
||||
case 'app.cctv.com':
|
||||
return '#CC000000'
|
||||
}
|
||||
return '#CCFFFFFF'
|
||||
return '#999999'
|
||||
}
|
||||
}
|
||||
|
|
@ -29,4 +29,21 @@ export function mineMenuList(): ArrayList<MenuEntity> {
|
|||
list.add(new MenuEntity($r('app.media.ic_mine_icon3'), "意见反馈", "feedback"))
|
||||
list.add(new MenuEntity($r('app.media.ic_mine_icon4'), "联系客服", "service"))
|
||||
return list;
|
||||
}
|
||||
|
||||
export function vipTipsList(): ArrayList<MenuEntity> {
|
||||
let list = new ArrayList<MenuEntity>()
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon1"), "素材图库", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon2"), "视频去水印", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon3"), "高清图片", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon4"), "视频加水印", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon5"), "视频提取", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon6"), "音频提取", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon7"), "文案提取", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon8"), "无广告", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon9"), "海量次数", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon10"), "海量流量", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon11"), "专属客服", ""))
|
||||
list.add(new MenuEntity($r("app.media.ic_vip_icon12"), "在线浏览", ""))
|
||||
return list;
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ export class Api {
|
|||
static readonly WX_SERVICE = '/api/weixin/service'
|
||||
|
||||
/**
|
||||
* 钻石信息
|
||||
* M币信息
|
||||
*/
|
||||
static readonly USER_DIAMOND_INFO = '/api/diamond'
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class ApiService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 钻石信息
|
||||
* M币信息
|
||||
*/
|
||||
getDiamondInfo(): Promise<HttpResult> {
|
||||
return AxiosRequest.get(Api.USER_DIAMOND_INFO)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ struct TakeMaterialPage {
|
|||
if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) {
|
||||
this.getUIContext().getRouter().pushUrl({url: RouterUrls.RECHARGE_DIAMOND_PAGE});
|
||||
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_material')
|
||||
ToastUtils.show('钻石已用完')
|
||||
ToastUtils.show('M币已用完')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ struct MaterialDetailPage {
|
|||
Stack() {
|
||||
Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
||||
Row() {
|
||||
Image($r('app.media.ic_download1')).width(22).height(22)
|
||||
Image($r("app.media.ic_download_material")).width(22).height(22)
|
||||
Text('下载').fontColor(Color.White).fontSize(15).fontWeight(FontWeight.Medium)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ struct WxVideoPage {
|
|||
if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) {
|
||||
this.getUIContext().getRouter().pushUrl({ url: RouterUrls.RECHARGE_DIAMOND_PAGE });
|
||||
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_wechat_video')
|
||||
ToastUtils.show('钻石已用完')
|
||||
ToastUtils.show('M币已用完')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -408,55 +408,6 @@ export struct MinePage {
|
|||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
|
||||
/*Column() {
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon1"), leftText: '免单挑战' })
|
||||
.height(60)
|
||||
.id('item_challenge')
|
||||
.visibility(*//*this.showChallenge ? Visibility.Visible : Visibility.None*//*Visibility.None)
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon2"), leftText: '兑换钻石' })
|
||||
.height(60)
|
||||
.id('item_diamond')
|
||||
.onClick(() => {
|
||||
this.getUIContext().getRouter().pushUrl({url: RouterUrls.RECHARGE_DIAMOND_PAGE});
|
||||
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'center')
|
||||
})
|
||||
.visibility(this.diamondInfo && this.diamondInfo?.buy_total > 0 ? Visibility.Visible : Visibility.None)
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon3"), leftText: '优惠券' }).height(60).id('item_coupon')
|
||||
.visibility(Visibility.None)
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon4"), leftText: '分享APP' })
|
||||
.height(60)
|
||||
.id('item_share')
|
||||
.visibility(*//*this.showShare ? Visibility.Visible : Visibility.None*//*Visibility.None)
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon5"), leftText: '联系客服' }).height(60).id('item_service')
|
||||
.onClick(() => {
|
||||
if (!WXApi.isWXAppInstalled()) {
|
||||
ToastUtils.show('未安装微信客户端,请先下载安装微信客户端');
|
||||
return;
|
||||
}
|
||||
this.viewModel.getWxService()
|
||||
})
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon6"), leftText: '清除缓存', rightText: FileUtil.getFormatFileSize(this.cacheSize) }).height(60).id('item_cache')
|
||||
.onClick(() => {
|
||||
if (this.cacheSize > 0) {
|
||||
TipDialog.show(this.getUIContext(), {title: '提示', content: '确定清除缓存?', callback: {
|
||||
confirm: () => {
|
||||
this.clearCache()
|
||||
}
|
||||
}})
|
||||
}
|
||||
})
|
||||
TextItemView({ image: $r("app.media.ic_mine_icon7"), leftText: '设置' }).height(60).id('item_setting')
|
||||
.onClick(() => {
|
||||
this.getUIContext().getRouter().pushUrl({url: RouterUrls.SETTING_PAGE});
|
||||
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_SYSTEM_SETTING)
|
||||
})
|
||||
}
|
||||
.margin({ top: 16, left: 16, right: 16 })
|
||||
.backgroundColor('#1E1D24')
|
||||
.borderRadius(8)*/
|
||||
|
||||
Blank().layoutWeight(1)
|
||||
}
|
||||
}
|
||||
.alignContent(Alignment.Top)
|
||||
|
|
|
|||
|
|
@ -275,11 +275,11 @@ struct DiamondPage {
|
|||
.margin({ top: -30 })
|
||||
|
||||
Column() {
|
||||
Text('钻石消耗数量').fontColor('#8F4A2A').fontSize(16).fontWeight(FontWeight.Medium).margin({ top: 4 })
|
||||
Text('M币消耗数量').fontColor('#8F4A2A').fontSize(16).fontWeight(FontWeight.Medium).margin({ top: 4 })
|
||||
|
||||
Column() {
|
||||
Row() {
|
||||
Text('本月固定钻石数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('本月固定M币数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('每月重置')
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor('#FFA61E')
|
||||
|
|
@ -306,7 +306,7 @@ struct DiamondPage {
|
|||
.margin({top: 16})
|
||||
|
||||
Row() {
|
||||
Text('兑换钻石数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('兑换M币数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('用完即止')
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor('#FFA61E')
|
||||
|
|
@ -351,7 +351,7 @@ struct DiamondPage {
|
|||
.borderRadius(10)
|
||||
.clip(true)
|
||||
|
||||
Text('钻石套餐').fontColor($r('app.color.color_1a1a1a')).fontSize(16).fontWeight(FontWeight.Medium).margin({left: 16, top: 26})
|
||||
Text('M币套餐').fontColor($r('app.color.color_1a1a1a')).fontSize(16).fontWeight(FontWeight.Medium).margin({left: 16, top: 26})
|
||||
.alignSelf(ItemAlign.Start)
|
||||
|
||||
List({space: 12}) {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ export struct DownloadHistoryItemPage {
|
|||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.scrollBar(BarState.Off)
|
||||
.onScrollIndex((start: number, end: number) => {
|
||||
// 当达到列表末尾时,触发新数据加载。
|
||||
if (this.canLoadMore && end >= this.historyList.length - 1) {
|
||||
|
|
|
|||
|
|
@ -4,21 +4,28 @@ import { TipDialog } from '../../../../dialog/TipDialog';
|
|||
import { TitleBar } from '../../../../view/TitleBar';
|
||||
import { DownloadHistoryViewModel } from '../../../../viewModel/DownloadHistoryViewModel';
|
||||
import { DownloadHistoryItemPage } from './DownloadHistoryItemPage';
|
||||
import { CommonModifier } from '@kit.ArkUI';
|
||||
|
||||
@Entry
|
||||
@ComponentV2
|
||||
struct DownloadHistory {
|
||||
@Local tabBarModifier: CommonModifier = new CommonModifier()
|
||||
@Local currentIndex: number = 0;
|
||||
tabController: TabsController = new TabsController();
|
||||
titles: Array<string> = ['本月', '上月'];
|
||||
|
||||
viewModel: DownloadHistoryViewModel = new DownloadHistoryViewModel(this.getUIContext())
|
||||
private tabController: TabsController = new TabsController();
|
||||
private titles: Array<string> = ['本月', '上月'];
|
||||
|
||||
private viewModel: DownloadHistoryViewModel = new DownloadHistoryViewModel(this.getUIContext())
|
||||
|
||||
@Monitor('viewModel.deleteHistory')
|
||||
onDeleteDownloadHistory(monitor: IMonitor) {
|
||||
AppUtil.getContext().eventHub.emit(EventConstants.DownloadHistoryRefreshEvent, this.currentIndex)
|
||||
}
|
||||
|
||||
aboutToAppear(): void {
|
||||
this.tabBarModifier.align(Alignment.Start)
|
||||
}
|
||||
|
||||
getStartTime(): number {
|
||||
let nowDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 1, 1)
|
||||
let lastDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 2, 1)
|
||||
|
|
@ -41,41 +48,39 @@ struct DownloadHistory {
|
|||
|
||||
build() {
|
||||
Column() {
|
||||
TitleBar({ title: '本月下载' })
|
||||
TitleBar({ title: '提取记录' })
|
||||
|
||||
Stack({ alignContent: Alignment.TopStart }) {
|
||||
Tabs({ barPosition: BarPosition.Start, controller: this.tabController }) {
|
||||
Stack({ alignContent: Alignment.TopEnd }) {
|
||||
Tabs({ barPosition: BarPosition.Start, controller: this.tabController, barModifier: this.tabBarModifier }) {
|
||||
TabContent() {
|
||||
DownloadHistoryItemPage({type: 0})
|
||||
}
|
||||
.tabBar(this.tabBuilder(this.titles[0], 0))
|
||||
|
||||
TabContent() {
|
||||
DownloadHistoryItemPage({type: 1})
|
||||
}
|
||||
.tabBar(this.tabBuilder(this.titles[1], 1))
|
||||
}
|
||||
.scrollable(false)
|
||||
/*.onSelected((index: number) => {
|
||||
.barMode(BarMode.Scrollable)
|
||||
.onSelected((index: number) => {
|
||||
this.currentIndex = index;
|
||||
})*/
|
||||
})
|
||||
|
||||
Row({ space: 40 }) {
|
||||
ForEach(this.titles, (title: string, index) => {
|
||||
this.tab(title, index);
|
||||
})
|
||||
Blank().layoutWeight(1)
|
||||
Row() {
|
||||
Image($r('app.media.ic_clear_record')).width(16).height(16)
|
||||
Text('全部清空').fontColor($r('app.color.color_80ffffff')).fontSize(12).margin({ left: 4 })
|
||||
}
|
||||
.onClick(() => {
|
||||
TipDialog.show(this.getUIContext(), {title: '提示', content: '确定清空记录?', callback: {
|
||||
confirm: () => {
|
||||
this.viewModel.deleteHistoryList(`${this.getStartTime()}`, `${this.getEndTime()}`)
|
||||
}
|
||||
}})
|
||||
})
|
||||
}.padding({ left: 16, right: 16 })
|
||||
.margin({ top: 10 })
|
||||
Row() {
|
||||
Image($r('app.media.ic_clear_record')).width(16).height(16)
|
||||
Text('全部清空').fontColor('#6C7084').fontSize(12).margin({ left: 4 })
|
||||
}
|
||||
.onClick(() => {
|
||||
TipDialog.show(this.getUIContext(), {title: '提示', content: '确定清空记录?', callback: {
|
||||
confirm: () => {
|
||||
this.viewModel.deleteHistoryList(`${this.getStartTime()}`, `${this.getEndTime()}`)
|
||||
}
|
||||
}})
|
||||
})
|
||||
.height(50)
|
||||
.margin({ top: 3, right: 16 })
|
||||
}.layoutWeight(1)
|
||||
}
|
||||
.width('100%')
|
||||
|
|
@ -84,19 +89,18 @@ struct DownloadHistory {
|
|||
}
|
||||
|
||||
@Builder
|
||||
tab(tabName: string, tabIndex: number) {
|
||||
Row() {
|
||||
Text(tabName)
|
||||
.fontSize(this.currentIndex === tabIndex ? 17 : 14)
|
||||
.fontWeight(this.currentIndex === tabIndex ? FontWeight.Medium : FontWeight.Regular)
|
||||
.lineHeight(24)
|
||||
.fontColor(tabIndex === this.currentIndex ? $r("app.color.color_466afd") : $r('app.color.color_50ffffff'))
|
||||
tabBuilder(title: string, targetIndex: number) {
|
||||
Stack() {
|
||||
if (this.currentIndex === targetIndex) {
|
||||
Image($r('app.media.ic_tab_indicator')).width(27).height(11).margin({ top: 13 })
|
||||
}
|
||||
Text(title)
|
||||
.fontColor(this.currentIndex === targetIndex ? $r("app.color.color_212226") : $r('app.color.color_5c5f6c'))
|
||||
.fontSize(this.currentIndex === targetIndex ? 16 : 14)
|
||||
.fontWeight(this.currentIndex === targetIndex ? FontWeight.Medium : FontWeight.Regular)
|
||||
}
|
||||
.width('auto')
|
||||
.height('auto')
|
||||
.onClick(() => {
|
||||
this.tabController.changeIndex(tabIndex);
|
||||
this.currentIndex = tabIndex;
|
||||
})
|
||||
.height(50)
|
||||
.margin({ left: targetIndex === 0 ? 16 : 40 })
|
||||
}
|
||||
}
|
||||
|
|
@ -113,15 +113,15 @@ struct BindAccountPage {
|
|||
|
||||
build() {
|
||||
Column() {
|
||||
TitleBar({ title: '账号绑定' }).width('100%')
|
||||
TitleBar({ title: '账号绑定' }).backgroundColor(Color.White)
|
||||
Row() {
|
||||
Image($r('app.media.ic_bind_wx')).width(30).height(30)
|
||||
Text('微信绑定').fontColor(Color.White).fontSize(15).layoutWeight(1).margin({left: 14})
|
||||
Text('微信绑定').fontColor($r('app.color.color_1a1a1a')).fontSize(15).layoutWeight(1).margin({left: 14})
|
||||
Text(StrUtil.isEmpty(this.userEntity?.unionid) ? '立即绑定' : '解除绑定')
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor(Color.White)
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(12)
|
||||
.borderColor(Color.White)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.borderWidth(1)
|
||||
.borderRadius(4)
|
||||
.width(64)
|
||||
|
|
@ -145,16 +145,16 @@ struct BindAccountPage {
|
|||
}})
|
||||
}
|
||||
})
|
||||
}.width('100%').height(60).padding({ left: 16, right: 16 })
|
||||
Divider().color($r('app.color.color_10ffffff')).strokeWidth(1).margin({left: 16, right: 16})
|
||||
}.width('100%').height(60).padding({ left: 16, right: 16 }).backgroundColor(Color.White)
|
||||
Divider().color('#EFF2F7').strokeWidth(1).margin({left: 16, right: 16})
|
||||
Row() {
|
||||
Image($r('app.media.ic_bind_phone')).width(30).height(30)
|
||||
Text('手机绑定').fontColor(Color.White).fontSize(15).layoutWeight(1).margin({left: 14})
|
||||
Text('手机绑定').fontColor($r('app.color.color_1a1a1a')).fontSize(15).layoutWeight(1).margin({left: 14})
|
||||
Text(StrUtil.isEmpty(this.userEntity?.phone) ? '立即绑定' : '解除绑定')
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor(Color.White)
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(12)
|
||||
.borderColor(Color.White)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.borderWidth(1)
|
||||
.borderRadius(4)
|
||||
.width(64)
|
||||
|
|
@ -178,7 +178,7 @@ struct BindAccountPage {
|
|||
}})
|
||||
}
|
||||
})
|
||||
}.width('100%').height(60).padding({ left: 16, right: 16 })
|
||||
}.width('100%').height(60).padding({ left: 16, right: 16 }).backgroundColor(Color.White)
|
||||
}
|
||||
.backgroundColor($r('app.color.window_background'))
|
||||
.height('100%')
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ struct ManageAccountPage {
|
|||
onLoginChange(monitor: IMonitor) {
|
||||
const loginEntity = monitor.value()?.now as LoginEntity;
|
||||
LoginManager.saveToken(loginEntity.token);
|
||||
LoginManager.saveLastLoginType('device')
|
||||
LoginManager.saveLastUserInfo(LoginManager.getUserInfo()!!);
|
||||
ConfigManager.saveBindWxPlaybackHelper(false);
|
||||
ConfigManager.saveBindWxVideoHelper(false);
|
||||
|
|
@ -76,27 +77,12 @@ struct ManageAccountPage {
|
|||
|
||||
build() {
|
||||
Column() {
|
||||
TitleBar({ title: '名下账户管理' }).width('100%')
|
||||
TitleBar({ title: '账户管理' }).backgroundColor(Color.White)
|
||||
|
||||
Scroll() {
|
||||
Column() {
|
||||
Text('当前登录的账户')
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(15)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.margin({ left: 20, top: 24, right: 20 })
|
||||
.alignSelf(ItemAlign.Start)
|
||||
|
||||
AccountItemView({ account: this.currentAccount }).margin({ left: 20, top: 14, right: 20 })
|
||||
|
||||
Text('你名下其他账户')
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(15)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.margin({ left: 20, top: 30, right: 20 })
|
||||
.alignSelf(ItemAlign.Start)
|
||||
.visibility(this.accountList.length > 0 ? Visibility.Visible : Visibility.Hidden)
|
||||
|
||||
List() {
|
||||
ForEach(this.accountList, (item: AccountEntity) => {
|
||||
ListItem() {
|
||||
|
|
@ -104,7 +90,7 @@ struct ManageAccountPage {
|
|||
}
|
||||
.margin({ left: 20, top: 14, right: 20 })
|
||||
.onClick(() => {
|
||||
TipDialog.show(this.getUIContext(), {content: '您确定要切换账户吗?', callback: {
|
||||
TipDialog.show(this.getUIContext(), {title: '温馨提示', content: '是否确定切换账号?', callback: {
|
||||
confirm: () => {
|
||||
LoginManager.saveToken('');
|
||||
this.viewModel.changeAccount(item.user_id);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct FeedbackPage {
|
|||
Scroll() {
|
||||
Column() {
|
||||
Row() {
|
||||
Text('请选择您要反馈的问题').fontColor($r('app.color.color_90ffffff')).fontSize(14)
|
||||
Text('请选择您要反馈的问题').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('*').fontColor('#FF3838')
|
||||
}
|
||||
.width('100%')
|
||||
|
|
@ -62,16 +62,12 @@ struct FeedbackPage {
|
|||
Row() {
|
||||
Button('产品建议', { type: ButtonType.Normal })
|
||||
.height(32)
|
||||
.fontColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_90ffffff') :
|
||||
$r('app.color.color_50ffffff'))
|
||||
.fontColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
|
||||
.fontSize(14)
|
||||
.linearGradient({
|
||||
colors: [[this.type === FeedbackType.SUGGESTION ? '#F62C6C' : Color.Transparent, 0.0],
|
||||
[this.type === FeedbackType.SUGGESTION ? '#FC4F54' : Color.Transparent, 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor(this.type === FeedbackType.SUGGESTION ? Color.Transparent : $r('app.color.color_222222'))
|
||||
.backgroundColor(this.type === FeedbackType.SUGGESTION ? '#1a466afd' : Color.Transparent)
|
||||
.borderRadius(4)
|
||||
.borderWidth(1)
|
||||
.borderColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
|
||||
.padding({ left: 14, right: 14 })
|
||||
.onClick(() => {
|
||||
this.type = FeedbackType.SUGGESTION
|
||||
|
|
@ -79,16 +75,12 @@ struct FeedbackPage {
|
|||
|
||||
Button('功能异常', { type: ButtonType.Normal })
|
||||
.height(32)
|
||||
.fontColor(this.type === FeedbackType.BUG ? $r('app.color.color_90ffffff') :
|
||||
$r('app.color.color_50ffffff'))
|
||||
.fontColor(this.type === FeedbackType.BUG ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
|
||||
.fontSize(14)
|
||||
.linearGradient({
|
||||
colors: [[this.type === FeedbackType.BUG ? '#F62C6C' : Color.Transparent, 0.0],
|
||||
[this.type === FeedbackType.BUG ? '#FC4F54' : Color.Transparent, 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor(this.type === FeedbackType.BUG ? Color.Transparent : $r('app.color.color_222222'))
|
||||
.backgroundColor(this.type === FeedbackType.BUG ? '#1a466afd' : Color.Transparent)
|
||||
.borderRadius(4)
|
||||
.borderWidth(1)
|
||||
.borderColor(this.type === FeedbackType.BUG ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
|
||||
.padding({ left: 14, right: 14 })
|
||||
.margin({ left: 12 })
|
||||
.onClick(() => {
|
||||
|
|
@ -97,16 +89,12 @@ struct FeedbackPage {
|
|||
|
||||
Button('其他问题', { type: ButtonType.Normal })
|
||||
.height(32)
|
||||
.fontColor(this.type === FeedbackType.OTHER ? $r('app.color.color_90ffffff') :
|
||||
$r('app.color.color_50ffffff'))
|
||||
.fontColor(this.type === FeedbackType.OTHER ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
|
||||
.fontSize(14)
|
||||
.linearGradient({
|
||||
colors: [[this.type === FeedbackType.OTHER ? '#F62C6C' : Color.Transparent, 0.0],
|
||||
[this.type === FeedbackType.OTHER ? '#FC4F54' : Color.Transparent, 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor(this.type === FeedbackType.OTHER ? Color.Transparent : $r('app.color.color_222222'))
|
||||
.backgroundColor(this.type === FeedbackType.OTHER ? '#1a466afd' : Color.Transparent)
|
||||
.borderRadius(4)
|
||||
.borderWidth(1)
|
||||
.borderColor(this.type === FeedbackType.OTHER ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
|
||||
.padding({ left: 14, right: 14 })
|
||||
.margin({ left: 12 })
|
||||
.onClick(() => {
|
||||
|
|
@ -116,7 +104,7 @@ struct FeedbackPage {
|
|||
.margin({ top: 16 })
|
||||
|
||||
Row() {
|
||||
Text('问题描述').fontColor($r('app.color.color_90ffffff')).fontSize(14)
|
||||
Text('问题描述').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('*').fontColor('#FF3838')
|
||||
}
|
||||
.width('100%')
|
||||
|
|
@ -125,13 +113,15 @@ struct FeedbackPage {
|
|||
RelativeContainer() {
|
||||
TextArea({ placeholder: '请输入详情内容' })
|
||||
.height('100%')
|
||||
.placeholderColor($r('app.color.color_30ffffff'))
|
||||
.placeholderColor($r('app.color.color_bcbcbc'))
|
||||
.placeholderFont({ size: 14 })
|
||||
.fontSize(14)
|
||||
.fontColor($r('app.color.color_80ffffff'))
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.maxLength(200)
|
||||
.borderRadius(8)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.backgroundColor(Color.Transparent)
|
||||
.onChange((value: string) => {
|
||||
this.contentText = value
|
||||
})
|
||||
|
|
@ -145,15 +135,15 @@ struct FeedbackPage {
|
|||
}.height(142).margin({ top: 16 })
|
||||
|
||||
Row() {
|
||||
Text('上传图片').fontColor($r('app.color.color_90ffffff')).fontSize(14)
|
||||
Text('上传图片').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('(选填,最多可上传3张)').fontColor($r('app.color.color_999999')).fontSize(10)
|
||||
}
|
||||
.width('100%')
|
||||
.margin({ top: 20 })
|
||||
|
||||
Grid() {
|
||||
List() {
|
||||
ForEach(this.selectedPhotos, (item: string, index) => {
|
||||
GridItem() {
|
||||
ListItem() {
|
||||
AddImageItemView({ uri: item, index: index, onDelete: (uri) => {
|
||||
for (let i = 0; i < this.selectedPhotos.length; i++) {
|
||||
const photo = this.selectedPhotos[i];
|
||||
|
|
@ -165,37 +155,40 @@ struct FeedbackPage {
|
|||
}
|
||||
} })
|
||||
}
|
||||
.width('25%')
|
||||
})
|
||||
GridItem() {
|
||||
AddImageItemView({index: this.selectedPhotos.length})
|
||||
.onClick(() => {
|
||||
PhotoHelper.select({
|
||||
MIMEType: photoAccessHelper.PhotoViewMIMETypes.IMAGE_TYPE,
|
||||
maxSelectNumber: 3,
|
||||
preselectedUris: this.selectedUris,
|
||||
isOriginalSupported: false
|
||||
if (this.selectedPhotos.length < 3) {
|
||||
ListItem() {
|
||||
AddImageItemView({index: this.selectedPhotos.length})
|
||||
.onClick(() => {
|
||||
PhotoHelper.select({
|
||||
MIMEType: photoAccessHelper.PhotoViewMIMETypes.IMAGE_TYPE,
|
||||
maxSelectNumber: 3,
|
||||
preselectedUris: this.selectedUris,
|
||||
isOriginalSupported: false
|
||||
})
|
||||
.then((result: photoAccessHelper.PhotoSelectResult) => {
|
||||
if (result.photoUris.length > 0) {
|
||||
this.selectedPhotos = result.photoUris
|
||||
this.selectedUris = result.photoUris
|
||||
}
|
||||
})
|
||||
.catch((e: BusinessError) => {
|
||||
ToastUtils.show(e.message)
|
||||
})
|
||||
})
|
||||
.then((result: photoAccessHelper.PhotoSelectResult) => {
|
||||
if (result.photoUris.length > 0) {
|
||||
this.selectedPhotos = result.photoUris
|
||||
this.selectedUris = result.photoUris
|
||||
}
|
||||
})
|
||||
.catch((e: BusinessError) => {
|
||||
ToastUtils.show(e.message)
|
||||
})
|
||||
})
|
||||
}
|
||||
.width('25%')
|
||||
}
|
||||
.visibility(this.selectedImages.length < 3 ? Visibility.Visible : Visibility.None)
|
||||
}
|
||||
.width('100%')
|
||||
.height(80)
|
||||
.scrollBar(BarState.Off)
|
||||
.columnsTemplate('1fr 1fr 1fr')
|
||||
.listDirection(Axis.Horizontal)
|
||||
.margin({ top: 16 })
|
||||
|
||||
Row() {
|
||||
Text('联系方式').fontColor($r('app.color.color_90ffffff')).fontSize(14)
|
||||
Text('联系方式').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
|
||||
Text('(选填,可留下您的手机号、微信、邮箱)').fontColor($r('app.color.color_999999')).fontSize(10)
|
||||
}
|
||||
.width('100%')
|
||||
|
|
@ -203,13 +196,15 @@ struct FeedbackPage {
|
|||
|
||||
TextInput({ placeholder: '请输入您的联系方式' })
|
||||
.height(50)
|
||||
.placeholderColor($r('app.color.color_30ffffff'))
|
||||
.placeholderColor($r('app.color.color_bcbcbc'))
|
||||
.placeholderFont({ size: 14 })
|
||||
.fontSize(14)
|
||||
.fontColor($r('app.color.color_80ffffff'))
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.maxLength(200)
|
||||
.borderRadius(8)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.backgroundColor(Color.Transparent)
|
||||
.margin({ top: 16 })
|
||||
.onChange((value: string) => {
|
||||
this.contactText = value
|
||||
|
|
@ -227,12 +222,9 @@ struct FeedbackPage {
|
|||
.fontColor(Color.White)
|
||||
.fontSize(15)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.linearGradient({
|
||||
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.width('100%')
|
||||
.height(46)
|
||||
.backgroundColor($r('app.color.color_466afd'))
|
||||
.onClick(() => {
|
||||
this.commit()
|
||||
})
|
||||
|
|
@ -242,6 +234,6 @@ struct FeedbackPage {
|
|||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.backgroundColor($r('app.color.window_background'))
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
}
|
||||
|
|
@ -67,18 +67,18 @@ struct UserSettingsPage {
|
|||
})
|
||||
})
|
||||
|
||||
Text('昵称').fontSize(15).fontColor($r('app.color.color_90ffffff')).margin({ left: '6%', top: 55 }).alignSelf(ItemAlign.Start)
|
||||
Text('昵称').fontSize(15).fontColor($r('app.color.color_222222')).margin({ left: '6%', top: 55 }).alignSelf(ItemAlign.Start)
|
||||
|
||||
Text(this.userinfo?.name)
|
||||
.width('88%')
|
||||
.height(48)
|
||||
.fontSize(15)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.maxLines(1)
|
||||
.padding({ left: 14, right: 14 })
|
||||
.margin({ top: 12 })
|
||||
.borderRadius(25)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderRadius(8)
|
||||
.backgroundColor(Color.White)
|
||||
.onClick(() => {
|
||||
EditTextDialog.show(this.getUIContext(), { title: '编辑昵称', content: this.userinfo?.name, confirm: (content) => {
|
||||
const params: Record<string, string> = {
|
||||
|
|
@ -88,18 +88,18 @@ struct UserSettingsPage {
|
|||
}})
|
||||
})
|
||||
|
||||
Text('会员').fontSize(15).fontColor($r('app.color.color_90ffffff')).margin({ left: '6%', top: 30 }).alignSelf(ItemAlign.Start)
|
||||
Text('会员').fontSize(15).fontColor($r('app.color.color_222222')).margin({ left: '6%', top: 30 }).alignSelf(ItemAlign.Start)
|
||||
|
||||
Text(this.userinfo?.vip === 1 ? '未开通' : this.userinfo?.vip === 2 ? this.userinfo?.vip_expire + ' 到期' : '终身会员')
|
||||
.width('88%')
|
||||
.height(48)
|
||||
.fontSize(15)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.maxLines(1)
|
||||
.padding({ left: 14, right: 14 })
|
||||
.margin({ top: 12 })
|
||||
.borderRadius(25)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderRadius(8)
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { PayUtils } from '../../../../utils/PayUtils';
|
|||
import { ToastUtils } from '../../../../utils/ToastUtils';
|
||||
import { OnWXResp, WXApi, WXEventHandler } from '../../../../utils/wechat/WXApiEventHandlerImpl';
|
||||
import { TitleBar } from '../../../../view/TitleBar';
|
||||
import { VipMealItemView } from '../../../../view/VipMealItemView';
|
||||
import { VipGoodsItemView } from '../../../../view/VipGoodsItemView';
|
||||
import { VipViewModel } from '../../../../viewModel/VipViewModel';
|
||||
import { BusinessError, systemDateTime } from '@kit.BasicServicesKit';
|
||||
import router from '@ohos.router';
|
||||
|
|
@ -20,6 +20,8 @@ import { EventReportGlobalManager } from '../../../../manager/EventReportGlobalM
|
|||
import { SimpleTipDialog } from '../../../../dialog/SimpleTipDialog';
|
||||
import { OrderEntity } from '../../../../entity/OrderEntity';
|
||||
import { TipDialog } from '../../../../dialog/TipDialog';
|
||||
import { window } from '@kit.ArkUI';
|
||||
import { MenuEntity, vipTipsList } from '../../../../entity/MenuEntity';
|
||||
|
||||
@Entry
|
||||
@ComponentV2
|
||||
|
|
@ -32,6 +34,8 @@ struct VipPage {
|
|||
@Local payType: number = 0; //0微信支付 1支付宝支付
|
||||
@Local totalPrice: number = 0;
|
||||
|
||||
windowStage: window.WindowStage = AppStorage.get("windowStage") as window.WindowStage;
|
||||
|
||||
showQueryTip: boolean = false //是否显示支付状态查询提示
|
||||
|
||||
viewModel: VipViewModel = new VipViewModel(this.getUIContext());
|
||||
|
|
@ -111,12 +115,20 @@ struct VipPage {
|
|||
}
|
||||
|
||||
aboutToAppear() {
|
||||
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
|
||||
statusBarColor: '#00000000',
|
||||
statusBarContentColor: '#FFFFFF'
|
||||
});
|
||||
WXEventHandler.registerOnWXRespCallback(this.onWXResp)
|
||||
this.initParams();
|
||||
this.viewModel.mealList();
|
||||
}
|
||||
|
||||
aboutToDisappear() {
|
||||
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
|
||||
statusBarColor: '#00000000',
|
||||
statusBarContentColor: '#000000'
|
||||
});
|
||||
WXEventHandler.unregisterOnWXRespCallback(this.onWXResp)
|
||||
this.viewModel.cancelInterval()
|
||||
}
|
||||
|
|
@ -241,20 +253,14 @@ struct VipPage {
|
|||
RelativeContainer() {
|
||||
Image($r("app.media.ic_vip_top_bg"))
|
||||
.width('100%')
|
||||
.aspectRatio(1.4)
|
||||
.aspectRatio(1.175)
|
||||
.id('iv_top_bg')
|
||||
|
||||
Column() {
|
||||
Image($r('app.media.ic_vip_tips'))
|
||||
.width('100%')
|
||||
.aspectRatio(0.997)
|
||||
.margin({ left: 20, right: 20 })
|
||||
.id('iv_tips')
|
||||
|
||||
List() {
|
||||
ForEach(this.vipMealList, (item: VipMealEntity) => {
|
||||
ListItem() {
|
||||
VipMealItemView({
|
||||
VipGoodsItemView({
|
||||
entity: item,
|
||||
isChecked: this.vipMeal?.goods_id === item.goods_id,
|
||||
isGrid: this.vipMealList.length <= 3
|
||||
|
|
@ -276,9 +282,64 @@ struct VipPage {
|
|||
.height('auto')
|
||||
.listDirection(this.vipMealList.length > 3 ? Axis.Horizontal : Axis.Vertical)
|
||||
.alignListItem(ListItemAlign.Center)
|
||||
.margin({ left: 14, top: 30, right: 14 })
|
||||
.margin({ left: 14, right: 14 })
|
||||
.lanes(this.vipMealList.length > 3 ? 1 : 3)
|
||||
.id('li_meals')
|
||||
|
||||
RelativeContainer() {
|
||||
Column() {
|
||||
Row(){
|
||||
Image($r('app.media.ic_vip_tips_star')).width(14).height(14)
|
||||
Row() {
|
||||
Text('解锁以下会员权益').fontSize(16).fontFamily('almmsht')
|
||||
.blendMode(BlendMode.DST_IN, BlendApplyType.OFFSCREEN)
|
||||
}
|
||||
.linearGradient({
|
||||
direction: GradientDirection.Right,
|
||||
colors: [['#FFEADB', 0.0], ['#FFFFFF', 0.3], ['#D9ECF8', 0.6], ['#C4C5F7', 1.0]]
|
||||
})
|
||||
.blendMode(BlendMode.SRC_OVER, BlendApplyType.OFFSCREEN)
|
||||
.margin({left: 8, right: 8})
|
||||
Image($r('app.media.ic_vip_tips_star')).width(14).height(14)
|
||||
}
|
||||
|
||||
Image($r('app.media.ic_vip_tips_divider')).width('80%').height(1).margin({top: 20})
|
||||
|
||||
Grid(){
|
||||
ForEach(vipTipsList().convertToArray(), (item: MenuEntity) => {
|
||||
GridItem() {
|
||||
Column() {
|
||||
Image(item.icon).width(48).height(48)
|
||||
Text(item.title).fontColor('#F0EFEB').fontSize(12).margin({top:6})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
.scrollBar(BarState.Off)
|
||||
.columnsTemplate('1fr 1fr 1fr 1fr')
|
||||
.rowsGap(20)
|
||||
.margin({top: 20})
|
||||
}
|
||||
.width('100%')
|
||||
.linearGradient({
|
||||
colors: [['#343230', 0.0], ['#1F2430', 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.borderRadius(14)
|
||||
.margin({top: 24, bottom: 24})
|
||||
.padding({top: 20, bottom: 20})
|
||||
.id('layout_tips')
|
||||
|
||||
Image($r('app.media.ic_vip_tips_light')).width(203).height(48)
|
||||
Image($r('app.media.ic_vip_tips_light')).width(203).height(48)
|
||||
.alignRules({
|
||||
right: {anchor: '__container__', align: HorizontalAlign.End},
|
||||
bottom:{anchor: 'layout_tips', align: VerticalAlign.Bottom}
|
||||
})
|
||||
.margin({bottom: -24})
|
||||
}
|
||||
.width('100%')
|
||||
.height('auto')
|
||||
.padding({left: 20, right: 20})
|
||||
|
||||
Row() {
|
||||
Image($r('app.media.ic_coupon')).width(30).height(30)
|
||||
|
|
@ -291,18 +352,23 @@ struct VipPage {
|
|||
.margin({ top: 22 })
|
||||
.visibility(Visibility.None)
|
||||
|
||||
Text('支付方式')
|
||||
.fontColor(Color.White)
|
||||
.fontSize(14)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.margin({ left: 20, top: 22 })
|
||||
.alignSelf(ItemAlign.Start)
|
||||
Row() {
|
||||
Text('支付方式').fontSize(14).fontWeight(FontWeight.Medium)
|
||||
.blendMode(BlendMode.DST_IN, BlendApplyType.OFFSCREEN)
|
||||
}
|
||||
.linearGradient({
|
||||
direction: GradientDirection.Right,
|
||||
colors: [['#FFEADB', 0.0], ['#FFFFFF', 0.3], ['#D9ECF8', 0.6], ['#C4C5F7', 1.0]]
|
||||
})
|
||||
.blendMode(BlendMode.SRC_OVER, BlendApplyType.OFFSCREEN)
|
||||
.margin({ left: 20 })
|
||||
.alignSelf(ItemAlign.Start)
|
||||
|
||||
Row() {
|
||||
Image($r('app.media.ic_wx_pay')).width(30).height(30)
|
||||
Text('微信').fontColor('#CCEEEEEE').fontSize(15).margin({ left: 12 })
|
||||
Text('微信').fontColor(Color.White).fontSize(15).margin({ left: 12 })
|
||||
Blank().layoutWeight(1)
|
||||
Image(this.payType === 0 ? $r('app.media.ic_pay_true') : $r('app.media.ic_pay_false'))
|
||||
Image(this.payType === 0 ? $r('app.media.ic_check_true') : $r('app.media.ic_check_false'))
|
||||
.width(18)
|
||||
.height(18)
|
||||
}
|
||||
|
|
@ -318,9 +384,9 @@ struct VipPage {
|
|||
|
||||
Row() {
|
||||
Image($r('app.media.ic_ali_pay')).width(30).height(30)
|
||||
Text('支付宝').fontColor('#CCEEEEEE').fontSize(15).margin({ left: 12 })
|
||||
Text('支付宝').fontColor(Color.White).fontSize(15).margin({ left: 12 })
|
||||
Blank().layoutWeight(1)
|
||||
Image(this.payType === 1 ? $r('app.media.ic_pay_true') : $r('app.media.ic_pay_false'))
|
||||
Image(this.payType === 1 ? $r('app.media.ic_check_true') : $r('app.media.ic_check_false'))
|
||||
.width(18)
|
||||
.height(18)
|
||||
}
|
||||
|
|
@ -377,7 +443,7 @@ struct VipPage {
|
|||
.alignRules({
|
||||
top: { anchor: 'iv_top_bg', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.margin({ top: -32 })
|
||||
.margin({ top: -55 })
|
||||
}
|
||||
.height('auto')
|
||||
}
|
||||
|
|
@ -387,27 +453,27 @@ struct VipPage {
|
|||
Row() {
|
||||
Text() {
|
||||
Span('¥').fontSize(13)
|
||||
Span(`${this.totalPrice}`).fontSize(24)
|
||||
Span(`${this.totalPrice}`).fontSize(24).fontFamily('ddp500m')
|
||||
Span(this.formatPricePeriod(this.vipMeal?.value)).fontSize(13)
|
||||
Span(' ')
|
||||
Span('¥' + this.vipMeal?.origin_price)
|
||||
.fontColor($r('app.color.color_30ffffff'))
|
||||
Span('已优惠' + this.vipMeal?.origin_price + '元')
|
||||
.fontColor('#FFC4A6')
|
||||
.fontSize(12)
|
||||
.decoration({ type: TextDecorationType.LineThrough, color: $r('app.color.color_30ffffff') })
|
||||
}
|
||||
.fontColor('#94F2FE')
|
||||
.fontColor('#F03535')
|
||||
|
||||
Blank().layoutWeight(1)
|
||||
|
||||
Text('立即开通')
|
||||
.width(170)
|
||||
.height(45)
|
||||
.width(148)
|
||||
.height(46)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor('#201847')
|
||||
.fontColor(Color.White)
|
||||
.fontSize(16)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.backgroundImage($r('app.media.ic_vip_pay_btn'))
|
||||
.backgroundImageSize({ width: 170, height: 46 })
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.onClick(() => {
|
||||
if (this.vipMeal) {
|
||||
if (ConfigManager.isPayAgreementEnable() && !this.isAgree) {
|
||||
|
|
@ -425,7 +491,7 @@ struct VipPage {
|
|||
}
|
||||
})
|
||||
}
|
||||
.backgroundColor('#29253D')
|
||||
.backgroundColor('#1F2126')
|
||||
.borderRadius({ topLeft: 20, topRight: 20 })
|
||||
.padding({
|
||||
top: 9,
|
||||
|
|
@ -438,6 +504,7 @@ struct VipPage {
|
|||
.height('100%')
|
||||
|
||||
TitleBar({
|
||||
isDark: true,
|
||||
onBackClick: () => {
|
||||
if (this.isGuide) {
|
||||
EventReportGlobalManager.eventReport(EventConstants.GUIDE_SKIP, "icon", this.pageDuration())
|
||||
|
|
@ -448,6 +515,6 @@ struct VipPage {
|
|||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.backgroundColor($r('app.color.window_background'))
|
||||
.backgroundColor('#0F1016')
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,32 @@
|
|||
import { StrUtil } from "@pura/harmony-utils";
|
||||
import { AccountEntity } from "../entity/AccountEntity"
|
||||
import { LoginManager } from "../manager/LoginGlobalManager";
|
||||
import { ConfigManager } from "../manager/UserConfigManager";
|
||||
|
||||
@ComponentV2
|
||||
export struct AccountItemView {
|
||||
@Param account?: AccountEntity = new AccountEntity();
|
||||
|
||||
getPrivacyPhone(phone?: string): string {
|
||||
if (StrUtil.isNotEmpty(phone)) {
|
||||
const start = phone?.substring(0, 3);
|
||||
const end = phone?.substring(7);
|
||||
return start + '****' + end;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
Image(this.account?.avater).width(44).height(44).id('iv_avatar').borderRadius(25)
|
||||
Image(StrUtil.isNotEmpty(this.account?.avater) ? this.account?.avater : $r('app.media.ic_default_avatar')).width(50).height(50).id('iv_avatar').borderRadius(25)
|
||||
|
||||
Text(this.account?.name)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontColor($r('app.color.color_1a1a1a'))
|
||||
.fontSize(16)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.ellipsisMode(EllipsisMode.END)
|
||||
.alignRules({
|
||||
left: { anchor: 'iv_avatar', align: HorizontalAlign.End },
|
||||
top: { anchor: 'iv_avatar', align: VerticalAlign.Top }
|
||||
|
|
@ -25,10 +39,7 @@ export struct AccountItemView {
|
|||
.textAlign(TextAlign.Center)
|
||||
.fontColor(Color.White)
|
||||
.fontSize(10)
|
||||
.linearGradient({
|
||||
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor($r('app.color.color_466afd'))
|
||||
.borderRadius(3)
|
||||
.padding({
|
||||
left: 3,
|
||||
|
|
@ -42,67 +53,49 @@ export struct AccountItemView {
|
|||
})
|
||||
.visibility(this.account?.vip_type !== 1 ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Text('ID:' + this.account?.user_id).fontColor($r('app.color.color_999999')).fontSize(12)
|
||||
Text('ID:' + this.account?.user_id).fontColor($r('app.color.color_999999')).fontSize(14)
|
||||
.alignRules({
|
||||
left: { anchor: 'tv_username', align: HorizontalAlign.Start },
|
||||
bottom: { anchor: 'iv_avatar', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.id('tv_user_id')
|
||||
|
||||
Text(this.account?.create_time + ' 注册').fontColor($r('app.color.color_999999')).fontSize(12)
|
||||
.alignRules({
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End },
|
||||
bottom: { anchor: 'iv_avatar', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.visibility(StrUtil.isNotEmpty(this.account?.create_time) ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Divider()
|
||||
.color($r('app.color.color_10ffffff'))
|
||||
.strokeWidth(1)
|
||||
.alignRules({
|
||||
top: { anchor: 'iv_avatar', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.margin({ top: 18 })
|
||||
.id('divider')
|
||||
Row(){
|
||||
if (this.account?.user_id === LoginManager.getUserInfo()?.user_id) {
|
||||
Blank().width(4).height(4).backgroundColor('#FF8340').borderRadius(2)
|
||||
Text('当前账号').fontColor('#FF8340').fontSize(14).margin({left: 4})
|
||||
} else {
|
||||
Text('切换').fontColor($r('app.color.color_999999')).fontSize(14)
|
||||
Image($r('app.media.ic_change_account')).width(16).height(16).margin({left: 4})
|
||||
}
|
||||
}
|
||||
.alignRules({
|
||||
top: { anchor: 'tv_username', align: VerticalAlign.Top },
|
||||
end: { anchor: '__container__', align: HorizontalAlign.End},
|
||||
bottom: { anchor: 'tv_username', align: VerticalAlign.Bottom }
|
||||
})
|
||||
|
||||
Row() {
|
||||
Text('账户绑定')
|
||||
.fontColor($r('app.color.color_50ffffff'))
|
||||
.fontSize(14)
|
||||
|
||||
Image($r('app.media.ic_bind_phone')).width(20).height(20).margin({ left: 10 })
|
||||
.visibility(this.account?.bind.includes('phone') ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Image($r('app.media.ic_bind_wx')).width(20).height(20).margin({ left: 10 })
|
||||
.visibility(this.account?.bind.includes('weixin') ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Text(this.getPrivacyPhone(this.account?.phone))
|
||||
.layoutWeight(1)
|
||||
.fontColor($r('app.color.color_50ffffff'))
|
||||
.fontSize(15)
|
||||
.textAlign(TextAlign.End)
|
||||
}
|
||||
.alignRules({
|
||||
top: { anchor: 'divider', align: VerticalAlign.Bottom }
|
||||
top: { anchor: 'tv_user_id', align: VerticalAlign.Top },
|
||||
end: { anchor: '__container__', align: HorizontalAlign.End},
|
||||
bottom: { anchor: 'tv_user_id', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.margin({ top: 14 })
|
||||
}
|
||||
.height('auto')
|
||||
.borderRadius(10)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.backgroundColor(Color.White)
|
||||
.padding({
|
||||
left: 16,
|
||||
top: 18,
|
||||
right: 16,
|
||||
bottom: 14
|
||||
left: 12,
|
||||
top: 16,
|
||||
right: 12,
|
||||
bottom: 16
|
||||
})
|
||||
}
|
||||
|
||||
getPrivacyPhone(phone?: string): string {
|
||||
if (StrUtil.isNotEmpty(phone)) {
|
||||
const start = phone?.substring(0, 3);
|
||||
const end = phone?.substring(7);
|
||||
return start + '****' + end;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
import { UploadImgEntity } from "../entity/UploadImgEntity"
|
||||
|
||||
@ComponentV2
|
||||
export struct AddImageItemView {
|
||||
|
|
@ -9,22 +8,19 @@ export struct AddImageItemView {
|
|||
build() {
|
||||
Stack() {
|
||||
RelativeContainer() {
|
||||
Text('+')
|
||||
.fontColor($r('app.color.color_30ffffff'))
|
||||
.fontSize(40)
|
||||
Image($r('app.media.ic_add_feedback_image')).width(26).height(26)
|
||||
.alignRules({
|
||||
left: { anchor: '__container__', align: HorizontalAlign.Start },
|
||||
top: { anchor: '__container__', align: VerticalAlign.Top },
|
||||
right: { anchor: '__container__', align: HorizontalAlign.End },
|
||||
bottom: { anchor: '__container__', align: VerticalAlign.Bottom }
|
||||
})
|
||||
.width('auto')
|
||||
.visibility(this.uri ? Visibility.None : Visibility.Visible)
|
||||
|
||||
Image(this.uri).width('100%').height('100%')
|
||||
.visibility(this.uri ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Image($r('app.media.ic_delete_img'))
|
||||
Image($r('app.media.ic_delete_feedback_img'))
|
||||
.width(18)
|
||||
.height(18)
|
||||
.alignRules({
|
||||
|
|
@ -41,7 +37,9 @@ export struct AddImageItemView {
|
|||
.width(80)
|
||||
.height(80)
|
||||
.borderRadius(8)
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.borderWidth(1)
|
||||
.borderColor($r('app.color.color_dfdfdf'))
|
||||
.backgroundColor(Color.Transparent)
|
||||
.clip(true)
|
||||
}
|
||||
.width('100%')
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export struct DiamondItemView {
|
|||
Image(this.goodInfo?.image).width(24).height(24).id('iv_icon')
|
||||
.margin({left: 16, top: 17})
|
||||
Text() {
|
||||
Span('兑换钻石 ').fontSize(15).fontWeight(FontWeight.Medium)
|
||||
Span('兑换M币 ').fontSize(15).fontWeight(FontWeight.Medium)
|
||||
Span(this.goodInfo?.value).fontSize(24).fontFamily('ddp500m')
|
||||
Span('个').fontSize(12)
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ export struct DiamondItemView {
|
|||
.margin({left: 12, top: 13})
|
||||
.id('tv_count')
|
||||
|
||||
Text(NumberUtil.toNumber(this.goodInfo?.price) / NumberUtil.toNumber(this.goodInfo?.value) + '元一个钻石巨优惠')
|
||||
Text(NumberUtil.toNumber(this.goodInfo?.price) / NumberUtil.toNumber(this.goodInfo?.value) + '元一个M币巨优惠')
|
||||
.fontColor($r('app.color.color_666666'))
|
||||
.fontSize(12)
|
||||
.alignRules({
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ export struct DownloadHistoryItemView {
|
|||
.backgroundColor(this.historyEntity?.getTypeBgColor())
|
||||
.padding({left: 4, right: 4})
|
||||
Text(this.historyEntity?.title)
|
||||
.fontColor($r('app.color.color_90ffffff'))
|
||||
.fontSize(15)
|
||||
.fontColor($r('app.color.color_212226'))
|
||||
.fontSize(14)
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.ellipsisMode(EllipsisMode.END)
|
||||
|
|
@ -29,7 +29,7 @@ export struct DownloadHistoryItemView {
|
|||
.layoutWeight(1)
|
||||
}
|
||||
Text(this.historyEntity?.description ? this.historyEntity?.description : this.historyEntity?.title)
|
||||
.fontColor($r('app.color.color_60ffffff'))
|
||||
.fontColor('#646670')
|
||||
.fontSize(12)
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
|
|
@ -37,7 +37,7 @@ export struct DownloadHistoryItemView {
|
|||
.margin({top: 5})
|
||||
|
||||
Row() {
|
||||
Text(this.historyEntity?.save_size).fontColor($r('app.color.color_50ffffff')).fontSize(12)
|
||||
Text(this.historyEntity?.save_size).fontColor($r('app.color.color_666666')).fontSize(12)
|
||||
Text(this.historyEntity?.create_time).fontColor($r('app.color.color_999999')).fontSize(10).margin({left: 10})
|
||||
}.margin({top: 8})
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ export struct DownloadHistoryItemView {
|
|||
.alignItems(HorizontalAlign.Start)
|
||||
.layoutWeight(1)
|
||||
|
||||
Divider().width(1).height(60).strokeWidth(1).backgroundColor($r('app.color.color_10ffffff'))
|
||||
Divider().height(50).strokeWidth(0.5).vertical(true).backgroundColor('#E8E9ED')
|
||||
|
||||
Stack(){
|
||||
Image(this.historyEntity?.request ? $r('app.media.ic_download_enable') : $r('app.media.ic_download_disable')).width(26).height(26)
|
||||
|
|
@ -59,7 +59,7 @@ export struct DownloadHistoryItemView {
|
|||
}
|
||||
.width('100%')
|
||||
.padding({ top: 16, bottom: 16 })
|
||||
.backgroundColor($r('app.color.color_222222'))
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(6)
|
||||
}
|
||||
.width('100%')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { NumberUtil, StrUtil } from "@pura/harmony-utils";
|
||||
import { VipMealEntity } from "../entity/VipMealEntity";
|
||||
import { VipMealEntity as VipGoodsEntity } from "../entity/VipMealEntity";
|
||||
|
||||
@ComponentV2
|
||||
export struct VipMealItemView {
|
||||
@Param entity: VipMealEntity = new VipMealEntity();
|
||||
export struct VipGoodsItemView {
|
||||
@Param entity: VipGoodsEntity = new VipGoodsEntity();
|
||||
@Param isChecked: boolean = false;
|
||||
@Param isGrid: boolean = true;
|
||||
|
||||
|
|
@ -11,21 +11,21 @@ export struct VipMealItemView {
|
|||
RelativeContainer() {
|
||||
Column() {
|
||||
Text(this.entity.goods_name)
|
||||
.fontColor(this.isChecked ? Color.White : '#ABABAB')
|
||||
.fontColor(this.isChecked ? '#54230C' : '#ABABAB')
|
||||
.fontSize(this.isChecked ? 15 : 12)
|
||||
.fontWeight(this.isChecked ? FontWeight.Medium : FontWeight.Regular)
|
||||
.margin({ top: this.isChecked ? 18 : 12 })
|
||||
Text() {
|
||||
Span('¥').fontSize(this.isChecked ? 12 : 10)
|
||||
Span(this.entity.price).fontSize(this.isChecked ? 28: 22)
|
||||
Span(this.entity.price).fontSize(this.isChecked ? 28: 22).fontFamily('ddp500m')
|
||||
}
|
||||
.fontColor(this.isChecked ? '#94F2FE' : '#EAEAEA')
|
||||
.fontColor(this.isChecked ? '#F94747' : '#EAEAEA')
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.margin({ top: this.isChecked ? 10 : 4 })
|
||||
|
||||
Text() {
|
||||
Span('¥' + this.entity.origin_price).fontColor(this.isChecked ? $r('app.color.color_30ffffff') : '#6B6B6B').fontSize(this.isChecked ? 13 : 10)
|
||||
.decoration({ type: TextDecorationType.LineThrough, color: this.isChecked ? $r('app.color.color_30ffffff') : '#6B6B6B' })
|
||||
Span('¥' + this.entity.origin_price).fontColor(this.isChecked ? '#896451' : '#6B6B6B').fontSize(this.isChecked ? 13 : 10)
|
||||
.decoration({ type: TextDecorationType.LineThrough, color: this.isChecked ? '#896451' : '#6B6B6B' })
|
||||
}
|
||||
.margin({ top:this.isChecked ? 5 : 2 })
|
||||
|
||||
|
|
@ -34,18 +34,22 @@ export struct VipMealItemView {
|
|||
.width('100%')
|
||||
.height(this.isChecked ? 28 : 22)
|
||||
.textAlign(TextAlign.Center)
|
||||
.fontColor(this.isChecked ? $r('app.color.color_90ffffff') : $r('app.color.color_80ffffff'))
|
||||
.fontColor(this.isChecked ? '#54220B' : $r('app.color.color_80ffffff'))
|
||||
.fontSize(this.isChecked ? 12 : 10)
|
||||
.backgroundColor(this.isChecked ? '#181331' : '#4B4B53')
|
||||
.linearGradient({
|
||||
colors: [[this.isChecked ? '#FAE9CA' : Color.Transparent, 0.0], [this.isChecked ? '#FACBC5' : Color.Transparent, 0.3], [this.isChecked ? '#D1CAF9' : Color.Transparent, 0.6], [this.isChecked ? '#C4DBFA' : Color.Transparent, 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor(this.isChecked ? Color.Transparent : '#424346')
|
||||
.borderRadius({bottomLeft: this.isChecked ? 10 : 8, bottomRight: this.isChecked ? 10 : 8})
|
||||
.margin({ top: 10 })
|
||||
}
|
||||
.height('auto')
|
||||
.linearGradient({
|
||||
colors: [[this.isChecked ? '#3F2D67' : Color.Transparent, 0.0], [this.isChecked ? '#202443' : Color.Transparent, 1.0]],
|
||||
colors: [[this.isChecked ? '#FFF8F6' : Color.Transparent, 0.0], [this.isChecked ? '#FFEBDB' : Color.Transparent, 1.0]],
|
||||
direction: GradientDirection.Right
|
||||
})
|
||||
.backgroundColor(this.isChecked ? Color.Transparent : '#2B2B38')
|
||||
.backgroundColor(this.isChecked ? Color.Transparent : '#242529')
|
||||
.borderRadius(this.isChecked ? 10 : 8)
|
||||
.borderWidth(1)
|
||||
.borderColor(this.isChecked ? '#94F2FE' : Color.Transparent)
|
||||
|
|
@ -48,6 +48,10 @@
|
|||
"name": "color_eff2f7",
|
||||
"value": "#EFF2F7"
|
||||
},
|
||||
{
|
||||
"name": "color_cccccc",
|
||||
"value": "#CCCCCC"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 494 B |
|
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 1016 B |
|
After Width: | Height: | Size: 668 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 562 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 378 B |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 247 KiB |