| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #pragma once
- #include <string>
- #include <vector>
- class CFood
- {
- public:
- std::string id;
- std::string shop_id;
- std::string name;
- std::string price;
- std::string tag;
- std::string status;
- std::string type_id;
- std::string is_dabao;
- std::string dabao_money;
- std::string is_nature;
- std::string nature;
- std::string autostocknum;
- std::string goods_img;
- std::string unit;
- std::string barcode;
- std::string member_price_used;
- std::string member_price;
- std::string buying_price;
- std::string stock;
- std::string stockvalid;
- std::string stock_warning;
- std::string is_shouyinji_show;
- std::string is_waimai_show;
- std::string is_tangshi_show;
- std::string is_zhengcan_show;
- std::string expiration_date;
- std::string is_weight;
- std::string member_price_json;
- std::string weight_plu_code;
- std::string weight_food_code;
- std::string jiagong_type;
- std::string cost_mode;
- //获得图片完整的下载地址
- std::wstring getImageUrl()
- {
- if (goods_img.size() == 0)
- {
- return L"";
- }
- std::string url_goods_img = "http://img.zhipuzi.com" + goods_img;
- std::wstring ws_url_goods_img = CLewaimaiString::UTF8ToUnicode(url_goods_img);
- return ws_url_goods_img;
- }
- //获取图片的本地临时目录存放路径
- std::wstring getImageTmpPath()
- {
- if (goods_img.size() == 0)
- {
- return L"";
- }
- //纯文件名
- std::string file_name = CLewaimaiString::GetPathOrURLShortName(goods_img);
- //根据文件名,计算文件临时路径
- wstring folderPath = CSystem::GetProgramDir() + L"\\tmp\\image\\";
- wstring imagePath = folderPath + CLewaimaiString::UTF8ToUnicode(file_name);
- return imagePath;
- }
- };
|