test
This commit is contained in:
@@ -1 +1 @@
|
||||
{"version":3,"sources":["uni-app:///uniCloud-alipay/cloudfunctions/follow/index.obj.js"],"names":["db","uniCloud","database","command","module","exports","_before","getIsFollow","query","uid","fid","isFollow","console","log","collection","where","count","res","total","code","msg","message","follow","dateTime","Date","add","create_time","add_res","data","reFollow","remove","re_res"],"mappings":"0IAAMA,EAAKC,EAASC,WACVF,EAAGG,QACbC,EAAOC,QAAU,CAChBC,QAAS,aAGHC,YAAW,SAACC,GAAO,0GAQP,OARO,SAGtBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAEGC,GAAW,EACfC,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GAAI,SACEV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IAELM,QAAO,OAIP,OARKC,EAAM,EAAH,KAKTL,QAAQC,IAAII,EAAIC,OACZD,EAAIC,MAAQ,IACfP,GAAW,GACX,kBACM,CACNQ,KAAM,IACNR,SAAUA,IACV,8DAEM,CACNQ,KAAM,IACNC,IAAK,KAAEC,UACP,yDA1BsB,IA6BnBC,OAAM,SAACd,GAAO,4GAId,OAJc,SAGjBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAAG,SAEcV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IACHM,QAAO,OAHD,GAAHC,EAAM,EAAH,OAILA,EAAIC,MAAQ,GAAC,yCACT,CACNC,KAAM,IACNC,IAAK,QACL,OAEwB,OAArBG,EAAW,IAAIC,KAAM,UACHxB,EAAGc,WAAW,UAAUW,IAAI,CACjDhB,IAAKA,EACLC,IAAKA,EACLgB,YAAaH,IACZ,QACkB,OALdI,EAAU,EAAH,KAKbf,QAAQC,IAAIc,GAAQ,kBACb,CACNR,KAAM,IACNS,KAAMD,IACN,sFAGK,CACNR,KAAM,IACNC,IAAK,KAAEC,UACP,yDAhCiB,IAmCdQ,SAAQ,SAACrB,GAAO,0GAIhB,OAJgB,SAGnBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAAG,SAEcV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IACHM,QAAO,OAHD,GAAHC,EAAM,EAAH,OAILA,EAAIC,MAAQ,GAAC,yCACT,CACNC,KAAM,IACNC,IAAK,QACL,wBAEoBpB,EAAGc,WAAW,UAAUC,MAAM,CAClDN,IAAKA,EACLC,IAAKA,IACHoB,SAAQ,QACQ,OAJbC,EAAS,EAAH,KAIZnB,QAAQC,IAAIkB,GAAO,kBACZ,CACNZ,KAAM,IACNS,KAAMG,IACN,sFAIK,CACNZ,KAAM,IACNC,IAAK,KAAEC,UACP,yDA/BmB,O","file":"pages2/common/vendor.js","sourcesContent":["const db = uniCloud.database();\r\nconst _ = db.command;\r\nmodule.exports = {\r\n\t_before: function () { // 通用预处理器\r\n\r\n\t},\r\n\tasync getIsFollow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tlet isFollow = false;\r\n\t\t\tconsole.log(uid)\r\n\t\t\tconsole.log(fid)\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t})\r\n\t\t\t.count();\r\n\t\t\tconsole.log(res.total);\r\n\t\t\tif (res.total > 0) {\r\n\t\t\t\tisFollow = true;\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\tcode: 200,\r\n\t\t\t\tisFollow: isFollow\r\n\t\t\t}\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tasync follow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t}).count();\r\n\t\t\tif (res.total > 0) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 201,\r\n\t\t\t\t\tmsg: \"已关注\"\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlet dateTime = new Date();\r\n\t\t\t\tconst add_res = await db.collection(\"follow\").add({\r\n\t\t\t\t\tuid: uid,\r\n\t\t\t\t\tfid: fid,\r\n\t\t\t\t\tcreate_time: dateTime\r\n\t\t\t\t})\r\n\t\t\t\tconsole.log(add_res)\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 200,\r\n\t\t\t\t\tdata: add_res\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tasync reFollow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t}).count();\r\n\t\t\tif (res.total < 0) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 201,\r\n\t\t\t\t\tmsg: \"未关注\"\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst re_res = await db.collection(\"follow\").where({\r\n\t\t\t\t\tuid: uid,\r\n\t\t\t\t\tfid: fid\r\n\t\t\t\t}).remove();\r\n\t\t\t\tconsole.log(re_res)\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 200,\r\n\t\t\t\t\tdata: re_res\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"],"sourceRoot":""}
|
||||
{"version":3,"sources":["uni-app:///uniCloud-alipay/cloudfunctions/follow/index.obj.js"],"names":["db","uniCloud","database","command","module","exports","_before","getIsFollow","query","uid","fid","isFollow","console","log","collection","where","count","res","total","code","msg","message","follow","dateTime","Date","add","create_time","add_res","data","reFollow","remove","re_res"],"mappings":"yIAAMA,EAAKC,EAASC,WACVF,EAAGG,QACbC,EAAOC,QAAU,CAChBC,QAAS,aAGHC,YAAW,SAACC,GAAO,0GAQP,OARO,SAGtBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAEGC,GAAW,EACfC,QAAQC,IAAIJ,GACZG,QAAQC,IAAIH,GAAI,SACEV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IAELM,QAAO,OAIP,OARKC,EAAM,EAAH,KAKTL,QAAQC,IAAII,EAAIC,OACZD,EAAIC,MAAQ,IACfP,GAAW,GACX,kBACM,CACNQ,KAAM,IACNR,SAAUA,IACV,8DAEM,CACNQ,KAAM,IACNC,IAAK,KAAEC,UACP,yDA1BsB,IA6BnBC,OAAM,SAACd,GAAO,4GAId,OAJc,SAGjBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAAG,SAEcV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IACHM,QAAO,OAHD,GAAHC,EAAM,EAAH,OAILA,EAAIC,MAAQ,GAAC,yCACT,CACNC,KAAM,IACNC,IAAK,QACL,OAEwB,OAArBG,EAAW,IAAIC,KAAM,UACHxB,EAAGc,WAAW,UAAUW,IAAI,CACjDhB,IAAKA,EACLC,IAAKA,EACLgB,YAAaH,IACZ,QACkB,OALdI,EAAU,EAAH,KAKbf,QAAQC,IAAIc,GAAQ,kBACb,CACNR,KAAM,IACNS,KAAMD,IACN,sFAGK,CACNR,KAAM,IACNC,IAAK,KAAEC,UACP,yDAhCiB,IAmCdQ,SAAQ,SAACrB,GAAO,0GAIhB,OAJgB,SAGnBC,EAEGD,EAFHC,IACAC,EACGF,EADHE,IAAG,SAEcV,EAAGc,WAAW,UAAUC,MAAM,CAC/CN,IAAKA,EACLC,IAAKA,IACHM,QAAO,OAHD,GAAHC,EAAM,EAAH,OAILA,EAAIC,MAAQ,GAAC,yCACT,CACNC,KAAM,IACNC,IAAK,QACL,wBAEoBpB,EAAGc,WAAW,UAAUC,MAAM,CAClDN,IAAKA,EACLC,IAAKA,IACHoB,SAAQ,QACQ,OAJbC,EAAS,EAAH,KAIZnB,QAAQC,IAAIkB,GAAO,kBACZ,CACNZ,KAAM,IACNS,KAAMG,IACN,sFAIK,CACNZ,KAAM,IACNC,IAAK,KAAEC,UACP,yDA/BmB,O","file":"pages2/common/vendor.js","sourcesContent":["const db = uniCloud.database();\r\nconst _ = db.command;\r\nmodule.exports = {\r\n\t_before: function () { // 通用预处理器\r\n\r\n\t},\r\n\tasync getIsFollow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tlet isFollow = false;\r\n\t\t\tconsole.log(uid)\r\n\t\t\tconsole.log(fid)\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t})\r\n\t\t\t.count();\r\n\t\t\tconsole.log(res.total);\r\n\t\t\tif (res.total > 0) {\r\n\t\t\t\tisFollow = true;\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\tcode: 200,\r\n\t\t\t\tisFollow: isFollow\r\n\t\t\t}\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tasync follow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t}).count();\r\n\t\t\tif (res.total > 0) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 201,\r\n\t\t\t\t\tmsg: \"已关注\"\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlet dateTime = new Date();\r\n\t\t\t\tconst add_res = await db.collection(\"follow\").add({\r\n\t\t\t\t\tuid: uid,\r\n\t\t\t\t\tfid: fid,\r\n\t\t\t\t\tcreate_time: dateTime\r\n\t\t\t\t})\r\n\t\t\t\tconsole.log(add_res)\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 200,\r\n\t\t\t\t\tdata: add_res\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tasync reFollow(query) {\r\n\t\ttry {\r\n\t\t\tconst {\r\n\t\t\t\tuid,\r\n\t\t\t\tfid\r\n\t\t\t} = query;\r\n\t\t\tconst res = await db.collection(\"follow\").where({\r\n\t\t\t\tuid: uid,\r\n\t\t\t\tfid: fid\r\n\t\t\t}).count();\r\n\t\t\tif (res.total < 0) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 201,\r\n\t\t\t\t\tmsg: \"未关注\"\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst re_res = await db.collection(\"follow\").where({\r\n\t\t\t\t\tuid: uid,\r\n\t\t\t\t\tfid: fid\r\n\t\t\t\t}).remove();\r\n\t\t\t\tconsole.log(re_res)\r\n\t\t\t\treturn {\r\n\t\t\t\t\tcode: 200,\r\n\t\t\t\t\tdata: re_res\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch(e) {\r\n\t\t\treturn {\r\n\t\t\t\tcode: 500,\r\n\t\t\t\tmsg: e.message\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user