feat: switch price inquiries to orthopedic projects
Build and push backend image / backend-image (push) Successful in 44s
Build and push backend image / backend-image (push) Successful in 44s
This commit is contained in:
@@ -199,7 +199,7 @@ func TestPriceInquirySavesRegionAndAppearsInAdminDispatchList(t *testing.T) {
|
||||
t.Fatalf("phone bind status = %d, want %d: %s", resp.StatusCode, http.StatusOK, readBody(t, resp))
|
||||
}
|
||||
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", `{"openid":"`+session.User.Openid+`","province":"上海市","city":"上海市","district":"浦东新区","project_name":"牙齿种植"}`, map[string]string{
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", `{"openid":"`+session.User.Openid+`","province":"上海市","city":"上海市","district":"浦东新区","project_name":"半月板损伤"}`, map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
})
|
||||
defer resp.Body.Close()
|
||||
@@ -218,7 +218,7 @@ func TestPriceInquirySavesRegionAndAppearsInAdminDispatchList(t *testing.T) {
|
||||
t.Fatalf("price inquiry = %+v, want id and pending status", createdInquiry)
|
||||
}
|
||||
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", `{"openid":"`+session.User.Openid+`","province":"上海市","city":"上海市","district":"浦东新区","project_name":"牙齿种植"}`, map[string]string{
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", `{"openid":"`+session.User.Openid+`","province":"上海市","city":"上海市","district":"浦东新区","project_name":"半月板损伤"}`, map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
})
|
||||
defer resp.Body.Close()
|
||||
@@ -242,7 +242,7 @@ func TestPriceInquirySavesRegionAndAppearsInAdminDispatchList(t *testing.T) {
|
||||
}
|
||||
for _, expected := range []string{
|
||||
"13900005555",
|
||||
"牙齿种植",
|
||||
"半月板损伤",
|
||||
"上海市 上海市 浦东新区",
|
||||
"待派单",
|
||||
"<th>创建时间</th>",
|
||||
@@ -716,7 +716,7 @@ func createTestPriceInquiry(t *testing.T, app *fiber.App, code, phone string) st
|
||||
t.Fatalf("phone bind status = %d, want %d: %s", resp.StatusCode, http.StatusOK, body)
|
||||
}
|
||||
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", fmt.Sprintf(`{"openid":%q,"province":"上海市","city":"上海市","district":"浦东新区","project_name":"牙齿种植"}`, session.User.Openid), map[string]string{
|
||||
resp = doRequest(t, app, http.MethodPost, "/api/price-inquiries", fmt.Sprintf(`{"openid":%q,"province":"上海市","city":"上海市","district":"浦东新区","project_name":"半月板损伤"}`, session.User.Openid), map[string]string{
|
||||
"Content-Type": "application/json",
|
||||
})
|
||||
body = readBody(t, resp)
|
||||
|
||||
@@ -82,7 +82,7 @@ func TestCreatePriceInquiryUpdatesDuplicateSubmissionTimestamp(t *testing.T) {
|
||||
Province: "上海市",
|
||||
City: "上海市",
|
||||
District: "浦东新区",
|
||||
ProjectName: "牙齿种植",
|
||||
ProjectName: "半月板损伤",
|
||||
}
|
||||
first, err := svc.CreatePriceInquiry(ctx, req)
|
||||
if err != nil {
|
||||
@@ -117,7 +117,7 @@ WHERE id = ?`, first.ID); err != nil {
|
||||
SELECT COUNT(*)
|
||||
FROM price_inquiries
|
||||
WHERE phone = ? AND province = ? AND city = ? AND district = ? AND project_name = ?`,
|
||||
"13900005555", "上海市", "上海市", "浦东新区", "牙齿种植").Scan(&count); err != nil {
|
||||
"13900005555", "上海市", "上海市", "浦东新区", "半月板损伤").Scan(&count); err != nil {
|
||||
t.Fatalf("count price inquiries: %v", err)
|
||||
}
|
||||
if count != 1 {
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestCreatePriceInquiryRefreshesExistingPhoneOnly(t *testing.T) {
|
||||
}
|
||||
|
||||
first, err := svc.CreatePriceInquiry(ctx, CreatePriceInquiryRequest{
|
||||
OpenID: firstUser.User.Openid, Province: "上海市", City: "上海市", District: "浦东新区", ProjectName: "牙齿种植",
|
||||
OpenID: firstUser.User.Openid, Province: "上海市", City: "上海市", District: "浦东新区", ProjectName: "半月板损伤",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create first inquiry: %v", err)
|
||||
@@ -41,7 +41,7 @@ WHERE id = ?`, first.ID); err != nil {
|
||||
t.Fatalf("bind second phone: %v", err)
|
||||
}
|
||||
second, err := svc.CreatePriceInquiry(ctx, CreatePriceInquiryRequest{
|
||||
OpenID: secondUser.User.Openid, Province: "北京市", City: "北京市", District: "朝阳区", ProjectName: "牙齿美白",
|
||||
OpenID: secondUser.User.Openid, Province: "北京市", City: "北京市", District: "朝阳区", ProjectName: "滑膜炎",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create second phone inquiry: %v", err)
|
||||
@@ -54,12 +54,12 @@ WHERE id = ?`, second.ID); err != nil {
|
||||
}
|
||||
|
||||
refreshed, err := svc.CreatePriceInquiry(ctx, CreatePriceInquiryRequest{
|
||||
OpenID: firstUser.User.Openid, Province: "浙江省", City: "杭州市", District: "西湖区", ProjectName: "牙齿清洁",
|
||||
OpenID: firstUser.User.Openid, Province: "浙江省", City: "杭州市", District: "西湖区", ProjectName: "腰椎间盘突出",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("refresh first phone inquiry: %v", err)
|
||||
}
|
||||
if refreshed.ID != first.ID || refreshed.Province != "上海市" || refreshed.District != "浦东新区" || refreshed.ProjectName != "牙齿种植" || refreshed.Status != "completed" || refreshed.Remark != "保留备注" {
|
||||
if refreshed.ID != first.ID || refreshed.Province != "上海市" || refreshed.District != "浦东新区" || refreshed.ProjectName != "半月板损伤" || refreshed.Status != "completed" || refreshed.Remark != "保留备注" {
|
||||
t.Fatalf("refreshed inquiry changed business fields: %#v", refreshed)
|
||||
}
|
||||
if refreshed.LastSubmittedAt <= "2000-01-01 00:00:00" {
|
||||
@@ -115,7 +115,7 @@ func TestCreatePriceInquiryDedupesRepeatedPhoneSubmission(t *testing.T) {
|
||||
Province: "上海市",
|
||||
City: "上海市",
|
||||
District: "浦东新区",
|
||||
ProjectName: "牙齿种植",
|
||||
ProjectName: "半月板损伤",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create first inquiry: %v", err)
|
||||
@@ -139,7 +139,7 @@ WHERE id = ?`, first.ID); err != nil {
|
||||
Province: "浙江省",
|
||||
City: "杭州市",
|
||||
District: "西湖区",
|
||||
ProjectName: "牙齿清洁",
|
||||
ProjectName: "腰肌劳损",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create repeated phone inquiry: %v", err)
|
||||
@@ -150,7 +150,7 @@ WHERE id = ?`, first.ID); err != nil {
|
||||
if second.Status != "assigned" || second.Remark != "运营已派单" {
|
||||
t.Fatalf("repeated phone inquiry changed admin fields: %#v", second)
|
||||
}
|
||||
if second.Province != "上海市" || second.ProjectName != "牙齿种植" {
|
||||
if second.Province != "上海市" || second.ProjectName != "半月板损伤" {
|
||||
t.Fatalf("repeated phone inquiry changed original inquiry fields: %#v", second)
|
||||
}
|
||||
if second.LastSubmittedAt <= "2000-01-01 00:00:00" {
|
||||
@@ -183,7 +183,7 @@ func TestAdminPriceInquiryTimeFilterMatchesLastSubmittedAt(t *testing.T) {
|
||||
Province: "上海市",
|
||||
City: "上海市",
|
||||
District: "浦东新区",
|
||||
ProjectName: "牙齿种植",
|
||||
ProjectName: "颈椎病",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create inquiry: %v", err)
|
||||
|
||||
@@ -83,16 +83,14 @@ const (
|
||||
)
|
||||
|
||||
var priceInquiryProjects = []string{
|
||||
"牙齿矫正",
|
||||
"牙齿种植",
|
||||
"牙齿修复",
|
||||
"牙齿治疗",
|
||||
"全瓷牙种植",
|
||||
"牙齿美白",
|
||||
"正颌",
|
||||
"瓷贴面",
|
||||
"美容冠",
|
||||
"牙齿清洁",
|
||||
"半月板损伤",
|
||||
"滑膜炎",
|
||||
"膝关节炎",
|
||||
"腰椎间盘突出",
|
||||
"腰肌劳损",
|
||||
"腰椎管狭窄",
|
||||
"颈椎病",
|
||||
"腰椎病",
|
||||
}
|
||||
|
||||
func New(database *sql.DB, logger *logrus.Logger) *Service {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"path": "pages/price-query/price-query",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "全国口腔价格查询"
|
||||
"navigationBarTitleText": "全国骨科价格查询"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="page price-query-page">
|
||||
<view class="sf-navbar price-query-navbar">
|
||||
<text class="nav-title">全国口腔价格查询</text>
|
||||
<text class="nav-title">全国骨科价格查询</text>
|
||||
</view>
|
||||
|
||||
<scroll-view class="price-query-scroll" scroll-y>
|
||||
@@ -56,7 +56,7 @@
|
||||
></button>
|
||||
</view>
|
||||
|
||||
<text class="query-notice">注意:由于口腔存在个体差异,价格查询仅供参考</text>
|
||||
<text class="query-notice">注意:骨科项目存在个体差异,价格查询仅供参考</text>
|
||||
</view>
|
||||
|
||||
<view class="assurance-section">
|
||||
@@ -67,8 +67,8 @@
|
||||
<image class="assurance-icon" src="/static/icons/fa-users.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="assurance-copy">
|
||||
<text class="assurance-row-title">上千万用户反馈</text>
|
||||
<text class="assurance-row-text">近三年骨安通服务人数超3000万次,其中超千万用户反馈口腔医院</text>
|
||||
<text class="assurance-row-title">骨科项目服务说明</text>
|
||||
<text class="assurance-row-text">近三年骨安通服务人数超3000万次,为用户提供骨科项目相关信息参考</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="assurance-row">
|
||||
@@ -86,7 +86,7 @@
|
||||
</view>
|
||||
<view class="assurance-copy">
|
||||
<text class="assurance-row-title">骨安通大数据平台</text>
|
||||
<text class="assurance-row-text">骨安通自建大数据平台,全国口腔机构数据实时更新,让数据更精准</text>
|
||||
<text class="assurance-row-text">骨安通自建大数据平台,持续整理骨科项目相关信息,为查询提供参考</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="assurance-footer">由骨安通(非医疗机构)仅提供信息咨询服务</text>
|
||||
@@ -114,18 +114,16 @@
|
||||
import { bindPhoneFromEvent, currentUser, openidFromUser, phoneFromUser } from '../../utils/user.uts'
|
||||
|
||||
const PRICE_INQUIRY_PROJECTS = [
|
||||
'牙齿矫正',
|
||||
'牙齿种植',
|
||||
'牙齿修复',
|
||||
'牙齿治疗',
|
||||
'全瓷牙种植',
|
||||
'牙齿美白',
|
||||
'正颌',
|
||||
'瓷贴面',
|
||||
'美容冠',
|
||||
'牙齿清洁'
|
||||
'半月板损伤',
|
||||
'滑膜炎',
|
||||
'膝关节炎',
|
||||
'腰椎间盘突出',
|
||||
'腰肌劳损',
|
||||
'腰椎管狭窄',
|
||||
'颈椎病',
|
||||
'腰椎病'
|
||||
]
|
||||
const SHARE_TITLE = '全国口腔价格查询'
|
||||
const SHARE_TITLE = '全国骨科价格查询'
|
||||
const SHARE_IMAGE = '/static/images/share-card.png'
|
||||
|
||||
type PriceQueryState = {
|
||||
@@ -200,7 +198,7 @@
|
||||
}
|
||||
|
||||
const projectText = (): string => {
|
||||
if (state.projectIndex < 0 || state.projectIndex >= state.projectNames.length) return '请选择口腔项目'
|
||||
if (state.projectIndex < 0 || state.projectIndex >= state.projectNames.length) return '请选择骨科项目'
|
||||
return state.projectNames[state.projectIndex]
|
||||
}
|
||||
|
||||
@@ -231,7 +229,7 @@
|
||||
return false
|
||||
}
|
||||
if (state.projectIndex < 0) {
|
||||
uni.showToast({ title: '请先选择口腔项目', icon: 'none' })
|
||||
uni.showToast({ title: '请先选择骨科项目', icon: 'none' })
|
||||
return false
|
||||
}
|
||||
if (!state.agreed) {
|
||||
|
||||
Reference in New Issue
Block a user