feat: update go module, add recharge wechat
Some checks failed
build quyun / Build (push) Failing after 12m45s

This commit is contained in:
2025-12-04 11:47:37 +08:00
parent b678ef1f9e
commit bc495544c8
10 changed files with 72 additions and 58 deletions

View File

@@ -10,6 +10,7 @@ import (
"quyun/app/requests" "quyun/app/requests"
"quyun/database/fields" "quyun/database/fields"
"quyun/providers/ali" "quyun/providers/ali"
"quyun/providers/app"
"quyun/providers/job" "quyun/providers/job"
"quyun/providers/wepay" "quyun/providers/wepay"
@@ -29,6 +30,7 @@ type posts struct {
wepay *wepay.Client wepay *wepay.Client
oss *ali.OSSClient oss *ali.OSSClient
job *job.Job job *job.Job
app *app.Config
} }
// List posts // List posts
@@ -91,6 +93,7 @@ func (ctl *posts) List(
Tags: item.Tags.Data, Tags: item.Tags.Data,
HeadImages: mediaUrls, HeadImages: mediaUrls,
Bought: bought, Bought: bought,
RechargeWechat: ctl.app.RechargeWechat,
}, true }, true
}) })
@@ -112,6 +115,7 @@ type PostItem struct {
Likes int64 `json:"likes"` Likes int64 `json:"likes"`
Tags []string `json:"tags"` Tags []string `json:"tags"`
HeadImages []string `json:"head_images"` HeadImages []string `json:"head_images"`
RechargeWechat string `json:"recharge_wechat,omitempty"`
} }
// Show // Show
@@ -159,6 +163,7 @@ func (ctl *posts) Show(ctx fiber.Ctx, id int64, user *model.Users) (*PostItem, e
Tags: post.Tags.Data, Tags: post.Tags.Data,
HeadImages: mediaUrls, HeadImages: mediaUrls,
Bought: bought, Bought: bought,
RechargeWechat: ctl.app.RechargeWechat,
}, nil }, nil
} }
@@ -271,6 +276,7 @@ func (ctl *posts) Mine(
Likes: item.Likes, Likes: item.Likes,
Tags: item.Tags.Data, Tags: item.Tags.Data,
HeadImages: mediaUrls, HeadImages: mediaUrls,
RechargeWechat: ctl.app.RechargeWechat,
}, true }, true
}) })

View File

@@ -2,6 +2,7 @@ package http
import ( import (
"quyun/providers/ali" "quyun/providers/ali"
"quyun/providers/app"
"quyun/providers/job" "quyun/providers/job"
"quyun/providers/jwt" "quyun/providers/jwt"
"quyun/providers/wechat" "quyun/providers/wechat"
@@ -44,11 +45,13 @@ func Provide(opts ...opt.Option) error {
job *job.Job, job *job.Job,
oss *ali.OSSClient, oss *ali.OSSClient,
wepay *wepay.Client, wepay *wepay.Client,
appConfig *app.Config,
) (*posts, error) { ) (*posts, error) {
obj := &posts{ obj := &posts{
job: job, job: job,
oss: oss, oss: oss,
wepay: wepay, wepay: wepay,
app: appConfig,
} }
return obj, nil return obj, nil

View File

@@ -4,6 +4,7 @@ BaseURI = "https://mp.jdwan.com"
StoragePath = "/app/downloads" StoragePath = "/app/downloads"
DistAdmin = "/app/dist/admin" DistAdmin = "/app/dist/admin"
DistWeChat = "/app/dist/wechat" DistWeChat = "/app/dist/wechat"
RechargeWechat = "13932043996"
[Http] [Http]
Port = 9888 Port = 9888

View File

@@ -5,6 +5,7 @@ BaseURI = "baseURI"
StoragePath = "/Users/rogee/Projects/self/quyun/fixtures" StoragePath = "/Users/rogee/Projects/self/quyun/fixtures"
DistAdmin = "frontend/admin/dist" DistAdmin = "frontend/admin/dist"
DistWeChat = "frontend/wechat/dist" DistWeChat = "frontend/wechat/dist"
RechargeWechat = "13932043996"
[Http] [Http]
Port = 8088 Port = 8088

View File

@@ -2,6 +2,7 @@
Mode = "development" Mode = "development"
BaseURI = "baseURI" BaseURI = "baseURI"
StoragePath = "/Users/rogee/Projects/self/quyun/fixtures" StoragePath = "/Users/rogee/Projects/self/quyun/fixtures"
RechargeWechat = "13932043996"
[Http] [Http]
Port = 8088 Port = 8088

View File

@@ -37,7 +37,7 @@ require (
github.com/stretchr/testify v1.10.0 github.com/stretchr/testify v1.10.0
github.com/swaggo/files/v2 v2.0.2 github.com/swaggo/files/v2 v2.0.2
github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-client-go v2.30.0+incompatible
go.ipao.vip/atom v1.1.8 go.ipao.vip/atom v1.2.1
go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0
go.opentelemetry.io/otel v1.35.0 go.opentelemetry.io/otel v1.35.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0
@@ -50,6 +50,7 @@ require (
go.opentelemetry.io/otel/sdk/metric v1.35.0 go.opentelemetry.io/otel/sdk/metric v1.35.0
go.opentelemetry.io/otel/trace v1.35.0 go.opentelemetry.io/otel/trace v1.35.0
go.uber.org/dig v1.18.1 go.uber.org/dig v1.18.1
golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e
golang.org/x/net v0.35.0 golang.org/x/net v0.35.0
golang.org/x/sync v0.12.0 golang.org/x/sync v0.12.0
google.golang.org/grpc v1.71.0 google.golang.org/grpc v1.71.0
@@ -152,7 +153,6 @@ require (
go.uber.org/mock v0.5.0 // indirect go.uber.org/mock v0.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.33.0 // indirect golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e // indirect
golang.org/x/mod v0.22.0 // indirect golang.org/x/mod v0.22.0 // indirect
golang.org/x/sys v0.31.0 // indirect golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect golang.org/x/text v0.23.0 // indirect

View File

@@ -337,8 +337,8 @@ github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcY
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.ipao.vip/atom v1.1.8 h1:xiEpK2RPv/kxwxvN9tzJ8uClsmVskLEjnyZKoGfm04U= go.ipao.vip/atom v1.2.1 h1:7VlDLSkGNVEZLVM/JVcXXdMTO0+sFsxe1vfIM4Xz8uc=
go.ipao.vip/atom v1.1.8/go.mod h1:woAv+rZf0xd+7mEtKWv4PyazQARFLnrV/qA4qlAK008= go.ipao.vip/atom v1.2.1/go.mod h1:woAv+rZf0xd+7mEtKWv4PyazQARFLnrV/qA4qlAK008=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 h1:0NgN/3SYkqYJ9NBlDfl/2lzVlwos/YQLvi8sUrzJRBE= go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 h1:0NgN/3SYkqYJ9NBlDfl/2lzVlwos/YQLvi8sUrzJRBE=

View File

@@ -27,6 +27,7 @@ type Config struct {
StoragePath string StoragePath string
DistAdmin string DistAdmin string
DistWeChat string DistWeChat string
RechargeWechat string
} }
func (c *Config) IsDevMode() bool { func (c *Config) IsDevMode() bool {

View File

@@ -13,5 +13,6 @@
], ],
"head_images": [ "head_images": [
"https://assets.jdwan.com/quyun/b55adbd05ee96f5c53f9a19ad89a30cc.jpg?x-oss-credential=LTAI5t86SjiP9zRd3q2w7jQN%2F20250425%2Fcn-beijing%2Foss%2Faliyun_v4_request&x-oss-date=20250425T030400Z&x-oss-expires=300&x-oss-signature=fae33ecfc5cfe6d50de858d89798151b137336e3694bdafad78e1cbdb1ebf1c0&x-oss-signature-version=OSS4-HMAC-SHA256" "https://assets.jdwan.com/quyun/b55adbd05ee96f5c53f9a19ad89a30cc.jpg?x-oss-credential=LTAI5t86SjiP9zRd3q2w7jQN%2F20250425%2Fcn-beijing%2Foss%2Faliyun_v4_request&x-oss-date=20250425T030400Z&x-oss-expires=300&x-oss-signature=fae33ecfc5cfe6d50de858d89798151b137336e3694bdafad78e1cbdb1ebf1c0&x-oss-signature-version=OSS4-HMAC-SHA256"
] ],
"recharge_wechat": "13932043996"
} }

View File

@@ -228,8 +228,8 @@ onUnmounted(() => {
</div> </div>
<div v-if="article && !article.bought" class="bg-white border-b border-gray-200"> <div v-if="article && !article.bought" class="bg-white border-b border-gray-200">
<div class="text-sm bg-orange-500 text-white px-4 py-2"> <div v-if="article.recharge_wechat" class="text-sm bg-orange-500 text-white px-4 py-2">
注意未购买视频仅可预览 1 分钟购买后可观看全集账户充值购买联系微信<span class="font-bold">13932043996</span> 注意未购买视频仅可预览 1 分钟购买后可观看全集账户充值购买联系微信<span class="font-bold">{{ article.recharge_wechat }}</span>
</div> </div>
<div class="flex items-center justify-between max-w-md mx-auto p-4"> <div class="flex items-center justify-between max-w-md mx-auto p-4">
<div class="text-orange-600 text-2xl"> <div class="text-orange-600 text-2xl">