diff --git a/admin/components.d.ts b/admin/components.d.ts index 0e8102b9..6a543121 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -52,4 +52,7 @@ declare module 'vue' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } + export interface GlobalDirectives { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/admin/src/api/index.ts b/admin/src/api/index.ts index 06eb9cbf..c31fcd5d 100644 --- a/admin/src/api/index.ts +++ b/admin/src/api/index.ts @@ -10,3 +10,4 @@ export * from './points' export * from './stamp' export * from './upload' export * from './user' +export * from './testAccount' diff --git a/admin/src/api/testAccount.ts b/admin/src/api/testAccount.ts new file mode 100644 index 00000000..05dfd6ec --- /dev/null +++ b/admin/src/api/testAccount.ts @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// 测试账号 API + +/** 获取测试账号列表 */ +export function getTestAccounts() { + return request.get('/test-account') +} + +/** 新增/更新测试账号 */ +export function saveTestAccount(data: { phone: string; code: string }) { + return request.post('/test-account', data) +} + +/** 删除测试账号 */ +export function deleteTestAccount(phone: string) { + return request.delete(`/test-account/${encodeURIComponent(phone)}`) +} diff --git a/admin/src/layout/AdminLayout.vue b/admin/src/layout/AdminLayout.vue index a514041b..19ecbaa0 100644 --- a/admin/src/layout/AdminLayout.vue +++ b/admin/src/layout/AdminLayout.vue @@ -96,6 +96,7 @@ const menuItems = [ { path: '/points', title: '积分配置', icon: 'Coin' }, { path: '/user', title: '用户管理', icon: 'User' }, { path: '/content', title: '内容管理', icon: 'Document' }, + { path: '/test-account', title: '测试账号', icon: 'Iphone' }, ] function handleCommand(command: string) { diff --git a/admin/src/router/index.ts b/admin/src/router/index.ts index 8a4fc68a..e0148e4d 100644 --- a/admin/src/router/index.ts +++ b/admin/src/router/index.ts @@ -69,6 +69,12 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/views/content/index.vue'), meta: { title: '内容管理', icon: 'Document' }, }, + { + path: 'test-account', + name: 'TestAccount', + component: () => import('@/views/test-account/index.vue'), + meta: { title: '测试账号', icon: 'Iphone' }, + }, ], }, ] diff --git a/admin/src/views/test-account/index.vue b/admin/src/views/test-account/index.vue new file mode 100644 index 00000000..14718bbb --- /dev/null +++ b/admin/src/views/test-account/index.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/backend/src/VendingMachine.Api/Controllers/AdminTestAccountController.cs b/backend/src/VendingMachine.Api/Controllers/AdminTestAccountController.cs new file mode 100644 index 00000000..01e58e67 --- /dev/null +++ b/backend/src/VendingMachine.Api/Controllers/AdminTestAccountController.cs @@ -0,0 +1,88 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using VendingMachine.Infrastructure.Data; +using VendingMachine.Domain.Entities; + +namespace VendingMachine.Api.Controllers; + +/// +/// 管理后台 - 测试账号管理 +/// +[ApiController] +[Route("api/admin/test-account")] +[Authorize] +public class AdminTestAccountController : ControllerBase +{ + private readonly AppDbContext _db; + + public AdminTestAccountController(AppDbContext db) + { + _db = db; + } + + /// + /// 获取测试账号列表 + /// + [HttpGet] + public async Task GetAll() + { + var list = await _db.TestAccounts + .OrderByDescending(t => t.CreatedAt) + .ToListAsync(); + return Ok(new { success = true, data = list }); + } + + /// + /// 新增或更新测试账号 + /// + [HttpPost] + public async Task Save([FromBody] SaveTestAccountRequest req) + { + if (string.IsNullOrWhiteSpace(req.Phone) || string.IsNullOrWhiteSpace(req.Code)) + return Ok(new { success = false, message = "手机号和验证码不能为空" }); + + var existing = await _db.TestAccounts + .FirstOrDefaultAsync(t => t.Phone == req.Phone); + + if (existing != null) + { + // 已存在则更新验证码 + existing.Code = req.Code; + } + else + { + _db.TestAccounts.Add(new TestAccount + { + Phone = req.Phone, + Code = req.Code + }); + } + + await _db.SaveChangesAsync(); + return Ok(new { success = true, message = "保存成功" }); + } + + /// + /// 删除测试账号 + /// + [HttpDelete("{phone}")] + public async Task Delete(string phone) + { + var entity = await _db.TestAccounts + .FirstOrDefaultAsync(t => t.Phone == phone); + + if (entity == null) + return Ok(new { success = false, message = "测试账号不存在" }); + + _db.TestAccounts.Remove(entity); + await _db.SaveChangesAsync(); + return Ok(new { success = true, message = "已删除" }); + } + + public class SaveTestAccountRequest + { + public string Phone { get; set; } = string.Empty; + public string Code { get; set; } = string.Empty; + } +} diff --git a/backend/src/VendingMachine.Domain/Entities/TestAccount.cs b/backend/src/VendingMachine.Domain/Entities/TestAccount.cs new file mode 100644 index 00000000..8f0ba630 --- /dev/null +++ b/backend/src/VendingMachine.Domain/Entities/TestAccount.cs @@ -0,0 +1,12 @@ +namespace VendingMachine.Domain.Entities; + +/// +/// 测试账号实体 +/// +public class TestAccount +{ + public int Id { get; set; } + public string Phone { get; set; } = string.Empty; + public string Code { get; set; } = string.Empty; + public DateTime CreatedAt { get; set; } = DateTime.UtcNow; +} diff --git a/backend/src/VendingMachine.Infrastructure/Data/AppDbContext.cs b/backend/src/VendingMachine.Infrastructure/Data/AppDbContext.cs index 5e2b6f49..ca0b3d5a 100644 --- a/backend/src/VendingMachine.Infrastructure/Data/AppDbContext.cs +++ b/backend/src/VendingMachine.Infrastructure/Data/AppDbContext.cs @@ -18,6 +18,7 @@ public class AppDbContext : DbContext public DbSet ContentConfigs => Set(); public DbSet VendingPaymentRecords => Set(); public DbSet AdminUsers => Set(); + public DbSet TestAccounts => Set(); protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -115,5 +116,13 @@ public class AppDbContext : DbContext e.Property(a => a.PasswordHash).HasMaxLength(200); e.HasIndex(a => a.Username).IsUnique(); }); + + modelBuilder.Entity(e => + { + e.HasKey(t => t.Id); + e.Property(t => t.Phone).HasMaxLength(20); + e.Property(t => t.Code).HasMaxLength(20); + e.HasIndex(t => t.Phone).IsUnique(); + }); } } diff --git a/backend/src/VendingMachine.Infrastructure/Data/DesignTimeDbContextFactory.cs b/backend/src/VendingMachine.Infrastructure/Data/DesignTimeDbContextFactory.cs index 34e05eff..440382ff 100644 --- a/backend/src/VendingMachine.Infrastructure/Data/DesignTimeDbContextFactory.cs +++ b/backend/src/VendingMachine.Infrastructure/Data/DesignTimeDbContextFactory.cs @@ -8,7 +8,7 @@ public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory(); - optionsBuilder.UseSqlServer("Server=localhost;Database=VendingMachineDb;Trusted_Connection=True;TrustServerCertificate=True;"); + optionsBuilder.UseSqlServer("Server=tcp:192.168.195.15,1433;Database=VendingMachineDb;User Id=sa;Password=Dbt@com@123;TrustServerCertificate=True;Encrypt=False;"); return new AppDbContext(optionsBuilder.Options); } } diff --git a/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.Designer.cs b/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.Designer.cs new file mode 100644 index 00000000..8ed25547 --- /dev/null +++ b/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.Designer.cs @@ -0,0 +1,461 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using VendingMachine.Infrastructure.Data; + +#nullable disable + +namespace VendingMachine.Infrastructure.Data.Migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20260413055438_AddTestAccount")] + partial class AddTestAccount + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("VendingMachine.Domain.Entities.AdminUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("PasswordHash") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("Username") + .IsUnique(); + + b.ToTable("AdminUsers"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.Banner", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ImageUrlEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrlZhCn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrlZhTw") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LinkType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("LinkUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Banners"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.ContentConfig", b => + { + b.Property("Key") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContentEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ContentZhCn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ContentZhTw") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("Key"); + + b.ToTable("ContentConfigs"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.CouponTemplate", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DiscountAmount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ExpireAt") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsStamp") + .HasColumnType("bit"); + + b.Property("NameEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NameZhCn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NameZhTw") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PointsCost") + .HasColumnType("int"); + + b.Property("ThresholdAmount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("CouponTemplates"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.HomeEntry", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ImageUrlEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrlZhCn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrlZhTw") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.ToTable("HomeEntries"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.MembershipProduct", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AppleProductId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Currency") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("DescriptionEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DescriptionZhCn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DescriptionZhTw") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DurationDays") + .HasColumnType("int"); + + b.Property("GoogleProductId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("MembershipProducts"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.PointRecord", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Source") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("PointRecords"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.PointsConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionRate") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.HasKey("Id"); + + b.ToTable("PointsConfigs"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.TestAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("Phone") + .IsUnique(); + + b.ToTable("TestAccounts"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.User", b => + { + b.Property("Uid") + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsMember") + .HasColumnType("bit"); + + b.Property("Language") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MembershipExpireAt") + .HasColumnType("datetime2"); + + b.Property("MembershipType") + .HasColumnType("int"); + + b.Property("Nickname") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("PointsBalance") + .HasColumnType("int"); + + b.Property("PointsExpireAt") + .HasColumnType("datetime2"); + + b.HasKey("Uid"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.UserCoupon", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CouponTemplateId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("ExpireAt") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UsedAt") + .HasColumnType("datetime2"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.HasKey("Id"); + + b.HasIndex("CouponTemplateId"); + + b.HasIndex("UserId"); + + b.ToTable("UserCoupons"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.VendingPaymentRecord", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("MachineId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PaymentAmount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentStatus") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TransactionId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("UsedCouponId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("nvarchar(12)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("VendingPaymentRecords"); + }); + + modelBuilder.Entity("VendingMachine.Domain.Entities.UserCoupon", b => + { + b.HasOne("VendingMachine.Domain.Entities.CouponTemplate", "CouponTemplate") + .WithMany() + .HasForeignKey("CouponTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CouponTemplate"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.cs b/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.cs new file mode 100644 index 00000000..9c743f7e --- /dev/null +++ b/backend/src/VendingMachine.Infrastructure/Data/Migrations/20260413055438_AddTestAccount.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace VendingMachine.Infrastructure.Data.Migrations +{ + /// + public partial class AddTestAccount : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TestAccounts", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Code = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TestAccounts", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_TestAccounts_Phone", + table: "TestAccounts", + column: "Phone", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TestAccounts"); + } + } +} diff --git a/backend/src/VendingMachine.Infrastructure/Data/Migrations/AppDbContextModelSnapshot.cs b/backend/src/VendingMachine.Infrastructure/Data/Migrations/AppDbContextModelSnapshot.cs index 260eb765..9764e714 100644 --- a/backend/src/VendingMachine.Infrastructure/Data/Migrations/AppDbContextModelSnapshot.cs +++ b/backend/src/VendingMachine.Infrastructure/Data/Migrations/AppDbContextModelSnapshot.cs @@ -280,6 +280,35 @@ namespace VendingMachine.Infrastructure.Data.Migrations b.ToTable("PointsConfigs"); }); + modelBuilder.Entity("VendingMachine.Domain.Entities.TestAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("Phone") + .IsUnique(); + + b.ToTable("TestAccounts"); + }); + modelBuilder.Entity("VendingMachine.Domain.Entities.User", b => { b.Property("Uid") diff --git a/backend/src/VendingMachine.Infrastructure/Services/UserService.cs b/backend/src/VendingMachine.Infrastructure/Services/UserService.cs index 6abd11c2..f68db9c3 100644 --- a/backend/src/VendingMachine.Infrastructure/Services/UserService.cs +++ b/backend/src/VendingMachine.Infrastructure/Services/UserService.cs @@ -71,7 +71,9 @@ public class UserService : IUserService return ApiResponse.Fail("无效的手机号格式"); // 验证验证码(测试账号跳过验证码校验) - var isTestAccount = request.Phone == "18631081161" && request.Code == "1111"; + var testAccount = await _db.TestAccounts + .FirstOrDefaultAsync(t => t.Phone == request.Phone && t.Code == request.Code); + var isTestAccount = testAccount != null; if (!isTestAccount) { var key = $"sms:code:{request.AreaCode}{request.Phone}"; diff --git a/mobile/api/request.js b/mobile/api/request.js index 4381c9ff..e314a44e 100644 --- a/mobile/api/request.js +++ b/mobile/api/request.js @@ -3,6 +3,7 @@ import { getStorage, removeStorage, TOKEN_KEY, LOCALE_KEY } from '../utils/stora // 后端API基础地址 // MuMu模拟器需使用宿主机局域网IP,生产环境替换为正式域名 export const BASE_URL = 'http://192.168.21.7:5082' +// export const BASE_URL = 'http://192.168.21.7:5082' /** * 统一请求封装,自动注入Token和语言请求头,统一处理响应和错误 diff --git a/mobile/manifest.json b/mobile/manifest.json index 8f2f9db5..25ec5454 100644 --- a/mobile/manifest.json +++ b/mobile/manifest.json @@ -1,26 +1,26 @@ { - "name": "贩卖机", - "appid": "__UNI__19998C7", - "description": "贩卖机移动端APP", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 + "name" : "贩卖机", + "appid" : "__UNI__19998C7", + "description" : "贩卖机", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 }, - "modules": { - "Payment": {} + "modules" : { + "Payment" : {} }, - "distribute": { - "android": { - "permissions": [ + "distribute" : { + "android" : { + "permissions" : [ "", "", "", @@ -31,35 +31,35 @@ "", "" ], - "google": { - "pay": true + "google" : { + "pay" : true } }, - "ios": { - "capabilities": { - "entitlements": { - "com.apple.developer.in-app-payments": true + "ios" : { + "capabilities" : { + "entitlements" : { + "com.apple.developer.in-app-payments" : true } } }, - "sdkConfigs": { - "payment": { - "google": {}, - "appleiap": {} + "sdkConfigs" : { + "payment" : { + "google" : {}, + "appleiap" : {} } } } }, - "quickapp": {}, - "mp-weixin": { - "appid": "", - "setting": { - "urlCheck": false + "quickapp" : {}, + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false }, - "usingComponents": true + "usingComponents" : true }, - "uniStatistics": { - "enable": false + "uniStatistics" : { + "enable" : false }, - "vueVersion": "3" + "vueVersion" : "3" } diff --git a/mobile/pages.json b/mobile/pages.json index 35038b77..22423c6a 100644 --- a/mobile/pages.json +++ b/mobile/pages.json @@ -51,18 +51,21 @@ { "path": "pages/agreement/agreement", "style": { + "navigationStyle": "custom", "navigationBarTitleText": "用户协议" } }, { "path": "pages/privacy/privacy", "style": { + "navigationStyle": "custom", "navigationBarTitleText": "隐私政策" } }, { "path": "pages/about/about", "style": { + "navigationStyle": "custom", "navigationBarTitleText": "关于" } } diff --git a/mobile/pages/about/about.vue b/mobile/pages/about/about.vue index 848a78e1..52ed331a 100644 --- a/mobile/pages/about/about.vue +++ b/mobile/pages/about/about.vue @@ -1,15 +1,28 @@