@@ -63,17 +63,22 @@ def decrypt(request):  | 
            ||
| 63 | 63 | 
                     brand_pk, model_pk, distributor_pk, sn, time = plaintext.split('#')
               | 
            
| 64 | 64 | 
                 | 
            
| 65 | 65 | 
                try:  | 
            
| 66 | 
                - logo_url = BrandInfo.objects.get(pk=brand_pk).brand_logo_url  | 
            |
| 66 | 
                + brand = BrandInfo.objects.get(pk=brand_pk)  | 
            |
| 67 | 67 | 
                except BrandInfo.DoesNotExist:  | 
            
| 68 | 
                - logo_url = ''  | 
            |
| 68 | 
                + brand = None  | 
            |
| 69 | 69 | 
                 | 
            
| 70 | 70 | 
                try:  | 
            
| 71 | 
                - model_imgs = ModelInfo.objects.get(pk=model_pk).images  | 
            |
| 71 | 
                + model = ModelInfo.objects.get(pk=model_pk).images  | 
            |
| 72 | 72 | 
                except ModelInfo.DoesNotExist:  | 
            
| 73 | 
                - model_imgs = []  | 
            |
| 73 | 
                + model = None  | 
            |
| 74 | 74 | 
                 | 
            
| 75 | 75 | 
                     return response(200, data={
               | 
            
| 76 | 76 | 
                'plaintext': plaintext,  | 
            
| 77 | 
                - 'logo_url': logo_url,  | 
            |
| 78 | 
                - 'model_imgs': model_imgs,  | 
            |
| 77 | 
                + 'logo_url': brand.brand_logo_url if brand else '',  | 
            |
| 78 | 
                + 'model_imgs': model.model_imgs if model else [],  | 
            |
| 79 | 
                +        'goodsInfo': {
               | 
            |
| 80 | 
                + 'Brand': brand.brand_name if brand else '',  | 
            |
| 81 | 
                + 'Model': model.model_name if model else '',  | 
            |
| 82 | 
                + 'SerialNo': sn,  | 
            |
| 83 | 
                + }  | 
            |
| 79 | 84 | 
                })  |