|
@@ -0,0 +1,94 @@
|
|
|
|
+### 变量定义
|
|
|
|
+@baseUrl = http://192.168.110.131:8086/moutai
|
|
|
|
+@token = Bearer your_jwt_token_here
|
|
|
|
+@arId = your_ar_id_here
|
|
|
|
+@cateId = your_category_id_here
|
|
|
|
+
|
|
|
|
+# 数据模型
|
|
|
|
+# type Ar struct {
|
|
|
|
+# Id primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
|
|
|
|
+# Cid primitive.ObjectID `bson:"cid,omitempty" json:"cid,omitempty"`
|
|
|
|
+# Cover string `bson:"cover,omitempty" json:"cover,omitempty"`
|
|
|
|
+# Name string `bson:"name,omitempty" json:"name,omitempty"`
|
|
|
|
+# Qr string `bson:"qr,omitempty" json:"qr,omitempty"`
|
|
|
|
+# AdminUrl string `bson:"adminUrl,omitempty" json:"adminUrl,omitempty"`
|
|
|
|
+
|
|
|
|
+# Clicks *int `bson:"clicks,omitempty" json:"clicks,omitempty"`
|
|
|
|
+# Sort int `bson:"sort,omitempty" json:"sort,omitempty"`
|
|
|
|
+
|
|
|
|
+# CreateTime time.Time `bson:"createTime,omitempty" json:"createTime,omitempty"`
|
|
|
|
+# UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime,omitempty"`
|
|
|
|
+# // 1 上架 -1下架
|
|
|
|
+# State *int `bson:"state,omitempty" json:"state,omitempty"`
|
|
|
|
+# }
|
|
|
|
+
|
|
|
|
+# JSON示例:
|
|
|
|
+# {
|
|
|
|
+# "_id": "659282d41b88c3e1c86a1234",
|
|
|
|
+# "cid": "659282d41b88c3e1c86a5678",
|
|
|
|
+# "cover": "https://example.com/ar/cover123.jpg",
|
|
|
|
+# "name": "茅台AR体验",
|
|
|
|
+# "qr": "https://example.com/ar/qr123.png",
|
|
|
|
+# "adminUrl": "https://admin.example.com/ar/123",
|
|
|
|
+# "clicks": 100,
|
|
|
|
+# "sort": 1,
|
|
|
|
+# "createTime": "2024-12-20T11:28:12+08:00",
|
|
|
|
+# "updateTime": "2024-12-20T11:28:12+08:00",
|
|
|
|
+# "state": 1
|
|
|
|
+# }
|
|
|
|
+
|
|
|
|
+### 创建AR
|
|
|
|
+POST {{baseUrl}}/admin/ar/create
|
|
|
|
+Content-Type: application/json
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+{
|
|
|
|
+ "cid": "{{cateId}}",
|
|
|
|
+ "name": "测试AR",
|
|
|
|
+ "cover": "https://example.com/cover.jpg",
|
|
|
|
+ "qr": "https://example.com/qr.jpg",
|
|
|
|
+ "adminUrl": "https://example.com/admin",
|
|
|
|
+ "sort": 1,
|
|
|
|
+ "state": 1
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+### 获取AR列表
|
|
|
|
+GET {{baseUrl}}/admin/ar/list
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+### 获取AR列表(带查询参数)
|
|
|
|
+GET {{baseUrl}}/admin/ar/list?name=测试&state=1&sort=sort&uploadTime=2024-12-20
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+### 更新AR
|
|
|
|
+POST {{baseUrl}}/admin/ar/update
|
|
|
|
+Content-Type: application/json
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+{
|
|
|
|
+ "_id": "{{arId}}",
|
|
|
|
+ "name": "更新后的AR名称",
|
|
|
|
+ "cover": "https://example.com/new-cover.jpg",
|
|
|
|
+ "qr": "https://example.com/new-qr.jpg",
|
|
|
|
+ "adminUrl": "https://example.com/new-admin",
|
|
|
|
+ "sort": 2
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+### 删除AR
|
|
|
|
+POST {{baseUrl}}/admin/ar/delete/{{arId}}
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+### AR上架
|
|
|
|
+POST {{baseUrl}}/admin/ar/on/{{arId}}
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+### AR下架
|
|
|
|
+POST {{baseUrl}}/admin/ar/off/{{arId}}
|
|
|
|
+Authorization: {{token}}
|
|
|
|
+
|
|
|
|
+### AR点击统计
|
|
|
|
+GET {{baseUrl}}/click?type=ar&id={{arId}}
|
|
|
|
+
|
|
|
|
+### AR排序置顶
|
|
|
|
+GET {{baseUrl}}/sort/top?type=ar&id={{arId}}
|
|
|
|
+Authorization: {{token}}
|