添加我的页面二级页面,添加会员充值页

This commit is contained in:
wangyu 2026-03-12 18:46:20 +08:00
parent 43196aa8df
commit 8351b5e9da
57 changed files with 550 additions and 461 deletions

View File

@ -107,7 +107,7 @@ export class EventConstants {
static readonly JUMP_TO_DOWNLOAD_TASK_LIST = "client.jump.to.download.task.list" //跳转到下载任务列表 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" //跳转优惠券列表 static readonly JUMP_TO_COUPON_LIST = "client.jump.to.coupon.list" //跳转优惠券列表

View File

@ -100,7 +100,7 @@ export class RouterUrls {
static readonly DOWNLOAD_HISTORY_PAGE = "pages/main/mine/history/DownloadHistoryPage" static readonly DOWNLOAD_HISTORY_PAGE = "pages/main/mine/history/DownloadHistoryPage"
/** /**
* 钻石充值页 * M币充值页
*/ */
static readonly RECHARGE_DIAMOND_PAGE = "pages/main/mine/diamond/DiamondPage" static readonly RECHARGE_DIAMOND_PAGE = "pages/main/mine/diamond/DiamondPage"

View File

@ -19,116 +19,6 @@ export struct BindPhoneDialog {
@State countDownTime: number = 0; @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) { sendCode(phone: string) {
if (StrUtil.isEmpty(this.phone)) { if (StrUtil.isEmpty(this.phone)) {
ToastUtils.show('请输入手机号'); ToastUtils.show('请输入手机号');
@ -202,4 +92,116 @@ export struct BindPhoneDialog {
LoadingDialog.dismiss(); 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)
}
} }

View File

@ -16,7 +16,7 @@ function defaultBuilder(option: EditTextDialogOption) {
RelativeContainer() { RelativeContainer() {
Text(option.title ?? '编辑') Text(option.title ?? '编辑')
.width('auto') .width('auto')
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_212226'))
.fontSize(18) .fontSize(18)
.fontWeight(FontWeight.Medium) .fontWeight(FontWeight.Medium)
.alignRules( { .alignRules( {
@ -40,12 +40,12 @@ function defaultBuilder(option: EditTextDialogOption) {
TextInput({ placeholder: option.hintText ?? '请输入', text: option.content}) TextInput({ placeholder: option.hintText ?? '请输入', text: option.content})
.width('90%') .width('90%')
.height(48) .height(48)
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_222222'))
.fontSize(15) .fontSize(15)
.placeholderColor($r('app.color.color_30ffffff')) .placeholderColor($r('app.color.color_999999'))
.placeholderFont({ size: 15 }) .placeholderFont({ size: 15 })
.maxLength(12) .maxLength(12)
.backgroundColor($r('app.color.color_222222')) .backgroundColor(Color.White)
.borderRadius(8) .borderRadius(8)
.margin({ top: 16 }) .margin({ top: 16 })
.onChange((content) => { .onChange((content) => {
@ -55,13 +55,10 @@ function defaultBuilder(option: EditTextDialogOption) {
Button('确定', { type: ButtonType.Capsule, stateEffect: true }) Button('确定', { type: ButtonType.Capsule, stateEffect: true })
.fontColor(Color.White) .fontColor(Color.White)
.fontSize(16) .fontSize(16)
.linearGradient({
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
direction: GradientDirection.Right
})
.width('90%') .width('90%')
.height(46) .height(46)
.margin({ top: 30 }) .margin({ top: 30 })
.backgroundColor($r('app.color.color_466afd'))
.onClick(() => { .onClick(() => {
if (StrUtil.isEmpty(option.content)) { if (StrUtil.isEmpty(option.content)) {
ToastUtils.show('内容不能为空') ToastUtils.show('内容不能为空')

View File

@ -34,7 +34,7 @@ function defaultBuilder(option: TipDialogOption) {
.fontColor(Color.White) .fontColor(Color.White)
.fontSize(16) .fontSize(16)
.backgroundColor($r("app.color.color_466afd")) .backgroundColor($r("app.color.color_466afd"))
.margin({ top: 20, bottom: 20 }) .margin({ top: 20 })
.onClick(() => { .onClick(() => {
SimpleTipDialog.dismiss(); SimpleTipDialog.dismiss();
if (option.callback?.confirm) { 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) Image($r('app.media.ic_close_dialog')).width(18).height(18)
.margin({top: 10, right: 10}) .margin({top: 10, right: 10})
@ -56,6 +57,7 @@ function defaultBuilder(option: TipDialogOption) {
.borderRadius(20) .borderRadius(20)
.backgroundColor(Color.White) .backgroundColor(Color.White)
.width('80%') .width('80%')
.height('auto')
} }
export class SimpleTipDialog { export class SimpleTipDialog {

View File

@ -62,6 +62,7 @@ function defaultBuilder(option: TipDialogOption) {
} }
.margin({top: 20}) .margin({top: 20})
} }
.width('100%')
.padding({ top: 20, bottom: 20 }) .padding({ top: 20, bottom: 20 })
} }
.borderRadius(20) .borderRadius(20)

View File

@ -9,10 +9,10 @@ export class DiamondRuleEntity {
static getRuleList(): Array<DiamondRuleEntity> { static getRuleList(): Array<DiamondRuleEntity> {
const list = new Array<DiamondRuleEntity>() const list = new Array<DiamondRuleEntity>()
list.push(new DiamondRuleEntity('一、固定钻石领取', '会员用户每月最后一天系统会固定发放500钻石到用户平台账户。')) list.push(new DiamondRuleEntity('一、固定M币领取', '会员用户每月最后一天系统会固定发放500M币到用户平台账户。'))
list.push(new DiamondRuleEntity('二、固定钻石刷新', '若会员用户在第一个月有没用完的钻石,那么会在本月最后一天重置不会留存到第二月。')) list.push(new DiamondRuleEntity('二、固定M币刷新', '若会员用户在第一个月有没用完的M币,那么会在本月最后一天重置不会留存到第二月。'))
list.push(new DiamondRuleEntity('三、兑换钻石', '会员兑换后的钻石统一叫【兑换钻石】,【兑换钻石】不同于【固定钻石】每月刷新钻石数量;用户兑换了多少就可以使用多少,用完截止,没有时间限制,也没有每月最后一天刷新。')) list.push(new DiamondRuleEntity('三、兑换M币', '会员兑换后的M币统一叫【兑换M币】【兑换M币】不同于【固定M币】每月刷新M币数量;用户兑换了多少就可以使用多少,用完截止,没有时间限制,也没有每月最后一天刷新。'))
list.push(new DiamondRuleEntity('四、重复兑换钻石', '兑换钻石可重复购买,用完截止,没有时间限制,也没有每月最后一天刷新。')) list.push(new DiamondRuleEntity('四、重复兑换M币', '兑换M币可重复购买,用完截止,没有时间限制,也没有每月最后一天刷新。'))
return list return list
} }
} }

View File

@ -17,86 +17,156 @@ export class DownloadHistoryEntity {
case 'b23.tv': case 'b23.tv':
case 'm.bilibili.com': case 'm.bilibili.com':
case 'www.bilibili.com': case 'www.bilibili.com':
return '#F4306F' return '#FFE1EB'
case 'v.douyin.com': case 'v.douyin.com':
case 'www.iesdouyin.com': case 'www.iesdouyin.com':
case 'vt.tiktok.com': case 'vt.tiktok.com':
return '#80FFFFFF' return '#D9D9D9'
case 'm.toutiao.com': case 'm.toutiao.com':
return '#F91716' return '#FFD9D9'
case 'video.weibo.com': case 'video.weibo.com':
case 'weibo.com': case 'weibo.com':
case 'm.weibo.cn': case 'm.weibo.cn':
case 'shop.sc.weibo.com': case 'shop.sc.weibo.com':
return '#DE860C' return '#FFF0DC'
case 'v.kuaishou.com': case 'v.kuaishou.com':
return '#DE440D' return '#FFE4DA'
case 'wxapp.tc.qq.com': case 'wxapp.tc.qq.com':
case 'm.v.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 'twitter.com':
case 'x.com': case 'x.com':
return '#139EEA' return '#139EEA'
case 'xhslink.com': case 'xhslink.com':
case 'www.xiaohongshu.com': case 'www.xiaohongshu.com':
return '#EA3046' return '#FF213C'
case 'instagram.com': case 'instagram.com':
case 'www.instagram.com': case 'www.instagram.com':
return '#8D32F4' return '#8F35F6'
case 'mr.baidu.com': case 'mr.baidu.com':
case 'm.baidu.com': case 'm.baidu.com':
case 'mbd.baidu.com': case 'mbd.baidu.com':
return '#0D95F3' return '#2F73FF'
case 'youtu.be': case 'youtu.be':
case 'youtube.com': case 'youtube.com':
case 'm.youtube.com': case 'm.youtube.com':
case 'www.youtube.com': case 'www.youtube.com':
return '#F92C2C' return '#FF2222'
case 'mp.weixin.qq.com': case 'mp.weixin.qq.com':
return '#1DDB50' return '#01D200'
case 'e.tb.cn': case 'e.tb.cn':
case 'm.tb.cn': case 'm.tb.cn':
return '#F96E12' return '#FF6601'
case 'www.facebook.com': case 'www.facebook.com':
return '#1B6EF6' return '#0865FE'
case 'v.ixigua.com': case 'v.ixigua.com':
case 'www.ixigua.com': case 'www.ixigua.com':
return '#F01566' return '#FF146B'
case 'mobile.yangkeduo.com': case 'mobile.yangkeduo.com':
return '#F40F18' return '#F30009'
case 'm.youku.com': case 'm.youku.com':
return '#0CB3E2' return '#00C6FE'
case '163cn.tv': case '163cn.tv':
return '#F42C34' return '#F30009'
case 'qishui.douyin.com': case 'qishui.douyin.com':
return '#20C485' return '#0AE515'
case 'qr.1688.com': case 'qr.1688.com':
case 'detail.m.1688.com': case 'detail.m.1688.com':
return '#F65611' return '#FF4C00'
case 'h5.pipix.com': case 'h5.pipix.com':
return '#EE3958' return '#FF5370'
case 'app.cctv.com': case 'app.cctv.com':
return '#80FFFFFF' return '#000000'
case 'vk.com': case 'vk.com':
return '#1E82F3' return '#2888F5'
case 'www.finkapp.cn': case 'www.finkapp.cn':
return '#F62C2C' return '#FC4040'
case 'novelquickapp.com': case 'novelquickapp.com':
return '#F18221' return '#FF9436'
case 'video.weishi.qq.com': case 'video.weishi.qq.com':
return '#2E5DF0' return '#3565FB'
case 'm.ctrip.com': case 'm.ctrip.com':
return '#177DF0' return '#1E82E9'
} }
return '#33FFFFFF' return '#999999'
}
getTypeTextColor(): string {
switch (this.domain) {
case 'v.douyin.com':
case 'app.cctv.com':
return '#CC000000'
}
return '#CCFFFFFF'
} }
} }

View File

@ -30,3 +30,20 @@ export function mineMenuList(): ArrayList<MenuEntity> {
list.add(new MenuEntity($r('app.media.ic_mine_icon4'), "联系客服", "service")) list.add(new MenuEntity($r('app.media.ic_mine_icon4'), "联系客服", "service"))
return list; 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;
}

View File

@ -65,7 +65,7 @@ export class Api {
static readonly WX_SERVICE = '/api/weixin/service' static readonly WX_SERVICE = '/api/weixin/service'
/** /**
* 钻石信息 * M币信息
*/ */
static readonly USER_DIAMOND_INFO = '/api/diamond' static readonly USER_DIAMOND_INFO = '/api/diamond'

View File

@ -226,7 +226,7 @@ class ApiService {
} }
/** /**
* 钻石信息 * M币信息
*/ */
getDiamondInfo(): Promise<HttpResult> { getDiamondInfo(): Promise<HttpResult> {
return AxiosRequest.get(Api.USER_DIAMOND_INFO) return AxiosRequest.get(Api.USER_DIAMOND_INFO)

View File

@ -121,7 +121,7 @@ struct TakeMaterialPage {
if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) { if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) {
this.getUIContext().getRouter().pushUrl({url: RouterUrls.RECHARGE_DIAMOND_PAGE}); this.getUIContext().getRouter().pushUrl({url: RouterUrls.RECHARGE_DIAMOND_PAGE});
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_material') EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_material')
ToastUtils.show('钻石已用完') ToastUtils.show('M币已用完')
} }
} }

View File

@ -203,7 +203,7 @@ struct MaterialDetailPage {
Stack() { Stack() {
Button({ type: ButtonType.Capsule, stateEffect: true }) { Button({ type: ButtonType.Capsule, stateEffect: true }) {
Row() { 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) Text('下载').fontColor(Color.White).fontSize(15).fontWeight(FontWeight.Medium)
} }
} }

View File

@ -115,7 +115,7 @@ struct WxVideoPage {
if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) { if (errorCode === 12002 || errorCode === 12003 || errorCode === 12004) {
this.getUIContext().getRouter().pushUrl({ url: RouterUrls.RECHARGE_DIAMOND_PAGE }); this.getUIContext().getRouter().pushUrl({ url: RouterUrls.RECHARGE_DIAMOND_PAGE });
EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_wechat_video') EventReportGlobalManager.eventReport(EventConstants.JUMP_TO_RECHARGE_DIAMOND, 'download_wechat_video')
ToastUtils.show('钻石已用完') ToastUtils.show('M币已用完')
} }
} }

View File

@ -408,55 +408,6 @@ export struct MinePage {
} }
.width('100%') .width('100%')
.height('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) .alignContent(Alignment.Top)

View File

@ -275,11 +275,11 @@ struct DiamondPage {
.margin({ top: -30 }) .margin({ top: -30 })
Column() { 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() { Column() {
Row() { Row() {
Text('本月固定钻石数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14) Text('本月固定M币数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
Text('每月重置') Text('每月重置')
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor('#FFA61E') .fontColor('#FFA61E')
@ -306,7 +306,7 @@ struct DiamondPage {
.margin({top: 16}) .margin({top: 16})
Row() { Row() {
Text('兑换钻石数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14) Text('兑换M币数量').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
Text('用完即止') Text('用完即止')
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor('#FFA61E') .fontColor('#FFA61E')
@ -351,7 +351,7 @@ struct DiamondPage {
.borderRadius(10) .borderRadius(10)
.clip(true) .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) .alignSelf(ItemAlign.Start)
List({space: 12}) { List({space: 12}) {

View File

@ -84,6 +84,7 @@ export struct DownloadHistoryItemPage {
} }
.width('100%') .width('100%')
.height('100%') .height('100%')
.scrollBar(BarState.Off)
.onScrollIndex((start: number, end: number) => { .onScrollIndex((start: number, end: number) => {
// 当达到列表末尾时,触发新数据加载。 // 当达到列表末尾时,触发新数据加载。
if (this.canLoadMore && end >= this.historyList.length - 1) { if (this.canLoadMore && end >= this.historyList.length - 1) {

View File

@ -4,21 +4,28 @@ import { TipDialog } from '../../../../dialog/TipDialog';
import { TitleBar } from '../../../../view/TitleBar'; import { TitleBar } from '../../../../view/TitleBar';
import { DownloadHistoryViewModel } from '../../../../viewModel/DownloadHistoryViewModel'; import { DownloadHistoryViewModel } from '../../../../viewModel/DownloadHistoryViewModel';
import { DownloadHistoryItemPage } from './DownloadHistoryItemPage'; import { DownloadHistoryItemPage } from './DownloadHistoryItemPage';
import { CommonModifier } from '@kit.ArkUI';
@Entry @Entry
@ComponentV2 @ComponentV2
struct DownloadHistory { struct DownloadHistory {
@Local tabBarModifier: CommonModifier = new CommonModifier()
@Local currentIndex: number = 0; @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') @Monitor('viewModel.deleteHistory')
onDeleteDownloadHistory(monitor: IMonitor) { onDeleteDownloadHistory(monitor: IMonitor) {
AppUtil.getContext().eventHub.emit(EventConstants.DownloadHistoryRefreshEvent, this.currentIndex) AppUtil.getContext().eventHub.emit(EventConstants.DownloadHistoryRefreshEvent, this.currentIndex)
} }
aboutToAppear(): void {
this.tabBarModifier.align(Alignment.Start)
}
getStartTime(): number { getStartTime(): number {
let nowDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 1, 1) let nowDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 1, 1)
let lastDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 2, 1) let lastDate = new Date(DateUtil.getNowYear(), DateUtil.getNowMonth() - 2, 1)
@ -41,41 +48,39 @@ struct DownloadHistory {
build() { build() {
Column() { Column() {
TitleBar({ title: '本月下载' }) TitleBar({ title: '提取记录' })
Stack({ alignContent: Alignment.TopStart }) { Stack({ alignContent: Alignment.TopEnd }) {
Tabs({ barPosition: BarPosition.Start, controller: this.tabController }) { Tabs({ barPosition: BarPosition.Start, controller: this.tabController, barModifier: this.tabBarModifier }) {
TabContent() { TabContent() {
DownloadHistoryItemPage({type: 0}) DownloadHistoryItemPage({type: 0})
} }
.tabBar(this.tabBuilder(this.titles[0], 0))
TabContent() { TabContent() {
DownloadHistoryItemPage({type: 1}) DownloadHistoryItemPage({type: 1})
} }
.tabBar(this.tabBuilder(this.titles[1], 1))
} }
.scrollable(false) .scrollable(false)
/*.onSelected((index: number) => { .barMode(BarMode.Scrollable)
.onSelected((index: number) => {
this.currentIndex = index; this.currentIndex = index;
})*/ })
Row({ space: 40 }) { Row() {
ForEach(this.titles, (title: string, index) => { Image($r('app.media.ic_clear_record')).width(16).height(16)
this.tab(title, index); Text('全部清空').fontColor('#6C7084').fontSize(12).margin({ left: 4 })
}) }
Blank().layoutWeight(1) .onClick(() => {
Row() { TipDialog.show(this.getUIContext(), {title: '提示', content: '确定清空记录?', callback: {
Image($r('app.media.ic_clear_record')).width(16).height(16) confirm: () => {
Text('全部清空').fontColor($r('app.color.color_80ffffff')).fontSize(12).margin({ left: 4 }) this.viewModel.deleteHistoryList(`${this.getStartTime()}`, `${this.getEndTime()}`)
} }
.onClick(() => { }})
TipDialog.show(this.getUIContext(), {title: '提示', content: '确定清空记录?', callback: { })
confirm: () => { .height(50)
this.viewModel.deleteHistoryList(`${this.getStartTime()}`, `${this.getEndTime()}`) .margin({ top: 3, right: 16 })
}
}})
})
}.padding({ left: 16, right: 16 })
.margin({ top: 10 })
}.layoutWeight(1) }.layoutWeight(1)
} }
.width('100%') .width('100%')
@ -84,19 +89,18 @@ struct DownloadHistory {
} }
@Builder @Builder
tab(tabName: string, tabIndex: number) { tabBuilder(title: string, targetIndex: number) {
Row() { Stack() {
Text(tabName) if (this.currentIndex === targetIndex) {
.fontSize(this.currentIndex === tabIndex ? 17 : 14) Image($r('app.media.ic_tab_indicator')).width(27).height(11).margin({ top: 13 })
.fontWeight(this.currentIndex === tabIndex ? FontWeight.Medium : FontWeight.Regular) }
.lineHeight(24) Text(title)
.fontColor(tabIndex === this.currentIndex ? $r("app.color.color_466afd") : $r('app.color.color_50ffffff')) .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') .width('auto')
.height('auto') .height(50)
.onClick(() => { .margin({ left: targetIndex === 0 ? 16 : 40 })
this.tabController.changeIndex(tabIndex);
this.currentIndex = tabIndex;
})
} }
} }

View File

@ -113,15 +113,15 @@ struct BindAccountPage {
build() { build() {
Column() { Column() {
TitleBar({ title: '账号绑定' }).width('100%') TitleBar({ title: '账号绑定' }).backgroundColor(Color.White)
Row() { Row() {
Image($r('app.media.ic_bind_wx')).width(30).height(30) 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) ? '立即绑定' : '解除绑定') Text(StrUtil.isEmpty(this.userEntity?.unionid) ? '立即绑定' : '解除绑定')
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor(Color.White) .fontColor($r('app.color.color_1a1a1a'))
.fontSize(12) .fontSize(12)
.borderColor(Color.White) .borderColor($r('app.color.color_dfdfdf'))
.borderWidth(1) .borderWidth(1)
.borderRadius(4) .borderRadius(4)
.width(64) .width(64)
@ -145,16 +145,16 @@ struct BindAccountPage {
}}) }})
} }
}) })
}.width('100%').height(60).padding({ left: 16, right: 16 }) }.width('100%').height(60).padding({ left: 16, right: 16 }).backgroundColor(Color.White)
Divider().color($r('app.color.color_10ffffff')).strokeWidth(1).margin({left: 16, right: 16}) Divider().color('#EFF2F7').strokeWidth(1).margin({left: 16, right: 16})
Row() { Row() {
Image($r('app.media.ic_bind_phone')).width(30).height(30) 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) ? '立即绑定' : '解除绑定') Text(StrUtil.isEmpty(this.userEntity?.phone) ? '立即绑定' : '解除绑定')
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor(Color.White) .fontColor($r('app.color.color_1a1a1a'))
.fontSize(12) .fontSize(12)
.borderColor(Color.White) .borderColor($r('app.color.color_dfdfdf'))
.borderWidth(1) .borderWidth(1)
.borderRadius(4) .borderRadius(4)
.width(64) .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')) .backgroundColor($r('app.color.window_background'))
.height('100%') .height('100%')

View File

@ -56,6 +56,7 @@ struct ManageAccountPage {
onLoginChange(monitor: IMonitor) { onLoginChange(monitor: IMonitor) {
const loginEntity = monitor.value()?.now as LoginEntity; const loginEntity = monitor.value()?.now as LoginEntity;
LoginManager.saveToken(loginEntity.token); LoginManager.saveToken(loginEntity.token);
LoginManager.saveLastLoginType('device')
LoginManager.saveLastUserInfo(LoginManager.getUserInfo()!!); LoginManager.saveLastUserInfo(LoginManager.getUserInfo()!!);
ConfigManager.saveBindWxPlaybackHelper(false); ConfigManager.saveBindWxPlaybackHelper(false);
ConfigManager.saveBindWxVideoHelper(false); ConfigManager.saveBindWxVideoHelper(false);
@ -76,27 +77,12 @@ struct ManageAccountPage {
build() { build() {
Column() { Column() {
TitleBar({ title: '名下账户管理' }).width('100%') TitleBar({ title: '账户管理' }).backgroundColor(Color.White)
Scroll() { Scroll() {
Column() { 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 }) 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() { List() {
ForEach(this.accountList, (item: AccountEntity) => { ForEach(this.accountList, (item: AccountEntity) => {
ListItem() { ListItem() {
@ -104,7 +90,7 @@ struct ManageAccountPage {
} }
.margin({ left: 20, top: 14, right: 20 }) .margin({ left: 20, top: 14, right: 20 })
.onClick(() => { .onClick(() => {
TipDialog.show(this.getUIContext(), {content: '您确定要切换账户吗', callback: { TipDialog.show(this.getUIContext(), {title: '温馨提示', content: '是否确定切换账号', callback: {
confirm: () => { confirm: () => {
LoginManager.saveToken(''); LoginManager.saveToken('');
this.viewModel.changeAccount(item.user_id); this.viewModel.changeAccount(item.user_id);

View File

@ -54,7 +54,7 @@ struct FeedbackPage {
Scroll() { Scroll() {
Column() { Column() {
Row() { Row() {
Text('请选择您要反馈的问题').fontColor($r('app.color.color_90ffffff')).fontSize(14) Text('请选择您要反馈的问题').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
Text('*').fontColor('#FF3838') Text('*').fontColor('#FF3838')
} }
.width('100%') .width('100%')
@ -62,16 +62,12 @@ struct FeedbackPage {
Row() { Row() {
Button('产品建议', { type: ButtonType.Normal }) Button('产品建议', { type: ButtonType.Normal })
.height(32) .height(32)
.fontColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_90ffffff') : .fontColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
$r('app.color.color_50ffffff'))
.fontSize(14) .fontSize(14)
.linearGradient({ .backgroundColor(this.type === FeedbackType.SUGGESTION ? '#1a466afd' : Color.Transparent)
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'))
.borderRadius(4) .borderRadius(4)
.borderWidth(1)
.borderColor(this.type === FeedbackType.SUGGESTION ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
.padding({ left: 14, right: 14 }) .padding({ left: 14, right: 14 })
.onClick(() => { .onClick(() => {
this.type = FeedbackType.SUGGESTION this.type = FeedbackType.SUGGESTION
@ -79,16 +75,12 @@ struct FeedbackPage {
Button('功能异常', { type: ButtonType.Normal }) Button('功能异常', { type: ButtonType.Normal })
.height(32) .height(32)
.fontColor(this.type === FeedbackType.BUG ? $r('app.color.color_90ffffff') : .fontColor(this.type === FeedbackType.BUG ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
$r('app.color.color_50ffffff'))
.fontSize(14) .fontSize(14)
.linearGradient({ .backgroundColor(this.type === FeedbackType.BUG ? '#1a466afd' : Color.Transparent)
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'))
.borderRadius(4) .borderRadius(4)
.borderWidth(1)
.borderColor(this.type === FeedbackType.BUG ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
.padding({ left: 14, right: 14 }) .padding({ left: 14, right: 14 })
.margin({ left: 12 }) .margin({ left: 12 })
.onClick(() => { .onClick(() => {
@ -97,16 +89,12 @@ struct FeedbackPage {
Button('其他问题', { type: ButtonType.Normal }) Button('其他问题', { type: ButtonType.Normal })
.height(32) .height(32)
.fontColor(this.type === FeedbackType.OTHER ? $r('app.color.color_90ffffff') : .fontColor(this.type === FeedbackType.OTHER ? $r('app.color.color_466afd') : $r('app.color.color_999999'))
$r('app.color.color_50ffffff'))
.fontSize(14) .fontSize(14)
.linearGradient({ .backgroundColor(this.type === FeedbackType.OTHER ? '#1a466afd' : Color.Transparent)
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'))
.borderRadius(4) .borderRadius(4)
.borderWidth(1)
.borderColor(this.type === FeedbackType.OTHER ? $r('app.color.color_466afd') : $r('app.color.color_cccccc'))
.padding({ left: 14, right: 14 }) .padding({ left: 14, right: 14 })
.margin({ left: 12 }) .margin({ left: 12 })
.onClick(() => { .onClick(() => {
@ -116,7 +104,7 @@ struct FeedbackPage {
.margin({ top: 16 }) .margin({ top: 16 })
Row() { Row() {
Text('问题描述').fontColor($r('app.color.color_90ffffff')).fontSize(14) Text('问题描述').fontColor($r('app.color.color_1a1a1a')).fontSize(14)
Text('*').fontColor('#FF3838') Text('*').fontColor('#FF3838')
} }
.width('100%') .width('100%')
@ -125,13 +113,15 @@ struct FeedbackPage {
RelativeContainer() { RelativeContainer() {
TextArea({ placeholder: '请输入详情内容' }) TextArea({ placeholder: '请输入详情内容' })
.height('100%') .height('100%')
.placeholderColor($r('app.color.color_30ffffff')) .placeholderColor($r('app.color.color_bcbcbc'))
.placeholderFont({ size: 14 }) .placeholderFont({ size: 14 })
.fontSize(14) .fontSize(14)
.fontColor($r('app.color.color_80ffffff')) .fontColor($r('app.color.color_1a1a1a'))
.maxLength(200) .maxLength(200)
.borderRadius(8) .borderRadius(8)
.backgroundColor($r('app.color.color_222222')) .borderWidth(1)
.borderColor($r('app.color.color_dfdfdf'))
.backgroundColor(Color.Transparent)
.onChange((value: string) => { .onChange((value: string) => {
this.contentText = value this.contentText = value
}) })
@ -145,15 +135,15 @@ struct FeedbackPage {
}.height(142).margin({ top: 16 }) }.height(142).margin({ top: 16 })
Row() { 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) Text('选填最多可上传3张').fontColor($r('app.color.color_999999')).fontSize(10)
} }
.width('100%') .width('100%')
.margin({ top: 20 }) .margin({ top: 20 })
Grid() { List() {
ForEach(this.selectedPhotos, (item: string, index) => { ForEach(this.selectedPhotos, (item: string, index) => {
GridItem() { ListItem() {
AddImageItemView({ uri: item, index: index, onDelete: (uri) => { AddImageItemView({ uri: item, index: index, onDelete: (uri) => {
for (let i = 0; i < this.selectedPhotos.length; i++) { for (let i = 0; i < this.selectedPhotos.length; i++) {
const photo = this.selectedPhotos[i]; const photo = this.selectedPhotos[i];
@ -165,37 +155,40 @@ struct FeedbackPage {
} }
} }) } })
} }
.width('25%')
}) })
GridItem() { if (this.selectedPhotos.length < 3) {
AddImageItemView({index: this.selectedPhotos.length}) ListItem() {
.onClick(() => { AddImageItemView({index: this.selectedPhotos.length})
PhotoHelper.select({ .onClick(() => {
MIMEType: photoAccessHelper.PhotoViewMIMETypes.IMAGE_TYPE, PhotoHelper.select({
maxSelectNumber: 3, MIMEType: photoAccessHelper.PhotoViewMIMETypes.IMAGE_TYPE,
preselectedUris: this.selectedUris, maxSelectNumber: 3,
isOriginalSupported: false 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) { .width('25%')
this.selectedPhotos = result.photoUris
this.selectedUris = result.photoUris
}
})
.catch((e: BusinessError) => {
ToastUtils.show(e.message)
})
})
} }
.visibility(this.selectedImages.length < 3 ? Visibility.Visible : Visibility.None)
} }
.width('100%') .width('100%')
.height(80) .height(80)
.scrollBar(BarState.Off) .scrollBar(BarState.Off)
.columnsTemplate('1fr 1fr 1fr') .listDirection(Axis.Horizontal)
.margin({ top: 16 }) .margin({ top: 16 })
Row() { 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) Text('(选填,可留下您的手机号、微信、邮箱)').fontColor($r('app.color.color_999999')).fontSize(10)
} }
.width('100%') .width('100%')
@ -203,13 +196,15 @@ struct FeedbackPage {
TextInput({ placeholder: '请输入您的联系方式' }) TextInput({ placeholder: '请输入您的联系方式' })
.height(50) .height(50)
.placeholderColor($r('app.color.color_30ffffff')) .placeholderColor($r('app.color.color_bcbcbc'))
.placeholderFont({ size: 14 }) .placeholderFont({ size: 14 })
.fontSize(14) .fontSize(14)
.fontColor($r('app.color.color_80ffffff')) .fontColor($r('app.color.color_1a1a1a'))
.maxLength(200) .maxLength(200)
.borderRadius(8) .borderRadius(8)
.backgroundColor($r('app.color.color_222222')) .borderWidth(1)
.borderColor($r('app.color.color_dfdfdf'))
.backgroundColor(Color.Transparent)
.margin({ top: 16 }) .margin({ top: 16 })
.onChange((value: string) => { .onChange((value: string) => {
this.contactText = value this.contactText = value
@ -227,12 +222,9 @@ struct FeedbackPage {
.fontColor(Color.White) .fontColor(Color.White)
.fontSize(15) .fontSize(15)
.fontWeight(FontWeight.Medium) .fontWeight(FontWeight.Medium)
.linearGradient({
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
direction: GradientDirection.Right
})
.width('100%') .width('100%')
.height(46) .height(46)
.backgroundColor($r('app.color.color_466afd'))
.onClick(() => { .onClick(() => {
this.commit() this.commit()
}) })
@ -242,6 +234,6 @@ struct FeedbackPage {
} }
.width('100%') .width('100%')
.height('100%') .height('100%')
.backgroundColor($r('app.color.window_background')) .backgroundColor(Color.White)
} }
} }

View File

@ -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) Text(this.userinfo?.name)
.width('88%') .width('88%')
.height(48) .height(48)
.fontSize(15) .fontSize(15)
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_1a1a1a'))
.maxLines(1) .maxLines(1)
.padding({ left: 14, right: 14 }) .padding({ left: 14, right: 14 })
.margin({ top: 12 }) .margin({ top: 12 })
.borderRadius(25) .borderRadius(8)
.backgroundColor($r('app.color.color_222222')) .backgroundColor(Color.White)
.onClick(() => { .onClick(() => {
EditTextDialog.show(this.getUIContext(), { title: '编辑昵称', content: this.userinfo?.name, confirm: (content) => { EditTextDialog.show(this.getUIContext(), { title: '编辑昵称', content: this.userinfo?.name, confirm: (content) => {
const params: Record<string, string> = { 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 + ' 到期' : '终身会员') Text(this.userinfo?.vip === 1 ? '未开通' : this.userinfo?.vip === 2 ? this.userinfo?.vip_expire + ' 到期' : '终身会员')
.width('88%') .width('88%')
.height(48) .height(48)
.fontSize(15) .fontSize(15)
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_1a1a1a'))
.maxLines(1) .maxLines(1)
.padding({ left: 14, right: 14 }) .padding({ left: 14, right: 14 })
.margin({ top: 12 }) .margin({ top: 12 })
.borderRadius(25) .borderRadius(8)
.backgroundColor($r('app.color.color_222222')) .backgroundColor(Color.White)
} }
.width('100%') .width('100%')
.height('100%') .height('100%')

View File

@ -11,7 +11,7 @@ import { PayUtils } from '../../../../utils/PayUtils';
import { ToastUtils } from '../../../../utils/ToastUtils'; import { ToastUtils } from '../../../../utils/ToastUtils';
import { OnWXResp, WXApi, WXEventHandler } from '../../../../utils/wechat/WXApiEventHandlerImpl'; import { OnWXResp, WXApi, WXEventHandler } from '../../../../utils/wechat/WXApiEventHandlerImpl';
import { TitleBar } from '../../../../view/TitleBar'; import { TitleBar } from '../../../../view/TitleBar';
import { VipMealItemView } from '../../../../view/VipMealItemView'; import { VipGoodsItemView } from '../../../../view/VipGoodsItemView';
import { VipViewModel } from '../../../../viewModel/VipViewModel'; import { VipViewModel } from '../../../../viewModel/VipViewModel';
import { BusinessError, systemDateTime } from '@kit.BasicServicesKit'; import { BusinessError, systemDateTime } from '@kit.BasicServicesKit';
import router from '@ohos.router'; import router from '@ohos.router';
@ -20,6 +20,8 @@ import { EventReportGlobalManager } from '../../../../manager/EventReportGlobalM
import { SimpleTipDialog } from '../../../../dialog/SimpleTipDialog'; import { SimpleTipDialog } from '../../../../dialog/SimpleTipDialog';
import { OrderEntity } from '../../../../entity/OrderEntity'; import { OrderEntity } from '../../../../entity/OrderEntity';
import { TipDialog } from '../../../../dialog/TipDialog'; import { TipDialog } from '../../../../dialog/TipDialog';
import { window } from '@kit.ArkUI';
import { MenuEntity, vipTipsList } from '../../../../entity/MenuEntity';
@Entry @Entry
@ComponentV2 @ComponentV2
@ -32,6 +34,8 @@ struct VipPage {
@Local payType: number = 0; //0微信支付 1支付宝支付 @Local payType: number = 0; //0微信支付 1支付宝支付
@Local totalPrice: number = 0; @Local totalPrice: number = 0;
windowStage: window.WindowStage = AppStorage.get("windowStage") as window.WindowStage;
showQueryTip: boolean = false //是否显示支付状态查询提示 showQueryTip: boolean = false //是否显示支付状态查询提示
viewModel: VipViewModel = new VipViewModel(this.getUIContext()); viewModel: VipViewModel = new VipViewModel(this.getUIContext());
@ -111,12 +115,20 @@ struct VipPage {
} }
aboutToAppear() { aboutToAppear() {
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
statusBarColor: '#00000000',
statusBarContentColor: '#FFFFFF'
});
WXEventHandler.registerOnWXRespCallback(this.onWXResp) WXEventHandler.registerOnWXRespCallback(this.onWXResp)
this.initParams(); this.initParams();
this.viewModel.mealList(); this.viewModel.mealList();
} }
aboutToDisappear() { aboutToDisappear() {
this.windowStage.getMainWindowSync().setWindowSystemBarProperties({
statusBarColor: '#00000000',
statusBarContentColor: '#000000'
});
WXEventHandler.unregisterOnWXRespCallback(this.onWXResp) WXEventHandler.unregisterOnWXRespCallback(this.onWXResp)
this.viewModel.cancelInterval() this.viewModel.cancelInterval()
} }
@ -241,20 +253,14 @@ struct VipPage {
RelativeContainer() { RelativeContainer() {
Image($r("app.media.ic_vip_top_bg")) Image($r("app.media.ic_vip_top_bg"))
.width('100%') .width('100%')
.aspectRatio(1.4) .aspectRatio(1.175)
.id('iv_top_bg') .id('iv_top_bg')
Column() { Column() {
Image($r('app.media.ic_vip_tips'))
.width('100%')
.aspectRatio(0.997)
.margin({ left: 20, right: 20 })
.id('iv_tips')
List() { List() {
ForEach(this.vipMealList, (item: VipMealEntity) => { ForEach(this.vipMealList, (item: VipMealEntity) => {
ListItem() { ListItem() {
VipMealItemView({ VipGoodsItemView({
entity: item, entity: item,
isChecked: this.vipMeal?.goods_id === item.goods_id, isChecked: this.vipMeal?.goods_id === item.goods_id,
isGrid: this.vipMealList.length <= 3 isGrid: this.vipMealList.length <= 3
@ -276,9 +282,64 @@ struct VipPage {
.height('auto') .height('auto')
.listDirection(this.vipMealList.length > 3 ? Axis.Horizontal : Axis.Vertical) .listDirection(this.vipMealList.length > 3 ? Axis.Horizontal : Axis.Vertical)
.alignListItem(ListItemAlign.Center) .alignListItem(ListItemAlign.Center)
.margin({ left: 14, top: 30, right: 14 }) .margin({ left: 14, right: 14 })
.lanes(this.vipMealList.length > 3 ? 1 : 3) .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() { Row() {
Image($r('app.media.ic_coupon')).width(30).height(30) Image($r('app.media.ic_coupon')).width(30).height(30)
@ -291,18 +352,23 @@ struct VipPage {
.margin({ top: 22 }) .margin({ top: 22 })
.visibility(Visibility.None) .visibility(Visibility.None)
Text('支付方式') Row() {
.fontColor(Color.White) Text('支付方式').fontSize(14).fontWeight(FontWeight.Medium)
.fontSize(14) .blendMode(BlendMode.DST_IN, BlendApplyType.OFFSCREEN)
.fontWeight(FontWeight.Medium) }
.margin({ left: 20, top: 22 }) .linearGradient({
.alignSelf(ItemAlign.Start) 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() { Row() {
Image($r('app.media.ic_wx_pay')).width(30).height(30) 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) 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) .width(18)
.height(18) .height(18)
} }
@ -318,9 +384,9 @@ struct VipPage {
Row() { Row() {
Image($r('app.media.ic_ali_pay')).width(30).height(30) 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) 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) .width(18)
.height(18) .height(18)
} }
@ -377,7 +443,7 @@ struct VipPage {
.alignRules({ .alignRules({
top: { anchor: 'iv_top_bg', align: VerticalAlign.Bottom } top: { anchor: 'iv_top_bg', align: VerticalAlign.Bottom }
}) })
.margin({ top: -32 }) .margin({ top: -55 })
} }
.height('auto') .height('auto')
} }
@ -387,27 +453,27 @@ struct VipPage {
Row() { Row() {
Text() { Text() {
Span('¥').fontSize(13) Span('¥').fontSize(13)
Span(`${this.totalPrice}`).fontSize(24) Span(`${this.totalPrice}`).fontSize(24).fontFamily('ddp500m')
Span(this.formatPricePeriod(this.vipMeal?.value)).fontSize(13) Span(this.formatPricePeriod(this.vipMeal?.value)).fontSize(13)
Span(' ') Span(' ')
Span('¥' + this.vipMeal?.origin_price) Span('已优惠' + this.vipMeal?.origin_price + '元')
.fontColor($r('app.color.color_30ffffff')) .fontColor('#FFC4A6')
.fontSize(12) .fontSize(12)
.decoration({ type: TextDecorationType.LineThrough, color: $r('app.color.color_30ffffff') }) .decoration({ type: TextDecorationType.LineThrough, color: $r('app.color.color_30ffffff') })
} }
.fontColor('#94F2FE') .fontColor('#F03535')
Blank().layoutWeight(1) Blank().layoutWeight(1)
Text('立即开通') Text('立即开通')
.width(170) .width(148)
.height(45) .height(46)
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor('#201847') .fontColor(Color.White)
.fontSize(16) .fontSize(16)
.fontWeight(FontWeight.Medium) .fontWeight(FontWeight.Medium)
.backgroundImage($r('app.media.ic_vip_pay_btn')) .backgroundImage($r('app.media.ic_vip_pay_btn'))
.backgroundImageSize({ width: 170, height: 46 }) .backgroundImageSize({ width: '100%', height: '100%' })
.onClick(() => { .onClick(() => {
if (this.vipMeal) { if (this.vipMeal) {
if (ConfigManager.isPayAgreementEnable() && !this.isAgree) { if (ConfigManager.isPayAgreementEnable() && !this.isAgree) {
@ -425,7 +491,7 @@ struct VipPage {
} }
}) })
} }
.backgroundColor('#29253D') .backgroundColor('#1F2126')
.borderRadius({ topLeft: 20, topRight: 20 }) .borderRadius({ topLeft: 20, topRight: 20 })
.padding({ .padding({
top: 9, top: 9,
@ -438,6 +504,7 @@ struct VipPage {
.height('100%') .height('100%')
TitleBar({ TitleBar({
isDark: true,
onBackClick: () => { onBackClick: () => {
if (this.isGuide) { if (this.isGuide) {
EventReportGlobalManager.eventReport(EventConstants.GUIDE_SKIP, "icon", this.pageDuration()) EventReportGlobalManager.eventReport(EventConstants.GUIDE_SKIP, "icon", this.pageDuration())
@ -448,6 +515,6 @@ struct VipPage {
} }
.width('100%') .width('100%')
.height('100%') .height('100%')
.backgroundColor($r('app.color.window_background')) .backgroundColor('#0F1016')
} }
} }

View File

@ -1,18 +1,32 @@
import { StrUtil } from "@pura/harmony-utils"; import { StrUtil } from "@pura/harmony-utils";
import { AccountEntity } from "../entity/AccountEntity" import { AccountEntity } from "../entity/AccountEntity"
import { LoginManager } from "../manager/LoginGlobalManager";
import { ConfigManager } from "../manager/UserConfigManager";
@ComponentV2 @ComponentV2
export struct AccountItemView { export struct AccountItemView {
@Param account?: AccountEntity = new AccountEntity(); @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() { build() {
RelativeContainer() { 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) Text(this.account?.name)
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_1a1a1a'))
.fontSize(16) .fontSize(16)
.fontWeight(FontWeight.Medium) .fontWeight(FontWeight.Medium)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.ellipsisMode(EllipsisMode.END)
.alignRules({ .alignRules({
left: { anchor: 'iv_avatar', align: HorizontalAlign.End }, left: { anchor: 'iv_avatar', align: HorizontalAlign.End },
top: { anchor: 'iv_avatar', align: VerticalAlign.Top } top: { anchor: 'iv_avatar', align: VerticalAlign.Top }
@ -25,10 +39,7 @@ export struct AccountItemView {
.textAlign(TextAlign.Center) .textAlign(TextAlign.Center)
.fontColor(Color.White) .fontColor(Color.White)
.fontSize(10) .fontSize(10)
.linearGradient({ .backgroundColor($r('app.color.color_466afd'))
colors: [['#F62C6C', 0.0], ['#FC4F54', 1.0]],
direction: GradientDirection.Right
})
.borderRadius(3) .borderRadius(3)
.padding({ .padding({
left: 3, left: 3,
@ -42,67 +53,49 @@ export struct AccountItemView {
}) })
.visibility(this.account?.vip_type !== 1 ? Visibility.Visible : Visibility.None) .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({ .alignRules({
left: { anchor: 'tv_username', align: HorizontalAlign.Start }, left: { anchor: 'tv_username', align: HorizontalAlign.Start },
bottom: { anchor: 'iv_avatar', align: VerticalAlign.Bottom } bottom: { anchor: 'iv_avatar', align: VerticalAlign.Bottom }
}) })
.id('tv_user_id')
Text(this.account?.create_time + ' 注册').fontColor($r('app.color.color_999999')).fontSize(12) Row(){
.alignRules({ if (this.account?.user_id === LoginManager.getUserInfo()?.user_id) {
right: { anchor: '__container__', align: HorizontalAlign.End }, Blank().width(4).height(4).backgroundColor('#FF8340').borderRadius(2)
bottom: { anchor: 'iv_avatar', align: VerticalAlign.Bottom } Text('当前账号').fontColor('#FF8340').fontSize(14).margin({left: 4})
}) } else {
.visibility(StrUtil.isNotEmpty(this.account?.create_time) ? Visibility.Visible : Visibility.None) Text('切换').fontColor($r('app.color.color_999999')).fontSize(14)
Image($r('app.media.ic_change_account')).width(16).height(16).margin({left: 4})
Divider() }
.color($r('app.color.color_10ffffff')) }
.strokeWidth(1) .alignRules({
.alignRules({ top: { anchor: 'tv_username', align: VerticalAlign.Top },
top: { anchor: 'iv_avatar', align: VerticalAlign.Bottom } end: { anchor: '__container__', align: HorizontalAlign.End},
}) bottom: { anchor: 'tv_username', align: VerticalAlign.Bottom }
.margin({ top: 18 }) })
.id('divider')
Row() { Row() {
Text('账户绑定')
.fontColor($r('app.color.color_50ffffff'))
.fontSize(14)
Image($r('app.media.ic_bind_phone')).width(20).height(20).margin({ left: 10 }) Image($r('app.media.ic_bind_phone')).width(20).height(20).margin({ left: 10 })
.visibility(this.account?.bind.includes('phone') ? Visibility.Visible : Visibility.None) .visibility(this.account?.bind.includes('phone') ? Visibility.Visible : Visibility.None)
Image($r('app.media.ic_bind_wx')).width(20).height(20).margin({ left: 10 }) Image($r('app.media.ic_bind_wx')).width(20).height(20).margin({ left: 10 })
.visibility(this.account?.bind.includes('weixin') ? Visibility.Visible : Visibility.None) .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({ .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') .height('auto')
.borderRadius(10) .borderRadius(10)
.backgroundColor($r('app.color.color_222222')) .backgroundColor(Color.White)
.padding({ .padding({
left: 16, left: 12,
top: 18, top: 16,
right: 16, right: 12,
bottom: 14 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 '';
}
} }

View File

@ -1,4 +1,3 @@
import { UploadImgEntity } from "../entity/UploadImgEntity"
@ComponentV2 @ComponentV2
export struct AddImageItemView { export struct AddImageItemView {
@ -9,22 +8,19 @@ export struct AddImageItemView {
build() { build() {
Stack() { Stack() {
RelativeContainer() { RelativeContainer() {
Text('+') Image($r('app.media.ic_add_feedback_image')).width(26).height(26)
.fontColor($r('app.color.color_30ffffff'))
.fontSize(40)
.alignRules({ .alignRules({
left: { anchor: '__container__', align: HorizontalAlign.Start }, left: { anchor: '__container__', align: HorizontalAlign.Start },
top: { anchor: '__container__', align: VerticalAlign.Top }, top: { anchor: '__container__', align: VerticalAlign.Top },
right: { anchor: '__container__', align: HorizontalAlign.End }, right: { anchor: '__container__', align: HorizontalAlign.End },
bottom: { anchor: '__container__', align: VerticalAlign.Bottom } bottom: { anchor: '__container__', align: VerticalAlign.Bottom }
}) })
.width('auto')
.visibility(this.uri ? Visibility.None : Visibility.Visible) .visibility(this.uri ? Visibility.None : Visibility.Visible)
Image(this.uri).width('100%').height('100%') Image(this.uri).width('100%').height('100%')
.visibility(this.uri ? Visibility.Visible : Visibility.None) .visibility(this.uri ? Visibility.Visible : Visibility.None)
Image($r('app.media.ic_delete_img')) Image($r('app.media.ic_delete_feedback_img'))
.width(18) .width(18)
.height(18) .height(18)
.alignRules({ .alignRules({
@ -41,7 +37,9 @@ export struct AddImageItemView {
.width(80) .width(80)
.height(80) .height(80)
.borderRadius(8) .borderRadius(8)
.backgroundColor($r('app.color.color_222222')) .borderWidth(1)
.borderColor($r('app.color.color_dfdfdf'))
.backgroundColor(Color.Transparent)
.clip(true) .clip(true)
} }
.width('100%') .width('100%')

View File

@ -10,7 +10,7 @@ export struct DiamondItemView {
Image(this.goodInfo?.image).width(24).height(24).id('iv_icon') Image(this.goodInfo?.image).width(24).height(24).id('iv_icon')
.margin({left: 16, top: 17}) .margin({left: 16, top: 17})
Text() { Text() {
Span('兑换钻石 ').fontSize(15).fontWeight(FontWeight.Medium) Span('兑换M币 ').fontSize(15).fontWeight(FontWeight.Medium)
Span(this.goodInfo?.value).fontSize(24).fontFamily('ddp500m') Span(this.goodInfo?.value).fontSize(24).fontFamily('ddp500m')
Span('个').fontSize(12) Span('个').fontSize(12)
} }
@ -21,7 +21,7 @@ export struct DiamondItemView {
.margin({left: 12, top: 13}) .margin({left: 12, top: 13})
.id('tv_count') .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')) .fontColor($r('app.color.color_666666'))
.fontSize(12) .fontSize(12)
.alignRules({ .alignRules({

View File

@ -20,8 +20,8 @@ export struct DownloadHistoryItemView {
.backgroundColor(this.historyEntity?.getTypeBgColor()) .backgroundColor(this.historyEntity?.getTypeBgColor())
.padding({left: 4, right: 4}) .padding({left: 4, right: 4})
Text(this.historyEntity?.title) Text(this.historyEntity?.title)
.fontColor($r('app.color.color_90ffffff')) .fontColor($r('app.color.color_212226'))
.fontSize(15) .fontSize(14)
.maxLines(1) .maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis }) .textOverflow({ overflow: TextOverflow.Ellipsis })
.ellipsisMode(EllipsisMode.END) .ellipsisMode(EllipsisMode.END)
@ -29,7 +29,7 @@ export struct DownloadHistoryItemView {
.layoutWeight(1) .layoutWeight(1)
} }
Text(this.historyEntity?.description ? this.historyEntity?.description : this.historyEntity?.title) Text(this.historyEntity?.description ? this.historyEntity?.description : this.historyEntity?.title)
.fontColor($r('app.color.color_60ffffff')) .fontColor('#646670')
.fontSize(12) .fontSize(12)
.maxLines(1) .maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis }) .textOverflow({ overflow: TextOverflow.Ellipsis })
@ -37,7 +37,7 @@ export struct DownloadHistoryItemView {
.margin({top: 5}) .margin({top: 5})
Row() { 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}) Text(this.historyEntity?.create_time).fontColor($r('app.color.color_999999')).fontSize(10).margin({left: 10})
}.margin({top: 8}) }.margin({top: 8})
} }
@ -45,7 +45,7 @@ export struct DownloadHistoryItemView {
.alignItems(HorizontalAlign.Start) .alignItems(HorizontalAlign.Start)
.layoutWeight(1) .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(){ Stack(){
Image(this.historyEntity?.request ? $r('app.media.ic_download_enable') : $r('app.media.ic_download_disable')).width(26).height(26) 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%') .width('100%')
.padding({ top: 16, bottom: 16 }) .padding({ top: 16, bottom: 16 })
.backgroundColor($r('app.color.color_222222')) .backgroundColor(Color.White)
.borderRadius(6) .borderRadius(6)
} }
.width('100%') .width('100%')

View File

@ -1,9 +1,9 @@
import { NumberUtil, StrUtil } from "@pura/harmony-utils"; import { NumberUtil, StrUtil } from "@pura/harmony-utils";
import { VipMealEntity } from "../entity/VipMealEntity"; import { VipMealEntity as VipGoodsEntity } from "../entity/VipMealEntity";
@ComponentV2 @ComponentV2
export struct VipMealItemView { export struct VipGoodsItemView {
@Param entity: VipMealEntity = new VipMealEntity(); @Param entity: VipGoodsEntity = new VipGoodsEntity();
@Param isChecked: boolean = false; @Param isChecked: boolean = false;
@Param isGrid: boolean = true; @Param isGrid: boolean = true;
@ -11,21 +11,21 @@ export struct VipMealItemView {
RelativeContainer() { RelativeContainer() {
Column() { Column() {
Text(this.entity.goods_name) Text(this.entity.goods_name)
.fontColor(this.isChecked ? Color.White : '#ABABAB') .fontColor(this.isChecked ? '#54230C' : '#ABABAB')
.fontSize(this.isChecked ? 15 : 12) .fontSize(this.isChecked ? 15 : 12)
.fontWeight(this.isChecked ? FontWeight.Medium : FontWeight.Regular) .fontWeight(this.isChecked ? FontWeight.Medium : FontWeight.Regular)
.margin({ top: this.isChecked ? 18 : 12 }) .margin({ top: this.isChecked ? 18 : 12 })
Text() { Text() {
Span('¥').fontSize(this.isChecked ? 12 : 10) 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) .fontWeight(FontWeight.Medium)
.margin({ top: this.isChecked ? 10 : 4 }) .margin({ top: this.isChecked ? 10 : 4 })
Text() { Text() {
Span('¥' + this.entity.origin_price).fontColor(this.isChecked ? $r('app.color.color_30ffffff') : '#6B6B6B').fontSize(this.isChecked ? 13 : 10) Span('¥' + this.entity.origin_price).fontColor(this.isChecked ? '#896451' : '#6B6B6B').fontSize(this.isChecked ? 13 : 10)
.decoration({ type: TextDecorationType.LineThrough, color: this.isChecked ? $r('app.color.color_30ffffff') : '#6B6B6B' }) .decoration({ type: TextDecorationType.LineThrough, color: this.isChecked ? '#896451' : '#6B6B6B' })
} }
.margin({ top:this.isChecked ? 5 : 2 }) .margin({ top:this.isChecked ? 5 : 2 })
@ -34,18 +34,22 @@ export struct VipMealItemView {
.width('100%') .width('100%')
.height(this.isChecked ? 28 : 22) .height(this.isChecked ? 28 : 22)
.textAlign(TextAlign.Center) .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) .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}) .borderRadius({bottomLeft: this.isChecked ? 10 : 8, bottomRight: this.isChecked ? 10 : 8})
.margin({ top: 10 }) .margin({ top: 10 })
} }
.height('auto') .height('auto')
.linearGradient({ .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 direction: GradientDirection.Right
}) })
.backgroundColor(this.isChecked ? Color.Transparent : '#2B2B38') .backgroundColor(this.isChecked ? Color.Transparent : '#242529')
.borderRadius(this.isChecked ? 10 : 8) .borderRadius(this.isChecked ? 10 : 8)
.borderWidth(1) .borderWidth(1)
.borderColor(this.isChecked ? '#94F2FE' : Color.Transparent) .borderColor(this.isChecked ? '#94F2FE' : Color.Transparent)

View File

@ -48,6 +48,10 @@
"name": "color_eff2f7", "name": "color_eff2f7",
"value": "#EFF2F7" "value": "#EFF2F7"
}, },
{
"name": "color_cccccc",
"value": "#CCCCCC"
},
{ {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 944 B

View File

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 247 KiB