mirror of
https://shylinux.com/x/community
synced 2025-05-08 14:48:11 +08:00
14 lines
1018 B
JavaScript
14 lines
1018 B
JavaScript
Volcanos(chat.ONIMPORT, {
|
|
_init: function(can, msg) {
|
|
var PLACE_NAME = msg.Option("_place_name"), PLACE_TYPE = msg.Option("_place_type"), USER_PLACE_ROLE = msg.Option("_user_place_role")
|
|
PLACE_TYPE || can.core.List(msg.append, function(key) { can.base.endWith(key, "_type") && (PLACE_TYPE = key), can.base.endWith(key, "_role") && (USER_PLACE_ROLE = key) })
|
|
can.onimport.myView(can, msg, function(value) { return [
|
|
{view: html.TITLE, list:[value.title||value.name||value.user_name, can.onimport.textView(can, value, PLACE_TYPE), can.onimport.textView(can, value, USER_PLACE_ROLE)]},
|
|
{view: html.STATUS, list: [value.city_name, value.company_name||value.street_name, value.place_name]},
|
|
{view: html.STATUS, list: [value.uid && value.uid.slice(0, 6), can.onimport.timeView(can, value), value.user_name]},
|
|
value.address && {view: html.STATUS, list: [value.address]},
|
|
value.content && {view: html.OUTPUT, list: [value.content]},
|
|
value.info && {view: html.OUTPUT, list: [value.info]},
|
|
] })
|
|
},
|
|
}) |