add some
@ -1,5 +1,5 @@
|
||||
~ssh
|
||||
source local.shy
|
||||
~web.chat.macos
|
||||
desktop create index web.team.gonganxitong.recent name recent icon "src/gonganxitong/recent.png"
|
||||
desktop create index web.team.gonganxitong.service name service icon "src/gonganxitong/service.png"
|
||||
desktop create index web.team.gonganxitong.recent name recent icon "src/gonganxitong/credit.png"
|
||||
desktop create index web.team.gonganxitong.service name service icon "src/gonganxitong/setting.png"
|
||||
|
@ -3,96 +3,69 @@ package api
|
||||
const GONGANXITONG_PORTAL = "web.team.gonganxitong.portal"
|
||||
const GONGANXITONG_ALLOW = "web.team.gonganxitong.allow"
|
||||
const GONGANXITONG_APPLY = "web.team.gonganxitong.apply"
|
||||
const GONGANXITONG_CITY = "web.team.gonganxitong.city"
|
||||
const GONGANXITONG_CONTRACT = "web.team.gonganxitong.contract"
|
||||
const GONGANXITONG_CLEAN = "web.team.gonganxitong.clean"
|
||||
const GONGANXITONG_CREDIT = "web.team.gonganxitong.credit"
|
||||
const GONGANXITONG_DOCUMENT = "web.team.gonganxitong.document"
|
||||
const GONGANXITONG_DOMAIN = "web.team.gonganxitong.domain"
|
||||
const GONGANXITONG_EMAIL = "web.team.gonganxitong.email"
|
||||
const GONGANXITONG_EVENT = "web.team.gonganxitong.event"
|
||||
const GONGANXITONG_MARKET = "web.team.gonganxitong.market"
|
||||
const GONGANXITONG_MEETING = "web.team.gonganxitong.meeting"
|
||||
const GONGANXITONG_MEMBER = "web.team.gonganxitong.member"
|
||||
const GONGANXITONG_MESSAGE = "web.team.gonganxitong.message"
|
||||
const GONGANXITONG_NOTICE = "web.team.gonganxitong.notice"
|
||||
const GONGANXITONG_PAYMENTLIST = "web.team.gonganxitong.paymentlist"
|
||||
const GONGANXITONG_PHOTO = "web.team.gonganxitong.photo"
|
||||
const GONGANXITONG_QRCODE = "web.team.gonganxitong.qrcode"
|
||||
const GONGANXITONG_RECENT = "web.team.gonganxitong.recent"
|
||||
const GONGANXITONG_SERVICE = "web.team.gonganxitong.service"
|
||||
const GONGANXITONG_SETTING = "web.team.gonganxitong.setting"
|
||||
const GONGANXITONG_STREET = "web.team.gonganxitong.street"
|
||||
const GONGANXITONG_SUPPORT = "web.team.gonganxitong.support"
|
||||
const GONGANXITONG_USER = "web.team.gonganxitong.user"
|
||||
const HUODONGZUZHI_ACTIVITY = "web.team.huodongzuzhi.activity"
|
||||
const HUODONGZUZHI_PORTAL = "web.team.huodongzuzhi.portal"
|
||||
const HUODONGZUZHI_ALLOW = "web.team.huodongzuzhi.allow"
|
||||
const HUODONGZUZHI_APPLY = "web.team.huodongzuzhi.apply"
|
||||
const HUODONGZUZHI_CONTRACT = "web.team.huodongzuzhi.contract"
|
||||
const HUODONGZUZHI_CLEAN = "web.team.huodongzuzhi.clean"
|
||||
const HUODONGZUZHI_CREDIT = "web.team.huodongzuzhi.credit"
|
||||
const HUODONGZUZHI_DOCUMENT = "web.team.huodongzuzhi.document"
|
||||
const HUODONGZUZHI_EVENT = "web.team.huodongzuzhi.event"
|
||||
const HUODONGZUZHI_MARKET = "web.team.huodongzuzhi.market"
|
||||
const HUODONGZUZHI_MEETING = "web.team.huodongzuzhi.meeting"
|
||||
const HUODONGZUZHI_MEMBER = "web.team.huodongzuzhi.member"
|
||||
const HUODONGZUZHI_MESSAGE = "web.team.huodongzuzhi.message"
|
||||
const HUODONGZUZHI_NOTICE = "web.team.huodongzuzhi.notice"
|
||||
const HUODONGZUZHI_PAYMENTLIST = "web.team.huodongzuzhi.paymentlist"
|
||||
const HUODONGZUZHI_PHOTO = "web.team.huodongzuzhi.photo"
|
||||
const HUODONGZUZHI_QRCODE = "web.team.huodongzuzhi.qrcode"
|
||||
const HUODONGZUZHI_RECENT = "web.team.huodongzuzhi.recent"
|
||||
const HUODONGZUZHI_SERVICE = "web.team.huodongzuzhi.service"
|
||||
const HUODONGZUZHI_SETTING = "web.team.huodongzuzhi.setting"
|
||||
const HUODONGZUZHI_SUPPORT = "web.team.huodongzuzhi.support"
|
||||
const RENZHENGSHOUQUAN_ACCOUNT = "web.team.renzhengshouquan.account"
|
||||
const RENZHENGSHOUQUAN_ADMIN = "web.team.renzhengshouquan.admin"
|
||||
const RENZHENGSHOUQUAN_PORTAL = "web.team.renzhengshouquan.portal"
|
||||
const RENZHENGSHOUQUAN_ALLOW = "web.team.renzhengshouquan.allow"
|
||||
const RENZHENGSHOUQUAN_APPLY = "web.team.renzhengshouquan.apply"
|
||||
const RENZHENGSHOUQUAN_AUTH = "web.team.renzhengshouquan.auth"
|
||||
const RENZHENGSHOUQUAN_CERT = "web.team.renzhengshouquan.cert"
|
||||
const RENZHENGSHOUQUAN_CONTRACT = "web.team.renzhengshouquan.contract"
|
||||
const RENZHENGSHOUQUAN_CLEAN = "web.team.renzhengshouquan.clean"
|
||||
const RENZHENGSHOUQUAN_CREDIT = "web.team.renzhengshouquan.credit"
|
||||
const RENZHENGSHOUQUAN_DOCUMENT = "web.team.renzhengshouquan.document"
|
||||
const RENZHENGSHOUQUAN_DOMAIN = "web.team.renzhengshouquan.domain"
|
||||
const RENZHENGSHOUQUAN_EVENT = "web.team.renzhengshouquan.event"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENT_MEETING = "web.team.renzhengshouquan.external.tencent.meeting"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTCLOUD_REALNAME_REALNAM = "web.team.renzhengshouquan.external.tencentcloud.realname.realnam"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTCLOUD_SMH_SMH = "web.team.renzhengshouquan.external.tencentcloud.smh.smh"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTCLOUD_SMS_SMS = "web.team.renzhengshouquan.external.tencentcloud.sms.sms"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTCLOUD_TENCENTCLOUD = "web.team.renzhengshouquan.external.tencentcloud.tencentcloud"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTDOCUMENT_TENCENTDOCUME = "web.team.renzhengshouquan.external.tencentdocument.tencentdocume"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_TENCENTMEETING_TENCENTMEETING = "web.team.renzhengshouquan.external.tencentmeeting.tencentmeeting"
|
||||
const RENZHENGSHOUQUAN_EXTERNAL_WEIXINPAYMENT_WEIXINPAYMENT = "web.team.renzhengshouquan.external.weixinpayment.weixinpayment"
|
||||
const RENZHENGSHOUQUAN_MARKET = "web.team.renzhengshouquan.market"
|
||||
const RENZHENGSHOUQUAN_MEETING = "web.team.renzhengshouquan.meeting"
|
||||
const RENZHENGSHOUQUAN_MEMBER = "web.team.renzhengshouquan.member"
|
||||
const RENZHENGSHOUQUAN_MESSAGE = "web.team.renzhengshouquan.message"
|
||||
const RENZHENGSHOUQUAN_NOTICE = "web.team.renzhengshouquan.notice"
|
||||
const RENZHENGSHOUQUAN_PAYMENTLIST = "web.team.renzhengshouquan.paymentlist"
|
||||
const RENZHENGSHOUQUAN_PHOTO = "web.team.renzhengshouquan.photo"
|
||||
const RENZHENGSHOUQUAN_PROFILE = "web.team.renzhengshouquan.profile"
|
||||
const RENZHENGSHOUQUAN_QRCODE = "web.team.renzhengshouquan.qrcode"
|
||||
const RENZHENGSHOUQUAN_RECENT = "web.team.renzhengshouquan.recent"
|
||||
const RENZHENGSHOUQUAN_SERVICE = "web.team.renzhengshouquan.service"
|
||||
const RENZHENGSHOUQUAN_SETTING = "web.team.renzhengshouquan.setting"
|
||||
const RENZHENGSHOUQUAN_SUPPORT = "web.team.renzhengshouquan.support"
|
||||
const RENZHENGSHOUQUAN_TRANSITION = "web.team.renzhengshouquan.transition"
|
||||
const YUEHAOXITONG_PORTAL = "web.team.yuehaoxitong.portal"
|
||||
const YUEHAOXITONG_ALLOW = "web.team.yuehaoxitong.allow"
|
||||
const YUEHAOXITONG_APPLY = "web.team.yuehaoxitong.apply"
|
||||
const YUEHAOXITONG_CALL = "web.team.yuehaoxitong.call"
|
||||
const YUEHAOXITONG_CONTRACT = "web.team.yuehaoxitong.contract"
|
||||
const YUEHAOXITONG_CLEAN = "web.team.yuehaoxitong.clean"
|
||||
const YUEHAOXITONG_CREDIT = "web.team.yuehaoxitong.credit"
|
||||
const YUEHAOXITONG_DOCUMENT = "web.team.yuehaoxitong.document"
|
||||
const YUEHAOXITONG_EVENT = "web.team.yuehaoxitong.event"
|
||||
const YUEHAOXITONG_HISTORY = "web.team.yuehaoxitong.history"
|
||||
const YUEHAOXITONG_MARKET = "web.team.yuehaoxitong.market"
|
||||
const YUEHAOXITONG_MEETING = "web.team.yuehaoxitong.meeting"
|
||||
const YUEHAOXITONG_MEMBER = "web.team.yuehaoxitong.member"
|
||||
const YUEHAOXITONG_MESSAGE = "web.team.yuehaoxitong.message"
|
||||
const YUEHAOXITONG_NOTICE = "web.team.yuehaoxitong.notice"
|
||||
const YUEHAOXITONG_OPEN = "web.team.yuehaoxitong.open"
|
||||
const YUEHAOXITONG_PAYMENTLIST = "web.team.yuehaoxitong.paymentlist"
|
||||
const YUEHAOXITONG_PHOTO = "web.team.yuehaoxitong.photo"
|
||||
const YUEHAOXITONG_PLAN = "web.team.yuehaoxitong.plan"
|
||||
const YUEHAOXITONG_QRCODE = "web.team.yuehaoxitong.qrcode"
|
||||
const YUEHAOXITONG_RECENT = "web.team.yuehaoxitong.recent"
|
||||
|
@ -3,18 +3,16 @@ package api
|
||||
const JIAOCAIZILIAO_PORTAL = "web.team.jiaocaiziliao.portal"
|
||||
const JIAOCAIZILIAO_ALLOW = "web.team.jiaocaiziliao.allow"
|
||||
const JIAOCAIZILIAO_APPLY = "web.team.jiaocaiziliao.apply"
|
||||
const JIAOCAIZILIAO_CONTRACT = "web.team.jiaocaiziliao.contract"
|
||||
const JIAOCAIZILIAO_CLEAN = "web.team.jiaocaiziliao.clean"
|
||||
const JIAOCAIZILIAO_CONTENT = "web.team.jiaocaiziliao.content"
|
||||
const JIAOCAIZILIAO_CREDIT = "web.team.jiaocaiziliao.credit"
|
||||
const JIAOCAIZILIAO_DOCUMENT = "web.team.jiaocaiziliao.document"
|
||||
const JIAOCAIZILIAO_EVENT = "web.team.jiaocaiziliao.event"
|
||||
const JIAOCAIZILIAO_MARKET = "web.team.jiaocaiziliao.market"
|
||||
const JIAOCAIZILIAO_MEETING = "web.team.jiaocaiziliao.meeting"
|
||||
const JIAOCAIZILIAO_MEMBER = "web.team.jiaocaiziliao.member"
|
||||
const JIAOCAIZILIAO_MESSAGE = "web.team.jiaocaiziliao.message"
|
||||
const JIAOCAIZILIAO_NOTICE = "web.team.jiaocaiziliao.notice"
|
||||
const JIAOCAIZILIAO_OFFICIAL = "web.team.jiaocaiziliao.official"
|
||||
const JIAOCAIZILIAO_PAYMENTLIST = "web.team.jiaocaiziliao.paymentlist"
|
||||
const JIAOCAIZILIAO_PHOTO = "web.team.jiaocaiziliao.photo"
|
||||
const JIAOCAIZILIAO_QRCODE = "web.team.jiaocaiziliao.qrcode"
|
||||
const JIAOCAIZILIAO_RECENT = "web.team.jiaocaiziliao.recent"
|
||||
const JIAOCAIZILIAO_SERVICE = "web.team.jiaocaiziliao.service"
|
||||
@ -23,18 +21,14 @@ const JIAOCAIZILIAO_SUPPORT = "web.team.jiaocaiziliao.support"
|
||||
const JIAOWUXITONG_PORTAL = "web.team.jiaowuxitong.portal"
|
||||
const JIAOWUXITONG_ALLOW = "web.team.jiaowuxitong.allow"
|
||||
const JIAOWUXITONG_APPLY = "web.team.jiaowuxitong.apply"
|
||||
const JIAOWUXITONG_CONTRACT = "web.team.jiaowuxitong.contract"
|
||||
const JIAOWUXITONG_CLEAN = "web.team.jiaowuxitong.clean"
|
||||
const JIAOWUXITONG_CREDIT = "web.team.jiaowuxitong.credit"
|
||||
const JIAOWUXITONG_DOCUMENT = "web.team.jiaowuxitong.document"
|
||||
const JIAOWUXITONG_EVENT = "web.team.jiaowuxitong.event"
|
||||
const JIAOWUXITONG_HOMEWORK = "web.team.jiaowuxitong.homework"
|
||||
const JIAOWUXITONG_MARKET = "web.team.jiaowuxitong.market"
|
||||
const JIAOWUXITONG_MEETING = "web.team.jiaowuxitong.meeting"
|
||||
const JIAOWUXITONG_MEMBER = "web.team.jiaowuxitong.member"
|
||||
const JIAOWUXITONG_MESSAGE = "web.team.jiaowuxitong.message"
|
||||
const JIAOWUXITONG_NOTICE = "web.team.jiaowuxitong.notice"
|
||||
const JIAOWUXITONG_PAYMENTLIST = "web.team.jiaowuxitong.paymentlist"
|
||||
const JIAOWUXITONG_PHOTO = "web.team.jiaowuxitong.photo"
|
||||
const JIAOWUXITONG_QRCODE = "web.team.jiaowuxitong.qrcode"
|
||||
const JIAOWUXITONG_RECENT = "web.team.jiaowuxitong.recent"
|
||||
const JIAOWUXITONG_SERVICE = "web.team.jiaowuxitong.service"
|
||||
@ -43,17 +37,13 @@ const JIAOWUXITONG_SUPPORT = "web.team.jiaowuxitong.support"
|
||||
const KAOSHIXITONG_PORTAL = "web.team.kaoshixitong.portal"
|
||||
const KAOSHIXITONG_ALLOW = "web.team.kaoshixitong.allow"
|
||||
const KAOSHIXITONG_APPLY = "web.team.kaoshixitong.apply"
|
||||
const KAOSHIXITONG_CONTRACT = "web.team.kaoshixitong.contract"
|
||||
const KAOSHIXITONG_CLEAN = "web.team.kaoshixitong.clean"
|
||||
const KAOSHIXITONG_CREDIT = "web.team.kaoshixitong.credit"
|
||||
const KAOSHIXITONG_DOCUMENT = "web.team.kaoshixitong.document"
|
||||
const KAOSHIXITONG_EVENT = "web.team.kaoshixitong.event"
|
||||
const KAOSHIXITONG_MARKET = "web.team.kaoshixitong.market"
|
||||
const KAOSHIXITONG_MEETING = "web.team.kaoshixitong.meeting"
|
||||
const KAOSHIXITONG_MEMBER = "web.team.kaoshixitong.member"
|
||||
const KAOSHIXITONG_MESSAGE = "web.team.kaoshixitong.message"
|
||||
const KAOSHIXITONG_NOTICE = "web.team.kaoshixitong.notice"
|
||||
const KAOSHIXITONG_PAYMENTLIST = "web.team.kaoshixitong.paymentlist"
|
||||
const KAOSHIXITONG_PHOTO = "web.team.kaoshixitong.photo"
|
||||
const KAOSHIXITONG_QRCODE = "web.team.kaoshixitong.qrcode"
|
||||
const KAOSHIXITONG_QUESTION = "web.team.kaoshixitong.question"
|
||||
const KAOSHIXITONG_RECENT = "web.team.kaoshixitong.recent"
|
||||
@ -63,18 +53,14 @@ const KAOSHIXITONG_SUPPORT = "web.team.kaoshixitong.support"
|
||||
const ZAIXIANKETANG_PORTAL = "web.team.zaixianketang.portal"
|
||||
const ZAIXIANKETANG_ALLOW = "web.team.zaixianketang.allow"
|
||||
const ZAIXIANKETANG_APPLY = "web.team.zaixianketang.apply"
|
||||
const ZAIXIANKETANG_CONTRACT = "web.team.zaixianketang.contract"
|
||||
const ZAIXIANKETANG_CLEAN = "web.team.zaixianketang.clean"
|
||||
const ZAIXIANKETANG_CREDIT = "web.team.zaixianketang.credit"
|
||||
const ZAIXIANKETANG_DOCUMENT = "web.team.zaixianketang.document"
|
||||
const ZAIXIANKETANG_EVENT = "web.team.zaixianketang.event"
|
||||
const ZAIXIANKETANG_LESSON = "web.team.zaixianketang.lesson"
|
||||
const ZAIXIANKETANG_MARKET = "web.team.zaixianketang.market"
|
||||
const ZAIXIANKETANG_MEETING = "web.team.zaixianketang.meeting"
|
||||
const ZAIXIANKETANG_MEMBER = "web.team.zaixianketang.member"
|
||||
const ZAIXIANKETANG_MESSAGE = "web.team.zaixianketang.message"
|
||||
const ZAIXIANKETANG_NOTICE = "web.team.zaixianketang.notice"
|
||||
const ZAIXIANKETANG_PAYMENTLIST = "web.team.zaixianketang.paymentlist"
|
||||
const ZAIXIANKETANG_PHOTO = "web.team.zaixianketang.photo"
|
||||
const ZAIXIANKETANG_QRCODE = "web.team.zaixianketang.qrcode"
|
||||
const ZAIXIANKETANG_RECENT = "web.team.zaixianketang.recent"
|
||||
const ZAIXIANKETANG_SERVICE = "web.team.zaixianketang.service"
|
||||
|
@ -4,9 +4,8 @@ const GONGYINGLIAN_PORTAL = "web.team.gongyinglian.portal"
|
||||
const GONGYINGLIAN_ALLOW = "web.team.gongyinglian.allow"
|
||||
const GONGYINGLIAN_APPLY = "web.team.gongyinglian.apply"
|
||||
const GONGYINGLIAN_BRAND = "web.team.gongyinglian.brand"
|
||||
const GONGYINGLIAN_CONTRACT = "web.team.gongyinglian.contract"
|
||||
const GONGYINGLIAN_CLEAN = "web.team.gongyinglian.clean"
|
||||
const GONGYINGLIAN_CREDIT = "web.team.gongyinglian.credit"
|
||||
const GONGYINGLIAN_DOCUMENT = "web.team.gongyinglian.document"
|
||||
const GONGYINGLIAN_EVENT = "web.team.gongyinglian.event"
|
||||
const GONGYINGLIAN_EXPENSE = "web.team.gongyinglian.expense"
|
||||
const GONGYINGLIAN_EXPRESS = "web.team.gongyinglian.express"
|
||||
@ -14,14 +13,11 @@ const GONGYINGLIAN_GOODS = "web.team.gongyinglian.goods"
|
||||
const GONGYINGLIAN_LOAN = "web.team.gongyinglian.loan"
|
||||
const GONGYINGLIAN_MARKET = "web.team.gongyinglian.market"
|
||||
const GONGYINGLIAN_MATERIAL = "web.team.gongyinglian.material"
|
||||
const GONGYINGLIAN_MEETING = "web.team.gongyinglian.meeting"
|
||||
const GONGYINGLIAN_MEMBER = "web.team.gongyinglian.member"
|
||||
const GONGYINGLIAN_MESSAGE = "web.team.gongyinglian.message"
|
||||
const GONGYINGLIAN_NOTICE = "web.team.gongyinglian.notice"
|
||||
const GONGYINGLIAN_ORDER = "web.team.gongyinglian.order"
|
||||
const GONGYINGLIAN_PAYMENT = "web.team.gongyinglian.payment"
|
||||
const GONGYINGLIAN_PAYMENTLIST = "web.team.gongyinglian.paymentlist"
|
||||
const GONGYINGLIAN_PHOTO = "web.team.gongyinglian.photo"
|
||||
const GONGYINGLIAN_PRODUCE = "web.team.gongyinglian.produce"
|
||||
const GONGYINGLIAN_PRODUCT = "web.team.gongyinglian.product"
|
||||
const GONGYINGLIAN_PURCHASE = "web.team.gongyinglian.purchase"
|
||||
@ -36,25 +32,34 @@ const GONGYINGLIAN_SETTING = "web.team.gongyinglian.setting"
|
||||
const GONGYINGLIAN_SHOP = "web.team.gongyinglian.shop"
|
||||
const GONGYINGLIAN_SUPPORT = "web.team.gongyinglian.support"
|
||||
const GONGYINGLIAN_WAREHOUSE = "web.team.gongyinglian.warehouse"
|
||||
const GUANFANGWANGZHAN_PORTAL = "web.team.guanfangwangzhan.portal"
|
||||
const GUANFANGWANGZHAN_ALLOW = "web.team.guanfangwangzhan.allow"
|
||||
const GUANFANGWANGZHAN_APPLY = "web.team.guanfangwangzhan.apply"
|
||||
const GUANFANGWANGZHAN_CLEAN = "web.team.guanfangwangzhan.clean"
|
||||
const GUANFANGWANGZHAN_CREDIT = "web.team.guanfangwangzhan.credit"
|
||||
const GUANFANGWANGZHAN_EVENT = "web.team.guanfangwangzhan.event"
|
||||
const GUANFANGWANGZHAN_MARKET = "web.team.guanfangwangzhan.market"
|
||||
const GUANFANGWANGZHAN_MEMBER = "web.team.guanfangwangzhan.member"
|
||||
const GUANFANGWANGZHAN_MESSAGE = "web.team.guanfangwangzhan.message"
|
||||
const GUANFANGWANGZHAN_NOTICE = "web.team.guanfangwangzhan.notice"
|
||||
const GUANFANGWANGZHAN_QRCODE = "web.team.guanfangwangzhan.qrcode"
|
||||
const GUANFANGWANGZHAN_RECENT = "web.team.guanfangwangzhan.recent"
|
||||
const GUANFANGWANGZHAN_SERVICE = "web.team.guanfangwangzhan.service"
|
||||
const GUANFANGWANGZHAN_SETTING = "web.team.guanfangwangzhan.setting"
|
||||
const GUANFANGWANGZHAN_SUPPORT = "web.team.guanfangwangzhan.support"
|
||||
const GUANLIXITONG_PORTAL = "web.team.guanlixitong.portal"
|
||||
const GUANLIXITONG_ALLOW = "web.team.guanlixitong.allow"
|
||||
const GUANLIXITONG_APPLY = "web.team.guanlixitong.apply"
|
||||
const GUANLIXITONG_CONFERENCE = "web.team.guanlixitong.conference"
|
||||
const GUANLIXITONG_CONTRACT = "web.team.guanlixitong.contract"
|
||||
const GUANLIXITONG_CLEAN = "web.team.guanlixitong.clean"
|
||||
const GUANLIXITONG_CREDIT = "web.team.guanlixitong.credit"
|
||||
const GUANLIXITONG_DOCUMENT = "web.team.guanlixitong.document"
|
||||
const GUANLIXITONG_EMPLOYEE = "web.team.guanlixitong.employee"
|
||||
const GUANLIXITONG_EQUIPMENT = "web.team.guanlixitong.equipment"
|
||||
const GUANLIXITONG_EVENT = "web.team.guanlixitong.event"
|
||||
const GUANLIXITONG_INTERVIEW = "web.team.guanlixitong.interview"
|
||||
const GUANLIXITONG_INVENTORY = "web.team.guanlixitong.inventory"
|
||||
const GUANLIXITONG_MARKET = "web.team.guanlixitong.market"
|
||||
const GUANLIXITONG_MEETING = "web.team.guanlixitong.meeting"
|
||||
const GUANLIXITONG_MEMBER = "web.team.guanlixitong.member"
|
||||
const GUANLIXITONG_MESSAGE = "web.team.guanlixitong.message"
|
||||
const GUANLIXITONG_NOTICE = "web.team.guanlixitong.notice"
|
||||
const GUANLIXITONG_PAYMENTLIST = "web.team.guanlixitong.paymentlist"
|
||||
const GUANLIXITONG_PHOTO = "web.team.guanlixitong.photo"
|
||||
const GUANLIXITONG_PROCUREMENT = "web.team.guanlixitong.procurement"
|
||||
const GUANLIXITONG_QRCODE = "web.team.guanlixitong.qrcode"
|
||||
const GUANLIXITONG_RECENT = "web.team.guanlixitong.recent"
|
||||
@ -64,41 +69,126 @@ const GUANLIXITONG_SERVICE = "web.team.guanlixitong.service"
|
||||
const GUANLIXITONG_SETTING = "web.team.guanlixitong.setting"
|
||||
const GUANLIXITONG_SUPPORT = "web.team.guanlixitong.support"
|
||||
const GUANLIXITONG_TARGET = "web.team.guanlixitong.target"
|
||||
const KEHUGUANLI_PORTAL = "web.team.kehuguanli.portal"
|
||||
const KEHUGUANLI_ALLOW = "web.team.kehuguanli.allow"
|
||||
const KEHUGUANLI_APPLY = "web.team.kehuguanli.apply"
|
||||
const KEHUGUANLI_CLEAN = "web.team.kehuguanli.clean"
|
||||
const KEHUGUANLI_CREDIT = "web.team.kehuguanli.credit"
|
||||
const KEHUGUANLI_EVENT = "web.team.kehuguanli.event"
|
||||
const KEHUGUANLI_MARKET = "web.team.kehuguanli.market"
|
||||
const KEHUGUANLI_MEMBER = "web.team.kehuguanli.member"
|
||||
const KEHUGUANLI_MESSAGE = "web.team.kehuguanli.message"
|
||||
const KEHUGUANLI_NOTICE = "web.team.kehuguanli.notice"
|
||||
const KEHUGUANLI_PRODUCT = "web.team.kehuguanli.product"
|
||||
const KEHUGUANLI_QRCODE = "web.team.kehuguanli.qrcode"
|
||||
const KEHUGUANLI_RECENT = "web.team.kehuguanli.recent"
|
||||
const KEHUGUANLI_SERVICE = "web.team.kehuguanli.service"
|
||||
const KEHUGUANLI_SETTING = "web.team.kehuguanli.setting"
|
||||
const KEHUGUANLI_SUPPORT = "web.team.kehuguanli.support"
|
||||
const PEIXUNGUANLI_PORTAL = "web.team.peixunguanli.portal"
|
||||
const PEIXUNGUANLI_ALLOW = "web.team.peixunguanli.allow"
|
||||
const PEIXUNGUANLI_APPLY = "web.team.peixunguanli.apply"
|
||||
const PEIXUNGUANLI_CLEAN = "web.team.peixunguanli.clean"
|
||||
const PEIXUNGUANLI_COURSE = "web.team.peixunguanli.course"
|
||||
const PEIXUNGUANLI_CREDIT = "web.team.peixunguanli.credit"
|
||||
const PEIXUNGUANLI_EVALUATION = "web.team.peixunguanli.evaluation"
|
||||
const PEIXUNGUANLI_EVENT = "web.team.peixunguanli.event"
|
||||
const PEIXUNGUANLI_FEEDBACK = "web.team.peixunguanli.feedback"
|
||||
const PEIXUNGUANLI_MARKET = "web.team.peixunguanli.market"
|
||||
const PEIXUNGUANLI_MEMBER = "web.team.peixunguanli.member"
|
||||
const PEIXUNGUANLI_MESSAGE = "web.team.peixunguanli.message"
|
||||
const PEIXUNGUANLI_NOTICE = "web.team.peixunguanli.notice"
|
||||
const PEIXUNGUANLI_PLAN = "web.team.peixunguanli.plan"
|
||||
const PEIXUNGUANLI_QRCODE = "web.team.peixunguanli.qrcode"
|
||||
const PEIXUNGUANLI_RECENT = "web.team.peixunguanli.recent"
|
||||
const PEIXUNGUANLI_RECORD = "web.team.peixunguanli.record"
|
||||
const PEIXUNGUANLI_SERVICE = "web.team.peixunguanli.service"
|
||||
const PEIXUNGUANLI_SETTING = "web.team.peixunguanli.setting"
|
||||
const PEIXUNGUANLI_SUPPORT = "web.team.peixunguanli.support"
|
||||
const RONGZIJIHUA_PORTAL = "web.team.rongzijihua.portal"
|
||||
const RONGZIJIHUA_ALLOW = "web.team.rongzijihua.allow"
|
||||
const RONGZIJIHUA_APPLY = "web.team.rongzijihua.apply"
|
||||
const RONGZIJIHUA_CLEAN = "web.team.rongzijihua.clean"
|
||||
const RONGZIJIHUA_CREDIT = "web.team.rongzijihua.credit"
|
||||
const RONGZIJIHUA_EVENT = "web.team.rongzijihua.event"
|
||||
const RONGZIJIHUA_MARKET = "web.team.rongzijihua.market"
|
||||
const RONGZIJIHUA_MEMBER = "web.team.rongzijihua.member"
|
||||
const RONGZIJIHUA_MESSAGE = "web.team.rongzijihua.message"
|
||||
const RONGZIJIHUA_NOTICE = "web.team.rongzijihua.notice"
|
||||
const RONGZIJIHUA_PRODUCT = "web.team.rongzijihua.product"
|
||||
const RONGZIJIHUA_QRCODE = "web.team.rongzijihua.qrcode"
|
||||
const RONGZIJIHUA_RECENT = "web.team.rongzijihua.recent"
|
||||
const RONGZIJIHUA_SERVICE = "web.team.rongzijihua.service"
|
||||
const RONGZIJIHUA_SETTING = "web.team.rongzijihua.setting"
|
||||
const RONGZIJIHUA_SUPPORT = "web.team.rongzijihua.support"
|
||||
const SHICHANGYINGXIAO_PORTAL = "web.team.shichangyingxiao.portal"
|
||||
const SHICHANGYINGXIAO_ALLOW = "web.team.shichangyingxiao.allow"
|
||||
const SHICHANGYINGXIAO_APPLY = "web.team.shichangyingxiao.apply"
|
||||
const SHICHANGYINGXIAO_CONTRACT = "web.team.shichangyingxiao.contract"
|
||||
const SHICHANGYINGXIAO_CLEAN = "web.team.shichangyingxiao.clean"
|
||||
const SHICHANGYINGXIAO_CREDIT = "web.team.shichangyingxiao.credit"
|
||||
const SHICHANGYINGXIAO_DOCUMENT = "web.team.shichangyingxiao.document"
|
||||
const SHICHANGYINGXIAO_EVENT = "web.team.shichangyingxiao.event"
|
||||
const SHICHANGYINGXIAO_MARKET = "web.team.shichangyingxiao.market"
|
||||
const SHICHANGYINGXIAO_MEETING = "web.team.shichangyingxiao.meeting"
|
||||
const SHICHANGYINGXIAO_MEMBER = "web.team.shichangyingxiao.member"
|
||||
const SHICHANGYINGXIAO_MESSAGE = "web.team.shichangyingxiao.message"
|
||||
const SHICHANGYINGXIAO_NOTICE = "web.team.shichangyingxiao.notice"
|
||||
const SHICHANGYINGXIAO_PAYMENTLIST = "web.team.shichangyingxiao.paymentlist"
|
||||
const SHICHANGYINGXIAO_PHOTO = "web.team.shichangyingxiao.photo"
|
||||
const SHICHANGYINGXIAO_PROMOTION = "web.team.shichangyingxiao.promotion"
|
||||
const SHICHANGYINGXIAO_QRCODE = "web.team.shichangyingxiao.qrcode"
|
||||
const SHICHANGYINGXIAO_RECENT = "web.team.shichangyingxiao.recent"
|
||||
const SHICHANGYINGXIAO_SERVICE = "web.team.shichangyingxiao.service"
|
||||
const SHICHANGYINGXIAO_SETTING = "web.team.shichangyingxiao.setting"
|
||||
const SHICHANGYINGXIAO_SUPPORT = "web.team.shichangyingxiao.support"
|
||||
const XIANGMUGUANLI_PORTAL = "web.team.xiangmuguanli.portal"
|
||||
const XIANGMUGUANLI_ALLOW = "web.team.xiangmuguanli.allow"
|
||||
const XIANGMUGUANLI_APPLY = "web.team.xiangmuguanli.apply"
|
||||
const XIANGMUGUANLI_CLEAN = "web.team.xiangmuguanli.clean"
|
||||
const XIANGMUGUANLI_CREDIT = "web.team.xiangmuguanli.credit"
|
||||
const XIANGMUGUANLI_DATE = "web.team.xiangmuguanli.date"
|
||||
const XIANGMUGUANLI_DONE = "web.team.xiangmuguanli.done"
|
||||
const XIANGMUGUANLI_EVENT = "web.team.xiangmuguanli.event"
|
||||
const XIANGMUGUANLI_MARKET = "web.team.xiangmuguanli.market"
|
||||
const XIANGMUGUANLI_MEMBER = "web.team.xiangmuguanli.member"
|
||||
const XIANGMUGUANLI_MESSAGE = "web.team.xiangmuguanli.message"
|
||||
const XIANGMUGUANLI_NOTICE = "web.team.xiangmuguanli.notice"
|
||||
const XIANGMUGUANLI_PLAN = "web.team.xiangmuguanli.plan"
|
||||
const XIANGMUGUANLI_QRCODE = "web.team.xiangmuguanli.qrcode"
|
||||
const XIANGMUGUANLI_RECENT = "web.team.xiangmuguanli.recent"
|
||||
const XIANGMUGUANLI_SERVICE = "web.team.xiangmuguanli.service"
|
||||
const XIANGMUGUANLI_SETTING = "web.team.xiangmuguanli.setting"
|
||||
const XIANGMUGUANLI_SUPPORT = "web.team.xiangmuguanli.support"
|
||||
const XIANGMUGUANLI_TASK = "web.team.xiangmuguanli.task"
|
||||
const XIANGMUGUANLI_TODO = "web.team.xiangmuguanli.todo"
|
||||
const XIANGMUGUANLI_WARN = "web.team.xiangmuguanli.warn"
|
||||
const YINGXIAOTUIGUANG_PORTAL = "web.team.yingxiaotuiguang.portal"
|
||||
const YINGXIAOTUIGUANG_ALLOW = "web.team.yingxiaotuiguang.allow"
|
||||
const YINGXIAOTUIGUANG_APPLY = "web.team.yingxiaotuiguang.apply"
|
||||
const YINGXIAOTUIGUANG_BONUS = "web.team.yingxiaotuiguang.bonus"
|
||||
const YINGXIAOTUIGUANG_CHANNEL = "web.team.yingxiaotuiguang.channel"
|
||||
const YINGXIAOTUIGUANG_CLEAN = "web.team.yingxiaotuiguang.clean"
|
||||
const YINGXIAOTUIGUANG_CREDIT = "web.team.yingxiaotuiguang.credit"
|
||||
const YINGXIAOTUIGUANG_EVENT = "web.team.yingxiaotuiguang.event"
|
||||
const YINGXIAOTUIGUANG_INVITE = "web.team.yingxiaotuiguang.invite"
|
||||
const YINGXIAOTUIGUANG_MARKET = "web.team.yingxiaotuiguang.market"
|
||||
const YINGXIAOTUIGUANG_MEMBER = "web.team.yingxiaotuiguang.member"
|
||||
const YINGXIAOTUIGUANG_MESSAGE = "web.team.yingxiaotuiguang.message"
|
||||
const YINGXIAOTUIGUANG_NOTICE = "web.team.yingxiaotuiguang.notice"
|
||||
const YINGXIAOTUIGUANG_PRODUCT = "web.team.yingxiaotuiguang.product"
|
||||
const YINGXIAOTUIGUANG_QRCODE = "web.team.yingxiaotuiguang.qrcode"
|
||||
const YINGXIAOTUIGUANG_RECENT = "web.team.yingxiaotuiguang.recent"
|
||||
const YINGXIAOTUIGUANG_SERVICE = "web.team.yingxiaotuiguang.service"
|
||||
const YINGXIAOTUIGUANG_SETTING = "web.team.yingxiaotuiguang.setting"
|
||||
const YINGXIAOTUIGUANG_STAT = "web.team.yingxiaotuiguang.stat"
|
||||
const YINGXIAOTUIGUANG_SUPPORT = "web.team.yingxiaotuiguang.support"
|
||||
const ZIJINLIAN_PORTAL = "web.team.zijinlian.portal"
|
||||
const ZIJINLIAN_ALLOW = "web.team.zijinlian.allow"
|
||||
const ZIJINLIAN_APPLY = "web.team.zijinlian.apply"
|
||||
const ZIJINLIAN_CONTRACT = "web.team.zijinlian.contract"
|
||||
const ZIJINLIAN_CLEAN = "web.team.zijinlian.clean"
|
||||
const ZIJINLIAN_CREDIT = "web.team.zijinlian.credit"
|
||||
const ZIJINLIAN_DOCUMENT = "web.team.zijinlian.document"
|
||||
const ZIJINLIAN_EVENT = "web.team.zijinlian.event"
|
||||
const ZIJINLIAN_INVESTMENT = "web.team.zijinlian.investment"
|
||||
const ZIJINLIAN_MARKET = "web.team.zijinlian.market"
|
||||
const ZIJINLIAN_MEETING = "web.team.zijinlian.meeting"
|
||||
const ZIJINLIAN_MEMBER = "web.team.zijinlian.member"
|
||||
const ZIJINLIAN_MESSAGE = "web.team.zijinlian.message"
|
||||
const ZIJINLIAN_NOTICE = "web.team.zijinlian.notice"
|
||||
const ZIJINLIAN_PAYMENTLIST = "web.team.zijinlian.paymentlist"
|
||||
const ZIJINLIAN_PHOTO = "web.team.zijinlian.photo"
|
||||
const ZIJINLIAN_QRCODE = "web.team.zijinlian.qrcode"
|
||||
const ZIJINLIAN_RECENT = "web.team.zijinlian.recent"
|
||||
const ZIJINLIAN_SERVICE = "web.team.zijinlian.service"
|
||||
|
@ -3,17 +3,15 @@ package api
|
||||
const DASHBOARD_PORTAL = "web.team.dashboard.portal"
|
||||
const DASHBOARD_ALLOW = "web.team.dashboard.allow"
|
||||
const DASHBOARD_APPLY = "web.team.dashboard.apply"
|
||||
const DASHBOARD_CONTRACT = "web.team.dashboard.contract"
|
||||
const DASHBOARD_CLEAN = "web.team.dashboard.clean"
|
||||
const DASHBOARD_CLEANUP = "web.team.dashboard.cleanup"
|
||||
const DASHBOARD_CREDIT = "web.team.dashboard.credit"
|
||||
const DASHBOARD_DASHBOARD = "web.team.dashboard.dashboard"
|
||||
const DASHBOARD_EVENT = "web.team.dashboard.event"
|
||||
const DASHBOARD_MARKET = "web.team.dashboard.market"
|
||||
const DASHBOARD_MEETING = "web.team.dashboard.meeting"
|
||||
const DASHBOARD_MEMBER = "web.team.dashboard.member"
|
||||
const DASHBOARD_MESSAGE = "web.team.dashboard.message"
|
||||
const DASHBOARD_NOTICE = "web.team.dashboard.notice"
|
||||
const DASHBOARD_PAYMENTLIST = "web.team.dashboard.paymentlist"
|
||||
const DASHBOARD_PHOTO = "web.team.dashboard.photo"
|
||||
const DASHBOARD_QRCODE = "web.team.dashboard.qrcode"
|
||||
const DASHBOARD_RECENT = "web.team.dashboard.recent"
|
||||
const DASHBOARD_SERVICE = "web.team.dashboard.service"
|
||||
@ -22,3 +20,80 @@ const DASHBOARD_SUMMARY = "web.team.dashboard.summary"
|
||||
const DASHBOARD_SUPPORT = "web.team.dashboard.support"
|
||||
const DEVELOPMENT_PORTAL = "web.team.development.portal"
|
||||
const DEVELOPMENT_ALLOW = "web.team.development.allow"
|
||||
const DEVELOPMENT_APPLY = "web.team.development.apply"
|
||||
const DEVELOPMENT_CLEAN = "web.team.development.clean"
|
||||
const DEVELOPMENT_CREDIT = "web.team.development.credit"
|
||||
const DEVELOPMENT_EVENT = "web.team.development.event"
|
||||
const DEVELOPMENT_MARKET = "web.team.development.market"
|
||||
const DEVELOPMENT_MEMBER = "web.team.development.member"
|
||||
const DEVELOPMENT_MESSAGE = "web.team.development.message"
|
||||
const DEVELOPMENT_NOTICE = "web.team.development.notice"
|
||||
const DEVELOPMENT_QRCODE = "web.team.development.qrcode"
|
||||
const DEVELOPMENT_RECENT = "web.team.development.recent"
|
||||
const DEVELOPMENT_SERVE = "web.team.development.serve"
|
||||
const DEVELOPMENT_SERVICE = "web.team.development.service"
|
||||
const DEVELOPMENT_SETTING = "web.team.development.setting"
|
||||
const DEVELOPMENT_SUPPORT = "web.team.development.support"
|
||||
const OPERATION_PORTAL = "web.team.operation.portal"
|
||||
const OPERATION_ALLOW = "web.team.operation.allow"
|
||||
const OPERATION_APPLY = "web.team.operation.apply"
|
||||
const OPERATION_CLEAN = "web.team.operation.clean"
|
||||
const OPERATION_CLUSTER = "web.team.operation.cluster"
|
||||
const OPERATION_CREDIT = "web.team.operation.credit"
|
||||
const OPERATION_EVENT = "web.team.operation.event"
|
||||
const OPERATION_GATEWAY = "web.team.operation.gateway"
|
||||
const OPERATION_MARKET = "web.team.operation.market"
|
||||
const OPERATION_MEMBER = "web.team.operation.member"
|
||||
const OPERATION_MESSAGE = "web.team.operation.message"
|
||||
const OPERATION_NOTICE = "web.team.operation.notice"
|
||||
const OPERATION_PRODUCT = "web.team.operation.product"
|
||||
const OPERATION_PROJECT = "web.team.operation.project"
|
||||
const OPERATION_QRCODE = "web.team.operation.qrcode"
|
||||
const OPERATION_RECENT = "web.team.operation.recent"
|
||||
const OPERATION_SERVICE = "web.team.operation.service"
|
||||
const OPERATION_SETTING = "web.team.operation.setting"
|
||||
const OPERATION_SUPPORT = "web.team.operation.support"
|
||||
const OPERATION_TEMPLATE = "web.team.operation.template"
|
||||
const PRODUCTION_PORTAL = "web.team.production.portal"
|
||||
const PRODUCTION_ALLOW = "web.team.production.allow"
|
||||
const PRODUCTION_APPLY = "web.team.production.apply"
|
||||
const PRODUCTION_CARE = "web.team.production.care"
|
||||
const PRODUCTION_CASE = "web.team.production.case"
|
||||
const PRODUCTION_CLEAN = "web.team.production.clean"
|
||||
const PRODUCTION_CREDIT = "web.team.production.credit"
|
||||
const PRODUCTION_DATE = "web.team.production.date"
|
||||
const PRODUCTION_DEAL = "web.team.production.deal"
|
||||
const PRODUCTION_DESIGN = "web.team.production.design"
|
||||
const PRODUCTION_EVENT = "web.team.production.event"
|
||||
const PRODUCTION_FILE = "web.team.production.file"
|
||||
const PRODUCTION_ISSUE = "web.team.production.issue"
|
||||
const PRODUCTION_MARKET = "web.team.production.market"
|
||||
const PRODUCTION_MEET = "web.team.production.meet"
|
||||
const PRODUCTION_MEMBER = "web.team.production.member"
|
||||
const PRODUCTION_MESSAGE = "web.team.production.message"
|
||||
const PRODUCTION_NOTICE = "web.team.production.notice"
|
||||
const PRODUCTION_PLAN = "web.team.production.plan"
|
||||
const PRODUCTION_QRCODE = "web.team.production.qrcode"
|
||||
const PRODUCTION_RECENT = "web.team.production.recent"
|
||||
const PRODUCTION_SERVICE = "web.team.production.service"
|
||||
const PRODUCTION_SETTING = "web.team.production.setting"
|
||||
const PRODUCTION_STAT = "web.team.production.stat"
|
||||
const PRODUCTION_SUPPORT = "web.team.production.support"
|
||||
const PRODUCTION_TAKE = "web.team.production.take"
|
||||
const PRODUCTION_TASK = "web.team.production.task"
|
||||
const STORAGE_PORTAL = "web.team.storage.portal"
|
||||
const STORAGE_ALLOW = "web.team.storage.allow"
|
||||
const STORAGE_APPLY = "web.team.storage.apply"
|
||||
const STORAGE_CLEAN = "web.team.storage.clean"
|
||||
const STORAGE_CREDIT = "web.team.storage.credit"
|
||||
const STORAGE_EVENT = "web.team.storage.event"
|
||||
const STORAGE_FILE = "web.team.storage.file"
|
||||
const STORAGE_MARKET = "web.team.storage.market"
|
||||
const STORAGE_MEMBER = "web.team.storage.member"
|
||||
const STORAGE_MESSAGE = "web.team.storage.message"
|
||||
const STORAGE_NOTICE = "web.team.storage.notice"
|
||||
const STORAGE_QRCODE = "web.team.storage.qrcode"
|
||||
const STORAGE_RECENT = "web.team.storage.recent"
|
||||
const STORAGE_SERVICE = "web.team.storage.service"
|
||||
const STORAGE_SETTING = "web.team.storage.setting"
|
||||
const STORAGE_SUPPORT = "web.team.storage.support"
|
||||
|
46
src/api/common.go
Normal file
@ -0,0 +1,46 @@
|
||||
package api
|
||||
|
||||
const GONGANXITONG_USER = "web.team.gonganxitong.user"
|
||||
const GONGANXITONG_CITY = "web.team.gonganxitong.city"
|
||||
const GONGANXITONG_STREET = "web.team.gonganxitong.street"
|
||||
const GUANLIXITONG_COMPANY = "web.team.guanlixitong.company"
|
||||
|
||||
type AuthStatus int
|
||||
|
||||
const (
|
||||
AuthCreate AuthStatus = iota
|
||||
AuthRequest
|
||||
AuthIssued
|
||||
AuthRevoked
|
||||
)
|
||||
|
||||
var AuthStatusList = map[AuthStatus]string{
|
||||
AuthCreate: "create",
|
||||
AuthRequest: "request",
|
||||
AuthIssued: "issued",
|
||||
AuthRevoked: "revoked",
|
||||
}
|
||||
|
||||
func (s AuthStatus) String() string { return AuthStatusList[s] }
|
||||
|
||||
type AuthType int
|
||||
|
||||
const (
|
||||
AuthRoot AuthType = iota
|
||||
AuthCity // 1
|
||||
AuthPersonal // 2
|
||||
AuthService // 3
|
||||
AuthCompany // 4
|
||||
AuthSchool // 5
|
||||
AuthStreet // 6
|
||||
)
|
||||
|
||||
var AuthTypeList = map[AuthType]string{
|
||||
AuthRoot: "root",
|
||||
AuthCity: "city",
|
||||
AuthPersonal: "personal",
|
||||
AuthService: "service",
|
||||
AuthCompany: "company",
|
||||
AuthSchool: "school",
|
||||
AuthStreet: "street",
|
||||
}
|
@ -13,8 +13,8 @@ type allow struct {
|
||||
order string `data:"503"`
|
||||
role string `data:"leader"`
|
||||
create string `name:"create apply_uid* place_uid* user_uid* status*"`
|
||||
reject string `name:"reject" role:"void"`
|
||||
approve string `name:"approve" role:"void"`
|
||||
reject string `name:"reject" role:"leader"`
|
||||
approve string `name:"approve" role:"leader"`
|
||||
}
|
||||
|
||||
func (s allow) Create(m *ice.Message, arg ...string) {
|
||||
|
@ -2,8 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { var USER_PLACE_ROLE = msg.Option("_user_place_role")
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name, can.onimport.textView(can, value, USER_PLACE_ROLE), can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
{view: html.STATUS, list: [value.begin_time.split(" ")[0], value.end_time.split(" ")[0]]},
|
||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
] })
|
||||
},
|
||||
})
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@ -35,9 +35,7 @@ func (s apply) List(m *ice.Message, arg ...string) {
|
||||
s.AS(s.Key(s, model.ROLE), s.Keys(s.UserPlace, model.ROLE)), model.BEGIN_TIME, model.END_TIME)
|
||||
if len(arg) == 1 {
|
||||
s.Select(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID))
|
||||
if m.Length() == 0 {
|
||||
m.Action()
|
||||
}
|
||||
kit.If(m.Length() == 0, func() { m.Action() })
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID), model.UID, arg[1])
|
||||
switch ApplyStatus(kit.Int(m.Append(model.APPLY_STATUS))) {
|
||||
@ -49,10 +47,7 @@ func (s apply) List(m *ice.Message, arg ...string) {
|
||||
case ApplyRejected, ApplyApproved:
|
||||
s.DoneMessage(m)
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
s.SelectJoinUser(m)
|
||||
s.DisplayBase(m, "")
|
||||
}
|
||||
func (s apply) Cancel(m *ice.Message, arg ...string) {
|
||||
|
@ -2,14 +2,16 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { var USER_PLACE_ROLE = msg.Option("_user_place_role")
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name, can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
{view: html.STATUS, list: [value.begin_time.split(" ")[0], value.end_time.split(" ")[0]]},
|
||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
] })
|
||||
if (msg.Length() == 0) { var target = can.page.Append(can, can._output, [{view: html.CODE, list: [{view: [mdb.INFO, "", "请创建权限申请"]}]}])._target
|
||||
can.runAction({}, mdb.INPUTS, [USER_PLACE_ROLE], function(msg) { msg.Table(function(value) {
|
||||
can.onappend.input(can, {type: html.BUTTON, name: value.name, value: "我是"+can.user.trans(can, value.name, null, "value."+USER_PLACE_ROLE), style: value[USER_PLACE_ROLE] == "2"? html.DANGER: html.NOTICE, onclick: function(event) {
|
||||
can.runAction(event, mdb.CREATE, [USER_PLACE_ROLE, value[USER_PLACE_ROLE]])
|
||||
}}, "", target)
|
||||
can.onappend.input(can, {
|
||||
type: html.BUTTON, name: value.name,
|
||||
value: "我是"+can.user.trans(can, value.name, null, "value."+USER_PLACE_ROLE),
|
||||
style: value[USER_PLACE_ROLE] == "2"? html.DANGER: html.NOTICE,
|
||||
onclick: function(event) { can.runAction(event, mdb.CREATE, [USER_PLACE_ROLE, value[USER_PLACE_ROLE]]) },
|
||||
}, "", target)
|
||||
}) }), can.onappend.style(can, html.FORM)
|
||||
}
|
||||
},
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@ -9,8 +9,9 @@ import (
|
||||
|
||||
type city struct {
|
||||
Table
|
||||
list string `name:"list city_name auto" role:"void"`
|
||||
authCreate string `name:"authCreate" role:"tech"`
|
||||
order string `data:"507"`
|
||||
role string `data:"tech"`
|
||||
list string `name:"list name auto"`
|
||||
}
|
||||
|
||||
func (s user) Init(m *ice.Message, arg ...string) {
|
||||
@ -32,7 +33,19 @@ func (s city) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func (s city) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
s.Select(m).Action()
|
||||
s.Select(m)
|
||||
s.SelectJoinAuth(m)
|
||||
m.Table(func(value ice.Maps) {
|
||||
switch value[model.AUTH_STATUS] {
|
||||
case "create":
|
||||
m.PushButton(s.AuthInfo, s.AuthMember, s.AuthClean)
|
||||
case "issued":
|
||||
m.PushButton(s.AuthInfo, s.AuthMember)
|
||||
default:
|
||||
m.PushButton(s.AuthCreate, s.Delete)
|
||||
}
|
||||
}).Action()
|
||||
m.Sort("auth_status", []string{"issued", "create"})
|
||||
} else if len(arg) == 1 {
|
||||
s.SelectDetail(m, model.NAME, arg[0])
|
||||
if m.Append(model.AUTH_UID) == "" && m.IsTech() {
|
||||
@ -41,6 +54,17 @@ func (s city) List(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s city) AuthCreate(m *ice.Message, arg ...string) {
|
||||
s.Table.AuthCreate(m, 1, "", m.OptionSimple(model.NAME)...)
|
||||
s.Table.AuthCreate(m, api.AuthCity, "", m.OptionSimple(model.NAME)...)
|
||||
}
|
||||
func (s city) AuthInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID)))
|
||||
}
|
||||
func (s city) AuthMember(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(s.SpaceLink(m, "20240724-community", api.RENZHENGSHOUQUAN_PORTAL, m.Option(model.AUTH_UID), api.RENZHENGSHOUQUAN_MEMBER))
|
||||
}
|
||||
func (s city) AuthClean(m *ice.Message, arg ...string) {
|
||||
s.Update(m, ice.Map{model.AUTH_UID: ""})
|
||||
m.Cmd(api.RENZHENGSHOUQUAN_CLEAN, "prune", m.Option(model.AUTH_UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(city{}) }
|
||||
|
@ -6,72 +6,94 @@ import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type clean struct {
|
||||
Tables
|
||||
list string `name:"list place_uid uid auto" help:"清理" role:"tech"`
|
||||
order string `data:"506"`
|
||||
role string `data:"tech"`
|
||||
list string `name:"list place_uid uid auto" help:"清理" role:"tech"`
|
||||
member string `name:"member" icon:"bi bi-people"`
|
||||
prune string `name:"prune" icon:"bi bi-trash"`
|
||||
}
|
||||
|
||||
func (s clean) List(m *ice.Message, arg ...string) {
|
||||
if !m.IsTech() {
|
||||
return
|
||||
}
|
||||
m.Display("/plugin/table.js")
|
||||
if len(arg) == 0 {
|
||||
s.Tables.Tables(m, kit.Format("left join %s on %s = %s", s.TableNames(s.UserPlace), s.Key(s.UserPlace, s.Keys(s.Place, model.UID)), s.Key(s.Place, model.UID)))
|
||||
s.Fields(m, s.Key(s.Place, model.UID), s.Key(s.Place, model.CREATED_AT), s.Key(s.Place, model.NAME), "count(*) AS count", s.Key(s.UserPlace, model.USER_UID)).Groups(m, s.Key(s.Place, model.UID))
|
||||
s.Orders(m, model.COUNT, s.Key(s.Place, model.CREATED_AT)).Limit(m, 300)
|
||||
m.Cmdy(s.Place, s.Select)
|
||||
m.RenameAppend(model.UID, s.Keys(s.Place, model.UID))
|
||||
m.PushAction(s.Open, s.Member).Action()
|
||||
if s.PrefixPortal(m) == api.RENZHENGSHOUQUAN_PORTAL {
|
||||
s.Fields(m, s.Key(s.Place, model.UID), s.Key(s.Place, model.CREATED_AT), s.Key(s.Place, model.NAME), "count(*) AS count",
|
||||
model.AUTH_TYPE, model.AUTH_STATUS, s.Key(s.UserPlace, model.USER_UID))
|
||||
defer m.PushAction(s.Member, s.Open, s.Prune)
|
||||
defer m.Sort(kit.JoinFields(model.AUTH_STATUS, model.AUTH_TYPE))
|
||||
} else {
|
||||
s.Fields(m, s.Key(s.Place, model.UID), s.Key(s.Place, model.CREATED_AT), s.Key(s.Place, model.NAME), "count(*) AS count",
|
||||
model.AUTH_UID, s.Key(s.UserPlace, model.USER_UID))
|
||||
defer m.PushAction(s.Member, s.Main, s.Open, s.Prune)
|
||||
}
|
||||
s.Groups(m, s.Key(s.Place, model.UID)).Orders(m, model.COUNT, s.Key(s.Place, model.CREATED_AT)).Limit(m, 300)
|
||||
m.Cmdy(s.Place, s.Select).RenameAppend(model.UID, s.Keys(s.Place, model.UID)).Action()
|
||||
s.SelectJoinUser(m)
|
||||
s.RewriteAppend(m)
|
||||
} else if len(arg) == 1 {
|
||||
for k, h := range m.Target().Commands {
|
||||
if c, ok := m.Target().Configs[k]; !ok || kit.Value(c.Value, "meta.model") == nil {
|
||||
if s.isSkip(m, k) {
|
||||
continue
|
||||
}
|
||||
// m.Push("cmd", k)
|
||||
m.Push("uid", k)
|
||||
m.Push("name", h.Name)
|
||||
m.Push("help", h.Help)
|
||||
if k == kit.TypeName(s.Place) {
|
||||
continue
|
||||
}
|
||||
m.Push(model.UID, k)
|
||||
m.Push(model.NAME, h.Name)
|
||||
m.Push(model.INFO, h.Help)
|
||||
m.Push("actions", len(h.Actions))
|
||||
PLACE_UID := kit.Split(h.Name)[1]
|
||||
s.Fields(m, "count(*) AS count")
|
||||
msg := m.Cmd(m.Prefix(k), s.Select, PLACE_UID, arg[0])
|
||||
m.Push("count", msg.Append("count"))
|
||||
m.Push(model.COUNT, m.Cmd(m.Prefix(k), s.Fields(m, "count(*) AS count").Select, kit.Split(h.Name)[1], arg[0]).Append(model.COUNT))
|
||||
}
|
||||
m.Action(s.Prune).SortIntR("count,cmd")
|
||||
m.Action(s.Prune).SortIntR("count,uid")
|
||||
} else {
|
||||
h := m.Target().Commands[arg[1]]
|
||||
PLACE_UID := kit.Split(h.Name)[1]
|
||||
if s.Fields(m, "*"); kit.TypeName(s.Place) == arg[1] {
|
||||
m.Cmdy(m.Prefix(arg[1]), s.Select, model.UID, arg[0])
|
||||
} else {
|
||||
m.Cmdy(m.Prefix(arg[1]), s.Select, PLACE_UID, arg[0])
|
||||
h := m.Target().Commands[arg[1]]
|
||||
m.Cmdy(m.Prefix(arg[1]), s.Select, kit.Split(h.Name)[1], arg[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s clean) Member(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.MergePodCmd("", s.PrefixPortal(m), m.OptionSimple(s.Keys(s.Place, model.UID))) +
|
||||
"#" + strings.Join([]string{m.Option(s.Keys(s.Place, model.UID)), s.PrefixMember(m)}, ":"))
|
||||
}
|
||||
func (s clean) Main(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.MergePodCmd("", api.RENZHENGSHOUQUAN_CLEAN, m.OptionSimple(model.AUTH_UID)))
|
||||
}
|
||||
func (s clean) Open(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.MergePodCmd("", s.PrefixPortal(m), m.OptionSimple(s.Keys(s.Place, model.UID))))
|
||||
}
|
||||
func (s clean) Prune(m *ice.Message, arg ...string) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, m.Option(s.PLACE_UID)) })
|
||||
for k, h := range m.Target().Commands {
|
||||
if k == "service" {
|
||||
continue
|
||||
}
|
||||
if c, ok := m.Target().Configs[k]; !ok || kit.Value(c.Value, "meta.model") == nil {
|
||||
if s.isSkip(m, k) {
|
||||
continue
|
||||
}
|
||||
PLACE_UID := kit.Split(h.Name)[1]
|
||||
kit.If(k == kit.TypeName(s.Place), func() { PLACE_UID = model.UID })
|
||||
m.Cmd(m.Prefix(k), s.Exec, kit.Format("update %s set deleted_at = %q where %s = %q", s.TableName(k), m.Time(), PLACE_UID, arg[0]))
|
||||
}
|
||||
// m.Cmd(s.Prefix(m, s.Place), s.Exec, kit.Format("update %s set deleted_at = %q where %s = %q", s.TableNames(s.Place), m.Time(), model.UID, arg[0]))
|
||||
}
|
||||
func (s clean) Open(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.MergePodCmd("", s.PrefixPortal(m), m.OptionSimple(s.Keys(s.Place, model.UID))))
|
||||
}
|
||||
func (s clean) Member(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.MergePodCmd("", s.PrefixPortal(m), m.OptionSimple(s.Keys(s.Place, model.UID))) +
|
||||
"#" + strings.Join([]string{m.Option(s.Keys(s.Place, model.UID)), s.Prefix(m, member{})}, ":"))
|
||||
if m.Option(model.AUTH_UID) != "" && m.PrefixKey() != api.RENZHENGSHOUQUAN_CLEAN {
|
||||
m.Cmd(api.RENZHENGSHOUQUAN_CLEAN, m.ActionKey(), m.Option(model.AUTH_UID))
|
||||
}
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(clean{Tables: newTables()}) }
|
||||
|
||||
func (s clean) isSkip(m *ice.Message, k string) bool {
|
||||
if kit.IsIn(k, "user", "sess", "domain", "service", "command", "city", "street") {
|
||||
return true
|
||||
}
|
||||
if c, ok := m.Target().Configs[k]; !ok || kit.Value(c.Value, "meta.model") == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -42,22 +42,23 @@ type Table struct {
|
||||
Street Container
|
||||
STREET_UID string
|
||||
PLACE_UID string
|
||||
checkRole string `name:"checkRole role"`
|
||||
inputs string `name:"inputs" role:"void"`
|
||||
upload string `name:"upload" role:"worker"`
|
||||
list string `name:"list place_uid uid auto" role:"void"`
|
||||
marketInsert string `name:"marketInsert domain_uid* title* content" style:"notice" role:"leader"`
|
||||
pushPublic string `name:"pushPublic domain_uid* title* content" role:"leader"`
|
||||
memberList string `name:"memberList" role:"void"`
|
||||
noticeList string `name:"noticeList" role:"void"`
|
||||
pushPublic string `name:"pushPublic domain_uid*:select title* content price" role:"leader"`
|
||||
marketInsert string `name:"marketInsert domain_uid*:select title* content price" style:"notice" role:"leader"`
|
||||
marketPlaceInfo string `name:"marketPlaceInfo" role:"void"`
|
||||
messagePlaceInfo string `name:"messagePlaceInfo" role:"void"`
|
||||
sendMessage string `name:"sendMessage from_user_uid*:select to_user_uid*:select title* content price" style:"notice" role:"worker"`
|
||||
userInfo string `name:"userInfo" help:"用户信息" role:"void"`
|
||||
noticeList string `name:"noticeList" role:"void"`
|
||||
memberList string `name:"memberList" role:"void"`
|
||||
applyCreate string `name:"applyCreate" role:"void"`
|
||||
userInfo string `name:"userInfo" role:"void" help:"用户信息"`
|
||||
upload string `name:"upload" role:"worker"`
|
||||
checkRole string `name:"checkRole role"`
|
||||
authCreate string `name:"authCreate" help:"申请认证"`
|
||||
}
|
||||
|
||||
func (s Table) LoadTrans(m *ice.Message, arg ...string) {
|
||||
// m.Option("_iconslib", "https://img.icons8.com/officel/80/")
|
||||
p := kit.FileLine(1, 100)
|
||||
if m.PrefixKey() != api.GONGANXITONG_PORTAL {
|
||||
ice.LoadTrans(m.Spawn(kit.Dict("_template", path.Join(path.Dir(p), "portal.json"))).Message, m.CommandKey(), m.GetCommand().Command)
|
||||
@ -94,9 +95,18 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
case model.DOMAIN_UID:
|
||||
s.AutoCmdy(m, api.GONGANXITONG_DOMAIN).DisplayInputKeyNameIconTitle()
|
||||
case model.FROM_USER_UID, model.TO_USER_UID:
|
||||
m.Cmdy(s.Prefix(m, member{}), m.Option(model.PLACE_UID)).Cut(model.USER_UID, model.USER_NAME, model.USER_AVATAR)
|
||||
m.Cmdy(s.PrefixMember(m), m.Option(model.PLACE_UID)).Option("_input_args", model.USER_UID, model.USER_NAME, model.USER_AVATAR)
|
||||
s.RewriteAppend(m)
|
||||
return
|
||||
m.Cmdy(s.PrefixMember(m), m.Option(model.PLACE_UID)).Cut(model.USER_UID, model.USER_NAME, model.USER_AVATAR)
|
||||
m.RenameAppend(model.USER_UID, arg[0], model.NAME, model.USER_NAME, model.USER_AVATAR, mdb.ICONS)
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
case model.CITY_NAME:
|
||||
s.Orders(m, model.CREATED_AT)
|
||||
m.Cmdy(city{}, s.Select, "auth_uid IS NOT NULL AND auth_uid != ''").CutTo(model.NAME, model.CITY_NAME)
|
||||
case model.STREET_NAME:
|
||||
msg := m.Cmd(city{}, s.Select, model.NAME, m.Option(model.CITY_NAME))
|
||||
m.Cmdy(street{}, s.Select, "auth_uid IS NOT NULL AND auth_uid != '' AND city_uid = ?", msg.Append(model.UID)).CutTo(model.NAME, model.STREET_NAME)
|
||||
case model.RECENT_UID:
|
||||
s.InputsRecent(m)
|
||||
case model.LANGUAGE:
|
||||
@ -106,21 +116,6 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
s.Table.Inputs(m, arg...)
|
||||
}
|
||||
}
|
||||
func (s Table) InputsUID(m *ice.Message, arg []string, target ice.Any, args ...string) {
|
||||
s.Fields(m, model.UID, model.TITLE, model.USER_UID).Limit(m, 300)
|
||||
m.Cmdy(target, s.Select, args).RenameAppend(model.UID, arg[0])
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsRecent(m *ice.Message) string {
|
||||
m.Cmdy(s.PrefixRecent(m)).Option("_input_args", model.UID, model.PLACE_NAME, model.PLACE_AVATAR)
|
||||
return ""
|
||||
}
|
||||
func (s Table) InputsListCmd(m *ice.Message, target ice.Any, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
arg = append(arg, model.UID, model.NAME, model.ICON)
|
||||
}
|
||||
m.Cmdy(target, m.Option(model.PLACE_UID)).Option("_input_args", arg)
|
||||
}
|
||||
func (s Table) InputsList(m *ice.Message, list ice.Any, arg ...string) {
|
||||
it := reflect.ValueOf(list).MapRange()
|
||||
for it.Next() {
|
||||
@ -128,9 +123,6 @@ func (s Table) InputsList(m *ice.Message, list ice.Any, arg ...string) {
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsListRole(m *ice.Message, list ice.Any, arg ...string) {
|
||||
s.InputsListSkip(m, list, "1", arg...)
|
||||
}
|
||||
func (s Table) InputsListSkip(m *ice.Message, list ice.Any, skip string, arg ...string) {
|
||||
it := reflect.ValueOf(list).MapRange()
|
||||
for it.Next() {
|
||||
@ -140,6 +132,9 @@ func (s Table) InputsListSkip(m *ice.Message, list ice.Any, skip string, arg ...
|
||||
}
|
||||
m.SortInt(arg[0]).DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsListRole(m *ice.Message, list ice.Any, arg ...string) {
|
||||
s.InputsListSkip(m, list, "1", arg...)
|
||||
}
|
||||
func (s Table) InputsListValue(m *ice.Message, list ice.Any, key string) string {
|
||||
k, e := strconv.ParseInt(key, 10, 64)
|
||||
if e != nil {
|
||||
@ -153,14 +148,18 @@ func (s Table) InputsListValue(m *ice.Message, list ice.Any, key string) string
|
||||
}
|
||||
return ""
|
||||
}
|
||||
func (s Table) TransPrice(m *ice.Message, arg []string, field ...string) []string {
|
||||
kit.If(len(field) == 0, func() { field = append(field, "price", "amount") })
|
||||
for i := 0; i < len(arg)-1; i += 2 {
|
||||
if kit.IndexOf(field, arg[i]) > -1 {
|
||||
arg[i+1] = kit.Format(kit.Int(kit.Float(arg[i+1]) * 100))
|
||||
}
|
||||
}
|
||||
return arg
|
||||
func (s Table) InputsListCmd(m *ice.Message, target ice.Any, arg ...string) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.UID, model.NAME, model.ICON) })
|
||||
m.Cmdy(target, m.Option(model.PLACE_UID)).Option("_input_args", arg)
|
||||
}
|
||||
func (s Table) InputsUID(m *ice.Message, arg []string, target ice.Any, args ...string) {
|
||||
s.Fields(m, model.UID, model.TITLE, model.USER_UID).Limit(m, 300)
|
||||
m.Cmdy(target, s.Select, args).RenameAppend(model.UID, arg[0])
|
||||
m.DisplayInputKeyNameIconTitle()
|
||||
}
|
||||
func (s Table) InputsRecent(m *ice.Message) string {
|
||||
m.Cmdy(s.PrefixRecent(m)).Option("_input_args", model.UID, model.PLACE_NAME, model.PLACE_AVATAR)
|
||||
return ""
|
||||
}
|
||||
func (s Table) ValueModel(m *ice.Message, action ice.Any, arg ...string) *ice.Message {
|
||||
defer m.Options(db.DB, m.Configv(db.DB)).Set(ice.MSG_OPTION, db.DB)
|
||||
@ -175,15 +174,15 @@ func (s Table) ValueCreate(m *ice.Message, arg ...string) {
|
||||
s.RecordEventWithName(m, "")
|
||||
s.UserPlaceInit(m)
|
||||
}
|
||||
func (s Table) ValueRemove(m *ice.Message, arg ...string) {
|
||||
s.ValueModel(m, s.ValueRemove, arg...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s Table) ValueModify(m *ice.Message, arg ...string) {
|
||||
s.TransPrice(m, arg)
|
||||
s.ValueModel(m, s.ValueModify, arg...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s Table) ValueRemove(m *ice.Message, arg ...string) {
|
||||
s.ValueModel(m, s.ValueRemove, arg...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.Message {
|
||||
if len(arg) > 0 {
|
||||
kit.If(len(fields) == 0, func() { fields = kit.TransArgs(kit.Split(m.Config(mdb.FIELDS), ",", ",")) })
|
||||
@ -199,110 +198,11 @@ func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.M
|
||||
return value
|
||||
})
|
||||
return m
|
||||
// return s.SelectJoinUser(m)
|
||||
}
|
||||
func (s Table) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s Table) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s Table) Modify(m *ice.Message, arg ...string) { s.ValueModify(m, arg...) }
|
||||
func (s Table) List(m *ice.Message, arg ...string) *ice.Message {
|
||||
return s.ValueList(m, arg)
|
||||
}
|
||||
func (s Table) FieldsDefault(m *ice.Message, arg ...string) Table {
|
||||
if m.Option(mdb.SELECT) == "" {
|
||||
if fields := m.Config(mdb.FIELDS); fields != "" {
|
||||
s.Table.FieldsWithCreatedAT(m, kit.Select(m.CommandKey(), m.Config(db.MODELS)), kit.TransArgs(kit.Split(fields, ",", ","))...)
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
func (s Table) LeftJoinValue(m *ice.Message, value, place ice.Any, arg ...string) string {
|
||||
model := s.ToLower(kit.TypeName(value))
|
||||
models := s.TableName(model)
|
||||
_model := s.ToLower(kit.TypeName(place))
|
||||
_models := s.TableName(_model)
|
||||
return kit.Format("LEFT JOIN %s ON %s.%s_uid = %s.uid AND %s.user_uid = '%s'", models, models, _model, _models, models, m.Option("user_uid"))
|
||||
}
|
||||
func (s Table) Select(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.FieldsDefault(m).Table.Select(m, arg...)
|
||||
kit.If(m.Length() > 0, func() { s.UserPlaceInit(m) })
|
||||
return m
|
||||
}
|
||||
func (s Table) InsertIfNeed(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Cmd("", s.Select, arg).Length() == 0, func() { m.Cmd("", s.Insert, arg) })
|
||||
}
|
||||
func (s Table) InsertOrUpdate(m *ice.Message, arg []string, args ...string) {
|
||||
if s.Select(m, args...).Length() > 0 {
|
||||
s.Update(m, arg, args...)
|
||||
} else {
|
||||
s.Insert(m, arg...)
|
||||
}
|
||||
}
|
||||
func (s Table) SelectDetail(m *ice.Message, arg ...string) *ice.Message {
|
||||
return s.FieldsDefault(m).Table.SelectDetail(m, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinUser(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AVATAR) })
|
||||
if len(m.Appendv(model.USER_UID)) == 0 {
|
||||
return m
|
||||
}
|
||||
return s.SelectJoin(m, user{}, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinCity(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME) })
|
||||
return s.SelectJoin(m, city{}, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinAuth(m *ice.Message, arg ...string) *ice.Message {
|
||||
if kit.IndexOf(m.Appendv(model.AUTH_TYPE), model.AUTH_TYPE) > -1 {
|
||||
return m
|
||||
}
|
||||
kit.If(len(arg) == 0, func() {
|
||||
arg = append(arg, model.NAME, model.INFO, model.TYPE, model.STATUS, model.AVATAR, model.BACKGROUND, model.DASHBOARD_UID)
|
||||
})
|
||||
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
|
||||
return s.SelectJoin(m, s.findSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), arg...)
|
||||
}
|
||||
func (s Table) SelectJoinSess(m *ice.Message, arg ...string) *ice.Message {
|
||||
UID, TARGET_UID := model.USER_UID, model.USER_UID
|
||||
target := sess{}
|
||||
if m.Length() == 0 {
|
||||
return m
|
||||
}
|
||||
list := []string{}
|
||||
m.Table(func(value ice.Maps) { list = kit.AddUniq(list, value[UID]) })
|
||||
msg := m.Spawn()
|
||||
arg = kit.Split("agent,system,ip,location,ua")
|
||||
s.Fields(msg, append(arg, TARGET_UID))
|
||||
s.Orders(msg, s.Desc(model.CREATED_AT))
|
||||
s.Groups(msg, TARGET_UID)
|
||||
s.Limit(msg, 3000)
|
||||
data := msg.CmdMap(target, s.SelectList, TARGET_UID, list, TARGET_UID)
|
||||
m.Table(func(value ice.Maps) {
|
||||
recent := data[value[TARGET_UID]]
|
||||
kit.For(arg, func(k string) { m.Push(k, recent[k]) })
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (s Table) SelectJoinRecent(m *ice.Message, PLACE_UID string, arg ...string) *ice.Message {
|
||||
PLACE_UID = kit.Select(model.PLACE_UID, PLACE_UID)
|
||||
if m.Length() == 0 {
|
||||
return m
|
||||
}
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.CITY_NAME, model.STREET_NAME, model.PLACE_NAME) })
|
||||
list := []string{}
|
||||
m.Table(func(value ice.Maps) { kit.If(value[PLACE_UID], func(v string) { list = kit.AddUniq(list, v) }) })
|
||||
msg := m.Spawn()
|
||||
s.Fields(msg, kit.JoinFields("DISTINCT place_uid", kit.JoinFields(arg...)))
|
||||
recents := msg.CmdMap(recent{}, s.SelectList, model.PLACE_UID, list, model.PLACE_UID)
|
||||
m.Table(func(value ice.Maps) {
|
||||
recent := recents[value[PLACE_UID]]
|
||||
kit.For(arg, func(k string) { m.Push(k, recent[k]) })
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (s Table) SelectJoinService(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NODENAME, model.INDEX, model.NAME, model.ICON) })
|
||||
return s.SelectJoin(m, service{}, arg...)
|
||||
}
|
||||
func (s Table) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) }
|
||||
func (s Table) Modify(m *ice.Message, arg ...string) { s.ValueModify(m, arg...) }
|
||||
func (s Table) Remove(m *ice.Message, arg ...string) { s.ValueRemove(m, arg...) }
|
||||
func (s Table) List(m *ice.Message, arg ...string) *ice.Message { return s.ValueList(m, arg) }
|
||||
func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
if value != "" && kit.IsIn(key, model.BACKGROUND, model.AVATAR) {
|
||||
@ -318,6 +218,8 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
value = MemberStatus(kit.Int(value)).String()
|
||||
case model.PLACE_TYPE:
|
||||
value = PlaceType(kit.Int(value)).String()
|
||||
case model.AUTH_TYPE:
|
||||
value = AuthType(kit.Int(value)).String()
|
||||
case model.AUTH_STATUS:
|
||||
value = AuthStatus(kit.Int(value)).String()
|
||||
case model.APPLY_STATUS:
|
||||
@ -328,8 +230,6 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
value = MessageStatus(kit.Int(value)).String()
|
||||
case model.SERVICE_STATUS:
|
||||
value = ServiceStatus(kit.Int(value)).String()
|
||||
case model.PAYMENTLIST_STATUS:
|
||||
value = PaymentStatus(kit.Int(value)).String()
|
||||
case model.PRICE, model.AMOUNT:
|
||||
value = kit.Format("%.2f", kit.Float(value)/100)
|
||||
}
|
||||
@ -337,17 +237,73 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (s Table) OtherListCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
kit.If(m.FieldsIsDetail() && m.Length() > 0 && s.IsWorker(m), func() { m.Option("otherList", kit.Fields(arg...)) })
|
||||
func (s Table) Select(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.FieldsDefault(m).Table.Select(m, arg...)
|
||||
kit.If(m.Length() > 0, func() { s.UserPlaceInit(m) })
|
||||
return m
|
||||
}
|
||||
func (s Table) OtherList(m *ice.Message, target ice.Any, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
arg = append(arg, m.CommandKey()+"_uid", m.Option(model.UID))
|
||||
func (s Table) SelectDetail(m *ice.Message, arg ...string) *ice.Message {
|
||||
return s.FieldsDefault(m).Table.SelectDetail(m, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinCity(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME) })
|
||||
return s.SelectJoin(m, city{}, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinUser(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AVATAR) })
|
||||
if len(m.Appendv(model.USER_UID)) == 0 {
|
||||
return m
|
||||
}
|
||||
m.Cmdy(target, s.Select, arg)
|
||||
// s.Display(m, kit.Select("", strings.Split(ice.GetTypeKey(target), "."), -1)+".js")
|
||||
m.Option("_other_cmd", ice.GetTypeKey(target))
|
||||
return s.SelectJoin(m, user{}, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinAuth(m *ice.Message, arg ...string) *ice.Message {
|
||||
if kit.IndexOf(m.Appendv(model.AUTH_TYPE), model.AUTH_TYPE) > -1 {
|
||||
return m
|
||||
}
|
||||
kit.If(len(arg) == 0, func() {
|
||||
arg = append(arg, model.NAME, model.INFO, model.TYPE, model.STATUS, model.AVATAR, model.BACKGROUND, model.DASHBOARD_UID)
|
||||
})
|
||||
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
|
||||
return s.SelectJoin(m, s.findSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), arg...)
|
||||
}
|
||||
func (s Table) SelectJoinSess(m *ice.Message, arg ...string) *ice.Message {
|
||||
if m.Length() == 0 {
|
||||
return m
|
||||
}
|
||||
UID, TARGET_UID := model.USER_UID, model.USER_UID
|
||||
target := sess{}
|
||||
list := []string{}
|
||||
m.Table(func(value ice.Maps) { list = kit.AddUniq(list, value[UID]) })
|
||||
msg := m.Spawn()
|
||||
arg = kit.Split("agent,system,ip,location,ua")
|
||||
s.Fields(msg, append(arg, TARGET_UID)).Orders(msg, s.Desc(model.CREATED_AT)).Groups(msg, TARGET_UID).Limit(msg, 3000)
|
||||
data := msg.CmdMap(target, s.SelectList, TARGET_UID, list, TARGET_UID)
|
||||
m.Table(func(value ice.Maps) {
|
||||
recent := data[value[TARGET_UID]]
|
||||
kit.For(arg, func(k string) { m.Push(k, recent[k]) })
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (s Table) SelectJoinService(m *ice.Message, arg ...string) *ice.Message {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NODENAME, model.INDEX, model.NAME, model.ICON) })
|
||||
return s.SelectJoin(m, service{}, arg...)
|
||||
}
|
||||
func (s Table) SelectJoinRecent(m *ice.Message, PLACE_UID string, arg ...string) *ice.Message {
|
||||
if m.Length() == 0 {
|
||||
return m
|
||||
}
|
||||
PLACE_UID = kit.Select(model.PLACE_UID, PLACE_UID)
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.CITY_NAME, model.STREET_NAME, model.PLACE_NAME) })
|
||||
list := []string{}
|
||||
m.Table(func(value ice.Maps) { kit.If(value[PLACE_UID], func(v string) { list = kit.AddUniq(list, v) }) })
|
||||
msg := m.Spawn()
|
||||
s.Fields(msg, kit.JoinFields("DISTINCT place_uid", kit.JoinFields(arg...)))
|
||||
recents := msg.CmdMap(recent{}, s.SelectList, model.PLACE_UID, list, model.PLACE_UID)
|
||||
m.Table(func(value ice.Maps) {
|
||||
recent := recents[value[PLACE_UID]]
|
||||
kit.For(arg, func(k string) { m.Push(k, recent[k]) })
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (s Table) Update(m *ice.Message, data ice.Any, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
@ -364,12 +320,12 @@ func (s Table) UpdateField(m *ice.Message, arg ...string) {
|
||||
func (s Table) Upload(m *ice.Message, arg ...string) {
|
||||
m.Echo(m.Resource(m.UploadSaveHash("usr/image/")))
|
||||
}
|
||||
func (s Table) UploadUpdate(m *ice.Message, field, uid string, arg ...string) {
|
||||
func (s Table) UploadUpdate(m *ice.Message, field, uid string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
p := m.UploadSave(path.Join(nfs.USR, kit.Select(field, m.Option(model.FIELD)), uid) + nfs.PS)
|
||||
s.Update(m, kit.Dict(kit.Select(m.Option(model.FIELD), field), p), model.UID, uid)
|
||||
p := m.UploadSaveHash(path.Join(nfs.USR, kit.Select(field, m.Option(model.FIELD))) + nfs.PS)
|
||||
s.Update(m, kit.Dict(kit.Select(m.Option(model.FIELD), field), m.Resource(p)), model.UID, uid)
|
||||
}
|
||||
func (s Table) UploadCreate(m *ice.Message, field, uid string, arg ...string) string {
|
||||
if m.IsErr() {
|
||||
@ -379,6 +335,16 @@ func (s Table) UploadCreate(m *ice.Message, field, uid string, arg ...string) st
|
||||
s.Create(m, kit.Select(m.Option(model.FIELD), field), p, model.UID, uid, model.USER_UID, m.Option(model.USER_UID))
|
||||
return p
|
||||
}
|
||||
func (s Table) InsertOrUpdate(m *ice.Message, arg []string, args ...string) {
|
||||
if s.Select(m, args...).Length() > 0 {
|
||||
s.Update(m, arg, args...)
|
||||
} else {
|
||||
s.Insert(m, arg...)
|
||||
}
|
||||
}
|
||||
func (s Table) InsertIfNeed(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Cmd("", s.Select, arg).Length() == 0, func() { m.Cmd("", s.Insert, arg) })
|
||||
}
|
||||
func (s Table) ChangeStatus(m *ice.Message, place_uid, uid string, from, to int, arg ...string) *ice.Message {
|
||||
msg := s.ValueList(m.Spawn(), []string{place_uid, uid}, model.STATUS)
|
||||
if !m.WarnNotValid(msg.Length() == 0 || from != kit.Int(msg.Append(mdb.STATUS)), kit.Format("%v != %v", from, kit.Int(msg.Append(mdb.STATUS)))) {
|
||||
@ -386,172 +352,76 @@ func (s Table) ChangeStatus(m *ice.Message, place_uid, uid string, from, to int,
|
||||
}
|
||||
return m
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) {
|
||||
role := UserPlaceRole(s.UserPlaceRole(m))
|
||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserPlaceCreator.String())...), role.String())
|
||||
}
|
||||
func (s Table) IsVisitor(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 0 {
|
||||
return true
|
||||
func (s Table) TargetAddCount(m *ice.Message, target ice.Any, arg ...string) Table {
|
||||
if !m.IsErr() {
|
||||
m.Cmd(target, s.AddCount, kit.Select(s.Keys(m.CommandKey(), model.COUNT), arg, 0), kit.Select("-1", "1", m.ActionKey() == mdb.CREATE), m.Option(s.Keys(target, model.UID)))
|
||||
}
|
||||
return false
|
||||
return s
|
||||
}
|
||||
func (s Table) IsCreator(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) IsLeader(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 || role == 2 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) IsWorker(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 || role == 2 || role == 3 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) UserPlaceRole(m *ice.Message) int {
|
||||
return kit.Int(m.Cmdy(s.PrefixPortal(m), s.UserPlaceRole).Option(model.USER_ROLE))
|
||||
}
|
||||
func (s Table) UserPlaceInit(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.PLACE_INIT) == "" || m.PrefixKey() != m.Option(ice.MSG_INDEX) {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.PrefixPortal(m), Portal{}.PlaceCmd, "addCount", model.INIT, 1, m.Option(model.PLACE_UID), m.Option(model.PLACE_INIT))
|
||||
}
|
||||
func (s Table) RecordEvent(m *ice.Message, info string, arg ...string) {
|
||||
m.Cmd(s.PrefixPortal(m), s.RecordEvent, info, arg)
|
||||
}
|
||||
func (s Table) RecordEventWithName(m *ice.Message, info string, arg ...string) {
|
||||
uid := kit.Select(m.Result(), m.Option(model.UID))
|
||||
kit.If(info == "", func() {
|
||||
switch info = m.ActionCmdTitle(); m.ActionKey() {
|
||||
case "placeCreate", mdb.CREATE:
|
||||
info = "✅ " + info
|
||||
case "placeRemove", mdb.REMOVE:
|
||||
info = "❌ " + info
|
||||
case "placeAuth", mdb.MODIFY:
|
||||
info = "🕑 " + info
|
||||
default:
|
||||
info = "🕑 " + info
|
||||
func (s Table) FieldsDefault(m *ice.Message, arg ...string) Table {
|
||||
if m.Option(mdb.SELECT) == "" {
|
||||
if fields := m.Config(mdb.FIELDS); fields != "" {
|
||||
s.Table.FieldsWithCreatedAT(m, kit.Select(m.CommandKey(), m.Config(db.MODELS)), kit.TransArgs(kit.Split(fields, ",", ","))...)
|
||||
}
|
||||
})
|
||||
s.RecordEvent(m, kit.JoinWord(info, kit.Cut(uid, 6), kit.Select(m.Option(model.NAME), m.Option(model.TITLE))), uid)
|
||||
}
|
||||
return s
|
||||
}
|
||||
func (s Table) MemberList(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Prefix(m, member{}), arg)
|
||||
func (s Table) LeftJoinValue(m *ice.Message, value, place ice.Any, arg ...string) string {
|
||||
model := s.ToLower(kit.TypeName(value))
|
||||
models := s.TableName(model)
|
||||
_model := s.ToLower(kit.TypeName(place))
|
||||
_models := s.TableName(_model)
|
||||
return kit.Format("LEFT JOIN %s ON %s.%s_uid = %s.uid AND %s.user_uid = '%s'", models, models, _model, _models, models, m.Option("user_uid"))
|
||||
}
|
||||
func (s Table) CityList(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.Cmdy(city{}, arg).RenameAppend(model.NAME, model.CITY_NAME)
|
||||
return m
|
||||
}
|
||||
func (s Table) CityCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmd(append([]ice.Any{city{}}, arg...)...)
|
||||
}
|
||||
func (s Table) CreditCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmdy(append([]ice.Any{s.Prefix(m, credit{})}, arg...)...)
|
||||
}
|
||||
func (s Table) SettingCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmdy(append([]ice.Any{s.Prefix(m, setting{})}, arg...)...)
|
||||
}
|
||||
func (s Table) AuthCreate(m *ice.Message, authType int, fromUID string, arg ...string) {
|
||||
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_PORTAL, Portal{}.PlaceCreate,
|
||||
model.AUTH_NAME, m.Option(model.NAME), model.AUTH_INFO, m.Option(model.INFO),
|
||||
model.AUTH_TYPE, authType, model.FROM_UID, kit.Select(ice.AUTO, fromUID),
|
||||
model.SERVICE_UID, m.Option(model.SERVICE_UID),
|
||||
)
|
||||
s.Update(m, kit.Dict(m.OptionSimple(model.AUTH_UID)), arg...)
|
||||
}
|
||||
func (s Table) SpideCreate(m *ice.Message, arg ...string) {
|
||||
m.Cmd(web.SPIDE, mdb.CREATE, arg)
|
||||
}
|
||||
func (s Table) PlaceIsAuthed(m *ice.Message, arg ...string) *ice.Message {
|
||||
if msg := m.Cmd(s.Place, s.Select, model.UID, arg[0]); msg.Append(model.AUTH_UID) == "" {
|
||||
m.Echo("本服务暂未申请认证,请到<用户名片>申请认证")
|
||||
return nil
|
||||
} else if m.Cmd(api.RENZHENGSHOUQUAN_AUTH, s.Select, model.UID, msg.Append(model.AUTH_UID)).Append(model.AUTH_STATUS) != "2" {
|
||||
m.Echo("本服务认证申请中,请等待审批")
|
||||
return nil
|
||||
func (s Table) TransValue(m *ice.Message, key string, arg ...string) string {
|
||||
if value := kit.Select(m.Option(key), arg, 0); m.IsEnglish() {
|
||||
return value
|
||||
} else {
|
||||
return msg
|
||||
return kit.Select(value, kit.Value(m.Target().Commands[m.CommandKey()].Meta, "_trans.value."+key+"."+value))
|
||||
}
|
||||
}
|
||||
func (s Table) StreetAuthUID(m *ice.Message, arg ...string) string {
|
||||
if msg := s.PlaceIsAuthed(m, arg...); msg != nil {
|
||||
return m.Cmd(s.Street, s.Select, model.UID, msg.Append(s.STREET_UID)).Append(model.AUTH_UID)
|
||||
func (s Table) TransRole(m *ice.Message, arg ...string) string {
|
||||
value := kit.Select(m.Option(s.Keys(s.UserPlace, model.ROLE)), arg, 0)
|
||||
role := s.Place.TransValue(m, s.Keys(s.UserPlace, model.ROLE), arg...)
|
||||
return kit.Format(`<span class="role %s %s">%s</span>`, value, kit.Select("", arg, 1), role)
|
||||
}
|
||||
func (s Table) TransPrice(m *ice.Message, arg []string, field ...string) []string {
|
||||
kit.If(len(field) == 0, func() { field = append(field, "price", "amount") })
|
||||
for i := 0; i < len(arg)-1; i += 2 {
|
||||
if kit.IndexOf(field, arg[i]) > -1 {
|
||||
arg[i+1] = kit.Format(kit.Int(kit.Float(arg[i+1]) * 100))
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
func (s Table) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.Prefix(m, Portal{}), s.DashboardUpdate)
|
||||
}
|
||||
func (s Table) MessagePlaceEnter(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(message{}, "placeEnter", arg)
|
||||
}
|
||||
func (s Table) MessagePlaceInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(message{}, "placeInfo", arg)
|
||||
}
|
||||
func (s Table) MarketPlaceEnter(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(market{}, "placeEnter", arg)
|
||||
}
|
||||
func (s Table) MarketPlaceInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(market{}, "placeInfo", arg)
|
||||
}
|
||||
func (s Table) MarketInsert(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Prefix(m, Portal{}), s.MarketInsert, arg)
|
||||
}
|
||||
func (s Table) PushPublic(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Prefix(m, Portal{}), s.PushPublic, arg)
|
||||
}
|
||||
func (s Table) ServiceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
return m.Cmd(s.Prefix(m, service{}), arg)
|
||||
}
|
||||
func (s Table) GetCommandUID(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.Option(model.COMMAND_UID, CommandUID(m, kit.Select(m.PrefixKey(), arg, 0)))
|
||||
return m
|
||||
}
|
||||
func (s Table) SendMessage(m *ice.Message, from, to string, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, m.Option(model.PLACE_UID), kit.Select(m.Option(model.UID), m.Result())) })
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.Prefix(m, message{}), s.Create,
|
||||
model.FROM_USER_UID, kit.Select(m.Option(model.USER_UID), from), model.TO_USER_UID, kit.Select(m.Option(model.USER_UID), to),
|
||||
m.OptionSimple(model.COMMAND_UID), model.ARGS, kit.Join(arg), m.OptionSimple(model.TITLE, model.CONTENT),
|
||||
)
|
||||
}
|
||||
func (s Table) DoneMessage(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.MESSAGE_UID) != "" {
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.Prefix(m, message{}), message{}.Done, kit.Dict(model.UID, m.Option(model.MESSAGE_UID)))
|
||||
}
|
||||
}
|
||||
func (s Table) SendTemplate(m *ice.Message, from, to, title string, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.PrefixPortal(m), s.SendTemplate, m.PrefixKey(), from, to, title, arg)
|
||||
}
|
||||
func (s Portal) SendTemplate(m *ice.Message, arg ...string) {
|
||||
name := kit.Select("", arg, 4)
|
||||
if name == "" {
|
||||
name = kit.JoinWord(m.Option(model.CITY_NAME), m.Option(model.STREET_NAME), kit.Select(m.Option(model.PLACE_NAME), m.Option(s.Keys(s.Place, model.NAME))))
|
||||
}
|
||||
uid, place_uid := kit.Select(m.Option(model.UID), arg, 5), kit.Select("", arg, 6)
|
||||
kit.If(place_uid == "", func() { place_uid = m.Option(s.Keys(s.Place, model.UID)) })
|
||||
link := m.Cmdx("", s.Link, place_uid, arg[0], uid)
|
||||
s.AutoCmd(m, user{}, s.SendTemplate, arg[1], arg[2], link, kit.JoinWord(m.Option(model.PORTAL_NAME), arg[3]), name, kit.Cut(uid, 6))
|
||||
return arg
|
||||
}
|
||||
func (s Table) Button(m *ice.Message, info string, arg ...ice.Any) *ice.Message {
|
||||
kit.If(!m.IsErr() && m.Length() == 0, func() { m.Options(ctx.STYLE, html.FORM).EchoInfoButton(info, arg...).Action() }, func() { m.Action(arg...) })
|
||||
return m
|
||||
}
|
||||
func (s Table) EchoQRCodeIcon(m *ice.Message, link, icon, title string) {
|
||||
m.EchoQRCode(link).Echo(title).EchoImages(icon, "32", "avatar")
|
||||
}
|
||||
func (s Table) Link(m *ice.Message, arg ...string) string {
|
||||
return m.Cmdx(s.PrefixPortal(m), s.Link, arg)
|
||||
}
|
||||
func (s Table) WaitWorkerCreate(m *ice.Message, help string) {
|
||||
kit.If(!s.IsWorker(m), func() {
|
||||
kit.If(m.Action().Length() == 0, func() { m.SetResult("请等待「工作人员」创建" + help) })
|
||||
})
|
||||
}
|
||||
func (s Table) WaitLeaderCreate(m *ice.Message, help string) {
|
||||
kit.If(!s.IsLeader(m), func() {
|
||||
kit.If(m.Action().Length() == 0, func() { m.SetResult("请等待「管理人员」创建" + help) })
|
||||
})
|
||||
}
|
||||
func (s Table) OtherListCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
kit.If(m.FieldsIsDetail() && m.Length() > 0 && s.IsWorker(m), func() { m.Option("otherList", kit.Fields(arg...)) })
|
||||
return m
|
||||
}
|
||||
func (s Table) OtherList(m *ice.Message, target ice.Any, arg ...string) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, m.CommandKey()+"_uid", m.Option(model.UID)) })
|
||||
m.Cmdy(target, s.Select, arg).Option("_other_cmd", ice.GetTypeKey(target))
|
||||
}
|
||||
func (s Table) DisplayBase(m *ice.Message, file string) *ice.Message {
|
||||
if s.Place != nil {
|
||||
m.Option("_place_uid", s.ToLower(kit.TypeName(s.Place))+"_uid")
|
||||
@ -583,61 +453,8 @@ func (s Table) Display(m *ice.Message, file string) *ice.Message {
|
||||
return file
|
||||
})))
|
||||
}
|
||||
func (s Table) TransValue(m *ice.Message, key string, arg ...string) string {
|
||||
if value := kit.Select(m.Option(key), arg, 0); m.IsEnglish() {
|
||||
return value
|
||||
} else {
|
||||
return kit.Select(value, kit.Value(m.Target().Commands[m.CommandKey()].Meta, "_trans.value."+key+"."+value))
|
||||
}
|
||||
}
|
||||
func (s Table) TransRole(m *ice.Message, arg ...string) string {
|
||||
value := kit.Select(m.Option(s.Keys(s.UserPlace, model.ROLE)), arg, 0)
|
||||
role := s.Place.TransValue(m, s.Keys(s.UserPlace, model.ROLE), arg...)
|
||||
return kit.Format(`<span class="role %s %s">%s</span>`, value, kit.Select("", arg, 1), role)
|
||||
}
|
||||
|
||||
func (s Table) Prefix(m *ice.Message, target ice.Any) string { return m.Prefix(kit.TypeName(target)) }
|
||||
func (s Table) PrefixPortal(m *ice.Message) string { return m.Prefix(kit.TypeName(Portal{})) }
|
||||
func (s Table) PrefixMember(m *ice.Message) string { return m.Prefix(kit.TypeName(member{})) }
|
||||
func (s Table) PrefixRecent(m *ice.Message) string { return m.Prefix(kit.TypeName(recent{})) }
|
||||
func (s Table) PrefixService(m *ice.Message) string { return m.Prefix(kit.TypeName(service{})) }
|
||||
|
||||
func (s Table) findSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
|
||||
cmds := ice.GetTypeKey(cmd)
|
||||
if space, ok := cmdSpace[cmds]; ok && space != ice.Info.NodeName {
|
||||
m.Options(ice.MSG_USERROLE, aaa.TECH, ice.MSG_USERPOD, space)
|
||||
return []string{web.SPACE, kit.Keys(ice.OPS, space), cmds}
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
func (s Table) SaveBack(m *ice.Message, arg ...string) func() {
|
||||
list := []string{}
|
||||
kit.For(arg, func(k string) { list = append(list, m.Option(k)) })
|
||||
return func() {
|
||||
kit.For(arg, func(i int, k string) { m.Option(k, list[i]) })
|
||||
}
|
||||
}
|
||||
func (s Table) TargetAddCount(m *ice.Message, target ice.Any, arg ...string) Table {
|
||||
if !m.IsErr() {
|
||||
m.Cmd(target, s.AddCount, kit.Select(s.Keys(m.CommandKey(), model.COUNT), arg, 0), kit.Select("-1", "1", m.ActionKey() == mdb.CREATE), m.Option(s.Keys(target, model.UID)))
|
||||
}
|
||||
return s
|
||||
}
|
||||
func (s Table) WaitWorkerCreate(m *ice.Message, help string) {
|
||||
kit.If(!s.IsWorker(m), func() {
|
||||
kit.If(m.Action().Length() == 0, func() { m.SetResult("请等待「工作人员」创建" + help) })
|
||||
})
|
||||
}
|
||||
func (s Table) WaitLeaderCreate(m *ice.Message, help string) {
|
||||
kit.If(!s.IsLeader(m), func() {
|
||||
kit.If(m.Action().Length() == 0, func() { m.SetResult("请等待「管理人员」创建" + help) })
|
||||
})
|
||||
}
|
||||
func (s Table) EchoQRCodeIcon(m *ice.Message, link, icon, title string) {
|
||||
m.EchoQRCode(link).Echo(title).EchoImages(icon, "32", "avatar")
|
||||
}
|
||||
func (s Table) SpaceLink(m *ice.Message, space, index string, arg ...string) string {
|
||||
return m.Cmdx(web.SPACE, space, index, s.Link, arg, ice.Maps{ice.MSG_USERPOD: space, ice.MSG_USERROLE: aaa.TECH})
|
||||
func (s Table) SpideCreate(m *ice.Message, arg ...string) {
|
||||
m.Cmd(web.SPIDE, mdb.CREATE, arg)
|
||||
}
|
||||
func (s Table) SpaceOpsCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return s.SpaceCmdy(m, ice.OPS, arg...)
|
||||
@ -645,6 +462,9 @@ func (s Table) SpaceOpsCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
func (s Table) SpaceOpsCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return s.SpaceCmd(m, ice.OPS, arg...)
|
||||
}
|
||||
func (s Table) SpaceLink(m *ice.Message, space, index string, arg ...string) string {
|
||||
return m.Cmdx(web.SPACE, space, index, s.Link, arg, ice.Maps{ice.MSG_USERPOD: space, ice.MSG_USERROLE: aaa.TECH})
|
||||
}
|
||||
func (s Table) SpaceCmdy(m *ice.Message, space string, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmdy(append([]ice.Any{web.SPACE, space, kit.Dict(ice.MSG_USERROLE, aaa.TECH)}, arg...)...)
|
||||
}
|
||||
@ -658,14 +478,207 @@ func (s Table) AutoCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
func (s Table) AutoCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmd(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
|
||||
}
|
||||
func (s Table) SaveBack(m *ice.Message, arg ...string) func() {
|
||||
list := []string{}
|
||||
kit.For(arg, func(k string) { list = append(list, m.Option(k)) })
|
||||
return func() {
|
||||
kit.For(arg, func(i int, k string) { m.Option(k, list[i]) })
|
||||
}
|
||||
}
|
||||
func (s Table) findSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
|
||||
cmds := ice.GetTypeKey(cmd)
|
||||
if space, ok := cmdSpace[cmds]; ok && space != ice.Info.NodeName {
|
||||
m.Options(ice.MSG_USERROLE, aaa.TECH, ice.MSG_USERPOD, space)
|
||||
return []string{web.SPACE, kit.Keys(ice.OPS, space), cmds}
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (s Table) DashboardUpdate(m *ice.Message, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.PrefixPortal(m), s.DashboardUpdate)
|
||||
}
|
||||
func (s Table) UserPlaceInit(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.PLACE_INIT) == "" || m.PrefixKey() != m.Option(ice.MSG_INDEX) {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.PrefixPortal(m), Portal{}.PlaceCmd, "addCount", model.INIT, 1, m.Option(model.PLACE_UID), m.Option(model.PLACE_INIT))
|
||||
}
|
||||
func (s Table) CityList(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.Cmdy(city{}, arg).RenameAppend(model.NAME, model.CITY_NAME)
|
||||
return m
|
||||
}
|
||||
func (s Table) CityCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmd(append([]ice.Any{city{}}, arg...)...)
|
||||
}
|
||||
func (s Table) CreditCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmdy(append([]ice.Any{s.Prefix(m, credit{})}, arg...)...)
|
||||
}
|
||||
func (s Table) AuthCreate(m *ice.Message, authType api.AuthType, fromUID string, arg ...string) {
|
||||
s.AutoCmdy(m, api.RENZHENGSHOUQUAN_PORTAL, Portal{}.PlaceCreate,
|
||||
model.AUTH_NAME, m.Option(model.NAME), model.AUTH_INFO, m.Option(model.INFO),
|
||||
model.AUTH_TYPE, authType, model.FROM_UID, kit.Select(ice.AUTO, fromUID),
|
||||
model.SERVICE_UID, m.Option(model.SERVICE_UID),
|
||||
model.PLACE_UID, m.Option(model.PLACE_UID),
|
||||
model.VALUE_UID, m.Option(model.UID),
|
||||
)
|
||||
s.Update(m, kit.Dict(m.OptionSimple(model.AUTH_UID)), arg...)
|
||||
}
|
||||
func (s Table) PlaceIsAuthed(m *ice.Message, arg ...string) *ice.Message {
|
||||
if msg := m.Cmd(s.Place, s.Select, model.UID, arg[0]); msg.Append(model.AUTH_UID) == "" {
|
||||
m.Echo("本服务暂未申请认证,请到<用户名片>申请认证")
|
||||
return nil
|
||||
} else if m.Cmd(api.RENZHENGSHOUQUAN_AUTH, s.Select, model.UID, msg.Append(model.AUTH_UID)).Append(model.AUTH_STATUS) != "2" {
|
||||
m.Echo("本服务认证申请中,请等待审批")
|
||||
return nil
|
||||
} else {
|
||||
return msg
|
||||
}
|
||||
}
|
||||
func (s Table) StreetAuthUID(m *ice.Message, arg ...string) string {
|
||||
if msg := s.PlaceIsAuthed(m, arg...); msg != nil {
|
||||
return m.Cmd(s.Street, s.Select, model.UID, msg.Append(s.STREET_UID)).Append(model.AUTH_UID)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
func (s Table) MemberList(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.PrefixMember(m), arg)
|
||||
}
|
||||
func (s Table) UserPlaceRole(m *ice.Message) int {
|
||||
return kit.Int(m.Cmdy(s.PrefixPortal(m), s.UserPlaceRole).Option(model.USER_ROLE))
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) {
|
||||
role := UserPlaceRole(s.UserPlaceRole(m))
|
||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserPlaceCreator.String())...), role.String())
|
||||
}
|
||||
func (s Table) IsVisitor(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) IsCreator(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) IsLeader(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 || role == 2 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) IsWorker(m *ice.Message) bool {
|
||||
if role := kit.Int(m.Option(model.USER_ROLE)); role == 1 || role == 2 || role == 3 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (s Table) SettingCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||
return m.Cmdy(append([]ice.Any{s.PrefixSetting(m)}, arg...)...)
|
||||
}
|
||||
func (s Table) RecordEvent(m *ice.Message, info string, arg ...string) {
|
||||
m.Cmd(s.PrefixPortal(m), s.RecordEvent, info, arg)
|
||||
}
|
||||
func (s Table) RecordEventWithName(m *ice.Message, info string, arg ...string) {
|
||||
uid := kit.Select(m.Result(), m.Option(model.UID))
|
||||
kit.If(info == "", func() {
|
||||
switch info = m.ActionCmdTitle(); m.ActionKey() {
|
||||
case "placeCreate", mdb.CREATE:
|
||||
info = "✅ " + info
|
||||
case "placeRemove", mdb.REMOVE:
|
||||
info = "❌ " + info
|
||||
case "placeAuth", mdb.MODIFY:
|
||||
info = "🕑 " + info
|
||||
default:
|
||||
info = "🕑 " + info
|
||||
}
|
||||
})
|
||||
s.RecordEvent(m, kit.JoinWord(info, kit.Cut(uid, 6), kit.Select(m.Option(model.NAME), m.Option(model.TITLE))), uid)
|
||||
}
|
||||
func (s Table) NoticeList(m *ice.Message, arg ...string) {
|
||||
s.Limit(m, 1)
|
||||
m.Cmdy(s.PrefixNotice(m), arg)
|
||||
}
|
||||
func (s Table) PushPublic(m *ice.Message, arg ...string) {
|
||||
m.Option(model.VALUE_UID, m.Option(model.UID))
|
||||
m.Cmdy(s.PrefixMarket(m), s.Create, arg)
|
||||
}
|
||||
func (s Table) MarketInsert(m *ice.Message, arg ...string) {
|
||||
m.Option(model.VALUE_UID, m.Option(model.UID))
|
||||
m.Cmdy(s.PrefixMarket(m), s.Create, arg)
|
||||
}
|
||||
func (s Table) MarketPlaceInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(market{}, "placeInfo", arg)
|
||||
}
|
||||
func (s Table) MarketPlaceEnter(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(market{}, "placeEnter", arg)
|
||||
}
|
||||
func (s Table) MessagePlaceEnter(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(message{}, "placeEnter", arg)
|
||||
}
|
||||
func (s Table) MessagePlaceInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(message{}, "placeInfo", arg)
|
||||
}
|
||||
func (s Table) SendMessage(m *ice.Message, from, to string, arg ...string) {
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Option(model.VALUE_UID, kit.Select(m.Option(model.UID), m.Result()))
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.PrefixMessage(m), s.Create,
|
||||
model.FROM_USER_UID, kit.Select(m.Option(model.USER_UID), from), model.TO_USER_UID, kit.Select(m.Option(model.USER_UID), to),
|
||||
m.OptionSimple(model.TITLE, model.CONTENT, model.PRICE), arg)
|
||||
}
|
||||
func (s Table) DoneMessage(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.MESSAGE_UID) != "" {
|
||||
m.Spawn(ice.Maps{db.DB: ""}).Cmd(s.PrefixMessage(m), message{}.Done, kit.Dict(model.UID, m.Option(model.MESSAGE_UID)))
|
||||
}
|
||||
}
|
||||
func (s Table) ProcessPodCmd(m, msg *ice.Message, arg ...string) *ice.Message {
|
||||
m.ProcessPodCmd(msg.Append(web.SPACE), msg.Append(ctx.INDEX), kit.Split(msg.Append(ctx.ARGS)))
|
||||
if msg.Append(model.VALUE_UID) == "" {
|
||||
m.ProcessPodCmd(msg.Append(web.SPACE), msg.Append(ctx.INDEX), kit.Split(msg.Append(ctx.ARGS)))
|
||||
} else {
|
||||
m.ProcessPodCmd(msg.Append(web.SPACE), msg.Append(ctx.INDEX), []string{msg.Append(model.PLACE_UID), msg.Append(model.VALUE_UID)})
|
||||
}
|
||||
m.Push(ice.FIELD_OPTION, kit.Format(kit.Dict(arg)))
|
||||
return m
|
||||
}
|
||||
func (s Table) Link(m *ice.Message, arg ...string) string {
|
||||
return m.Cmdx(s.PrefixPortal(m), s.Link, arg)
|
||||
func (s Table) SendTemplate(m *ice.Message, from, to, title string, arg ...string) { // portal_name place_name
|
||||
if m.IsErr() {
|
||||
return
|
||||
}
|
||||
m.Cmd(s.PrefixPortal(m), s.SendTemplate, m.PrefixKey(), from, to, title, arg)
|
||||
}
|
||||
func (s Portal) SendTemplate(m *ice.Message, arg ...string) {
|
||||
name := kit.Select("", arg, 4)
|
||||
if name == "" {
|
||||
name = kit.JoinWord(m.Option(model.CITY_NAME), m.Option(model.STREET_NAME), kit.Select(m.Option(model.PLACE_NAME), m.Option(s.Keys(s.Place, model.NAME))))
|
||||
}
|
||||
uid, place_uid := kit.Select(m.Option(model.UID), arg, 5), kit.Select("", arg, 6)
|
||||
kit.If(place_uid == "", func() { place_uid = m.Option(s.Keys(s.Place, model.UID)) })
|
||||
link := m.Cmdx("", s.Link, place_uid, arg[0], uid)
|
||||
s.AutoCmd(m, user{}, s.SendTemplate, arg[1], arg[2], link, kit.JoinWord(m.Option(model.PORTAL_NAME), arg[3]), name, kit.Cut(uid, 6))
|
||||
}
|
||||
func (s Table) ServiceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
return m.Cmd(s.PrefixService(m), arg)
|
||||
}
|
||||
func (s Table) GetCommandUID(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.Option(model.COMMAND_UID, CommandUID(m, kit.Select(m.PrefixKey(), arg, 0)))
|
||||
return m
|
||||
}
|
||||
|
||||
func (s Table) Prefix(m *ice.Message, target ice.Any) string { return m.Prefix(kit.TypeName(target)) }
|
||||
func (s Table) PrefixPortal(m *ice.Message) string { return m.Prefix(kit.TypeName(Portal{})) }
|
||||
func (s Table) PrefixMember(m *ice.Message) string { return m.Prefix(kit.TypeName(member{})) }
|
||||
func (s Table) PrefixNotice(m *ice.Message) string { return m.Prefix(kit.TypeName(notice{})) }
|
||||
func (s Table) PrefixMarket(m *ice.Message) string { return m.Prefix(kit.TypeName(market{})) }
|
||||
func (s Table) PrefixRecent(m *ice.Message) string { return m.Prefix(kit.TypeName(recent{})) }
|
||||
func (s Table) PrefixMessage(m *ice.Message) string { return m.Prefix(kit.TypeName(message{})) }
|
||||
func (s Table) PrefixService(m *ice.Message) string { return m.Prefix(kit.TypeName(service{})) }
|
||||
func (s Table) PrefixSetting(m *ice.Message) string { return m.Prefix(kit.TypeName(setting{})) }
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
||||
@ -705,28 +718,18 @@ func PortalCmd(portal ice.Any) {
|
||||
}, cmd.Actions[ice.CTX_INIT].Hand)
|
||||
}
|
||||
cmd("portal", portal)
|
||||
|
||||
cmd("goodslist", goodslist{Table: table})
|
||||
cmd("quotalist", quotalist{Table: table})
|
||||
cmd("spendlist", spendlist{Table: table})
|
||||
cmd("paymentlist", paymentlist{Table: table})
|
||||
cmd("meeting", meeting{Table: table})
|
||||
cmd("document", document{Table: table})
|
||||
cmd("contract", contract{Table: table})
|
||||
cmd("photo", photo{Table: table})
|
||||
|
||||
cmd("clean", clean{Tables: tables})
|
||||
cmd("credit", credit{Tables: tables})
|
||||
cmd("member", member{Tables: tables})
|
||||
cmd("setting", setting{Table: table})
|
||||
cmd("qrcode", qrcode{Tables: tables})
|
||||
cmd("event", event{Table: table})
|
||||
cmd("apply", apply{Table: table})
|
||||
cmd("allow", allow{Table: table})
|
||||
cmd("notice", notice{Table: table})
|
||||
cmd("setting", setting{Table: table})
|
||||
cmd("member", member{Tables: tables})
|
||||
cmd("credit", credit{Tables: tables})
|
||||
cmd("market", market{Table: table})
|
||||
cmd("message", message{Table: table})
|
||||
cmd("recent", recent{Table: table})
|
||||
cmd("service", service{Table: table})
|
||||
cmd("support", support{Table: table})
|
||||
cmd("clean", clean{Tables: tables})
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type contract struct {
|
||||
Table
|
||||
order string `data:"95"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"title"`
|
||||
create string `name:"create title*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
}
|
||||
|
||||
func (s contract) List(m *ice.Message, arg ...string) {
|
||||
m.Echo("功能正在开发中,敬请等待。")
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(contract{Table: newTable()}) }
|
@ -1,10 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.page.Append(can, can._output, [
|
||||
{view: html.ITEM, list: [{type: html.INPUT, data: {type: html.TEXT}, onblur: function() {
|
||||
can.sup.onimport.size(can.sup, can.sup.ConfHeight(), can.sup.ConfWidth())
|
||||
can.onmotion.delay(can, function() { can._root.Action.onlayout._init(can) })
|
||||
}}]},
|
||||
])
|
||||
},
|
||||
})
|
@ -1,47 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type document struct {
|
||||
Table
|
||||
order string `data:"94"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"folder_id,vendor,user_uid"`
|
||||
open string `name:"open" style:"notice" role:"void"`
|
||||
}
|
||||
|
||||
func (s document) Config(m *ice.Message, arg ...string) {
|
||||
s.InsertOrUpdate(m, arg, m.OptionSimple(model.PLACE_UID)...)
|
||||
}
|
||||
func (s document) List(m *ice.Message, arg ...string) {
|
||||
s.cmdy(m, DocumentVendor.Folder).PushAction(s.Open).Display("")
|
||||
if len(arg) == 1 {
|
||||
s.SpendlistCheck(m, 0)
|
||||
}
|
||||
}
|
||||
func (s document) Open(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen(m.Option(model.LINK))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(document{Table: newTable()}) }
|
||||
|
||||
func (s document) cmdy(m *ice.Message, action ice.Any, arg ...string) *ice.Message {
|
||||
if m.Option(model.AUTH_UID, s.StreetAuthUID(m, m.Option(model.PLACE_UID))) == "" {
|
||||
return m
|
||||
}
|
||||
if msg := s.Select(m.Spawn(), m.OptionSimple(model.PLACE_UID)...); msg.Append("folder_id") == "" {
|
||||
m.Echo("本服务暂未配置,请联系公司管理员配置")
|
||||
} else {
|
||||
m.Cmdy(msg.Append(model.VENDOR), action, m.Option(model.AUTH_UID), msg.Append("folder_id"))
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
var DocumentVendor interface {
|
||||
Folder(m *ice.Message, arg ...string) *ice.Message
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.name+"."+value.type, can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.ownerName, can.onimport.timeView(can, value)]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -8,10 +8,12 @@ import (
|
||||
|
||||
type domain struct {
|
||||
Table
|
||||
order string `data:"508"`
|
||||
role string `data:"tech"`
|
||||
fields string `name:"name,order"`
|
||||
create string `name:"create name* info" role:"tech"`
|
||||
remove string `name:"remove" role:"tech"`
|
||||
list string `name:"list domain_uid auto" role:"void"`
|
||||
list string `name:"list place_uid domain_uid auto" role:"void"`
|
||||
}
|
||||
|
||||
func (s domain) Create(m *ice.Message, arg ...string) { s.Insert(m, arg...) }
|
||||
@ -22,11 +24,12 @@ func (s domain) Remove(m *ice.Message, arg ...string) {
|
||||
s.Delete(m.Options(model.UID, m.Option(model.DOMAIN_UID)))
|
||||
}
|
||||
func (s domain) List(m *ice.Message, arg ...string) {
|
||||
m.Display("/plugin/table.js")
|
||||
s.Fields(m, model.UID, model.NAME, "order")
|
||||
if len(arg) == 0 {
|
||||
if len(arg) < 2 {
|
||||
s.Select(m).RenameAppend(model.UID, model.DOMAIN_UID).Action()
|
||||
m.SortInt("order")
|
||||
} else if len(arg) == 1 {
|
||||
} else {
|
||||
s.SelectDetail(m, model.UID, arg[0])
|
||||
}
|
||||
if m.IsTech() {
|
||||
|
@ -13,15 +13,11 @@ type event struct {
|
||||
}
|
||||
|
||||
func (s event) List(m *ice.Message, arg ...string) {
|
||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.INFO)
|
||||
if len(arg) == 1 {
|
||||
if s.FieldsWithCreatedAT(m, s, model.INFO, model.USER_UID); len(arg) == 1 {
|
||||
s.Select(m, model.PLACE_UID, arg[0]).Action()
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.UID, arg[1])
|
||||
} else {
|
||||
return
|
||||
}
|
||||
s.SelectJoinUser(m)
|
||||
s.DisplayBase(m, "")
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@ -1,118 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type goodslist struct {
|
||||
Table
|
||||
quotalist quotalist
|
||||
spendlist spendlist
|
||||
paymentlist paymentlist
|
||||
order string `data:"91"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"name,amount,title,content,user_uid"`
|
||||
create string `name:"create name* amount* title* content*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
request string `name:"request" help:"购买" style:"notice" role:"void"`
|
||||
response string `name:"response" role:"void"`
|
||||
}
|
||||
|
||||
func (s goodslist) AfterMigrate(m *ice.Message, arg ...string) {
|
||||
s.Table.AfterMigrate(m, arg...)
|
||||
if s.PrefixPortal(m) == api.RENZHENGSHOUQUAN_PORTAL {
|
||||
s.insert(m, "service", "3-1", "1000", "基础版")
|
||||
s.insert(m, "service", "3-2", "3000", "高级版")
|
||||
s.insert(m, "service", "3-3", "5000", "旗舰版")
|
||||
s.insert(m, "company", "4-1", "10000", "企业基础版")
|
||||
s.insert(m, "company", "4-2", "30000", "企业高级版")
|
||||
s.insert(m, "company", "4-3", "50000", "企业旗舰版")
|
||||
s.insert(m, "school", "5-1", "10000", "教育基础版")
|
||||
s.insert(m, "school", "5-2", "30000", "教育高级版")
|
||||
s.insert(m, "school", "5-3", "50000", "教育旗舰版")
|
||||
s.insert(m, "street", "6-1", "10000", "社区基础版")
|
||||
s.insert(m, "street", "6-2", "30000", "社区高级版")
|
||||
s.insert(m, "street", "6-3", "50000", "社区旗舰版")
|
||||
}
|
||||
}
|
||||
func (s goodslist) Create(m *ice.Message, arg ...string) {
|
||||
s.Insert(m, kit.Simple(s.TransPrice(m, arg, model.AMOUNT), m.OptionSimple(model.PLACE_UID, model.USER_UID))...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s goodslist) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
if s.PrefixPortal(m) == api.RENZHENGSHOUQUAN_PORTAL {
|
||||
msg := m.Cmd(api.RENZHENGSHOUQUAN_AUTH, s.Select, model.UID, arg[0])
|
||||
switch kit.Int(msg.Append(model.AUTH_TYPE)) {
|
||||
case 3:
|
||||
s.Select(m, model.PLACE_UID, "service")
|
||||
case 4:
|
||||
s.Select(m, model.PLACE_UID, "company")
|
||||
case 5:
|
||||
s.Select(m, model.PLACE_UID, "school")
|
||||
case 6:
|
||||
s.Select(m, model.PLACE_UID, "street")
|
||||
}
|
||||
m.PushAction(s.Request).Action()
|
||||
} else {
|
||||
if s.IsLeader(m) {
|
||||
s.Select(m, model.PLACE_UID, "service")
|
||||
m.PushAction(s.Request).Action()
|
||||
}
|
||||
msg := s.Select(m.Spawn(), model.PLACE_UID, arg[0])
|
||||
if s.IsLeader(m) {
|
||||
msg.PushAction(s.Request, s.Remove).Action(s.Create)
|
||||
} else {
|
||||
msg.PushAction(s.Request).Action()
|
||||
}
|
||||
m.Copy(msg)
|
||||
s.SelectJoinUser(m)
|
||||
}
|
||||
m.Display("")
|
||||
} else if len(arg) == 2 {
|
||||
m.Cmdy(s.Prefix(m, s.quotalist), s.Select, model.GOODSLIST_UID, arg[1])
|
||||
m.EchoInfoButton("请购买会员", s.Request).Action()
|
||||
m.Display("quotalist.js")
|
||||
}
|
||||
}
|
||||
func (s goodslist) Request(m *ice.Message, arg ...string) {
|
||||
if msg := s.Select(m.Spawn(), m.OptionSimple(model.UID)...); msg.IsErr() {
|
||||
m.Copy(msg)
|
||||
} else if _msg := m.Cmd(s.Prefix(m, s.paymentlist), s.Create, model.GOODSLIST_UID, m.Option(model.UID),
|
||||
model.AMOUNT, kit.Float(msg.Append(model.AMOUNT))/100, msg.AppendSimple(model.TITLE, model.CONTENT)); _msg.IsErr() {
|
||||
m.Copy(_msg)
|
||||
} else {
|
||||
m.Options(msg.AppendSimple(model.AMOUNT, model.TITLE, model.CONTENT))
|
||||
m.Cmdy(s.Prefix(m, s.paymentlist), m.ActionKey(), m.PrefixKey(), "", m.Option(model.PLACE_UID), _msg.Result())
|
||||
m.Push(model.PAYMENTLIST_UID, _msg.Result())
|
||||
}
|
||||
}
|
||||
func (s goodslist) Response(m *ice.Message, arg ...string) {
|
||||
if m.Cmdy(s.Prefix(m, s.paymentlist), m.ActionKey(), arg).IsErr() {
|
||||
return
|
||||
}
|
||||
t := time.Now().AddDate(0, 1, 0)
|
||||
msg := m.Cmd(s.Prefix(m, s.paymentlist), s.Select, model.UID, arg[1])
|
||||
m.Cmd(s.Prefix(m, s.quotalist), s.Select, msg.AppendSimple(model.GOODSLIST_UID)).Table(func(value ice.Maps) {
|
||||
m.Cmd(s.Prefix(m, s.spendlist), s.Insert, model.PLACE_UID, arg[0], msg.AppendSimple(model.USER_UID), model.PAYMENTLIST_UID, arg[1],
|
||||
model.QUOTALIST_UID, value[model.UID], model.EXPIRE_TIME, t.Format(ice.MOD_TIME), model.VENDOR, value[model.VENDOR], model.TOTAL, value[model.TOTAL])
|
||||
})
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(goodslist{Table: newTable()}) }
|
||||
|
||||
func (s goodslist) insert(m *ice.Message, auth, level, amount string, arg ...string) {
|
||||
uid := kit.Hashs(auth, level)
|
||||
if s.Select(m.Spawn(), model.UID, uid).Length() > 0 {
|
||||
return
|
||||
}
|
||||
s.Insert(m, model.UID, uid, model.PLACE_UID, auth, model.NAME, level,
|
||||
model.AMOUNT, amount, model.TITLE, kit.Select("", arg, 0), model.CONTENT, kit.Select("", arg, 1))
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, "¥ "+value.amount/100+" / 月", can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -1,6 +1,2 @@
|
||||
$output div.item.card div.output div.title {
|
||||
margin-top:10px;
|
||||
}
|
||||
$output div.item.card div.output {
|
||||
padding:20px 10px;
|
||||
}
|
||||
$output div.item.card div.output { padding:20px 10px; }
|
||||
$output div.item.card div.output div.title { margin-top:10px; }
|
@ -10,13 +10,13 @@ import (
|
||||
type market struct {
|
||||
Table
|
||||
domain domain
|
||||
command command
|
||||
service service
|
||||
thumb thumb
|
||||
comment comment
|
||||
favor favor
|
||||
command command
|
||||
service service
|
||||
order string `data:"901"`
|
||||
create string `name:"create domain_uid* title* content" role:"void"`
|
||||
create string `name:"create domain_uid*:select title* content price" role:"void"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
thumbToggle string `name:"thumbToggle" role:"void"`
|
||||
commentCreate string `name:"commentCreate content*" role:"void"`
|
||||
@ -25,31 +25,34 @@ type market struct {
|
||||
}
|
||||
|
||||
func (s market) Create(m *ice.Message, arg ...string) {
|
||||
s.Insert(m, append(arg, m.OptionSimple(model.PLACE_UID, model.USER_UID, model.COMMAND_UID, model.ARGS)...)...)
|
||||
s.Insert(m, append(s.TransPrice(m, arg), m.OptionSimple(model.USER_UID, model.PLACE_UID, model.VALUE_UID, model.COMMAND_UID)...)...)
|
||||
}
|
||||
func (s market) List(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service, s.LeftJoinValue(m, s.thumb, s), s.LeftJoinValue(m, s.favor, s)).FieldsWithCreatedAT(m, s,
|
||||
s.Key(s, model.USER_UID), model.PLACE_UID, model.SERVICE_NAME, model.TITLE, model.CONTENT,
|
||||
s.Key(s, model.USER_UID), model.TITLE, model.CONTENT, model.PRICE,
|
||||
s.Key(s, model.PLACE_UID), model.VALUE_UID, model.COMMAND_NAME, model.SERVICE_NAME,
|
||||
model.THUMB_COUNT, model.COMMENT_COUNT, model.FAVOR_COUNT, model.SHARE_COUNT, model.THUMB_STATUS, model.FAVOR_STATUS,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS,
|
||||
model.COMMAND_NAME,
|
||||
)
|
||||
if len(arg) < 2 {
|
||||
if m.Option(model.DOMAIN_UID) != "" {
|
||||
s.Select(m, m.OptionSimple(model.DOMAIN_UID)...)
|
||||
} else {
|
||||
if m.Option(model.DOMAIN_UID) == "" {
|
||||
s.Select(m)
|
||||
} else {
|
||||
s.Select(m, m.OptionSimple(model.DOMAIN_UID)...)
|
||||
}
|
||||
if m.IsTech() {
|
||||
m.Table(func(value ice.Maps) {
|
||||
m.PushButton(s.Delete)
|
||||
})
|
||||
}
|
||||
m.Action()
|
||||
} else if len(arg) == 2 {
|
||||
msg := s.Select(m.Spawn(), s.Key(s, model.UID), arg[1])
|
||||
s.ProcessPodCmd(m, msg, model.MARKET_UID, arg[1])
|
||||
} else {
|
||||
return
|
||||
}
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
s.SelectJoinUser(m, model.NAME, model.AVATAR, model.AUTH_UID)
|
||||
s.SelectJoinAuth(m)
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
s.DisplayBase(m, "").DisplayCSS("")
|
||||
}
|
||||
func (s market) ThumbToggle(m *ice.Message, arg ...string) {
|
||||
@ -76,21 +79,21 @@ func (s market) FavorToggle(m *ice.Message, arg ...string) {
|
||||
func (s market) ShareCreate(m *ice.Message, arg ...string) {
|
||||
s.AddCount(m, model.SHARE_COUNT, "1")
|
||||
}
|
||||
func (s market) PlaceInfo(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service, s.LeftJoinValue(m, s.thumb, s), s.LeftJoinValue(m, s.favor, s)).FieldsWithCreatedAT(m, s,
|
||||
s.Key(s, model.USER_UID), model.TITLE, model.CONTENT, model.PRICE,
|
||||
s.Key(s, model.PLACE_UID), model.VALUE_UID, model.COMMAND_NAME, model.SERVICE_NAME,
|
||||
model.THUMB_COUNT, model.COMMENT_COUNT, model.FAVOR_COUNT, model.SHARE_COUNT, model.THUMB_STATUS, model.FAVOR_STATUS,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS,
|
||||
)
|
||||
s.Select(m, s.Key(s, model.UID), m.Option(model.MARKET_UID))
|
||||
s.SelectJoinUser(m, model.NAME, model.AVATAR, model.AUTH_UID)
|
||||
s.SelectJoinAuth(m)
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
m.PushAction(s.MarketPlaceEnter)
|
||||
}
|
||||
func (s market) PlaceEnter(m *ice.Message, arg ...string) {
|
||||
// m.ProcessField()
|
||||
}
|
||||
func (s market) PlaceInfo(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service, s.LeftJoinValue(m, s.thumb, s), s.LeftJoinValue(m, s.favor, s)).FieldsWithCreatedAT(m, s,
|
||||
s.Key(s, model.USER_UID), model.PLACE_UID, model.SERVICE_NAME, model.TITLE, model.CONTENT,
|
||||
model.THUMB_COUNT, model.COMMENT_COUNT, model.FAVOR_COUNT, model.SHARE_COUNT, model.THUMB_STATUS, model.FAVOR_STATUS,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS,
|
||||
model.COMMAND_NAME,
|
||||
)
|
||||
s.Select(m, s.Key(s, model.UID), m.Option(model.MARKET_UID))
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
s.SelectJoinUser(m, model.NAME, model.AVATAR, model.AUTH_UID)
|
||||
s.SelectJoinAuth(m)
|
||||
m.PushAction(s.MarketPlaceEnter)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(market{Table: newTable()}) }
|
||||
|
@ -1,11 +1,11 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.ui = can.page.Append(can, can._output, [html.TABS, html.LIST])
|
||||
can.runAction({}, ctx.RUN, ["web.team.gonganxitong.domain"], function(msg) { var domain_uid = can.misc.Cookie(can, "domain_uid")
|
||||
can.page.Append(can, can.ui.tabs, [{view: [[html.ITEM, domain_uid? "": html.SELECT], "", "全部"], onclick: function(event) { can.misc.Cookie(can, "domain_uid", "")
|
||||
can.runAction({}, ctx.RUN, ["web.team.gonganxitong.domain"], function(msg) { var domain_uid = can.sup.Conf("option.domain_uid")
|
||||
can.page.Append(can, can.ui.tabs, [{view: [[html.ITEM, domain_uid? "": html.SELECT], "", "全部"], onclick: function(event) { can.sup.Conf("option.domain_uid", "")
|
||||
can.onmotion.select(can, can.ui.tabs, html.DIV_ITEM, event.target), can.run(event, [], function(msg) { can.onimport._data(can, msg) })
|
||||
}}])
|
||||
can.page.Append(can, can.ui.tabs, msg.Table(function(value) {
|
||||
return {view: [[html.ITEM, value.domain_uid == domain_uid? html.SELECT: ""], "", value.name], onclick: function(event) { can.misc.Cookie(can, "domain_uid", value.domain_uid)
|
||||
return {view: [[html.ITEM, value.domain_uid == domain_uid? html.SELECT: ""], "", value.name], onclick: function(event) { can.sup.Conf("option.domain_uid", value.domain_uid)
|
||||
can.onmotion.select(can, can.ui.tabs, html.DIV_ITEM, event.target), can.run(event, [], function(msg) { can.onimport._data(can, msg) })
|
||||
}}
|
||||
}))
|
||||
@ -13,16 +13,9 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
_data: function(can, msg) { can.onmotion.clear(can, can.ui.list)
|
||||
can.onimport.itemcards(can, msg, function(value) { return [
|
||||
{view: html.STATUS, list: [
|
||||
{text: [value.user_name, "", aaa.USERNAME]}, can.onimport.authView(can, value), can.onimport.timeView(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [
|
||||
{text: [value.city_name, "", "city"]},
|
||||
{text: [value.street_name, "", "street"]},
|
||||
{text: [value.place_name, "", "place"]},
|
||||
{text: [value.service_name, "", "service"]},
|
||||
]},
|
||||
{view: html.TITLE, list: [value.command_name, value.title]},
|
||||
{view: html.STATUS, list: [{text: [value.user_name, "", aaa.USERNAME]}, can.onimport.authView(can, value), can.onimport.timeView(can, value),]},
|
||||
can.onimport.shipView(can, value),
|
||||
{view: html.TITLE, list: [value.command_name, value.title, value.price > 0 && can.onimport.moneyView(can, value)]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
{view: html.ACTION, list: [
|
||||
{view: html.ITEM, list: [{icon: "bi bi-hand-thumbs-up"}, {text: value.thumb_count||"点赞"}], onclick: function(event) {
|
||||
@ -38,6 +31,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.thumbs(event, can, value, "shareCreate")
|
||||
}},
|
||||
]},
|
||||
can.onimport.titleAction(can, value),
|
||||
] })
|
||||
},
|
||||
thumbs: function(event, can, value, button) { can.onkeymap.prevent(event)
|
||||
|
@ -1,16 +0,0 @@
|
||||
$fieldset.detail { margin-top:0 !important; height:100%; }
|
||||
$output.detail { background-color:#646566 !important; text-align:center; height:100% !important; }
|
||||
$output.detail div.detail { border-radius:10px; background-color:var(--output-bg-color); padding:10px 10px 40px; margin:80px auto 10px; max-width:360px; position:relative; }
|
||||
$output.detail div.title { font-size:20px; }
|
||||
$output.detail div.meeting_code { font-size:18px; margin:10px; }
|
||||
$output.detail div.status { color:var(--notice-bg-color); }
|
||||
$output.detail div.time { border-bottom:dashed 1px gray; font-size:24px; white-space:pre; padding-bottom:20px; display:flex; justify-content:space-around; align-items: center; }
|
||||
$output.detail div.span_time { color:gray; font-size:12px; }
|
||||
$output.detail div.span_time div.zone { margin-top:5px; }
|
||||
$output.detail div.date { color:gray; font-size:12px; margin-top:5px; }
|
||||
$output.detail img.qrcode { width:200px !important; }
|
||||
$output.detail div.logo { background-color:white; position:absolute; padding:3px 3px 0; bottom:calc(170px - 23px); left: calc(50% - 23px); }
|
||||
$output.detail div.logo img { height:40px; }
|
||||
$output.detail div.action input { border:var(--box-notice); background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; height:40px; width:100%; max-width:360px; }
|
||||
body.dark $output.detail { background-color:#33363a !important; }
|
||||
body.width1 $output.detail img.qrcode { border:var(--box-border); border-radius:5px; margin:40px; margin-bottom:10px; }
|
@ -1,68 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type meeting struct {
|
||||
Table
|
||||
order string `data:"93"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"user_id,vendor"`
|
||||
config string `name:"config place_uid* user_uid* user_id* vendor*"`
|
||||
create string `name:"create subject* start_time*:select@date end_time*:select@date" role:"worker"`
|
||||
modify string `name:"modify subject* start_time*:select@date end_time*:select@date" role:"worker"`
|
||||
cancel string `name:"cancel" role:"worker"`
|
||||
enter string `name:"enter" help:"入会" style:"notice" role:"worker"`
|
||||
}
|
||||
|
||||
func (s meeting) Config(m *ice.Message, arg ...string) {
|
||||
s.InsertOrUpdate(m, arg, m.OptionSimple(model.PLACE_UID)...)
|
||||
}
|
||||
func (s meeting) Create(m *ice.Message, arg ...string) { s.cmdy(m, s.MeetingPost, arg...) }
|
||||
func (s meeting) Modify(m *ice.Message, arg ...string) { s.cmdy(m, s.MeetingPut, arg...) }
|
||||
func (s meeting) Cancel(m *ice.Message, arg ...string) { s.cmdy(m, s.MeetingCancel, arg...) }
|
||||
func (s meeting) Enter(m *ice.Message, arg ...string) { m.ProcessOpen(m.Option(model.LINK)) }
|
||||
func (s meeting) List(m *ice.Message, arg ...string) {
|
||||
if s.cmdy(m, s.MeetingList, arg[1:]...); m.Length() > 0 {
|
||||
if len(arg) == 1 {
|
||||
m.PushAction(s.Enter, s.Modify, s.Cancel).Action(s.Create).Display("").DisplayCSS("")
|
||||
s.SpendlistCheck(m, 0)
|
||||
} else if m.IsMobileUA() {
|
||||
m.EchoQRCode(m.Append(model.LINK)).Display("").DisplayCSS("")
|
||||
} else {
|
||||
m.EchoQRCode(m.Append(model.LINK)).Display("").DisplayCSS("")
|
||||
// m.EchoIFrame(m.Append(model.LINK)).SetAppend()
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s meeting) MeetingList(m *ice.Message, arg ...string) {}
|
||||
func (s meeting) MeetingPost(m *ice.Message, arg ...string) {}
|
||||
func (s meeting) MeetingPut(m *ice.Message, arg ...string) {}
|
||||
func (s meeting) MeetingCancel(m *ice.Message, arg ...string) {}
|
||||
|
||||
func init() { ice.TeamCtxCmd(meeting{Table: newTable()}) }
|
||||
|
||||
var MeetingVendor interface {
|
||||
UserList(m *ice.Message, arg ...string) *ice.Message
|
||||
MeetingList(m *ice.Message, arg ...string) *ice.Message
|
||||
MeetingPost(m *ice.Message, arg ...string) *ice.Message
|
||||
MeetingPut(m *ice.Message, arg ...string) *ice.Message
|
||||
MeetingCancel(m *ice.Message, arg ...string) *ice.Message
|
||||
}
|
||||
|
||||
func (s meeting) cmdy(m *ice.Message, action ice.Any, arg ...string) {
|
||||
if m.Option(model.AUTH_UID, s.StreetAuthUID(m, m.Option(model.PLACE_UID))) == "" {
|
||||
return
|
||||
}
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.PLACE_UID)...)
|
||||
if msg.Append(model.VENDOR) == "" {
|
||||
m.Echo("本服务暂未配置,请联系公司管理员配置")
|
||||
return
|
||||
} else {
|
||||
m.Cmdy(msg.Append(model.VENDOR), action, arg)
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { can.page.ClassList.del(can, can._fields, "detail"), can.page.ClassList.del(can, can._output, "detail")
|
||||
if (can.Option(UID)) { can.page.ClassList.add(can, can._fields, "detail"), can.page.ClassList.add(can, can._target, "detail")
|
||||
var start_time = msg.Append("start_time").split(" "), end_time = msg.Append("end_time").split(" ")
|
||||
can.ui = can.page.Append(can, can._output, [
|
||||
{view: "detail", list: [
|
||||
{view: ["title", "", msg.Append("subject")]},
|
||||
{view: ["meeting_code", "", msg.Append(UID)]},
|
||||
{view: ["status", "", "待开始"]},
|
||||
{view: "time", list: [
|
||||
{view: "start_time", list: [{view: ["hour", "", start_time[1]]}, {view: ["date", "", start_time[0]]}]},
|
||||
{view: ["span_time"], list: [{view: ["span", "", msg.Append("span_time")]}, {view: ["zone", "", "(GMT+08:00)"]}]},
|
||||
{view: "end_time", list: [{view: ["hour", "", end_time[1]]}, {view: ["date", "", end_time[0]]}]},
|
||||
]},
|
||||
{view: ["qrcode", "", msg.Result()]},
|
||||
{view: ["logo"], list: [{img: "https://meeting.tencent.com/static/imgs/detail/qrcode_icon2x.png"}]},
|
||||
{view: ["tips", "", "请使用手机端【腾讯会议App】扫码入会"]},
|
||||
]},
|
||||
{view: "action", list: [
|
||||
{type: html.INPUT, data: {type: html.BUTTON}, name: "join", value: "入会", onclick: function(event) {
|
||||
can.runAction(can.request(event, msg.Table()[0]), "join")
|
||||
}},
|
||||
]},
|
||||
])
|
||||
msg.Option("_share_title", msg.Append("subject"))
|
||||
msg.Option("_share_content", [msg.Append(UID), msg.Append("start_time")].join("\n"))
|
||||
} else {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.subject, can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.start_time, "~", value.end_time.split(" ")[1]]},
|
||||
] })
|
||||
}
|
||||
},
|
||||
})
|
@ -14,48 +14,49 @@ type member struct {
|
||||
user user
|
||||
order string `data:"102"`
|
||||
role string `data:"leader,worker,server"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
enable string `name:"enable" role:"void"`
|
||||
disable string `name:"disable" role:"void"`
|
||||
promote string `name:"promote" role:"void"`
|
||||
demote string `name:"demote" role:"void"`
|
||||
setLanguage string `name:"setLanguage language" help:"语言" role:"void"`
|
||||
setInfo string `name:"setInfo info" help:"备注" role:"void"`
|
||||
setCookie string `name:"setCookie" help:"切换"`
|
||||
main string `name:"main" help:"主页" role:"void"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
disable string `name:"disable" role:"leader"`
|
||||
demote string `name:"demote" role:"creator"`
|
||||
promote string `name:"promote" role:"creator"`
|
||||
enable string `name:"enable" role:"leader"`
|
||||
auth string `name:"auth" help:"认证" role:"void"`
|
||||
sessList string `name:"sessList" role:"void"`
|
||||
main string `name:"main" help:"主页" role:"void"`
|
||||
setCookie string `name:"setCookie" help:"切换"`
|
||||
setInfo string `name:"setInfo info" help:"备注" role:"worker"`
|
||||
setLanguage string `name:"setLanguage language" help:"语言" role:"worker"`
|
||||
sessList string `name:"sessList" role:"leader"`
|
||||
}
|
||||
|
||||
func (s member) Remove(m *ice.Message, arg ...string) {
|
||||
if s.IsLeader(m) {
|
||||
m.Cmdy(s.UserPlace, s.Delete, s.option(m, model.ROLE, kit.Format(UserPlaceTenant), model.STATUS, kit.Format(MemberDisabled)))
|
||||
s.recordEvent(m, "❌", m.Trans("remove member", "删除成员"), html.DANGER)
|
||||
}
|
||||
m.Cmdy(s.UserPlace, s.Delete, s.option(m, model.ROLE, kit.Format(UserPlaceTenant), model.STATUS, kit.Format(MemberDisabled)))
|
||||
s.recordEvent(m, "❌", m.Trans("remove member", "删除成员"), html.DANGER)
|
||||
}
|
||||
func (s member) Disable(m *ice.Message, arg ...string) {
|
||||
if s.IsLeader(m) {
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.STATUS, MemberDisabled, s.option(m, model.ROLE, kit.Format(UserPlaceTenant)))
|
||||
s.recordEvent(m, "❌", m.Trans("disable member", "禁用成员"), html.DANGER)
|
||||
}
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.STATUS, MemberDisabled, s.option(m, model.ROLE, kit.Format(UserPlaceTenant)))
|
||||
s.recordEvent(m, "❌", m.Trans("disable member", "禁用成员"), html.DANGER)
|
||||
}
|
||||
func (s member) Demote(m *ice.Message, arg ...string) {
|
||||
if s.IsCreator(m) {
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.ROLE, kit.Format(UserPlaceTenant), s.option(m))
|
||||
s.recordEvent(m, "❌", m.Trans("demote worker", "降级成为工作人员"), html.DANGER)
|
||||
}
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.ROLE, kit.Format(UserPlaceTenant), s.option(m))
|
||||
s.recordEvent(m, "❌", m.Trans("demote worker", "降级成为工作人员"), html.DANGER)
|
||||
}
|
||||
func (s member) Promote(m *ice.Message, arg ...string) {
|
||||
if s.IsCreator(m) {
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.ROLE, kit.Format(UserPlaceLandlord), s.option(m))
|
||||
s.recordEvent(m, "✅", m.Trans("promote leader", "升级成为管理人员"), html.NOTICE)
|
||||
}
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.ROLE, kit.Format(UserPlaceLandlord), s.option(m))
|
||||
s.recordEvent(m, "✅", m.Trans("promote leader", "升级成为管理人员"), html.NOTICE)
|
||||
}
|
||||
func (s member) Enable(m *ice.Message, arg ...string) {
|
||||
if s.IsLeader(m) {
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.STATUS, MemberNormal, s.option(m, model.ROLE, kit.Format(UserPlaceTenant)))
|
||||
s.recordEvent(m, "✅", m.Trans("enable member", "启用成员"), html.NOTICE)
|
||||
m.Cmdy(s.UserPlace, s.UpdateField, model.STATUS, MemberNormal, s.option(m, model.ROLE, kit.Format(UserPlaceTenant)))
|
||||
s.recordEvent(m, "✅", m.Trans("enable member", "启用成员"), html.NOTICE)
|
||||
}
|
||||
|
||||
func (s member) Auth(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(city{}, s.Select, model.NAME, m.Option(model.CITY_NAME))
|
||||
if m.WarnNotValid(msg.Append(model.AUTH_UID) == "") {
|
||||
return
|
||||
}
|
||||
m.Cmdy(user{}, s.AuthCreate, kit.Dict(msg.AppendSimple(model.AUTH_UID)))
|
||||
}
|
||||
func (s member) Main(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.RENZHENGSHOUQUAN_PORTAL, []string{m.Option(model.AUTH_UID)})
|
||||
}
|
||||
func (s member) SetCookie(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, s.Select, model.UID, m.Option(model.UID))
|
||||
@ -64,23 +65,6 @@ func (s member) SetCookie(m *ice.Message, arg ...string) {
|
||||
func (s member) SetInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, s.Modify, arg)
|
||||
}
|
||||
func (s member) Main(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.RENZHENGSHOUQUAN_PORTAL, []string{m.Option(model.AUTH_UID)})
|
||||
}
|
||||
func (s member) Auth(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(city{}, s.Select, model.NAME, m.Option(model.CITY_NAME))
|
||||
if m.WarnNotValid(msg.Append(model.AUTH_UID) == "") {
|
||||
return
|
||||
}
|
||||
m.Cmdy(user{}, s.AuthCreate, kit.Dict(msg.AppendSimple(model.AUTH_UID)))
|
||||
}
|
||||
func (s Table) UserInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.PrefixPortal(m), s.UserInfo, arg)
|
||||
}
|
||||
func (s Portal) UserInfo(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(s.UserPlace, s.Table.Select, s.Keys(s.Place, model.UID), m.Option(model.PLACE_UID), model.USER_UID, m.Option(model.UID))
|
||||
m.ProcessField(s.Prefix(m, member{}), []string{m.Option(model.PLACE_UID), msg.Append(model.UID)}, arg...)
|
||||
}
|
||||
func (s member) UserInfo(m *ice.Message, arg ...string) {
|
||||
if msg := m.Cmd(api.RENZHENGSHOUQUAN_AUTH, s.Select, model.USER_UID, m.Option(model.UID)); msg.Append(model.UID) == "" {
|
||||
m.ProcessHold()
|
||||
@ -88,6 +72,13 @@ func (s member) UserInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.RENZHENGSHOUQUAN_PORTAL, []string{msg.Append(model.UID)}, arg...)
|
||||
}
|
||||
}
|
||||
func (s Portal) UserInfo(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(s.UserPlace, s.Table.Select, s.Keys(s.Place, model.UID), m.Option(model.PLACE_UID), model.USER_UID, m.Option(model.UID))
|
||||
m.ProcessField(s.PrefixMember(m), []string{m.Option(model.PLACE_UID), msg.Append(model.UID)}, arg...)
|
||||
}
|
||||
func (s Table) UserInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.PrefixPortal(m), s.UserInfo, arg)
|
||||
}
|
||||
func (s member) SetLanguage(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), m.Option(model.PLACE_UID), s.Key(s.UserPlace, model.UID), m.Option(model.UID))
|
||||
m.Cmdy(user{}, s.UpdateField, arg, model.UID, msg.Append(model.USER_UID))
|
||||
@ -100,8 +91,7 @@ func (s member) SessList(m *ice.Message, arg ...string) {
|
||||
func (s member) List(m *ice.Message, arg ...string) {
|
||||
USER_PLACE_ROLE := s.Keys(s.UserPlace, model.ROLE)
|
||||
user_uid, isLeader, isCreator := m.Option(model.USER_UID), s.IsLeader(m), s.IsCreator(m)
|
||||
s.FieldsWithCreatedAT(m, s.UserPlace, s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS),
|
||||
USER_PLACE_ROLE, model.INFO, model.USER_UID).Limit(m, 300)
|
||||
s.FieldsWithCreatedAT(m, s.UserPlace, s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS), USER_PLACE_ROLE, model.INFO, model.USER_UID).Limit(m, 300)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), arg[0]).Action()
|
||||
defer m.Sort(kit.Fields(model.MEMBER_STATUS, USER_PLACE_ROLE, model.AUTH_STATUS, model.CREATED_AT))
|
||||
@ -125,16 +115,22 @@ func (s member) List(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
button := []ice.Any{}
|
||||
kit.If(value[model.USER_UID] != user_uid && m.IsTech(), func() {
|
||||
button = append(button, s.SetCookie)
|
||||
})
|
||||
if value[model.AUTH_UID] == "" {
|
||||
kit.If(value[model.USER_UID] == user_uid, func() {
|
||||
if value[model.USER_UID] == user_uid {
|
||||
button = append(button, s.Auth)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
button = append(button, s.Main)
|
||||
}
|
||||
if value[model.USER_UID] != user_uid && m.IsTech() {
|
||||
button = append(button, s.SetCookie)
|
||||
}
|
||||
if value[model.USER_UID] == user_uid || isLeader {
|
||||
button = append(button, s.SetInfo)
|
||||
}
|
||||
if value[model.USER_UID] == user_uid {
|
||||
button = append(button, s.SetLanguage)
|
||||
}
|
||||
if MemberStatus(kit.Int(value[model.MEMBER_STATUS])) == MemberNormal {
|
||||
if isCreator {
|
||||
switch kit.Int(value[USER_PLACE_ROLE]) {
|
||||
@ -144,10 +140,6 @@ func (s member) List(m *ice.Message, arg ...string) {
|
||||
button = append(button, s.Promote)
|
||||
}
|
||||
}
|
||||
button = append(button, s.SetInfo)
|
||||
kit.If(value[model.USER_UID] == user_uid, func() {
|
||||
button = append(button, s.SetLanguage)
|
||||
})
|
||||
if isLeader {
|
||||
switch kit.Int(value[USER_PLACE_ROLE]) {
|
||||
case 3:
|
||||
@ -209,3 +201,27 @@ var AuthStatusList = map[AuthStatus]string{
|
||||
}
|
||||
|
||||
func (s AuthStatus) String() string { return AuthStatusList[s] }
|
||||
|
||||
type AuthType int
|
||||
|
||||
const (
|
||||
AuthRoot AuthType = iota
|
||||
AuthCity // 1
|
||||
AuthPersonal // 2
|
||||
AuthService // 3
|
||||
AuthCompany // 4
|
||||
AuthSchool // 5
|
||||
AuthStreet // 6
|
||||
)
|
||||
|
||||
var AuthTypeList = map[AuthType]string{
|
||||
AuthRoot: "root",
|
||||
AuthCity: "city",
|
||||
AuthPersonal: "personal",
|
||||
AuthService: "service",
|
||||
AuthCompany: "company",
|
||||
AuthSchool: "school",
|
||||
AuthStreet: "street",
|
||||
}
|
||||
|
||||
func (s AuthType) String() string { return AuthTypeList[s] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { var USER_PLACE_ROLE = msg.Option("_user_place_role")
|
||||
if (msg.IsDetail()) { msg.Option("_share_title", msg.Append("user_name")) }
|
||||
can.onimport.shareTitle(can, msg, "user_avatar", "user_name")
|
||||
can.onimport.myViewTabs(can, USER_PLACE_ROLE, msg, function(value) {
|
||||
value._style = [value[USER_PLACE_ROLE], value.member_status, value.who,]
|
||||
return [
|
||||
|
@ -12,7 +12,7 @@ type message struct {
|
||||
command command
|
||||
service service
|
||||
order string `data:"902"`
|
||||
create string `name:"create from_user_uid to_user_uid"`
|
||||
create string `name:"create from_user_uid* to_user_uid* title content price"`
|
||||
remove string `name:"remove" role:"void"`
|
||||
read string `name:"read" role:"void"`
|
||||
done string `name:"done" role:"void"`
|
||||
@ -21,27 +21,18 @@ type message struct {
|
||||
}
|
||||
|
||||
func (s message) Create(m *ice.Message, arg ...string) {
|
||||
arg = append(arg, model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
kit.If(m.Option(model.ARGS) == "", func() {
|
||||
arg = append(arg, model.ARGS, kit.JoinFields(m.Option(s.Keys(s.Place, model.UID)), m.Option(model.UID)))
|
||||
})
|
||||
s.Insert(m, arg...)
|
||||
}
|
||||
func (s message) Remove(m *ice.Message, arg ...string) {
|
||||
s.Delete(m, arg...)
|
||||
s.Insert(m, append(s.TransPrice(m, arg), m.OptionSimple(model.PLACE_UID, model.VALUE_UID, model.COMMAND_UID)...)...)
|
||||
}
|
||||
func (s message) List(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service).FieldsWithCreatedAT(m, s,
|
||||
model.FROM_USER_UID, model.COMMAND_NAME, model.MESSAGE_STATUS, model.SCORE,
|
||||
model.PLACE_UID, model.SERVICE_NAME,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS,
|
||||
model.TITLE, model.CONTENT,
|
||||
)
|
||||
model.FROM_USER_UID, model.TITLE, model.CONTENT, model.PRICE, model.MESSAGE_STATUS, model.SCORE,
|
||||
model.PLACE_UID, model.VALUE_UID, model.COMMAND_NAME, model.SERVICE_NAME,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS)
|
||||
if len(arg) < 2 {
|
||||
args := []string{model.TO_USER_UID, m.Option(model.USER_UID)}
|
||||
kit.If(m.Option(model.MESSAGE_STATUS), func(p string) {
|
||||
for i, v := range MessageStatusList {
|
||||
kit.If(v == p, func() { args = append(args, model.STATUS, kit.Format(i)) })
|
||||
kit.If(v == p, func() { args = append(args, s.Key(s, model.STATUS), kit.Format(i)) })
|
||||
}
|
||||
})
|
||||
s.Orders(m, s.Desc(model.SCORE), s.Desc(model.CREATED_AT))
|
||||
@ -64,9 +55,7 @@ func (s message) List(m *ice.Message, arg ...string) {
|
||||
}).Action()
|
||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
// s.SelectJoinUser(m)
|
||||
s.DisplayBase(m, "")
|
||||
|
||||
msg := m.Spawn()
|
||||
s.Fields(msg, "status, count(*) AS count").Groups(msg, model.STATUS).Orders(msg, model.STATUS)
|
||||
s.Select(msg, args...).Table(func(value ice.Maps) {
|
||||
@ -76,7 +65,6 @@ func (s message) List(m *ice.Message, arg ...string) {
|
||||
m.Echo(value[model.COUNT]).Echo("\n")
|
||||
}
|
||||
})
|
||||
|
||||
} else if len(arg) == 2 {
|
||||
msg := s.SelectDetail(m.Spawn(), model.TO_USER_UID, m.Option(model.USER_UID), s.Key(s, model.UID), arg[1])
|
||||
s.ProcessPodCmd(m, msg, model.MESSAGE_UID, arg[1])
|
||||
@ -97,23 +85,22 @@ func (s message) Sticky(m *ice.Message, arg ...string) {
|
||||
func (s message) UnSticky(m *ice.Message, arg ...string) {
|
||||
s.update(m, ice.Map{model.SCORE: 0})
|
||||
}
|
||||
func (s message) PlaceEnter(m *ice.Message, arg ...string) {
|
||||
// m.ProcessField()
|
||||
}
|
||||
func (s message) PlaceInfo(m *ice.Message, arg ...string) {
|
||||
s.Tables(m, s.command, s.service).FieldsWithCreatedAT(m, s,
|
||||
model.FROM_USER_UID, model.COMMAND_NAME, model.MESSAGE_STATUS, model.SCORE,
|
||||
model.PLACE_UID, model.SERVICE_NAME,
|
||||
model.FROM_USER_UID, model.TITLE, model.CONTENT, model.PRICE, model.MESSAGE_STATUS, model.SCORE,
|
||||
model.PLACE_UID, model.VALUE_UID, model.COMMAND_NAME, model.SERVICE_NAME,
|
||||
s.AS(model.NODENAME, model.SPACE), s.Key(s.command, model.INDEX), model.ARGS,
|
||||
model.TITLE, model.CONTENT,
|
||||
)
|
||||
s.Select(m, s.Key(s, model.UID), m.Option(model.MESSAGE_UID))
|
||||
m.RenameAppend(model.FROM_USER_UID, model.USER_UID)
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
s.SelectJoinUser(m, model.NAME, model.AVATAR, model.AUTH_UID)
|
||||
s.SelectJoinAuth(m)
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
m.PushAction(s.MessagePlaceEnter)
|
||||
}
|
||||
func (s message) PlaceEnter(m *ice.Message, arg ...string) {
|
||||
// m.ProcessField()
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(message{Table: newTable()}) }
|
||||
|
||||
|
@ -5,14 +5,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onimport.myView(can, msg, function(value) { var args = can.core.Split(value.args)
|
||||
value.icons = value.user_avatar||value.icons; if (value.score > 0) { value._style = ["sticky"] }
|
||||
return [
|
||||
{view: html.TITLE, list: [
|
||||
value.command_name, value.title, can.onimport.textView(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [
|
||||
value.detail||(args[1]||"").slice(0, 6),
|
||||
can.onimport.timeView(can, value), value.user_name,
|
||||
]},
|
||||
{view: html.STATUS, list: [value.city_name, value.street_name, value.place_name, value.service_name]},
|
||||
{view: html.TITLE, list: [value.command_name, value.title, can.onimport.textView(can, value)]},
|
||||
can.onimport.metaView(can, value), can.onimport.shipView(can, value),
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
]
|
||||
})
|
||||
|
@ -3,133 +3,130 @@ package model
|
||||
import "shylinux.com/x/mysql-story/src/db"
|
||||
|
||||
const (
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
TYPE = "type"
|
||||
HELP = "help"
|
||||
ROLE = "role"
|
||||
STATUS = "status"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
AVATAR = "avatar"
|
||||
BACKGROUND = "background"
|
||||
CREATED_AT = "created_at"
|
||||
UPDATED_AT = "updated_at"
|
||||
DELETED_AT = "deleted_at"
|
||||
USER_UID = "user_uid"
|
||||
USER_NAME = "user_name"
|
||||
USER_INFO = "user_info"
|
||||
USER_ROLE = "user_role"
|
||||
USER_AVATAR = "user_avatar"
|
||||
USER_BACKGROUND = "user_background"
|
||||
USER_PLACE_ROLE = "user_place_role"
|
||||
MEMBER_UID = "member_uid"
|
||||
MEMBER_STATUS = "member_status"
|
||||
PLACE_UID = "place_uid"
|
||||
PLACE_NAME = "place_name"
|
||||
PLACE_AVATAR = "place_avatar"
|
||||
PLACE_TYPE = "place_type"
|
||||
PLACE_INIT = "place_init"
|
||||
PLACE_ADDRESS = "place_address"
|
||||
STREET_UID = "street_uid"
|
||||
STREET_NAME = "street_name"
|
||||
STREET_INFO = "street_info"
|
||||
STREET_AVATAR = "street_avatar"
|
||||
STREET_BACKGROUND = "street_background"
|
||||
SCHOOL_NAME = "school_name"
|
||||
COMPANY_NAME = "company_name"
|
||||
CITY_UID = "city_uid"
|
||||
CITY_NAME = "city_name"
|
||||
CITY_INFO = "city_info"
|
||||
CITY_AVATAR = "city_avatar"
|
||||
CITY_BACKGROUND = "city_background"
|
||||
AUTH_UID = "auth_uid"
|
||||
AUTH_NAME = "auth_name"
|
||||
AUTH_INFO = "auth_info"
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
AUTH_AVATAR = "auth_avatar"
|
||||
AUTH_BACKGROUND = "auth_background"
|
||||
PAYMENTLIST_STATUS = "paymentlist_status"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
DASHBOARD_NAME = "dashboard_name"
|
||||
DASHBOARD_TYPE = "dashboard_type"
|
||||
STORAGE_UID = "storage_uid"
|
||||
STORAGE_NAME = "storage_name"
|
||||
STORAGE_TYPE = "storage_type"
|
||||
QRCODE_TYPE = "qrcode_type"
|
||||
APPLY_UID = "apply_uid"
|
||||
APPLY_STATUS = "apply_status"
|
||||
ALLOW_UID = "allow_uid"
|
||||
ALLOW_STATUS = "allow_status"
|
||||
EVENT_UID = "event_uid"
|
||||
DOMAIN_UID = "domain_uid"
|
||||
DOMAIN_NAME = "domain_name"
|
||||
MARKET_UID = "market_uid"
|
||||
COMMAND_UID = "command_uid"
|
||||
COMMAND_ICON = "command_icon"
|
||||
COMMAND_NAME = "command_name"
|
||||
MESSAGE_UID = "message_uid"
|
||||
MESSAGE_STATUS = "message_status"
|
||||
RECENT_UID = "recent_uid"
|
||||
SERVICE_UID = "service_uid"
|
||||
SERVICE_ICON = "service_icon"
|
||||
SERVICE_NAME = "service_name"
|
||||
SERVICE_TYPE = "service_type"
|
||||
SERVICE_STATUS = "service_status"
|
||||
THUMB_COUNT = "thumb_count"
|
||||
FAVOR_COUNT = "favor_count"
|
||||
COMMENT_COUNT = "comment_count"
|
||||
SHARE_COUNT = "share_count"
|
||||
THUMB_STATUS = "thumb_status"
|
||||
FAVOR_STATUS = "favor_status"
|
||||
FROM_UID = "from_uid"
|
||||
FROM_USER_UID = "from_user_uid"
|
||||
TO_USER_UID = "to_user_uid"
|
||||
BEGIN_TIME = "begin_time"
|
||||
END_TIME = "end_time"
|
||||
OPEN_ID = "open_id"
|
||||
USER_ID = "user_id"
|
||||
VENDOR = "vendor"
|
||||
PHONE = "phone"
|
||||
EMAIL = "email"
|
||||
ADDRESS = "address"
|
||||
PORTAL = "portal"
|
||||
PORTAL_NAME = "portal_name"
|
||||
NODE_NAME = "node_name"
|
||||
NODENAME = "nodename"
|
||||
NODETYPE = "nodetype"
|
||||
SPACE = "space"
|
||||
INDEX = "index"
|
||||
FIELD = "field"
|
||||
ICON = "icon"
|
||||
ARGS = "args"
|
||||
INIT = "init"
|
||||
QUERY = "query"
|
||||
VALUE = "value"
|
||||
SCORE = "score"
|
||||
LEVEL = "level"
|
||||
UNIT = "unit"
|
||||
LINK = "link"
|
||||
AMOUNT = "amount"
|
||||
ACCESS_TOKEN = "access_token"
|
||||
EXPIRE_TIME = "expire_time"
|
||||
PRICE = "price"
|
||||
TOTAL = "total"
|
||||
COUNT = "count"
|
||||
GOODSLIST_UID = "goodslist_uid"
|
||||
QUOTALIST_UID = "quotalist_uid"
|
||||
PAYMENTLIST_UID = "paymentlist_uid"
|
||||
SPENDLIST_UID = "spendlist_uid"
|
||||
SPACE_ID = "space_id"
|
||||
SIZE = "size"
|
||||
LOCATION = "location"
|
||||
IP = "ip"
|
||||
UA = "ua"
|
||||
AGENT = "agent"
|
||||
SYSTEM = "system"
|
||||
LANGUAGE = "language"
|
||||
UID = "uid"
|
||||
NAME = "name"
|
||||
INFO = "info"
|
||||
HELP = "help"
|
||||
LINK = "link"
|
||||
ICON = "icon"
|
||||
TYPE = "type"
|
||||
ROLE = "role"
|
||||
STATUS = "status"
|
||||
ORDER = "order"
|
||||
TITLE = "title"
|
||||
CONTENT = "content"
|
||||
AVATAR = "avatar"
|
||||
BACKGROUND = "background"
|
||||
CREATED_AT = "created_at"
|
||||
UPDATED_AT = "updated_at"
|
||||
DELETED_AT = "deleted_at"
|
||||
USER_UID = "user_uid"
|
||||
USER_NAME = "user_name"
|
||||
USER_INFO = "user_info"
|
||||
USER_ROLE = "user_role"
|
||||
USER_AVATAR = "user_avatar"
|
||||
USER_BACKGROUND = "user_background"
|
||||
USER_PLACE_ROLE = "user_place_role"
|
||||
VALUE_UID = "value_uid"
|
||||
PLACE_UID = "place_uid"
|
||||
PLACE_NAME = "place_name"
|
||||
PLACE_TYPE = "place_type"
|
||||
PLACE_INIT = "place_init"
|
||||
PLACE_AVATAR = "place_avatar"
|
||||
PLACE_ADDRESS = "place_address"
|
||||
STREET_UID = "street_uid"
|
||||
STREET_NAME = "street_name"
|
||||
STREET_INFO = "street_info"
|
||||
STREET_AVATAR = "street_avatar"
|
||||
STREET_BACKGROUND = "street_background"
|
||||
SCHOOL_NAME = "school_name"
|
||||
COMPANY_NAME = "company_name"
|
||||
CITY_UID = "city_uid"
|
||||
CITY_NAME = "city_name"
|
||||
CITY_INFO = "city_info"
|
||||
CITY_AVATAR = "city_avatar"
|
||||
CITY_BACKGROUND = "city_background"
|
||||
AUTH_UID = "auth_uid"
|
||||
AUTH_NAME = "auth_name"
|
||||
AUTH_INFO = "auth_info"
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
AUTH_AVATAR = "auth_avatar"
|
||||
AUTH_BACKGROUND = "auth_background"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
DASHBOARD_NAME = "dashboard_name"
|
||||
DASHBOARD_TYPE = "dashboard_type"
|
||||
STORAGE_UID = "storage_uid"
|
||||
STORAGE_NAME = "storage_name"
|
||||
STORAGE_TYPE = "storage_type"
|
||||
QRCODE_TYPE = "qrcode_type"
|
||||
APPLY_UID = "apply_uid"
|
||||
APPLY_STATUS = "apply_status"
|
||||
ALLOW_UID = "allow_uid"
|
||||
ALLOW_STATUS = "allow_status"
|
||||
EVENT_UID = "event_uid"
|
||||
MEMBER_UID = "member_uid"
|
||||
MEMBER_STATUS = "member_status"
|
||||
MARKET_UID = "market_uid"
|
||||
DOMAIN_UID = "domain_uid"
|
||||
DOMAIN_NAME = "domain_name"
|
||||
THUMB_COUNT = "thumb_count"
|
||||
COMMENT_COUNT = "comment_count"
|
||||
FAVOR_COUNT = "favor_count"
|
||||
SHARE_COUNT = "share_count"
|
||||
THUMB_STATUS = "thumb_status"
|
||||
FAVOR_STATUS = "favor_status"
|
||||
MESSAGE_UID = "message_uid"
|
||||
MESSAGE_STATUS = "message_status"
|
||||
RECENT_UID = "recent_uid"
|
||||
SERVICE_UID = "service_uid"
|
||||
SERVICE_NAME = "service_name"
|
||||
SERVICE_TYPE = "service_type"
|
||||
SERVICE_STATUS = "service_status"
|
||||
SERVICE_ICON = "service_icon"
|
||||
COMMAND_UID = "command_uid"
|
||||
COMMAND_NAME = "command_name"
|
||||
COMMAND_ICON = "command_icon"
|
||||
FROM_UID = "from_uid"
|
||||
FROM_USER_UID = "from_user_uid"
|
||||
TO_USER_UID = "to_user_uid"
|
||||
BEGIN_TIME = "begin_time"
|
||||
END_TIME = "end_time"
|
||||
OPEN_ID = "open_id"
|
||||
USER_ID = "user_id"
|
||||
SPACE_ID = "space_id"
|
||||
VENDOR = "vendor"
|
||||
PHONE = "phone"
|
||||
EMAIL = "email"
|
||||
ADDRESS = "address"
|
||||
PORTAL = "portal"
|
||||
PORTAL_NAME = "portal_name"
|
||||
NODE_NAME = "node_name"
|
||||
NODENAME = "nodename"
|
||||
NODETYPE = "nodetype"
|
||||
SPACE = "space"
|
||||
INDEX = "index"
|
||||
FIELD = "field"
|
||||
ARGS = "args"
|
||||
INIT = "init"
|
||||
QUERY = "query"
|
||||
VALUE = "value"
|
||||
LEVEL = "level"
|
||||
SCORE = "score"
|
||||
AMOUNT = "amount"
|
||||
PRICE = "price"
|
||||
TOTAL = "total"
|
||||
COUNT = "count"
|
||||
UNIT = "unit"
|
||||
SIZE = "size"
|
||||
ACCESS_TOKEN = "access_token"
|
||||
EXPIRE_TIME = "expire_time"
|
||||
LOCATION = "location"
|
||||
IP = "ip"
|
||||
UA = "ua"
|
||||
AGENT = "agent"
|
||||
SYSTEM = "system"
|
||||
LANGUAGE = "language"
|
||||
)
|
||||
|
||||
type Sess struct {
|
||||
@ -166,86 +163,6 @@ type City struct {
|
||||
Name string `gorm:"type:varchar(64);index"`
|
||||
}
|
||||
|
||||
type Goodslist struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
Name string `gorm:"type:varchar(32)"`
|
||||
Title string `gorm:"type:varchar(64)"`
|
||||
Content string `gorm:"type:varchar(128)"`
|
||||
Amount int `gorm:"default:0"`
|
||||
ExpireTime db.Time
|
||||
}
|
||||
type Paymentlist struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
GoodslistUID string `gorm:"type:char(32)"`
|
||||
VendorUID string `gorm:"type:char(32)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
Title string `gorm:"type:varchar(128)"`
|
||||
Content string `gorm:"type:varchar(128)"`
|
||||
Amount int32 `gorm:"default:0"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
Type uint8 `gorm:"default:0"`
|
||||
}
|
||||
type Quotalist struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
GoodslistUID string `gorm:"type:char(32);index"`
|
||||
Title string `gorm:"type:varchar(64)"`
|
||||
Content string `gorm:"type:varchar(128)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
Total int `gorm:"default:0"`
|
||||
}
|
||||
type Spendlist struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
PaymentlistUID string `gorm:"type:char(32);index"`
|
||||
QuotalistUID string `gorm:"type:char(32)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
Total int `gorm:"default:0"`
|
||||
Count int `gorm:"default:0"`
|
||||
ExpireTime db.Time
|
||||
}
|
||||
type Meeting struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
UserID string `gorm:"type:varchar(32)"`
|
||||
}
|
||||
type Document struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
FolderID string `gorm:"type:varchar(128)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
}
|
||||
type Contract struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
}
|
||||
type Photo struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
SpaceID string `gorm:"type:varchar(128)"`
|
||||
AccessToken string `gorm:"type:varchar(512)"`
|
||||
Vendor string `gorm:"type:varchar(128)"`
|
||||
ExpireTime db.Time
|
||||
}
|
||||
|
||||
type Setting struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
Name string `gorm:"type:varchar(64)"`
|
||||
Value string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
type Apply struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index:idx_place"`
|
||||
@ -273,57 +190,64 @@ type Notice struct {
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
}
|
||||
|
||||
type Domain struct {
|
||||
db.ModelNameInfo
|
||||
Order int `gorm:"default:0"`
|
||||
type Setting struct {
|
||||
db.ModelWithUID
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
Name string `gorm:"type:varchar(64)"`
|
||||
Value string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type Market struct {
|
||||
db.ModelContent
|
||||
DomainUID string `gorm:"type:char(32);index"`
|
||||
CommandUID string `gorm:"type:char(32)"`
|
||||
PlaceUID string `gorm:"type:char(32)"`
|
||||
ValueUID string `gorm:"type:char(32)";index`
|
||||
CommandUID string `gorm:"type:char(32)"`
|
||||
Args string `gorm:"type:varchar(128)"`
|
||||
ThumbCount int `gorm:"default:0"`
|
||||
CommentCount int `gorm:"default:0"`
|
||||
FavorCount int `gorm:"default:0"`
|
||||
ShareCount int `gorm:"default:0"`
|
||||
Price int `gorm:"default:0"`
|
||||
}
|
||||
type Domain struct {
|
||||
db.ModelNameInfo
|
||||
Order int `gorm:"default:0"`
|
||||
}
|
||||
type Thumb struct {
|
||||
db.ModelWithUID
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
Status uint `gorm:"default:0"`
|
||||
}
|
||||
type Comment struct {
|
||||
db.ModelWithUID
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
FromUID string `gorm:"type:char(32)"`
|
||||
Content string
|
||||
}
|
||||
type Favor struct {
|
||||
db.ModelWithUID
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
MarketUID string `gorm:"type:char(32);index"`
|
||||
Status uint `gorm:"default:0"`
|
||||
}
|
||||
type Command struct {
|
||||
db.ModelWithUID
|
||||
ServiceUID string `gorm:"type:char(32)"`
|
||||
Index string `gorm:"type:varchar(128)"`
|
||||
Name string `gorm:"type:varchar(32)"`
|
||||
Icon string `gorm:"type:varchar(128)"`
|
||||
}
|
||||
type Message struct {
|
||||
db.ModelContent
|
||||
FromUserUID string `gorm:"type:char(32)"`
|
||||
ToUserUID string `gorm:"type:char(32);index"`
|
||||
CommandUID string `gorm:"type:char(32)"`
|
||||
PlaceUID string `gorm:"type:char(32)"`
|
||||
ValueUID string `gorm:"type:char(32)";index`
|
||||
CommandUID string `gorm:"type:char(32)"`
|
||||
Args string `gorm:"type:varchar(128)"`
|
||||
Status uint `gorm:"default:0"`
|
||||
Score uint `gorm:"default:0"`
|
||||
Price int `gorm:"default:0"`
|
||||
}
|
||||
type Recent struct {
|
||||
db.ModelWithUID
|
||||
@ -352,6 +276,13 @@ type Service struct {
|
||||
Hostname string `gorm:"type:varchar(32)"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
}
|
||||
type Command struct {
|
||||
db.ModelWithUID
|
||||
ServiceUID string `gorm:"type:char(32)"`
|
||||
Index string `gorm:"type:varchar(128)"`
|
||||
Name string `gorm:"type:varchar(32)"`
|
||||
Icon string `gorm:"type:varchar(128)"`
|
||||
}
|
||||
type Support struct {
|
||||
db.ModelContent
|
||||
PlaceUID string `gorm:"type:char(32);index"`
|
||||
@ -360,10 +291,8 @@ type Support struct {
|
||||
func init() {
|
||||
db.CmdModels("",
|
||||
&Sess{}, &User{}, &UserPlace{}, &Place{}, &Street{}, &City{},
|
||||
&Goodslist{}, &Paymentlist{}, &Quotalist{}, &Spendlist{},
|
||||
&Meeting{}, &Document{}, &Contract{}, &Photo{},
|
||||
&Setting{}, &Apply{}, &Allow{}, &Event{}, &Notice{},
|
||||
&Domain{}, &Market{}, &Thumb{}, &Comment{}, &Favor{},
|
||||
&Command{}, &Message{}, &Recent{}, &Service{}, &Support{},
|
||||
&Market{}, &Domain{}, &Thumb{}, &Comment{}, &Favor{},
|
||||
&Message{}, &Recent{}, &Service{}, &Support{}, &Command{},
|
||||
)
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ type notice struct {
|
||||
}
|
||||
|
||||
func (s notice) Create(m *ice.Message, arg ...string) {
|
||||
// m.Option(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
s.Insert(m, kit.Simple(arg, m.OptionSimple(model.PLACE_UID, model.USER_UID))...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
@ -26,24 +25,19 @@ func (s notice) Modify(m *ice.Message, arg ...string) {
|
||||
s.Update(m, arg, m.OptionSimple(model.UID, model.PLACE_UID)...)
|
||||
}
|
||||
func (s notice) Remove(m *ice.Message, arg ...string) {
|
||||
// m.Option(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
s.Delete(m, m.OptionSimple(model.PLACE_UID, model.UID)...)
|
||||
s.Delete(m, m.OptionSimple(model.UID, model.PLACE_UID)...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s notice) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
s.Orders(m, s.Desc(model.UPDATED_AT))
|
||||
s.Select(m, model.PLACE_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.UID, arg[1])
|
||||
}
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
if key == model.UPDATED_AT {
|
||||
value = kit.Select(m.Appendv(model.CREATED_AT)[index], value)
|
||||
}
|
||||
kit.If(key == model.UPDATED_AT, func() { value = kit.Select(m.Appendv(model.CREATED_AT)[index], value) })
|
||||
return value
|
||||
})
|
||||
m.SortStrR(model.UPDATED_AT)
|
||||
}).SortStrR(model.UPDATED_AT)
|
||||
kit.If(s.IsLeader(m), func() {
|
||||
if m.PushAction(s.Modify, s.Remove); m.Length() == 0 {
|
||||
s.Button(m, "")
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@ -1,88 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type paymentlist struct {
|
||||
Table
|
||||
order string `data:"92"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"amount,title,content,paymentlist_status,goodslist_uid,user_uid"`
|
||||
create string `name:"create amount* title* content" role:"leader"`
|
||||
request string `name:"request" help:"支付" style:"notice" role:"void"`
|
||||
response string `name:"response" role:"void"`
|
||||
}
|
||||
|
||||
func (s paymentlist) Create(m *ice.Message, arg ...string) {
|
||||
s.Insert(m, kit.Simple(s.TransPrice(m, arg, model.AMOUNT), m.OptionSimple(model.PLACE_UID, model.USER_UID))...)
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s paymentlist) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
s.Select(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID))
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID), model.UID, arg[1])
|
||||
if PaymentStatus(kit.Int(m.Append(model.PAYMENTLIST_STATUS))) == PaymentCreate {
|
||||
if !m.IsWeixinUA() {
|
||||
m.EchoQRCode(s.Link(m, arg[0], m.PrefixKey(), arg[1])).Echo("请用微信扫码支付")
|
||||
}
|
||||
} else {
|
||||
m.SetAppend().Cmdy(s.Prefix(m, spendlist{}), arg).Action()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
m.Table(func(value ice.Maps) {
|
||||
switch PaymentStatus(kit.Int(value[model.PAYMENTLIST_STATUS])) {
|
||||
case PaymentCreate:
|
||||
m.PushButton(s.Request)
|
||||
case PaymentSuccess:
|
||||
m.PushButton()
|
||||
default:
|
||||
m.PushButton()
|
||||
}
|
||||
}).Display("").Action()
|
||||
s.SelectJoinUser(m)
|
||||
}
|
||||
func (s paymentlist) Request(m *ice.Message, arg ...string) {
|
||||
s.cmdy(m, m.ActionKey(), kit.Simple(kit.Select(m.PrefixKey(), arg, 0), kit.Select("", arg, 1),
|
||||
kit.Select(m.Option(model.PLACE_UID), arg, 2), kit.Select(m.Option(model.UID), arg, 3), kit.Slice(arg, 4))...)
|
||||
}
|
||||
func (s paymentlist) Response(m *ice.Message, arg ...string) {
|
||||
if !s.cmdy(m, m.ActionKey(), arg...).IsErr() {
|
||||
s.Update(m, kit.Dict(model.STATUS, PaymentSuccess), model.PLACE_UID, arg[0], model.UID, arg[1])
|
||||
}
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(paymentlist{Table: newTable()}) }
|
||||
|
||||
func (s paymentlist) cmdy(m *ice.Message, action ice.Any, arg ...string) *ice.Message {
|
||||
return m.Cmdy(PaymentVendor, action, arg)
|
||||
}
|
||||
|
||||
type PaymentStatus int
|
||||
|
||||
const (
|
||||
PaymentCreate PaymentStatus = iota
|
||||
PaymentSuccess
|
||||
PaymentFailure
|
||||
)
|
||||
|
||||
var PaymentStatusList = map[PaymentStatus]string{
|
||||
PaymentCreate: "create",
|
||||
PaymentSuccess: "success",
|
||||
PaymentFailure: "failure",
|
||||
}
|
||||
|
||||
func (s PaymentStatus) String() string { return PaymentStatusList[s] }
|
||||
|
||||
var PaymentVendor interface {
|
||||
Request(m *ice.Message, arg ...string)
|
||||
Response(m *ice.Message, arg ...string)
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title, "¥ "+(value.amount/100), can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -1,67 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type photo struct {
|
||||
Table
|
||||
order string `data:"96"`
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"space_id,access_token,expire_time,vendor"`
|
||||
upload string `name:"upload" role:"worker"`
|
||||
rename string `name:"rename newname" role:"worker"`
|
||||
trash string `name:"trash" role:"worker"`
|
||||
}
|
||||
|
||||
func (s photo) Config(m *ice.Message, arg ...string) {
|
||||
s.InsertOrUpdate(m, arg, m.OptionSimple(model.PLACE_UID)...)
|
||||
}
|
||||
func (s photo) List(m *ice.Message, arg ...string) {
|
||||
s.cmdy(m, PhotoVendor.Folder, kit.Slice(arg, 1)...)
|
||||
m.PushAction(s.Rename, s.Trash).Display("")
|
||||
if len(arg) == 1 {
|
||||
s.Button(m, "请上传文件", s.Upload)
|
||||
s.SpendlistCheck(m, 0)
|
||||
}
|
||||
}
|
||||
func (s photo) Upload(m *ice.Message, arg ...string) {
|
||||
if up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)); s.SpendlistCheck(m, kit.Int(up[2])) {
|
||||
s.cmdy(m, "")
|
||||
s.SpendlistUpdate(m, m.Append(model.SIZE))
|
||||
}
|
||||
}
|
||||
func (s photo) Rename(m *ice.Message, arg ...string) {
|
||||
s.cmdy(m, "")
|
||||
}
|
||||
func (s photo) Trash(m *ice.Message, arg ...string) {
|
||||
s.cmdy(m, "")
|
||||
s.SpendlistUpdate(m, m.Append(model.SIZE))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(photo{Table: newTable()}) }
|
||||
|
||||
func (s photo) cmdy(m *ice.Message, action ice.Any, arg ...string) {
|
||||
if m.Option(model.AUTH_UID, s.StreetAuthUID(m, m.Option(model.PLACE_UID))) == "" {
|
||||
return
|
||||
}
|
||||
if msg := s.Select(m.Spawn(), m.OptionSimple(model.PLACE_UID)...); msg.Append(model.SPACE_ID) == "" {
|
||||
m.Echo("本服务暂未配置,请联系公司管理员配置")
|
||||
} else {
|
||||
kit.If(action == "", func() { action = m.ActionKey() })
|
||||
_msg := m.Cmd(msg.Append(model.VENDOR), PhotoVendor.Token, msg.Append(model.SPACE_ID), msg.Append(model.ACCESS_TOKEN), msg.Append(model.EXPIRE_TIME))
|
||||
m.Cmdy(msg.Append(model.VENDOR), action, m.Option(model.AUTH_UID), msg.Append(model.SPACE_ID), _msg.Append(model.ACCESS_TOKEN), arg)
|
||||
}
|
||||
}
|
||||
|
||||
var PhotoVendor interface {
|
||||
Folder(m *ice.Message, arg ...string)
|
||||
Upload(m *ice.Message, arg ...string)
|
||||
Rename(m *ice.Message, arg ...string)
|
||||
Trash(m *ice.Message, arg ...string)
|
||||
Token(m *ice.Message, arg ...string)
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.name]},
|
||||
{view: html.STATUS, list: [can.base.Size(value.size), can.base.TimeTrim(value.modify_time)]},
|
||||
] })
|
||||
},
|
||||
})
|
Before Width: | Height: | Size: 243 KiB |
@ -1,71 +1,32 @@
|
||||
$body.dark:not(.width1) { background-color:var(--notice-bg-color); }
|
||||
$body.dark { --plugin-bg-color:#0d1117; --output-bg-color:#171a22; }
|
||||
$body.light { background-color:#dbe7fe; --plugin-bg-color:#f3f3f4; --output-bg-color:white; --notice-bg-color:#006fff; }
|
||||
$body.light { background-color:#dbe7fe; --plugin-bg-color:#f2f4f8; --output-bg-color:white; --notice-bg-color:#006fff; }
|
||||
$body.width1 fieldset.Action div.input.float { position:static; }
|
||||
$body.width1 fieldset.Action div.input.float table { width:100%; }
|
||||
$body.width1 div.upload.float div.action { display:flex; }
|
||||
$body.width1 div.upload.float div.action div.item.upload { flex-grow:1; }
|
||||
$body.width1 div.upload.float div.action div.item.upload input { width:100%; }
|
||||
$body.width1 $action div.item.text.filter { flex-grow:1; }
|
||||
$body>div.inputs>div.input {
|
||||
background-color:var(--output-bg-color);
|
||||
}
|
||||
$action { background-color:transparent; position:absolute; top:0; width:100%; z-index:1; display:none; }
|
||||
$action div.item.filter input { border-radius:20px; border:none; }
|
||||
// $action div.item:last-child { margin-right:10px; }
|
||||
// $action div.item.text.filter { padding:0 10px; }
|
||||
$body.light { --plugin-bg-color:#f2f4f8; --output-bg-color:white; --notice-bg-color:#006fff; }
|
||||
// $body.light { --plugin-bg-color:#f2f4f8; --output-bg-color:white; --notice-bg-color:#006fff; background-color:#dbe7fe; }
|
||||
body.light fieldset.web.team.portal>div.output>div.header { background-image:linear-gradient(#dbe7fe, var(--plugin-bg-color)); }
|
||||
body.dark $output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:yellow; white-space:pre; }
|
||||
$action { width:100%; position:absolute; top:0; z-index:1; display:none; }
|
||||
$action div.item { margin-right:0; height:48px; }
|
||||
$action div.item input[type=button] { background-color:transparent; color:var(--notice-bg-color); height:48px; min-width:20px; padding:0 10px; }
|
||||
$action div.item.danger input[type=button] { color:var(--danger-bg-color); }
|
||||
$action div.item.button i { display:none; }
|
||||
$action div.item.button span { display:none; }
|
||||
$action div.item.button input { border:none; min-width:60px; display:unset; }
|
||||
$action div.item.text.filter:last-child { margin-right:10px; }
|
||||
$action div.item.text.filter i { padding-left:10px; }
|
||||
$action div.item.text.filter span { right:5px; }
|
||||
$action div.item.text.filter input { padding-left:32px; padding-right:32px; width:100%; }
|
||||
$action div.item.text.filter input { border-radius:20px; border:none; padding-left:32px; padding-right:32px; width:100%; }
|
||||
$action div.item.text.filter input:focus { border:var(--box-border); }
|
||||
// $action div.item { margin-left:5px; margin-right:0; padding:0; height:48px; align-items:center; }
|
||||
$action div.item { margin-right:0; padding:0; height:48px; align-items:center; }
|
||||
$action div.item.button input { border:none; background-color:var(--plugin-bg-color); color:var(--notice-bg-color); min-width:60px; display:unset; }
|
||||
$action div.item.button input:hover { background-color:var(--hover-bg-color); }
|
||||
$action div.item.button span { display:none; }
|
||||
$action div.item.button i { display:none; }
|
||||
$output div.title div.action div.item.notice input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output { background-color:var(--plugin-bg-color); }
|
||||
$output>div.header { background-image:linear-gradient(var(--notice-bg-color), var(--plugin-bg-color)); height:240px; width:100%; position:absolute; left:0; }
|
||||
body.light $output>div.header { background-image:linear-gradient(#dbe7fe, var(--plugin-bg-color)); height:240px; width:100%; position:absolute; left:0; }
|
||||
$output>div.header img { height:100%; width:100%; object-fit:cover; }
|
||||
$output>div.action>div.list { margin:0 10px; }
|
||||
$output div.output>div.code { font-size:16px; position:relative; }
|
||||
$output div.output>div.code img.avatar {
|
||||
box-shadow:var(--box-shadow); border:solid 2px white;
|
||||
border-radius:10px; object-fit:cover; --qrcode-icon-height:48px;
|
||||
height:var(--qrcode-icon-height) !important; width:var(--qrcode-icon-height) !important;
|
||||
position:absolute; top:calc(50% - var(--qrcode-icon-height) / 2 - 26px); left:calc(50% - var(--qrcode-icon-height) / 2);
|
||||
}
|
||||
$output>div>div.code { margin-bottom:20px; display:flex; flex-direction:column; align-items:center; }
|
||||
$output>div>div.list { border-radius:10px; background-color:var(--output-bg-color); padding:10px; margin:10px; }
|
||||
$output>div>div.list.myplace>div.output { padding:0 10px; max-height:320px; }
|
||||
$output>div>div.list.myplace>div.output>div.item>div.output div.title span.type { line-height:18px; }
|
||||
$output>div>div.list.myplace>div.output>div.item>div.output div.title span.role { line-height:18px; }
|
||||
$output>div>div.list.myplace>div.output>div.item>div.output div.title { margin-bottom:5px; }
|
||||
$output>div>div.list.mynotice { cursor:pointer; }
|
||||
$output>div>div.list.mynotice:not(.hide) { display:flex; align-items:center; }
|
||||
$output>div>div.list.mynotice>span.title { flex-grow:1; margin:0 5px; }
|
||||
$output>div>div.list.mynotice>span:not(.title) { white-space:pre; }
|
||||
$output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:var(--notice-bg-color); padding:0 5px; margin-right:5px; }
|
||||
$output>div>div.list.mynotice>span:last-child { color:gray; }
|
||||
$output>div>div.list.mylist>fieldset>div.output { max-height:none !important; }
|
||||
$output>div>div.list>div.title { font-weight:bold; display:flex; align-items:center; border-left:var(--box-notice3); padding-left:10px; }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info { min-height:68px; }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info>div.item>div.output { background-color:var(--plugin-bg-color); }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.user_name { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.user_avatar { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.created_at { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.updated_at { display:none; }
|
||||
$output>div>div.list.myallow>div.title { border-left:var(--box-danger3); padding-left:10px; }
|
||||
$output>div>div.list.myorder>div.title { border-left:var(--box-danger3); padding-left:10px; }
|
||||
$output>div>div.list>div.title { font-weight:bold; border-left:var(--box-notice3); padding-left:10px; display:flex; align-items:center; }
|
||||
$output>div>div.list>div.title span:first-child { flex-grow:1; }
|
||||
$output>div>div.list>div.title div.action div.item.filter input:focus { width:320px; transition:width 0.5s; }
|
||||
$output>div>div.list>div.title div.action div.item.filter input { transition:width 0.8s; }
|
||||
$output>div>div.list>div.title div.action { overflow:hidden; }
|
||||
$output>div>div.list>div.title div.action div.item { margin-right:5px; }
|
||||
$output>div>div.list>div.title div.action div.item.filter input { transition:width 0.8s; }
|
||||
$output>div>div.list>div.title div.action div.item.filter input:focus { width:320px; transition:width 0.5s; }
|
||||
$output>div>div.list>div.title div.action div.item.button.icons input { display:none; }
|
||||
$output>div>div.list>div.role:not(.hide) { display:flex; align-items:center; justify-content:space-around; }
|
||||
$output>div>div.list>div.role span { padding:5px; cursor:pointer; white-space:pre; }
|
||||
@ -77,100 +38,112 @@ $output>div>div.list>div.role span.teacher.select { border-bottom:var(--box-dang
|
||||
$output>div>div.list>div.role span.leader.select { border-bottom:var(--box-danger); }
|
||||
$output>div>div.list>div.role span.boss.select { border-bottom:var(--box-danger); }
|
||||
$output>div>div.list>div.output>div.item.index:not(.hide) { padding:5px 10px; display:flex; flex-direction:column; align-items:center; float:left; }
|
||||
$output>div>div.list>div.output>div.item.index img { height:36px; width:36px; object-fit:contain; }
|
||||
$output>div>div.list>div.output>div.item.index i { font-size:22px; padding:5px; }
|
||||
$output>div>div.list>div.output>div.item.index img { height:40px; width:40px; object-fit:contain; }
|
||||
$output>div>div.list>div.output>div.item.index span { font-size:12px; white-space:pre; max-width:80px; }
|
||||
body.en $output>div>div.list>div.output>div.item.index span { font-family:monospace; }
|
||||
$output>div>div.list div.code { text-align:center; }
|
||||
$output>div>div.list div.code input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; margin:auto; min-width:200px; display:block; margin-top:10px; }
|
||||
$output>div>div.list div.code input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; margin:auto; margin-top:10px; min-width:200px; display:block; }
|
||||
$output>div>div.list fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
// $output>div>div.list fieldset.story.web.team.dashboard.summary>div.output { min-height:64px; background-color:var(--output-bg-color); }
|
||||
$output div.head>img { height:200px; width:100%; object-fit:cover; }
|
||||
$output div.head div.item.card img { border-radius:25px; }
|
||||
$output div.head>div.item.card div.title div.item.button i { display:none; }
|
||||
$output div.tabs { height:32px; display:flex; position:unset; }
|
||||
$output div.tabs span { padding:5px 10px; }
|
||||
$output div.tabs span.select { background-color:var(--output-bg-color); color:var(--hover-fg-color); }
|
||||
$output>div>div.list.myplace>div.output { max-height:320px; }
|
||||
$output>div>div.list.myplace>div.output>div.item>div.output div.title { margin-bottom:5px; }
|
||||
$output:not(.public)>div>div.list.myplace>div.output>div.item { padding:0 10px; }
|
||||
$output>div>div.list.mynotice { cursor:pointer; }
|
||||
$output>div>div.list.mynotice:not(.hide) { display:flex; align-items:center; }
|
||||
$output>div>div.list.mynotice>span.title { flex-grow:1; margin:0 5px; }
|
||||
$output>div>div.list.mynotice>span:not(.title) { white-space:pre; }
|
||||
$output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:var(--notice-bg-color); padding:0 5px; margin-right:5px; }
|
||||
$output>div>div.list.mynotice>span:last-child { color:gray; }
|
||||
$output>div>div.list.mylist>fieldset>div.output { max-height:none !important; }
|
||||
$output>div>div.list.myallow>div.title { border-left:var(--box-danger3); padding-left:10px; }
|
||||
$output>div>div.list.myorder>div.title { border-left:var(--box-danger3); padding-left:10px; display:none; }
|
||||
body.width1 $output>div>div.list.myorder { border-radius:0; padding:0 20px 20px; margin:0; }
|
||||
$output div.item.card:not(:last-child) { margin-bottom:2px; }
|
||||
$output div.item.card>div.output>div { width:100%; width:calc(100% - 53px); overflow:hidden; }
|
||||
$output div.item.card div.title { width:100%; display:flex; position:relative; }
|
||||
$output div.item.card.sticky { position:sticky; top:0; z-index:2; }
|
||||
$output div.item.card.loaded { position:sticky; top:0; z-index:2; }
|
||||
$output div.item.card div.title { width:100%; display:flex; align-items:center; position:relative; }
|
||||
$output div.item.card div.title span:first-child { word-break:break-all; }
|
||||
$output div.item.card div.title span.type { line-height:18px; }
|
||||
$output div.item.card div.title span.status { line-height:18px; }
|
||||
$output div.item.card div.title span.price { color:var(--danger-bg-color); }
|
||||
$output div.item.card div.title span.score { background-color:var(--hover-bg-color); color:var(--danger-bg-color); padding:0 5px; }
|
||||
body.width1 $output div.item.card div.title span.price { margin-left:auto; }
|
||||
// $output div.item.card div.title span.auth { font-size:14px; padding:3px; }
|
||||
$output div.item.card div.title span.time { position:absolute; right:0; font-size:12px; color:gray; }
|
||||
$output div.item.card div.title div.space { flex-grow:1; }
|
||||
$output div.item.card div.title span:first-child { word-break:break-all; }
|
||||
$output fieldset.story>div.item.card div.title span { line-height:26px; }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story.web.team.dashboard.summary>div.output { min-height:64px; }
|
||||
$output div.item.title { border-left:var(--box-notice3); margin-left:10px; padding:10px; background-color:var(--plugin-bg-color); }
|
||||
$output div.item.title.dealList { border-left:var(--box-danger3); }
|
||||
$output div.item.title.meetList { border-left:var(--box-danger3); }
|
||||
$body div.inputs>div.input.float>div.action { display:flex; }
|
||||
$output div.item.card div.title span.score { background-color:var(--hover-bg-color); color:var(--danger-bg-color); padding:0 5px; }
|
||||
$output div.item.card div.title span.time { color:gray; font-size:12px; position:absolute; right:0; }
|
||||
body.width1 $output div.item.card div.title div.space { flex-grow:1; }
|
||||
$output div.item.card div.title div.action input { margin-right:0; }
|
||||
$output div.item.card div.action input { margin-left:0; margin-right:0; padding:0 10px; }
|
||||
$output div.item.card div.action input { padding:0 10px; margin-left:0; margin-right:0; }
|
||||
body.width1 $output div.item.card>div.action { max-width:240px; display:flex; flex-wrap:wrap; justify-content:center; }
|
||||
$output div.item.card div.status span { word-break:break-all; }
|
||||
$output div.item.card img { border-radius:5px; padding:0; margin:0; margin-right:10px; height:48px; width:48px; min-width:48px; object-fit:cover; }
|
||||
$output div.item.card div.container img { margin-right:0; height:100%; width:100%; }
|
||||
$output div.item.card div.container>div.action { position:relative; float:right; }
|
||||
$output div.item.card div.container>div.action input { padding:0 10px; margin-left:0; margin-right:0; }
|
||||
body:not(.mobile) $output div.item.card div.container>div.action { display:none; }
|
||||
body.mobile $output div.item.card div.container>div.title>span.status { margin-left:auto; }
|
||||
body:not(.width1) $output div.item.card div.title>div.action { display:none; }
|
||||
$output div.item.card>div.output>div { width:100%; width:calc(100% - 53px); overflow:hidden; }
|
||||
$output div.item.card.sticky>div.output { background-color:var(--plugin-bg-color); color:var(--notice-bg-color); }
|
||||
// $action div.item.notice input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); }
|
||||
$action div.item input[type=button] { min-width:20px; padding:0 10px; }
|
||||
$action div.item input[type=button] { color:var(--notice-bg-color); }
|
||||
// $action div.item input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); }
|
||||
// $action div.item.text input { border:var(--box-notice); color:var(--notice-bg-color); }
|
||||
// $action div.item.text input { color:var(--notice-bg-color); }
|
||||
// $action div.item.text i { color:var(--notice-bg-color); }
|
||||
$action div.item.danger input[type=button] { color:var(--danger-bg-color); }
|
||||
$output input.notice[type=button]:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output input.notice[type=button]:not(:hover) { background-color:transparent; color:var(--notice-bg-color); }
|
||||
$output input.danger[type=button]:not(:hover) { color:var(--danger-bg-color); }
|
||||
$output input.danger[type=button]:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output div.output>div.code { font-size:16px; position:relative; }
|
||||
$output div.output>div.code>img { display:block; margin:10px auto; }
|
||||
$output div.output>div.code>img.qrcode { box-shadow:var(--box-shadow); border-radius:10px; }
|
||||
$output div.output>div.code>img.avatar {
|
||||
box-shadow:var(--box-shadow); border-radius:10px; border:solid 2px white; object-fit:cover; --qrcode-icon-height:48px;
|
||||
height:var(--qrcode-icon-height) !important; width:var(--qrcode-icon-height) !important;
|
||||
position:absolute; top:calc(50% - var(--qrcode-icon-height) / 2 - 22px); left:calc(50% - var(--qrcode-icon-height) / 2);
|
||||
}
|
||||
$output input[type=button][name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output span.type { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:22px; padding:2px 8px; }
|
||||
$output span.role { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:22px; padding:2px 8px; }
|
||||
$output span.level { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:22px; padding:2px 8px; }
|
||||
$output span.status { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:22px; padding:2px 8px; }
|
||||
$output input.notice[type=button] { background-color:transparent; color:var(--notice-bg-color); }
|
||||
$output input.danger[type=button] { color:var(--danger-bg-color); }
|
||||
$output span.type { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
$output span.role { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
$output span.level { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
$output span.status { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
$output span.type.danger { color:var(--danger-bg-color); }
|
||||
$output span.role.danger { color:var(--danger-bg-color); }
|
||||
$output span.level.danger { color:var(--danger-bg-color); }
|
||||
$output span.status.danger { color:var(--danger-bg-color); }
|
||||
$output table.content { background-color:var(--output-bg-color); }
|
||||
$output table.content td.action input.icons { display:unset; }
|
||||
$output table.content td.action i { display:none; }
|
||||
$output table.content.detail thead { display:none; }
|
||||
// $output table.content.detail td.action input { padding:0 10px; min-width:60px; margin-right:0; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.action input[type=button] { padding:0 10px; margin-right:0; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
$output table.content td.action input.icons { display:unset; }
|
||||
$output table.content.detail input { border:none; }
|
||||
|
||||
$output fieldset.story.otherList>div.output { max-height:unset !important; }
|
||||
$output fieldset.story.otherList>div.output>div.list { height:unset !important; }
|
||||
$output table.content.detail thead { display:none; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action input[type=button] { padding:0 10px; margin-right:0; }
|
||||
$output div.head>img { height:200px; width:100%; object-fit:cover; }
|
||||
$output div.head div.item.card img { border-radius:25px; }
|
||||
$output div.head div.item.card div.title div.item.button i { display:none; }
|
||||
$output div.tabs { height:32px; display:flex; position:unset; }
|
||||
$output div.tabs span { padding:5px 10px; }
|
||||
$output div.tabs span.select { background-color:var(--output-bg-color); color:var(--hover-fg-color); }
|
||||
$output div.item.title { border-left:var(--box-notice3); background-color:var(--plugin-bg-color); padding:10px; margin-left:10px; }
|
||||
$output div.item.title.meetList { border-left:var(--box-danger3); }
|
||||
$output div.item.title div.action div.item.notice input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output>div.tabs { background-color:var(--plugin-bg-color); display:flex; overflow:auto; position:sticky; top:0; z-index:2; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item { white-space:pre; line-height:22px; padding:5px; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.all { position:sticky; left:0; z-index:1; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.select { border-top:var(--box-notice); background-color:var(--output-bg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.select { position:sticky; right:0; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.danger.select { border-top:var(--box-danger); background-color:var(--output-bg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item:hover { background-color:var(--output-bg-color); }
|
||||
|
||||
$output>div.output>div.code { padding:10px; }
|
||||
$output>fieldset.market div.tabs { display:flex; width:100%; overflow:auto; height:30px; position:sticky; top:0; z-index:1; }
|
||||
$output>fieldset.market div.tabs>div.item { padding:5px 10px; float:left; white-space:pre; }
|
||||
$output>fieldset.market div.tabs>div.item.select { border-top:var(--box-danger); background-color:var(--output-bg-color); color:var(--danger-bg-color); font-weight:bold; position:sticky; left:0; right:0; }
|
||||
$output>fieldset.message div.tabs span.select { border-top:var(--box-border); }
|
||||
$output>fieldset.message div.tabs span.create.select { border-top:var(--box-danger); }
|
||||
$output>fieldset.message div.tabs span.read.select { border-top:var(--box-notice); }
|
||||
$output fieldset.story.otherList>div.output { max-height:unset !important; }
|
||||
$output fieldset.story.otherList>div.output>div.list { height:unset !important; }
|
||||
$output>fieldset.story { margin-top:48px; }
|
||||
$output fieldset.story { box-shadow:none; }
|
||||
$output fieldset.story>div.output>fieldset.story:not(.otherList) { margin-top:40px; }
|
||||
$output fieldset.story>div.output>fieldset.story:not(.otherList)>legend {
|
||||
display:block; box-shadow:none; border-left:var(--box-notice3); border-top-left-radius:unset; margin-left:10px;
|
||||
padding:0 10px;
|
||||
}
|
||||
$output fieldset.story>div.output>fieldset.can.story>div.output { margin:10px; }
|
||||
$output fieldset.story>legend { display:none; }
|
||||
$output fieldset.story>form.option { display:none; }
|
||||
$output fieldset.story>div.action { display:none; }
|
||||
$output fieldset.story>div.status { display:none; }
|
||||
$output>fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output div.code { padding:0; }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output table.content td { box-shadow:none; }
|
||||
$output fieldset.story>div.output table.content.detail td:last-child { text-align:left; }
|
||||
$output fieldset.story>div.output table.content td img { max-width:100%; }
|
||||
@ -178,61 +151,60 @@ $output fieldset.story>div.output table.content tr.icon td img { max-height:128p
|
||||
$output fieldset.story>div.output table.content tr.user_avatar td img { max-height:128px; max-width:128px; }
|
||||
$output fieldset.story>div.output table.content tr.auth_avatar td img { max-height:128px; max-width:128px; }
|
||||
$output fieldset.story>div.output>div.code { text-align:center; }
|
||||
$output fieldset.story>div.output>div.code { display:flex; flex-direction:column; row-gap:10px; margin-top:20px; margin-bottom:20px; }
|
||||
$output div.code>img { display:block; margin:10px auto; }
|
||||
$output fieldset.story>div.output>div.info>input[type=button] { box-shadow:var(--box-shadow); border:none; background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:20px; height:48px; width:100%; max-width:320px; }
|
||||
$output div.output>div.code>img.qrcode { box-shadow:var(--box-shadow); border-radius:10px; }
|
||||
$output fieldset.story>div.output>div.info { padding:10px 20px; text-align:center; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); float:right; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button].danger { border:var(--box-danger); background-color:transparent; color:var(--danger-bg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button { margin-top:20px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; min-width:240px; height:36px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button][name=cancel] { border:var(--box-border); background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button.danger input[type=button] { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output fieldset.story>div.output>div.info>input[type=button] { box-shadow:var(--box-shadow); border:none; background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:20px; height:48px; width:100%; max-width:320px; }
|
||||
$output fieldset.story>div.output>div.info { padding:10px 20px; text-align:center; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output { padding:10px; width:100%; }
|
||||
$output>fieldset.story>div.output div.item.card.loaded>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output>fieldset.story>div.output div.item.card>div.output div.output { padding:5px 0; white-space:pre-line; }
|
||||
$output>fieldset.story>div.output div.item.card.loaded>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story.form>div.output>div.code>input[type=button] { font-size:18px; margin:10px; height:36px; }
|
||||
// $output>fieldset.story.web.team.renzhengshouquan.profile { margin-top:0; }
|
||||
// $output>fieldset.story.web.team.credit { margin-top:0; }
|
||||
$output>fieldset.story.web.team.credit>div.output>div.code { margin-top:64px; }
|
||||
$output>fieldset.message div.tabs span.select { border-top:var(--box-border); }
|
||||
$output>fieldset.message div.tabs span.create.select { border-top:var(--box-danger); }
|
||||
$output>fieldset.message div.tabs span.read.select { border-top:var(--box-notice); }
|
||||
$output fieldset.story.web.team.dashboard.summary>div.output { min-height:64px; }
|
||||
$output>fieldset.qrcode table.content td { text-align:center; }
|
||||
$output>fieldset.market>div.output>div.tabs { display:flex; width:100%; overflow:auto; height:30px; position:sticky; top:0; z-index:1; }
|
||||
$output>fieldset.market>div.output>div.tabs>div.item { padding:5px 10px; float:left; white-space:pre; }
|
||||
$output>fieldset.market>div.output>div.tabs>div.item.select { border-top:var(--box-danger); background-color:var(--output-bg-color); color:var(--danger-bg-color); font-weight:bold; position:sticky; left:0; right:0; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card img { border-radius:50%; height:40px; width:40px; min-width:40px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status { font-size:12px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.username { color:var(--body-fg-color); font-size:14px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.time { float:right; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card img { height:48px; width:48px; min-width:48px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.username {
|
||||
color:#576b95; font-weight:bold; font-size:14px;
|
||||
}
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.time { float:right; line-height:20px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action { color:gray; font-size:14px; width:100%; max-width:100%; display:flex; justify-content:space-around; position:relative; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action i { margin-right:5px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action div.item.done { color:var(--notice-bg-color); }
|
||||
$output.background>div.output { padding-top:80px; }
|
||||
$output.public>div>div.list:not(.mylist)>div.title { display:none; }
|
||||
$output.public>div>div.list.myplace>div.output { padding:0; }
|
||||
$output.public>div>div.list.myplace div.item.card div.output { padding:0; }
|
||||
body.dark $output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:yellow; white-space:pre; }
|
||||
body.width1 fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output.public>div>div.list:not(.mylist)>div.title { display:none; }
|
||||
body.width1 div.input.float { margin:0; width:100% !important; max-width:100% !important; }
|
||||
body.width1 div.input.float input[name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.width1 $output>div>div.list>div.title div.action div.item.filter input:focus { width:200px; transition:width 0.5s; }
|
||||
body.width6 $output>div.output>div.code img.avatar { top:183px; }
|
||||
body:not(.width1) $output div.item.card { flex-direction:row-reverse; }
|
||||
body:not(.width1) $output div.item.card>div.action { position:static; flex-shrink:0; }
|
||||
body:not(.width1) $output div.item.card>div.output { flex-grow:1; }
|
||||
body:not(.width1) $output div.item.card div.title div.action { display:none; }
|
||||
body:not(.mobile) $output fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
|
||||
body:not(.mobile) $output div.tabs span:hover { background-color:var(--hover-bg-color); }
|
||||
body:not(.mobile) $output>div>div.list>div.role span:hover { background-color:var(--hover-bg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.code>input[type=button]:hover { border:var(--box-notice); background-color:transparent; color:var(--notice-bg-color); }
|
||||
$body.width1.light div.inputs>div.input { background-color:var(--output-bg-color); height:100%; }
|
||||
$body.width1.dark div.inputs>div.input { height:100%; }
|
||||
$body.width1.dark div.inputs>div.input input[type=text] { border:none; }
|
||||
$body.width1.dark div.inputs>div.input textarea { border:none; }
|
||||
$body.width1 div.inputs>div.input.float>div.action { display:flex; }
|
||||
$body.width1 div.upload.float { display:none; }
|
||||
body.width1 $action div.item.text.filter { flex-grow:1; }
|
||||
body.width1 $output div.item.card div.container>div.title>span.price { margin-left:auto; }
|
||||
body.width1 $output div.item.card div.container>div.title>span.status { margin-left:auto; }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info { min-height:68px; }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info>div.item>div.output { background-color:var(--plugin-bg-color); }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.created_at { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.updated_at { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.user_name { display:none; }
|
||||
body.width1 $output fieldset.story>div.output>table.detail tr.user_avatar { display:none; }
|
||||
body:not(.mobile) $action div.item.button input:hover { background-color:var(--hover-bg-color); }
|
||||
body:not(.mobile) $action div.item.notice input[type=button]:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.en $output>fieldset table.content td:first-child { max-width:190px; min-width:100px; width:unset;}
|
||||
body.en $output>fieldset table.content td { padding: 10px 5px; }
|
||||
body:not(.mobile) $output input.notice[type=button]:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body:not(.mobile) $output input.danger[type=button]:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
body:not(.mobile) $output div.item.card div.container>div.action { display:none; }
|
||||
body:not(.mobile) $output>div>div.list>div.role span:hover { background-color:var(--hover-bg-color); }
|
||||
body:not(.mobile) $output div.tabs span:hover { background-color:var(--hover-bg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.tabs>div.item:hover { background-color:var(--output-bg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.code>input[type=button]:hover { border:var(--box-notice); background-color:transparent; color:var(--notice-bg-color); }
|
||||
body.en $output>div>div.list>div.output>div.item.index span { font-family:monospace; }
|
||||
body.en $output>fieldset.story table.content td { padding:10px 5px; }
|
||||
body.en $output>fieldset.story table.content td:first-child { max-width:190px; min-width:100px; width:unset; }
|
||||
fieldset.web.team.storage.file div.item.card div.title span:first-child { flex-grow:1; }
|
||||
body.width1>div.inputs>div.input {
|
||||
height:100%;
|
||||
}
|
||||
$fieldset { box-shadow:none; }
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"shylinux.com/x/icebergs/base/aaa"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
"shylinux.com/x/icebergs/base/tcp"
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
@ -19,8 +18,8 @@ import (
|
||||
type Portal struct {
|
||||
ice.Hash
|
||||
Table
|
||||
user user
|
||||
city city
|
||||
user user
|
||||
event event
|
||||
message message
|
||||
recent recent
|
||||
@ -30,7 +29,7 @@ type Portal struct {
|
||||
field string `data:"time,icons,name,index,order,enable,type,auth,role,view,init,portal"`
|
||||
create string `name:"create index name icons"`
|
||||
list string `name:"list place_uid index uid auto" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* street_name* place_name* place_type:select address" icon:"bi bi-plus-circle" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name*:select street_name* place_name* place_type:select address" icon:"bi bi-plus-circle" role:"void"`
|
||||
placeRemove string `name:"placeRemove" role:"void"`
|
||||
}
|
||||
|
||||
@ -44,19 +43,13 @@ func (s Portal) Exit(m *ice.Message, arg ...string) {
|
||||
s.Hash.Exit(m, arg...)
|
||||
}
|
||||
func (s Portal) BeforeMigrate(m *ice.Message, arg ...string) {
|
||||
return
|
||||
if m.Cmd(web.CODE_MYSQL_CLIENT).Length() == 0 {
|
||||
if s.AutoCmd(m, web.CODE_MYSQL_CLIENT).Table(func(value ice.Maps) { m.Cmd(web.CODE_MYSQL_CLIENT, s.Create, aaa.SESS, "", kit.Simple(value)) }).Length() == 0 {
|
||||
m.Cmd(web.CODE_MYSQL_CLIENT, s.Create, aaa.SESS, "mysql", "driver", "mysql", "database", "mysql", tcp.HOST, "localhost", tcp.PORT, "10001", aaa.USERNAME, "root", aaa.PASSWORD, "root")
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s Portal) AfterMigrate(m *ice.Message, arg ...string) {
|
||||
if name := kit.Select("", kit.Split(m.PrefixKey(), "."), -2); !m.Exists("src/" + name) {
|
||||
return
|
||||
}
|
||||
cmd := m.GetCommand()
|
||||
m.Cmdy(s.Prefix(m, s.service), s.Table.Update, ctx.INDEX, m.PrefixKey(), mdb.NAME, cmd.Help+" "+ice.Info.Title(), mdb.ICON, m.Resource(kit.Select(ice.Info.NodeIcon, cmd.Icon)))
|
||||
m.Cmdy(s.PrefixService(m), s.Table.Update, ctx.INDEX, m.PrefixKey(), mdb.NAME, cmd.Help+" "+ice.Info.Title(), mdb.ICON, m.Resource(kit.Select(ice.Info.NodeIcon, cmd.Icon)))
|
||||
m.Cmd(command{}).Table(func(value ice.Maps) {
|
||||
if kit.HasSuffix(value[model.INDEX], ".allow") {
|
||||
cmdPortal[kit.ReplaceAll(value[model.INDEX], ".allow", ".portal")] = value[model.PORTAL]
|
||||
@ -89,7 +82,7 @@ func (s Portal) Run(m *ice.Message, arg ...string) {
|
||||
s.DisplayBase(m, "common.js")
|
||||
m.Option(model.SERVICE_UID, ServiceUID(m))
|
||||
m.Option(model.COMMAND_UID, CommandUID(m, arg[0]))
|
||||
m.OptionDefault(ice.MSG_USERUID, m.Option(model.USER_UID))
|
||||
m.OptionDefault(model.USER_UID, m.Option(ice.MSG_USERUID))
|
||||
m.OptionDefault(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
m.Search(arg[0], func(key string, cmd *ice.Command) {
|
||||
role := cmd.Role
|
||||
@ -132,6 +125,7 @@ func (s Portal) Run(m *ice.Message, arg ...string) {
|
||||
})
|
||||
}
|
||||
func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
m.OptionDefault(model.USER_UID, m.Option(ice.MSG_USERUID))
|
||||
if m.Option(mdb.VIEW) == mdb.TABLE || len(arg) > 0 && arg[0] == mdb.TABLE {
|
||||
s.Hash.List(m, kit.Slice(arg, 1)...).PushAction(mdb.DETAIL, s.Hash.Remove).Action().SortInt(mdb.ORDER)
|
||||
return
|
||||
@ -148,62 +142,59 @@ func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
if m.Cmd(s.user, s.Table.Select, model.UID, m.Option(model.USER_UID)).Length() == 0 {
|
||||
m.Cmd(s.user, s.Table.Insert, model.UID, m.Option(model.USER_UID), model.OPEN_ID, m.Option(ice.MSG_USERNAME), model.NAME, m.OptionDefault(ice.MSG_USERNICK, m.Option(ice.MSG_USERNAME)))
|
||||
}
|
||||
m.Option(model.SERVICE_UID, ServiceUID(m))
|
||||
if len(arg) == 0 {
|
||||
if m.Option(model.SERVICE_UID, ServiceUID(m)); len(arg) == 0 {
|
||||
m.Cmdy(m.PrefixKey(), s.PlaceList, m.Option(model.USER_UID)).PushAction(s.PlaceRemove).Action(s.PlaceCreate)
|
||||
kit.If(m.Length() > 0, func() { m.EchoQRCode(m.Cmdx("", s.Link)) })
|
||||
s.Button(m, "", s.PlaceCreate)
|
||||
} else {
|
||||
if msg := s.PlaceListOption(m, arg...); arg[0] != "" && msg.Length() > 0 {
|
||||
defer s.AddRecent(msg, arg[0])
|
||||
defer m.EchoQRCode(m.Cmdx("", s.Link, arg[0]))
|
||||
defer s.AddRecent(msg, arg[0])
|
||||
}
|
||||
s.Hash.List(m).SortInt(mdb.ORDER)
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
if key == "icons" {
|
||||
kit.If(key == mdb.ICONS && !strings.Contains(value, "bi "), func() {
|
||||
value = m.Resource(value)
|
||||
}
|
||||
})
|
||||
return value
|
||||
})
|
||||
}
|
||||
s.Place.RewriteAppend(m)
|
||||
if true {
|
||||
p := kit.ExtChange(m.Resource(ctx.GetCmdFile(m.Message, m.PrefixKey())), "js")
|
||||
defer func() { m.Option(ice.MSG_DISPLAY, p+","+m.Option(ice.MSG_DISPLAY)) }()
|
||||
}
|
||||
p := kit.ExtChange(m.Resource(ctx.GetCmdFile(m.Message, m.PrefixKey())), "js")
|
||||
defer func() { m.Option(ice.MSG_DISPLAY, p+","+m.Option(ice.MSG_DISPLAY)) }()
|
||||
s.DisplayBase(m, "").DisplayCSS("")
|
||||
}
|
||||
func (s Portal) PlaceListOption(m *ice.Message, arg ...string) *ice.Message {
|
||||
msg := m.Cmd("", s.PlaceList, m.Option(model.USER_UID), arg[0])
|
||||
if msg.Length() == 0 {
|
||||
msg = m.Cmd(s.Place, s.Table.Select, model.UID, arg[0])
|
||||
if msg.Length() == 0 {
|
||||
return msg
|
||||
}
|
||||
msg.Push(s.Keys(s.UserPlace, model.ROLE), "0")
|
||||
msg.RenameAppend(model.NAME, s.Keys(s.Place, model.NAME),
|
||||
model.INFO, s.Keys(s.Place, model.INFO),
|
||||
model.AVATAR, s.Keys(s.Place, model.AVATAR),
|
||||
model.TYPE, s.Keys(s.Place, model.TYPE),
|
||||
)
|
||||
s.SelectJoin(msg, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(msg)
|
||||
s.SelectJoinAuth(msg)
|
||||
}
|
||||
if kit.Int(msg.Append(s.Keys(s.UserPlace, model.ROLE))) == 0 {
|
||||
msg.Append(model.DASHBOARD_UID, "")
|
||||
}
|
||||
s.Place.RewriteAppend(msg)
|
||||
m.Options(msg.AppendSimple(model.CITY_NAME, s.Keys(s.Street, model.NAME),
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE), model.MEMBER_STATUS,
|
||||
model.AUTH_STATUS, model.AUTH_NAME, model.AUTH_INFO, model.AUTH_AVATAR, model.AUTH_BACKGROUND, model.DASHBOARD_UID,
|
||||
))
|
||||
m.Option(model.STREET_NAME, msg.Append(s.Keys(s.Street, model.NAME)))
|
||||
m.Option(model.PLACE_NAME, msg.Append(s.Keys(s.Place, model.NAME)))
|
||||
m.Option("portal_icon", m.Resource(kit.Select(ice.Info.NodeIcon, m.GetCommand().Icon)))
|
||||
m.Option("space_title", ice.Info.Titles)
|
||||
return msg
|
||||
|
||||
func (s Portal) Create(m *ice.Message, arg ...string) {
|
||||
args := m.OptionSimple(ctx.INDEX)
|
||||
msg := s.Hash.Select(m.Spawn(), m.Option(ctx.INDEX))
|
||||
kit.If(msg.Length() > 0, func() { args = append(args, mdb.TIME, msg.Append(mdb.TIME)) })
|
||||
m.Search(m.Option(ctx.INDEX), func(key string, cmd *ice.Command) {
|
||||
args = append(args, mdb.NAME, cmd.Help, mdb.ICONS, cmd.Icon)
|
||||
kit.For([]string{mdb.ORDER, mdb.TYPE, aaa.AUTH, aaa.ROLE, mdb.VIEW, web.PORTAL}, func(key string) {
|
||||
value := m.Conf(m.Option(ctx.INDEX), kit.Keym(key))
|
||||
args = append(args, key, kit.Select(value, msg.Append(key)))
|
||||
})
|
||||
})
|
||||
s.Hash.Create(m, args...)
|
||||
}
|
||||
func (s Portal) Remove(m *ice.Message, arg ...string) { s.Hash.Remove(m, arg...) }
|
||||
func (s Portal) Modify(m *ice.Message, arg ...string) { s.Hash.Modify(m, arg...) }
|
||||
func (s Portal) Show(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.Prefix(m, s), s.Create, ctx.INDEX, m.PrefixKey())
|
||||
}
|
||||
func (s Portal) Link(m *ice.Message, arg ...string) *ice.Message {
|
||||
if len(arg) == 0 {
|
||||
return m.Echo(m.MergePodCmd("", s.Prefix(m, s)))
|
||||
}
|
||||
p := m.MergePodCmd("", s.Prefix(m, s), s.Keys(s.Place, model.UID), arg[0])
|
||||
if len(arg) == 1 {
|
||||
return m.Echo(p)
|
||||
}
|
||||
h := kit.TrimSuffix(kit.Join([]string{arg[0], kit.Select("", arg, 1), kit.Select("", arg, 2)}, ":"), ":", ":")
|
||||
return m.Echo(p + "#" + h)
|
||||
}
|
||||
|
||||
func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
||||
if s.city.FindOrCreateByName(m, arg...); m.IsErr() {
|
||||
return
|
||||
@ -227,6 +218,56 @@ func (s Portal) PlaceRemove(m *ice.Message, arg ...string) {
|
||||
m.Cmd("", s.BeforePlaceRemove, m.OptionSimple(model.USER_UID, model.UID))
|
||||
m.Cmdy(s.UserPlace, s.Delete, m.OptionSimple(model.USER_UID, model.UID))
|
||||
}
|
||||
func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace, s.Keys(s.Place, model.UID),
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE),
|
||||
s.Key(s.Place, model.INIT), s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS),
|
||||
s.Keys(s.Street, model.UID), model.AUTH_UID,
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0], s.Keys(s.Place, model.UID), arg[1])
|
||||
} else {
|
||||
return m
|
||||
}
|
||||
s.SelectJoin(m, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(m)
|
||||
s.SelectJoinAuth(m)
|
||||
return m
|
||||
}
|
||||
func (s Portal) PlaceListOption(m *ice.Message, arg ...string) *ice.Message {
|
||||
msg := m.Cmd("", s.PlaceList, m.Option(model.USER_UID), arg[0])
|
||||
if msg.Length() == 0 {
|
||||
msg = m.Cmd(s.Place, s.Table.Select, model.UID, arg[0])
|
||||
if msg.Length() == 0 {
|
||||
return msg
|
||||
}
|
||||
msg.Push(s.Keys(s.UserPlace, model.ROLE), "0")
|
||||
msg.RenameAppend(
|
||||
model.NAME, s.Keys(s.Place, model.NAME),
|
||||
model.INFO, s.Keys(s.Place, model.INFO),
|
||||
model.TYPE, s.Keys(s.Place, model.TYPE),
|
||||
model.AVATAR, s.Keys(s.Place, model.AVATAR),
|
||||
)
|
||||
s.SelectJoin(msg, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(msg)
|
||||
s.SelectJoinAuth(msg)
|
||||
}
|
||||
if kit.Int(msg.Append(s.Keys(s.UserPlace, model.ROLE))) == 0 {
|
||||
msg.Append(model.DASHBOARD_UID, "")
|
||||
}
|
||||
s.Place.RewriteAppend(msg)
|
||||
m.Options(msg.AppendSimple(model.CITY_NAME, s.Keys(s.Street, model.NAME),
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE), model.MEMBER_STATUS,
|
||||
model.AUTH_STATUS, model.AUTH_NAME, model.AUTH_INFO, model.AUTH_AVATAR, model.AUTH_BACKGROUND, model.DASHBOARD_UID,
|
||||
))
|
||||
m.Option(model.PLACE_NAME, msg.Append(s.Keys(s.Place, model.NAME)))
|
||||
m.Option(model.STREET_NAME, msg.Append(s.Keys(s.Street, model.NAME)))
|
||||
m.Option("portal_icon", m.Resource(kit.Select(ice.Info.NodeIcon, m.GetCommand().Icon)))
|
||||
m.Option("space_title", ice.Info.Titles)
|
||||
return msg
|
||||
}
|
||||
func (s Portal) PlaceCheck(m *ice.Message, arg ...string) {
|
||||
if m.PrefixKey() == api.RENZHENGSHOUQUAN_PORTAL {
|
||||
return
|
||||
@ -281,24 +322,6 @@ func (s Table) PlaceTrash(m *ice.Message, arg ...string) {
|
||||
m.Push("table", s.TableNames(s.Place)).Push(model.PLACE_UID, "place_uid")
|
||||
}
|
||||
}
|
||||
func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace, s.Keys(s.Place, model.UID),
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE),
|
||||
s.Key(s.Place, model.INIT), s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS),
|
||||
s.Keys(s.Street, model.UID), model.AUTH_UID,
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0], s.Keys(s.Place, model.UID), arg[1])
|
||||
} else {
|
||||
return m
|
||||
}
|
||||
s.SelectJoin(m, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(m)
|
||||
s.SelectJoinAuth(m)
|
||||
return m
|
||||
}
|
||||
func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.AUTH_UID) != "" {
|
||||
return
|
||||
@ -317,6 +340,23 @@ func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
|
||||
msg.Append(model.AUTH_UID, m.Option(model.AUTH_UID))
|
||||
msg.Cmd(s.Prefix(msg, s), s.AfterPlaceAuth)
|
||||
}
|
||||
func (s Portal) PlaceCmd(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Place, arg)
|
||||
}
|
||||
func (s Portal) UserPlaceCmd(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, arg)
|
||||
}
|
||||
func (s Portal) UserPlaceRole(m *ice.Message, arg ...string) *ice.Message {
|
||||
if m.Option(model.USER_ROLE) == "" {
|
||||
msg := m.Cmd(s.UserPlace, s.Table.Select, m.OptionSimple(s.Keys(s.Place, model.UID), model.USER_UID))
|
||||
if MemberStatus(kit.Int(msg.Append(model.STATUS))) == MemberNormal {
|
||||
m.Option(model.USER_ROLE, msg.Append(model.ROLE))
|
||||
} else {
|
||||
m.Option(model.USER_ROLE, "0")
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func (s Portal) ValueCreate(m *ice.Message, arg ...string) {
|
||||
s.Table.Insert(m, kit.Simple(arg, m.OptionSimple(s.Keys(s.Place, model.UID), model.USER_UID))...)
|
||||
@ -352,6 +392,9 @@ func (s Portal) ValueList(m *ice.Message, arg ...string) {
|
||||
m.PushAction(s.Remove)
|
||||
}
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Portal{Table: newTable()}) }
|
||||
|
||||
func (s Portal) BeforePlaceCreate(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) AfterPlaceCreate(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) BeforePlaceRemove(m *ice.Message, arg ...string) {}
|
||||
@ -361,26 +404,6 @@ func (s Portal) AfterPlaceTrash(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) BeforePlaceAuth(m *ice.Message, arg ...string) {}
|
||||
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {}
|
||||
|
||||
func (s Portal) AddRecent(m *ice.Message, arg ...string) {
|
||||
args := kit.Simple(model.PLACE_UID, arg[0], model.PLACE_AVATAR, m.Resource(kit.Select(
|
||||
ice.Info.NodeIcon, m.GetCommand().Icon, m.Option(model.AVATAR), m.Option(model.AUTH_AVATAR),
|
||||
)), m.OptionSimple(model.SERVICE_UID, model.PLACE_NAME, model.STREET_NAME, model.CITY_NAME))
|
||||
kit.If(kit.IsIn(m.Append(model.AUTH_STATUS), "2", "issued"), func() { args = append(args, model.AUTH_STATUS, "2") })
|
||||
m.Cmd(s.Prefix(m, s.recent), s.Create, args)
|
||||
}
|
||||
func (s Portal) RecordEvent(m *ice.Message, arg ...string) {
|
||||
s.event.Record(m.Spawn(kit.Dict(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))), arg[0], arg[1:]...)
|
||||
}
|
||||
func (s Portal) MarketInsert(m *ice.Message, arg ...string) {
|
||||
// m.Option(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
m.Option(ctx.ARGS, kit.Join([]string{m.Option(model.PLACE_UID), m.Option(model.UID)}))
|
||||
m.Cmdy(s.Prefix(m, market{}), s.Create, arg)
|
||||
}
|
||||
func (s Portal) PushPublic(m *ice.Message, arg ...string) {
|
||||
m.Option(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||
m.Option(ctx.ARGS, kit.Join([]string{m.Option(model.PLACE_UID), m.Option(model.UID)}))
|
||||
m.Cmdy(s.Prefix(m, market{}), s.Create, arg)
|
||||
}
|
||||
func (s Portal) DashboardCreate(m *ice.Message, name string, arg ...string) func() {
|
||||
defer s.SaveBack(m, ice.MSG_USERPOD)()
|
||||
kit.If(name == "", func() { name = m.Option(s.Keys(s.Place, model.NAME)) })
|
||||
@ -406,31 +429,16 @@ func (s Portal) StorageCreate(m *ice.Message, name string, arg ...string) {
|
||||
func (s Portal) StorageInsert(m *ice.Message, title, content string) {
|
||||
// s.AutoCmd(m, api.STORAGE_FILE, s.Insert, model.TITLE, title, model.CONTENT, content, m.OptionSimple(model.STORAGE_UID, model.USER_UID))
|
||||
}
|
||||
func (s Table) NoticeList(m *ice.Message, arg ...string) {
|
||||
s.Limit(m, 1)
|
||||
m.Cmdy(s.Prefix(m, notice{}), arg)
|
||||
func (s Portal) RecordEvent(m *ice.Message, arg ...string) {
|
||||
s.event.Record(m.Spawn(kit.Dict(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))), arg[0], arg[1:]...)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Portal{Table: newTable()}) }
|
||||
|
||||
func (s Portal) UserPlaceRole(m *ice.Message, arg ...string) *ice.Message {
|
||||
if m.Option(model.USER_ROLE) == "" {
|
||||
msg := m.Cmd(s.UserPlace, s.Table.Select, m.OptionSimple(s.Keys(s.Place, model.UID), model.USER_UID))
|
||||
if MemberStatus(kit.Int(msg.Append(model.STATUS))) == MemberNormal {
|
||||
m.Option(model.USER_ROLE, msg.Append(model.ROLE))
|
||||
} else {
|
||||
m.Option(model.USER_ROLE, "0")
|
||||
}
|
||||
}
|
||||
return m
|
||||
func (s Portal) AddRecent(m *ice.Message, arg ...string) {
|
||||
args := kit.Simple(model.PLACE_UID, arg[0], model.PLACE_AVATAR, m.Resource(kit.Select(
|
||||
ice.Info.NodeIcon, m.GetCommand().Icon, m.Option(model.AVATAR), m.Option(model.AUTH_AVATAR),
|
||||
)), m.OptionSimple(model.SERVICE_UID, model.PLACE_NAME, model.STREET_NAME, model.CITY_NAME))
|
||||
kit.If(kit.IsIn(m.Append(model.AUTH_STATUS), "2", "issued"), func() { args = append(args, model.AUTH_STATUS, "2") })
|
||||
m.Cmd(s.PrefixRecent(m), s.Create, args)
|
||||
}
|
||||
func (s Portal) UserPlaceCmd(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, arg)
|
||||
}
|
||||
func (s Portal) PlaceCmd(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Place, arg)
|
||||
}
|
||||
|
||||
func (s Portal) CommandUpdate(m *ice.Message, arg ...string) {
|
||||
s.Hash.Select(m.Spawn()).Table(func(value ice.Maps) {
|
||||
m.Cmdx(command{}, s.Table.Modify, model.SERVICE_UID, arg[0], model.INDEX, value[model.INDEX], model.NAME, value[model.NAME], mdb.ICON, value[mdb.ICONS])
|
||||
@ -439,35 +447,3 @@ func (s Portal) CommandUpdate(m *ice.Message, arg ...string) {
|
||||
func (s Portal) CommandSelect(m *ice.Message, arg ...string) {
|
||||
s.Hash.Select(m, arg...)
|
||||
}
|
||||
|
||||
func (s Portal) Create(m *ice.Message, arg ...string) {
|
||||
args := m.OptionSimple(ctx.INDEX)
|
||||
msg := s.Hash.Select(m.Spawn(), m.Option(ctx.INDEX))
|
||||
kit.If(msg.Length() > 0, func() { args = append(args, mdb.TIME, msg.Append(mdb.TIME)) })
|
||||
m.Search(m.Option(ctx.INDEX), func(key string, cmd *ice.Command) {
|
||||
args = append(args, mdb.NAME, cmd.Help, mdb.ICONS, cmd.Icon)
|
||||
kit.For([]string{mdb.ORDER, mdb.TYPE, aaa.ROLE, aaa.AUTH, mdb.VIEW}, func(key string) {
|
||||
value := m.Conf(m.Option(ctx.INDEX), kit.Keym(key))
|
||||
args = append(args, key, kit.Select(value, msg.Append(key)))
|
||||
})
|
||||
})
|
||||
s.Hash.Create(m, args...)
|
||||
}
|
||||
func (s Portal) Remove(m *ice.Message, arg ...string) { s.Hash.Remove(m, arg...) }
|
||||
func (s Portal) Modify(m *ice.Message, arg ...string) { s.Hash.Modify(m, arg...) }
|
||||
func (s Portal) Show(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.Prefix(m, s), s.Create, ctx.INDEX, m.PrefixKey())
|
||||
}
|
||||
func (s Portal) Link(m *ice.Message, arg ...string) *ice.Message {
|
||||
if len(arg) == 0 {
|
||||
return m.Echo(m.MergePodCmd("", s.Prefix(m, s)))
|
||||
}
|
||||
p := m.MergePodCmd("", s.Prefix(m, s), s.Keys(s.Place, model.UID), arg[0])
|
||||
if len(arg) == 1 {
|
||||
return m.Echo(p)
|
||||
}
|
||||
h := kit.TrimSuffix(kit.Join([]string{arg[0], kit.Select("", arg, 1), kit.Select("", arg, 2)}, ":"), ":", ":")
|
||||
return m.Echo(p + "#" + h)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Portal{Table: newTable()}) }
|
||||
|
@ -2,29 +2,7 @@ var UID = "uid", PLACE_UID = "place_uid", PLACE_NAME = "place_name", PLACE_TYPE
|
||||
var USER_UID = "user_uid", USER_ROLE = "user_role", AUTH_UID = "auth_uid", AUTH_TYPE = "auth_type"
|
||||
var TYPE = "type", ROLE = "role", STATUS = "status"
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg)
|
||||
},
|
||||
otherList: function(can, msg, action) {
|
||||
if (!msg.IsDetail()) { return } typeof action == "string" && (action = [action])
|
||||
can.core.Next(action, function(action, next) {
|
||||
can.run(can.request({}, {uid: msg.Append(UID)}, msg.TableDetail()), action, function(msg) { if (msg.Length() == 0) { return next() }
|
||||
can.page.Append(can, can._output, [{view: [[html.ITEM, html.TITLE, action], "", can.user.trans(can, action)]}])
|
||||
can.onappend.plugin(can, {index: can.ConfIndex()}, function(sub) { can.onimport.myField(can, sub)
|
||||
can.onappend.style(sub, "otherList")
|
||||
sub.run = function(event, cmds, cb) {
|
||||
if (!cmds || cmds.length == 0) { cb(msg) } else { can.run(event, cmds, cb) }
|
||||
}, next()
|
||||
sub.onexport.output = function(_sub, msg) {
|
||||
_sub.onaction.carddetail = function(event, _sub, value) {
|
||||
can.onimport.myStory(can, {index: msg.Option("_other_cmd"), args: [value.place_uid||msg.Option("place_uid"), value.uid]})
|
||||
return true
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
_init: function(can, msg) { can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg) },
|
||||
qrcode: function(can, msg, avatar, target) { target = target||can.ui.output, can.onappend.board(can, msg, target)
|
||||
can.page.Append(can, can.page.SelectOne(can, target, "div.code"), [{img: can.misc.Resource(can, avatar||can.ConfIcons()||can.user.info.favicon), className: "avatar"}])
|
||||
},
|
||||
@ -51,57 +29,49 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
myPortal: function(can, msg) { can.sup.current = {}
|
||||
can.page.tagis(document.body, "body.width1") && (can.user.isMobile = true, can.sup.user.isMobile = true)
|
||||
can.onmotion.delay(can, function() {
|
||||
can.page.tagis(document.body, "body.width1") && (can.user.isMobile = true, can.sup.user.isMobile = true)
|
||||
}, 300)
|
||||
can.onmotion.delay(can, function() { can.page.tagis(document.body, "body.width1") && (can.user.isMobile = true, can.sup.user.isMobile = true) }, 300)
|
||||
can.core.List(["_place_uid", "_place_name", "_place_type", "_user_place_role", "_street_name"], function(key) { can.Conf(key, msg.Option(key)) })
|
||||
var PLACE_UID = can.Conf("_place_uid"), PLACE_NAME = can.Conf("_place_name"), PLACE_TYPE = can.Conf("_place_type")
|
||||
var USER_PLACE_ROLE = can.Conf("_user_place_role"), STREET_NAME = can.Conf("_street_name")
|
||||
can.user.isMobile && (can.db.hash = [])
|
||||
can.isCmdMode() && (can.db.hash = can.base.Obj(can.misc.SearchHash(can), can.db.hash)), can.db.hash[0] && can.onexport.place(can, can.db.hash[0])
|
||||
can.isCmdMode() && !can.sup._portal_init && (can.db.hash = can.base.Obj(can.misc.SearchHash(can), can.db.hash)), can.sup._portal_init = true, can.db.hash[0] && can.onexport.place(can, can.db.hash[0])
|
||||
can.isCmdMode() && msg.Option("auth_avatar") && can.page.Append(can, document.head, [{type: "link", href: msg.Option("auth_avatar"), rel: "shortcut icon"}])
|
||||
if (can.sup._goback) { can.db.hash = can.db.hash.slice(0, 1) }
|
||||
if (can.db.hash.length == 1 && can.db.hash[0].length != 32) { can.db.hash = [can.Option(can.core.Item(can.Option())[0]), can.db.hash[0]] }
|
||||
if (can.db.hash.length > 1 && can.db.hash[1] && can.db.hash[1] != can.ConfIndex()) {
|
||||
can.sup.current = can.onimport.myTrans(can, kit.Dict(msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME)))
|
||||
return can.runAction({}, ctx.COMMAND, [can.db.hash[1]], function(msg) { msg.Table(function(value) {
|
||||
value.args = [can.db.hash[0]].concat(can.db.hash.slice(2)), can.onimport.myStory(can, value)
|
||||
}) })
|
||||
} else {
|
||||
}
|
||||
can.ui = can.page.Append(can, can._output, [{view: html.HEADER},
|
||||
{view: html.OUTPUT, list: ["myplace.list", "myinit.list", "mycount.list", "mynotice.list", "myindex.list", "myallow.list", "mylist.list"]},
|
||||
{view: html.OUTPUT, list: [
|
||||
"myplace.list", "myinit.list.hide", "mycount.list.hide", "mynotice.list.hide",
|
||||
"myindex.list.hide", "myallow.list.hide", "mylist.list.hide",
|
||||
]},
|
||||
{view: html.ACTION, list: ["myorder.list"]},
|
||||
])
|
||||
can.onmotion.hidden(can, can.ui.myinit)
|
||||
can.onmotion.hidden(can, can.ui.mycount)
|
||||
can.onmotion.hidden(can, can.ui.mynotice)
|
||||
can.onmotion.hidden(can, can.ui.myallow)
|
||||
can.onmotion.hidden(can, can.ui.mylist)
|
||||
function showIndex(msg) { if (msg.Length() == 0) { return }
|
||||
can.onimport.myCount(can, msg, can.ui.mycount)
|
||||
can.onimport.myNotice(can, msg, can.ui.mynotice)
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex), can.onexport.index(can, can.sup.current)
|
||||
can.onimport.myAllow(can, msg, can.ui.myallow)
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex), can.onexport.index(can, can.sup.current, "", can.ui.myindex)
|
||||
can.onimport.myAllow(can, msg, can.ui.myallow), can.onexport.index(can, can.sup.current, "", can.ui.myallow)
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder)
|
||||
}
|
||||
if (can.Option(PLACE_UID) == "") { var uid = can.onimport.myPlace(can, msg, can.ui.myplace)
|
||||
if (msg.Length() > 0) { msg.Echo(can.ConfHelp()+" "+can.user.info.titles)
|
||||
can.misc.isDebug(can) && can.onimport.qrcode(can, msg)
|
||||
} else {
|
||||
can.user.agent.init(can, location.hostname, can.misc.Resource(can, can.ConfIcons()))
|
||||
// can.user.agent.init(can, location.hostname, can.misc.Resource(can, can.ConfIcons()))
|
||||
}
|
||||
msg.Length() > 0? can.run({}, [uid], function(msg) { showIndex(can._index_msg = msg) }): can.run({}, [uid], function(msg) { can.onimport.myOrder(can, can._index_msg = msg, can.ui.myorder) })
|
||||
} else { can.onappend.style(can, "public", can._output)
|
||||
can.Conf(mdb.ICONS, msg.Option("portal_icon"))
|
||||
} else { can.onappend.style(can, "public", can._output), can.Conf(mdb.ICONS, msg.Option("portal_icon"))
|
||||
var _msg = can.request({}); if (msg.Option(PLACE_NAME)) { _msg.Push(kit.Dict(UID, "", msg.OptionSimple(
|
||||
PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME,
|
||||
"member_status", "auth_status", "auth_name", "auth_info", "auth_avatar", "auth_background", "dashboard_uid",
|
||||
"space_title",
|
||||
"member_status", "auth_status", "auth_name", "auth_info", "auth_avatar", "auth_background", "dashboard_uid", "space_title",
|
||||
))) } can.onimport.myPlace(can, _msg, can.ui.myplace)
|
||||
if (_msg.Length() == 0) { can.onimport.myOrder(can, msg, can.ui.myorder) } else { showIndex(can._index_msg = msg) }
|
||||
// can.user.agent.init(can, [msg.Option(CITY_NAME), msg.Option(STREET_NAME), msg.Option("auth_info")].join(" "), msg.Option("auth_avatar"))
|
||||
msg.Echo([msg.Option(CITY_NAME), msg.Option(STREET_NAME), msg.Option(PLACE_NAME)].join(" "))
|
||||
// can.onexport.value(can, can.sup.current)
|
||||
can.misc.isDebug(can) && can.onimport.qrcode(can, msg, can.sup.current.auth_avatar)
|
||||
}
|
||||
},
|
||||
@ -172,17 +142,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
value.type? [mdb.TYPE]: [], can.core.Split(value.type||""), value.role? [aaa.ROLE]: [], can.core.Split(value.role||""),
|
||||
value.auth, value.view,
|
||||
)], style: {width: width}, list: [
|
||||
cmd == "market"? {icon: "bi bi-ubuntu"}:
|
||||
cmd == "message"? {icon: "bi bi-card-checklist"}:
|
||||
cmd == "recent"? {icon: "bi bi-clock-history"}:
|
||||
cmd == "service"? {icon: "bi bi-box"}:
|
||||
cmd == "support"? {icon: "bi bi-opencollective"}:
|
||||
cmd == "qrcode"? {icon: "bi bi-qr-code"}:
|
||||
cmd == "apply"? {icon: "bi bi-pencil-square"}:
|
||||
cmd == "allow"? {icon: "bi bi-clipboard-check"}:
|
||||
cmd == "event"? {icon: "bi bi-calendar4-week"}:
|
||||
cmd == "notice"? {icon: "bi bi-megaphone"}:
|
||||
{img: can.misc.ResourceIcons(can, value.icons)},
|
||||
can.onimport.imageView(can, value),
|
||||
{text: can.user.trans(can, value.index.split(".").pop(), value.name)},
|
||||
], onclick: function(event) {
|
||||
can.onimport.myStory(can, {space: can.ConfSpace(), index: value.index, args: [can.onexport.place(can)||can.misc.Search(can, can.Conf("_place_uid"))]})
|
||||
@ -215,10 +175,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.tabs && can.ui.list && can.page.styleHeight(can, can.ui.list, can.ConfHeight()-can.ui.tabs.offsetHeight)
|
||||
if (can.ui.action && can.ui.output) {
|
||||
// can.page.style(can, can.ui.output, html.HEIGHT, (can.user.isMobile? window.innerHeight: can.ConfHeight()) - can.ui.action.offsetHeight)
|
||||
can.page.style(can, can.ui.output, html.HEIGHT, (can.ConfHeight()) - can.ui.action.offsetHeight)
|
||||
}
|
||||
if (can.ui.action && can.ui.output) { can.page.style(can, can.ui.output, html.HEIGHT, (can.ConfHeight()) - can.ui.action.offsetHeight) }
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
@ -227,9 +184,10 @@ Volcanos(chat.ONACTION, {
|
||||
can.user.isMobile && can.page.style(can, sub._target, html.MAX_HEIGHT, can.page.height())
|
||||
can.user.isMobile && can._root.Inputs && can._root.Inputs.appendChild(sub._target)
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, html.HIDDEN)
|
||||
if (!can.misc.isDebug(can)) { return }
|
||||
if (!can.user.isTechOrRoot(can)) { return }
|
||||
sub.Option("city_name", "深圳市")
|
||||
sub.Option("company_name", "云轩领航")
|
||||
if (!can.misc.isDebug(can)) { return }
|
||||
sub.Option("street_name", "粤海街道")
|
||||
sub.Option("school_name", "深圳中学")
|
||||
sub.Option("place_name", "软件产业基地")
|
||||
@ -269,7 +227,9 @@ Volcanos(chat.ONACTION, {
|
||||
})
|
||||
Volcanos(chat.ONEXPORT, {
|
||||
place: function(can, value) { return can.onexport.session(can, PLACE_UID, value) },
|
||||
value: function(can, value) { if (!value || !value._uid) { return } can.sup.current = value, can.onexport.index(can, can.sup.current)
|
||||
value: function(can, value) { if (!value || !value._uid) { return } can.sup.current = value
|
||||
can.onexport.index(can, can.sup.current)
|
||||
can.onexport.index(can, can.sup.current, "", can.ui.myallow)
|
||||
can.onexport.place(can, value._uid), can.onexport.hash(can, value._uid), can.onexport.title(can, value._name, can.ConfHelp())
|
||||
can.page.Select(can, can.ui._target, "div.item.card.uid-"+value._uid, function(target) {
|
||||
can.onmotion.select(can, can.ui._target, html.DIV_ITEM, target)
|
||||
@ -279,18 +239,19 @@ Volcanos(chat.ONEXPORT, {
|
||||
can.ui.myinit && can.onimport.myInit(can, can._index_msg, value, can.ui.myinit)
|
||||
can.ui.mycount && can.onimport.myCount(can, value, can.ui.mycount)
|
||||
can.ui.mynotice && can.onimport.myNotice(can, value, can.ui.mynotice)
|
||||
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, status && (value._role == "creator" || parseInt(value._role) > 0 || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0))
|
||||
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, can.user.isTechOrRoot(can) || status && (value._role == "creator" || parseInt(value._role) > 0 || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0))
|
||||
can.ui.myindex && can.onmotion.toggle(can, can.ui.myindex, status)
|
||||
if (!can.onmotion.cache(can, function() { return value._uid }, can.ui.header) && value.auth_background) {
|
||||
// can.page.Append(can, can.ui.header, [{img: value.auth_background}])
|
||||
// can.page.ClassList.set(can, can._output, "background", !!can.ui.header.innerHTML)
|
||||
}
|
||||
if (!can.onmotion.cache(can, function() { return value._uid }, can.ui.header) && value.auth_background) {}
|
||||
can.onimport.myOption(can.sup)
|
||||
},
|
||||
index: function(can, value, role) { role = role||value._role
|
||||
index: function(can, value, role, _target) { role = role||value._role
|
||||
can.ui.role && can.onmotion.toggle(can, can.ui.role, value._role == "creator")
|
||||
parseInt(role) > 0 || can.ui.role && can.onmotion.select(can, can.ui.role, html.SPAN, can.page.SelectOne(can, can.ui.role, "span."+role))
|
||||
can.page.Select(can, can.ui.myindex, html.DIV_ITEM, function(target) { var list = target.className.split(" ")
|
||||
can.page.Select(can, _target||can.ui.myindex, html.DIV_ITEM, function(target) { var list = target.className.split(" ")
|
||||
if (_target == can.ui.myallow && can.user.isTechOrRoot(can)) {
|
||||
can.onmotion.toggle(can, target, true)
|
||||
return
|
||||
}
|
||||
if (list.indexOf(log.DEBUG) > -1 && !can.misc.isDebug(can)) {
|
||||
can.onmotion.toggle(can, target, false)
|
||||
} else if (list.indexOf(aaa.TECH) > -1 && !can.user.isTechOrRoot(can)) {
|
||||
|
@ -1,36 +1,40 @@
|
||||
{
|
||||
"portal": "用户场景", "placeCreate": "创建", "placeRemove": "删除",
|
||||
"credit": "用户名片", "member": "组织成员",
|
||||
"goodslist": "在线商城", "paymentlist": "在线支付",
|
||||
"meeting": "在线会议", "document": "在线文档", "contract": "在线合同", "photo": "在线相册",
|
||||
"email": "邮箱配置", "setting": "服务配置",
|
||||
"credit": "用户名片", "member": "组织成员", "setting": "服务配置",
|
||||
"qrcode": "场景码", "event": "事件流", "apply": "权限申请", "allow": "权限审批", "notice": "通知公告",
|
||||
"domain": "领域分类", "market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
|
||||
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过",
|
||||
"read": "已读", "done": "完成", "sticky": "置顶", "unSticky": "取消置顶",
|
||||
"autogen": "生成", "compile": "编译", "oauth": "授权", "project": "项目",
|
||||
"marketInsert": "推广",
|
||||
"marketPlaceEnter": "进入",
|
||||
"pushPublic": "推广",
|
||||
"process": "开始",
|
||||
"applyCreate": "申请权限",
|
||||
"commentCreate": "评论", "applyQRCode": "邀请码",
|
||||
"user": "用户信息", "city": "城市信息", "street": "街道信息", "school": "学校信息", "company": "公司信息",
|
||||
"market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
|
||||
"auth": "认证", "authCreate": "认证申请", "authCity": "城市认证", "authPersonal": "个人认证", "authService": "服务认证", "authCompany": "公司认证",
|
||||
"autogen": "生成", "compile": "编译", "oauth": "授权", "project": "项目",
|
||||
"read": "已读", "done": "完成", "sticky": "置顶", "unSticky": "取消置顶",
|
||||
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过", "process": "开始",
|
||||
"pushPublic": "推广", "marketInsert": "推广",
|
||||
"marketPlaceEnter": "进入系统",
|
||||
"messagePlaceEnter": "进入系统",
|
||||
"applyCreate": "申请权限", "commentCreate": "评论", "applyQRCode": "邀请码",
|
||||
"config": "配置", "code": "编程", "data": "数据", "cache": "缓存",
|
||||
"promote": "升级", "demote": "降级",
|
||||
"clean": "数据清理", "domain": "领域分类",
|
||||
"city": "城市",
|
||||
"user": "城市",
|
||||
"icons": {
|
||||
"qrcode": "bi bi-qr-code",
|
||||
"apply": "bi bi-pencil-square",
|
||||
"allow": "bi bi-clipboard-check",
|
||||
"event": "bi bi-calendar4-week",
|
||||
"notice": "bi bi-megaphone",
|
||||
"market": "bi bi-ubuntu",
|
||||
"message": "bi bi-card-checklist",
|
||||
"goodslist": "https://img.icons8.com/officel/80/online-store.png",
|
||||
"paymentlist": "https://img.icons8.com/officel/80/online-payment-with-a-credit-card.png",
|
||||
"meeting": "https://img.icons8.com/officel/80/video-conference.png",
|
||||
"document": "https://img.icons8.com/officel/80/documents.png",
|
||||
"contract": "https://img.icons8.com/officel/80/agreement.png",
|
||||
"photo": "https://img.icons8.com/officel/80/ios-photos.png"
|
||||
"recent": "bi bi-clock-history",
|
||||
"service": "bi bi-box",
|
||||
"support": "bi bi-opencollective",
|
||||
"clean": "bi bi-recycle",
|
||||
"user": "bi bi-recycle",
|
||||
"city": "bi bi-recycle",
|
||||
"domain": "bi bi-grid-3x2-gap"
|
||||
},
|
||||
"style": {
|
||||
"marketPlaceEnter": "notice",
|
||||
"messagePlaceEnter": "notice",
|
||||
"reject": "danger",
|
||||
"approve": "notice",
|
||||
"disable": "danger",
|
||||
@ -41,9 +45,6 @@
|
||||
},
|
||||
"input": {
|
||||
"place": "场景",
|
||||
"process_time": "开始时间",
|
||||
"plan_status": "计划状态",
|
||||
"task_count": "任务数量",
|
||||
"My Place": "我的场景",
|
||||
"user_uid": "用户",
|
||||
"user_name": "用户昵称",
|
||||
@ -67,7 +68,6 @@
|
||||
"auth_status": "认证状态",
|
||||
"auth_avatar": "认证头像",
|
||||
"auth_background": "认证背景",
|
||||
"paymentlist_status": "支付状态",
|
||||
"qrcode_type": "链接类型",
|
||||
"apply_status": "申请状态",
|
||||
"allow_status": "审批状态",
|
||||
@ -88,7 +88,10 @@
|
||||
"init": "初始化",
|
||||
"info": "详情",
|
||||
"class": "基类",
|
||||
"table": "应用"
|
||||
"table": "应用",
|
||||
"process_time": "开始时间",
|
||||
"plan_status": "计划状态",
|
||||
"task_count": "任务数量"
|
||||
},
|
||||
"value": {
|
||||
"user_place_role": {
|
||||
|
@ -18,8 +18,7 @@ type qrcode struct {
|
||||
}
|
||||
|
||||
func (s qrcode) ApplyQRCode(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_FG, "blue")
|
||||
s.info(m, arg[0], "apply")
|
||||
s.info(m.Options(ice.MSG_FG, "blue"), arg[0], "apply")
|
||||
s.EchoQRCode(m, arg[0], s.Prefix(m, s.apply)).Echo("请让申请人扫码,然后审批权限")
|
||||
}
|
||||
func (s qrcode) PlaceQRCode(m *ice.Message, arg ...string) {
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,78 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type quotalist struct {
|
||||
Table
|
||||
fields string `data:"place_uid,title,content,vendor,total"`
|
||||
}
|
||||
|
||||
func (s quotalist) AfterMigrate(m *ice.Message, arg ...string) {
|
||||
s.Table.AfterMigrate(m, arg...)
|
||||
if s.PrefixPortal(m) == api.RENZHENGSHOUQUAN_PORTAL {
|
||||
s.insert(m, "service", "3-1", 10, "10人", "在线会议人数上限", api.GONGANXITONG_MEETING)
|
||||
s.insert(m, "service", "3-2", 30, "30人", "在线会议人数上限", api.GONGANXITONG_MEETING)
|
||||
s.insert(m, "service", "3-3", 50, "50人", "在线会议人数上限", api.GONGANXITONG_MEETING)
|
||||
|
||||
s.insert(m, "service", "3-1", 100*1024*1024, "100M", "在线文档存储容量", api.GONGANXITONG_DOCUMENT)
|
||||
s.insert(m, "service", "3-2", 300*1024*1024, "300M", "在线文档存储容量", api.GONGANXITONG_DOCUMENT)
|
||||
s.insert(m, "service", "3-3", 500*1024*1024, "500M", "在线文档存储容量", api.GONGANXITONG_DOCUMENT)
|
||||
|
||||
s.insert(m, "service", "3-1", 1024*1024*1024, "1G", "在线相册存储容量", api.GONGANXITONG_PHOTO)
|
||||
s.insert(m, "service", "3-2", 3*1024*1024*1024, "3G", "在线相册存储容量", api.GONGANXITONG_PHOTO)
|
||||
s.insert(m, "service", "3-3", 5*1024*1024*1024, "5G", "在线相册存储容量", api.GONGANXITONG_PHOTO)
|
||||
|
||||
s.insert(m, "company", "4-1", 10, "10个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "company", "4-2", 30, "30个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "company", "4-3", 50, "50个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
|
||||
s.insert(m, "school", "5-1", 10, "10个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "school", "5-2", 30, "30个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "school", "5-3", 50, "50个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
|
||||
s.insert(m, "street", "6-1", 10, "10个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "street", "6-2", 30, "30个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
s.insert(m, "street", "6-3", 50, "50个", "服务认证数量上限", api.RENZHENGSHOUQUAN_AUTH)
|
||||
}
|
||||
}
|
||||
func (s quotalist) Matrix(m *ice.Message, arg ...string) {
|
||||
msg := m.Spawn()
|
||||
s.Tables(msg, goodslist{})
|
||||
s.Fields(msg, "goodslist_title", "quotalist_title", "quotalists.content", "amount")
|
||||
list := []string{}
|
||||
data := kit.Dict()
|
||||
amount := map[string]string{}
|
||||
s.Select(msg).Table(func(value ice.Maps) {
|
||||
kit.Value(data, kit.Keys(value["quotalist_title"], value["goodslist_title"]), value[model.CONTENT])
|
||||
kit.If(kit.IndexOf(list, value["goodslist_title"]) == -1, func() { list = append(list, value["goodslist_title"]) })
|
||||
amount[value["goodslist_title"]] = value[model.AMOUNT]
|
||||
})
|
||||
kit.For(data, func(key string, value ice.Any) {
|
||||
m.Push("会员定价", key)
|
||||
kit.For(list, func(k string) { m.Push(k, kit.Format(kit.Value(value, k))) })
|
||||
})
|
||||
m.Push("会员定价", "会员价/月")
|
||||
kit.For(list, func(k string) { m.Push(k, kit.Format("¥ %v", kit.Float(amount[k])/100)) })
|
||||
m.DisplayTable()
|
||||
}
|
||||
func (s quotalist) List(m *ice.Message, arg ...string) {
|
||||
s.Matrix(m)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(quotalist{Table: newTable()}) }
|
||||
|
||||
func (s quotalist) insert(m *ice.Message, auth, level string, total int, content, title string, arg ...string) {
|
||||
uid := kit.Hashs(auth, level, kit.Select(m.PrefixKey(), arg, 0))
|
||||
if s.Select(m.Spawn(), model.UID, uid).Length() > 0 {
|
||||
return
|
||||
}
|
||||
s.Insert(m, model.UID, uid, model.PLACE_UID, auth,
|
||||
model.GOODSLIST_UID, kit.Hashs(auth, level), model.TITLE, title, model.CONTENT, content,
|
||||
model.TOTAL, kit.Format(total), model.VENDOR, kit.Select(m.PrefixKey(), arg, 0))
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title]},
|
||||
{view: html.OUTPUT, list: [value.content]},
|
||||
] }, function(event) {})
|
||||
},
|
||||
})
|
@ -2,8 +2,7 @@ package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
"shylinux.com/x/icebergs/base/web/html"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
@ -28,14 +27,14 @@ func (s recent) Create(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s recent) Remove(m *ice.Message, arg ...string) {
|
||||
s.Delete(m, m.OptionSimple(model.USER_UID, model.UID)...)
|
||||
s.Delete(m, m.OptionSimple(model.UID, model.USER_UID)...)
|
||||
}
|
||||
func (s recent) List(m *ice.Message, arg ...string) {
|
||||
m.Option(model.USER_UID, m.Option(ice.MSG_USERUID))
|
||||
s.Tables(m, s.service).Fields(m, s.Key(s, model.UID), s.Key(s, model.UPDATED_AT),
|
||||
model.PLACE_UID, s.Key(s, model.PLACE_NAME), s.Key(s, model.PLACE_AVATAR),
|
||||
model.SERVICE_UID,
|
||||
model.PLACE_UID, s.Key(s, model.PLACE_NAME), s.Key(s, model.PLACE_AVATAR), s.Key(s, model.AUTH_STATUS), model.SCORE,
|
||||
s.Key(s, model.CITY_NAME), s.Key(s, model.STREET_NAME), model.SERVICE_NAME, model.SERVICE_ICON,
|
||||
s.Key(s, model.AUTH_STATUS), model.SCORE, s.AS(model.NODENAME, model.SPACE), model.INDEX,
|
||||
s.AS(model.NODENAME, model.SPACE), model.INDEX, model.SERVICE_UID,
|
||||
)
|
||||
if len(arg) < 2 {
|
||||
s.Orders(m, s.Desc(model.SCORE), s.Desc(s.Key(s, model.UPDATED_AT)))
|
||||
@ -53,13 +52,9 @@ func (s recent) List(m *ice.Message, arg ...string) {
|
||||
s.DisplayBase(m, "")
|
||||
}
|
||||
func (s recent) Open(m *ice.Message, arg ...string) {
|
||||
m.Option("style", "portal")
|
||||
m.Option(model.TITLE, m.Option(model.PLACE_NAME))
|
||||
m.Option(ice.MSG_USERPOD, m.Option(web.SPACE))
|
||||
m.ProcessOpen(m.Cmdx(m.Option("index"), s.Link, m.Option(model.PLACE_UID)))
|
||||
return
|
||||
m.ProcessOpen(web.S(m.Option(web.SPACE)) + web.C(m.Option(ctx.INDEX)) + "?" + s.Keys(s.Place, model.UID) + "=" + m.Option("place_uid") + "#" + kit.Join(kit.Split(m.Option(ctx.ARGS)), ":"))
|
||||
m.ProcessOpen(web.S(m.Option(web.SPACE)) + web.C(m.Option(ctx.INDEX)) + "?" + s.Keys(s.Place, model.UID) + "=" + m.Option("place_uid") + "#" + kit.Join(kit.Split(m.Option(ctx.ARGS)), ":"))
|
||||
m.Options(html.STYLE, html.PORTAL, model.TITLE, m.Option(model.PLACE_NAME))
|
||||
s.Select(m, m.OptionSimple(model.UID)...)
|
||||
m.ProcessOpen(s.SpaceLink(m, m.Option(model.SPACE), m.Option(model.INDEX), m.Append(model.PLACE_UID)))
|
||||
}
|
||||
func (s recent) Sticky(m *ice.Message, arg ...string) {
|
||||
s.Update(m, ice.Map{model.SCORE: 100}, m.OptionSimple(model.USER_UID, model.UID)...)
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
@ -1,24 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type search struct{ Tables }
|
||||
|
||||
func (s search) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) < 2 {
|
||||
m.Cmdy(s.Place, s.Select).Action()
|
||||
} else if len(arg) == 2 {
|
||||
m.FieldsSetDetail().Cmdy(s.Place, s.Select, model.UID, arg[1]).Action()
|
||||
}
|
||||
m.RenameAppend(model.TYPE, s.Keys(s.Place, model.TYPE))
|
||||
s.SelectJoin(m, s.Street, model.NAME, model.CITY_UID)
|
||||
s.SelectJoinCity(m)
|
||||
s.SelectJoinUser(m)
|
||||
s.DisplayBase(m, "")
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(search{Tables: newTables()}) }
|
@ -1,14 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
return [
|
||||
{view: html.TITLE, list: [value.name||value.title||value.user_name]},
|
||||
{view: html.STATUS, list: [value.uid && value.uid.slice(0, 6), can.onimport.timeView(can, value)]},
|
||||
{view: html.STATUS, list: [value.city_name, value.street_name, value.company_name]},
|
||||
{view: html.OUTPUT, list: [value.info||value.content]},
|
||||
]
|
||||
}, function(event, value) { can.onaction._goback(can)
|
||||
can.onimport.plugin(can, {args: [value.uid]})
|
||||
})
|
||||
},
|
||||
})
|
@ -12,6 +12,7 @@ import (
|
||||
"shylinux.com/x/icebergs/base/nfs"
|
||||
"shylinux.com/x/icebergs/base/tcp"
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
"shylinux.com/x/icebergs/base/web/html"
|
||||
"shylinux.com/x/icebergs/core/code"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
@ -26,10 +27,10 @@ type service struct {
|
||||
autogen string `name:"autogen name* help* class* table* dream" icon:"bi bi-plus-square-dotted"`
|
||||
oauth string `name:"oauth" icon:"bi bi-shield-fill-check"`
|
||||
open string `name:"open" role:"void"`
|
||||
conf string `name:"conf" role:"void"`
|
||||
clean string `name:"clean" help:"清理" role:"void"`
|
||||
online string `name:"online" help:"上架" style:"notice" role:"tech"`
|
||||
offline string `name:"offline" help:"下架" style:"danger" role:"tech"`
|
||||
conf string `name:"conf"`
|
||||
clean string `name:"clean" help:"清理"`
|
||||
online string `name:"online" help:"上架" style:"notice"`
|
||||
offline string `name:"offline" help:"下架" style:"danger"`
|
||||
}
|
||||
|
||||
func ServiceUID(m *ice.Message) string {
|
||||
@ -44,7 +45,7 @@ func (s service) Inputs(m *ice.Message, arg ...string) {
|
||||
func (s service) Update(m *ice.Message, arg ...string) {
|
||||
uid := ServiceUID(m)
|
||||
if s.Select(m.Spawn(), model.UID, uid).Length() == 0 {
|
||||
s.Insert(m, kit.Simple(model.UID, uid, model.INDEX, m.Prefix(web.PORTAL), tcp.NODETYPE, ice.Info.NodeType, tcp.NODENAME, ice.Info.NodeName, nfs.PATHNAME, ice.Info.Pwd, tcp.HOSTNAME, ice.Info.Hostname)...)
|
||||
s.Insert(m, kit.Simple(model.UID, uid, model.INDEX, s.PrefixPortal(m), tcp.NODETYPE, ice.Info.NodeType, tcp.NODENAME, ice.Info.NodeName, nfs.PATHNAME, ice.Info.Pwd, tcp.HOSTNAME, ice.Info.Hostname)...)
|
||||
}
|
||||
s.Table.Update(m, kit.Dict(arg, m.OptionSimple(mdb.NAME, mdb.ICON), nfs.MODULE, ice.Info.Make.Module, nfs.VERSION, ice.Info.Make.Versions()), model.UID, uid)
|
||||
m.Cmd(s.PrefixPortal(m), Portal{}.CommandUpdate, uid)
|
||||
@ -127,6 +128,7 @@ func (s service) List(m *ice.Message, arg ...string) {
|
||||
s.DisplayBase(m, "")
|
||||
}
|
||||
func (s service) Open(m *ice.Message, arg ...string) {
|
||||
m.Options(html.STYLE, html.PORTAL, model.TITLE, m.Option(model.NAME))
|
||||
s.spaceOpen(m, m.Option(ctx.INDEX))
|
||||
}
|
||||
func (s service) Conf(m *ice.Message, arg ...string) {
|
||||
@ -139,7 +141,7 @@ func (s service) Data(m *ice.Message, arg ...string) {
|
||||
s.spaceOpen(m, web.CODE_MYSQL_QUERY, aaa.SESS, "mysql", mdb.DATABASE, s.name(m))
|
||||
}
|
||||
func (s service) Clean(m *ice.Message, arg ...string) {
|
||||
s.spaceOpen(m, strings.ReplaceAll(m.Option(ctx.INDEX), "portal", "clean"))
|
||||
s.spaceOpen(m, strings.ReplaceAll(m.Option(ctx.INDEX), web.PORTAL, "clean"))
|
||||
}
|
||||
func (s service) Online(m *ice.Message, arg ...string) {
|
||||
s.Table.Update(m, kit.Simple(model.STATUS, ServiceOnline), m.OptionSimple(model.UID)...)
|
||||
@ -154,8 +156,6 @@ func (s service) name(m *ice.Message) string {
|
||||
return kit.Select("", strings.Split(m.Option(ctx.INDEX), "."), -2)
|
||||
}
|
||||
func (s service) spaceOpen(m *ice.Message, index string, arg ...ice.Any) {
|
||||
m.Option("style", "portal")
|
||||
m.Option(model.TITLE, m.Option(model.NAME))
|
||||
m.ProcessOpen(kit.MergeURL(web.S(m.Option(web.SPACE))+web.C(index), arg...))
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@ -14,16 +14,36 @@ type sess struct {
|
||||
user user
|
||||
fields string `data:"user_uid,agent,system,location,ip,ua"`
|
||||
create string `name:"create user_uid*"`
|
||||
repair string `name:"repair"`
|
||||
list string `name:"list uid auto" role:"tech"`
|
||||
}
|
||||
|
||||
func (s sess) Create(m *ice.Message, arg ...string) {
|
||||
s.Insert(m, kit.Simple(model.USER_UID, m.Option(model.USER_UID),
|
||||
m.Options(web.ParseUA(m.Message)).OptionSimple(model.IP, model.UA, model.AGENT, model.SYSTEM),
|
||||
model.LOCATION, kit.Format(web.PublicIP(m.Message, m.Option(ice.MSG_USERIP))),
|
||||
)...)
|
||||
model.LOCATION, kit.Format(web.PublicIP(m.Message, m.Option(ice.MSG_USERIP))))...)
|
||||
m.ProcessCookie(ice.MSG_SESSID, m.Option(ice.MSG_SESSID, kit.JoinWord(web.SPACE, m.Option(ice.MSG_USERPOD), m.PrefixKey(), aaa.CHECK, m.Result())), "-2")
|
||||
}
|
||||
func (s sess) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
if m.IsTech() {
|
||||
s.Tables(m, user{}).FieldsWithCreatedAT(m, s, kit.Split("user_uid,name,info,avatar,background,agent,system,location,ip,ua")).Limit(m, 3000)
|
||||
s.Select(m, arg...).PushAction(s.Remove).Action(s.Repair)
|
||||
}
|
||||
} else {
|
||||
s.SelectDetail(m, s.Key(s, model.UID), arg[0])
|
||||
}
|
||||
}
|
||||
func (s sess) Check(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.UID, arg[0])
|
||||
msg = m.Cmd(s.user, s.Select, model.UID, msg.Append(model.USER_UID))
|
||||
m.Option(ice.MSG_USERROLE, aaa.VOID)
|
||||
m.Option(ice.MSG_USERNAME, msg.Append(model.UID))
|
||||
m.Option(ice.MSG_USERNICK, msg.Append(model.NAME))
|
||||
m.Option(ice.MSG_LANGUAGE, msg.Append(model.LANGUAGE))
|
||||
m.Option(ice.MSG_AVATAR, msg.Append(model.AVATAR))
|
||||
m.Option(ice.MSG_USERUID, msg.Append(model.UID))
|
||||
m.OptionDefault(model.USER_UID, msg.Append(model.UID))
|
||||
}
|
||||
func (s sess) Repair(m *ice.Message, arg ...string) {
|
||||
m.Cmdy("").Table(func(value ice.Maps) {
|
||||
if false {
|
||||
@ -39,24 +59,5 @@ func (s sess) Repair(m *ice.Message, arg ...string) {
|
||||
}
|
||||
})
|
||||
}
|
||||
func (s sess) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
if m.IsTech() {
|
||||
s.Tables(m, user{}).FieldsWithCreatedAT(m, s, kit.Split("user_uid,name,info,avatar,background,agent,system,location,ip,ua")).Limit(m, 3000)
|
||||
s.Select(m, arg...).PushAction(s.Remove).Action(s.Repair)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s sess) Check(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.UID, arg[0])
|
||||
msg = m.Cmd(s.user, s.Select, model.UID, msg.Append(model.USER_UID))
|
||||
m.Option(ice.MSG_USERROLE, aaa.VOID)
|
||||
m.Option(ice.MSG_USERNAME, msg.Append(model.UID))
|
||||
m.Option(ice.MSG_USERNICK, msg.Append(model.NAME))
|
||||
m.Option(ice.MSG_LANGUAGE, msg.Append(model.LANGUAGE))
|
||||
m.Option(ice.MSG_AVATAR, msg.Append(model.AVATAR))
|
||||
m.Option(ice.MSG_USERUID, msg.Append(model.UID))
|
||||
m.Option(model.USER_UID, msg.Append(model.UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(sess{}) }
|
||||
|
@ -3,4 +3,7 @@ $output>div.item span.name { flex-grow:1; }
|
||||
$output>div.item span.outer { background-color:gray; border-radius:12px; padding:2px; height:24px; width:40px; display:inline-block; float:right; }
|
||||
$output>div.item span.inner { border-radius:10px; background-color:white; height:20px; width:20px; display:inline-block; }
|
||||
$output>div.item span.outer.on { background-color:var(--notice-bg-color); }
|
||||
$output>div.item span.outer.on span.inner { float:right; }
|
||||
$output>div.item span.outer.on span.inner { float:right; }
|
||||
$output>div.item.story {
|
||||
flex-grow:1;
|
||||
}
|
@ -2,48 +2,38 @@ package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/aaa"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type setting struct {
|
||||
Table
|
||||
recent recent
|
||||
service service
|
||||
order string `data:"103"`
|
||||
role string `data:"leader,worker,server"`
|
||||
short string `data:"name"`
|
||||
field string `data:"name,type,help,role"`
|
||||
fields string `data:"name,value,user_uid"`
|
||||
create string `name:"create name* type* help" role:"tech"`
|
||||
update string `name:"update" role:"void"`
|
||||
placeTrash string `name:"placeTrash" help:"删除数据" style:"danger" role:"leader"`
|
||||
recent recent
|
||||
service service
|
||||
order string `data:"103"`
|
||||
role string `data:"leader,worker,server"`
|
||||
short string `data:"name"`
|
||||
field string `data:"name,type,help,role,order"`
|
||||
fields string `data:"name,value,user_uid"`
|
||||
create string `name:"create name* type* help"`
|
||||
update string `name:"update" role:"void"`
|
||||
}
|
||||
|
||||
func (s setting) Init(m *ice.Message, arg ...string) {
|
||||
s.Table.Init(m, arg...)
|
||||
s.Create(m, model.NAME, SETTING_PROFILE, model.TYPE, SETTING_RADIO)
|
||||
s.Create(m, model.NAME, SETTING_PROFILE, model.TYPE, SETTING_RADIO, model.ORDER, "1")
|
||||
}
|
||||
func (s setting) Create(m *ice.Message, arg ...string) {
|
||||
s.Hash.Create(m, arg...)
|
||||
}
|
||||
func (s Table) SettingCreate(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Prefix(m, setting{}), s.Create, model.NAME, arg[0], model.TYPE, arg[1], arg[2:])
|
||||
}
|
||||
func (s Table) SettingSelect(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.Prefix(m, setting{}), s.Select, m.OptionSimple(model.PLACE_UID)).Table(func(value ice.Maps) {
|
||||
if value[model.USER_UID] != "" && value[model.USER_UID] != m.Option(model.USER_UID) {
|
||||
return
|
||||
}
|
||||
m.Option(value[model.NAME], value[model.VALUE])
|
||||
})
|
||||
}
|
||||
func (s setting) Update(m *ice.Message, arg ...string) {
|
||||
msg := s.Hash.Select(m.Spawn(), m.Option(model.NAME))
|
||||
args := m.OptionSimple(model.PLACE_UID, model.USER_UID, model.NAME)
|
||||
switch msg.Append("role") {
|
||||
case "tech":
|
||||
switch msg.Append(model.ROLE) {
|
||||
case aaa.TECH:
|
||||
if m.IsTech() {
|
||||
args = m.OptionSimple(model.PLACE_UID, model.NAME)
|
||||
} else {
|
||||
@ -78,19 +68,35 @@ func (s setting) List(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), args...)
|
||||
msg.Table(func(value ice.Maps) { data[value[model.NAME]] = value[model.VALUE] })
|
||||
s.Hash.List(m.Spawn()).Table(func(value ice.Maps) {
|
||||
if value["role"] == "tech" && !m.IsTech() {
|
||||
// m.Push(model.VALUE, "")
|
||||
} else if value["role"] == "creator" && !s.IsCreator(m) {
|
||||
// m.Push(model.VALUE, "")
|
||||
} else if value["role"] == "leader" && !s.IsLeader(m) {
|
||||
if value[model.ROLE] == aaa.TECH && !m.IsTech() {
|
||||
|
||||
} else if value[model.ROLE] == "creator" && !s.IsCreator(m) {
|
||||
|
||||
} else if value[model.ROLE] == "leader" && !s.IsLeader(m) {
|
||||
|
||||
} else {
|
||||
m.Push(model.NAME, value[model.NAME])
|
||||
m.Push(model.TYPE, value[model.TYPE])
|
||||
m.Push(model.HELP, value[model.HELP])
|
||||
m.Push(model.ORDER, value[model.ORDER])
|
||||
m.Push(model.VALUE, data[value[model.NAME]])
|
||||
}
|
||||
}).Action()
|
||||
})
|
||||
if msg := m.Cmd(s.Place, s.Select, model.UID, m.Option(model.PLACE_UID)); msg.Append(model.AUTH_UID) != "" {
|
||||
m.Push(model.NAME, "authPortal")
|
||||
m.Push(model.TYPE, SETTING_STORY)
|
||||
m.Push(model.HELP, "进入服务认证的主页")
|
||||
m.Push(model.ORDER, "10")
|
||||
m.Push(model.VALUE, kit.Fields(api.RENZHENGSHOUQUAN_PORTAL, msg.Append(model.AUTH_UID)))
|
||||
}
|
||||
if msg := m.Cmd(user{}, s.Select, model.UID, m.Option(ice.MSG_USERUID)); msg.Append(model.AUTH_UID) != "" {
|
||||
m.Push(model.NAME, "authPortal")
|
||||
m.Push(model.TYPE, SETTING_STORY)
|
||||
m.Push(model.HELP, "进入个人认证的主页")
|
||||
m.Push(model.ORDER, "11")
|
||||
m.Push(model.VALUE, kit.Fields(api.RENZHENGSHOUQUAN_PORTAL, msg.Append(model.AUTH_UID)))
|
||||
}
|
||||
m.Action().SortInt(model.ORDER)
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID), model.NAME, arg[1])
|
||||
}
|
||||
@ -99,7 +105,25 @@ func (s setting) List(m *ice.Message, arg ...string) {
|
||||
|
||||
func init() { ice.TeamCtxCmd(setting{Table: newTable()}) }
|
||||
|
||||
func (s Table) SettingCreate(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.PrefixSetting(m), s.Create, model.NAME, arg[0],
|
||||
model.TYPE, kit.Select(SETTING_RADIO, arg, 1),
|
||||
model.HELP, kit.Select("", arg, 2),
|
||||
model.ROLE, kit.Select("", arg, 3),
|
||||
model.ORDER, kit.Select("1000", arg, 4),
|
||||
)
|
||||
}
|
||||
func (s Table) SettingSelect(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.PrefixSetting(m), s.Select, m.OptionSimple(model.PLACE_UID)).Table(func(value ice.Maps) {
|
||||
if value[model.USER_UID] != "" && value[model.USER_UID] != m.Option(model.USER_UID) {
|
||||
return
|
||||
}
|
||||
m.Option(value[model.NAME], value[model.VALUE])
|
||||
})
|
||||
}
|
||||
|
||||
const (
|
||||
SETTING_RADIO = "radio"
|
||||
SETTING_PROFILE = "profile"
|
||||
SETTING_RADIO = "radio"
|
||||
SETTING_STORY = "story"
|
||||
)
|
||||
|
@ -1,8 +1,19 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.page.Append(can, can._output, msg.Table(function(value) {
|
||||
return {view: html.ITEM, list: [{text: [value.help||can.user.trans(can, value.name, null, "value.setting"), "", mdb.NAME]}, can.onimport[value.type](can, value)]}
|
||||
return {view: [[html.ITEM, value.type, value.name]], list: [{text: [value.help||can.user.trans(can, value.name, null, "value.setting"), "", mdb.NAME]}, can.onimport[value.type](can, value)]}
|
||||
}))
|
||||
if (!can.misc.isDebug(can)) { return }
|
||||
sessionStorage.length && can.onimport._plugin(can, {index: "can.sessionStorage"})
|
||||
localStorage.length && can.onimport._plugin(can, {index: "can.localStorage"})
|
||||
can.user.isTechOrRoot(can) && can.onimport._plugin(can, {index: "can.cookie"})
|
||||
},
|
||||
_plugin: function(can, value) { value.width = can.ConfWidth()-20
|
||||
can.onappend.plugin(can, value, function(sub) {
|
||||
sub.onexport.output = function() {
|
||||
if (!sub._output.innerHTML) { can.onmotion.hidden(can, sub._target) }
|
||||
}
|
||||
})
|
||||
},
|
||||
radio: function(can, value) {
|
||||
return {text: ["", "", ["outer", value.value]], list: [{text: ["", "", "inner"]}], onclick: function(event) {
|
||||
@ -10,4 +21,12 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.runAction(can.request(event, value, can.Option(), {_toast: value.name}), mdb.UPDATE, [])
|
||||
}}
|
||||
},
|
||||
story: function(can, value) {
|
||||
return {text: ["", "i", "bi bi-chevron-double-right"], _init: function(target) {
|
||||
target.parentNode.onclick = function() {
|
||||
var list = can.core.Split(value.value)
|
||||
can.onimport.myStory(can, {index: list[0], args: list.slice(1)})
|
||||
}
|
||||
}}
|
||||
},
|
||||
})
|
@ -1,56 +0,0 @@
|
||||
package gonganxitong
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type spendlist struct {
|
||||
Table
|
||||
fields string `data:"vendor,total,count,expire_time"`
|
||||
}
|
||||
|
||||
func (s spendlist) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 2 {
|
||||
s.Tables(m, quotalist{})
|
||||
s.Fields(m, "quotalists.title,quotalists.content,expire_time,spendlists.vendor,spendlists.total,count")
|
||||
s.Select(m, s.Key(s, model.PLACE_UID), arg[0], model.PAYMENTLIST_UID, arg[1]).Display("")
|
||||
}
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(spendlist{Table: newTable()}) }
|
||||
|
||||
func (s Table) SpendlistCheck(m *ice.Message, size int) bool {
|
||||
if size == 0 && m.Length() == 0 {
|
||||
return true
|
||||
}
|
||||
if size == 0 && m.Result() != "" {
|
||||
return true
|
||||
}
|
||||
msg := m.Cmd(s.Prefix(m, spendlist{}), s.Select, m.OptionSimple(model.PLACE_UID), model.VENDOR, m.PrefixKey())
|
||||
m.Echo("%s / %s",
|
||||
strings.TrimSuffix(kit.FmtSize(kit.Int(msg.Append(model.COUNT))), "B"),
|
||||
strings.TrimSuffix(kit.FmtSize(kit.Int(msg.Append(model.TOTAL))), "B"),
|
||||
)
|
||||
m.Option(model.SPENDLIST_UID, msg.Option(model.UID))
|
||||
if kit.Int(msg.Append(model.COUNT))+size >= kit.Int(msg.Append(model.TOTAL)) {
|
||||
if !m.Warn(size > 0, "存储空间不足,请及时续费或清理空间") {
|
||||
m.SetResult()
|
||||
m.Echo("<span style='color:red'>存储空间不足,请及时续费或清理空间</span>").Action()
|
||||
}
|
||||
return false
|
||||
}
|
||||
kit.If(size > 0, func() { s.SpendlistCount(m, size) })
|
||||
return true
|
||||
}
|
||||
func (s Table) SpendlistCount(m *ice.Message, size int) {
|
||||
m.Cmd(s.Prefix(m, spendlist{}), s.AddCount, model.COUNT, size, m.Option(model.SPENDLIST_UID))
|
||||
}
|
||||
func (s Table) SpendlistUpdate(m *ice.Message, size string) {
|
||||
msg := m.Cmd(s.Prefix(m, spendlist{}), s.Select, model.PLACE_UID, m.Option(model.PLACE_UID), model.VENDOR, m.PrefixKey())
|
||||
m.Options(model.UID, msg.Append(model.UID)).Cmd(s.Prefix(m, spendlist{}), s.Modify, model.COUNT, size)
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.title||value.vendor]},
|
||||
{view: html.STATUS, list: [value.expire_time]},
|
||||
{view: html.OUTPUT, list: [can.base.Size(value.count), " / ", can.base.Size(value.total)]},
|
||||
] }, function(event) {})
|
||||
},
|
||||
})
|
@ -2,17 +2,14 @@ package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type street struct {
|
||||
Table
|
||||
city city
|
||||
modify string `name:"modify info" role:"tech"`
|
||||
list string `name:"list city_name street_name auto" role:"void"`
|
||||
authCreate string `name:"authCreate" role:"tech"`
|
||||
list string `name:"list uid auto"`
|
||||
}
|
||||
|
||||
func (s street) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
@ -23,24 +20,25 @@ func (s street) FindOrCreateByName(m *ice.Message, arg ...string) {
|
||||
arg[2], arg[3] = model.STREET_UID, msg.Append(model.UID)
|
||||
}
|
||||
}
|
||||
func (s street) Modify(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(m.OptionSimple(model.INFO)), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s street) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
m.Cmdy(s.city).RenameAppend(model.NAME, model.CITY_NAME)
|
||||
} else if msg := m.Cmd(s.city, arg[0]); len(arg) == 1 {
|
||||
s.Select(m, model.CITY_UID, msg.Append(model.UID)).Action()
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.CITY_UID, msg.Append(model.UID), model.NAME, arg[1])
|
||||
s.Select(m).Table(func(value ice.Maps) {
|
||||
if value[model.AUTH_UID] == "" && m.IsTech() {
|
||||
m.PushButton(s.AuthCreate, s.Delete)
|
||||
} else {
|
||||
m.PushButton()
|
||||
}
|
||||
}).Action()
|
||||
} else if len(arg) == 1 {
|
||||
s.SelectDetail(m, model.UID, arg[0])
|
||||
if m.Append(model.AUTH_UID) == "" && m.IsTech() {
|
||||
m.EchoInfoButton("请申请街道认证", s.AuthCreate)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (s street) AuthCreate(m *ice.Message, arg ...string) {
|
||||
msg := m.Cmd("web.team.gonganxitong.city", s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
s.Table.AuthCreate(m, 6, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
|
||||
msg := m.Cmd(city{}, s.Select, model.UID, m.Option(model.CITY_UID))
|
||||
s.Table.AuthCreate(m, api.AuthStreet, msg.Append(model.AUTH_UID), m.OptionSimple(model.UID)...)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(street{}) }
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@ -11,20 +11,24 @@ import (
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
|
||||
type user struct {
|
||||
Table
|
||||
setting setting
|
||||
order string `data:"509"`
|
||||
role string `data:"tech"`
|
||||
template string `data:"4b-Z_r8dZmm1pHdd2h4A10VVYX4OIHvemlLjsHKBj2s"`
|
||||
fields string `data:"auth_uid,language,name,info,avatar,background"`
|
||||
create string `name:"create open_id* avatar usernick"`
|
||||
modify string `name:"modify info" role:"void"`
|
||||
list string `name:"list uid auto" role:"void"`
|
||||
email string `name:"email email*"`
|
||||
list string `name:"list uid auto" role:"tech"`
|
||||
setCookie string `name:"setCookie" help:"切换"`
|
||||
sendCookie string `name:"sendCookie" help:"授权" role:"void"`
|
||||
authRemove string `name:"authRemove" help:"删除认证" role:"void"`
|
||||
email string `name:"email email*"`
|
||||
}
|
||||
|
||||
func (s user) Create(m *ice.Message, arg ...string) {
|
||||
@ -50,13 +54,7 @@ func (s user) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
if m.IsTech() {
|
||||
s.Limit(m, 3000)
|
||||
s.Select(m, arg...).Table(func(value ice.Maps) {
|
||||
if value[model.UID] != m.Option(model.USER_UID) {
|
||||
m.PushButton(s.SetCookie, s.Remove)
|
||||
} else {
|
||||
m.PushButton()
|
||||
}
|
||||
})
|
||||
s.Select(m, arg...)
|
||||
m.EchoQRCode(m.MergePodCmd("", m.PrefixKey()+"/action/sendCookie", ice.FROM_DAEMON, m.Option(ice.MSG_DAEMON))).Echo("<br/>").Echo("请扫码授权")
|
||||
m.StatusTimeCount(mdb.TOTAL, s.SelectTotal(m))
|
||||
}
|
||||
@ -66,15 +64,24 @@ func (s user) List(m *ice.Message, arg ...string) {
|
||||
m.EchoInfoButton("请申请个人认证", s.AuthCreate)
|
||||
}
|
||||
}
|
||||
s.SelectJoinAuth(m)
|
||||
m.Table(func(value ice.Maps) {
|
||||
button := []ice.Any{}
|
||||
defer func() { m.PushButton(button...) }()
|
||||
if value[model.AUTH_UID] != "" && value[model.AUTH_STATUS] != "issued" && (value[model.UID] == m.Option(ice.MSG_USERUID) || m.IsTech()) {
|
||||
button = append(button, s.AuthRemove)
|
||||
}
|
||||
button = append(button, s.AuthRemove)
|
||||
if m.IsTech() && value[model.UID] != m.Option(ice.MSG_USERUID) {
|
||||
button = append(button, s.SetCookie, s.Remove)
|
||||
}
|
||||
})
|
||||
}
|
||||
func (s user) SelectTotal(m *ice.Message, arg ...string) string {
|
||||
msg := m.Spawn()
|
||||
s.Fields(msg, "count(*) AS total")
|
||||
return s.Select(msg, arg...).Append(model.TOTAL)
|
||||
}
|
||||
func (s user) Email(m *ice.Message, arg ...string) {
|
||||
s.Table.Update(m, kit.Dict(m.OptionSimple(model.EMAIL)))
|
||||
}
|
||||
func (s user) AuthCreate(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.UID, m.Option(model.USER_UID))
|
||||
if msg.Length() == 0 {
|
||||
@ -83,18 +90,29 @@ func (s user) AuthCreate(m *ice.Message, arg ...string) {
|
||||
} else {
|
||||
m.Options(msg.AppendSimple(model.NAME, model.INFO))
|
||||
}
|
||||
s.Table.AuthCreate(m, 2, m.Option(model.AUTH_UID))
|
||||
s.Table.AuthCreate(m, api.AuthPersonal, m.Option(model.AUTH_UID))
|
||||
}
|
||||
func (s user) AuthRemove(m *ice.Message, arg ...string) {
|
||||
if m.WarnNotRight(!m.IsTech() && m.Option(model.UID) != m.Option(ice.MSG_USERUID)) {
|
||||
return
|
||||
}
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.UID)...)
|
||||
if m.WarnNotValid(msg.Append(model.AUTH_UID) == "") {
|
||||
return
|
||||
}
|
||||
m.Cmd(api.RENZHENGSHOUQUAN_CLEAN, "prune", msg.Option(model.AUTH_UID))
|
||||
s.Update(m, ice.Maps{model.AUTH_UID: ""}, m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s user) SetCookie(m *ice.Message, arg ...string) {
|
||||
m.ProcessCookie(ice.MSG_USERUID, m.Option(model.UID))
|
||||
}
|
||||
func (s user) SendCookie(m *ice.Message, arg ...string) {
|
||||
if m.Option(ice.MSG_METHOD) == http.MethodGet {
|
||||
m.EchoInfoButton("请确认授权", s.SendCookie)
|
||||
} else {
|
||||
m.Cmd(web.SPACE, m.Option(ice.FROM_DAEMON), "cookie", m.Option(model.USER_UID), model.USER_UID)
|
||||
m.Cmd(web.SPACE, m.Option(ice.FROM_DAEMON), "cookie", m.Option(ice.MSG_USERUID), ice.MSG_USERUID)
|
||||
}
|
||||
}
|
||||
func (s user) SetCookie(m *ice.Message, arg ...string) {
|
||||
m.ProcessCookie(model.USER_UID, m.Option(model.UID))
|
||||
}
|
||||
func (s user) SendTemplate(m *ice.Message, arg ...string) { // from uid url type name hash
|
||||
msg := s.Select(m, model.UID, kit.Select(m.Option(model.USER_UID), arg, 1))
|
||||
m.Cmdy("web.chat.wx.template", "", m.Config(nfs.TEMPLATE), msg.Append(model.OPEN_ID), kit.Select("", arg, 2),
|
||||
@ -102,5 +120,8 @@ func (s user) SendTemplate(m *ice.Message, arg ...string) { // from uid url type
|
||||
"time11", time.Now().Format("2006年01月02日 15:04"), "thing18", kit.Select(kit.Select(m.Option(ice.MSG_USERNAME), m.Option(ice.MSG_USERNICK)), arg, 0),
|
||||
)
|
||||
}
|
||||
func (s user) Email(m *ice.Message, arg ...string) {
|
||||
s.Table.Update(m, kit.Dict(m.OptionSimple(model.EMAIL)))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(user{}) }
|
||||
|
@ -12,6 +12,6 @@ import (
|
||||
func main() { print(ice.Run()) }
|
||||
|
||||
func init() {
|
||||
ice.Info.CodeMain = "src/gonganxitong/portal.go"
|
||||
ice.Info.NodeMain = "web.team.gonganxitong.portal"
|
||||
ice.Info.CodeMain = "src/renzhengshouquan/portal.go"
|
||||
ice.Info.NodeMain = "web.team.renzhengshouquan.portal"
|
||||
}
|
||||
|
59
src/main.shy
@ -14,4 +14,61 @@ field web.code.mysql.client
|
||||
field web.code.mysql.query args `mysql gonganxitong`
|
||||
field web.chat.wx.access
|
||||
field web.chat.wx.menu
|
||||
field web.team.gonganxitong.service
|
||||
field web.team.gonganxitong.service
|
||||
|
||||
order `
|
||||
sess.go
|
||||
sess.js
|
||||
user.go
|
||||
userPlace.go
|
||||
place.go
|
||||
street.go
|
||||
city.go
|
||||
|
||||
qrcode.go
|
||||
apply.go
|
||||
apply.js
|
||||
allow.css
|
||||
allow.go
|
||||
allow.js
|
||||
event.go
|
||||
event.js
|
||||
notice.go
|
||||
setting.css
|
||||
setting.go
|
||||
setting.js
|
||||
member.css
|
||||
member.go
|
||||
member.js
|
||||
credit.go
|
||||
|
||||
market.css
|
||||
market.go
|
||||
market.js
|
||||
domain.go
|
||||
thumb.go
|
||||
comment.go
|
||||
favor.go
|
||||
message.go
|
||||
message.js
|
||||
recent.go
|
||||
recent.js
|
||||
service.go
|
||||
service.js
|
||||
command.go
|
||||
support.css
|
||||
support.go
|
||||
support.js
|
||||
grant.go
|
||||
clean.go
|
||||
email.go
|
||||
|
||||
model
|
||||
portal.css
|
||||
portal.go
|
||||
portal.js
|
||||
portal.json
|
||||
common.go
|
||||
common.js
|
||||
template
|
||||
`
|
||||
|
@ -4,75 +4,109 @@ import (
|
||||
"shylinux.com/x/ice"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
)
|
||||
|
||||
type Auth struct {
|
||||
Table
|
||||
cert cert
|
||||
order string `data:"2"`
|
||||
models string `data:"auth"`
|
||||
fields string `data:"from_uid,score,name,info,auth_type,auth_status,avatar,background,service_uid,place_uid,user_uid"`
|
||||
memberList string `name:"memberList" role:"worker"`
|
||||
certList string `name:"certList" role:"worker"`
|
||||
issue string `name:"issue" role:"worker"`
|
||||
revoke string `name:"revoke" role:"worker"`
|
||||
setScore string `name:"setScore score" role:"void"`
|
||||
cert cert
|
||||
order string `data:"2"`
|
||||
models string `data:"auth"`
|
||||
auth string `data:"issued"`
|
||||
fields string `data:"from_uid,name,info,auth_type,auth_status,avatar,background,score,service_uid,place_uid,value_uid,user_uid"`
|
||||
authMain string `name:"authMain" role:"worker"`
|
||||
memberList string `name:"memberList" role:"worker"`
|
||||
certList string `name:"certList" role:"worker"`
|
||||
cityInfo string `name:"cityInfo" role:"worker"`
|
||||
streetInfo string `name:"streetInfo" role:"worker"`
|
||||
companyInfo string `name:"companyInfo" role:"worker"`
|
||||
personalInfo string `name:"personalInfo" role:"worker"`
|
||||
placeMain string `name:"placeMain" role:"worker"`
|
||||
issue string `name:"issue" role:"worker"`
|
||||
revoke string `name:"revoke" role:"worker"`
|
||||
setScore string `name:"setScore score" role:"worker"`
|
||||
}
|
||||
|
||||
func (s Auth) Remove(m *ice.Message, arg ...string) {
|
||||
s.Delete(m)
|
||||
}
|
||||
func (s Auth) SetScore(m *ice.Message, arg ...string) {
|
||||
s.Update(m, arg, m.OptionSimple(model.UID)...)
|
||||
}
|
||||
func (s Auth) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
s.Select(m, model.FROM_UID, arg[0]).Action()
|
||||
defer s.authSort(m)
|
||||
} else if len(arg) == 2 {
|
||||
m.Cmdy(s.cert, arg[1]).PushAction().Action()
|
||||
return
|
||||
s.SelectDetail(m, model.FROM_UID, arg[0], model.UID, arg[1]).Action(s.CertList, s.MemberList)
|
||||
s.SelectDetail(m, model.FROM_UID, arg[0], model.UID, arg[1])
|
||||
}
|
||||
kit.If(m.Length() == 0, func() { m.Echo("请等待认证申请") })
|
||||
m.Table(func(value ice.Maps) {
|
||||
button := []ice.Any{s.AuthMain, s.MemberList}
|
||||
defer func() { m.PushButton(button...) }()
|
||||
switch AuthType(kit.Int(value[model.AUTH_TYPE])) {
|
||||
case AuthCity:
|
||||
button = append(button, s.CityInfo)
|
||||
case AuthStreet:
|
||||
button = append(button, s.StreetInfo)
|
||||
case AuthCompany:
|
||||
button = append(button, s.CertList, s.CompanyInfo)
|
||||
case AuthPersonal:
|
||||
button = append(button, s.CertList, s.PersonalInfo)
|
||||
case AuthService:
|
||||
button = append(button, s.PlaceMain)
|
||||
}
|
||||
switch AuthStatus(kit.Int(value[model.AUTH_STATUS])) {
|
||||
case AuthCreate:
|
||||
m.PushButton(s.Issue, s.Remove)
|
||||
button = append(button, s.Issue)
|
||||
case AuthIssued:
|
||||
m.PushButton(s.SetScore, s.Revoke)
|
||||
button = append(button, s.SetScore, s.Revoke)
|
||||
case AuthRevoked:
|
||||
m.PushButton(s.Issue, s.Remove)
|
||||
default:
|
||||
m.PushButton()
|
||||
button = append(button, s.Issue)
|
||||
}
|
||||
}).Display("").DisplayCSS("")
|
||||
}
|
||||
func (s Auth) AuthMain(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(s.PrefixPortal(m), m.Option(model.UID))
|
||||
}
|
||||
func (s Auth) MemberList(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(s.PrefixMember(m), m.Option(model.UID))
|
||||
}
|
||||
func (s Auth) CertList(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(cert{}, m.Option(model.UID))
|
||||
}
|
||||
func (s Auth) CityInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.GONGANXITONG_CITY, m.Option(model.NAME))
|
||||
}
|
||||
func (s Auth) StreetInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.GONGANXITONG_STREET, m.Option(model.VALUE_UID))
|
||||
}
|
||||
func (s Auth) CompanyInfo(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.GUANLIXITONG_COMPANY, m.Option(model.VALUE_UID))
|
||||
}
|
||||
func (s Auth) PersonalInfo(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.UID)...)
|
||||
m.ProcessField(api.GONGANXITONG_USER, msg.Option(model.USER_UID))
|
||||
}
|
||||
func (s Auth) PlaceMain(m *ice.Message, arg ...string) {
|
||||
msg := s.SelectJoinService(m.Cmd("", s.Select, m.OptionSimple(model.UID)))
|
||||
m.ProcessPodCmd(msg.Append("nodename"), msg.Append(model.INDEX), msg.Append(model.PLACE_UID))
|
||||
}
|
||||
func (s Auth) Issue(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.UID, m.Option(model.AUTH_UID))
|
||||
if m.WarnNotValid(AuthStatus(kit.Int(msg.Append(model.AUTH_STATUS))) != AuthIssued, "本服务还未认证") {
|
||||
return
|
||||
}
|
||||
s.Update(m, kit.Dict(model.STATUS, AuthIssued), model.UID, m.Option(model.UID), model.FROM_UID, m.Option(model.AUTH_UID))
|
||||
}
|
||||
func (s Auth) Revoke(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(model.STATUS, AuthRevoked), model.UID, m.Option(model.UID), model.FROM_UID, m.Option(model.AUTH_UID))
|
||||
}
|
||||
func (s Auth) SetScore(m *ice.Message, arg ...string) {
|
||||
s.Update(m, arg, model.UID, m.Option(model.UID), model.FROM_UID, m.Option(model.AUTH_UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Auth{}) }
|
||||
|
||||
func (s Auth) SelectList(m *ice.Message, arg ...string) {
|
||||
s.Table.SelectList(m, arg...).RenameAppend(model.TYPE, model.AUTH_TYPE, model.STATUS, model.AUTH_STATUS)
|
||||
s.RewriteAppend(m)
|
||||
}
|
||||
func (s Auth) MemberList(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(m.Prefix("member"), arg[1])
|
||||
}
|
||||
func (s Auth) CertList(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.cert, arg[1]).Action()
|
||||
kit.If(m.Length() == 0, func() { m.Echo("没有上传证件") })
|
||||
}
|
||||
func (s Auth) Issue(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.UID, m.Option(model.AUTH_UID))
|
||||
if !m.IsTech() || AuthType(kit.Int(msg.Append(model.AUTH_TYPE))) != AuthRoot {
|
||||
if m.WarnNotValid(AuthStatus(kit.Int(msg.Append(model.AUTH_STATUS))) != AuthIssued, "本服务还未认证") {
|
||||
return
|
||||
}
|
||||
}
|
||||
s.Update(m, kit.Dict(model.STATUS, AuthIssued), model.FROM_UID, m.Option(model.AUTH_UID), model.UID, m.Option(model.UID))
|
||||
}
|
||||
func (s Auth) Revoke(m *ice.Message, arg ...string) {
|
||||
s.Update(m, kit.Dict(model.STATUS, AuthRevoked), model.FROM_UID, m.Option(model.AUTH_UID), model.UID, m.Option(model.UID))
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(Auth{}) }
|
||||
|
||||
type AuthType int
|
||||
|
||||
|
@ -2,7 +2,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.name, value.score, can.onimport.textView(can, value, AUTH_TYPE), can.onimport.titleAction(can, value)]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
{view: html.STATUS, list: [can.onimport.uidView(can, value), can.onimport.timeView(can, value), can.onimport.textView(can, value)]},
|
||||
{view: html.CONTENT, list: [value.info]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -35,22 +35,6 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
s.Table.Inputs(m, arg...)
|
||||
}
|
||||
}
|
||||
func (s Table) Config(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func (s Table) AuthList(m *ice.Message, auth_uid string, cb func(value ice.Maps, auth bool)) {
|
||||
m.Cmdy(api.RENZHENGSHOUQUAN_AUTH, auth_uid).Table(func(value ice.Maps) {
|
||||
if value[model.AUTH_STATUS] == AuthIssued.String() {
|
||||
cb(value, true)
|
||||
} else {
|
||||
cb(value, false)
|
||||
}
|
||||
})
|
||||
}
|
||||
func (s Table) authSort(m *ice.Message, arg ...string) {
|
||||
s.RewriteAppend(m)
|
||||
m.Sort("auth_status,auth_type,score,created_at", []string{"issued"},
|
||||
[]string{"personal", "root", "city", "street", "school", "company", "service"}, ice.INT_R, ice.STR_R)
|
||||
}
|
||||
func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
if _, e := strconv.ParseInt(value, 10, 64); e != nil {
|
||||
@ -74,13 +58,29 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
}
|
||||
|
||||
func (s Table) GetAuthUID(m *ice.Message, arg ...string) string {
|
||||
// auth_uid := m.Cmdx(ctx.CONFIG, api.RENZHENGSHOUQUAN_PORTAL, kit.Keym(model.AUTH_UID))
|
||||
// m.Info("default auth_uid %v", auth_uid)
|
||||
// return auth_uid
|
||||
msg := m.Cmd(Auth{}, s.Select, model.TYPE, AuthRoot)
|
||||
m.Info("default auth_uid %v", msg.Append(model.UID))
|
||||
return msg.Append(model.UID)
|
||||
}
|
||||
func (s Table) Config(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func (s Table) AuthList(m *ice.Message, auth_uid string, cb func(value ice.Maps, auth bool)) {
|
||||
m.Cmdy(api.RENZHENGSHOUQUAN_AUTH, auth_uid).Table(func(value ice.Maps) {
|
||||
if value[model.AUTH_STATUS] == AuthIssued.String() {
|
||||
cb(value, true)
|
||||
} else {
|
||||
cb(value, false)
|
||||
}
|
||||
})
|
||||
}
|
||||
func (s Table) authSort(m *ice.Message, arg ...string) {
|
||||
if m.FieldsIsDetail() {
|
||||
return
|
||||
}
|
||||
s.RewriteAppend(m)
|
||||
m.Sort("auth_status,auth_type,score,created_at",
|
||||
[]string{"issued"}, []string{"root", "city", "street", "school", "company", "service", "personal"}, ice.INT_R, ice.STR_R)
|
||||
}
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
||||
|
@ -36,10 +36,13 @@ const (
|
||||
CITY_UID = "city_uid"
|
||||
CITY_NAME = "city_name"
|
||||
FROM_UID = "from_uid"
|
||||
SERVICE_UID = "service_uid"
|
||||
FROM_USER_UID = "from_user_uid"
|
||||
TO_USER_UID = "to_user_uid"
|
||||
PLACE_UID = "place_uid"
|
||||
STORAGE_UID = "storage_uid"
|
||||
VALUE_UID = "value_uid"
|
||||
SERVICE_UID = "service_uid"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
STORAGE_UID = "storage_uid"
|
||||
SPACE = "space"
|
||||
INDEX = "index"
|
||||
VALUE = "value"
|
||||
@ -66,6 +69,7 @@ type Auth struct {
|
||||
Background string `gorm:"type:varchar(255)"`
|
||||
ServiceUID string `gorm:"type:char(32)"`
|
||||
PlaceUID string `gorm:"type:char(32)"`
|
||||
ValueUID string `gorm:"type:char(32)"`
|
||||
StorageUID string `gorm:"type:char(32)"`
|
||||
DashboardUID string `gorm:"type:char(32)"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
@ -100,11 +104,11 @@ type Transition struct {
|
||||
db.ModelWithUID
|
||||
AuthUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
FromAccountUID string `gorm:"type:char(32);index"`
|
||||
ToAccountUID string `gorm:"type:char(32);index"`
|
||||
Type uint8 `gorm:"default:0"`
|
||||
Status uint8 `gorm:"default:0"`
|
||||
Amount int `gorm:"default:0"`
|
||||
FromAccountUID string `gorm:"type:char(32);index"`
|
||||
ToAccountUID string `gorm:"type:char(32);index"`
|
||||
}
|
||||
|
||||
func init() { db.CmdModels("", &UserAuth{}, &Auth{}, &Cert{}, &Account{}, &Transition{}) }
|
||||
|
@ -45,9 +45,12 @@ func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
||||
func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace,
|
||||
model.AUTH_UID, model.AUTH_NAME, model.AUTH_INFO, model.AUTH_AVATAR,
|
||||
model.AUTH_TYPE, model.AUTH_STATUS, model.USER_AUTH_ROLE)
|
||||
model.AUTH_TYPE, model.AUTH_STATUS, model.USER_AUTH_ROLE,
|
||||
model.SCORE,
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, s.Key(s.UserPlace, model.USER_UID), arg[0])
|
||||
Auth{}.authSort(m)
|
||||
} else if len(arg) == 2 {
|
||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Table.Select, s.Key(s.UserPlace, model.USER_UID), arg[0], s.Key(s.Place, model.UID), arg[1])
|
||||
} else {
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"portal": "认证授权",
|
||||
"cert": "上传证件", "auth": "认证授权", "admin": "管理后台", "profile": "用户名片",
|
||||
"account": "账户", "transition": "账单",
|
||||
"certList": "证件", "memberList": "成员",
|
||||
"issue": "认证", "revoke": "吊销", "enter": "进入",
|
||||
"verify": "验证",
|
||||
"setScore": "排序",
|
||||
"cert": "上传证件", "auth": "认证授权", "profile": "用户名片", "account": "账户", "transition": "账单",
|
||||
"authMain": "认证主页", "memberList": "成员列表", "certList": "证件列表",
|
||||
"cityInfo": "城市信息", "streetInfo": "街道信息", "companyInfo": "公司信息", "personalInfo": "个人信息", "placeMain": "服务主页",
|
||||
"issue": "认证", "revoke": "吊销", "setScore": "排序",
|
||||
"admin": "管理后台",
|
||||
"enter": "进入", "verify": "验证",
|
||||
"style": {
|
||||
"issue": "notice",
|
||||
"revoke": "danger",
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
type profile struct {
|
||||
Auth
|
||||
order string `data:"3"`
|
||||
modify string `name:"modify info" role:"leader,worker"`
|
||||
upload string `name:"upload" role:"leader,worker"`
|
||||
modify string `name:"modify info" role:"leader"`
|
||||
upload string `name:"upload" role:"leader"`
|
||||
authList string `name:"authList" role:"void"`
|
||||
memberList string `name:"memberList" role:"void"`
|
||||
serviceList string `name:"serviceList" role:"void"`
|
||||
@ -29,33 +29,24 @@ func (s profile) Upload(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s profile) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 {
|
||||
s.Select(m).PushAction(s.Remove)
|
||||
return
|
||||
}
|
||||
s.Select(m, model.UID, arg[0]).Action()
|
||||
name := m.Append(model.NAME)
|
||||
button := []ice.Any{}
|
||||
if AuthType(kit.Int(m.Append(model.AUTH_TYPE))) == AuthService {
|
||||
button = append(button, s.Enter)
|
||||
}
|
||||
kit.If(s.IsWorker(m), func() { button = append(button, s.Modify) })
|
||||
name := m.Append(model.NAME)
|
||||
switch AuthType(kit.Int(m.Append(model.AUTH_TYPE))) {
|
||||
case AuthService:
|
||||
s.SelectJoinRecent(m, "")
|
||||
s.SelectJoinService(m)
|
||||
button = append(button, s.Enter)
|
||||
name = kit.JoinWord(m.Append(model.CITY_NAME), m.Append(model.STREET_NAME), m.Append(model.PLACE_NAME))
|
||||
case AuthCompany:
|
||||
// kit.If(s.IsWorker(m), func() { m.PushAction(s.Modify, s.Enter) }, func() { m.PushAction() })
|
||||
case AuthPersonal:
|
||||
s.SelectJoinUser(m)
|
||||
case AuthCity:
|
||||
case AuthRoot:
|
||||
}
|
||||
m.PushAction(button...)
|
||||
m.EchoQRCode(s.Link(m, arg[0], m.PrefixKey())).Echo(name)
|
||||
kit.If(s.IsWorker(m), func() { button = append(button, s.Modify) })
|
||||
m.PushAction(button...).EchoQRCode(s.Link(m, arg[0], m.PrefixKey())).Echo(name)
|
||||
m.Display("").DisplayCSS("")
|
||||
s.RewriteAppend(m)
|
||||
// s.RewriteAppend(m)
|
||||
}
|
||||
func (s profile) AuthList(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.Auth, arg[0]).Table(func(value ice.Maps) {
|
||||
@ -70,24 +61,20 @@ func (s profile) AuthList(m *ice.Message, arg ...string) {
|
||||
s.authSort(m)
|
||||
}
|
||||
func (s profile) MemberList(m *ice.Message, arg ...string) {
|
||||
user_uid := m.Option(model.USER_UID)
|
||||
user_uid := m.Option(ice.MSG_USERUID)
|
||||
s.Fields(m, model.USER_UID)
|
||||
s.settingProfile(m, model.PLACE_UID, arg[0])
|
||||
if m.Length() == 0 {
|
||||
return
|
||||
}
|
||||
s.SelectJoinUser(m, model.NAME, model.INFO, model.AVATAR, model.BACKGROUND, model.AUTH_UID)
|
||||
s.SelectJoinAuth(m)
|
||||
m.Table(func(value ice.Maps) {
|
||||
if value[model.AUTH_STATUS] == "" && value[model.USER_UID] == user_uid {
|
||||
// m.PushButton(s.AuthPersonal, s.Enter)
|
||||
m.PushButton(s.AuthPersonal)
|
||||
m.PushButton(s.AuthPersonal, s.Enter)
|
||||
} else {
|
||||
// m.PushButton(s.Enter)
|
||||
m.PushButton(s.Enter)
|
||||
}
|
||||
})
|
||||
s.authSort(m)
|
||||
s.RewriteAppend(m)
|
||||
// s.RewriteAppend(m)
|
||||
}
|
||||
func (s profile) ServiceList(m *ice.Message, arg ...string) {
|
||||
msg := m.Spawn()
|
||||
@ -100,8 +87,8 @@ func (s profile) ServiceList(m *ice.Message, arg ...string) {
|
||||
s.SelectList(m, kit.Simple(model.PLACE_UID, kit.Sort(list))...)
|
||||
s.SelectJoinRecent(m, "")
|
||||
s.SelectJoinService(m)
|
||||
s.authSort(m)
|
||||
m.PushAction(s.Enter)
|
||||
s.authSort(m)
|
||||
}
|
||||
func (s profile) FromList(m *ice.Message, arg ...string) {
|
||||
from := arg[0]
|
||||
|
@ -22,7 +22,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
if (!can.base.isIn(msg.Option(USER_ROLE), "1", "2", "3")) { delete(can.onaction.updateAvatar), delete(can.onaction.updateBackground) }
|
||||
},
|
||||
authList: function(can, msg, action, uid, target) {
|
||||
can.runAction({}, action||"authList", [uid||msg.Append(UID)], function(msg) { if (msg.Length() == 0) { return can.onmotion.hidden(can, target) }
|
||||
can.runAction({}, action||"authList", [uid||msg.Append(UID)], function(msg) { if (msg.Length() == 0) { return target && can.onmotion.hidden(can, target) }
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
return [
|
||||
{view: html.TITLE, list: [value.name, can.onimport.authView(can, value), can.onimport.textView(can, value, AUTH_TYPE), can.onimport.titleAction(can, value)]},
|
||||
|
@ -1,17 +1,31 @@
|
||||
package renzhengshouquan
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
)
|
||||
|
||||
type transition struct {
|
||||
Table
|
||||
order string `data:"5"`
|
||||
fields string `data:"transition_type,status,amount,from_account_uid,to_account_uid"`
|
||||
create string `name:"create transition_type* amount* from_account_uid to_account_uid" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
order string `data:"5"`
|
||||
fields string `data:"transition_type,status,amount,from_account_uid,to_account_uid"`
|
||||
create string `name:"create transition_type* amount* from_account_uid to_account_uid" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
testMarket string `name:"testMarket domain_uid*:select title* content price" style:"notice" role:"leader"`
|
||||
testMessage string `name:"testMessage from_user_uid*:select to_user_uid*:select title* content price" style:"notice" role:"worker"`
|
||||
testTemplate string `name:"testMessage from_user_uid*:select to_user_uid*:select title*" style:"notice" role:"worker"`
|
||||
}
|
||||
|
||||
func (s transition) List(m *ice.Message, arg ...string) {
|
||||
s.ValueList(m, arg).Display("")
|
||||
m.PushAction(s.TestMessage, s.TestMarket)
|
||||
}
|
||||
func (s transition) TestMessage(m *ice.Message, arg ...string) {
|
||||
s.SendMessage(m, m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID), arg...)
|
||||
}
|
||||
func (s transition) TestMarket(m *ice.Message, arg ...string) {
|
||||
s.MarketInsert(m, arg...)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(transition{}) }
|
||||
|