Commit c2c4e7dd authored by 罗超's avatar 罗超

初始化项目

parents
Pipeline #49 failed with stages
//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
globalData: {
userInfo: null
}
})
\ No newline at end of file
{
"pages": [
"pages/msg/index",
"pages/index/index",
"pages/welcome/welcome",
"pages/validateForm/validate/validate",
"pages/validateForm/validateEnd/validateEnd",
"pages/logs/logs",
"pages/me/index",
"pages/video/index"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"tabBar": {
"selectedColor": "#d4237a",
"backgroundColor": "#fff",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/tabbar/home.png",
"selectedIconPath": "images/tabbar/homea.png"
},
{
"pagePath": "pages/msg/index",
"text": "消息",
"iconPath": "images/tabbar/msg.png",
"selectedIconPath": "images/tabbar/msga.png"
},
{
"pagePath": "pages/video/index",
"text": "旅友圈",
"iconPath": "images/tabbar/video.png",
"selectedIconPath": "images/tabbar/videoa.png"
},
{
"pagePath": "pages/me/index",
"text": "我的",
"iconPath": "images/tabbar/me.png",
"selectedIconPath": "images/tabbar/mea.png"
}
]
}
}
\ No newline at end of file
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
// 配置
let envir = 'online'
let ENVIRONMENT_CONFIG = {}
console.warn('|||||||||||||||||||||||||||||||||||||')
console.warn('若修改appkey为自己的appkey后,且自己的appey暂未开通订阅权限,需要注释掉im.js文件中”onpushevents: this.onPushEvents“这一行以及onFriends回调中subscribeEvent方法。或者。。。')
// 或者可以修改代码 ENVIRONMENT_CONFIG.openSubscription = false
console.warn('|||||||||||||||||||||||||||||||||||||')
// 若修改appkey为自己的appkey后,且自己的appey暂未开通订阅权限,
// 需要注释掉im.js文件中”onpushevents: this.onPushEvents“这一行以及onFriends回调中subscribeEvent方法。
let configMap = {
test: {
appkey: 'b612b31e837c79c68f141aeb719d2b20',
url: 'https://apptest.netease.im'
},
pre: {
appkey: 'b612b31e837c79c68f141aeb719d2b20',
url: 'http://preapp.netease.im:8184'
},
online: {
appkey: 'b612b31e837c79c68f141aeb719d2b20',
url: 'https://app.netease.im'
},
};
ENVIRONMENT_CONFIG = configMap[envir];
// 是否开启订阅服务
ENVIRONMENT_CONFIG.openSubscription = true
ENVIRONMENT_CONFIG.privateConf = {
"lbs_web": "http://59.111.108.145:8281/lbs/webconf.jsp",
"link_ssl_web": false,
"nos_uploader_web": "http://59.111.108.145:10080",
"https_enabled": false,
"nos_downloader": "59.111.108.145:10080/{bucket}/{object}",
"nos_accelerate": "",
"nos_accelerate_host": "",
"nt_server": ""
}
// 是否开启私有化部署
ENVIRONMENT_CONFIG.openPrivateConf = false
module.exports = ENVIRONMENT_CONFIG
let PAGE_CONFIG = {}
PAGE_CONFIG.defaultUserLogo = '/images/default-icon.png' // 用户默认头像
module.exports = PAGE_CONFIG
\ No newline at end of file
This diff is collapsed.
import NetcallWeixin from '../vendors/NIM_Web_Netcall_weixin_v6.8.0.js'
import NIM from '../vendors/NIM_Web_NIM_weixin_v6.8.0.js'
import Emitter from '../utils/emitter.js'
let app = getApp()
let store = app.store
export default class NetcallController {
constructor(props) {
NIM.use(NetcallWeixin)
NetcallWeixin.destroy()
this.netcall = app.globalData.netcall = NetcallWeixin.getInstance(props)
app.globalData.emitter = new Emitter()
this.bindNetcallEvent()
this.state = {
onTheCall: false, // 正在通话中
}
}
bindNetcallEvent() {
this.netcall.on('syncDone', (data) => {
console.log(new Date())
console.log('登录成功', data)
app.globalData.emitter.emit('syncDone', data)
})
this.netcall.on('clientLeave', (data) => {
console.log('有人离开了', data)
app.globalData.emitter.emit('clientLeave', data)
})
this.netcall.on('clientJoin', (data) => {
console.log(new Date())
// {account,cid,mode,uid,url}
console.log('有人加入了', data)
this.state.onTheCall = true // 标记正在通话
app.globalData.emitter.emit('clientJoin', data)
})
this.netcall.on('callRejected', (data) => {
console.log('对方拒绝了', data)
app.globalData.emitter.emit('callRejected', data)
})
this.netcall.on('callAccepted', (data) => {
console.log('对方接听了', data)
app.globalData.emitter.emit('callAccepted', data)
})
this.netcall.on('beCalling', (data) => {
// {caller,cid,type}
console.log('beCalling', data)
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
if (currentPage.route.includes('videoCall') === false && app.globalData.isPushBeCallPage == false) { // 不在多人通话中,才提示
if (!currentPage) {
wx.navigateTo({
url: `/partials/videoCall/videoCall?beCalling=true&caller=${data.caller}&cid=${data.cid}&type=${data.type}`,
})
app.globalData.isPushBeCallPage = true
return
}
let netcallGroupCallInfo = store.getState().netcallGroupCallInfo
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
if (Object.keys(netcallGroupCallInfo).length === 0) { // p2p视频
if (!currentPage.route.includes('videoCall') && app.globalData.isPushBeCallPage == false) {
wx.navigateTo({
url: `/partials/videoCall/videoCall?beCalling=true&caller=${data.caller}&cid=${data.cid}&type=${data.type}`,
})
app.globalData.isPushBeCallPage = true
}
}
}
app.globalData.emitter.emit('beCalling', data)
})
this.netcall.on('callerAckSync', (data) => {
// {timetag,type,fromClientType:number,cid,accepted}
console.log('callerAckSync: 其他端已经处理了', data)
wx.showToast({
title: '已在其他端处理!',
duration: 2000,
icon: 'none',
success: function() {
setTimeout(() => {
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
if (currentPage.route.includes('videoCall') || currentPage.route.includes('videoCallMeeting')) {
wx.navigateBack(1)
}
}, 2000)
}
})
})
this.netcall.on('hangup', (data) => {
console.log('hangup', data)
this.state.onTheCall = false // 标记正在通话
app.globalData.emitter.emit('hangup', data)
})
this.netcall.on('control', (data) => {
console.log('control', data)
// {cid,account,command}
app.globalData.emitter.emit('control', data)
})
this.netcall.on('joinChannel', (data) => {
// {uid,account,cid}
console.log('joinChannel', data)
app.globalData.emitter.emit('joinChannel', data)
})
this.netcall.on('clientUpdate', (data) => {
console.log('有人更新了', data)
})
this.netcall.on('error', (error) => {
console.error('出错了', error)
})
this.netcall.on('open', (data) => {
console.log('socket建立成功', data)
})
this.netcall.on('willreconnect', (data) => {
// 直播通道准备重连
app.globalData.emitter.emit('willreconnect', data)
})
this.netcall.on('sendCommandOverTime', (data) => {
console.log('发送命令超时', data)
})
this.netcall.on('liveRoomClose', (data) => {
console.log('互动直播房间解散了', data)
})
this.netcall.on('sessionDuration', (data) => {
console.log('===结束通话(ms):', data)
})
}
}
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
//事件处理函数
bindViewTap: function() {
// wx.navigateTo({
// url: '../logs/logs'
// })
},
onLoad: function () {
if (app.globalData.userInfo) {
this.setData({
userInfo: app.globalData.userInfo,
hasUserInfo: true
})
} else if (this.data.canIUse){
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
app.userInfoReadyCallback = res => {
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
} else {
// 在没有 open-type=getUserInfo 版本的兼容处理
wx.getUserInfo({
success: res => {
app.globalData.userInfo = res.userInfo
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
}
},
getUserInfo: function(e) {
console.log(e)
app.globalData.userInfo = e.detail.userInfo
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file
<!--index.wxml-->
<view class="container">
<view class="userinfo">
<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view>
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
\ No newline at end of file
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}
\ No newline at end of file
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
// pages/me/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/me/index.wxml-->
<text>pages/me/index.wxml</text>
/* pages/me/index.wxss */
\ No newline at end of file
// pages/msg/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class='title'>
<text>消息(20)</text>
</view>
<view class="search">
<image src="/images/im/search.png"></image>
<text>搜索</text>
</view>
\ No newline at end of file
page{
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
font-size: 10pt;
/* line-height: 150%; */
min-height: 100%;
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
}
.title{
background: #f1f1f1;
padding: 70rpx 30rpx 2rpx 30rpx;
font-size: 16pt;
border-bottom: 2rpx solid #EEE;
}
.search{
background: #F4F8FB;
height: 60rpx;
margin: 10rpx 30rpx;
border-radius: 12rpx;
text-align: center;
line-height: 60rpx
}
.search image{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
margin-top:15rpx;
vertical-align: middle;
}
.search text{
font-size: 28rpx;
color: rgb(175, 178, 185);
}
\ No newline at end of file
// pages/validate/validate.js
Page({
/**
* 页面的初始数据
*/
data: {
chosenType:-1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
goToNextValidate: function () {
if (this.data.chosenType!=-1){
wx.navigateTo({
url: '/pages/validateForm/validateEnd/validateEnd?type=' + this.data.chosenType,
})
}else{
wx.showToast({
title: '请选择验证方式',
icon: 'none',
duration: 2000
})
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
changeChosenType: function(e){
console.log(e.currentTarget.dataset.type)
this.setData({
chosenType: e.currentTarget.dataset.type
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class="container">
<view class="title">
<text class="h1">选择身份核对</text>
<text class="h3">尊敬的客人,为保障您能获取到真实的团队信息</text>
</view>
<view class="ci idcard {{chosenType==0?'active':''}}" bindtap="changeChosenType" data-type="0">
<text class="h2">身份证</text>
<text class="h6">ID CARD</text>
</view>
<view class="ci parpt {{chosenType==1?'active':''}}" bindtap="changeChosenType" data-type="1">
<text class="h2">护照</text>
<text class="h6">PASSPORT</text>
</view>
</view>
<view class="btn bg" bindtap="goToNextValidate"></view>
\ No newline at end of file
page{
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
font-size: 10pt;
line-height: 150%;
min-height: 100%;
position: relative;
/* display: flex;
flex-direction: column;
align-items: stretch; */
}
.container {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
align-items: stretch;
padding: 0;
height: 100%;
overflow: hidden;
justify-content: space-between;
box-sizing: border-box;
}
.container .title{
margin-top: 200rpx;
padding: 0 100rpx;
margin-bottom: 100rpx;
}
.container .title .h1{
font-size: 60rpx;
display: block;
}
.container .title .h3{
font-size: 26rpx;
margin-top: 30rpx;
display: block;
}
.container .ci{
margin: 20rpx auto;
width: 600rpx;
height: 295rpx;
}
.container .ci .h2{
margin-left: 317rpx;
font-size: 50rpx;
margin-top:100rpx;
display: block;
}
.container .ci .h6{
margin-left: 317rpx;
font-size: 30rpx;
margin-top:30rpx;
display: block;
}
.container .ci.active .h2{
color: #FF3166;
}
.container .ci.idcard{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050856280.png') no-repeat;
background-size: 100%;
}
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648312.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050700624.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050856296.png') no-repeat;
background-size: 100%;
}
.btn{
width: 158rpx;
height: 158rpx;
border: none;
outline: none;
border-radius: 158rpx;
position: absolute;
bottom: 90rpx;
left: 50%;
margin-left: -79rpx;
overflow: hidden;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648265.png') no-repeat;
background-size: 100%;
}
.btn:active{
opacity: 0.5;
}
@media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2){
.container .ci.idcard{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213054056515.png') no-repeat;
background-size: 100%;
}
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648374.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213060159296.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050856343.png') no-repeat;
background-size: 100%;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648280.png') no-repeat;
background-size: 100%;
}
}
@media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3){
.container .ci.idcard{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213054136374.png') no-repeat 100% 100%;
background-size: 100%;
}
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050700671.png') no-repeat ;
background-size: 100%;
}
.container .ci.parpt{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050700687.png') no-repeat 100% 100%;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050901952.png') no-repeat ;
background-size: 100%;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648343.png') no-repeat;
background-size: 100%;
}
}
\ No newline at end of file
// pages/validateForm/validateEnd/validateEnd.js
Page({
/**
* 页面的初始数据
*/
data: {
type:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(options.type){
this.setData({
type: options.type
});
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class="container">
<view class="ci idcard active" wx:if="{{type==0}}">
<text class="h2">身份证</text>
<text class="h6">ID CARD</text>
</view>
<view class="ci parpt acitve" wx:else>
<text class="h2">护照</text>
<text class="h6">PASSPORT</text>
</view>
<view class="forms">
<view class="labels">
<text>{{type==0?'身份证':'护照'}}</text>
</view>
<view class="input-box">
<input type="idcard"></input>
</view>
<view class="ul">
<view class="li">
<text>210723********0779</text>
</view>
</view>
</view>
</view>
<view class="btn bg"></view>
\ No newline at end of file
page{
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
font-size: 10pt;
line-height: 150%;
min-height: 100%;
position: relative;
/* display: flex;
flex-direction: column;
align-items: stretch; */
}
.container {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
align-items: stretch;
padding: 0;
height: 100%;
overflow: hidden;
justify-content: space-between;
box-sizing: border-box;
}
.container .ci{
margin: 160rpx auto;
width: 600rpx;
height: 295rpx;
}
.container .ci .h2{
margin-left: 317rpx;
font-size: 50rpx;
margin-top:100rpx;
display: block;
}
.container .ci .h6{
margin-left: 317rpx;
font-size: 30rpx;
margin-top:30rpx;
display: block;
}
.container .ci.active .h2{
color: #FF3166;
}
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648312.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050856296.png') no-repeat;
background-size: 100%;
}
.container .forms{
margin: -25rpx 75rpx 0 75rpx;
}
.container .forms .labels{
font-size:30rpx;
font-weight:500;
color:rgba(17,17,17,1);
line-height:29rpx;
}
.container .forms .input-box{
height: 80rpx;
margin-top: 30rpx;
border-bottom: 4rpx solid rgba(226,226,226,1);
position: relative;
}
.container .forms .ul{
border:1px solid rgba(104,94,97,0.2);
border-top: none;
}
.container .forms .ul .li{
padding: 0 30rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
letter-spacing: 18rpx;
}
.container .forms .input-box input{
height: 78rpx;
line-height: 78rpx;
font-size: 28rpx;
color: #111;
border: none;
outline: none;
width: 100%;
letter-spacing:10rpx;
}
.btn{
width: 158rpx;
height: 158rpx;
border: none;
outline: none;
border-radius: 158rpx;
position: absolute;
bottom: 90rpx;
left: 50%;
margin-left: -79rpx;
overflow: hidden;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648265.png') no-repeat;
background-size: 100%;
}
.btn:active{
opacity: 0.5;
}
@media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2){
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648374.png') no-repeat;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050856343.png') no-repeat;
background-size: 100%;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648280.png') no-repeat;
background-size: 100%;
}
}
@media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3){
.container .ci.idcard.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050700671.png') no-repeat ;
background-size: 100%;
}
.container .ci.parpt.active{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050901952.png') no-repeat ;
background-size: 100%;
}
.btn.bg{
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213050648343.png') no-repeat;
background-size: 100%;
}
}/* pages/validateForm/validateEnd/validateEnd.wxss */
\ No newline at end of file
// pages/video/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/video/index.wxml-->
<text>pages/video/index.wxml</text>
/* pages/video/index.wxss */
\ No newline at end of file
//login.js
//获取应用实例
var app = getApp();
Page({
data: {
remind: '加载中',
angle: 0,
userInfo: {}
},
goToIndex: function () {
wx.redirectTo({
url: '/pages/validateForm/validate/validate',
})
},
onLoad: function () {
var that = this
wx.setNavigationBarTitle({
title: wx.getStorageSync('mallName')
})
},
onShow: function () {
let that = this
let userInfo = wx.getStorageSync('userInfo')
if (!userInfo) {
wx.getUserInfo({
success: res => {
app.globalData.userInfo = res.userInfo
this.setData({
userInfo: res.userInfo,
})
}
})
} else {
that.setData({
userInfo: userInfo
})
}
},
onReady: function () {
var that = this;
setTimeout(function () {
that.setData({
remind: ''
});
}, 1000);
wx.onAccelerometerChange(function (res) {
var angle = -(res.x * 30).toFixed(1);
if (angle > 14) {
angle = 14;
} else if (angle < -14) {
angle = -14;
}
if (that.data.angle !== angle) {
that.setData({
angle: angle
});
}
});
}
});
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--start.wxml-->
<view class="container">
<view class="remind-box" wx:if="{{remind}}">
<image class="remind-img" src="/images/more/loading.gif"></image>
</view>
<block wx:else>
<image class="title" src="/images/more/demo.png"></image>
<image class="title2" src="/images/more/t2.png"></image>
<view class="content">
<view class="hd" style="transform:rotateZ({{angle}}deg);">
<image class="logo" src="/images/system/logo.png"></image>
<!-- <image class="wave" src="/images/more/wave.png" mode="aspectFill"></image>
<image class="wave wave-bg" src="/images/more/wave.png" mode="aspectFill"></image> -->
</view>
<view class="bd">
<image class="smalltitle" src="http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213034539465.png"></image>
<view class="confirm-btn" bindtap='goToIndex'>
<text >开启旅程</text>
</view>
</view>
</view>
</block>
</view>
\ No newline at end of file
/**start.wxss**/
page{
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
font-size: 10pt;
line-height: 150%;
min-height: 100%;
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
}
.container {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
background: #EA005E;
align-items: stretch;
padding: 0;
height: 100%;
overflow: hidden;
justify-content: space-between;
box-sizing: border-box;
}
.content{
flex: 1;
display: flex;
position: relative;
z-index: 10;
flex-direction: column;
align-items: stretch;
justify-content: center;
width: 100%;
height: 100%;
padding-bottom: 450rpx;
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213034539465.jpg') repeat;
opacity: 0;
transform: translate3d(0,100%,0);
animation: rise 3s cubic-bezier(0.19, 1, 0.22, 1) .25s forwards;
margin-top: 80rpx;
}
.remind-box {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 300rpx;
}
.remind-img {
width: 250rpx;
height: 250rpx;
padding-bottom: 25rpx;
}
@keyframes rise{
0% {opacity: 0;transform: translate3d(0,100%,0);}
50% {opacity: 1;}
100% {opacity: 1;transform: translate3d(0,400rpx,0);}
}
.title{
position: absolute;
top: 80rpx;
left: 50%;
width: 600rpx;
height: 200rpx;
margin-left: -240rpx;
opacity: 0;
animation: show 2.5s cubic-bezier(0.19, 1, 0.22, 1) .5s forwards;
}
.title2{
position: absolute;
top: 250rpx;
left: 50%;
width: 330rpx;
height: 43rpx;
margin-left: -165rpx;
opacity: 0;
animation: show 2.5s cubic-bezier(0.19, 1, 0.22, 1) .5s forwards;
}
.smalltitle{
position: absolute;
top: 50rpx;
left: 50%;
width: 600rpx;
/* height: 200rpx; */
margin-left: -300rpx;
opacity: 0;
animation: show 2.5s cubic-bezier(0.19, 1, 0.22, 1) .5s forwards;
}
@keyframes show{
0% {opacity: 0;}
100% {opacity: .95;}
}
.hd {
position: absolute;
top: 0;
left: 50%;
width: 1000rpx;
margin-left: -500rpx;
height: 200rpx;
transition: all .35s ease;
background: url('http://imgfile.oytour.com/New/Upload/Cloud/2020-02/20200213034539465.jpg') repeat;
}
.logo {
position: absolute;
z-index: 2;
left: 50%;
bottom: 235rpx;
width: 84rpx;
height: 84rpx;
margin-left: -42rpx;
border-radius: 160rpx;
/* animation: sway 10s ease-in-out infinite; */
opacity: .95;
}
@keyframes sway{
0% {transform: translate3d(0,20rpx,0) rotate(-15deg); }
17% {transform: translate3d(0,0rpx,0) rotate(25deg); }
34% {transform: translate3d(0,-20rpx,0) rotate(-20deg); }
50% {transform: translate3d(0,-10rpx,0) rotate(15deg); }
67% {transform: translate3d(0,10rpx,0) rotate(-25deg); }
84% {transform: translate3d(0,15rpx,0) rotate(15deg); }
100% {transform: translate3d(0,20rpx,0) rotate(-15deg); }
}
.wave {
position: absolute;
z-index: 3;
right: 0;
bottom: 0;
opacity: 0.725;
height: 260rpx;
width: 2250rpx;
animation: wave 10s linear infinite;
}
.wave-bg {
z-index: 1;
animation: wave-bg 10.25s linear infinite;
}
@keyframes wave{
from {transform: translate3d(125rpx,0,0);}
to {transform: translate3d(1125rpx,0,0);}
}
@keyframes wave-bg{
from {transform: translate3d(375rpx,0,0);}
to {transform: translate3d(1375rpx,0,0);}
}
.bd {
position: relative;
flex: 1;
display: flex;
flex-direction: column;
align-items: stretch;
animation: bd-rise 2s cubic-bezier(0.23,1,0.32,1) .75s forwards;
opacity: 0;
}
@keyframes bd-rise{
from {opacity: 0; transform: translate3d(0,60rpx,0); }
to {opacity: 1; transform: translate3d(0,0,0); }
}
.confirm-btn {
font-size: 13pt;
line-height: 85rpx;
height: 85rpx;
background: #EA005E;
color: #fff;
text-align: center;
border-radius: 100rpx;
margin: 90% 20% 0 20%;
}
.confirm-btn:active {
opacity: .8;
}
.copyright {
font-size: 28rpx;
color: #999;
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 30rpx;
text-align: center;
}
\ No newline at end of file
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false,
"coverView": true,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false
},
"compileType": "miniprogram",
"libVersion": "2.0.4",
"appid": "wxcf0727a7c78b501e",
"projectname": "termina",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}
\ No newline at end of file
import wrapActionCreators from './wrapActionCreators.js'
import { assign, warning, shallowEqual } from './util.js'
const defaultMapStateToProps = state => ({}) // eslint-disable-line no-unused-vars
const defaultMapDispatchToProps = dispatch => ({ dispatch })
function connect(mapStateToProps, mapDispatchToProps) {
const shouldSubscribe = Boolean(mapStateToProps)
const mapState = mapStateToProps || defaultMapStateToProps
const app = getApp()
let mapDispatch
if (typeof mapDispatchToProps === 'function') {
mapDispatch = mapDispatchToProps
} else if (!mapDispatchToProps) {
mapDispatch = defaultMapDispatchToProps
} else {
mapDispatch = wrapActionCreators(mapDispatchToProps)
}
return function wrapWithConnect(pageConfig) {
const {
onLoad: _onLoad,
onUnload: _onUnload,
} = pageConfig
function handleChange(options) {
if (!this.unsubscribe) {
return
}
const state = this.store.getState()
const mappedState = mapState(state, options);
if (!this.data || shallowEqual(this.data, mappedState)) {
return;
}
this.setData(mappedState)
}
function onLoad(options) {
this.store = app.store;
if (!this.store) {
warning("Store对象不存在!")
}
if (shouldSubscribe) {
this.unsubscribe = this.store.subscribe(handleChange.bind(this, options));
handleChange.call(this, options)
}
typeof _onLoad === 'function' && _onLoad.call(this, options)
}
function onUnload() {
typeof _onUnload === 'function' && _onUnload.call(this)
typeof this.unsubscribe === 'function' && this.unsubscribe()
}
return assign({}, pageConfig, mapDispatch(app.store.dispatch), { onLoad, onUnload })
}
}
module.exports = connect
import { isPlainObject, ActionTypes} from './util'
export default function createStore(reducer, preloadedState, enhancer) {
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
enhancer = preloadedState
preloadedState = undefined
}
if (typeof enhancer !== 'undefined') {
if (typeof enhancer !== 'function') {
throw new Error('Expected the enhancer to be a function.')
}
return enhancer(createStore)(reducer, preloadedState)
}
if (typeof reducer !== 'function') {
throw new Error('Expected the reducer to be a function.')
}
let currentReducer = reducer
let currentState = preloadedState
let currentListeners = []
let nextListeners = currentListeners
let isDispatching = false
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice()
}
}
function getState() {
if (isDispatching) {
throw new Error(
'You may not call store.getState() while the reducer is executing. ' +
'The reducer has already received the state as an argument. ' +
'Pass it down from the top reducer instead of reading it from the store.'
)
}
return currentState
}
function subscribe(listener) {
if (typeof listener !== 'function') {
throw new Error('Expected the listener to be a function.')
}
if (isDispatching) {
throw new Error(
'You may not call store.subscribe() while the reducer is executing. ' +
'If you would like to be notified after the store has been updated, subscribe from a ' +
'component and invoke store.getState() in the callback to access the latest state. ' +
'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'
)
}
let isSubscribed = true
ensureCanMutateNextListeners()
nextListeners.push(listener)
return function unsubscribe() {
if (!isSubscribed) {
return
}
if (isDispatching) {
throw new Error(
'You may not unsubscribe from a store listener while the reducer is executing. ' +
'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'
)
}
isSubscribed = false
ensureCanMutateNextListeners()
const index = nextListeners.indexOf(listener)
nextListeners.splice(index, 1)
}
}
function dispatch(action) {
if (!isPlainObject(action)) {
throw new Error(
'Actions must be plain objects. ' +
'Use custom middleware for async actions.'
)
}
if (typeof action.type === 'undefined') {
throw new Error(
'Actions may not have an undefined "type" property. ' +
'Have you misspelled a constant?'
)
}
if (isDispatching) {
throw new Error('Reducers may not dispatch actions.')
}
try {
isDispatching = true
currentState = currentReducer(currentState, action)
} finally {
isDispatching = false
}
const listeners = (currentListeners = nextListeners)
for (let i = 0; i < listeners.length; i++) {
const listener = listeners[i]
listener()
}
return action
}
function replaceReducer(nextReducer) {
if (typeof nextReducer !== 'function') {
throw new Error('Expected the nextReducer to be a function.')
}
currentReducer = nextReducer
dispatch({ type: ActionTypes.REPLACE })
}
function observable() {
const outerSubscribe = subscribe
return {
subscribe(observer) {
if (typeof observer !== 'object' || observer === null) {
throw new TypeError('Expected the observer to be an object.')
}
function observeState() {
if (observer.next) {
observer.next(getState())
}
}
observeState()
const unsubscribe = outerSubscribe(observeState)
return { unsubscribe }
},
}
}
dispatch({ type: ActionTypes.INIT })
return {
dispatch,
subscribe,
getState,
replaceReducer
}
}
\ No newline at end of file
import Provider from './provider.js'
import connect from './connect.js'
module.exports = {
Provider: Provider,
connect: connect
}
\ No newline at end of file
import { assign, warning } from './util.js'
function checkStoreShape(store) {
const missingMethods = ['subscribe', 'dispatch', 'getState'].filter(m => !store.hasOwnProperty(m));
if (missingMethods.length > 0) {
warning(`非标准Redux Store:缺少如下方法: ${missingMethods.join(', ')}`)
}
}
function Provider(store) {
checkStoreShape(store)
return function (appConfig) {
return assign({}, appConfig, { store })
}
}
module.exports = Provider
const assign = function (target) {
'use strict';
if (target === undefined || target === null) {
throw new TypeError('Cannot convert undefined or null to object');
}
var output = Object(target);
for (var length=arguments.length, index = 1; index<length; index++) {
var source = arguments[index];
// 检测assign的每一个参数的有效性
if (source !== undefined && source !== null) {
// 拷贝每个Object,注意不是深拷贝
for (var nextKey in source) {
if (source.hasOwnProperty(nextKey)) {
output[nextKey] = source[nextKey];
}
}
}
}
return output;
};
const ActionTypes = {
INIT:
'@@redux/INIT' +
Math.random().toString(36).substring(7).split('').join('.'),
REPLACE:
'@@redux/REPLACE' +
Math.random().toString(36).substring(7).split('').join('.')
}
function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false
let proto = obj
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto)
}
return Object.getPrototypeOf(obj) === proto
}
function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message)
}
try {
throw new Error(message)
/* eslint-disable no-empty */
} catch (e) { }
/* eslint-enable no-empty */
}
function shallowEqual(objA, objB) {
if (objA === objB) {
return true
}
function removeBugKeyArr(originArr) {
// 实际机器,不会有 __webviewId__ 这个参数,调试机器会有,会造成某种特殊情况下面的报错。
// 例如,reducer 中直接更改 redux 的某个对象值里面某个属性,page 那边会直接是对象引用,没 shallowEqual 的 hasOwn 检测还是一样,永远返回 true 。
const removeBugKeyArrList = ['__webviewId__'];
const arr = [];
originArr.map(elem => {
if (!removeBugKeyArrList.includes(elem) && !arr.includes(elem)) {
arr.push(elem);
}
});
return arr;
}
const keysA = removeBugKeyArr(Object.keys(objA));
const keysB = removeBugKeyArr(Object.keys(objB));
if (keysA.length !== keysB.length) {
return false
}
const hasOwn = Object.prototype.hasOwnProperty
for (let l=keysA.length, i=0; i<l; i++) {
if (!hasOwn.call(objB, keysA[i]) ||
objA[keysA[i]] !== objB[keysA[i]]) {
return false
}
}
return true
}
module.exports = {
isPlainObject,
ActionTypes,
warning,
shallowEqual,
assign: assign
}
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(undefined, arguments));
};
}
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if (typeof actionCreators !== 'object' || actionCreators === null) {
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
}
var keys = Object.keys(actionCreators);
var boundActionCreators = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
}
}
return boundActionCreators;
}
function wrapActionCreators(actionCreators) {
return dispatch => bindActionCreators(actionCreators, dispatch)
}
module.exports = wrapActionCreators
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
This diff is collapsed.
const INITIAL_STATE = {
isLogin: false, // 是否正在登陆
isRegister: false, // 是否正在注册
userInfo: {}, // 登录用户信息
currentChatTo: '', // 正在聊天 sessionId
friendCard: {}, //好友列表,含名片信息,额外添加在线信息
onlineList: {}, // 在线好友列表
// messageListToRender: {},
currentGroup: {},
currentGroupMembers: [],
groupList: {}, // 群列表
groupMemberList: {}, // 群成员列表
groupMemberMap: {}, // 群成员列表
personList: {}, // 所有有信息的人的列表
unreadInfo: {}, // 未读信息,包含已、未订阅的账户数
rawMessageList: {}, // 所有的聊天列表都在里面
notificationList: { system: [], custom: [] }, // 系统通知,分为自定义消息和系统消息
netcallEvent: {type: '', payload: null}, // 音视频事件载荷
netcallCallList: [], // 多人通话呼叫列表
netcallGroupCallInfo: {} // 群组音视频被叫时通知信息
}
export {INITIAL_STATE}
/**
* 登录用户个人信息
* userInfo: {account, avatar, birth, createTime, email, gender, nick, sign, tel, updateTime}
* friendCard: { account: {account,nick,avatar,sign,gender:'male/female/unknown',tel,updateTime,createTime, isBlack, status} }
* onlineList: {account: status}
* groupList: {teamId:{avatar,beInviteMode,createTime,inviteMode,joinMode,level,memberNum,memberUpdateTime,mute,muteType,name,owner,teamId,type,updateCustomMode,updateTeamMode,updateTime,valid,validToCurrentUser}}
* groupMemberList: {teamId: [{teamId,account,type,nickInTeam,active,joinTime,updateTime}]}
* messageListToRender: {account: {unixtime1: {from,to,type,scene,text,sendOrReceive,displayTimeHeader,time}, unixtime2: {}}}
* rawMessageList: {sessionId: {unixtime1: {flow,from,fromNick,idServer,scene,sessionId,text,target,to,time...}, unixtime2: {}}}
* unreadInfo: {sessionId: unread}
* notificationList: {system: [{desc:'',msg:{category,from,idServer,read,state,status,time,to,type}}], custom: []}
* netcallCallList: [{account,nick,avatar}]
* netcallGroupCallInfo: {id,members:['account'],teamName,type}
*/
This diff is collapsed.
export default class EventEmitter {
constructor() {
this.eventReset()
}
eventReset() {
if (this._eventListeners) {
Object.keys(this._eventListeners).forEach(key => {
delete this._eventListeners[key]
})
}
this._eventListeners = {}
if (this._eventOnceListener) {
Object.keys(this._eventOnceListener).forEach(key => {
delete this._eventOnceListener[key]
})
}
this._eventOnceListener = {}
}
on(funKey, callback) {
if (!funKey) {
throw Error({
message: 'event listener funkey undefined',
callFunc: 'adapter:_on'
})
}
if (!(callback instanceof Function)) {
throw Error({
message: 'event listener next param should be function',
callFunc: 'adapter:_on'
})
}
this._eventListeners[funKey] = callback
}
off(funKey) {
if (!funKey) {
throw Error({
message: 'event listener funkey undefined',
callFunc: 'adapter:_off'
})
}
if (this._eventListeners[funKey]) {
delete this._eventListeners[funKey]
} else {
throw Error({
message: 'event listener unbind failed!',
callFunc: 'adapter:_off'
})
}
}
once(funKey, callback) {
if (!funKey) {
throw Error({
message: 'event once listener funkey undefined',
callFunc: 'adapter:_once'
})
}
if (!(callback instanceof Function)) {
throw Error({
message: 'event once listener next param should be function',
callFunc: 'adapter:_once'
})
}
this._eventOnceListener[funKey] = callback
}
emit(funKey, params) {
if (this._eventOnceListener && (this._eventOnceListener[funKey] instanceof Function)) {
this._eventOnceListener[funKey](params)
delete this._eventOnceListener[funKey]
}
if (this._eventListeners && (this._eventListeners[funKey] instanceof Function)) {
this._eventListeners[funKey](params)
}
}
}
let emojiBaseUrl = `http://yx-web.nosdn.127.net/webdoc/h5/emoji`
const iconEmojiDelete = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAk1BMVEUAAADAwMC3t7e/v7/Gxsa/v7+/v7/AwMC/v7+/v7+/v7++vr7CwsK/v7+/v7+/v7++vr6/v7+/v7+/v7+/v7+/v7/AwMCbm5u/v7+/v7+/v7+/v7/AwMC/v7+/v7+/v7+/v7+/v7+/v7++vr7AwMC9vb2/v7+/v7/CwsLAwMDHx8fExMTIyMjLy8vJycnKysrPz8+3r5/kAAAAKHRSTlMA8Q39A/vcIwf34B0P1uNJIuzPjHFqFwVFmls4J761rMiFoVJ6XTNYKpTiKQAAAylJREFUeF7tmEl3ozAQhNt0ywYM3rfETuJMltEC2P//1w3IVg555olmHjfVlcMnAVUtFfgVFBQUFBQUFBREXAAR8BVnEUNZzF8YwTYdsZQ/Pcc8CsGmNEpyZMoqn/MYzxoFomIIhTDFujtjD3OlEFEyVENqzHUN1HUfx0QiKjliKJEVIorioxuF4LQ0AkW53mddf7Asmh5eNaLQeUfGLtUN4w8wtbaULlshiFZVw3gF7g8Jr4UQ5ZMfQkAvl5pRnWO+teYGhT53YMBbWTP0OAMCrqaJQjmLwKunhmGWkx4MiEZSyZEPQvDeMGRy7MOAbCTRCyHYFqqx+Rxi6KHIC7FhYrCW/gKCQSAuTBRWGwaDCSE4CmmNDtRhJhFxIS5M2o1uweQZmw7iC5N2o58O9EMhyDabjAdxYdJudIINytXiTiGY5tfrKuJBXJjo8a6FsUiMuIynQDfGuEqScgvEgLgwaTU6wVEJFEVDsYxCoOBBXJjI5LvdIOeyoaRTiGGaNowqZ7wuFybYYnT3vlJ928t9H3o2AeoOIdhUHqNbykzb9R/y6jfDDyH40g3jYo3uo6CUEh2jM4TgYE8mv4z+kJIWeFORToDn+FUhEI1/ohNMxtIy5NgyGJBspBDlMvKnYtzMV1SIxo6CYXeiZG69P8g3mbhvIqrGlQyIG1Xi8ukobYzb32UkOu93hrihi6i3QB5G48aD9aKl8B2vlPyAvYehZyc4WZqjMLMLFR5aKdHN5+kC4nvClGcA4Kdwe0ISbMs7g35yTB6B+swTs1wAtUCSpLBZcnt3lTBJTew1GXX+eGrVj69X5/OGkhu5Aeo54y+rGOjh489Py3drmn//z2nlBR5TPKcV5rnr7SEF9nvGuct3HW2uMVzxz8KifAcaDOICRhVboMEg7kiB5m/f+4nyQ34CRtmAGWAnLmD637V2I2Vn7I+8AXPiF0sHiWjyGDrf43W663WPv7wBdW8kqlXUp5Eonn9BfAGTRYxuZX7vVmJGSyQQTcJpiUxLS+QJGKW4fRfavovX3Clmc6f1mtlBXuSQHaSjLAdoU4fvhYdvuIOCgoKCgoL+AXU1fW2kbFGNAAAAAElFTkSuQmCC'
let albumArr = []
let emojiList = {
"emoji": {
"[大笑]": { file: "emoji_0.png" }, "[可爱]": { file: "emoji_01.png" }, "[色]": { file: "emoji_02.png" }, "[嘘]": { file: "emoji_03.png" }, "[亲]": { file: "emoji_04.png" }, "[呆]": { file: "emoji_05.png" }, "[口水]": { file: "emoji_06.png" }, "[汗]": { file: "emoji_145.png" }, "[呲牙]": { file: "emoji_07.png" }, "[鬼脸]": { file: "emoji_08.png" }, "[害羞]": { file: "emoji_09.png" }, "[偷笑]": { file: "emoji_10.png" }, "[调皮]": { file: "emoji_11.png" }, "[可怜]": { file: "emoji_12.png" }, "[敲]": { file: "emoji_13.png" }, "[惊讶]": { file: "emoji_14.png" }, "[流感]": { file: "emoji_15.png" }, "[委屈]": { file: "emoji_16.png" }, "[流泪]": { file: "emoji_17.png" }, "[嚎哭]": { file: "emoji_18.png" }, "[惊恐]": { file: "emoji_19.png" }, "[怒]": { file: "emoji_20.png" }, "[酷]": { file: "emoji_21.png" }, "[不说]": { file: "emoji_22.png" }, "[鄙视]": { file: "emoji_23.png" }, "[阿弥陀佛]": { file: "emoji_24.png" }, "[奸笑]": { file: "emoji_25.png" }, "[睡着]": { file: "emoji_26.png" }, "[口罩]": { file: "emoji_27.png" }, "[努力]": { file: "emoji_28.png" }, "[抠鼻孔]": { file: "emoji_29.png" }, "[疑问]": { file: "emoji_30.png" }, "[怒骂]": { file: "emoji_31.png" }, "[晕]": { file: "emoji_32.png" }, "[呕吐]": { file: "emoji_33.png" }, "[拜一拜]": { file: "emoji_160.png" }, "[惊喜]": { file: "emoji_161.png" }, "[流汗]": { file: "emoji_162.png" }, "[卖萌]": { file: "emoji_163.png" }, "[默契眨眼]": { file: "emoji_164.png" }, "[烧香拜佛]": { file: "emoji_165.png" }, "[晚安]": { file: "emoji_166.png" }, "[强]": { file: "emoji_34.png" }, "[弱]": { file: "emoji_35.png" }, "[OK]": { file: "emoji_36.png" }, "[拳头]": { file: "emoji_37.png" }, "[胜利]": { file: "emoji_38.png" }, "[鼓掌]": { file: "emoji_39.png" }, "[握手]": { file: "emoji_200.png" }, "[发怒]": { file: "emoji_40.png" }, "[骷髅]": { file: "emoji_41.png" }, "[便便]": { file: "emoji_42.png" }, "[火]": { file: "emoji_43.png" }, "[溜]": { file: "emoji_44.png" }, "[爱心]": { file: "emoji_45.png" }, "[心碎]": { file: "emoji_46.png" }, "[钟情]": { file: "emoji_47.png" }, "[唇]": { file: "emoji_48.png" }, "[戒指]": { file: "emoji_49.png" }, "[钻石]": { file: "emoji_50.png" }, "[太阳]": { file: "emoji_51.png" }, "[有时晴]": { file: "emoji_52.png" }, "[多云]": { file: "emoji_53.png" }, "[雷]": { file: "emoji_54.png" }, "[雨]": { file: "emoji_55.png" }, "[雪花]": { file: "emoji_56.png" }, "[爱人]": { file: "emoji_57.png" }, "[帽子]": { file: "emoji_58.png" }, "[皇冠]": { file: "emoji_59.png" }, "[篮球]": { file: "emoji_60.png" }, "[足球]": { file: "emoji_61.png" }, "[垒球]": { file: "emoji_62.png" }, "[网球]": { file: "emoji_63.png" }, "[台球]": { file: "emoji_64.png" }, "[咖啡]": { file: "emoji_65.png" }, "[啤酒]": { file: "emoji_66.png" }, "[干杯]": { file: "emoji_67.png" }, "[柠檬汁]": { file: "emoji_68.png" }, "[餐具]": { file: "emoji_69.png" }, "[汉堡]": { file: "emoji_70.png" }, "[鸡腿]": { file: "emoji_71.png" }, "[面条]": { file: "emoji_72.png" }, "[冰淇淋]": { file: "emoji_73.png" }, "[沙冰]": { file: "emoji_74.png" }, "[生日蛋糕]": { file: "emoji_75.png" }, "[蛋糕]": { file: "emoji_76.png" }, "[糖果]": { file: "emoji_77.png" }, "[葡萄]": { file: "emoji_78.png" }, "[西瓜]": { file: "emoji_79.png" }, "[光碟]": { file: "emoji_80.png" }, "[手机]": { file: "emoji_81.png" }, "[电话]": { file: "emoji_82.png" }, "[电视]": { file: "emoji_83.png" }, "[声音开启]": { file: "emoji_84.png" }, "[声音关闭]": { file: "emoji_85.png" }, "[铃铛]": { file: "emoji_86.png" }, "[锁头]": { file: "emoji_87.png" }, "[放大镜]": { file: "emoji_88.png" }, "[灯泡]": { file: "emoji_89.png" }, "[锤头]": { file: "emoji_90.png" }, "[烟]": { file: "emoji_91.png" }, "[炸弹]": { file: "emoji_92.png" }, "[枪]": { file: "emoji_93.png" }, "[刀]": { file: "emoji_94.png" }, "[药]": { file: "emoji_95.png" }, "[打针]": { file: "emoji_96.png" }, "[钱袋]": { file: "emoji_97.png" }, "[钞票]": { file: "emoji_98.png" }, "[银行卡]": { file: "emoji_99.png" }, "[手柄]": { file: "emoji_100.png" }, "[麻将]": { file: "emoji_101.png" }, "[调色板]": { file: "emoji_102.png" }, "[电影]": { file: "emoji_103.png" }, "[麦克风]": { file: "emoji_104.png" }, "[耳机]": { file: "emoji_105.png" }, "[音乐]": { file: "emoji_106.png" }, "[吉他]": { file: "emoji_107.png" }, "[火箭]": { file: "emoji_108.png" }, "[飞机]": { file: "emoji_109.png" }, "[火车]": { file: "emoji_110.png" }, "[公交]": { file: "emoji_111.png" }, "[轿车]": { file: "emoji_112.png" }, "[出租车]": { file: "emoji_113.png" }, "[警车]": { file: "emoji_114.png" }, "[自行车]": { file: "emoji_115.png" }
}
}
for (let emoji in emojiList) {
let emojiItem = emojiList[emoji]
for (let key in emojiItem) {
let item = emojiItem[key]
item.img = `${emojiBaseUrl}/${emoji}/${item.file}`
}
}
emojiList['ajmd'] = {}
emojiList['xxy'] = {}
emojiList['lt'] = {}
for (let i = 1; i <= 48; i++) {
let key = 'ajmd0' + (i >= 10 ? i : '0' + i)
emojiList['ajmd'][key] = { file: key + '.png' }
}
for (let i = 1; i <= 40; i++) {
let key = 'xxy0' + (i >= 10 ? i : '0' + i)
emojiList['xxy'][key] = { file: key + '.png' }
}
for (let i = 1; i <= 20; i++) {
let key = 'lt0' + (i >= 10 ? i : '0' + i)
emojiList['lt'][key] = { file: key + '.png' }
}
// 内容
for (let emoji in emojiList) {
let emojiItem = emojiList[emoji]
for (let key in emojiItem) {
let item = emojiItem[key]
item.img = `${emojiBaseUrl}/${emoji}/${item.file}`
}
// 封面
albumArr.push({
album: emoji,
img: emojiItem[Object.keys(emojiItem)[0]]['img']
})
}
// 添加删除按钮
emojiList['emoji']['[删除]'] = {}
emojiList['emoji']['[删除]']['img'] = iconEmojiDelete
export default {
emojiList,
albumArr
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var MD5 = function (string) {
function RotateLeft(lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
}
function AddUnsigned(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
lX4 = (lX & 0x40000000);
lY4 = (lY & 0x40000000);
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
if (lX4 & lY4) {
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
}
if (lX4 | lY4) {
if (lResult & 0x40000000) {
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
} else {
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
}
} else {
return (lResult ^ lX8 ^ lY8);
}
}
function F(x, y, z) { return (x & y) | ((~x) & z); }
function G(x, y, z) { return (x & z) | (y & (~z)); }
function H(x, y, z) { return (x ^ y ^ z); }
function I(x, y, z) { return (y ^ (x | (~z))); }
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function ConvertToWordArray(string) {
var lWordCount;
var lMessageLength = string.length;
var lNumberOfWords_temp1 = lMessageLength + 8;
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
lByteCount++;
}
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
};
function WordToHex(lValue) {
var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (lValue >>> (lCount * 8)) & 255;
WordToHexValue_temp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
}
return WordToHexValue;
};
function Utf8Encode(string) {
string = string || ''
string = string.replace(/\r\n/g, "\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if ((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
};
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
string = Utf8Encode(string);
x = ConvertToWordArray(string);
a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
for (k = 0; k < x.length; k += 16) {
AA = a; BB = b; CC = c; DD = d;
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
a = AddUnsigned(a, AA);
b = AddUnsigned(b, BB);
c = AddUnsigned(c, CC);
d = AddUnsigned(d, DD);
}
var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
return temp.toLowerCase();
}
module.exports = MD5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment