commit
ed8bff61f4
@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.history
|
||||
/.idea/
|
||||
unpackage
|
||||
hbuilderx
|
||||
.hbuilderx
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,95 @@
|
||||
const Base64 = {
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
encode: function(e) {
|
||||
var t = "";
|
||||
var n, r, i, s, o, u, a;
|
||||
var f = 0;
|
||||
e = Base64._utf8_encode(e);
|
||||
while (f < e.length) {
|
||||
n = e.charCodeAt(f++);
|
||||
r = e.charCodeAt(f++);
|
||||
i = e.charCodeAt(f++);
|
||||
s = n >> 2;
|
||||
o = (n & 3) << 4 | r >> 4;
|
||||
u = (r & 15) << 2 | i >> 6;
|
||||
a = i & 63;
|
||||
if (isNaN(r)) {
|
||||
u = a = 64
|
||||
} else if (isNaN(i)) {
|
||||
a = 64
|
||||
}
|
||||
t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)
|
||||
}
|
||||
return t
|
||||
},
|
||||
decode: function(e) {
|
||||
var t = "";
|
||||
var n, r, i;
|
||||
var s, o, u, a;
|
||||
var f = 0;
|
||||
e = e.replace(/[^A-Za-z0-9+/=]/g, "");
|
||||
while (f < e.length) {
|
||||
s = this._keyStr.indexOf(e.charAt(f++));
|
||||
o = this._keyStr.indexOf(e.charAt(f++));
|
||||
u = this._keyStr.indexOf(e.charAt(f++));
|
||||
a = this._keyStr.indexOf(e.charAt(f++));
|
||||
n = s << 2 | o >> 4;
|
||||
r = (o & 15) << 4 | u >> 2;
|
||||
i = (u & 3) << 6 | a;
|
||||
t = t + String.fromCharCode(n);
|
||||
if (u != 64) {
|
||||
t = t + String.fromCharCode(r)
|
||||
}
|
||||
if (a != 64) {
|
||||
t = t + String.fromCharCode(i)
|
||||
}
|
||||
}
|
||||
t = Base64._utf8_decode(t);
|
||||
return t
|
||||
},
|
||||
_utf8_encode: function(e) {
|
||||
e = e.replace(/rn/g, "n");
|
||||
var t = "";
|
||||
for (var n = 0; n < e.length; n++) {
|
||||
var r = e.charCodeAt(n);
|
||||
if (r < 128) {
|
||||
t += String.fromCharCode(r)
|
||||
} else if (r > 127 && r < 2048) {
|
||||
t += String.fromCharCode(r >> 6 | 192);
|
||||
t += String.fromCharCode(r & 63 | 128)
|
||||
} else {
|
||||
t += String.fromCharCode(r >> 12 | 224);
|
||||
t += String.fromCharCode(r >> 6 & 63 | 128);
|
||||
t += String.fromCharCode(r & 63 | 128)
|
||||
}
|
||||
}
|
||||
return t
|
||||
},
|
||||
_utf8_decode: function(e) {
|
||||
var t = "";
|
||||
var n = 0;
|
||||
var r = 0;
|
||||
var c1 =0;
|
||||
var c2 =0;
|
||||
var c3 =0;
|
||||
while (n < e.length) {
|
||||
r = e.charCodeAt(n);
|
||||
if (r < 128) {
|
||||
t += String.fromCharCode(r);
|
||||
n++
|
||||
} else if (r > 191 && r < 224) {
|
||||
c2 = e.charCodeAt(n + 1);
|
||||
t += String.fromCharCode((r & 31) << 6 | c2 & 63);
|
||||
n += 2
|
||||
} else {
|
||||
c2 = e.charCodeAt(n + 1);
|
||||
c3 = e.charCodeAt(n + 2);
|
||||
t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
|
||||
n += 3
|
||||
}
|
||||
}
|
||||
return t
|
||||
}
|
||||
}
|
||||
|
||||
export default Base64
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,137 @@
|
||||
export default{
|
||||
//首页时间转化
|
||||
dateTime(e){
|
||||
let old = new Date(e);
|
||||
let now = new Date();
|
||||
//获取old具体时间
|
||||
let d = old.getTime();
|
||||
let h = old.getHours();
|
||||
let m = old.getMinutes();
|
||||
let Y = old.getFullYear();
|
||||
let M = old.getMonth()+1;
|
||||
let D = old.getDate();
|
||||
//获取now具体时间
|
||||
let nd =now.getTime();
|
||||
let nh = now.getHours();
|
||||
let n = now.getMinutes();
|
||||
let nY = now.getFullYear();
|
||||
let nM = now.getMonth()+1;
|
||||
let nD = now.getDate();
|
||||
|
||||
//当天的时间
|
||||
if(D === nD && M === nM && Y === nY){
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return h+':'+m;
|
||||
}
|
||||
//昨天时间
|
||||
if(D+1 === nD && M === nM && Y === nY){
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return '昨天 '+h+':'+m;
|
||||
}else{
|
||||
//大于两天
|
||||
return Y+'/'+M+'/'+D;
|
||||
}
|
||||
|
||||
},
|
||||
//聊天时,发送时间处理
|
||||
dateTime1(e){
|
||||
let old = new Date(e);
|
||||
let now = new Date();
|
||||
//获取old具体时间
|
||||
let d = old.getTime();
|
||||
let h = old.getHours();
|
||||
let m = old.getMinutes();
|
||||
let Y = old.getFullYear();
|
||||
let M = old.getMonth()+1;
|
||||
let D = old.getDate();
|
||||
//获取now具体时间
|
||||
let nd =now.getTime();
|
||||
let nh = now.getHours();
|
||||
let n = now.getMinutes();
|
||||
let nY = now.getFullYear();
|
||||
let nM = now.getMonth()+1;
|
||||
let nD = now.getDate();
|
||||
|
||||
//当天的时间
|
||||
if(D === nD && M === nM && Y === nY){
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return h+':'+m;
|
||||
}
|
||||
//昨天时间
|
||||
if(D+1 === nD && M === nM && Y === nY){
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return '昨天 '+h+':'+m;
|
||||
}else if( Y == nY){
|
||||
//今年
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return M+'月'+D+'日 '+h+':'+m
|
||||
}else{
|
||||
//大于今年
|
||||
if(h<10){
|
||||
h = '0'+h;
|
||||
}
|
||||
if(m<10){
|
||||
m = '0'+m;
|
||||
}
|
||||
return Y+'年'+ M +'月' +D+ '日 '+h+':'+m
|
||||
}
|
||||
},
|
||||
// 间隔时间差
|
||||
spaceTime(old,now){
|
||||
old = new Date(old);
|
||||
now = new Date(now);
|
||||
var told = old.getTime();
|
||||
var tnow = now.getTime();
|
||||
if(told > (tnow+1000*60*5)){
|
||||
return now;
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
chatrurn(data){
|
||||
data.forEach((cell,i)=>{
|
||||
cell["ifaudio"]=false;
|
||||
//时间间隔处理
|
||||
//这里表示头部时间还是显示一下
|
||||
var oldTime= new Date();
|
||||
let t = dateTime.spaceTime(oldTime, cell.bzrq);
|
||||
if (t) {
|
||||
oldTime = t;
|
||||
}
|
||||
cell.bzrq = t;
|
||||
|
||||
// 获取图片,为下面的预览做准备
|
||||
if(cell.type=='txt'){
|
||||
cell.content=decodeURIComponent(cell.content);
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
/* #ifndef APP-NVUE */
|
||||
view,
|
||||
text {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
/* start--演示页面使用的统一样式--start */
|
||||
.u-demo {
|
||||
padding: 25px 20px;
|
||||
}
|
||||
|
||||
.u-demo-wrap {
|
||||
border-width: 1px;
|
||||
border-color: #ddd;
|
||||
border-style: dashed;
|
||||
background-color: rgb(250, 250, 250);
|
||||
padding: 20px 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.u-demo-area {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.u-no-demo-here {
|
||||
color: $u-tips-color;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.u-demo-result-line {
|
||||
border-width: 1px;
|
||||
border-color: #ddd;
|
||||
border-style: dashed;
|
||||
padding: 5px 20px;
|
||||
margin-top: 30px;
|
||||
border-radius: 5px;
|
||||
background-color: rgb(240, 240, 240);
|
||||
color: $u-content-color;
|
||||
font-size: 16px;
|
||||
/* #ifndef APP-NVUE */
|
||||
word-break: break-word;
|
||||
display: inline-block;
|
||||
/* #endif */
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
.u-demo-title,
|
||||
.u-config-title {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.u-config-item {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.u-config-title {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.u-item-title {
|
||||
position: relative;
|
||||
font-size: 15px;
|
||||
padding-left: 8px;
|
||||
line-height: 1;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.u-item-title:after {
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
top: -1px;
|
||||
height: 16px;
|
||||
/* #ifndef APP-NVUE */
|
||||
content: '';
|
||||
/* #endif */
|
||||
left: 0;
|
||||
border-radius: 10px;
|
||||
background-color: $u-content-color;
|
||||
}
|
||||
/* end--演示页面使用的统一样式--end */
|
||||
@ -0,0 +1,585 @@
|
||||
module.exports = {
|
||||
list: [{
|
||||
"letter": "A",
|
||||
"data": [{
|
||||
"name": "阿拉斯加",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "阿拉斯加ABA13588889999"
|
||||
},
|
||||
{
|
||||
"name": "阿克苏",
|
||||
"mobile": "0551-4386721",
|
||||
"keyword": "阿克苏AKESU0551-4386721"
|
||||
},
|
||||
{
|
||||
"name": "阿拉善",
|
||||
"mobile": "4008009100",
|
||||
"keyword": "阿拉善ALASHAN4008009100"
|
||||
},
|
||||
{
|
||||
"name": "阿勒泰",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "阿勒泰ALETAI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "阿里",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "阿里ALI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "安阳",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "13588889999安阳ANYANG"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "B",
|
||||
"data": [{
|
||||
"name": "白城",
|
||||
"mobile": "该主子没有留电话~",
|
||||
"keyword": "白城BAICHENG"
|
||||
},
|
||||
{
|
||||
"name": "白山",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "白山BAISHAN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "白银",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "白银BAIYIN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "保定",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "保定BAODING13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "C",
|
||||
"data": [{
|
||||
"name": "沧州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "沧州CANGZHOU13588889999"
|
||||
},
|
||||
{
|
||||
"name": "长春",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "长春CHANGCHUN13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "D",
|
||||
"data": [{
|
||||
"name": "大理",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "大理DALI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "大连",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "大连DALIAN13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "E",
|
||||
"data": [{
|
||||
"name": "鄂尔多斯",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "鄂尔多斯EERDUOSI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "恩施",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "恩施ENSHI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "鄂州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "鄂州EZHOU13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "F",
|
||||
"data": [{
|
||||
"name": "防城港",
|
||||
"mobile": "该主子没有留电话~",
|
||||
"keyword": "防城港FANGCHENGGANG"
|
||||
},
|
||||
{
|
||||
"name": "抚顺",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "抚顺FUSHUN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "阜新",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "阜新FUXIN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "阜阳",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "阜阳FUYANG13588889999"
|
||||
},
|
||||
{
|
||||
"name": "抚州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "抚州FUZHOU13588889999"
|
||||
},
|
||||
{
|
||||
"name": "福州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "福州FUZHOU13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "G",
|
||||
"data": [{
|
||||
"name": "甘南",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "甘南GANNAN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "赣州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "赣州GANZHOU13588889999"
|
||||
},
|
||||
{
|
||||
"name": "甘孜",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "甘孜GANZI13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "H",
|
||||
"data": [{
|
||||
"name": "哈尔滨",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "哈尔滨HAERBIN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "海北",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "海北HAIBEI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "海东",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "海东HAIDONG13588889999"
|
||||
},
|
||||
{
|
||||
"name": "海口",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "海口HAIKOU13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "I",
|
||||
"data": [{
|
||||
"name": "ice",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "佳木斯JIAMUSI13588889999"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"letter": "J",
|
||||
"data": [{
|
||||
"name": "佳木斯",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "佳木斯JIAMUSI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "吉安",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "吉安JIAN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "江门",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "江门JIANGMEN13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "K",
|
||||
"data": [{
|
||||
"name": "开封",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "开封KAIFENG13588889999"
|
||||
},
|
||||
{
|
||||
"name": "喀什",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "喀什KASHI13588889999"
|
||||
},
|
||||
{
|
||||
"name": "克拉玛依",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "克拉玛依KELAMAYI13588889999"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "L",
|
||||
"data": [{
|
||||
"name": "来宾",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "来宾LAIBIN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "兰州",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "兰州LANZHOU13588889999"
|
||||
},
|
||||
{
|
||||
"name": "拉萨",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "拉萨LASA13588889999"
|
||||
},
|
||||
{
|
||||
"name": "乐山",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "乐山LESHAN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "凉山",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "凉山LIANGSHAN13588889999"
|
||||
},
|
||||
{
|
||||
"name": "连云港",
|
||||
"mobile": "13588889999",
|
||||
"keyword": "连云港LIANYUNGANG13588889999"
|
||||
},
|
||||
{
|
||||
"name": "聊城",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "聊城LIAOCHENG18322223333"
|
||||
},
|
||||
{
|
||||
"name": "辽阳",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "辽阳LIAOYANG18322223333"
|
||||
},
|
||||
{
|
||||
"name": "辽源",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "辽源LIAOYUAN18322223333"
|
||||
},
|
||||
{
|
||||
"name": "丽江",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "丽江LIJIANG18322223333"
|
||||
},
|
||||
{
|
||||
"name": "临沧",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "临沧LINCANG18322223333"
|
||||
},
|
||||
{
|
||||
"name": "临汾",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "临汾LINFEN18322223333"
|
||||
},
|
||||
{
|
||||
"name": "临夏",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "临夏LINXIA18322223333"
|
||||
},
|
||||
{
|
||||
"name": "临沂",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "临沂LINYI18322223333"
|
||||
},
|
||||
{
|
||||
"name": "林芝",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "林芝LINZHI18322223333"
|
||||
},
|
||||
{
|
||||
"name": "丽水",
|
||||
"mobile": "18322223333",
|
||||
"keyword": "丽水LISHUI18322223333"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "M",
|
||||
"data": [{
|
||||
"name": "眉山",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "眉山MEISHAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "梅州",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "梅州MEIZHOU15544448888"
|
||||
},
|
||||
{
|
||||
"name": "绵阳",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "绵阳MIANYANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "牡丹江",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "牡丹江MUDANJIANG15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "N",
|
||||
"data": [{
|
||||
"name": "南昌",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "南昌NANCHANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "南充",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "南充NANCHONG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "南京",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "南京NANJING15544448888"
|
||||
},
|
||||
{
|
||||
"name": "南宁",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "南宁NANNING15544448888"
|
||||
},
|
||||
{
|
||||
"name": "南平",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "南平NANPING15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "O",
|
||||
"data": [{
|
||||
"name": "欧阳",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "欧阳ouyang15544448888"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"letter": "P",
|
||||
"data": [{
|
||||
"name": "盘锦",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "盘锦PANJIN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "攀枝花",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "攀枝花PANZHIHUA15544448888"
|
||||
},
|
||||
{
|
||||
"name": "平顶山",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "平顶山PINGDINGSHAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "平凉",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "平凉PINGLIANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "萍乡",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "萍乡PINGXIANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "普洱",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "普洱PUER15544448888"
|
||||
},
|
||||
{
|
||||
"name": "莆田",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "莆田PUTIAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "濮阳",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "濮阳PUYANG15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "Q",
|
||||
"data": [{
|
||||
"name": "黔东南",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "黔东南QIANDONGNAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "黔南",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "黔南QIANNAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "黔西南",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "黔西南QIANXINAN15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "R",
|
||||
"data": [{
|
||||
"name": "日喀则",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "日喀则RIKAZE15544448888"
|
||||
},
|
||||
{
|
||||
"name": "日照",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "日照RIZHAO15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "S",
|
||||
"data": [{
|
||||
"name": "三门峡",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "三门峡SANMENXIA15544448888"
|
||||
},
|
||||
{
|
||||
"name": "三明",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "三明SANMING15544448888"
|
||||
},
|
||||
{
|
||||
"name": "三沙",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "三沙SANSHA15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "T",
|
||||
"data": [{
|
||||
"name": "塔城",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "塔城TACHENG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "漯河",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "漯河TAHE15544448888"
|
||||
},
|
||||
{
|
||||
"name": "泰安",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "泰安TAIAN15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "W",
|
||||
"data": [{
|
||||
"name": "潍坊",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "潍坊WEIFANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "威海",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "威海WEIHAI15544448888"
|
||||
},
|
||||
{
|
||||
"name": "渭南",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "渭南WEINAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "文山",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "文山WENSHAN15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "X",
|
||||
"data": [{
|
||||
"name": "厦门",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "厦门XIAMEN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "西安",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "西安XIAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "湘潭",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "湘潭XIANGTAN15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "Y",
|
||||
"data": [{
|
||||
"name": "雅安",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "雅安YAAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "延安",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "延安YANAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "延边",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "延边YANBIAN15544448888"
|
||||
},
|
||||
{
|
||||
"name": "盐城",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "盐城YANCHENG15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "Z",
|
||||
"data": [{
|
||||
"name": "枣庄",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "枣庄ZAOZHUANG15544448888"
|
||||
},
|
||||
{
|
||||
"name": "张家界",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "张家界ZHANGJIAJIE15544448888"
|
||||
},
|
||||
{
|
||||
"name": "张家口",
|
||||
"mobile": "15544448888",
|
||||
"keyword": "张家口ZHANGJIAKOU15544448888"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"letter": "#",
|
||||
"data": [{
|
||||
"name": "其他.",
|
||||
"mobile": "16666666666",
|
||||
"keyword": "echo16666666666"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
|
||||
var utils = {
|
||||
//时间格式化
|
||||
formatDate: (value) => {
|
||||
let date = null;
|
||||
if (!value) {
|
||||
return date;
|
||||
}
|
||||
if (value.constructor == Date && !isNaN(value.getTime())) {
|
||||
date = value;
|
||||
}
|
||||
else if (value.constructor == String || value.constructor == Number) {
|
||||
date = new Date(value);
|
||||
}
|
||||
else {
|
||||
throw "格式化日期时,传入的数据格式不正确。";
|
||||
}
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
|
||||
},
|
||||
format: (value) => {
|
||||
let date = null;
|
||||
if (!value) {
|
||||
return date;
|
||||
}
|
||||
if (value.constructor == Date && !isNaN(value.getTime())) {
|
||||
date = value;
|
||||
}
|
||||
else if (value.constructor == String || value.constructor == Number) {
|
||||
date = new Date(value);
|
||||
}
|
||||
else {
|
||||
throw "格式化日期时,传入的数据格式不正确。";
|
||||
}
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
|
||||
return y + '/' + MM + '/' + d;
|
||||
},
|
||||
|
||||
//字典数据根据key显示文字
|
||||
dataFilter:(arr, val='')=> {
|
||||
let name = "";
|
||||
arr.forEach((item) => {
|
||||
if (item.key == val) {
|
||||
name = item.name;
|
||||
}else{
|
||||
name='--'
|
||||
}
|
||||
});
|
||||
return name;
|
||||
},
|
||||
|
||||
//列表转换为树格式
|
||||
listtoTree:(data)=>{
|
||||
let result = [];
|
||||
if (!Array.isArray(data)) {
|
||||
return result;
|
||||
}
|
||||
data.forEach((item) => {
|
||||
delete item.children;
|
||||
});
|
||||
let map = {};
|
||||
data.forEach((item) => {
|
||||
map[item.id] = item;
|
||||
});
|
||||
data.forEach((item) => {
|
||||
let parent = map[item.parentId];
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
} else {
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
getRemoteFile: (path) => {
|
||||
return `https://www.sanduolantoyoga.com/yoga${path}`;
|
||||
}
|
||||
}
|
||||
// 格式化日期
|
||||
export default utils;
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,157 @@
|
||||
.tki-tree-mask {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: 9998;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease;
|
||||
visibility: hidden;
|
||||
}
|
||||
.tki-tree-mask.show {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.tki-tree-cnt {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: 9999;
|
||||
top: 225rpx;
|
||||
transition: all 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
}
|
||||
.tki-tree-cnt.show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.tki-tree-bar {
|
||||
background-color: #fff;
|
||||
height: 100rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border-bottom-width: 2rpx !important;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #f5f5f5;
|
||||
font-size: 32rpx;
|
||||
color: #757575;
|
||||
line-height: 1;
|
||||
}
|
||||
.tki-tree-bar-confirm {
|
||||
color: #89965f;
|
||||
}
|
||||
.tki-tree-view {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
top: 100rpx;
|
||||
background-color: #fff;
|
||||
padding-top: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.tki-tree-view-sc {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tki-tree-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #757575;
|
||||
line-height: 1;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
transition: 0.2s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tki-tree-item.show {
|
||||
height: 100rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
.tki-tree-item.showchild:before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.tki-tree-item.last:before {
|
||||
opacity: 0;
|
||||
}
|
||||
.tki-tree-icon {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.tki-tree-label {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
line-height: 1.2;
|
||||
word-break: break-all;
|
||||
}
|
||||
.tki-tree-check {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tki-tree-check-yes,
|
||||
.tki-tree-check-no {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
border-bottom-left-radius: 20%;
|
||||
border-top-width: 2rpx;
|
||||
border-left-width: 2rpx;
|
||||
border-bottom-width: 2rpx;
|
||||
border-right-width: 2rpx;
|
||||
border-style: solid;
|
||||
border-color: #89965f;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tki-tree-check-yes-b {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
border-bottom-left-radius: 20%;
|
||||
background-color: #89965f;
|
||||
}
|
||||
.tki-tree-check .radio {
|
||||
border-top-left-radius: 50%;
|
||||
border-top-right-radius: 50%;
|
||||
border-bottom-right-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
}
|
||||
.tki-tree-check .radio .tki-tree-check-yes-b {
|
||||
border-top-left-radius: 50%;
|
||||
border-top-right-radius: 50%;
|
||||
border-bottom-right-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
}
|
||||
.hover-c {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.tki-tree-bar-title{
|
||||
color:#000000;
|
||||
width: 66%;
|
||||
text-align: center;
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="emoji" :style="{height:height+'px'}">
|
||||
<view class="emoji-line" v-for="(line,i) in emoji" :key="i">
|
||||
<view class="emoji-line-item" v-for="(item,index) in line" :key="index" @tap="clickEmoji(item)">{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
height:{
|
||||
type:Number,
|
||||
default:260
|
||||
}
|
||||
},
|
||||
name: "emoji",
|
||||
data() {
|
||||
return {
|
||||
emoji: [
|
||||
['😀', '😁', '😂', '🤣', '😃', '😃', '😅'],
|
||||
['😄', '😆', '😉', '😊', '😋', '😎', '😍'],
|
||||
['😎', '😘', '😗', '😙', '🙂', '🤗', '😑'],
|
||||
['😏', '😣', '😥', '😮', '🤐', '😯', '😶'],
|
||||
['😪', '😫', '😴', '😌', '😛', '🤤', '🙄'],
|
||||
['😒', '😓', '😕', '🙃', '🤑', '🙁', '😚'],
|
||||
['😖', '😤', '😭', '😨', '😰', '😬', '😵'],
|
||||
['😱', '😡', '😷', '💀', '👻', '💍', '💄'],
|
||||
['💩', '👑', '🎓', '👀', '💪🏻', '☝🏻', '✌🏼'],
|
||||
['🤘🏻', '🤙🏼', '👌🏻', '✊🏻', '👍🏼', '👎🏻', '👏🏻'],
|
||||
['🙏🏻', '🤝', '🍖', '🍲', '🍦', '🍰'] //'🍔',
|
||||
],
|
||||
emojiindex: [
|
||||
[11, 12, 13, 14, 15, 16,17],
|
||||
[21, 22, 23, 24, 25, 26, 27],
|
||||
[31, '😘', '😗', '😙', '🙂', '🤗', '😑'],
|
||||
[41, '😣', '😥', '😮', '🤐', '😯', '😶'],
|
||||
[51, '😫', '😴', '😌', '😛', '🤤', '🙄'],
|
||||
[61, '😓', '😕', '🙃', '🤑', '🙁', '😚'],
|
||||
[71, '😤', '😭', '😨', '😰', '😬', '😵'],
|
||||
[81, '😡', '😷', '💀', '👻', '💍', '💄'],
|
||||
[91, '👑', '🎓', '👀', '💪🏻', '☝🏻', '✌🏼'],
|
||||
['🤘🏻', '🤙🏼', '👌🏻', '✊🏻', '👍🏼', '👎🏻', '👏🏻'],
|
||||
['🙏🏻', '🤝', '🍖', '🍲', '🍦', '🍰'] //'🍔',
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
clickEmoji(e) {
|
||||
this.$emit('emotion', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.emoji {
|
||||
width: 100%;
|
||||
// height: 460rpx;
|
||||
padding: 16rpx 10rpx 130rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.emoji-line{
|
||||
display: flex;
|
||||
|
||||
.emoji-line-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 44rpx;
|
||||
line-height: 140rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,46 @@
|
||||
// 贝塞尔算法
|
||||
function bezier(pots, amount) {
|
||||
var pot;
|
||||
var lines;
|
||||
var ret = [];
|
||||
var points;
|
||||
for (var i = 0; i <= amount; i++) {
|
||||
points = pots.slice(0);
|
||||
lines = [];
|
||||
while (pot = points.shift()) {
|
||||
if (points.length) {
|
||||
lines.push(pointLine([pot, points[0]], i / amount));
|
||||
} else if (lines.length > 1) {
|
||||
points = lines;
|
||||
lines = [];
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret.push(lines[0]);
|
||||
}
|
||||
function pointLine(points, rate) {
|
||||
var pointA, pointB, pointDistance, xDistance, yDistance, tan, radian, tmpPointDistance;
|
||||
var ret = [];
|
||||
pointA = points[0];//点击
|
||||
pointB = points[1];//中间
|
||||
xDistance = pointB.x - pointA.x;
|
||||
yDistance = pointB.y - pointA.y;
|
||||
pointDistance = Math.pow(Math.pow(xDistance, 2) + Math.pow(yDistance, 2), 1 / 2);
|
||||
tan = yDistance / xDistance;
|
||||
radian = Math.atan(tan);
|
||||
tmpPointDistance = pointDistance * rate;
|
||||
ret = {
|
||||
x: pointA.x + tmpPointDistance * Math.cos(radian),
|
||||
y: pointA.y + tmpPointDistance * Math.sin(radian)
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
return {
|
||||
'bezier_points': ret
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
bezier
|
||||
}
|
||||
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 加入购物车的小球 -->
|
||||
<view class="good_box" v-if="!hide_good_box" :style="'left:'+bus_x+'px;top:'+bus_y+'px;'">
|
||||
<image :src="imgUrl"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import $flyInData from '@/components/fly-in-cart/fly-in-cart.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count: 0,
|
||||
hide_good_box: true,
|
||||
finger: {},
|
||||
busPos: {},
|
||||
bus_x: 0,
|
||||
bus_y: 0,
|
||||
imgUrl: '',
|
||||
}
|
||||
},
|
||||
props: {
|
||||
cartx: { //购物车X坐标 在屏幕中的比例 值 0-1 之间
|
||||
type: String,
|
||||
default: '0'
|
||||
},
|
||||
carty: { //购物车y坐标 在屏幕中的比例 值 0-1 之间
|
||||
type: String,
|
||||
default: '0'
|
||||
},
|
||||
},
|
||||
created: function() {
|
||||
/** 计算购物车的坐标 **/
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
let ww = res.windowWidth;//取窗口宽度
|
||||
let hh = res.windowHeight;//取窗口高度
|
||||
|
||||
//此处可能需要根据设备不同 条件编译一下 偏移值
|
||||
let devx = 1;//x偏移值
|
||||
let devy = 1;//y偏移值
|
||||
// #ifdef APP-PLUS
|
||||
devx = 1;
|
||||
devy = 0.93;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
devx = 1;
|
||||
devy = 0.9;
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
devx = 1;
|
||||
devy = 1;
|
||||
// #endif
|
||||
|
||||
that.busPos['x'] = ww * that.cartx * devx; //根据屏幕大小*cartx购物车X坐标比例 计算购物车实际x坐标
|
||||
that.busPos['y'] = hh * that.carty * devy; //根据屏幕大小*carty购物车y坐标比例 计算购物车实际y坐标
|
||||
}
|
||||
})
|
||||
that.count = 0;
|
||||
},
|
||||
methods: {
|
||||
touchOnGoods: function(e) {
|
||||
this.imgUrl = e.currentTarget.dataset.img;
|
||||
// 如果good_box正在运动
|
||||
if (!this.hide_good_box) return;
|
||||
var topPoint = {};
|
||||
this.finger['x'] = e.touches["0"].clientX-13; //取点击位置 x坐标
|
||||
this.finger['y'] = e.touches["0"].clientY-10; //取点击位置 y坐标 -10是因为点击位置有些偏移,此数值可根据实际情况自由设置
|
||||
if (this.finger['y'] < this.busPos['y']) {
|
||||
topPoint['y'] = this.finger['y'] - 150;
|
||||
} else {
|
||||
topPoint['y'] = this.busPos['y'] - 150;
|
||||
}
|
||||
topPoint['x'] = Math.abs(this.finger['x'] - this.busPos['x']) / 2;
|
||||
/** this.finger['x']是点击位置X坐标 this.busPos['x']是购物车X坐标***/
|
||||
if (this.finger['x'] > this.busPos['x']) {
|
||||
/* 当点击位置X坐标>购物车X坐标 时 执行 左抛物线 **/
|
||||
topPoint['x'] = (this.finger['x'] - this.busPos['x']) / 2 + this.busPos['x'];
|
||||
/* 贝塞尔算法 创建从购物车到点击位置的 抛物线 抛物线本身并不分左右*/
|
||||
this.linePos = $flyInData.bezier([this.busPos, topPoint, this.finger], 30);
|
||||
this.startAnimationLeft(); //逆时针执行抛物线 就形成了 左抛物线
|
||||
} else {
|
||||
/* 当点击位置X坐标<购物车X坐标 时 执行 右抛物线 **/
|
||||
topPoint['x'] = (this.busPos['x'] - this.finger['x']) / 2 + this.finger['x'];
|
||||
/* 贝塞尔算法 创建从点击位置到购物车的 抛物线 抛物线本身并不分左右*/
|
||||
this.linePos = $flyInData.bezier([this.finger, topPoint, this.busPos], 30);
|
||||
this.startAnimationRight(); //顺时针执行抛物线 就形成了 右抛物线
|
||||
}
|
||||
},
|
||||
/* 向右抛物线 根据抛弧线数据 定时器修改good_box style left 和 top 的值来实现动画效果 */
|
||||
startAnimationRight: function() {
|
||||
var index = 0,
|
||||
that = this,
|
||||
bezier_points = that.linePos['bezier_points'];//取抛弧线数据
|
||||
that.bus_x = that.finger['x']
|
||||
that.bus_y = that.finger['y']
|
||||
that.hide_good_box = false
|
||||
|
||||
that.timer = setInterval(function() {
|
||||
index++;
|
||||
that.bus_x = bezier_points[index]['x']
|
||||
that.bus_y = bezier_points[index]['y']
|
||||
if (index >= 28) {
|
||||
clearInterval(that.timer);
|
||||
that.hide_good_box = true,
|
||||
that.hideCount = false,
|
||||
that.count = that.count += 1
|
||||
}
|
||||
}, 20); // 控制动画运动的时间
|
||||
},
|
||||
/* 向左抛物线 */
|
||||
startAnimationLeft: function() {
|
||||
var index = 0,
|
||||
that = this,
|
||||
bezier_points = that.linePos['bezier_points'];
|
||||
that.bus_x = that.finger['x']
|
||||
that.bus_y = that.finger['y']
|
||||
that.hide_good_box = false
|
||||
var len = bezier_points.length;
|
||||
index = len
|
||||
that.timer = setInterval(function() {
|
||||
index--;
|
||||
that.bus_x = bezier_points[index]['x']
|
||||
that.bus_y = bezier_points[index]['y']
|
||||
if (index < 1) {
|
||||
clearInterval(that.timer);
|
||||
that.hide_good_box = true,
|
||||
that.hideCount = false,
|
||||
that.count = that.count += 1
|
||||
}
|
||||
}, 20); // 控制动画运动的时间
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.container {
|
||||
.good_box {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: fixed;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
z-index: +99999;
|
||||
}
|
||||
|
||||
.good_box image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<iframe :onload="onloadCode" style="width:460rpx;height:100%;border:1px solid #fff;background: #000;border-radius: 20rpx;"></iframe>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "myVideo",
|
||||
props: {
|
||||
videoUrl: {
|
||||
// 确定按钮颜色
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
onloadCode: `
|
||||
const url = '${this.videoUrl}'
|
||||
this.contentWindow.document.body.innerHTML = '<video style="width: 100%;height: 100%" controls="controls" src="'+url+'"></video>';
|
||||
const iframe = top.document.getElementsByTagName('iframe')[0]
|
||||
var evObj = document.createEvent('MouseEvents');
|
||||
evObj.initEvent( 'event1', true, false );
|
||||
iframe.dispatchEvent(evObj)
|
||||
`
|
||||
// onloadCode: `
|
||||
// const url = 'https://vd3.bdstatic.com/mda-mja2qsy47mbyh1xc/sc/cae_h264_clips/1633918903861514556/mda-mja2qsy47mbyh1xc.mp4?auth_key=1634030413-0-0-7898726f7bd328302e2119fdf694fd5e&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest='
|
||||
// this.contentWindow.document.body.innerHTML = '<video style="width: 100%;height: 100%" controls="controls" src="'+url+'"></video>';
|
||||
// const iframe = top.document.getElementsByTagName('iframe')[0]
|
||||
// var evObj = document.createEvent('MouseEvents');
|
||||
// evObj.initEvent( 'event1', true, false );
|
||||
// iframe.dispatchEvent(evObj)
|
||||
// `
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<view class="step">
|
||||
<u-steps v-if="id&&numList.length>0" ref='step' :list="numList" :current="current" mode="number" :icon="icon"></u-steps>
|
||||
<view v-else class="lctips">暂无审批流程记录</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "lctree",
|
||||
props: {
|
||||
id: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
current:0,
|
||||
icon: 'checkmark', //error', //checkmark',
|
||||
numList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this._initTree();
|
||||
},
|
||||
methods: {
|
||||
_initTree() {
|
||||
if(this.id&&this.id!==null){
|
||||
this.$u.api.getApprovalRecord(this.id).then(res => {
|
||||
console.log(res);
|
||||
if(!res.state){
|
||||
var data = res;
|
||||
var flowVoList = data.flowVoList ? data.flowVoList : [];
|
||||
this.current=flowVoList.length;
|
||||
if (flowVoList.length > 0) {
|
||||
flowVoList.forEach((item,idx)=>{
|
||||
var cell={};
|
||||
if (item.opinionType == '1') {
|
||||
// 同意
|
||||
cell={
|
||||
name: item.stepContent
|
||||
};
|
||||
this.numList.push(cell);
|
||||
}
|
||||
else if(item.opinionType == '2'){
|
||||
// 不同意
|
||||
cell={
|
||||
name: item.stepContent,
|
||||
color:"#ff9900",
|
||||
icon:"close",
|
||||
};
|
||||
this.numList.push(cell);
|
||||
}
|
||||
else {
|
||||
if ((item.isStart&&item.isStart=='1') || item.stepContent=='发起申请') {
|
||||
cell={
|
||||
name: item.stepContent
|
||||
};
|
||||
this.numList.push(cell);
|
||||
}
|
||||
else{
|
||||
// 待审批
|
||||
cell={
|
||||
name: item.stepContent
|
||||
};
|
||||
this.numList.push(cell);
|
||||
this.current=idx;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.step {
|
||||
padding: 20rpx 0 0 0;
|
||||
}
|
||||
.lctips{
|
||||
font-size:28rpx;
|
||||
color: #000;
|
||||
margin:0 auto;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<view class="uni-combox">
|
||||
<view class="uni-combox-dialog" v-if="isDialogInput && showSelector">
|
||||
<view class="uni-combox-input">
|
||||
<input
|
||||
class="uni-combox__input"
|
||||
type="text"
|
||||
:placeholder="selectItem.value ? selectItem.value : placeholder"
|
||||
v-model="inputVal"
|
||||
@input="onInput"
|
||||
@blur="onBlur"
|
||||
:focus="'true'"
|
||||
style="height: 90upx;"
|
||||
/>
|
||||
<uni-icons style="line-height: 90upx;" class="uni-combox__input-arrow" type="close" size="14" @click="clearSelector"></uni-icons>
|
||||
<view class="uni-combox__selector">
|
||||
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
|
||||
<view class="uni-combox__selector-empty" v-if="isLoading"><text>数据加载...</text></view>
|
||||
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0 && !isLoading">
|
||||
<text>{{ emptyTips }}</text>
|
||||
</view>
|
||||
<view v-if="!isLoading" class="uni-combox__selector-item" v-for="(item, index) in filterCandidates" :key="index" @click="onSelectorClick(item)">
|
||||
<text>{{ item.value }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="label" class="uni-combox__label" :style="labelStyle">
|
||||
<text>{{ label }}</text>
|
||||
</view>
|
||||
<view class="uni-combox__input-box">
|
||||
<input
|
||||
v-if="isDialogInput"
|
||||
class="uni-combox__input"
|
||||
type="text"
|
||||
:placeholder="selectItem.value ? selectItem.value : placeholder"
|
||||
v-model="inputVal"
|
||||
@focus="onFocus"
|
||||
/>
|
||||
<input
|
||||
v-else
|
||||
class="uni-combox__input"
|
||||
type="text"
|
||||
:placeholder="selectItem.value ? selectItem.value : placeholder"
|
||||
v-model="inputVal"
|
||||
@focus="onFocus"
|
||||
@input="onInput"
|
||||
@blur="onBlur"
|
||||
/>
|
||||
<uni-icons v-if="!showSelector && !inputVal" class="uni-combox__input-arrow" type="arrowdown" size="14" @click="toggleSelector"></uni-icons>
|
||||
<uni-icons v-else class="uni-combox__input-arrow" type="close" size="14" @click="clearSelector"></uni-icons>
|
||||
<view class="uni-combox__selector" v-if="!isDialogInput && showSelector">
|
||||
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
|
||||
<view class="uni-combox__selector-empty" v-if="isLoading"><text>数据加载...</text></view>
|
||||
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0 && !isLoading">
|
||||
<text>{{ emptyTips }}</text>
|
||||
</view>
|
||||
<view v-if="!isLoading" class="uni-combox__selector-item" v-for="(item, index) in filterCandidates" :key="index" @click="onSelectorClick(item)">
|
||||
<text>{{ item.value }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniIcons from '../uni-icons/uni-icons.vue';
|
||||
/**
|
||||
* Combox 组合输入框
|
||||
* @description 组合输入框一般用于既可以输入也可以选择的场景
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
|
||||
* @property {String} label 左侧文字
|
||||
* @property {String} labelWidth 左侧内容宽度
|
||||
* @property {String} placeholder 输入框占位符
|
||||
* @property {Array} candidates 候选项列表
|
||||
* @property {String} emptyTips 筛选结果为空时显示的文字
|
||||
* @property {String} value 组合框的值
|
||||
* @property {String} isDialogInput 弹出框输入和选择避免键盘遮挡
|
||||
*/
|
||||
export default {
|
||||
name: 'uniCombox',
|
||||
components: {
|
||||
uniIcons
|
||||
},
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
labelWidth: {
|
||||
type: String,
|
||||
default: 'auto'
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
candidates: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
emptyTips: {
|
||||
type: String,
|
||||
default: '无匹配项'
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isDialogInput: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showSelector: false,
|
||||
inputVal: '',
|
||||
isLoading: false,
|
||||
showDowm: true,
|
||||
selectItem: { key: '', value: '' }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
labelStyle() {
|
||||
if (this.labelWidth === 'auto') {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
width: this.labelWidth
|
||||
};
|
||||
},
|
||||
filterCandidates() {
|
||||
return this.candidates.filter(item => {
|
||||
return item;
|
||||
});
|
||||
},
|
||||
filterCandidatesLength() {
|
||||
return this.filterCandidates.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(newVal) {
|
||||
if(newVal) {
|
||||
this.candidates.filter(item => {
|
||||
if (this.value === item.key) {
|
||||
this.selectItem = item;
|
||||
this.inputVal = item.value;
|
||||
}
|
||||
});
|
||||
}else {
|
||||
this.selectItem = { key: '', value: '' }
|
||||
this.inputVal = ''
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
candidates: {
|
||||
handler(newVal) {
|
||||
this.isLoading = false;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSelector() {
|
||||
this.showSelector = !this.showSelector;
|
||||
},
|
||||
clearSelector() {
|
||||
this.selectItem = { key: '', value: '' };
|
||||
this.inputVal = '';
|
||||
this.showSelector = false;
|
||||
this.isLoading = false;
|
||||
this.$emit('clear');
|
||||
},
|
||||
onFocus() {
|
||||
this.showSelector = true;
|
||||
if (this.inputVal) {
|
||||
this.inputVal = '';
|
||||
}
|
||||
},
|
||||
onBlur() {
|
||||
setTimeout(() => {
|
||||
if (this.selectItem.value) {
|
||||
const selectItem = JSON.parse(JSON.stringify(this.selectItem));
|
||||
this.inputVal = selectItem.value;
|
||||
} else {
|
||||
this.inputVal = '';
|
||||
}
|
||||
this.showSelector = false;
|
||||
}, 50);
|
||||
},
|
||||
onSelectorClick(item) {
|
||||
this.selectItem = item;
|
||||
this.inputVal = item.value;
|
||||
this.showSelector = false;
|
||||
this.$emit('select', item.key, item);
|
||||
},
|
||||
onInput() {
|
||||
setTimeout(() => {
|
||||
if (this.inputVal) {
|
||||
this.isLoading = true;
|
||||
this.$emit('input', this.inputVal);
|
||||
} else {
|
||||
this.isLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-combox {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
height: 40upx;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
// border-bottom: solid 1px #DDDDDD;
|
||||
}
|
||||
|
||||
.uni-combox__label {
|
||||
font-size: 28upx;
|
||||
line-height: 40upx;
|
||||
padding-right: 10px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.uni-combox__input-box {
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-combox__input {
|
||||
flex: 1;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.uni-combox__input-arrow {
|
||||
padding-left: 15upx;
|
||||
padding-right: 15upx;
|
||||
}
|
||||
|
||||
.uni-combox__selector {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
border-radius: 6px;
|
||||
box-shadow: #dddddd 4px 4px 8px, #dddddd -4px -4px 8px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.uni-combox__selector-scroll {
|
||||
max-height: 350upx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-combox__selector::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: solid 6px #ffffff;
|
||||
border-right: solid 6px transparent;
|
||||
border-left: solid 6px transparent;
|
||||
left: 50%;
|
||||
top: -6px;
|
||||
margin-left: -6px;
|
||||
}
|
||||
|
||||
.uni-combox__selector-empty,
|
||||
.uni-combox__selector-item {
|
||||
/* #ifdef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
line-height: 70upx;
|
||||
font-size: 28upx;
|
||||
text-align: center;
|
||||
border-bottom: solid 1px #dddddd;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
.uni-combox__selector-empty:last-child,
|
||||
.uni-combox__selector-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.uni-combox-dialog {
|
||||
background: #cccccc7d;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
.uni-combox-input {
|
||||
background: #fff;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 90upx;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue