l-7"> 6 7
 
7 8
 from account.models import UserInfo
8 9
 from message.models import SystemMessageDeleteInfo, SystemMessageInfo, SystemMessageReadInfo, UserMessageInfo
9 10
 from utils.error.errno_utils import MessageStatusCode, UserStatusCode
10
-from utils.error.response_utils import response
11 11
 from utils.message_utils import system_messages, system_unread_messages
12 12
 from utils.redis.rmessage import set_system_message_delete_info, set_system_message_read_info
13 13
 

+ 1 - 1
miniapp/views.py

@@ -3,13 +3,13 @@
3 3
 from curtail_uuid import CurtailUUID
4 4
 from django.conf import settings
5 5
 from django.db import transaction
6
+from django_response import response
6 7
 from ipaddr import client_ip
7 8
 from logit import logit
8 9
 from pywe_miniapp import get_userinfo
9 10
 from TimeConvert import TimeConvert as tc
10 11
 
11 12
 from account.models import UserInfo
12
-from utils.error.response_utils import response
13 13
 from utils.redis.rprofile import set_profile_info
14 14
 
15 15
 

+ 1 - 1
operation/views.py

@@ -4,12 +4,12 @@ import os
4 4
 
5 5
 from django.conf import settings
6 6
 from django.shortcuts import redirect
7
+from django_response import response
7 8
 from logit import logit
8 9
 
9 10
 from account.models import UserInfo
10 11
 from operation.models import FeedbackInfo, GuestEntranceControlInfo, LatestAppInfo, SplashInfo
11 12
 from utils.error.errno_utils import UserStatusCode
12
-from utils.error.response_utils import response
13 13
 from utils.redis.rapp import get_latest_app
14 14
 from utils.redis.rguest import get_guest_entrance_control
15 15
 from utils.redis.roperation.rbox_program_version import get_box_program_version

+ 1 - 1
pay/views.py

@@ -3,6 +3,7 @@
3 3
 from django.conf import settings
4 4
 from django.db import transaction
5 5
 from django.shortcuts import HttpResponse
6
+from django_response import response
6 7
 from logit import logit
7 8
 from paginator import pagination
8 9
 from pywe_exception import WeChatPayException
@@ -18,7 +19,6 @@ from pay.models import OrderInfo
18 19
 from photo.models import PhotosInfo
19 20
 from utils.error.errno_utils import (GroupPhotoStatusCode, OrderStatusCode, UserStatusCode, WechatStatusCode,
20 21
                                      WithdrawStatusCode)
21
-from utils.error.response_utils import response
22 22
 from utils.price_utils import get_group_photo_price
23 23
 from utils.redis.rbrief import set_brief_info
24 24
 from utils.redis.rorder import set_lensman_order_record

+ 1 - 1
photo/views.py

@@ -4,6 +4,7 @@ from curtail_uuid import CurtailUUID
4 4
 from django.db import transaction
5 5
 from django.shortcuts import render
6 6
 from django_q.tasks import async
7
+from django_response import response
7 8
 from ipaddr import client_ip
8 9
 from logit import logit
9 10
 from rest_framework import viewsets
@@ -14,7 +15,6 @@ from group.models import GroupInfo, GroupPhotoInfo, GroupUserInfo
14 15
 from photo.models import PhotosInfo
15 16
 from photo.serializers import PhotosInfoSerializer
16 17
 from utils.error.errno_utils import LensmanStatusCode, PhotoStatusCode
17
-from utils.error.response_utils import response
18 18
 from utils.redis.connect import r
19 19
 from utils.redis.rgroup import get_group_info, set_group_info, set_group_users_info
20 20
 from utils.redis.rkeys import (GROUP_LAST_PHOTO_PK, GROUP_USERS_DELETED_SET, GROUP_USERS_PASSED_SET,

+ 1 - 2
server/server_views.py

@@ -1,10 +1,9 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
+from django_response import response
3 4
 from logit import logit
4 5
 from TimeConvert import TimeConvert as tc
5 6
 
6
-from utils.error.response_utils import response
7
-
8 7
 
9 8
 @logit
10 9
 def get_server_time_api(request):

+ 0 - 18
utils/error/response_utils.py

@@ -1,18 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-
3
-from django.http import JsonResponse
4
-from StatusCode import StatusCodeField
5
-
6
-
7
-def response_data(status_code=200, message=None, description=None, data={}, **kwargs):
8
-    return dict({
9
-        'status': status_code,
10
-        'message': message,
11
-        'description': description,
12
-        'data': data,
13
-    }, **kwargs)
14
-
15
-
16
-def response(status_code=200, message=None, description=None, data={}, **kwargs):
17
-    message, description = (message or status_code.message, description or status_code.description) if isinstance(status_code, StatusCodeField) else (message, description)
18
-    return JsonResponse(response_data(status_code, message, description, data, **kwargs), safe=False)

kodo - Gogs: Go Git Service

説明なし

contactus.html 4.9KB

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title>拍爱 PAI.AI 联系我们</title> <meta name="keywords" content="摄影 图片 影像 分享 交流 社交 交友 摄影师 女性 孩子 亲子 旅行 旅游 约拍 iphone android app" /> <link href="css/layout.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <style> .my-map { margin: 0 auto 30px auto; width: 550px; height: 350px;float:left} .my-map .icon { background: url(http://lbs.amap.com/console/public/show/marker.png) no-repeat; } .my-map .icon-cir { height: 31px; width: 28px; } .my-map .icon-cir-red { background-position: -11px -5px; } </style> </head> <body> <div id="header"> <div class="content"> <a href="index.html" target="_self" class="logo"></a> <div class="navigation"> <a href="contactus.html" target="_self" class="current">联系我们</a> <a href="joinus.html" target="_self" >加入拍爱</a> <a href="aboutus.html" target="_self" >关于我们</a> <a href="index.html" target="_self" >首页</a> </div> </div> </div> <div id="container" ><div class="content contactus"> <div id="wrap" class="my-map map"> <div id="mapContainer"></div> </div> <script src="http://webapi.amap.com/maps?v=1.2&key=8325164e247e15eea68b59e89200988b"></script> <script> !function(){ var infoWindow, map, level = 16, center = {lng: 116.284361, lat: 39.931229}, features = [{type: "Marker", name: "拍爱 PAI.AI", desc: "北京市海淀区西八里庄路玲珑商务楼", color: "red", icon: "cir", offset: {x: -9, y: -31}, lnglat: {lng: 116.28449, lat: 39.930834}}]; function loadFeatures(){ for(var feature, data, i = 0, len = features.length, j, jl, path; i < len; i++){ data = features[i]; switch(data.type){ case "Marker": feature = new AMap.Marker({ map: map, position: new AMap.LngLat(data.lnglat.lng, data.lnglat.lat), zIndex: 3, extData: data, offset: new AMap.Pixel(data.offset.x, data.offset.y), title: data.name, content: '<div class="icon icon-' + data.icon + ' icon-'+ data.icon +'-' + data.color +'"></div>' }); break; case "Polyline": for(j = 0, jl = data.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[j].lat)); } feature = new AMap.Polyline({ map: map, path: path, extData: data, zIndex: 2, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity }); break; case "Polygon": for(j = 0, jl = data.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[j].lat)); } feature = new AMap.Polygon({ map: map, path: path, extData: data, zIndex: 1, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity, fillColor: data.fillColor, fillOpacity: data.fillOpacity }); break; default: feature = null; } if(feature){ AMap.event.addListener(feature, "click", mapFeatureClick); } } } function mapFeatureClick(e){ if(!infoWindow){ infoWindow = new AMap.InfoWindow({autoMove: true}); } var extData = e.target.getExtData(); infoWindow.setContent("<h5>" + extData.name + "</h5><div>" + extData.desc + "</div>"); infoWindow.open(map, e.lnglat); } map = new AMap.Map("mapContainer", {center: new AMap.LngLat(center.lng, center.lat), level: level}); loadFeatures(); map.plugin(["AMap.ToolBar", "AMap.OverView", "AMap.Scale"], function(){ map.addControl(new AMap.ToolBar); map.addControl(new AMap.OverView({isOpen: true})); map.addControl(new AMap.Scale); }); }(); </script> <p style="width:400px;float:right"><img src="img/weixin_qr.png" ><br><strong>关注拍爱 官方微信:</strong>pai_ai</p> <p style="width:400px;float:right"> <strong>商务合作:</strong>partner@pai.ai<br> <strong>用户反馈及帮助:</strong>feedback@pai.ai<br> <strong>公司地址:</strong>北京市海淀区西八里庄路玲珑商务楼 </p> </div></div> <div id="footer"> <div class="content foot"> <a href="aboutus.html" target="_self" >关于我们</a> <span>|</span> <a href="contactus.html" target="_self" >联系我们</a> ©2016 拍爱 PAI.AI 琼ICP备16000076号 </div> </div> </body> </html>