Skip to content

Commit

Permalink
feat: 营销短信模板修改
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjduan committed Feb 1, 2024
1 parent a465014 commit 0db86f1
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms",
"version": "2.13.10",
"version": "2.13.19",
"private": true,
"scripts": {
"dev": "lerna run dev --stream",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-admin",
"version": "2.13.10",
"version": "2.13.19",
"private": true,
"description": "An out-of-box UI solution for enterprise applications",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cms-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-api",
"version": "2.13.0",
"version": "2.13.19",
"description": "CloudBase content manager system service restful api",
"author": "[email protected]",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/cms-fx-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-fx-openapi",
"version": "2.13.0",
"version": "2.13.19",
"description": "CloudBase CMS open api service",
"author": "[email protected]",
"private": true,
Expand Down Expand Up @@ -30,7 +30,7 @@
"reflect-metadata": "^0.1.13",
"rxjs": "^6.6.3",
"serverless-http": "^2.7.0",
"wx-server-sdk": "^2.3.3"
"wx-server-sdk": "^2.7.2"
},
"devDependencies": {
"@nestjs/cli": "^7.5.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/cms-init/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-init",
"version": "2.13.4",
"version": "2.13.19",
"description": "The function to init CloudBase content manager system",
"main": "index.js",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/cms-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-openapi",
"version": "2.13.10",
"version": "2.13.19",
"description": "CloudBase content manager system service restful api",
"author": "[email protected]",
"private": true,
Expand Down Expand Up @@ -30,7 +30,7 @@
"reflect-metadata": "^0.1.13",
"rxjs": "^6.6.3",
"serverless-http": "^2.7.0",
"wx-server-sdk": "^2.3.3"
"wx-server-sdk": "^2.7.2"
},
"devDependencies": {
"@nestjs/cli": "^7.5.4",
Expand Down
8 changes: 5 additions & 3 deletions packages/cms-openapi/src/api/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const DefaultChannels = [
},
]

const DEFAULT_SMS_TEMPLATE_ID = '2053122' // 旧版本为844110

@Injectable()
export class ApiService {
constructor(private readonly cloudbaseService: CloudBaseService) {}
Expand Down Expand Up @@ -128,7 +130,7 @@ export class ApiService {
// https 的链接才有效
// urlLink: urlLink,
// templateParamList: [task.content],
// templateId: process.env.SMS_TEMPLATE_ID || '844110',
// templateId: process.env.SMS_TEMPLATE_ID || DEFAULT_SMS_TEMPLATE_ID, // 发送营销短信时,该值微信侧写死了
// use_short_name: !!useShortname,
})

Expand Down Expand Up @@ -230,14 +232,14 @@ export class ApiService {
// env: envId,
// is_url_link: true,
// file_url: fileUri,
// template_id: process.env.SMS_TEMPLATE_ID || '844110',
// template_id: process.env.SMS_TEMPLATE_ID || DEFAULT_SMS_TEMPLATE_ID,
// use_short_name: useShortname,
// })
const result = await wxCloudApp.openapi.cloudbase.createSendSmsTask({
env: envId,
// is_url_link: true,
fileUrl: fileUri,
templateId: process.env.SMS_TEMPLATE_ID || '844110',
templateId: process.env.SMS_TEMPLATE_ID || DEFAULT_SMS_TEMPLATE_ID,
useShortName: useShortname,
})

Expand Down
2 changes: 1 addition & 1 deletion packages/cms-sms-page/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sms-page",
"version": "2.13.10",
"version": "2.13.19",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
Expand Down
4 changes: 2 additions & 2 deletions packages/cms-sms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-sms",
"version": "2.13.0",
"version": "2.13.19",
"description": "短信下发模块",
"main": "index.js",
"private": true,
Expand All @@ -9,6 +9,6 @@
},
"author": "",
"dependencies": {
"wx-server-sdk": "^2.3.2"
"wx-server-sdk": "^2.7.2"
}
}
4 changes: 2 additions & 2 deletions packages/service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudbase-cms-service",
"version": "2.13.2",
"version": "2.13.19",
"description": "CloudBase content manager system service",
"author": "[email protected]",
"private": true,
Expand All @@ -24,7 +24,7 @@
"axios": "^0.21.1",
"class-transformer": "^0.3.1",
"class-validator": "^0.12.2",
"cos-nodejs-sdk-v5": "^2.8.6",
"cos-nodejs-sdk-v5": "2.8.6",
"dayjs": "^1.8.31",
"extract-zip": "^2.0.1",
"helmet": "^3.23.3",
Expand Down
18 changes: 9 additions & 9 deletions sam-wx.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TCBSAMFormatVersion: '2020-10-20'
Name: wx-ext-cms
SpecVersion: v1beta
Version: 2.13.11
Version: 2.13.19
License: Apache-2.0
Category: CloudApp
DisplayName: 内容管理(CMS)
Expand All @@ -19,9 +19,9 @@ IconUrl: https://main.qcloudimg.com/raw/f87b49914efe502722f9aa128f5d8865/hello_w
IntroUrl: https://docs.cloudbase.net/cms/intro.html
# 更新日志
ChangeLog:
- Title: 2.13.11
- Title: 2.13.19
Content:
- 取消后付费环境才可以开通的限制
- 营销短信发送失败,提示“运营商未公布原因”问题修复
Author:
AuthorName: TCB
Email: [email protected]
Expand All @@ -39,7 +39,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-service
CodeUri: extension://1f9f05f5541641eab68b6f7dd2ed7870.zip
CodeUri: extension://281f170d88db4b05b9f3a34b8eaad209.zip
InstallDependency: true
Description: 提供 CMS 管理服务,所有对内容的操作和管理都会经过此函数调用,内容操作会根据用户权限来进行数据库操作
MemorySize: 256
Expand All @@ -58,7 +58,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-init
CodeUri: extension://8d709e3a52f749b7900802ed8b47c319.zip
CodeUri: extension://322df2a2bd7147dcade77c3076886621.zip
InstallDependency: true
Description: 提供初始化应用功能,安装扩展后,会通过该函数来进行静态资源的部署和密码的生成和设置,修改账号密码或者部署路径等扩展参数都会再次执行该函数来进行更新
MemorySize: 256
Expand All @@ -80,7 +80,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-api
CodeUri: extension://4f58d4c613114d628378722c8f65a4b1.zip
CodeUri: extension://dd88fe6113704c9cbc7a4335c8dc4b1a.zip
InstallDependency: true
Description: 提供 CMS RESTful API 访问能力,所有 RESTful API 请求都会经过此函数调用
MemorySize: 256
Expand All @@ -97,7 +97,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-sms
CodeUri: extension://6b902674646d44688eb49c700c3e1a6d.zip
CodeUri: extension://637a52a70d204d83a867410dd132f113.zip
InstallDependency: true
Description: 提供短信发送、生成 url schema 功能
MemorySize: 256
Expand All @@ -114,7 +114,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-openapi
CodeUri: extension://b52048d8c3ea4d048e06e49f44d63084.zip
CodeUri: extension://a29c838886f742f59b826ca9eb4034f3.zip
InstallDependency: true
Description: 提供调用微信 Openapi 接口的能力
MemorySize: 2048
Expand All @@ -132,7 +132,7 @@ Resources:
Type: CloudBase::Function
Properties:
FunctionName: wx-ext-cms-fx-openapi
CodeUri: extension://c80f6c7623b94a6da03db15968655428.zip
CodeUri: extension://2a127ac75c8847af8cfdb39fe989bd57.zip
InstallDependency: true
Description: 提供调用微信 Openapi 接口的能力
MemorySize: 1024
Expand Down
4 changes: 2 additions & 2 deletions sam.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TCBSAMFormatVersion: '2020-10-20'
Name: tcb-ext-cms
SpecVersion: v1beta
Version: 2.13.11
Version: 2.13.19
License: Apache-2.0
Category: CloudApp
DisplayName: CMS内容管理系统
Expand All @@ -19,7 +19,7 @@ IconUrl: https://main.qcloudimg.com/raw/f87b49914efe502722f9aa128f5d8865/hello_w
IntroUrl: https://docs.cloudbase.net/cms/intro.html
# 更新日志
ChangeLog:
- Title: 2.13.11
- Title: 2.13.19
Content:
- 取消后付费环境才可以开通的限制
Author:
Expand Down

0 comments on commit 0db86f1

Please sign in to comment.