Commit 0a8145d0 by huangqy

提交

parent 5e5e4279
......@@ -31,6 +31,7 @@ require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da5369
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -48,3 +49,5 @@ require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd')
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -62,6 +62,7 @@ require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da5369
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -79,6 +80,8 @@ require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd')
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
......@@ -31,6 +31,7 @@ require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da5369
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -48,3 +49,5 @@ require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd')
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -58,6 +58,7 @@ require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da5369
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -75,6 +76,8 @@ require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd')
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
import dd from 'gdt-jsapi';
var system = dd.getSystemInfoSync()
var ptf = system.platform.toUpperCase()
var aplus = require('./utils/aplus_mini.js')(
{
'metaInfo':{
'appId':ptf=='ANDROID'?'28302650':ptf=='IOS'?'28328447':'47130293',
'aplus-rhost-v':'alog.zjzwfw.gov.cn',
'aplus-rhost-g':'alog.zjzwfw.gov.cn',
}
}
);
App({
aplus,
// 全局变量,获取方法getApp().globalData
globalData: {
// 域名,用于发送请求
host: 'http://192.168.3.101:15556',
service: 'http://192.168.3.90:8044',
host: 'http://122.112.148.157:7081',
service: 'http://122.112.148.157:7080',
userInfo : {}
},
onLaunch(options) {
......
......@@ -16,7 +16,9 @@
"pages/carTj/carTj",
"pages/changeCrop/changeCrop",
"pages/myApply/myApply",
"pages/orderFinish/orderFinish"
"pages/orderFinish/orderFinish",
"pages/sysOrder/sysOrder",
"pages/editUser/editUser"
],
"window": {
"defaultTitle": "智能车辆钥匙管理小程序",
......
......@@ -26,6 +26,7 @@
layer="vertical"
name="reason"
onPickerTap="reasonPickerChange">任务类型</picker-item>
<input-item data-field="destination" placeholder="请输入" value="{{destination}}" layer="vertical" name="destination" clear="{{true}}" onClear="onClear">任务地点</input-item>
<picker-item data-field="start_time" placeholder="请选择" value="{{start_time}}" layer="vertical" name="start_time" onPickerTap="dateStartPicker">开始用车时间</picker-item>
<picker-item
......@@ -36,7 +37,7 @@
name="end_time"
onPickerTap="dateEndPicker">用车结束时间</picker-item>
<input-item data-field="timeNumber" value="{{timeNumber}}" layer="vertical" name="timeNumber" disabled='true'>时长</input-item>
<input-item data-field="destination" placeholder="请输入" value="{{destination}}" layer="vertical" name="destination" clear="{{true}}" onClear="onClear">任务地点</input-item>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn">提交</button>
</view>
......
......@@ -18,6 +18,7 @@ Page({
},
onLoad() {
this.getLogList()
this.getCarList()
},
getLogList() {
let data = {
......@@ -37,6 +38,21 @@ Page({
}
})
},
getCarList() {
let data = {
pageNo: 1,
pageSize: 100,
}
http.post(getApp().globalData.service + '/api/T_Equipment/GetList', data).then(res => {
if (res.Success) {
this.setData({
car: res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
......
<view>
<form onSubmit="handleSubmit" onReset="onReset">
<input-item data-field="username" value="{{username}}" layer="vertical" name="username" disabled='true'>用户账号</input-item>
<input-item data-field="realname" value="{{realname}}" layer="vertical" name="realname" disabled='true'>用户姓名</input-item>
<picker-item
data-field="deptName"
placeholder="请选择"
value="{{deptName}}"
layer="vertical"
name="deptName"
onPickerTap="deptPickerChange">用户部门</picker-item>
<list>
<block a:for="{{roleList}}">
<list-item
arrow="{{false}}"
index="{{index}}"
key="items-{{index}}"
last="{{index === (items.length - 1)}}"
>
<view style="display: flex; align-items: center;">
<am-checkbox data-id="{{item.id}}" id="{{item.id}}" value="{{item.id}}" ctrlChecked="{{item.ctrlChecked}}" onChange="onChange" />
<label for="{{item.id}}">{{item.roleName}}</label>
</view>
</list-item>
</block>
</list>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn">提交</button>
</view>
</form>
</view>
import http from '../../src/http';
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
Page({
data: {
id: '',
deptList: [],
roleList: [],
},
onLoad(query) {
if (query.id) {
this.setData({
id: query.id,
username: query.username,
realname: query.realname,
deptName: query.deptName,
})
this.loadDept()
this.loadRole()
}
},
loadDept() {
http.get('/jeecg/sys/sysDepart/listAll').then(res => {
if(res.success) {
this.setData({
deptList: res.result
})
}
})
},
loadRole() {
http.get('/jeecg/sys/role/queryall').then(res => {
if(res.success) {
this.loadUserRole(res.result)
}
})
},
loadUserRole(roleList) {
http.get('/jeecg/sys/user/queryUserRole', {userid: this.data.id}).then(res => {
if(res.success) {
roleList.forEach(element => {
if (res.result.includes(element.id)) {
element.ctrlChecked = true;
}
})
this.setData({
roleList
})
}
})
},
deptPickerChange() {
my.showActionSheet({
title: '选择用户部门',
items: this.data.deptList.map(i => i.departName),
cancelButtonText: '取消',
success: (res) => {
this.setData({
deptName: this.data.deptList.map(i => i.departName)[res.index]
});
},
});
},
onChange(e) {
const { id } = e.currentTarget.dataset;
const { value } = e.detail;
const { roleList } = this.data;
roleList.forEach((element) => {
if (element.id === id) {
element.ctrlChecked = value;
}
});
this.setData({
roleList
});
},
handleSubmit(e) {
let formData = {}
formData = e.detail.value
formData.id = this.data.id
formData.selecteddeparts = this.data.deptList.find(i => i.departName == this.data.deptName ).id
formData.selectedroles = this.data.roleList.filter(i => i.ctrlChecked).map(j => j.id).join(',')
http.post(getApp().globalData.host + '/jeecg/sys/user/edit', formData).then(res => {
if(res.success) {
dd.redirectTo({
url: '../sysUser/sysUser'
})
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
});
{
"defaultTitle": "人员编辑",
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"input-item": "mini-ali-ui/es/input-item/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"multi-liner": "mini-ali-ui/es/multi-liner/index",
"am-checkbox": "mini-ali-ui/es/am-checkbox/index"
},
"allowsBounceVertical": "NO"
}
......@@ -5,7 +5,7 @@
}
.grid-item {
width: 20%;
width: 44%;
text-align: center;
padding-top: 28%;
margin-left: 4%;
......
......@@ -83,7 +83,7 @@ Page({
},
showPage(event) {
let _id = event.target.dataset.id
dd.navigateTo({
dd.redirectTo({
url: '../orderDetail/orderDetail?id=' + _id
})
},
......
......@@ -31,8 +31,8 @@
</view>
</view>
<view a:if={{orderInfo.detailsList.length > 0}}>
<title style="margin-top: 20rpx">用车信息</title>
<view style="height: 480rpx;" a:if={{orderInfo.detailsList.length > 0}}>
<title style="margin-top: 20rpx;">用车信息</title>
<view class="form-row">
<view class="form-row-label-single" a:if={{ userInfo.userId == orderInfo.applicant_userid }}>取车码:</view>
<view class="form-row-label-single" a:if={{ userInfo.userId == orderInfo.applicant_userid }}>{{ orderInfo.detailsList[0].pickUpCode }}</view>
......@@ -44,6 +44,13 @@
<view class="form-row-label-single">{{ orderInfo.detailsList[0].returnTime }}</view>
</view>
</view>
<view a:else>
<title style="margin-top: 20rpx"></title>
<view class="form-row">
</view>
</view>
<view a:if={{showSubmit}}>
<view class="page-submit">
<flex>
......@@ -52,4 +59,13 @@
</flex>
</view>
</view>
<view a:if={{showAction}}>
<view class="page-submit">
<flex>
<flex-item><button type="primary" size="mini" class="submit-approve-btn" onTap="getCar" a:if="{{orderInfo.state == 1}}">更换车辆</button></flex-item>
<flex-item><button type="primary" size="mini" class="submit-approve-btn" onTap="finishOrder" a:if="{{orderInfo.state == 1}}">结束订单</button></flex-item>
</flex>
</view>
</view>
</view>
\ No newline at end of file
......@@ -7,6 +7,7 @@ Page({
orderInfo: {},
id: '',
showSubmit: false,
showAction: false,
activeIndex: 1,
processList: [],
userInfo: {}
......@@ -16,7 +17,8 @@ Page({
this.setData({
id: query.id,
userInfo: getApp().globalData.userInfo,
showSubmit: query.showSubmit ? query.showSubmit : false
showSubmit: query.showSubmit ? query.showSubmit : false,
showAction: query.showAction ? query.showAction : false
})
this.getDetail(query.id)
}
......@@ -78,7 +80,7 @@ Page({
formData = Object.assign(formData, res.result)
http.post(getApp().globalData.service + '/api/T_Borrow/ApproveBorrow', formData).then(res => {
if (res.Success) {
dd.navigateTo({
dd.redirectTo({
url: '../orderList/orderList'
})
} else {
......@@ -96,4 +98,45 @@ Page({
equipment_id: this.data.carList[e.detail.value].carId
});
},
getCar() {
const that = this
http.post(getApp().globalData.service + '/api/T_Borrow/GetCarList', {}).then(res => {
if (res.Success) {
my.optionsSelect({
title: "请选择车辆",
optionsOne: res.result.map(i => i.carNumber +'('+ i.name + ')'),
success(reg) {
if (reg.selectedOneIndex) {
that.changeCar(res.result[reg.selectedOneIndex])
}
}
});
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
changeCar(car) {
http.post(getApp().globalData.service + '/api/T_Borrow/ChangeCar', {id: this.data.id, equipment_id: car.id}).then(res => {
if (res.Success) {
dd.redirectTo({
url: '../sysOrder/sysOrder'
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
finishOrder() {
http.post(getApp().globalData.service + '/api/T_Borrow/Finish', {id: this.data.id }).then(res => {
if (res.Success) {
dd.redirectTo({
url: '../sysOrder/sysOrder'
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
}
});
{
"defaultTitle": "订单详情",
"usingComponents": {
"button": "mini-ali-ui/es/button/index",
"title": "mini-ali-ui/es/title/index",
......
......@@ -82,7 +82,7 @@ Page({
},
showPage(event) {
let _id = event.target.dataset.id
dd.navigateTo({
dd.redirectTo({
url: '../orderDetail/orderDetail?id=' + _id
})
},
......
import http from '../../src/http'
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
......@@ -10,6 +11,10 @@ Page({
onLoad() {
this.getOrderList()
},
onShow() {
// 页面显示
queue('orderList','订单列表',"pages/orderList/orderList")
},
getOrderList() {
let data = {
pageNo: this.data.pageNo,
......@@ -38,7 +43,7 @@ Page({
},
showPage(event) {
let _id = event.target.dataset.id
dd.navigateTo({
dd.redirectTo({
url: '../orderDetail/orderDetail?id=' + _id + '&showSubmit=true'
})
},
......
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
margin-top: 12rpx;
}
.container {
background: #eeeeee;
padding: 24rpx 0rpx 0rpx 0rpx;
height: 100%;
}
.container-item {
margin-bottom: 10rpx;
}
.item {
background: #fff;
height: 170rpx;
padding-top: 5rpx;
display: flex;
align-items: center;
justify-content: center;
}
.select {
display: flex;
height: 100rpx;
align-items: center;
justify-content: space-around;
}
.select .box {
display: flex;
align-items: center;
}
.select .box .name {
color: #999;
/* font-size: 26rpx; */
}
.select .box .active {
color: #212121;
/* font-size: 26rpx; */
}
.select .box image {
color: #999;
font-size: 35rpx;
position: relative;
top: -5rpx;
}
.filter-line {
border-bottom: 1px solid #f6f6f6;
}
.am-picker-content {
padding: 180rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<tabs tabs="{{tabs}}" tabsName="activeTab" onTabClick="handleTabClick" onChange="handleTabChange" activeTab="{{activeTab}}">
<block a:for="{{tabs}}">
<tab-content key="{{index}}"
tabId="{{index}}"
activeTab="{{activeTab}}">
<page-result
type="empty"
brief ="当前并无订单"
local="{{false}}" a:if='{{logList.length === 0}}'/>
<view a:else>
<block a:for="{{logList}}">
<list-item
thumb="http://122.112.148.157:5000/updateImg/sysOrder.png"
index="{{index}}"
arrow="{{false}}"
upperSubtitle="{{item.start_time}}"
lowerSubtitle="{{item.end_time}}"
last="{{index === (logList.length - 1)}}"
onClick="onItemClick"
data-order="{{item}}">
{{item.realname}}
<tag type="success" size="sm" slot="afterTitle">{{ item.stateValue }}</tag>
<list-secondary
title="{{item.destination}}"
subtitle="{{item.reason}}"
slot="extra" />
</list-item>
</block>
</view>
</tab-content>
</block>
</tabs>
<modal
show="{{modalOpened}}"
showClose="{{false}}"
onButtonClick="onButtonClick"
buttons="{{buttons}}"
>
<view slot="header">温馨提示</view>
是否结束该订单?
</modal>
</scroll-view>
import http from '../../src/http'
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
Page({
data: {
pageNo: 1,
pageSize: 10,
showTop: false,
modalOpened: false,
buttons: [
{ text: '取消' },
{ text: '确定', extClass: 'buttonBold' },
],
select: [
{
title: '选择车辆',
open: false
},
{
title: '选择时间',
open: false
}
],
tabs: [
// {
// title: '待审批'
// },
{
title: '待派车'
},
{
title: '待取车'
},
{
title: '待归还'
},
{
title: '已完成'
},
// {
// title: '驳回'
// },
],
activeTab: 0
},
onLoad() {
this.getOrderList()
},
getOrderList() {
let data = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
type: 3,
state: this.data.activeTab + 2,
userid: getApp().globalData.userInfo.userId
}
http.post(getApp().globalData.service + '/api/T_Borrow/GetPageList', data).then(res => {
if (res.Success) {
this.setData({
logList: res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
handleTabClick({ index, tabsName }) {
this.setData({
[tabsName]: index,
});
this.getOrderList()
},
handleTabChange({ index, tabsName }) {
this.setData({
[tabsName]: index
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
carNumber: this.data.carList[e.detail.value]
});
this.getOrderList()
},
onPullDownRefresh() {
// 页面被下拉
this.getOrderList();
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getOrderList();
},
skipSelect(e) {
if (e.target.dataset.index === 0) {
this.setData({
show: true
})
}
if (e.target.dataset.index === 1) {
this.setData({
showTop: true
})
}
},
onPopupClose() {
this.setData({
showTop: false,
});
},
handleCallBack(data) {
this.setData({
carNumber: data[0].value,
show: false
})
this.getOrderList()
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
start_time: res.date,
});
},
});
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
end_time: res.date,
});
},
});
},
dateSearch() {
this.setData({
showTop: false
});
this.getOrderList()
},
onItemClick(e) {
let _id = e.target.dataset.order.id
dd.navigateTo({
url: '../orderDetail/orderDetail?id=' + _id + '&showAction=true'
})
},
onButtonClick(e) {
const { target: { dataset } } = e;
this.setData({
modalOpened: false,
});
if (dataset.index === 1) {
}
}
});
{
"defaultTitle": "订单管理",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"list-secondary": "mini-ali-ui/es/list/list-secondary/index",
"tag": "mini-ali-ui/es/tag/index",
"filter": "mini-ali-ui/es/filter/index",
"filter-item": "mini-ali-ui/es/filter/filter-item/index",
"popup": "mini-ali-ui/es/popup/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index",
"tabs": "mini-ali-ui/es/tabs/index",
"tab-content": "mini-ali-ui/es/tabs/tab-content/index",
"modal": "mini-ali-ui/es/modal/index"
}
}
......@@ -8,27 +8,14 @@
brief ="当前并无用户数据"
local="{{false}}" a:if='{{userList.length === 0}}'/>
<view a:for="{{userList}}" a:else>
<list-item onClick="onItemClick" data-id="{{item.id}}">
<avatar name="{{item.realname + ' (' + (item.roleCodeTxt[0] == 'jy' ? '普通用户' : item.roleCodeTxt[0] == 'ld' ? '领导' : item.roleCodeTxt[0] === 'gly' ? '系统管理员' : '白名单') + ')'}}" desc="{{item.phone}}" src="{{item.avatar}}" />
</list-item>
<list-item
thumb="http://122.112.148.157:5000/updateImg/police.png"
upperSubtitle="{{item.roleCodeTxt}}"
lowerSubtitle="{{item.departIds_dictText}}">
{{item.realname}}
<tag type="success" size="sm" slot="afterTitle">{{ item.username }}</tag>
<view slot="extra">
<button size="mini" type="primary" onTap="editUser" data-info="{{item}}">编辑</button>
</view>
</view>
<modal
show="{{modalOpened}}"
showClose="{{false}}"
onButtonClick="onButtonClick"
buttons="{{buttons}}"
>
<view slot="header">温馨提示</view>
系统管理员无法变更, 是否交接?
</modal>
<modal
show="{{qrCodeModal}}"
onModalClick="onModalClick"
onModalClose="onModalClose"
>
<view style="margin: 20px 0 10px 0;">用钉钉扫一扫,交接为系统管理员</view>
<image mode="widthFix" style="width: 100%;" src="{{qrCode}}"/>
<view slot="footer" onTap="onChangeRole">我知道了</view>
</modal>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
import dd from 'gdt-jsapi';
Page({
data: {
......@@ -22,6 +23,7 @@ Page({
userId: getApp().globalData.userInfo.userId
})
this.getUserList()
this.getRoleList()
},
handleInput(value) {
this.setData({
......@@ -47,14 +49,10 @@ Page({
qrCodeModal: false,
});
},
onChangeRole() {
dd.redirectTo({ url: '/pages/index/index' })
},
getUserList() {
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
tenantId: getApp().globalData.tenantId,
realname: "*" + this.data.searchValue + "*"
}
http.get('/jeecg/sys/user/list', params).then(res => {
......@@ -67,6 +65,9 @@ Page({
}
})
},
getRoleList() {
},
onPullDownRefresh() {
this.setData({
pageSize: 10
......@@ -83,40 +84,10 @@ Page({
})
this.getUserList();
},
onItemClick(e) {
if (e.target.dataset.id === getApp().globalData.userInfo.userId) {
this.setData({
modalOpened: true,
});
} else {
my.showActionSheet({
title: '选择角色',
items: this.data.roleList.map(i => i.name),
cancelButtonText: '取消',
success: (res) => {
http.get('/jeecg/dingTalk/scan',{type: 3, userId: e.target.dataset.id, roleId: this.data.roleList[res.index].roleId, time: new Date().getTime()}).then(res => {
if (res.success) {
this.getUserList();
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
editUser(e) {
let user = e.target.targetDataset.info
dd.redirectTo({
url: '../editUser/editUser?id=' +user.id + '&username=' + user.username + '&realname=' + user.realname +'&deptName=' + user.departIds_dictText
})
}
},
onButtonClick(e) {
const { target: { dataset } } = e;
this.setData({
modalOpened: false,
});
if (dataset.index === 1) {
http.get('/jeecg/dingTalk/qrCode', {tenantId: getApp().globalData.tenantId, time: new Date().getTime()}).then(res => {
this.setData({
qrCodeModal: true,
qrCode: "data:image/jpg;base64," + res.result,
})
})
}
}
});
......@@ -5,6 +5,7 @@
"search-bar": "mini-ali-ui/es/search-bar/index",
"avatar": "antd-mini/es/Avatar/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"modal": "mini-ali-ui/es/modal/index"
"modal": "mini-ali-ui/es/modal/index",
"tag": "mini-ali-ui/es/tag/index"
}
}
......@@ -4,29 +4,52 @@ import dd from 'gdt-jsapi';
function login() {
getApp().globalData.userInfo = {userId: '15957116480', name: '黄麒宇', roleCodeList: ['jy', 'gly', 'cgkld'],sysDepart: {id: '813f982a4b71457a92003463120a2725', departName: '办公室'}}
if (!getApp().globalData.userInfo.sysDepart) {
dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
} else {
dd.redirectTo({ url: '/pages/my/my' })
}
// 获取免登授权码
// dd.getAuthCode({}).then(res => {
// if (res.code) {
// http.get('/jeecg/zzdApi/getUserInfo', {authCode: res.code}).then(res => {
// if(res.success){
// getApp().globalData.userInfo = res.result.userInfo
// if (!res.result.userInfo.sysDepart) {
// getApp().globalData.userInfo = {userId: '772477', name: '黄麒宇', roleCodeList: ['jy', 'gly', 'cgkld'],sysDepart: {id: '813f982a4b71457a92003463120a2725', departName: '办公室'}}
// if (!getApp().globalData.userInfo.sysDepart) {
// dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
// } else {
// dd.redirectTo({ url: '/pages/my/my' })
// }
// } else {
// util.ddToast({ type: 'fail', text: res.message })
// }
// })
// }
// })
// 获取免登授权码
dd.getAuthCode({}).then(res => {
if (res.code) {
http.get('/jeecg/zzdApi/getUserInfo', {authCode: res.code}).then(res => {
if(res.success){
getApp().globalData.userInfo = res.result.userInfo
var app = getApp();
// 如采集用户信息是异步行为需要先执行这个BLOCK埋点
app.aplus.aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'BLOCK']
});
//用户id和用户昵称需要埋政钉用户真实信息,用户ID必须用accountId ,用户昵称必须用employeeName,可通过开放平台接口获取。
// _user_id为用户ID
app.aplus.aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_id", res.result.userInfo.userId]
});
// _user_nick为用户昵称
app.aplus.aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_nick", res.result.userInfo.name]
});
app.aplus.aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'START']
});
if (!res.result.userInfo.sysDepart) {
dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
} else {
dd.redirectTo({ url: '/pages/my/my' })
}
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
}
})
}
export default login
......@@ -33,6 +33,11 @@ export const SHY_MENU_QUERY = [
export const SYS_MENU_QUERY = [
{
thumb: '../../src/assets/sysOrder.png',
page: '../sysOrder/sysOrder',
title: '订单管理'
},
{
thumb: '../../src/assets/user.png',
page: '../sysUser/sysUser',
title: '用户管理'
......@@ -43,11 +48,6 @@ export const SYS_MENU_QUERY = [
title: '车辆列表'
},
{
thumb: '../../src/assets/car.png',
page: '../sysCar/sysCar',
title: '订单管理'
},
{
thumb: '../../src/assets/carUseLog.png',
page: '../carUseLog/carUseLog',
title: '用车记录'
......
//接收3个参数:page_id,page_name,page_url
module.exports= function queue(metaId, metaName,metaPath) {
var app = getApp();
app.aplus.aplus_queue.push({
'action':'aplus.sendPV',
'arguments':[{
is_auto: false
}, {
sapp_id:'34411',
sapp_name:'zhkey',
// 自定义PV参数key-value键值对,以下内容必填,根据应用实际情况设置。
page_id: metaId,//'页面ID,与page 参数配合使用,保证唯一性',
page_name: metaName,//'页面中文名称'
page_url: metaPath
}]
})
//埋点end
};
\ No newline at end of file
/*! 2020-12-22 16:50:28 aplus_mini_cloud_202951027.js */
module.exports=function(t){function e(o){if(n[o])return n[o].exports;var a=n[o]={exports:{},id:o,loaded:!1};return t[o].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";n(2).initGlobal(),t.exports=function(t){var e=n(4);return n(68)(t,e)}},function(t,e,n){"use strict";var o,a=n(3),r=a.APLUS,s=a.APLUS_QUEUE,u=a.GOLDLOG,i=a.GOLDLOG_QUEUE,c=!1;try{o=window,c=!0}catch(t){}e.getContext=function(){return o},e.initGlobal=function(t){o=t?t:{v:1,aplus:{},aplus_queue:[]};var e,n;if(c)try{e=o.aplus||(o.aplus={});var a=o.goldlog_queue||(o.goldlog_queue=[]);n=o.aplus_queue||(o.aplus_queue=[]),n=a.concat(n)}catch(t){}else e=o.aplus,n=o.aplus_queue;return o.aplus=o.goldlog=e,o.aplus_queue=o.goldlog_queue=n,o};var p=function(t){if(t===r||t===u){var e=o[r]||o[u];return e||(e=o[r]=o[u]={}),e}var n=i,a=s;if(t===a||t===n){var c=o[a]||o[n];return c||(c=o[a]=o[n]=[]),c}};e.getGlobalValue=p,e.setGlobalValue=function(t,e){o[t]=e};var l=function(t){var e;try{var n=p(r);e=n[t]}catch(t){e=""}finally{return e}};e.getGoldlogVal=l;var f=function(t,e){var n=!1;try{var o=p(r);t&&(o[t]=e,n=!0)}catch(t){n=!1}finally{return n}};e.setGoldlogVal=f,e.getClientInfo=function(){return l("_aplus_client")||{}}},function(t,e){var n="aplus",o="goldlog",a=n+"_queue",r=o+"_queue",s="mw_change",u="MetaInfo",i="append"+u,c="set"+u,p="http",l="_pubsub",f="other",g="2101",h="2201",d="2202",_="19999";t.exports={PAGE_ENTER:"PAGE_ENTER",CURRENT_PAGE_CONFIG:"CURRENT_PAGE_CONFIG",_ANONY_ID:"_anony_id",_USER_ID:"_user_id",DEFAULT_CODE:f,OTHER:_,EVENT_MAP:{2101:"click",2201:"exposure",2202:"exposure",19999:f},EVENT_ID_MAP:{EXP:h,IMPEXP:d,CLK:g,OTHER:_},APLUS:n,GOLDLOG:o,SUBSCRIBE:n+"."+n+l+".subscribe",PUBLISH:n+"."+n+l+".publish",CACHE_PUBS:n+"."+n+l+".cachePubs",APLUS_UNIVERSAL:n+"_universal",APLUS_QUEUE:a,GOLDLOG_QUEUE:r,COMPLETE:"complete",PV_CODE:"2001",EXP_CODE:h,CLK_CODE:g,OTHER_CODE:_,CLK:"CLK",EXP:"EXP",SPM_CNT:"spm-cnt",SPM_URL:"spm-url",SPM_PRE:"spm-pre",MW_CHANGE_PV:s+"_pv",MW_CHANGE_HJLJ:s+"_hjlj",HTTP:p+":",HTTPS:"https:",APPEND_META_INFO:i,SET_META_INFO:c,APLUS_APPEND_META_INFO:n+"."+i,APLUS_SET_META_INFO:n+"."+c,PVID:"pvid",APLUS_LOG_PIPE:"aplus-log-pipe",openAPIs:["send","enter","sendPV","record","combineRecord","recordUdata","setPageSPM","setMetaInfo","appendMetaInfo","updatePageProperties","updateNextPageProperties","updatePageUtparam","updateNextPageUtparam","pageAppear","pageDisappear","skipPage","updateSessionProperties","getPageSpmUrl","getPageSpmPre"]}},function(t,e,n){t.exports={metaInfo:{"aplus-rhost-v":"https://alog.zjzwfw.gov.cn","aplus-rhost-g":"https://alog.zjzwfw.gov.cn","aplus-mmstat-timeout":"3000",sdkId:"aplus_mini_cloud",platformType:"TAOBAO",customSdkId:"202951027_20201222_165027",appId:""},globalConfig:{isAli:!1,isDecodeUrl:!0,APLUS_QUEUE:"aplus_queue",ETAG_STORAGE_KEY:"__ETAG__CNA__ID__",script_name:"aplus_mini.js",lver:"1.4.2"},plugins:[{name:"inject_app",path:n(5)},{name:"inject_page",path:n(10)},{name:"open_api",path:n(11)},{name:"aplus_client",path:n(13)},{name:"pubsub",path:n(14)},{name:"aplus_meta_inject",path:n(17)},{name:"aplus_ac",path:n(21),deps:["inject_page"]},{name:"aplus_ae",path:n(26),deps:["inject_page"]},{name:"aplus_mini_report",path:n(36)},{name:"aplus_log_inject",path:n(41),deps:["aplus_meta_inject"],config:{plugins:{pv:[{name:"etag",path:n(42)},{name:"when_to_sendpv",path:n(47),config:{aplusWaiting:""}},{name:"where_to_send",path:n(48)},{name:"what_to_send",path:n(49),config:{logdataToUt:{}}},{name:"miniapp_data",path:n(52)},{name:"what_to_sendpv_userdata",path:n(53),deps:["what_to_send"]}],hjlj:[{name:"etag",path:n(42)},{name:"where_to_send",path:n(48)},{name:"what_to_send",path:n(49),deps:[]},{name:"miniapp_data",path:n(52)},{name:"what_to_hjlj_userdata",path:n(54)}]}}},{name:"aplus_api",path:n(55),deps:["aplus_log_inject","aplus_meta_inject"]},{name:"meta_queue",path:n(64),config:{isOpenApi:!0}},{name:"aplus_queue",path:n(66),config:{isOpenApi:!0}},{name:"auto_tracker",path:n(67),deps:["inject_page"]}]}},function(t,e,n){"use strict";function o(){var t=App;App=function(e){var n=a.getContext(),o={onLaunch:function(t){i.initIsTB();var e=t?t.query:{},o=t?t.referrerInfo:{};if(n.aplus_queue.push({action:"aplus.appendMetaInfo",arguments:["aplus-session-args",Object.assign({},o,{scene:t.scene||""})]}),e){var a=u(e);if(e.spm&&(n.aplus.spm_orign=e.spm,delete a.spm),t.scene&&(a.scene=t.scene),e.miniappDebugId){var r=e.miniappDebugId.trim(),s=r.split("_");a=Object.assign({},a,{aplus_work_no:s.length>2?s[1]:r,aplus_track_debug_id:r,aplus_flag:"aplus_test"}),delete a.miniappDebugId}n.aplus_queue.push({action:"aplus.appendMetaInfo",arguments:["aplus-exdata",a]}),n.aplus_queue.push({action:"aplus.appendMetaInfo",arguments:["aplus-cpvdata",a]})}},onShow:function(){r.onAplusReady(n.aplus_queue,s.SUBSCRIBE,function(){var t=n.aplus.globalConfig||{};t.isAli||(n.onAppShowTime=(new Date).getTime(),n.aplus_queue.push({action:"aplus.record",arguments:["$$_app_show","1023","","GET"]}))})},onHide:function(){r.onAplusReady(n.aplus_queue,s.SUBSCRIBE,function(){var t=n.aplus.globalConfig||{};if(!t.isAli){var e=(new Date).getTime()-n.onAppShowTime;n.aplus_queue.push({action:"aplus.record",arguments:["$$_app_hide","1010","duration="+e,"GET"]})}})},onUnload:function(){r.onAplusReady(n.aplus_queue,s.SUBSCRIBE,function(){var t=n.aplus.globalConfig||{};if(!t.isAli){var e=(new Date).getTime()-n.onAppShowTime;n.aplus_queue.push({action:"aplus.record",arguments:["$$_app_unload","1010","duration="+e,"GET"]})}})}};Object.keys(o).forEach(function(t){r.resetFn(e,t,o[t])}),t(e)}}var a=n(2),r=n(6),s=n(3),u=n(7),i=n(8);t.exports=function(){return{run:function(){["object","function"].indexOf(typeof App)>-1&&o()}}}},function(t,e){t.exports={resetFn:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=t[e];t[e]=function(t){o&&o.call(this,t),n.call(this,t)}},onAplusReady:function(t,e,n){t.push({action:e,arguments:["aplusReady",function(t){"complete"===t&&"function"==typeof n&&n()}]})}}},function(t,e){function n(t){var e,o=t.constructor===Array?[]:{};if("object"==typeof t){if(JSON&&JSON.parse)e=JSON.stringify(t),o=JSON.parse(e);else for(var a in t)o[a]="object"==typeof t[a]?n(t[a]):t[a];return o}}t.exports=n},function(t,e,n){"use strict";function o(){if("boolean"==typeof i)return i;var t=!1;try{var e=navigator?navigator.userAgent||navigator.swuserAgent:"";t=!!/AliApp/i.test(e),(/AliApp\(AP/i.test(e)||/AliApp\(DingTalk/i.test(e)||/AliApp\(AMAP/i.test(e))&&(t=!1),/AliApp\(KB/i.test(e)&&(t=!!/Mist/.test(e)),/AlipayIDE Taobao/.test(e)&&(t=!0);var n=c().ctx;"function"==typeof n.canIUse&&(t=!!n.canIUse("callUserTrack"))}catch(t){}return i=t,t}function a(){return"boolean"==typeof i?!!i:o()}var r=n(9),s=n(2),u=n(3);e.getCurrentPage=function(){var t=getCurrentPages();return t[t.length-1]||{}};var i;e.resetIsTB=function(t){i=t},e.initIsTB=o;var c=function(){try{return{ctx:dd,platType:"dd"}}catch(t){try{return{ctx:my,platType:my&&my.tb?"taobao":"my"}}catch(t){try{return{ctx:tt,platType:"tt"}}catch(t){try{return{ctx:swan,platType:"bd"}}catch(t){try{return{ctx:wx,platType:"wx"}}catch(t){return{ctx:{},platType:"UNKNOW"}}}}}}};e.isTB=a,e.getPlatformType=function(){return c().platType},e.getContext=function(){return c().ctx};var p="httpRequest",l="request",f=function(){};e.request=function(t,e,n,o){var a=c().ctx;e||(e={}),r(o)||(o=f),r(n)||(n=f);var i=e.requestMethodName||l,g=a[i];r(g)||(i!==l?i=l:i!==p&&(i=p),g=a[i]);var h=e.dataType||"json",d=e.timeout||5e3,_=e.method||"GET";if(0===t.indexOf("//")){var v=u.HTTPS;/(\d+\.){3,}\d+/.test(t)&&(v="http:"),t=v+t}var m;if(r(g)){var y={url:t,method:_,dataType:h,timeout:d,success:function(t){n(t)},fail:function(e){console&&console.warn("request "+t+" failure, the msg is ",e),o(e)}};"object"==typeof e.data&&"POST"===_&&(y.data=e.data,y.url=y.url.split("?")[0]);var b=s.getGlobalValue("aplus"),x=b.getMetaInfo("aplus-request-extinfo");"object"==typeof x&&(y._extInfo=x),g(y)}else console&&console.warn('can not find "'+i+'"!'),o(m)}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,n){"use strict";function o(){var t=s.getContext(),e=Page;Page=function(n){var o={onPullDownRefresh:function(){var e={status:"ready"};t.aplus_queue.push({action:u.PUBLISH,arguments:["onPullDownRefresh",e]})},onReachBottom:function(){var e=this,n={status:"ready",context:e};t.aplus_queue.push({action:u.PUBLISH,arguments:["onReachBottom",n]})},onShareAppMessage:function(){var e={status:"ready"};t.aplus_queue.push({action:u.PUBLISH,arguments:["onShareAppMessage",e]})},onLoad:function(){t.aplus_queue.push({action:u.PUBLISH,arguments:["onLoad",{status:"ready"}]})},onShow:function(){i.onAplusReady(t.aplus_queue,u.SUBSCRIBE,function(){var e=this;t.aplus_queue.push({action:u.PUBLISH,arguments:["onShow",{status:"ready",context:e}]})})},onReady:function(){var e=this;t.aplus_queue.push({action:u.PUBLISH,arguments:["onReady",{status:"ready",context:e}]})},onHide:function(){t.aplus_queue.push({action:u.PUBLISH,arguments:["onHide",{status:"ready"}]})},onUnload:function(){t.aplus_queue.push({action:u.PUBLISH,arguments:["onUnload",{status:"ready"}]})},onAplusClk:function(e){t.aplus_queue.push({action:u.PUBLISH,arguments:["onAplusClk",{status:"ready",res:e}]})},onAplusTouch:function(){var e=this;t.aplus_queue.push({action:u.PUBLISH,arguments:["onAplusTouch",{status:"ready",context:e}]})}};try{my&&delete o.onShareAppMessage}catch(t){}Object.keys(o).forEach(function(t){i.resetFn(n,t,o[t])}),e(n)}}function a(){var t=s.getContext(),e=Component;Component=function(n){try{var o={onShow:function(){var e=this;i.onAplusReady(t.aplus_queue,u.SUBSCRIBE,function(){t.aplus_queue.push({action:u.PUBLISH,arguments:["onShow",{status:"ready",context:e}]})})},onShareAppMessage:function(){var e={status:"ready"};t.aplus_queue.push({action:u.PUBLISH,arguments:["onShareAppMessage",e]})}};try{my&&delete o.onShareAppMessage}catch(t){}Object.keys(o).forEach(function(t){i.resetFn(n.methods,t,o[t])}),e.apply(this,arguments)}catch(t){e.apply(this,arguments)}}}function r(t,e,n){["object","function"].indexOf(typeof t)>-1?n():console.log("typeof "+e+" is not object cant watchExp.")}var s=n(2),u=n(3),i=n(6);t.exports=function(){return{run:function(){r(Page,"Page",o),r(Component,"Component",a)}}}},function(t,e,n){"use strict";var o=n(2),a=n(3),r=n(12);t.exports=function(){return{pushQueue:function(t,e){var n=o.getGlobalValue("aplus_queue");n.push({action:"aplus."+t,arguments:e})},run:function(){var t=this,e=o.getGlobalValue(a.APLUS);r(a.openAPIs,function(n){e[n]=function(){var e=[];r(arguments,function(t){e.push(t)});var o="enter"===n?"_sendPV":"_"+n;t.pushQueue(o,e)}})}}}},function(t,e){"use strict";t.exports=function(t,e){var n,o=t.length;for(n=0;n<o;n++){var a=e(t[n],n);if("break"===a)break}}},function(t,e,n){"use strict";var o=n(8),a=n(2);t.exports=function(){return{_getNetworkType:function(t){var e=o.getContext();e.getNetworkType?e.getNetworkType({success:function(e){t(e?e.networkType:"")}}):t("")},_getSystemInfo:function(t){var e=this,n={},a=e.SYSTEM_INFO||{};if(a&&a.version)t(e.SYSTEM_INFO);else try{o.getContext().getSystemInfo({complete:function(o){o&&o.version?e._getNetworkType(function(n){o.networkType=n,e.SYSTEM_INFO=o,t(o)}):e._getNetworkType(function(e){n.networkType=e,t(n)})}})}catch(e){t(n)}},_getAccountInfoSync:function(){var t={};try{var e=o.getContext();if(e.getAccountInfoSync&&e.canIUse("getAccountInfoSync")){var n=e.getAccountInfoSync(),a=n.miniProgram||{},r=n.plugin||{};t.appId=a.appId,t.appVersion=a.version||a.envVersion,t.pluginAppId=r.appId,t.pluginAppVersion=r.version}else if(e.getAppIdSync&&e.canIUse("getAppIdSync")){var s=e.getAppIdSync()||{};t.appId=s.appId||""}}catch(t){}return t},run:function(t,e){var n=this;return this._getSystemInfo(function(t){t.userAgent="-",t.os=t.platform.toLocaleUpperCase(),t.os_version=t.system,t.access=t.brand;var o=n._getAccountInfoSync(),r=Object.assign({},t,o),s=a.getGlobalValue("aplus");s._aplus_client=r,e()}),2e3}}}},function(t,e,n){var o=n(15),a=n(2);t.exports=function(){return{run:function(){var t=a.getGlobalValue("aplus");t.aplus_pubsub||(t.aplus_pubsub=o.create())}}}},function(t,e,n){"use strict";var o=n(9),a=n(16),r=function(t){for(var e=t.length,n=new Array(e-1),o=1;o<e;o++)n[o-1]=t[o];return n},s=a.extend({callable:function(t){if(!o(t))throw new TypeError(t+" is not a function");return t},create:function(t){var e=new this;for(var n in t)e[n]=t[n];return e.handlers=[],e.pubs={},e},setHandlers:function(t){this.handlers=t},subscribe:function(t,e){this.callable(e);var n=this,o=n.pubs||{},a=o[t]||[];if(a)for(var r=0;r<a.length;r++){var s=a[r]();e.apply(n,s)}var u=n.handlers||[];return t in u||(u[t]=[]),u[t].push(e),n.setHandlers(u),n},publish:function(t){var e=r(arguments),n=this.handlers||[],a=n[t]?n[t].length:0;if(a>0)for(var s=0;s<a;s++){var u=n[t][s];o(u)&&u.apply(this,e)}return this},cachePubs:function(t){var e=this.pubs||{},n=r(arguments);e[t]||(e[t]=[]),e[t].push(function(){return n})}});t.exports=s},function(t,e,n){"use strict";function o(){}var a=n(9);o.prototype.extend=function(){},o.prototype.create=function(){},o.extend=function(t){return this.prototype.extend.call(this,t)},o.prototype.create=function(t){var e=new this;for(var n in t)e[n]=t[n];return e},o.prototype.extend=function(t){var e=function(){};try{a(Object.create)||(Object.create=function(t){function e(){}return e.prototype=t,new e}),e.prototype=Object.create(this.prototype);for(var n in t)e.prototype[n]=t[n];e.prototype.constructor=e,e.extend=e.prototype.extend,e.create=e.prototype.create}catch(t){console&&console.log(t)}finally{return e}},t.exports=o},function(t,e,n){"use strict";t.exports=function(){return{run:function(){n(18)(this.options.context.aplus_config)}}}},function(t,e,n){"use strict";var o=n(2),a=n(3),r=n(19);t.exports=function(t){var e=o.getGlobalValue(a.APLUS),n=e._$=e._$||{};n.is_terminal=!0,n.send_pv_count=0,n.spm={data:{}},n.meta_info=r.qGet()||{},e.globalConfig=t.globalConfig;for(var s in t.metaInfo)r.setMetaInfo(s,t.metaInfo[s]);e._$=n,e.isInternational=function(){return!1}}},function(t,e,n){"use strict";function o(){return a=c||{},c}var a,r=n(20),s=n(2),u=n(3),i=s.getGlobalValue(u.APLUS),c={},p="object",l="string";e.getInfo=o,e.qGet=function(){return a||o()},e.setMetaInfo=function(t,e){return a||(a={}),a[t]=e,!0};var f=function(t){return a||(a={}),a[t]||""};e.getMetaInfo=f,e.appendMetaInfo=function(t,e){if(t&&e){var n,o=function(n){try{var o=typeof e===l?JSON.parse(e):e;u(t,Object.assign({},n,o))}catch(t){}},a=function(n){try{var o=typeof e===l?JSON.parse(e):e;u(t,n.concat(o))}catch(t){}},s=function(t){t.constructor===Array?a(t):o(t)},u=function(t,e){i.setMetaInfo(t,e,{from:"appendMetaInfo"})},c=i.getMetaInfo(t);if("aplus-exinfo"===t&&(u(t,Object.assign({},c,r.param2obj(e))),n=!0),c)if(typeof c===p)s(c),n=!0;else try{var f=JSON.parse(c);typeof f===p&&(s(f),n=!0)}catch(t){}n||u(t,e)}}},function(t,e){"use strict";function n(t,e){var n,a,r,s=[],u=t.length;for(r=0;r<u;r++){n=t[r][0],a=t[r][1];var i=0===n.indexOf(o),c=i||e?a:encodeURIComponent(a);s.push(i?c:n+"="+c)}return s.join("&")}e.arr2obj=function(t){var e,n,o,a={},r=t.length;for(o=0;o<r;o++)e=t[o][0],n=t[o][1],a[e]=n;return a},e.param2obj=function(t){if("object"==typeof t)return t;t||(t="");for(var e={},n=t.split("&"),o=0;o<n.length;o++){var a=n[o],r=a.indexOf("="),s=a.split("="),u=a.length;if(2===s.length)e[s[0]]=s[1]||"";else if(r>0){var i=a.slice(0,r),c=a.slice(r+1,u)||"";e[i]=c}else e[s[0]]=""}return e};var o="::-plain-::";e.s_plain_obj=o,e.arr2param=n,e.obj2param=function(t,e){var n,a,r,s=[];for(n in t)n&&t.hasOwnProperty(n)&&(a=""+t[n],r=n+"="+a,e?s.push(r):s.push(0===n.indexOf(o)?a:r));return s.join("&")},e.encodeGokeyValue=function(t){return t}},function(t,e,n){"use strict";t.exports=function(){return{run:function(){n(22)()}}}},function(t,e,n){"use strict";var o=n(23),a=n(8),r=n(2),s=n(3),u=n(25),i="clk_config_element";t.exports=function(){var t=a.getContext(),e=r.getContext(),n=r.getGlobalValue("aplus"),c=[],p=function(e){t.removeStorageSync(i),u(c)&&c.forEach(function(n){t.createSelectorQuery().selectAll(n.cssSelector).fields({id:!0,dataset:!0,rect:!0,scrollOffset:!0},function(a){t.setStorageSync(i,a),o.watch_click(e.res,n)}).exec()})};e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["aplusReady",function(t){"complete"===t&&(c=n.getMetaInfo("aplus-auto-clk"))}]}),n.aplus_pubsub.subscribe("onAplusClk",function(t){"ready"===t.status&&p(t)}),n.aplus_pubsub.subscribe("onUnload",function(e){if("ready"===e.status)for(var n=0;n<c.length;n++)t.removeStorageSync(c[n].element)})}},function(t,e,n){"use strict";var o=n(8),a=n(24);e.watch_click=function(t,e){function n(t,e){var n={};t&&(n=t.changedTouches?t.changedTouches[0]:{});var o=n.clientX,a=n.clientY;return e.left<o&&o<e.right&&e.top+e.scrollTop<a&&a<e.scrollTop+e.bottom}for(var r=o.getContext(),s=r.getStorageSync("clk_config_element")||[],u=0;u<s.length;u++){var i=s[u];n(t,i)&&a.pushEvent("CLK",i.dataset,e,i)}}},function(t,e,n){function o(t,e,n){var o=a.getGlobalValue("aplus"),u=o.getMetaInfo(t),i={};return"function"==typeof u&&(i=u(e?s(e):{},n)),r.param2obj(i)}var a=n(2),r=n(20),s=n(7),u="POST",i="EXP";e.pushEvent=function(t,e,n,r){var s=a.getGlobalValue("aplus"),c=n.props||[],p={};if(e&&c)for(var l=0;l<c.length;l++){var f=c[l];p[f]=e[f.replace(/^data-/,"")]}if(r&&t===i){var g="";try{var h=new Number(r.viewabilityRate);g=h.toFixed(2)}catch(t){g=r.viewabilityRate}p=Object.assign({},p,{_w:r.width,_h:r.height,_x:r.x,_y:r.y,_rate:g,_viewability:"intersection"})}var d=t===i?"aplus-auto-exp-userfn":"aplus-auto-clk-userfn",_=o(d,r,n.selector);s.record(n.logkey,t,Object.assign({},p,_),u)},e.watchRecord=function(){},e.clearRecord=function(){}},function(t,e){"use strict";t.exports=function(t){return Array.isArray?Array.isArray(t):/Array/.test(Object.prototype.toString.call(t))}},function(t,e,n){"use strict";t.exports=function(){return{run:function(){n(27)()}}}},function(t,e,n){"use strict";var o=n(2),a=n(28),r=n(29),s=n(3),u=n(24);t.exports=function(){function t(t,n){n>0?(p=c.getMetaInfo("aplus-auto-exp"),a.watch_exposure(t,p,n),u.watchRecord(p),e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["setMetaInfo",function(e,o){if("aplus-auto-exp"===e){var s=r.getAutoExpConfig(o);if(JSON.stringify(s)===JSON.stringify(p))return;p=s,o&&p&&p.length>0&&(a.watch_exposure(t,p,n),u.watchRecord(p))}}]})):(p=c.getMetaInfo("aplus-auto-exp"),a.watch_exposure(t,p,n),u.watchRecord(p))}var e=o.getContext(),n=0,i=0,c=o.getGlobalValue("aplus");if(!c._aplus_auto_exp){c._aplus_auto_exp={hashMap:{}};var p=[];e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["onShow",function(e){"ready"===e.status&&0===n&&(t(e.context,1),n=1)}]}),e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["onAplusTouch",function(e){"ready"===e.status&&0===i&&(n=1,i=1,t(e.context,1))}]}),e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["onReachBottom",function(e){"ready"===e.status&&(i=0,a.clear(),n=1,t(e.context,0))}]}),e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["onHide",function(t){"ready"===t.status&&(p=c.getMetaInfo("aplus-auto-exp"),a.reset(n,p),u.clearRecord(),n=0,i=0)}]}),e.aplus_queue.push({action:s.SUBSCRIBE,arguments:["onUnload",function(t){"ready"===t.status&&a.clear()}]})}}},function(t,e,n){"use strict";function o(t,e){var n=[e.logkey,e.cssSelector,e.positionSelector];return t.position?n.push(t.position):(n.push(t.id),n.push(JSON.stringify(t.dataset))),n=n.join("_")}function a(){var t=h.windowWidth||0,e=h.windowHeight||0;return{pLeftTop:[0,0],pRightTop:[t,0],pLeftBottom:[0,e],pRightBottom:[t,e]}}var r=n(2),s=n(29),u=n(34),i=n(7),c=n(35),p=n(24),l=[],f=n(8),g=f.getContext(),h=g.getSystemInfoSync()||{};e.watch_exposure=function(t,e,n){function f(o){function a(t){try{var e=g.createSelectorQuery().selectAll(s[0]);"function"==typeof e.fields?e.fields({dataset:!0,id:!0},function(e){t({elements:e,type:"COMMON"})}).exec():e.boundingClientRect().exec(function(e){if(e&&e.length>0&&e[0]){for(var n=[],o=0;o<e[0].length;o++){var a=e[0][o];a&&n.push({position:[a.bottom,a.height,a.left,a.right,a.top,a.width].join("-")})}t({elements:n,type:"ALIPAY"})}})}catch(t){console.warn("该平台不支持自动曝光, err = ",t)}}if(o<e.length){var r=e[o];A=0,l.forEach(function(t){t.subject[0]===r.cssSelector&&t.subject[1]===r.positionSelector&&(A=1)});var s=[r.cssSelector,r.positionSelector];a(function(e){for(var a=e.type,u=e.elements||[],i=0;i<u.length;i++){var c=u[i];if(h(c,r),0===A||0===n){var p=d(t);p.subject=s,l.push(p),_(p,r,function(t){t.type=a,v(Object.assign({},t,c),r)})}}f(++o)})}}function h(t,e){var n=o(t,e),a=u.hash(n);if(P[e.logkey]){var r=0;P[e.logkey].forEach(function(t){t.hash_value===a&&(r=1)}),0===r&&P[e.logkey].push({id:t.id,hash_value:a,status:0,expConfig:e,dataset:t.dataset})}else P[e.logkey]=[{id:t.id,hash_value:a,status:0,expConfig:e,dataset:t.dataset}]}function d(t){return g.createIntersectionObserver(t,{thresholds:[s.AUTO_AT_VIEW_RATE],initialRatio:0,observeAll:!0})}function _(t,e,n){e.positionSelector?t.relativeTo(e.positionSelector).observe(e.cssSelector,function(t){try{n(t,e)}catch(t){console.log("errorMessage: ",t)}}):t.relativeToViewport().observe(e.cssSelector,function(t){try{n(t,e)}catch(t){console.log("errorMessage: ",t)}})}function v(t,e){var n=(new Date).getTime(),o=m(n,t,e);o&&o.length>0&&("ALIPAY"===t.type?p.pushEvent("EXP",t.dataset,e,t):s.EXP_DURATION?setTimeout(function(){y(o,t,e)},s.EXP_DURATION):o.forEach(function(t){var e=i(t);p.pushEvent("EXP",e.dataset,e.expConfig,e)}))}function m(t,e,n){var a=r.getGoldlogVal("_aplus_auto_exp")||{},i=a.hashMap||{},c=[];for(var p in i)for(var l=i[p]||[],f=0;f<l.length;f++){var g=o(e,n),h=u.hash(g),d=l[f]||{};if(0===d.status&&d.expConfig&&h===d.hash_value){var _=e.boundingClientRect||{};_.width&&_.height&&(d.x=_.left,d.y=_.top,d.width=_.width,d.height=_.height,d.size=_.width*_.height,e.intersectionRatio>=s.AUTO_AT_VIEW_RATE&&(d.exposureTime=t,d.status=1,c.push(d)))}}return c}function y(t,e,n){t.forEach(function(t){function a(e){var n=g.createSelectorQuery().selectAll(t.expConfig.cssSelector);n.fields({id:!0,dataset:!0,rect:!0,size:!0},function(t){e(t)}).exec()}a(function(a){for(var r=0;r<a.length;r++){var s=o(e,n),i=u.hash(s);i===t.hash_value&&(t.x=a[r].left,t.y=a[r].top,t.width=a[r].width,t.height=a[r].height,t.size=a[r].width*a[r].height)}t.expConfig.positionSelector?x(t.expConfig.positionSelector,t,n):x("",t,n)})})}function b(t,e){var n=c.getViewabilityRate(t,e);return n>s.AUTO_AT_VIEW_RATE?(e.viewabilityRate=n,e.status=2,1):(e.viewabilityRate=n,e.status=0,e.exposureTime="",0)}function x(t,e,n){function o(e){g.createSelectorQuery().select(t).boundingClientRect(function(t){s.push({pLeftTop:[t.left,t.top],pRightTop:[t.right,t.top],pLeftBottom:[t.left,t.bottom],pRightBottom:[t.right,t.bottom]}),e(s)}).exec()}var r,s=[];t?o(function(t){r=b(t[0],e),r>0&&p.pushEvent("EXP",i(e.dataset),n,e)}):(s.push(a()),r=b(s[0],e),r>0&&p.pushEvent("EXP",i(e.dataset),n,e))}var A,S=r.getGoldlogVal("_aplus_auto_exp")||{},P=S.hashMap||{};f(0)},e.reset=function(t,e){var n=r.getGlobalValue("aplus_queue");if(0===t){for(var o="",s=0;s<e.length;s++)o+=",",o+=e[s].cssSelector;o=o.substring(1,o.length);var u=g.createSelectorQuery().selectAll(o);u.fields({id:!0,dataset:!0,rect:!0,size:!0},function(t){for(var o=0;o<t.length;o++){var r=t[o];r.x=r.left,r.y=r.top;var s=a(),u=c.getViewabilityRate(s,r);if(u>0){var i="";for(var p in r.dataset)i+=p+"="+r.dataset[p]+"&";i=i.substring(0,i.length-1),n.push({action:"aplus.record",arguments:[e[0].logkey,"EXP",i]})}}}).exec()}for(var i=0;i<l.length;i++)l[i].disconnect();l=[];var p=r.getGoldlogVal("_aplus_auto_exp")||{},f=p.hashMap||{};for(var h in f)for(var d=f[h],_=0;_<d.length;_++)d[_].status=0},e.clear=function(){for(var t=0;t<l.length;t++)l[t].disconnect();l=[]}},function(t,e,n){"use strict";function o(t){return aplus&&aplus.getMetaInfo?aplus.getMetaInfo(t):r.getMetaCnt(t)}var a=n(30),r=n(31),s=n(33);e.DATA_APLUS_AE_KEY="data-aplus-ae",e.DATA_APLUS_AC_KEY="data-aplus-clk",e.LOOP_TIME=1e3,e.getDefaultRequestCfg=function(){return{method:"POST",pkgSize:10}};var u=function(t){var e=t;try{var n=o("aplus-auto-exp-visible");n&&(e=parseFloat(n)),e<=0&&(e=t)}catch(n){e=t}finally{return e}};e.AUTO_AT_VIEW_RATE=u(.3);var i=function(t){var e=t;try{var n=o("aplus-auto-exp-duration"),a=parseInt(n);a+""!="NaN"&&(e=a)}catch(t){}finally{return e}};e.EXP_DURATION=i(300);var c=function(t,e){var n,r=[],u=[];try{n=e||o(t);var i=[];if(n&&"string"==typeof n)try{i=JSON.parse(n)}catch(t){i=JSON.parse(n.replace(/'/g,'"'))}else"object"==typeof n&&n.constructor===Array&&(i=n);if(i&&i.constructor===Array)for(var c=0;c<i.length;c++){var p=i[c]||{},l=p.logkey||"",f=p.tag?p.tag:"",g=p.filter,h=p.cssSelector,d=h||f&&g;if(!l||!d)throw new Error("meta "+t+" config error, "+JSON.stringify(p));g="string"==typeof g?g.split("="):[];var _=f;if(g.length>=2?_+="["+g.shift()+'="'+decodeURIComponent(g.join(""))+'"]':1==g.length&&g[0]&&(_+="["+decodeURIComponent(g[0])+"]"),h&&(_+=h),p.elementSelector=_,a.indexof(u,_)>-1)throw new Error("meta "+t+" config error, tag_filter_cssSelector "+_+" repeated");u.push(_),r.push(p)}}catch(t){s.logger({msg:t})}finally{return r}};e.getAutoExpConfig=function(t){return c("aplus-auto-exp",t)||[]},e.getAutoExpUserFn=function(){var t=o("aplus-auto-exp-userfn");if(t){var e=window[t]||t;if("function"==typeof e)return e}return null},e.isThrottleWatchDom=function(){var t=!1;try{t="throttle"===o("aplus-auto-exp-watchdom")}catch(t){}return t},e.getAutoClkConfig=function(t){return c("aplus-auto-clk",t)||[]},e.getAutoClkUserFn=function(){var t=o("aplus-auto-clk-userfn");if(t){var e=window[t]||t;if("function"==typeof e)return e}return null}},function(t,e){"use strict";e.indexof=function(t,e){var n=-1;try{n=t.indexOf(e)}catch(a){for(var o=0;o<t.length;o++)t[o]===e&&(n=o)}finally{return n}},e.isArray=function(t){return Array.isArray?Array.isArray(t):/Array/.test(Object.prototype.toString.call(t))}},function(t,e,n){"use strict";function o(t){return s=s||document.getElementsByTagName("head")[0],u&&!t?u:s?u=s.getElementsByTagName("meta"):[]}function a(t,e){var n,a,r,s=o(),u=s.length;for(n=0;n<u;n++)a=s[n],i.tryToGetAttribute(a,"name")===t&&(r=i.tryToGetAttribute(a,e||"content"));return r||""}function r(t){var e={isonepage:"-1",urlpagename:""},n=t.qGet();if(n&&n.hasOwnProperty("isonepage_data"))e.isonepage=n.isonepage_data.isonepage,e.urlpagename=n.isonepage_data.urlpagename;else{var o=a("isonepage")||"-1",r=o.split("|");e.isonepage=r[0],e.urlpagename=r[1]?r[1]:""}return e}var s,u,i=n(32);e.getMetaTags=o,e.getMetaCnt=a,e.getOnePageInfo=r},function(t,e){"use strict";e.tryToGetAttribute=function(t,e){return t&&t.getAttribute?t.getAttribute(e)||"":""};var n=function(t,e,n){if(t&&t.setAttribute)try{t.setAttribute(e,n)}catch(t){}};e.tryToSetAttribute=n,e.tryToRemoveAttribute=function(t,e){if(t&&t.removeAttribute)try{t.removeAttribute(e)}catch(o){n(t,e,"")}}},function(t,e){"use strict";var n="[aplus日志]: ";e.logger=function(t){t||(t={});var e=t.level||"warn";console&&console[e]&&console[e](n+t.msg)}},function(t,e){"use strict";e.hash=function(t,e){var n,o,a=1315423911,r=e||a;for(n=t.length-1;n>=0;n--)o=t.charCodeAt(n),r^=(r<<5)+o+(r>>2);var s=(2147483647&r).toString(16);return s}},function(t,e){"use strict";e.getViewabilityRate=function(t,e){function n(t,e){return e.x>=t.pLeftTop[0]&&e.x<=t.pRightBottom[0]&&e.y>=t.pLeftTop[1]&&e.y<=t.pRightBottom[1]}var o=n(t,e),a=n(t,{x:e.x+e.width,y:e.y}),r=n(t,{x:e.x,y:e.y+e.height}),s=n(t,{x:e.x+e.width,y:e.y+e.height}),u=0,i=function(){var t=0;return o&&s&&(t=1),t},c=function(){var n=0,u=0;return o&&a&&!r&&!s?(n=e.width,u=t.pLeftBottom[1]-e.y):!o&&a&&!r&&s?(n=t.pLeftTop[0]-e.x,u=e.y):!o&&!a&&r&&s?(n=e.width,u=t.pLeftTop[1]-e.y):o&&!a&&r&&!s&&(n=t.pRightTop[0]-e.x,u=e.y),e.size>0?Math.abs(n*u)/e.size:0},p=function(){var n=0,u=0;return!o||a||r||s?o||!a||r||s?o||a||!r||s?o||a||r||!s||(n=t.pLeftTop[0]-e.x,u=t.pLeftTop[1]-e.y):(n=t.pRightTop[0]-e.x,u=t.pRightTop[1]-e.y):(n=t.pLeftBottom[0]-e.x,u=t.pLeftBottom[1]-e.y):(n=t.pRightBottom[0]-e.x,u=t.pRightBottom[1]-e.y),e.size>0?Math.abs(n*u)/e.size:0};return u=i(),u>0?u:(u=c(),u>0?u:(u=p(),u>0?u:u))}},function(t,e,n){"use strict";t.exports=function(){return{run:function(){var t=n(37),e=t.create();e.run(this.options)}}}},function(t,e,n){"use strict";var o=n(38),a=n(2),r=a.getGlobalValue("aplus"),s=n(39);t.exports=s.extend({failureBackLogs:[],sendLog:function(t,e,n){r.send(t,e,n,function(){},function(){})},handlerMiddleware:function(t){var e=o.changeToArray(this.format,t.what_to_send.logdata).join(this.getLogicSymbol());this.sendLog(t.where_to_send.url,encodeURIComponent(e),t.where_to_send.method)},run:function(){this.watchLOG()}})},function(t,e,n){"use strict";var o=n(2),a=o.getGlobalValue("aplus");e.getKeyIndex=function(t){var e={protocol:1,event_args:25};return e[t]};var r="-";e.changeToArray=function(t,e){var n=e.event_timestamp.getTime().toString(),o=e.client||{},s=o.screenWidth||"",u=o.screenHeight||"",i=s+"*"+u,c=s&&u?i:r,p=o.userAgent||r,l=o.language||r,f=e.gokey||{},g=JSON.stringify(f),h=JSON.stringify({customSdkId:e.sdk_info.customSdkId||"",platform_type:e.sdk_info.platformType||""}),d=e.appKey||e.appId||r,_=JSON.stringify({appId:o.appId||a.getMetaInfo("miniAppId")||""}),v=JSON.stringify(e.sessionArgs||{}),m=e.arg1||e.logkey||r;0===m.indexOf("/$$_")&&(m=m.substring(1,m.length)),"2001"===e.event_code&&e.trackerEventCode&&(m=e.trackerEventCode);var y=[e.cache,e.method||"GET",p,c,d,_,e._dev_id||r,"{}",e._user_nick||r,e._user_id||r,e._anony_id||r,"{}",l,e.timeZone||r,o.os||r,o.os_version||r,h,e._session_id||r,e.cna||r,n,encodeURIComponent(e.url)||r,e.event_code||r,encodeURIComponent(e.pre)||r,"{}",v,g,m,e.sdk_info.jsver,e.sdk_info.lver,o.appVersion||"devtools"||r,o.brand||r,r,o.networkType||r];return y}},function(t,e,n){"use strict";var o=n(16),a=n(40),r=n(3);t.exports=o.extend({subscribeLogs:function(t,e){a.pushIntoGoldlogQueue(r.SUBSCRIBE,[t,function(t){t.status===r.COMPLETE&&e(t)}])},getLogicSymbol:function(){return"ALI"===this.format?"&":"||"},handlerMiddleware:function(){},watchLOG:function(){var t=this;t.subscribeLogs(r.MW_CHANGE_PV,function(e){t.handlerMiddleware(e,"pv")}),t.subscribeLogs(r.MW_CHANGE_HJLJ,function(e){t.handlerMiddleware(e,r.APLUS)})},run:function(){this.watchLOG()}})},function(t,e,n){"use strict";var o=n(2);e.pushIntoGoldlogQueue=function(t,e){var n=o.getGlobalValue("aplus_queue"),a=o.getGlobalValue("aplus"),r=t.split("."),s=a[r[1]],u=s?s[r[2]]:null;a&&2===r.length&&s?s.apply(a,e):3===r.length&&u?u.apply(s,e):n.push({action:t,arguments:e})}},function(t,e,n){"use strict";var o=n(12);t.exports=function(){return{getLogConfig:function(){var t={},e=this.options.config.plugins;for(var n in e)t[n]={plugins:e[n],context:{}},o(e[n],function(e){t[n].context[e.name]=e.config||{}});return t},run:function(){this.options.context.logConfig=this.getLogConfig(),this.options.context.logConfig.pageLoadTime=this.options.context.PAGE_LOAD_TIME}}}},function(t,e,n){"use strict";var o=n(2),a=n(8),r=n(3),s=n(43),u="EMPTY_CNA";t.exports=function(){return{_syncEtag:function(t){var e,n=o.getGlobalValue(r.APLUS_QUEUE),i=this,c=function(e){var a=e&&e.data?e.data.cna:"";a?(o.setGoldlogVal(g,a),t(a)):"Y"===p.fetchEtagStatus?n.push({action:r.SUBSCRIBE,arguments:["etag",function(e){t(e)}]}):h()},p=o.getGlobalValue(r.APLUS),l=p.getMetaInfo("aplus-rhost-v");l&&(e=s.getUrl({egUrl:(l.indexOf("//")===-1?"//"+l:l)+"/eg.js"}),i.options.context.etag.egUrl=e);var f=a.getContext(),g=p.globalConfig.ETAG_STORAGE_KEY,h=function(){e&&(p.fetchEtagStatus="Y",a.request(e,{dataType:"text",requestMethodName:"request"},function(e){p.fetchEtagStatus="N";var a="";try{var s=e.data||"",i=s.split(";");if(i.length>1){var c=i[1],l=c.split("=");a=l[1]||"",a=a.replace(/\"/g,""),o.setGoldlogVal(g,a),f.setStorage({
key:g,data:{cna:a}}),n.push({action:r.PUBLISH,arguments:["etag",a]})}}catch(t){console.log(t)}a||(a=u),t(a)},function(t){console.log(t)}))},d=o.getGoldlogVal(g);d?t(d):f.getStorage({key:g,success:function(t){c(t)},fail:function(t){c(t)}})},run:function(t,e){var n=this;return this._syncEtag(function(t){n.options.context.etag.cna=t,e(t)}),2e3}}}},function(t,e,n){"use strict";var o=n(44);e.getUrl=function(t){var e=o.getUrl(t&&t.egUrl);if(0!==e.indexOf("http")){var n="https:";/(\d+\.){3,}\d+/.test(e)&&(n="http:"),e=n+e}return e}},function(t,e,n){"use strict";var o=n(45),a=n(46);t.exports={tryToDecodeURIComponent:function(t,e){var n=e||"";if(t)try{n=decodeURIComponent(t)}catch(t){}return n},parseSemicolonContent:function(t,e,n){e=e||{};var a,r,s=t.split(";"),u=s.length;for(a=0;a<u;a++){r=s[a].split("=");var i=o.trim(r.slice(1).join("="));e[o.trim(r[0])||""]=n?i:this.tryToDecodeURIComponent(i)}return e},nodeListToArray:function(t){var e,n;try{return e=[].slice.call(t)}catch(a){e=[],n=t.length;for(var o=0;o<n;o++)e.push(t[o]);return e}},getLsCna:function(t,e){if(a.set&&a.test()){var n="",o=a.get(t);if(o){var r=o.split("_")||[];n=e?r.length>1&&e===r[0]?r[1]:"":r.length>1?r[1]:""}return decodeURIComponent(n)}return""},setLsCna:function(t,e,n){n&&a.set&&a.test()&&a.set(t,e+"_"+encodeURIComponent(n))},getUrl:function(t){var e=t||"//log.mmstat.com/eg.js";try{var n=aplus.getMetaInfo("aplus-rhost-v"),o=/[[a-z|\-|\_|0-9\.]+[a-z|\-|\_|0-9]/,a=n.match(o);a&&a[0]&&(e="//"+a[0]+"/eg.js")}catch(t){}return e}}},function(t,e){"use strict";function n(t){return"string"==typeof t?t.replace(/^\s+|\s+$/g,""):""}e.trim=n},function(t,e){"use strict";t.exports={set:function(t,e){try{return localStorage.setItem(t,e),!0}catch(t){return!1}},get:function(t){try{return localStorage.getItem(t)}catch(t){return""}},test:function(){var t="grey_test_key";try{return localStorage.setItem(t,1),localStorage.removeItem(t),!0}catch(t){return!1}},remove:function(t){localStorage.removeItem(t)}}},function(t,e,n){"use strict";var o=n(2),a=n(3);t.exports=function(){return{getMetaInfo:function(){var t=o.getGoldlogVal("_$")||{},e=t.meta_info;return e},getAplusWaiting:function(){var t=this.getMetaInfo()||{};return t["aplus-waiting"]},run:function(t,e){var n=this.options.config||{},o=this.getAplusWaiting();if(o&&n.is_auto)switch(o=this.getAplusWaiting()+"",this.options.context.when_to_sendpv={aplusWaiting:o},o){case a._USER_ID:case a._ANONY_ID:case"MAN":return"done";case"1":return this.options.context.when_to_sendpv.isWait=!0,setTimeout(function(){e()},6e3),6e3;default:var r=1*o;if(r+""!="NaN")return this.options.context.when_to_sendpv.isWait=!0,setTimeout(function(){e()},r),r}}}}},function(t,e,n){"use strict";var o=n(2),a=n(33);t.exports=function(){return{getMetaInfo:function(t){var e=o.getGoldlogVal("_$")||{};return(e.meta_info||{})[t]},getHostUrl:function(t){var e="COMMON_HJLJ",n=this.options.context.userdata||{},o=this.getMetaInfo(t===e?"aplus-rhost-g":"aplus-rhost-v");if(!o)return"";var a=t===e?["//",o,/^(\/)/.test(n.logkey)?"":"/",n.logkey]:["//",o,"/vx.gif"];return a.join("")},run:function(){var t=!!this.options.context.is_single;if(!t){var e=this.options.config||{};this.options.context.where_to_send.method=e.method||"POST";var n=this.getHostUrl(e.recordType);return n?void(this.options.context.where_to_send.url=n):(a.logger({msg:"please set "+e.recordType+" logdomain!"}),"done")}}}}},function(t,e,n){"use strict";var o=n(2),a=n(3),r=n(8),s=n(50),u=n(51);t.exports=function(){return{getCommonParams:function(){var t=o.getGlobalValue(a.APLUS),e=this.options.context||{},n=e.etag||{},i=e.userdata||{},c=o.getGoldlogVal("_$")||{},p=this.options.config||{},l=t.getMetaInfo("platformType")||r.getPlatformType(),f={_dev_id:t.getMetaInfo("_dev_id"),_anony_id:t.getMetaInfo(a._ANONY_ID),_user_id:t.getMetaInfo(a._USER_ID),_user_nick:t.getMetaInfo("_user_nick"),_session_id:t.getMetaInfo("_session_id"),uaid:t.getMetaInfo("uaid")?1:0},g=t._aplus_client||{},h=t.globalConfig||{},d="-";try{var _=getCurrentPages()[0];d=_.route||_.is}catch(t){}var v=(new Date).getTime()+d,m=g.model+g.networkType+p.title+n.cna,y=(h.isDecodeUrl?"DC_":"")+s.getLogId(v,m),b=Object.assign({},{appKey:t.getMetaInfo("appKey")||t.getMetaInfo("appId"),cache:y,cna:n.cna,etag:n,pre:c.page_referrer||"-",sdk_info:{jsver:h.script_name,lver:h.lver,customSdkId:t.getMetaInfo("customSdkId")||"",platformType:l.toLowerCase()},title:p.title||"",url:d||"-",client:g,timeZone:u.getTimeZone(),gmkey:i.gmkey||"",method:this.options.context.where_to_send.method},f),x=f;return x[a.PVID]=t.pvid||"",b.sessionArgs=t.getMetaInfo("aplus-session-args"),b.gokey=x,b},getPvParams:function(){var t=o.getGlobalValue(a.APLUS),e=this.getCommonParams();return this.options.config.is_auto||(e.sdk_info.mansndlog=1),Object.assign({},e,{event_code:a.PV_CODE,logtype:"1",logkey:"/vx.gif",event_timestamp:t._$.send_pv_count>0?new Date:t.logConfig.pageLoadTime})},getHjljParams:function(){var t=this.options.context||{},e=t.userdata||{},n={event_code:a.EVENT_ID_MAP[e.gmkey]||e.gmkey,logtype:"2",logkey:e.logkey,event_timestamp:new Date};return Object.assign({},this.getCommonParams(),n)},run:function(){var t={};t="PV"===this.options.config.recordType?this.getPvParams():this.getHjljParams(),this.options.context.what_to_send.logdata=t}}}},function(t,e,n){"use strict";function o(t,e,n){return t?a.hash(encodeURIComponent(t)).substr(0,e):n}var a=n(34),r=function(t){function e(t){var e="0123456789abcdefhijklmnopqrstuvwxyzABCDEFHIJKLMNOPQRSTUVWXYZ",n="0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKMNOPQRSTUVWXYZ";return 1==t?e.substr(Math.floor(60*Math.random()),1):2==t?n.substr(Math.floor(60*Math.random()),1):"0"}for(var n,o="",a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=!1;o.length<t;)n=a.substr(Math.floor(62*Math.random()),1),!r&&o.length<=2&&("g"==n.toLowerCase()||"l"==n.toLowerCase())&&(0===o.length&&"g"==n.toLowerCase()?Math.random()<.5&&(n=e(1),r=!0):1==o.length&&"l"==n.toLowerCase()&&"g"==o.charAt(0).toLowerCase()&&(n=e(2),r=!0)),o+=n;return o};e.getLogId=function(t,e){var n=r(8),a=n.substr(0,4),s=n.substr(0,6);return[o(t,4,a),o(e,4,a),s].join("")}},function(t,e){e.getTimeZone=function(){var t=-(new Date).getTimezoneOffset()/60,e="+";t<0&&(e="-");var n=Math.abs(parseInt(t)),o=Math.abs(parseInt(t)-t),a="00";return o>0&&(a=60*o),"GMT"+e+(n>9?n:"0"+n)+":"+a}},function(t,e,n){"use strict";var o=n(3),a=n(2),r=n(8);t.exports=function(){return{run:function(){var t=r.isTB(),e=a.getGlobalValue(o.APLUS),n=this.options.context.what_to_send.logdata,s=getCurrentPages(),u=s[s.length-1]||{};u&&!n.title&&(n.title=u.route||""),n.url=(!t&&e.globalConfig.isAli?"https://":"")+(u.route||u.is||"-");var i="-";if(s.length>1){var c=s[s.length-2]||{};i=(!t&&e.globalConfig.isAli?"https://":"")+(c.route||c.is||"-")}n.pre=i,n.sdk_info.windmill="1"}}}},function(t,e,n){"use strict";var o=n(20),a=n(25),r=n(2),s=n(3),u=r.getGlobalValue("aplus");t.exports=function(){return{getUserdata:function(){var t=this.options.config||{},e={};t&&!t.is_auto&&t.gokey&&("string"==typeof t.gokey?e=o.param2obj(t.gokey):"object"==typeof t.gokey&&(e=t.gokey));var n=function(t){a(t)?t.forEach(function(t){e=Object.assign({},e,t)}):e=Object.assign({},e,t)};n(u.getMetaInfo("aplus-cpvdata"));var r=this.options.context||{},s=r.userdata||{};return n(s),e},updatePre:function(t){var e=this.options.config||{},n=r.getGoldlogVal("_$")||{};return e&&e.referrer&&(n.page_referrer=e.referrer,t.pre=e.referrer),r.setGoldlogVal("_$",n),t},updateUrl:function(t){var e=this.options.config||{};return e&&e.pageUrl&&(t.url=e.pageUrl),t},updateSpmUrl:function(t){var e=this.options.config||{},n=e[s.SPM_URL]||e.spmUrl;return n&&(t.gokey[s.SPM_URL]=n),t},run:function(){var t=this.options.context.what_to_send.logdata,e=Object.assign({},this.getUserdata(),t.userdata||{});t.gokey=Object.assign({},t.gokey,e),t=this.updatePre(t),t=this.updateUrl(t),t=this.updateSpmUrl(t),this.options.context.what_to_send.logdata=t,this.options.context.userdata=t.gokey}}}},function(t,e,n){"use strict";var o=n(20),a=n(25),r=n(2),s=r.getGlobalValue("aplus");t.exports=function(){return{getUserData:function(){var t=this.options.context||{},e=t.userdata||{},n=t.what_to_send.logdata.gokey;n=Object.assign({},n,o.param2obj(e.gokey)),n=Object.assign({},n,o.param2obj(s.getMetaInfo("aplus-exinfo")||{}));var r=s.getMetaInfo("aplus-exdata");return a(r)?r.forEach(function(t){n=Object.assign({},n,t)}):n=Object.assign({},n,r||{}),n},run:function(){var t=this.options.context.what_to_send.logdata,e=this.getUserData();"1010"===t.gmkey&&(t.arg1=e.duration||t.logkey),t.gokey=e,this.options.context.what_to_send.logdata=t}}}},function(t,e,n){"use strict";t.exports=function(){return{run:function(){n(56)(this.options.context.logConfig)}}}},function(t,e,n){"use strict";var o=n(57),a=n(3),r=n(2);t.exports=function(t){var e=r.getGlobalValue(a.APLUS);if(!e._aplus_api){e._aplus_api={status:a.COMPLETE};var s=n(58).run.create({logConfig:t});for(var u in s)e[u]=s[u];r.setGlobalValue(a.APLUS,e);var i=[a.APLUS+"Ready",a.COMPLETE];o.doPubMsg(i),o.doCachePubs(i)}}},function(t,e,n){"use strict";var o=n(2),a="function",r=function(){var t=o.getGlobalValue("aplus"),e=t.aplus_pubsub||{},n=typeof e.publish===a;return n?e:""};e.doPubMsg=function(t){var e=r();e&&typeof e.publish===a&&e.publish.apply(e,t)},e.doCachePubs=function(t){var e=r();e&&typeof e.cachePubs===a&&e.cachePubs.apply(e,t)},e.doSubMsg=function(t,e){var n=r();n&&typeof n.subscribe===a&&n.subscribe(t,e)}},function(t,e,n){"use strict";var o=n(16),a=n(9),r=n(8),s=n(25),u=n(3),i=n(57),c=n(7),p=n(2),l=n(59),f=n(19),g=n(63),h=p.getGlobalValue(u.APLUS),d=function(t,e){my&&my.call&&"function"==typeof e&&my.call("handleLoggingAction",{type:"behavior",subType:t.subType},function(n){var o={};o[t.spmType]=n[t.spmType],e(o)})},_=o.extend({_send:function(t,e,n,o,a){if(0===t.indexOf("//")){var s=u.HTTPS;/(\d+\.){3,}\d+/.test(t)&&(s="http:"),t=s+t}return"object"==typeof e&&"POST"===n?r.request(t,{method:n,data:e,dataType:"base64"},o,a):r.request(t+"?"+e,{method:n,dataType:"base64"},o,a),t},_sendPV:function(t,e){t=t||{},h._setPageSPM(t),t.pageName&&h._setMetaInfo(u.APLUS+"-pagename",t.pageName);var n=new l;t.recordType="PV",t.method||(t.method="GET");var o=h.logConfig.pv;return n.run({plugins:o.plugins,context:c(o.context)},{config:t,userdata:e||{},pubsubType:"pv",middlewareMessageKey:"mw_change_pv"}),!0},_combineRecord:function(t,e,n,o){var a="EXP";if(!h.globalConfig.isAli||e!==a&&"CLK"!==e)console.warn("only support EXP or CLK log to combile record!");else if(s(n)){o||(o="POST");var r=[];n.forEach(function(t){r.push({exargs:"object"==typeof t.exargs?t.exargs:{},scm:t.scm,spm:t.spm,aplusContentId:t.aplusContentId})});var u=[];u.push((e===a?"expdata=":"clkdata=")+JSON.stringify(r)),u.push(e===a?"_is_auto_exp=1":"_is_auto_clk=1"),u.push("_eventType=custom"),u.push("_method="+o),u.push("_pkgSize="+n.length),h.record(t,e,u.join("&"),o)}else console.warn("type of gokeys must be ArrayObject!")},_record:function(t,e,n,o,r){t+="",t&&0!==t.indexOf("/")&&h.globalConfig.isAli&&(t="/"+t);var s=new l,u=h.logConfig.hjlj;return s.run({plugins:u.plugins,context:c(u.context)},{config:{recordType:"COMMON_HJLJ",method:o||"GET"},userdata:{logkey:t,gmkey:e,gokey:n},pubsubType:"hjlj",middlewareMessageKey:"mw_change_hjlj"},function(){a(r)&&r()}),!0},getPageSPM:function(){return h.spm_ab},_setPageSPM:function(){var t,e={},n=arguments;if("object"==typeof n[0]?(e=n[0],t=n[1]):(e.spmCnt=[n[0],n[1],"0","0"].join("."),t=n[2]),e.spmCnt||e.spmUrl){var o=["setPageSPM",e];i.doPubMsg(o),i.doCachePubs(o);var a="function"==typeof t?t:function(){};a()}},_setMetaInfo:function(t,e){var n,o,a="OVERWRITE",r=a;if("object"==typeof t?(n=t.metaName,o=t.metaValue,r=t.mode||a):(n=t,o=e),r!==a)return h.appendMetaInfo(n,o);if(f.setMetaInfo(n,o)){var s=p.getGoldlogVal("_$")||{};s.meta_info=f.qGet();var u=p.setGoldlogVal("_$",s),c=["setMetaInfo",n,o,{}];return i.doPubMsg(c),i.doCachePubs(c),u}},_updatePageProperties:function(t){"object"==typeof t&&(g()?my.reportAnalytics("updatePageProperties",t):"my"===r.getPlatformType()&&my.call("reportData",{spmDetail:t,ignoreDefaultPageMonitor:!0}),h._appendMetaInfo("aplus-cpvdata",t))},_updateNextPageProperties:function(t){if(t||(t={}),my){var e={type:"updateNextProp",eventId:-1,eventid:-1,name:"",pageName:"",comName:"",arg1:"",arg2:"",arg3:"",param:t,params:t};my.callUserTrack?my.callUserTrack("commitut",e):my.reportAnalytics&&my.reportAnalytics("enter",e)}},_appendMetaInfo:f.appendMetaInfo,getMetaInfo:function(t){return f.getMetaInfo(t)},cloneDeep:c,_skipPage:function(){my&&my.callUserTrack&&my.callUserTrack("skipPage")},_pageAppear:function(){my&&my.callUserTrack&&this.isPageDisAppear&&(this.isPageDisAppear=!1,this.isPageAppear=!0,my.callUserTrack("pageAppear"))},_pageDisappear:function(){my&&my.callUserTrack&&this.isPageAppear&&(this.isPageDisAppear=!0,this.isPageAppear=!1,my.callUserTrack("pageDisappear"))},_updatePageUtparam:function(t){t||(t={}),my&&my.callUserTrack&&my.callUserTrack("updatePageUtparam",{utParamJson:JSON.stringify(t)})},_updateNextPageUtparam:function(t){t||(t={}),my&&my.callUserTrack&&my.callUserTrack("updateNextPageUtparam",{utParamJson:JSON.stringify(t)})},_updateSessionProperties:function(t){my&&my.call&&"object"==typeof t&&my.call("handleLoggingAction",{type:"behavior",subType:"updateSessionProperties",extData:t})},_getPageSpmUrl:function(t){d({subType:"getPageSpmUrl",spmType:"spmUrl"},t)},_getPageSpmPre:function(t){d({subType:"getPageSpmPre",spmType:"spmPre"},t)}});e.run=_},function(t,e,n){"use strict";var o=n(12),a=n(2),r=n(9),s=n(57),u=n(33),i=n(3),c=n(60),p=n(61),l=function(){};l.prototype.run=function(t,e,n){var l=new p;l.init({middleware:[],config:e.config,plugins:t.plugins});var f=l.run(),g=r(t.context)?new t.context:t.context;g.userdata=e.userdata,g.logger=u.logger;var h={context:g,pubsub:a.getGoldlogVal("aplus_pubsub"),pubsubType:e&&e.pubsubType},d=new c;d.create(h),d.wrap(f,function(){h.context.status=i.COMPLETE,e&&(e.middlewareMessageKey&&s.doPubMsg([e.middlewareMessageKey,h.context]),e.messageFnQueue&&o(e.messageFnQueue,function(e){e(a.getGlobalValue(i.APLUS),t)})),r(n)&&n(h.context)})()},t.exports=l},function(t,e,n){"use strict";function o(){}var a=n(9),r=n(30),s=n(33);o.prototype.create=function(t){for(var e in t)"undefined"==typeof this[e]&&(this[e]=t[e]);return this},o.prototype.calledList=[],o.prototype.setCalledList=function(t){r.indexof(this.calledList,t)===-1&&this.calledList.push(t)},o.prototype.resetCalledList=function(){this.calledList=[]},o.prototype.wrap=function(t,e){var n=this,o=this.context||{},u=o.compose||{},i=u.maxTimeout||1e4;return function(o){var u,c=t.length,p=0,l=0,f=function(g,h){if(p===c)return o="done",n.resetCalledList(),a(e)&&h!==o&&e.call(n,o),void clearTimeout(u);if(r.indexof(n.calledList,p)===-1){if(n.setCalledList(p),!t[p]||!a(t[p][0]))return;try{o=t[p][0].call(n,o,function(){p++,l=1,f(p)})}catch(t){s.logger({msg:t})}}var d="number"==typeof o;if("pause"===o||d){l=0;var _=d?o:i,v=t[p]?t[p][1]:"";u=setTimeout(function(){0===l&&(s.logger({msg:"jump the middleware about "+v+", because waiting timeout maxTimeout = "+_}),o=null,p++,f(p))},_)}else"done"===o?(p=c,f(p,o)):(p++,f(p))};return n.calledList&&n.calledList.length>0&&n.resetCalledList(),f(p)}},t.exports=o},function(t,e,n){"use strict";var o=n(62),a=n(33);t.exports=function(){return{init:function(t){this.opts=t,t&&"object"==typeof t.middleware&&t.middleware.length>0?this.middleware=t.middleware:this.middleware=[],this.plugins_name=[]},pubsubInfo:function(t,e){try{var n=t.pubsub;n&&n.publish("plugins_change_"+t.pubsubType,e)}catch(t){a.logger({msg:t})}},run:function(t){t||(t=0);var e=this,n=this.middleware,a=this.opts||{},r=a.plugins;if(r&&"object"==typeof r&&r.length>0){var s=r[t];if(this.plugins_name.push(s.name),n.push([function(t,n){e.pubsubInfo(this,s);var r=new s.path;return r.init||(r.init=function(t){this.options=t}),r.init({context:this.context,config:o(s.config||{},a.config)}),r.run(t,function(t){setTimeout(function(){n(s,t)},1)})},s.name]),t++,r[t])return this.run(t)}return n}}}},function(t,e){t.exports=function(t,e){return"function"!=typeof Object.assign?function(t){for(var e=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(null!==o)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e}(t,e):Object.assign({},t,e)}},function(t,e){function n(){try{var t=navigator?navigator.userAgent||navigator.swuserAgent:"";return/Triver/g.test(t)}catch(t){return!1}}t.exports=n},function(t,e,n){"use strict";var o=n(65),a=n(2);t.exports=function(){return{run:function(){var t=this.options.context.aplus_config,e=t.globalConfig.APLUS_QUEUE,n=a.getContext(),r=n[e]||[],s=o.getFormatQueue(r,"metaQueue");n[e]=s.queue,o.processGoldlogQueue(s.formatQueue,this.options.config)}}}},function(t,e,n){function o(){var t=i.getGoldlogVal("_$")||{},e=t.meta_info;return e}function a(){var t=o()||{},e=t.uaid;return e&&!t._anony_id?"BLOCK":t._hold||t["aplus-waiting"]}function r(t){var e=a(),n=o()||{},r=!0,s=t.arguments||[],u=s[0],i=s[1],c="START";if("_hold"===u&&i===c)return c;if("_anony_id"===u&&i)return c;if(t&&/sendPV|record|setPageSPM|setMetaInfo|appendMetaInfo$/.test(t.action))switch(e){case"BLOCK":n[e]||(_.push(t),r=!1)}return r}function s(t){g(h,t),g(d,t),g(_,t)}function u(t,e){return e&&f.openAPIs.indexOf(t)>-1&&(t="_"+t),t}var i=n(2),c=n(30),p=n(9),l=n(33),f=n(3),g=function(t,e){function n(){if(t&&c.isArray(t)&&t.length){for(var n=m(t).queue,o={},a=[];o=n.shift();)v(o,e,function(t){a.push(t)});a.length>0&&setTimeout(function(){for(;o=a.shift();)v(o,e)},100)}}try{n()}catch(t){l.logger({msg:t})}};e.processGoldlogQueue=g;var h=[],d=[],_=[];e.subscribeAndProcessQueue=function(t,e){var n=i.getGlobalValue(t);n.push({action:f.SUBSCRIBE,arguments:[f.SET_META_INFO,function(t,n){t===f._USER_ID&&n?g(h,e):t===f._ANONY_ID&&n?g(d,e):"_hold"===t&&"START"===n&&s(e)}]})};var v=function(t,e,n){var o=!!e.isOpenApi,a=t?t.action:"",f=t?t.arguments:"",g=r(t);if(g){var h=i.getContext();try{if(a&&f&&c.isArray(f)){var d,_=a.split("."),v=h,m=h;if(3===_.length)v=h[_[0]][_[1]]||{},d=u(_[2],o),m=v[d]?v[d]:"";else for(;_.length;)if(d=u(_.shift(),o),m=v=v[d],!v)return void(p(n)&&n(t));p(m)&&m.apply(v,f),"START"===g&&s(e)}}catch(t){l.logger({msg:t})}}};e.processTask=v;var m=function(t,e){for(var n={subscribeMwChangeQueue:[],subscribeMetaQueue:[],subscribeQueue:[],metaQueue:[],othersQueue:[]},o=[],a={};a=t.shift();)try{var r=a.action,s=a.arguments[0];/subscribe/.test(r)?"setMetaInfo"===s?n.subscribeMetaQueue.push(a):s===f.MW_CHANGE_PV||s===f.MW_CHANGE_HJLJ?n.subscribeMwChangeQueue.push(a):n.subscribeQueue.push(a):/MetaInfo/.test(r)?n.metaQueue.push(a):n.othersQueue.push(a)}catch(t){l.logger({msg:t}),n.othersQueue.push(a)}var u;return e&&n[e]&&(u=n[e],n[e]=[]),o=n.subscribeMwChangeQueue.concat(n.metaQueue),o=o.concat(n.subscribeQueue),o=o.concat(n.subscribeMetaQueue,n.othersQueue),{queue:o,formatQueue:u}};e.getFormatQueue=m},function(t,e,n){"use strict";var o=n(16),a=n(2),r=n(65),s=o.extend({push:function(t){this.length++,r.processTask(t,this.opts)}});t.exports=function(){return{processAplusQueue:function(t){var e=this.options.config||{},n=a.getGlobalValue(t);r.processGoldlogQueue(n,e),a.setGlobalValue(t,s.create({opts:e,startLength:n.length,length:0}))},run:function(){var t=this.options.context.aplus_config,e=t.globalConfig.APLUS_QUEUE;this.processAplusQueue(e),"aplus_queue"===e&&this.processAplusQueue("goldlog_queue"),r.subscribeAndProcessQueue(e,this.options.config)}}}},function(t,e,n){"use strict";function o(){function t(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=s.getCurrentPage(),r=a.route||a.is;switch(e){case"onPullDownRefresh":g.onPullDownRefresh+=1,t="event="+e+"&pagename="+r+"&count="+g.onPullDownRefresh,f.push({action:"aplus.record",arguments:[o.logkey||"$$_pull_down_refresh","CLK",t]});break;case"onReachBottom":g.onReachBottom+=1,t="event="+e+"&pagename="+r+"&count="+g.onReachBottom,f.push({action:"aplus.record",arguments:[n.logkey||"$$_reach_bottom","CLK",t]});break;case"onShareAppMessage":g.onShareAppMessage+=1,t="event="+e+"&pagename="+r+"&count="+g.onShareAppMessage,f.push({action:"aplus.record",arguments:[c.logkey||"$$_share","CLK",t]});break;case"onPageShow":if(l.globalConfig.isAli){var p=l.getMetaInfo("pageConfig"),h=a.route||a.is;p&&p[h]?i(p[h].spm)?f.push({action:"aplus.setPageSPM",arguments:p[h].spm}):u.logger({level:"error",msg:h+'在metaInfo.pageConfig中配置的spm格式不对,正确格式为:["spma","spmb"]'}):u.logger({level:"error",msg:"未匹配该页面("+h+")的spm,请检查metaInfo.pageConfig"})}l.sendPV({isAuto:!0},{isMini:!0})}}function e(){n=l.getMetaInfo("rb_config"),o=l.getMetaInfo("pdr_config"),c=l.getMetaInfo("share_config")}var n,o,c,p=a.getContext(),l=a.getGlobalValue(r.APLUS),f=a.getGlobalValue(r.APLUS_QUEUE),g={onPullDownRefresh:0,onReachBottom:0,onShareAppMessage:0,onClick:0};f.push({action:r.SUBSCRIBE,arguments:["aplusReady",function(t){"complete"===t&&e()}]}),l.aplus_pubsub.subscribe("onShow",function(e){if("ready"===e.status){var n="MAN"!==p.aplus.getMetaInfo("aplus-waiting");n&&t("onPageShow")}}),l.aplus_pubsub.subscribe("onPullDownRefresh",function(e){"ready"===e.status&&t("onPullDownRefresh")}),l.aplus_pubsub.subscribe("onReachBottom",function(e){"ready"===e.status&&t("onReachBottom")}),l.aplus_pubsub.subscribe("onShareAppMessage",function(e){"ready"===e.status&&t("onShareAppMessage")})}var a=n(2),r=n(3),s=n(8),u=n(33),i=n(25);t.exports=function(){return{run:function(){o()}}}},function(t,e,n){"use strict";t.exports=function(t,e){var o=n(2),a=n(57),r=n(33),s=n(12),u=n(8),i=n(69);u.initIsTB(),"object"==typeof t&&(t.siteId&&(e.globalConfig.siteId=t.siteId),e.metaInfo=Object.assign({},e.metaInfo,t.metaInfo));var c="running",p="complete",l=["aplusReady",c];return a.doPubMsg(l),i.run({plugins:e.plugins,context:function(){var t={PAGE_LOAD_TIME:new Date},n=[];return s(e.plugins,function(e){t[e.name]=e.config,"aplus_log_inject"===e.name&&e.config&&e.config.plugins&&(n=e.config.plugins.pv,s(n,function(e){t[e.name]=e.config}))}),Object.assign({},t,{aplus_config:e})}},function(){r.logger({msg:"APLUS初始化完成"}),l[1]=p,a.doPubMsg(l)}),o.getContext()}},function(t,e,n){"use strict";var o=n(59),a=n(9),r=n(57);e.run=function(t,e){var n=new o;n.run({plugins:t.plugins,context:t.context},{config:{},userdata:{},pubsubType:"aplusinit",messageFnQueue:[],middlewareMessageKey:"mw_change_aplusinit"},function(t){var n=["aplusInitContext",t];r.doPubMsg(n),r.doCachePubs(n),a(e)&&e()})}}]);
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论