|
@@ -209,19 +209,12 @@ class AccountAuth {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- getIDByTime(){
|
|
|
- let uuid = "sw" + Date.now().toString(36).slice(-8);
|
|
|
- console.log(uuid);
|
|
|
- return uuid;
|
|
|
- }
|
|
|
-
|
|
|
cteateMapData(user_id, map_name = 'map'){
|
|
|
var sql = `INSERT INTO
|
|
|
medba.dat_map
|
|
|
- (map_name, map_data, user_id, update_time, create_time, map_uuid)
|
|
|
+ (map_name, map_data, user_id, update_time, create_time)
|
|
|
VALUES
|
|
|
- ('${map_name}', '{ "type": "FeatureCollection", "features": [], "center": { "x": 116.39639, "y": 39.91638 } }',
|
|
|
- ${user_id}, NOW(), NOW(), '${this.getIDByTime()}')`;
|
|
|
+ ('${map_name}', '{ "type": "FeatureCollection", "features": [], "center": { "x": 116.39639, "y": 39.91638 } }', ${user_id}, NOW(), NOW())`;
|
|
|
var msg = {
|
|
|
cmd: "update", // server端要进行判断的
|
|
|
data: {
|