diff --git a/apis/err.js b/apis/err.js
index 4de4bb8..8526ae1 100644
--- a/apis/err.js
+++ b/apis/err.js
@@ -23,8 +23,8 @@ const errInfo = (obj) =>{
//转跳到登录页面
}else if(res.cancel){
//考虑是否增加一个跳转首页的操作
- wx.redirectTo({
- url: "/pages/index/index",
+ wx.switchTab({
+ url: "/pages/news/index",
})
}
}
diff --git a/apis/index.js b/apis/index.js
index f9003e7..bd0aeae 100644
--- a/apis/index.js
+++ b/apis/index.js
@@ -3,12 +3,28 @@
* 接口路由
*/
-import file from "./interfaces/file"
-import auth from "./interfaces/auth"
-import video from "./interfaces/video"
+import publics from "./interfaces/public"
+import auth from "./interfaces/auth"
+import file from "./interfaces/file"
+import user from "./interfaces/user"
+import video from "./interfaces/video"
+import card from "./interfaces/card"
+import mall from "./interfaces/mall"
+import order from "./interfaces/order"
+import company from "./interfaces/company"
+import home from "./interfaces/home"
+import ticket from "./interfaces/ticket"
export default{
- file,
+ publics,
auth,
- video
+ file,
+ user,
+ video,
+ card,
+ mall,
+ order,
+ company,
+ home,
+ ticket
}
diff --git a/apis/interfaces/auth.js b/apis/interfaces/auth.js
index 8f037f4..d52ba31 100644
--- a/apis/interfaces/auth.js
+++ b/apis/interfaces/auth.js
@@ -2,10 +2,19 @@
/*
* 授权
*/
+
import {req} from "../request"
const authPhone = data => req({url: "auth/mini", method: "POST", data: data}) //登录
+const authInfo = data => req({url: "auth/mini/info", method: "POST", data: data}) //完善用户信息
+const getImgCode = () => req({url: "auth/captcha"}) // 获取图形验证码
+const phoneCode = data => req({url: "auth/sms", method: "POST", data: data}) //用户获取短信验证码
+const phoneLogin = data => req({url: "auth/mini/mobile", method: "POST", data: data}) //手机号码登录
export default({
- authPhone
+ authPhone,
+ authInfo,
+ getImgCode,
+ phoneCode,
+ phoneLogin
})
diff --git a/apis/interfaces/card.js b/apis/interfaces/card.js
new file mode 100644
index 0000000..9da3502
--- /dev/null
+++ b/apis/interfaces/card.js
@@ -0,0 +1,11 @@
+
+/*
+ * 电子名片
+ */
+import {req} from "../request"
+
+const card = data => req({url: "cardpersonal" , data: data}) //名片信息
+
+export default({
+ card
+})
diff --git a/apis/interfaces/company.js b/apis/interfaces/company.js
new file mode 100644
index 0000000..0332549
--- /dev/null
+++ b/apis/interfaces/company.js
@@ -0,0 +1,9 @@
+
+/*
+ * 企业广场
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/interfaces/file.js b/apis/interfaces/file.js
index 6992234..49b3e06 100644
--- a/apis/interfaces/file.js
+++ b/apis/interfaces/file.js
@@ -5,7 +5,7 @@
import {upload} from "../request"
-const uploadImg = (imgPaht, data) => upload({url: "storage", key: "image", path: imgPaht, data: data}) //上传图片
+const uploadImg = (imgPaht, data) => upload({url: "storage", key: "file", path: imgPaht, data: data}) //上传图片
export default({
uploadImg
diff --git a/apis/interfaces/home.js b/apis/interfaces/home.js
new file mode 100644
index 0000000..f95418f
--- /dev/null
+++ b/apis/interfaces/home.js
@@ -0,0 +1,9 @@
+
+/*
+ * 企业主页
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/interfaces/live.js b/apis/interfaces/live.js
new file mode 100644
index 0000000..9da3502
--- /dev/null
+++ b/apis/interfaces/live.js
@@ -0,0 +1,11 @@
+
+/*
+ * 电子名片
+ */
+import {req} from "../request"
+
+const card = data => req({url: "cardpersonal" , data: data}) //名片信息
+
+export default({
+ card
+})
diff --git a/apis/interfaces/mall.js b/apis/interfaces/mall.js
new file mode 100644
index 0000000..9fb9b6c
--- /dev/null
+++ b/apis/interfaces/mall.js
@@ -0,0 +1,9 @@
+
+/*
+ * 商城
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/interfaces/order.js b/apis/interfaces/order.js
new file mode 100644
index 0000000..08adaae
--- /dev/null
+++ b/apis/interfaces/order.js
@@ -0,0 +1,9 @@
+
+/*
+ * 订单
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/interfaces/public.js b/apis/interfaces/public.js
new file mode 100644
index 0000000..2a2691a
--- /dev/null
+++ b/apis/interfaces/public.js
@@ -0,0 +1,13 @@
+
+/*
+ * 全局通用接口
+ */
+import {req} from "../request"
+
+const richText = (key) => req({url: "single/" + key, data: {key: "string"}}) //富文本
+const getStatus = (key) => req({url: "ajax/status/" + key}) //状态查询
+
+export default({
+ richText,
+ getStatus
+})
diff --git a/apis/interfaces/ticket.js b/apis/interfaces/ticket.js
new file mode 100644
index 0000000..e2d9b66
--- /dev/null
+++ b/apis/interfaces/ticket.js
@@ -0,0 +1,9 @@
+
+/*
+ * 优惠券
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js
new file mode 100644
index 0000000..f695781
--- /dev/null
+++ b/apis/interfaces/user.js
@@ -0,0 +1,9 @@
+
+/*
+ * 用户
+ */
+import {req} from "../request"
+
+export default({
+
+})
diff --git a/apis/request.js b/apis/request.js
index 5874ef6..3f0fdfd 100644
--- a/apis/request.js
+++ b/apis/request.js
@@ -3,8 +3,8 @@ import {errInfo} from './err'
import {updToken} from './updateToken'
// 请求方式配置
-// const api = "https://mi-org.cnskl.com/api/"
const api = "https://new-web-test.cnskl.com/api/"
+// const api = "https://mi-org.cnskl.com/api/"
const header = {
"Accept": "application/json"
}
@@ -36,11 +36,13 @@ const req = (obj) => {
if (res.data.status_code == 200) {
resolve(res.data.data)
} else {
- if (res.data.status_code == 401 || res.data.status_code == 400) {
+ if (res.data.status_code == 401) {
reject({
login : false,
codeBeen: false
})
+ } else{
+ reject(res.data)
}
errInfo(res.data)
}
@@ -70,7 +72,6 @@ const upload = (obj) => {
title: "上传中..",
mask: true
})
-
wx.uploadFile({
url : api + obj.url,
header : header,
@@ -87,10 +88,9 @@ const upload = (obj) => {
if (jsonData.status_code == 200) {
resolve(jsonData.data)
} else {
- if (res.data.status_code == 401 || res.data.status_code == 400) {
+ if (jsonData.status_code == 401) {
reject({
- login : false,
- codeBeen: false
+ login: false
})
}
errInfo(jsonData)
diff --git a/app.js b/app.js
index f0da98c..ab685c2 100644
--- a/app.js
+++ b/app.js
@@ -1,12 +1,30 @@
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
import apis from "./apis/index"
+const QQMapWX = require("./lib/qqmap-wx-jssdk.min.js");
+
App({
onLaunch() {
+ // 挂载腾讯地图
+ wx.$qqMap = new QQMapWX({
+ key: "3TBBZ-O42LU-HXCVQ-2M66A-NCFTT-LMBHU"
+ })
+
//挂载api方法
wx.$api = apis
},
globalData: {
-
+ navAppInfo : {
+ appId : "wxd931d03dfe955254",
+ envVersion : "trial",
+ goodUrl : "/pages/goods/show?goodsId=",
+ cardUrl : "/pages/card/index?cardid="
+ }
}
})
diff --git a/app.json b/app.json
index 524d0a3..61a498b 100644
--- a/app.json
+++ b/app.json
@@ -1,9 +1,15 @@
{
"pages": [
- "pages/shortVideo/shortVideo",
- "pages/businessCard/index",
+ "pages/shortVideo/index",
+ "pages/richText/richText",
"pages/login/login",
- "pages/businessCard/cards/cards"
+ "pages/card/index",
+ "pages/company/index",
+ "pages/user/index",
+ "pages/home/index",
+ "pages/mall/index",
+ "pages/live/index",
+ "pages/ticket/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index 531897e..5405ed2 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,10 +1,77 @@
-.container {
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- padding: 200rpx 0;
- box-sizing: border-box;
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+ page{
+ background-color: #f8f8f8;
+ font-size: 30rpx;
+}
+
+/*
+ * 文字截取
+ */
+
+.nowrap {
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.nowrap-multi {
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+
+/*
+ * 水平居中
+ */
+
+.pack-center {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-box-pack: center;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ z-index: -1;
+}
+
+/*
+ * 页面信息提醒
+ */
+
+.pages-hint,
+.pages-loding{
+ text-align: center;
+ color: #afafaf;
+ font-size: 28rpx;
+ background: white;
+}
+
+.pages-hint image {
+ width: 188rpx;
+ height: 188rpx;
+ margin-bottom: 30rpx;
+}
+
+.pages-loding image {
+ width: 38rpx;
+ height: 38rpx;
+}
+
+/*
+ * iphoneX footer
+ */
+
+.iphoneX{
+ padding-bottom: 68rpx;
}
diff --git a/components/cardColleagues/cardColleagues.js b/components/cardColleagues/cardColleagues.js
new file mode 100644
index 0000000..2b52c14
--- /dev/null
+++ b/components/cardColleagues/cardColleagues.js
@@ -0,0 +1,30 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardColleagues
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ // 我的同事列表
+ colleaguesList: {
+ type : Array,
+ value : []
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ onCard(e){
+ let cardObj = e.currentTarget.dataset.card
+ this.triggerEvent("changecard", cardObj)
+ }
+ }
+})
diff --git a/components/loginLayer/loginLayer.json b/components/cardColleagues/cardColleagues.json
similarity index 100%
rename from components/loginLayer/loginLayer.json
rename to components/cardColleagues/cardColleagues.json
diff --git a/components/cardColleagues/cardColleagues.wxml b/components/cardColleagues/cardColleagues.wxml
new file mode 100644
index 0000000..759a21a
--- /dev/null
+++ b/components/cardColleagues/cardColleagues.wxml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ {{item.name}}
+ {{item.job}}
+
+
+
diff --git a/components/cardColleagues/cardColleagues.wxss b/components/cardColleagues/cardColleagues.wxss
new file mode 100644
index 0000000..51b6bef
--- /dev/null
+++ b/components/cardColleagues/cardColleagues.wxss
@@ -0,0 +1,53 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.colleagues{
+ box-sizing: border-box;
+ white-space: nowrap;
+}
+
+.colleagues-item{
+ border-radius: 10rpx;
+ background: white;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+ overflow: hidden;
+ display: inline-block;
+ width: 260rpx;
+ margin: 6rpx 20rpx 6rpx 0;
+}
+
+.colleagues-item:first-child{
+ margin-left: 30rpx;
+}
+
+.colleagues-item:last-child{
+ margin-right: 30rpx;
+}
+
+.colleagues-cover{
+ width: 100%;
+ height: 280rpx;
+ vertical-align: top;
+ background: #eee;
+}
+
+.colleagues-info{
+ padding: 15rpx 20rpx;
+ text-align: center;
+}
+
+.colleagues-info-name{
+ font-weight: bold;
+ font-size: 32rpx;
+ line-height: 50rpx;
+}
+
+.colleagues-info-job{
+ font-size: 28rpx;
+ color: gray;
+ line-height: 40rpx;
+}
diff --git a/components/cardDie/cardDie.js b/components/cardDie/cardDie.js
new file mode 100644
index 0000000..23c3863
--- /dev/null
+++ b/components/cardDie/cardDie.js
@@ -0,0 +1,44 @@
+
+/**
+ * Web唐明明
+ * 一个梦想做木雕手艺人的程序员
+ * explain: cardDie
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ // 名片展示信息
+ cardInfo: {
+ type : Object,
+ value : {
+ name : "",
+ job : "",
+ mobileNo: "",
+ email : "",
+ address : ""
+ }
+ },
+ // 名片照片
+ cardCover : {
+ type : String,
+ value : ""
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+
+ }
+})
diff --git a/components/cardDie/cardDie.json b/components/cardDie/cardDie.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardDie/cardDie.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardDie/cardDie.wxml b/components/cardDie/cardDie.wxml
new file mode 100644
index 0000000..e72ba7b
--- /dev/null
+++ b/components/cardDie/cardDie.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+ {{cardInfo.name == '' ? '姓名' : cardInfo.name}}
+ {{cardInfo.job == '' ? '职业' : cardInfo.job}}
+
+
+
+ {{cardInfo.mobileNo}}
+
+
+ {{cardInfo.email}}
+
+
+ {{cardInfo.address}}
+
+
+
+
+
diff --git a/components/cardDie/cardDie.wxss b/components/cardDie/cardDie.wxss
new file mode 100644
index 0000000..96a9b23
--- /dev/null
+++ b/components/cardDie/cardDie.wxss
@@ -0,0 +1,105 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.card-content{
+ padding: 15px;
+}
+
+.nowrap {
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.nowrap-multi {
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+
+/* 默认模版 */
+.card-default{
+ position: relative;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+ background: white;
+ border-radius: 15rpx;
+ height: 180px;
+ overflow: hidden;
+}
+
+.card-default-cover{
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: #eee;
+ width: 150px;
+ height: 180px;
+ overflow: hidden;
+ -webkit-clip-path: polygon(0 0, 0 100%, 80% 100%, 100% 0);
+}
+
+.card-default-cover-src{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 150px;
+ height: 180px;
+}
+
+.card-default-gray{
+ background: #eee;
+ font-weight: bold;
+ height: 60px;
+ margin-top: 10px;
+ padding: 8px 10px 8px 160px;
+ box-sizing: border-box;
+}
+
+.card-default-gray-name{
+ font-size: 36rpx;
+ line-height: 25px;
+}
+
+.card-default-gray-job{
+ font-size: 26rpx;
+ line-height: 20px;
+ font-weight: normal;
+}
+
+.card-default-info{
+ padding: 0 10px 0 140px;
+ height: 200rpx;
+ box-sizing: border-box;
+}
+
+.card-default-info-text{
+ position: relative;
+ margin-top: 10px;
+ line-height: 18px;
+ text-align: right;
+ font-size: 28rpx;
+ color: gray;
+ padding-right: 22px;
+}
+
+.card-default-info-text:first-child{
+ font-weight: bold;
+ color: black;
+}
+
+.card-default-info-icon{
+ position: absolute;
+ right: 0;
+ top: 3rpx;
+ width: 28rpx;
+ height: 28rpx;
+}
+
+
diff --git a/components/cardDynamic/cardDynamic.js b/components/cardDynamic/cardDynamic.js
new file mode 100644
index 0000000..74359b4
--- /dev/null
+++ b/components/cardDynamic/cardDynamic.js
@@ -0,0 +1,29 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardDynamic
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ dynamicList: {
+ type : Array,
+ value : []
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ onDynamics(e){
+ let dynamics = e.currentTarget.dataset.dynamics
+ this.triggerEvent("changedynamics", dynamics)
+ }
+ }
+})
diff --git a/components/cardDynamic/cardDynamic.json b/components/cardDynamic/cardDynamic.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardDynamic/cardDynamic.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardDynamic/cardDynamic.wxml b/components/cardDynamic/cardDynamic.wxml
new file mode 100644
index 0000000..fe3e833
--- /dev/null
+++ b/components/cardDynamic/cardDynamic.wxml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+ 暂未发布任何企业动态
+
+
+
\ No newline at end of file
diff --git a/components/cardDynamic/cardDynamic.wxss b/components/cardDynamic/cardDynamic.wxss
new file mode 100644
index 0000000..a8ddd97
--- /dev/null
+++ b/components/cardDynamic/cardDynamic.wxss
@@ -0,0 +1,87 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.dynamic-item{
+ margin: 0 30rpx 30rpx 30rpx;
+ background: white;
+ border-radius: 10rpx;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+ overflow: hidden;
+}
+
+.dynamic-item:last-child{
+ margin-bottom: 0;
+}
+
+.dynamic-cover{
+ position: relative;
+ padding-top: 50%;
+ background: #eee;
+}
+
+.dynamic-src{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.dynamic-title{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 20rpx 30rpx;
+ background: rgba(0, 0, 0, .4);
+ color: white;
+ font-size: 34rpx;
+ font-weight: bold;
+}
+
+.dynamic-content{
+ padding: 20rpx;
+}
+
+.dynamic-tool{
+ padding-bottom: 20rpx;
+ display: flex;
+}
+
+.dynamic-remark{
+ background: #eee;
+ padding: 20rpx;
+}
+
+.dynamic-remark-item{
+ font-size: 26rpx;
+ padding-bottom: 8rpx;
+}
+
+.dynamic-remark-name{
+ font-weight: bold;
+ color: #0b0041;
+}
+
+.dynamic-remark-tool{
+ color: gray;
+ font-size: 28rpx;
+}
+
+/* 空 */
+.dynamic-null{
+ text-align: center;
+ padding: 80rpx 30rpx;
+ font-size: 26rpx;
+ color: gray;
+}
+
+.dynamic-null-icon{
+ width: 168rpx;
+ margin-bottom: 20rpx;
+}
\ No newline at end of file
diff --git a/components/cardEnterprise/cardEnterprise.js b/components/cardEnterprise/cardEnterprise.js
new file mode 100644
index 0000000..a02931b
--- /dev/null
+++ b/components/cardEnterprise/cardEnterprise.js
@@ -0,0 +1,40 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardEnterprise
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ enterpriseInfo: {
+ type : Object,
+ value : {}
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ enterpriseIntrShow: false, //企业文字展开状态
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ /**
+ * 我的企业展开隐藏
+ */
+ enterpriseIntrShow(){
+ this.setData({
+ enterpriseIntrShow: !this.data.enterpriseIntrShow
+ })
+ }
+ }
+})
diff --git a/components/cardEnterprise/cardEnterprise.json b/components/cardEnterprise/cardEnterprise.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardEnterprise/cardEnterprise.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardEnterprise/cardEnterprise.wxml b/components/cardEnterprise/cardEnterprise.wxml
new file mode 100644
index 0000000..886a633
--- /dev/null
+++ b/components/cardEnterprise/cardEnterprise.wxml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{enterpriseInfo.description}}
+
+
+ {{enterpriseIntrShow ? '收起': '展开'}}
+
+
diff --git a/components/cardEnterprise/cardEnterprise.wxss b/components/cardEnterprise/cardEnterprise.wxss
new file mode 100644
index 0000000..9b158af
--- /dev/null
+++ b/components/cardEnterprise/cardEnterprise.wxss
@@ -0,0 +1,111 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.enterprise{
+ background: white;
+ margin: 0 30rpx;
+ padding: 30rpx;
+ border-radius: 10rpx;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+}
+
+.enterprise-header{
+ position: relative;
+ padding-left: 108rpx;
+ min-height: 88rpx;
+}
+
+.enterprise-logo{
+ position: absolute;
+ left: 0;
+ top: 0;
+ background: white;
+ width: 88rpx;
+ height: 88rpx;
+ vertical-align: top;
+}
+
+.enterprise-info{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.enterprise-info-name{
+ flex: 1;
+ font-weight: bold;
+ line-height: 88rpx;
+ font-size: 32rpx;
+}
+
+.enterprise-info-btn{
+ margin-left: 20rpx;
+ line-height: 60rpx;
+ color: #0b0041;
+ border:solid 1rpx #0b0041;
+ padding: 0 20rpx;
+ font-size: 28rpx;
+}
+
+.enterprise-img{
+ position: relative;
+ padding-top: 75%;
+ background: #eee;
+ margin: 30rpx 0;
+}
+
+.enterprise-swiper{
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+
+.enterprise-cover{
+ vertical-align: top;
+ width: 100%;
+ height: 100%;
+}
+
+.enterprise-intr{
+ margin-top: 30rpx;
+ font-size: 28rpx;
+ color: #4f4f4f;
+ line-height: 40rpx;
+}
+
+.enterprise-intr.hide{
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 5;
+}
+
+.enterprise-intr-more{
+ padding-top: 20rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #afafaf;
+ line-height: 50rpx;
+}
+
+.enterprise-intr-more-icon{
+ width: 32rpx;
+ height: 32rpx;
+ vertical-align: middle;
+ margin-left: 10rpx;
+ margin-bottom: 3rpx;
+ transform:rotate(0deg);
+ transition: all .5s;
+}
+
+.enterprise-intr-more.show > .enterprise-intr-more-icon{
+ transform:rotate(180deg);
+}
diff --git a/components/cardGood/cardGood.js b/components/cardGood/cardGood.js
new file mode 100644
index 0000000..99bc4bb
--- /dev/null
+++ b/components/cardGood/cardGood.js
@@ -0,0 +1,30 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardGood
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ // 我的产品列表
+ goods: {
+ type : Array,
+ value : []
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ onGood(e){
+ let goodObj = e.currentTarget.dataset.good
+ this.triggerEvent("changegood", goodObj)
+ }
+ }
+})
diff --git a/components/cardGood/cardGood.json b/components/cardGood/cardGood.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardGood/cardGood.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardGood/cardGood.wxml b/components/cardGood/cardGood.wxml
new file mode 100644
index 0000000..c145935
--- /dev/null
+++ b/components/cardGood/cardGood.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ {{item.title}}
+
+ ¥{{item.prices.price}}
+ 协会{{item.prices.association}}
+
+
+ VIP
+ ¥{{item.prices.vip}}
+
+
+
+
diff --git a/components/cardGood/cardGood.wxss b/components/cardGood/cardGood.wxss
new file mode 100644
index 0000000..d55037b
--- /dev/null
+++ b/components/cardGood/cardGood.wxss
@@ -0,0 +1,109 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+ .nowrap {
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+/* 商品 */
+
+ .goods{
+ box-sizing: border-box;
+ white-space: nowrap;
+}
+
+.goods-item{
+ border-radius: 10rpx;
+ background: white;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+ overflow: hidden;
+ display: inline-block;
+ width: 260rpx;
+ margin: 6rpx 20rpx 6rpx 0;
+}
+
+.goods-item:first-child{
+ margin-left: 30rpx;
+}
+
+.goods-item:last-child{
+ margin-right: 30rpx;
+}
+
+.goods-cover{
+ position: relative;
+ width: 100%;
+ padding-top: 100%;
+ vertical-align: top;
+ background: #eee;
+}
+
+.goods-cover-src{
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.goods-info{
+ padding: 15rpx 20rpx;
+}
+
+.goods-info-name{
+ font-weight: bold;
+}
+
+.goods-info-price{
+ font-size: 30rpx;
+}
+
+.goods-info-price-association,
+.goods-info-price-price{
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.goods-info-price-price{
+ color: #ea4e2f;
+ font-weight: bold;
+ margin-right: 14rpx;
+}
+
+.goods-info-price-association{
+ font-size: 26rpx;
+ color: #4f4f4f;
+}
+
+.goods-info-vip-price{
+ font-size: 22rpx;
+ padding-top: 10rpx;
+}
+
+.goods-info-vip-price-left,
+.goods-info-vip-price-right{
+ line-height: 34rpx;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.goods-info-vip-price-left{
+ background: #333;
+ color: #f2e4c0;
+ padding: 0 10rpx;
+ border-radius: 6rpx 0 0 6rpx;
+}
+
+.goods-info-vip-price-right{
+ background: #f2e4c0;
+ color: #333;
+ border-radius: 0 6rpx 6rpx 0;
+ padding: 0 10rpx;
+}
diff --git a/components/cardIndividual/cardIndividual.js b/components/cardIndividual/cardIndividual.js
new file mode 100644
index 0000000..756f710
--- /dev/null
+++ b/components/cardIndividual/cardIndividual.js
@@ -0,0 +1,41 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardIndividual
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ individualText: {
+ type : String,
+ value : ""
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ // 展开状态
+ personalIntrShow: false
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ /**
+ * 个人简介展开隐藏
+ */
+ personalIntrShow(){
+ this.setData({
+ personalIntrShow: !this.data.personalIntrShow
+ })
+ }
+ }
+})
diff --git a/components/cardIndividual/cardIndividual.json b/components/cardIndividual/cardIndividual.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardIndividual/cardIndividual.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardIndividual/cardIndividual.wxml b/components/cardIndividual/cardIndividual.wxml
new file mode 100644
index 0000000..81626ed
--- /dev/null
+++ b/components/cardIndividual/cardIndividual.wxml
@@ -0,0 +1,8 @@
+
+
+ {{individualText}}
+
+
+ {{personalIntrShow ? '收起': '展开'}}
+
+
\ No newline at end of file
diff --git a/components/cardIndividual/cardIndividual.wxss b/components/cardIndividual/cardIndividual.wxss
new file mode 100644
index 0000000..cdbbd11
--- /dev/null
+++ b/components/cardIndividual/cardIndividual.wxss
@@ -0,0 +1,50 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.individual{
+ background: white;
+ margin: 0 30rpx;
+ padding: 30rpx;
+ border-radius: 10rpx;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+}
+
+.individual-intr{
+ font-size: 28rpx;
+ color: #4f4f4f;
+ line-height: 40rpx;
+}
+
+.individual-intr.hide{
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 5;
+}
+
+.individual-more{
+ padding-top: 20rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #afafaf;
+ line-height: 50rpx;
+}
+
+.individual-more-image{
+ width: 32rpx;
+ height: 32rpx;
+ vertical-align: middle;
+ margin-left: 10rpx;
+ margin-bottom: 3rpx;
+ transform:rotate(0deg);
+ transition: all .5s;
+}
+
+.individual-more.show > .individual-more-image{
+ transform:rotate(180deg);
+}
diff --git a/components/cardPhoto/cardPhoto.js b/components/cardPhoto/cardPhoto.js
new file mode 100644
index 0000000..eb3b644
--- /dev/null
+++ b/components/cardPhoto/cardPhoto.js
@@ -0,0 +1,36 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: cardPhoto
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ // 照片
+ photos: {
+ type : Array,
+ value : []
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ // 查看照片
+ openPhotos(e){
+ let photoArr = this.data.photos,
+ photoIndex = e.currentTarget.dataset.index
+
+ wx.previewImage({
+ urls : photoArr,
+ current : photoArr[photoIndex]
+ })
+ }
+ }
+})
diff --git a/components/cardPhoto/cardPhoto.json b/components/cardPhoto/cardPhoto.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/cardPhoto/cardPhoto.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cardPhoto/cardPhoto.wxml b/components/cardPhoto/cardPhoto.wxml
new file mode 100644
index 0000000..ffedf33
--- /dev/null
+++ b/components/cardPhoto/cardPhoto.wxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+ 暂未上传照片
+
\ No newline at end of file
diff --git a/components/cardPhoto/cardPhoto.wxss b/components/cardPhoto/cardPhoto.wxss
new file mode 100644
index 0000000..d48d895
--- /dev/null
+++ b/components/cardPhoto/cardPhoto.wxss
@@ -0,0 +1,27 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.photo{
+ background: #eee;
+}
+
+.photo-src{
+ width: 100%;
+ vertical-align: top;
+}
+
+.photo-null{
+ text-align: center;
+ padding: 80rpx 30rpx;
+ font-size: 26rpx;
+ color: gray;
+}
+
+.photo-null-icon{
+ width: 168rpx;
+ margin-bottom: 20rpx;
+}
diff --git a/components/loginLayer/loginLayer.js b/components/loginLayer/loginLayer.js
deleted file mode 100644
index 4f08f71..0000000
--- a/components/loginLayer/loginLayer.js
+++ /dev/null
@@ -1,43 +0,0 @@
-
-/**
- * Web唐明明
- * 一个梦想做木雕手艺人的程序员
- * explain: userInfoLayer
- */
-
-Component({
- /**
- * 组件的属性列表
- */
- properties: {
- showLayer: {
- type : Boolean,
- value : false
- }
- },
-
- /**
- * 组件的方法列表
- */
- methods: {
- userInfo(info){
- if(info.detail.errMsg == "getUserInfo:ok"){
- wx.$api.auth.authInfo({
- nickname: info.detail.userInfo.nickName,
- avatar : info.detail.userInfo.avatarUrl
- }).then(()=>{
- this.triggerEvent("updateinfo", true)
- this.setData({
- showLayer: false
- })
- })
- }else{
- wx.showToast({
- title: '拒绝了授权',
- icon : 'none'
- })
- this.triggerEvent("updateinfo", false)
- }
- }
- }
-})
diff --git a/components/userInfoLayer/userInfoLayer.js b/components/userInfoLayer/userInfoLayer.js
new file mode 100644
index 0000000..98bd39d
--- /dev/null
+++ b/components/userInfoLayer/userInfoLayer.js
@@ -0,0 +1,38 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * explain: userInfoLayer
+ */
+
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ showLayer: {
+ type : Boolean,
+ value : false
+ }
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ userInfo(info){
+ if(info.detail.errMsg == "getUserInfo:ok"){
+ this.triggerEvent("updateinfo", {
+ userInfo : info.detail.userInfo,
+ auth : true
+ })
+ }else{
+ this.triggerEvent("updateinfo", {
+ userInfo : {},
+ auth : false
+ })
+ }
+ }
+ }
+})
diff --git a/components/userInfoLayer/userInfoLayer.json b/components/userInfoLayer/userInfoLayer.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/components/userInfoLayer/userInfoLayer.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/loginLayer/loginLayer.wxml b/components/userInfoLayer/userInfoLayer.wxml
similarity index 100%
rename from components/loginLayer/loginLayer.wxml
rename to components/userInfoLayer/userInfoLayer.wxml
diff --git a/components/loginLayer/loginLayer.wxss b/components/userInfoLayer/userInfoLayer.wxss
similarity index 91%
rename from components/loginLayer/loginLayer.wxss
rename to components/userInfoLayer/userInfoLayer.wxss
index 96b978a..2e11c62 100644
--- a/components/loginLayer/loginLayer.wxss
+++ b/components/userInfoLayer/userInfoLayer.wxss
@@ -1,7 +1,8 @@
/**
* Web唐明明
- * 一个梦想做木雕手艺人的程序员
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
*/
.layer-back,
diff --git a/components/loginLayer/userInfoLayer_img.png b/components/userInfoLayer/userInfoLayer_img.png
similarity index 100%
rename from components/loginLayer/userInfoLayer_img.png
rename to components/userInfoLayer/userInfoLayer_img.png
diff --git a/lib/qqmap-wx-jssdk.min.js b/lib/qqmap-wx-jssdk.min.js
new file mode 100644
index 0000000..8fa1477
--- /dev/null
+++ b/lib/qqmap-wx-jssdk.min.js
@@ -0,0 +1 @@
+var ERROR_CONF = { KEY_ERR: 311, KEY_ERR_MSG: 'key格式错误', PARAM_ERR: 310, PARAM_ERR_MSG: '请求参数信息有误', SYSTEM_ERR: 600, SYSTEM_ERR_MSG: '系统错误', WX_ERR_CODE: 1000, WX_OK_CODE: 200 }; var BASE_URL = 'https://apis.map.qq.com/ws/'; var URL_SEARCH = BASE_URL + 'place/v1/search'; var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion'; var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/'; var URL_CITY_LIST = BASE_URL + 'district/v1/list'; var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren'; var URL_DISTANCE = BASE_URL + 'distance/v1/'; var URL_DIRECTION = BASE_URL + 'direction/v1/'; var MODE = { driving: 'driving', transit: 'transit' }; var EARTH_RADIUS = 6378136.49; var Utils = { safeAdd(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff) }, bitRotateLeft(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) }, md5cmn(q, a, b, x, s, t) { return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b) }, md5ff(a, b, c, d, x, s, t) { return this.md5cmn((b & c) | (~b & d), a, b, x, s, t) }, md5gg(a, b, c, d, x, s, t) { return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t) }, md5hh(a, b, c, d, x, s, t) { return this.md5cmn(b ^ c ^ d, a, b, x, s, t) }, md5ii(a, b, c, d, x, s, t) { return this.md5cmn(c ^ (b | ~d), a, b, x, s, t) }, binlMD5(x, len) { x[len >> 5] |= 0x80 << (len % 32); x[((len + 64) >>> 9 << 4) + 14] = len; var i; var olda; var oldb; var oldc; var oldd; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for (i = 0; i < x.length; i += 16) { olda = a; oldb = b; oldc = c; oldd = d; a = this.md5ff(a, b, c, d, x[i], 7, -680876936); d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586); c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819); b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330); a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897); d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426); c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341); b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983); a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416); d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417); c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063); b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162); a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682); d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101); c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290); b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329); a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510); d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632); c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713); b = this.md5gg(b, c, d, a, x[i], 20, -373897302); a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691); d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083); c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335); b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848); a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438); d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690); c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961); b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501); a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467); d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784); c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473); b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734); a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558); d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463); c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562); b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556); a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060); d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353); c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632); b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640); a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174); d = this.md5hh(d, a, b, c, x[i], 11, -358537222); c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979); b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189); a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487); d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835); c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520); b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651); a = this.md5ii(a, b, c, d, x[i], 6, -198630844); d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415); c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905); b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055); a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571); d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606); c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523); b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799); a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359); d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744); c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380); b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649); a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070); d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379); c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259); b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551); a = this.safeAdd(a, olda); b = this.safeAdd(b, oldb); c = this.safeAdd(c, oldc); d = this.safeAdd(d, oldd) } return [a, b, c, d] }, binl2rstr(input) { var i; var output = ''; var length32 = input.length * 32; for (i = 0; i < length32; i += 8) { output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff) } return output }, rstr2binl(input) { var i; var output = []; output[(input.length >> 2) - 1] = undefined; for (i = 0; i < output.length; i += 1) { output[i] = 0 } var length8 = input.length * 8; for (i = 0; i < length8; i += 8) { output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32) } return output }, rstrMD5(s) { return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8)) }, rstrHMACMD5(key, data) { var i; var bkey = this.rstr2binl(key); var ipad = []; var opad = []; var hash; ipad[15] = opad[15] = undefined; if (bkey.length > 16) { bkey = this.binlMD5(bkey, key.length * 8) } for (i = 0; i < 16; i += 1) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5c5c5c5c } hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8); return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128)) }, rstr2hex(input) { var hexTab = '0123456789abcdef'; var output = ''; var x; var i; for (i = 0; i < input.length; i += 1) { x = input.charCodeAt(i); output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f) } return output }, str2rstrUTF8(input) { return unescape(encodeURIComponent(input)) }, rawMD5(s) { return this.rstrMD5(this.str2rstrUTF8(s)) }, hexMD5(s) { return this.rstr2hex(this.rawMD5(s)) }, rawHMACMD5(k, d) { return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d)) }, hexHMACMD5(k, d) { return this.rstr2hex(this.rawHMACMD5(k, d)) }, md5(string, key, raw) { if (!key) { if (!raw) { return this.hexMD5(string) } return this.rawMD5(string) } if (!raw) { return this.hexHMACMD5(key, string) } return this.rawHMACMD5(key, string) }, getSig(requestParam, sk, feature, mode) { var sig = null; var requestArr = []; Object.keys(requestParam).sort().forEach(function (key) { requestArr.push(key + '=' + requestParam[key]) }); if (feature == 'search') { sig = '/ws/place/v1/search?' + requestArr.join('&') + sk } if (feature == 'suggest') { sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk } if (feature == 'reverseGeocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'geocoder') { sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk } if (feature == 'getCityList') { sig = '/ws/district/v1/list?' + requestArr.join('&') + sk } if (feature == 'getDistrictByCityId') { sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk } if (feature == 'calculateDistance') { sig = '/ws/distance/v1/?' + requestArr.join('&') + sk } if (feature == 'direction') { sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk } sig = this.md5(sig); return sig }, location2query(data) { if (typeof data == 'string') { return data } var query = ''; for (var i = 0; i < data.length; i++) { var d = data[i]; if (!!query) { query += ';' } if (d.location) { query = query + d.location.lat + ',' + d.location.lng } if (d.latitude && d.longitude) { query = query + d.latitude + ',' + d.longitude } } return query }, rad(d) { return d * Math.PI / 180.0 }, getEndLocation(location) { var to = location.split(';'); var endLocation = []; for (var i = 0; i < to.length; i++) { endLocation.push({ lat: parseFloat(to[i].split(',')[0]), lng: parseFloat(to[i].split(',')[1]) }) } return endLocation }, getDistance(latFrom, lngFrom, latTo, lngTo) { var radLatFrom = this.rad(latFrom); var radLatTo = this.rad(latTo); var a = radLatFrom - radLatTo; var b = this.rad(lngFrom) - this.rad(lngTo); var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2))); distance = distance * EARTH_RADIUS; distance = Math.round(distance * 10000) / 10000; return parseFloat(distance.toFixed(0)) }, getWXLocation(success, fail, complete) { wx.getLocation({ type: 'gcj02', success: success, fail: fail, complete: complete }) }, getLocationParam(location) { if (typeof location == 'string') { var locationArr = location.split(','); if (locationArr.length === 2) { location = { latitude: location.split(',')[0], longitude: location.split(',')[1] } } else { location = {} } } return location }, polyfillParam(param) { param.success = param.success || function () { }; param.fail = param.fail || function () { }; param.complete = param.complete || function () { } }, checkParamKeyEmpty(param, key) { if (!param[key]) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误'); param.fail(errconf); param.complete(errconf); return true } return false }, checkKeyword(param) { return !this.checkParamKeyEmpty(param, 'keyword') }, checkLocation(param) { var location = this.getLocationParam(param.location); if (!location || !location.latitude || !location.longitude) { var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误'); param.fail(errconf); param.complete(errconf); return false } return true }, buildErrorConfig(errCode, errMsg) { return { status: errCode, message: errMsg } }, handleData(param, data, feature) { if (feature == 'search') { var searchResult = data.data; var searchSimplify = []; for (var i = 0; i < searchResult.length; i++) { searchSimplify.push({ id: searchResult[i].id || null, title: searchResult[i].title || null, latitude: searchResult[i].location && searchResult[i].location.lat || null, longitude: searchResult[i].location && searchResult[i].location.lng || null, address: searchResult[i].address || null, category: searchResult[i].category || null, tel: searchResult[i].tel || null, adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null, city: searchResult[i].ad_info && searchResult[i].ad_info.city || null, district: searchResult[i].ad_info && searchResult[i].ad_info.district || null, province: searchResult[i].ad_info && searchResult[i].ad_info.province || null }) } param.success(data, { searchResult: searchResult, searchSimplify: searchSimplify }) } else if (feature == 'suggest') { var suggestResult = data.data; var suggestSimplify = []; for (var i = 0; i < suggestResult.length; i++) { suggestSimplify.push({ adcode: suggestResult[i].adcode || null, address: suggestResult[i].address || null, category: suggestResult[i].category || null, city: suggestResult[i].city || null, district: suggestResult[i].district || null, id: suggestResult[i].id || null, latitude: suggestResult[i].location && suggestResult[i].location.lat || null, longitude: suggestResult[i].location && suggestResult[i].location.lng || null, province: suggestResult[i].province || null, title: suggestResult[i].title || null, type: suggestResult[i].type || null }) } param.success(data, { suggestResult: suggestResult, suggestSimplify: suggestSimplify }) } else if (feature == 'reverseGeocoder') { var reverseGeocoderResult = data.result; var reverseGeocoderSimplify = { address: reverseGeocoderResult.address || null, latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null, longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null, adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null, city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null, district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null, nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null, province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null, street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null, street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null, recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null, rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null }; if (reverseGeocoderResult.pois) { var pois = reverseGeocoderResult.pois; var poisSimplify = []; for (var i = 0; i < pois.length; i++) { poisSimplify.push({ id: pois[i].id || null, title: pois[i].title || null, latitude: pois[i].location && pois[i].location.lat || null, longitude: pois[i].location && pois[i].location.lng || null, address: pois[i].address || null, category: pois[i].category || null, adcode: pois[i].ad_info && pois[i].ad_info.adcode || null, city: pois[i].ad_info && pois[i].ad_info.city || null, district: pois[i].ad_info && pois[i].ad_info.district || null, province: pois[i].ad_info && pois[i].ad_info.province || null }) } param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify, pois: pois, poisSimplify: poisSimplify }) } else { param.success(data, { reverseGeocoderResult: reverseGeocoderResult, reverseGeocoderSimplify: reverseGeocoderSimplify }) } } else if (feature == 'geocoder') { var geocoderResult = data.result; var geocoderSimplify = { title: geocoderResult.title || null, latitude: geocoderResult.location && geocoderResult.location.lat || null, longitude: geocoderResult.location && geocoderResult.location.lng || null, adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null, province: geocoderResult.address_components && geocoderResult.address_components.province || null, city: geocoderResult.address_components && geocoderResult.address_components.city || null, district: geocoderResult.address_components && geocoderResult.address_components.district || null, street: geocoderResult.address_components && geocoderResult.address_components.street || null, street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null, level: geocoderResult.level || null }; param.success(data, { geocoderResult: geocoderResult, geocoderSimplify: geocoderSimplify }) } else if (feature == 'getCityList') { var provinceResult = data.result[0]; var cityResult = data.result[1]; var districtResult = data.result[2]; param.success(data, { provinceResult: provinceResult, cityResult: cityResult, districtResult: districtResult }) } else if (feature == 'getDistrictByCityId') { var districtByCity = data.result[0]; param.success(data, districtByCity) } else if (feature == 'calculateDistance') { var calculateDistanceResult = data.result.elements; var distance = []; for (var i = 0; i < calculateDistanceResult.length; i++) { distance.push(calculateDistanceResult[i].distance) } param.success(data, { calculateDistanceResult: calculateDistanceResult, distance: distance }) } else if (feature == 'direction') { var direction = data.result.routes; param.success(data, direction) } else { param.success(data) } }, buildWxRequestConfig(param, options, feature) { var that = this; options.header = { "content-type": "application/json" }; options.method = 'GET'; options.success = function (res) { var data = res.data; if (data.status === 0) { that.handleData(param, data, feature) } else { param.fail(data) } }; options.fail = function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; options.complete = function (res) { var statusCode = +res.statusCode; switch (statusCode) { case ERROR_CONF.WX_ERR_CODE: { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); break } case ERROR_CONF.WX_OK_CODE: { var data = res.data; if (data.status === 0) { param.complete(data) } else { param.complete(that.buildErrorConfig(data.status, data.message)) } break } default: { param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG)) } } }; return options }, locationProcess(param, locationsuccess, locationfail, locationcomplete) { var that = this; locationfail = locationfail || function (res) { res.statusCode = ERROR_CONF.WX_ERR_CODE; param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) }; locationcomplete = locationcomplete || function (res) { if (res.statusCode == ERROR_CONF.WX_ERR_CODE) { param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)) } }; if (!param.location) { that.getWXLocation(locationsuccess, locationfail, locationcomplete) } else if (that.checkLocation(param)) { var location = Utils.getLocationParam(param.location); locationsuccess(location) } } }; class QQMapWX { constructor(options) { if (!options.key) { throw Error('key值不能为空') } this.key = options.key }; search(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, orderby: options.orderby || '_distance', page_size: options.page_size || 10, page_index: options.page_index || 1, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } var distance = options.distance || "1000"; var auto_extend = options.auto_extend || 1; var region = null; var rectangle = null; if (options.region) { region = options.region } if (options.rectangle) { rectangle = options.rectangle } var locationsuccess = function (result) { if (region && !rectangle) { requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else if (rectangle && !region) { requestParam.boundary = "rectangle(" + rectangle + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } else { requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")"; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'search') } } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SEARCH, data: requestParam }, 'search')) }; Utils.locationProcess(options, locationsuccess) }; getSuggestion(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (!Utils.checkKeyword(options)) { return } var requestParam = { keyword: options.keyword, region: options.region || '全国', region_fix: options.region_fix || 0, policy: options.policy || 0, page_size: options.page_size || 10, page_index: options.page_index || 1, get_subpois: options.get_subpois || 0, output: 'json', key: that.key }; if (options.address_format) { requestParam.address_format = options.address_format } if (options.filter) { requestParam.filter = options.filter } if (options.location) { var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) }; Utils.locationProcess(options, locationsuccess) } else { if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, "suggest")) } }; reverseGeocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { coord_type: options.coord_type || 5, get_poi: options.get_poi || 0, output: 'json', key: that.key }; if (options.poi_options) { requestParam.poi_options = options.poi_options } var locationsuccess = function (result) { requestParam.location = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'reverseGeocoder')) }; Utils.locationProcess(options, locationsuccess) }; geocoder(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'address')) { return } var requestParam = { address: options.address, output: 'json', key: that.key }; if (options.region) { requestParam.region = options.region } if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_GET_GEOCODER, data: requestParam }, 'geocoder')) }; getCityList(options) { var that = this; options = options || {}; Utils.polyfillParam(options); var requestParam = { output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_CITY_LIST, data: requestParam }, 'getCityList')) }; getDistrictByCityId(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'id')) { return } var requestParam = { id: options.id || '', output: 'json', key: that.key }; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_AREA_LIST, data: requestParam }, 'getDistrictByCityId')) }; calculateDistance(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { mode: options.mode || 'walking', to: Utils.location2query(options.to), output: 'json', key: that.key }; if (options.from) { options.location = options.from } if (requestParam.mode == 'straight') { var locationsuccess = function (result) { var locationTo = Utils.getEndLocation(requestParam.to); var data = { message: "query ok", result: { elements: [] }, status: 0 }; for (var i = 0; i < locationTo.length; i++) { data.result.elements.push({ distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng), duration: 0, from: { lat: result.latitude, lng: result.longitude }, to: { lat: locationTo[i].lat, lng: locationTo[i].lng } }) } var calculateResult = data.result.elements; var distanceResult = []; for (var i = 0; i < calculateResult.length; i++) { distanceResult.push(calculateResult[i].distance) } return options.success(data, { calculateResult: calculateResult, distanceResult: distanceResult }) }; Utils.locationProcess(options, locationsuccess) } else { var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance') } wx.request(Utils.buildWxRequestConfig(options, { url: URL_DISTANCE, data: requestParam }, 'calculateDistance')) }; Utils.locationProcess(options, locationsuccess) } }; direction(options) { var that = this; options = options || {}; Utils.polyfillParam(options); if (Utils.checkParamKeyEmpty(options, 'to')) { return } var requestParam = { output: 'json', key: that.key }; if (typeof options.to == 'string') { requestParam.to = options.to } else { requestParam.to = options.to.latitude + ',' + options.to.longitude } var SET_URL_DIRECTION = null; options.mode = options.mode || MODE.driving; SET_URL_DIRECTION = URL_DIRECTION + options.mode; if (options.from) { options.location = options.from } if (options.mode == MODE.driving) { if (options.from_poi) { requestParam.from_poi = options.from_poi } if (options.heading) { requestParam.heading = options.heading } if (options.speed) { requestParam.speed = options.speed } if (options.accuracy) { requestParam.accuracy = options.accuracy } if (options.road_type) { requestParam.road_type = options.road_type } if (options.to_poi) { requestParam.to_poi = options.to_poi } if (options.from_track) { requestParam.from_track = options.from_track } if (options.waypoints) { requestParam.waypoints = options.waypoints } if (options.policy) { requestParam.policy = options.policy } if (options.plate_number) { requestParam.plate_number = options.plate_number } } if (options.mode == MODE.transit) { if (options.departure_time) { requestParam.departure_time = options.departure_time } if (options.policy) { requestParam.policy = options.policy } } var locationsuccess = function (result) { requestParam.from = result.latitude + ',' + result.longitude; if (options.sig) { requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode) } wx.request(Utils.buildWxRequestConfig(options, { url: SET_URL_DIRECTION, data: requestParam }, 'direction')) }; Utils.locationProcess(options, locationsuccess) } }; module.exports = QQMapWX;
\ No newline at end of file
diff --git a/pages/businessCard/cards/cards.js b/pages/businessCard/cards/cards.js
deleted file mode 100644
index 9e50cce..0000000
--- a/pages/businessCard/cards/cards.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// pages/businessCard/cards/cards.js
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
-
- }
-})
\ No newline at end of file
diff --git a/pages/businessCard/cards/cards.json b/pages/businessCard/cards/cards.json
deleted file mode 100644
index fec3685..0000000
--- a/pages/businessCard/cards/cards.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText": "名片夹"
-}
\ No newline at end of file
diff --git a/pages/businessCard/cards/cards.wxml b/pages/businessCard/cards/cards.wxml
deleted file mode 100644
index e4ab305..0000000
--- a/pages/businessCard/cards/cards.wxml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-名片夹
diff --git a/pages/businessCard/cards/cards.wxss b/pages/businessCard/cards/cards.wxss
deleted file mode 100644
index 2b47b16..0000000
--- a/pages/businessCard/cards/cards.wxss
+++ /dev/null
@@ -1 +0,0 @@
-/* pages/businessCard/cards/cards.wxss */
\ No newline at end of file
diff --git a/pages/businessCard/index.js b/pages/businessCard/index.js
deleted file mode 100644
index b269da1..0000000
--- a/pages/businessCard/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-
-/**
- * Web唐明明
- * 匆匆数载恍如梦,岁月迢迢华发增。
- * 碌碌无为枉半生,一朝惊醒万事空。
- */
-
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
-
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
-
- }
-})
\ No newline at end of file
diff --git a/pages/businessCard/index.json b/pages/businessCard/index.json
deleted file mode 100644
index aa540ed..0000000
--- a/pages/businessCard/index.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "usingComponents": {},
- "navigationBarTitleText": "智能名片"
-}
\ No newline at end of file
diff --git a/pages/businessCard/index.wxml b/pages/businessCard/index.wxml
deleted file mode 100644
index e69de29..0000000
diff --git a/pages/businessCard/index.wxss b/pages/businessCard/index.wxss
deleted file mode 100644
index ea2f061..0000000
--- a/pages/businessCard/index.wxss
+++ /dev/null
@@ -1 +0,0 @@
-/* pages/businessCard/index.wxss */
\ No newline at end of file
diff --git a/pages/card/index.js b/pages/card/index.js
new file mode 100644
index 0000000..b5844bd
--- /dev/null
+++ b/pages/card/index.js
@@ -0,0 +1,309 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ loding : true, //名片加载状态
+ cardNull : true, //是否找到了名片
+ isLogin : false, //登录状态
+ cardBase : {}, //名片基础信息
+ cardInfo : {}, //名片模版信息
+ models : [], //名片模块
+ cardId : "", //名片id
+ isOwner : false, //是否为当前管理员
+ isFavorite : false, //收藏状态
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(e){
+ this.setData({
+ cardId : e.cardid || ""
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ // 检查登录状态
+ wx.getStorage({
+ key : "token",
+ success : () =>{
+ this.setData({
+ isLogin: true
+ })
+ },
+ fail : ()=>{
+ this.setData({
+ isLogin: false
+ })
+ }
+ })
+ this.cardInfo()
+ },
+
+ /**
+ * 获取名片信息
+ */
+ cardInfo(){
+ wx.$api.card.card({
+ cardId: this.data.cardId
+ }).then(res=>{
+ this.setData({
+ loding : false,
+ cardInfo : {
+ name : res.base.name,
+ mobileNo: res.base.mobile,
+ job : res.base.job,
+ email : res.base.email,
+ address : res.base.address
+ },
+ cardBase : res.base,
+ models : res.models,
+ isOwner : res.is_owner,
+ isFavorite : res.is_favorite
+ })
+ this.cutCard()
+ }).catch(err=>{
+ if(err.message == "暂未查到名片信息"){
+ this.setData({
+ loding : false,
+ cardNull: false
+ })
+ }
+ })
+ },
+
+ /**
+ * 名片二维码
+ */
+ codeNav(){
+ wx.navigateTo({
+ url: "./code/code?cardid=" + this.data.cardBase.card_personal_id
+ })
+ },
+
+ /**
+ * 名片操作
+ */
+ cardScroolNav(e) {
+ let bindType = e.currentTarget.dataset.type,
+ infoData = e.currentTarget.dataset.info
+
+ switch (bindType) {
+ case "phone":
+ wx.makePhoneCall({
+ phoneNumber: infoData,
+ fail : ()=>{}
+ })
+ break;
+ case "wechat":
+ wx.setClipboardData({
+ data : infoData
+ })
+ break;
+ case "email":
+ wx.setClipboardData({
+ data : infoData
+ })
+ break;
+ case "address":
+ wx.showLoading({
+ title: '加载中',
+ })
+ wx.$qqMap.search({
+ keyword: infoData,
+ success: res=>{
+ if(res.status == 0){
+ wx.openLocation({
+ latitude : res.data[0].location.lat,
+ longitude : res.data[0].location.lng,
+ name : res.data[0].title,
+ address : res.data[0].address
+ })
+ wx.hideLoading()
+ }else{
+ wx.showToast({
+ title: res.message,
+ icon : "none"
+ })
+ }
+ },
+ fail : ()=>{
+ wx.hideLoading()
+ }
+ })
+ break;
+ }
+ },
+
+ /**
+ * 收藏名片夹
+ */
+ cardLike(){
+ if(!this.data.isLogin){
+ wx.navigateTo({
+ url: "/pages/login/login"
+ })
+ return
+ }
+ if(!this.data.isFavorite){
+ wx.$api.card.cardlike(
+ this.data.cardBase.card_personal_id
+ ).then(res=>{
+ if(res == "操作成功"){
+ wx.showModal({
+ title : "提示",
+ content : "收藏成功,名片已加入您的电子名片夹,可在个人中心我的名片夹查看",
+ showCancel : false,
+ confirmText : "我知道了",
+ confirmColor: "#0b0041",
+ success : res=>{
+ if(res.confirm){
+ this.setData({
+ isFavorite: true
+ })
+ }
+ }
+ })
+ }
+ })
+ }
+ },
+
+ /**
+ * 名片设置
+ */
+ cardSte(){
+ let itemLists = ["模块设置", "编辑名片", "产品管理"]
+ // 当前用户是否为企业管理员
+ if(this.data.cardBase.is_company_manage) itemLists.push("编辑企业")
+
+ wx.showActionSheet({
+ itemList: itemLists,
+ success : res=>{
+ let tapIndex = res.tapIndex
+ switch (tapIndex) {
+ case 0:
+ wx.navigateTo({
+ url: "./module/module"
+ })
+ break;
+ case 1:
+ wx.navigateTo({
+ url: "./editor/editor"
+ })
+ break;
+ case 2:
+ wx.navigateTo({
+ url: "./product/product"
+ })
+ break;
+ case 3:
+ this.data.models.find(val => {
+ if(val.name == "enterprise"){
+ wx.navigateTo({
+ url: "./company/company?id=" + val.data.id
+ })
+ return
+ }
+ })
+ break;
+ }
+ }
+ })
+ },
+
+ /**
+ * 分享名片
+ */
+ onShareAppMessage(){
+ return{
+ title : "您好我是" + this.data.cardBase.company + "的" + this.data.cardBase.name + ",这是我的电子名片~",
+ path : "/pages/card/index?cardid=" + this.data.cardBase.card_personal_id,
+ imageUrl: this.data.cardBase.cover.showpath
+ }
+ },
+
+ /**
+ * 商品详情
+ */
+ changeGood(e){
+ let goodsId = e.detail.goods_id
+ wx.showLoading({
+ title: "打开中...",
+ })
+ wx.navigateToMiniProgram({
+ appId : getApp().globalData.navAppInfo.appId,
+ envVersion : getApp().globalData.navAppInfo.envVersion,
+ path : getApp().globalData.navAppInfo.goodUrl + goodsId,
+ success : ()=>{
+ wx.hideLoading()
+ },
+ fail : err=>{
+ wx.showToast({
+ title: err.errMsg,
+ icon : "none"
+ })
+ }
+ })
+ },
+
+ /**
+ * 点击同事名片
+ */
+ changeCard(e){
+ let cardId = this.data.cardBase.card_personal_id,
+ onCardId = e.detail.card_id
+
+ if(onCardId != cardId){
+ this.setData({
+ loding : true,
+ cardNull : true,
+ cardId : onCardId
+ })
+ this.cardInfo()
+ }
+ },
+
+ /**
+ * 点击动态
+ */
+ changedynamics(e){
+ if(e.detail.dynamic_id){
+ wx.navigateTo({
+ url: "./dynamics/dynamics?id=" + e.detail.dynamic_id,
+ })
+ }else{
+ wx.showToast({
+ title: "系统错误,缺少参数:dynamic_id",
+ icon : "none"
+ })
+ }
+ },
+
+ /**
+ * 存入通讯录
+ */
+ addPhoneBook(){
+ let cardInfo = this.data.cardBase
+ wx.addPhoneContact({
+ firstName : cardInfo.name || "",
+ mobilePhoneNumber : cardInfo.mobile || "",
+ weChatNumber : cardInfo.wechat || "",
+ organization : cardInfo.company || "",
+ title : cardInfo.job || "",
+ email : cardInfo.email || "",
+ remark : "通过数促会小程序智能名片添加"
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/card/index.json b/pages/card/index.json
new file mode 100644
index 0000000..e0543f9
--- /dev/null
+++ b/pages/card/index.json
@@ -0,0 +1,13 @@
+{
+ "usingComponents": {
+ "card": "/components/cardDie/cardDie",
+ "individual": "/components/cardIndividual/cardIndividual",
+ "enterprise": "/components/cardEnterprise/cardEnterprise",
+ "colleagues": "/components/cardColleagues/cardColleagues",
+ "photo": "/components/cardPhoto/cardPhoto",
+ "dynamics": "/components/cardDynamic/cardDynamic",
+ "goods": "/components/cardGood/cardGood"
+ },
+ "navigationBarTitleText": "智能名片",
+ "backgroundColorTop": "#ffffff"
+}
\ No newline at end of file
diff --git a/pages/card/index.wxml b/pages/card/index.wxml
new file mode 100644
index 0000000..4e31d7d
--- /dev/null
+++ b/pages/card/index.wxml
@@ -0,0 +1,81 @@
+
+
+
+
+ 名片加载中...
+
+
+
+
+
+
+
+ 暂时还没有找到TA的名片
+ 首页
+
+
+
+
+
+
+
+ 设置
+
+
+
+
+
+ 收藏
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 拨打电话
+ {{cardBase.mobile}}
+
+
+ 微信号
+ {{cardBase.wechat}}
+
+
+ 电子邮箱
+ {{cardBase.email}}
+
+
+ 联系地址
+ {{cardBase.address}}
+
+
+
+
+
+
+
+ {{models.title}}
+
+
+
+
+
+
+
+
+
diff --git a/pages/card/index.wxss b/pages/card/index.wxss
new file mode 100644
index 0000000..b6a41ff
--- /dev/null
+++ b/pages/card/index.wxss
@@ -0,0 +1,147 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+.card{
+ background: white;
+}
+
+.null-hint-nav{
+ background: #0b0041;
+ color: white;
+ width: 60vw;
+ margin: 60rpx 20vw;
+ line-height: 90rpx;
+ border-radius: 10rpx;
+ font-weight: bold;
+ font-size: 32rpx;
+}
+
+/* 名片工具 */
+.card-tool{
+ display: flex;
+ padding: 0 15rpx;
+}
+
+.card-tool-item[size="mini"]{
+ margin: 0 15rpx;
+ flex: 1;
+ height: 90rpx;
+ line-height: 90rpx;
+ padding: 0;
+ font-size: 32rpx;
+ background: white;
+ color: #0b0041;
+ border-radius: 10rpx;
+ border:solid 1rpx #0b0041;
+ box-sizing: border-box;
+}
+
+.card-tool-item[size="mini"]:last-child{
+ background: #0b0041;
+ color: white;
+ border-radius: 10rpx;
+}
+
+/* 名片信息 */
+.card-scrool-info{
+ position: relative;
+ height: 170rpx;
+}
+
+.card-scrool-code{
+ height: 116rpx;
+ width: 76rpx;
+ position: absolute;
+ top: 27rpx;
+ left: 0;
+ z-index: 9;
+}
+
+.card-scrool{
+ box-sizing: border-box;
+ white-space: nowrap;
+}
+
+.card-scrool-item{
+ padding: 15rpx 30rpx;
+ box-shadow: 0 0 2rpx 2rpx rgba(0, 0, 0, .05);
+ border-radius: 8rpx;
+ display: inline-block;
+ margin: 30rpx 20rpx 30rpx 0;
+ height: 110rpx;
+ box-sizing: border-box;
+}
+
+.card-scrool-item:last-child{
+ margin-right: 30rpx;
+}
+
+.card-scrool-item:first-child{
+ margin-left: 96rpx;
+}
+
+.card-scrool-title,
+.card-scrool-text{
+ line-height: 40rpx;
+}
+
+.card-scrool-title{
+ font-size: 26rpx;
+ font-weight: bold;
+}
+
+.card-scrool-text{
+ color: gray;
+ font-size: 28rpx;
+}
+
+.card-scrool-title image{
+ width: 32rpx;
+ height: 32rpx;
+ vertical-align: middle;
+ margin-bottom: 4rpx;
+ margin-right: 8rpx;
+}
+
+/* 模块标题 */
+.models-title{
+ font-weight: bold;
+ padding: 50rpx 30rpx 20rpx 30rpx;
+}
+
+.models:last-child{
+ padding-bottom: 30rpx;
+}
+
+/* 名片编辑 */
+.card-ste{
+ width: 98rpx;
+ height: 98rpx;
+ background: white;
+ position: fixed;
+ bottom: 20vh;
+ right: 30rpx;
+ z-index: 9999;
+ box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, .05);
+ border-radius: 50%;
+ text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+}
+
+.card-ste-icon{
+ width: 42rpx;
+ height: 42rpx;
+ vertical-align: top;
+}
+
+.card-ste-text{
+ font-size: 20rpx;
+ color: #0b0041;
+}
diff --git a/pages/company/index.js b/pages/company/index.js
new file mode 100644
index 0000000..2475342
--- /dev/null
+++ b/pages/company/index.js
@@ -0,0 +1,66 @@
+// pages/company/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
diff --git a/pages/company/index.json b/pages/company/index.json
new file mode 100644
index 0000000..8614f61
--- /dev/null
+++ b/pages/company/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "企业广场"
+}
\ No newline at end of file
diff --git a/pages/company/index.wxml b/pages/company/index.wxml
new file mode 100644
index 0000000..13e6b36
--- /dev/null
+++ b/pages/company/index.wxml
@@ -0,0 +1,2 @@
+
+ 企业广场
diff --git a/pages/company/index.wxss b/pages/company/index.wxss
new file mode 100644
index 0000000..acda737
--- /dev/null
+++ b/pages/company/index.wxss
@@ -0,0 +1 @@
+/* pages/company/index.wxss */
\ No newline at end of file
diff --git a/pages/home/index.js b/pages/home/index.js
new file mode 100644
index 0000000..12c4d62
--- /dev/null
+++ b/pages/home/index.js
@@ -0,0 +1,66 @@
+// pages/home/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
diff --git a/pages/home/index.json b/pages/home/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/home/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/home/index.wxml b/pages/home/index.wxml
new file mode 100644
index 0000000..47aaec6
--- /dev/null
+++ b/pages/home/index.wxml
@@ -0,0 +1,2 @@
+
+pages/home/index.wxml
diff --git a/pages/home/index.wxss b/pages/home/index.wxss
new file mode 100644
index 0000000..b5afb04
--- /dev/null
+++ b/pages/home/index.wxss
@@ -0,0 +1 @@
+/* pages/home/index.wxss */
\ No newline at end of file
diff --git a/pages/live/index.js b/pages/live/index.js
new file mode 100644
index 0000000..ae7af92
--- /dev/null
+++ b/pages/live/index.js
@@ -0,0 +1,66 @@
+// pages/live/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
diff --git a/pages/live/index.json b/pages/live/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/live/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/live/index.wxml b/pages/live/index.wxml
new file mode 100644
index 0000000..d8c755a
--- /dev/null
+++ b/pages/live/index.wxml
@@ -0,0 +1,2 @@
+
+pages/live/index.wxml
diff --git a/pages/live/index.wxss b/pages/live/index.wxss
new file mode 100644
index 0000000..b9fc350
--- /dev/null
+++ b/pages/live/index.wxss
@@ -0,0 +1 @@
+/* pages/live/index.wxss */
\ No newline at end of file
diff --git a/pages/login/login.js b/pages/login/login.js
index ca1152f..6aa7100 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -4,13 +4,24 @@
* 一个梦想做木雕手艺人的程序员
*/
+var phoneOutTime
+
Page({
/**
* 页面的初始数据
*/
data: {
- code : ""
+ code : "", //解密code
+ userInfo : false, //处理页面弹窗状态
+ parent_id : 0, //分享人用户id
+ loginWechat : true, //登录方式
+ codeTime : 60, //短信重新获取倒计时
+ codeBtnStat : false, //获取验证码按钮
+ getCodeLay : false, //获取短信验证层
+ codeImg : "", //图形验证码
+ codeImgKey : "", //图形验证码key
+ phone : "", //用户输入的手机号码
},
/**
@@ -19,6 +30,141 @@ Page({
onLoad(){
this.wxLogin()
},
+
+ /**
+ * 图形验证码
+ */
+ showImgCode(){
+ if(this.data.phone == ""){
+ wx.showToast({
+ title: "请输入手机号码",
+ icon : "none"
+ })
+ return
+ }
+
+ this.setData({
+ getCodeLay: !this.data.getCodeLay
+ })
+ if(this.data.getCodeLay) this.getCodeImg()
+ },
+
+ /**
+ * 验证码
+ */
+ getCodeImg(){
+ wx.$api.auth.getImgCode().then(res=>{
+ this.setData({
+ codeImg : res.img,
+ codeImgKey : res.key
+ })
+ })
+ },
+
+ /**
+ * 获取短信验证码
+ */
+ getPhoneCode(e){
+ if(e.detail.value.imgcode == ""){
+ wx.showToast({
+ title: "请输入验证码",
+ icon : "none"
+ })
+ return
+ }
+ wx.$api.auth.phoneCode({
+ mobileNo : this.data.phone,
+ captcha_key : this.data.codeImgKey,
+ captcha : e.detail.value.imgcode
+ }).then(res=>{
+ wx.showToast({
+ title: res,
+ icon : "none"
+ })
+ // 移出弹出层
+ this.showImgCode()
+ // 更新按钮状态
+ this.outTime()
+ this.setData({
+ codeBtnStat: true
+ })
+ })
+ },
+
+ /**
+ * 获取短信倒计时
+ */
+ outTime(){
+ let outTime = this.data.codeTime
+
+ phoneOutTime = setInterval(()=>{
+ if(outTime <= 60 && outTime > 0){
+ outTime--
+ this.setData({
+ codeTime: outTime
+ })
+ }else{
+ clearInterval(phoneOutTime)
+ this.setData({
+ codeTime : 60,
+ codeBtnStat : false
+ })
+ }
+ },1000)
+ },
+
+ /**
+ * 手机号码登录
+ */
+ loginForm(e){
+ wx.$api.auth.phoneLogin({
+ mobileNo : e.detail.value.mobileNo,
+ code : e.detail.value.code,
+ parent_id : this.data.parent_id
+ }).then(token=>{
+ // 存储登录信息
+ wx.setStorageSync('token', token.access_token)
+ if(token.has_nickname){
+ // 返回上一页
+ wx.navigateBack()
+ }else{
+ this.setData({
+ userInfo: !token.has_nickname
+ })
+ }
+ })
+ },
+
+ /**
+ * 获取用户code
+ */
+ wxLogin(){
+ wx.login({
+ success: res=>{
+ this.setData({
+ code: res.code
+ })
+ }
+ })
+ },
+
+ /**
+ * 用户输入手机号码
+ */
+ userPhone(e){
+ this.setData({
+ phone: e.detail.value
+ })
+ },
+
+ /**
+ * 切换登录方式
+ */
+ loginWayTab(){
+ this.setData({
+ loginWechat: !this.data.loginWechat
+ })
+ },
/**
* 手机号码授权
@@ -32,27 +178,55 @@ Page({
code : this.data.code,
iv : e.detail.iv,
encryptedData : e.detail.encryptedData,
- parent_id : ""
- }).then(res=>{
+ parent_id : this.data.parent_id
+ }).then(token=>{
// 存储登录信息
- wx.setStorageSync('token', res.access_token)
- // 返回首页
- wx.navigateBack()
+ wx.setStorageSync('token', token.access_token)
+ if(token.has_nickname){
+ // 返回上一页
+ wx.navigateBack()
+ }else{
+ this.setData({
+ userInfo: !token.has_nickname
+ })
+ }
}).catch(()=>{
this.wxLogin()
})
},
/**
- * 更新code
+ * 完善用户信息
*/
- wxLogin(){
- wx.login({
- success: res=>{
- this.setData({
- code: res.code
- })
- }
+ userInfo(e){
+ if(e.detail.auth){
+ wx.$api.auth.authInfo({
+ nickname : e.detail.userInfo.nickName,
+ avatar : e.detail.userInfo.avatarUrl
+ }).then(res=>{
+ // 返回上一页
+ wx.navigateBack()
+ })
+ }else{
+ wx.removeStorage({
+ key : token,
+ success : ()=>{
+ this.setData({
+ userInfo: false
+ })
+ }
+ })
+ }
+ },
+
+ /**
+ * 页面被卸载了
+ */
+ onUnload(){
+ clearInterval(phoneOutTime)
+ this.setData({
+ codeTime : 60,
+ codeBtnStat : false
})
}
-})
\ No newline at end of file
+})
diff --git a/pages/login/login.json b/pages/login/login.json
index 478f1e0..f81d607 100644
--- a/pages/login/login.json
+++ b/pages/login/login.json
@@ -1,7 +1,7 @@
{
"usingComponents": {
- "userinfo-layer" : "/components/loginLayer/loginLayer"
+ "userinfo-layer": "/components/userInfoLayer/userInfoLayer"
},
"navigationBarTitleText": ""
}
diff --git a/pages/login/login.wxml b/pages/login/login.wxml
index 9bf97c0..6fe5f08 100644
--- a/pages/login/login.wxml
+++ b/pages/login/login.wxml
@@ -1,11 +1,47 @@
-
-
-
-
- 点击授权登录表示您已阅读并同意 用户隐私规则,用户服务协议
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/login/login.wxss b/pages/login/login.wxss
index cecb73b..26711e1 100644
--- a/pages/login/login.wxss
+++ b/pages/login/login.wxss
@@ -20,6 +20,43 @@ page{
box-sizing: border-box;
}
+.login-way{
+ color: #0b0041;
+ line-height: 90rpx;
+}
+
+/* input */
+.phone-inputs{
+ border-bottom: solid 1rpx #eee;
+ margin-bottom: 30rpx;
+ display: flex;
+}
+
+.phone-inputs input{
+ height: 90rpx;
+ font-size: 32rpx;
+ justify-content: space-between;
+ flex: 1;
+ text-align: left;
+}
+
+.phone-code-btn[size="mini"]{
+ margin-left: 30rpx;
+ height: 90rpx;
+ line-height: 90rpx;
+ padding: 0 30rpx;
+ font-size: 32rpx;
+ font-weight: normal;
+ border-radius: 0;
+ background: transparent;
+ color: #ff8d37;
+}
+
+.phone-code-btn[size="mini"][disabled]{
+ background: transparent;
+ color: #afafaf;
+}
+
/* btn */
.login-btn[size="default"]{
width: 100%;
@@ -28,8 +65,9 @@ page{
padding: 0;
font-size: 34rpx;
border-radius: 0;
- background: #2d6af6;
+ background: #0b0041;
color: white;
+ margin-bottom: 40rpx;
}
/* header */
@@ -41,7 +79,6 @@ page{
.login-logo{
width: 128rpx;
height: 128rpx;
- background: #eee;
vertical-align: top;
}
@@ -58,14 +95,80 @@ page{
/* 用户协议 */
.login-agree{
- margin-top: 20vh;
+ margin-top: 10vh;
color: #afafaf;
font-size: 26rpx;
text-align: center;
line-height: 50rpx;
}
-.login-agree text{
+.login-agree navigator{
color: #ff8d37;
padding: 0 5rpx;
+ display: inline-block;
}
+
+/* 验证码弹出层 */
+.get-code-lay{
+ background: rgba(0, 0, 0, .4);
+ position: fixed;
+ z-index: 99;
+ text-align: center;
+}
+
+.get-code-lay-form{
+ position: relative;
+ background: white;
+ padding: 20rpx 30rpx;
+ display: inline-block;
+ width: 70vw;
+ border-radius: 10rpx;
+}
+
+.get-code-lay-remove{
+ position: absolute;
+ width: 28rpx;
+ right: 30rpx;
+ top: 30rpx;
+}
+
+.get-code-lay-title{
+ font-weight: bold;
+ font-size: 34rpx;
+ line-height: 90rpx;
+}
+
+.get-code-lay-input{
+ background: #eee;
+ border-radius: 10rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.get-code-lay-input input{
+ height: 90rpx;
+ flex: 1;
+ text-align: left;
+ padding: 0 30rpx;
+}
+
+.get-code-lay-img{
+ height: 56rpx;
+ background: white;
+ margin-right: 30rpx;
+}
+
+.get-code-lay-btn[size="default"]{
+ margin-top: 30rpx;
+ margin-bottom: 10rpx;
+ width: 100%;
+ height: 80rpx;
+ line-height: 80rpx;
+ border-radius: 10rpx;
+ padding: 0;
+ font-size: 32rpx;
+ background: #0b0041;
+ color: white;
+}
+
diff --git a/pages/mall/index.js b/pages/mall/index.js
new file mode 100644
index 0000000..eb795c7
--- /dev/null
+++ b/pages/mall/index.js
@@ -0,0 +1,66 @@
+// pages/mall/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
diff --git a/pages/mall/index.json b/pages/mall/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/mall/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/mall/index.wxml b/pages/mall/index.wxml
new file mode 100644
index 0000000..93fe9d4
--- /dev/null
+++ b/pages/mall/index.wxml
@@ -0,0 +1,2 @@
+
+pages/mall/index.wxml
diff --git a/pages/mall/index.wxss b/pages/mall/index.wxss
new file mode 100644
index 0000000..0d35e2f
--- /dev/null
+++ b/pages/mall/index.wxss
@@ -0,0 +1 @@
+/* pages/mall/index.wxss */
\ No newline at end of file
diff --git a/pages/richText/richText.js b/pages/richText/richText.js
new file mode 100644
index 0000000..4a09f6e
--- /dev/null
+++ b/pages/richText/richText.js
@@ -0,0 +1,31 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ title : "", //文章标题
+ content : "", //富文本信息
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(e) {
+ wx.$api.publics.richText(e.key).then(res=>{
+ wx.setNavigationBarTitle({
+ title: res.title
+ })
+ this.setData({
+ content: res.content.replace(/\
diff --git a/pages/richText/richText.wxss b/pages/richText/richText.wxss
new file mode 100644
index 0000000..e4e350e
--- /dev/null
+++ b/pages/richText/richText.wxss
@@ -0,0 +1,10 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
+page{
+ background: white;
+}
diff --git a/pages/shortVideo/shortVideo.js b/pages/shortVideo/index.js
similarity index 92%
rename from pages/shortVideo/shortVideo.js
rename to pages/shortVideo/index.js
index 12f7bf6..bf306c8 100644
--- a/pages/shortVideo/shortVideo.js
+++ b/pages/shortVideo/index.js
@@ -1,4 +1,10 @@
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ */
+
Page({
/**
diff --git a/pages/shortVideo/shortVideo.json b/pages/shortVideo/index.json
similarity index 100%
rename from pages/shortVideo/shortVideo.json
rename to pages/shortVideo/index.json
diff --git a/pages/shortVideo/shortVideo.wxml b/pages/shortVideo/index.wxml
similarity index 80%
rename from pages/shortVideo/shortVideo.wxml
rename to pages/shortVideo/index.wxml
index 48fa4ac..0f86a2e 100644
--- a/pages/shortVideo/shortVideo.wxml
+++ b/pages/shortVideo/index.wxml
@@ -10,7 +10,7 @@
>
-
+
@ {{videoList[videoIndex].company.name || "-"}}
@@ -22,20 +22,20 @@
-
+
{{videoList[videoIndex].likes || "0"}}
-
+
1000
-
+
{{videoList[videoIndex].shares || "0"}}
-
+
diff --git a/pages/shortVideo/shortVideo.wxss b/pages/shortVideo/index.wxss
similarity index 93%
rename from pages/shortVideo/shortVideo.wxss
rename to pages/shortVideo/index.wxss
index bdad705..5fede95 100644
--- a/pages/shortVideo/shortVideo.wxss
+++ b/pages/shortVideo/index.wxss
@@ -1,10 +1,12 @@
/**
* Web唐明明
- * 一个梦想做木雕手艺人的程序员
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
*/
-page{
+
+ page{
/* background: #0e0c1a; */
}
diff --git a/pages/ticket/index.js b/pages/ticket/index.js
new file mode 100644
index 0000000..f0f0b00
--- /dev/null
+++ b/pages/ticket/index.js
@@ -0,0 +1,66 @@
+// pages/ticket/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
diff --git a/pages/ticket/index.json b/pages/ticket/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/ticket/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/ticket/index.wxml b/pages/ticket/index.wxml
new file mode 100644
index 0000000..82545bb
--- /dev/null
+++ b/pages/ticket/index.wxml
@@ -0,0 +1,2 @@
+
+pages/ticket/index.wxml
diff --git a/pages/ticket/index.wxss b/pages/ticket/index.wxss
new file mode 100644
index 0000000..2d42574
--- /dev/null
+++ b/pages/ticket/index.wxss
@@ -0,0 +1 @@
+/* pages/ticket/index.wxss */
\ No newline at end of file
diff --git a/pages/user/index.js b/pages/user/index.js
new file mode 100644
index 0000000..aa4d173
--- /dev/null
+++ b/pages/user/index.js
@@ -0,0 +1,66 @@
+// pages/user/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
diff --git a/pages/user/index.json b/pages/user/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/user/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/user/index.wxml b/pages/user/index.wxml
new file mode 100644
index 0000000..753ccb2
--- /dev/null
+++ b/pages/user/index.wxml
@@ -0,0 +1,2 @@
+
+pages/user/index.wxml
diff --git a/pages/user/index.wxss b/pages/user/index.wxss
new file mode 100644
index 0000000..ea787be
--- /dev/null
+++ b/pages/user/index.wxss
@@ -0,0 +1 @@
+/* pages/user/index.wxss */
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index c2263ad..317ba93 100644
--- a/project.config.json
+++ b/project.config.json
@@ -50,23 +50,23 @@
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
- "search": {
- "list": []
- },
- "conversation": {
+ "plugin": {
"list": []
},
"game": {
"list": []
},
- "plugin": {
- "list": []
- },
"gamePlugin": {
"list": []
},
"miniprogram": {
- "list": []
+ "list": [
+ {
+ "name": "登录",
+ "pathName": "pages/login/login",
+ "scene": null
+ }
+ ]
}
}
}
\ No newline at end of file
diff --git a/static/icons/arrow_dow.png b/static/icons/arrow_dow.png
new file mode 100644
index 0000000..a7a4741
Binary files /dev/null and b/static/icons/arrow_dow.png differ
diff --git a/static/icons/card_address_icon.png b/static/icons/card_address_icon.png
new file mode 100644
index 0000000..2bf1ec8
Binary files /dev/null and b/static/icons/card_address_icon.png differ
diff --git a/static/icons/card_email_icon.png b/static/icons/card_email_icon.png
new file mode 100644
index 0000000..95c8677
Binary files /dev/null and b/static/icons/card_email_icon.png differ
diff --git a/static/icons/card_phone_icon.png b/static/icons/card_phone_icon.png
new file mode 100644
index 0000000..ec67a3d
Binary files /dev/null and b/static/icons/card_phone_icon.png differ
diff --git a/static/icons/card_scrool_icon_00.png b/static/icons/card_scrool_icon_00.png
new file mode 100644
index 0000000..dacf7e2
Binary files /dev/null and b/static/icons/card_scrool_icon_00.png differ
diff --git a/static/icons/card_scrool_icon_01.png b/static/icons/card_scrool_icon_01.png
new file mode 100644
index 0000000..6dde4f0
Binary files /dev/null and b/static/icons/card_scrool_icon_01.png differ
diff --git a/static/icons/card_scrool_icon_02.png b/static/icons/card_scrool_icon_02.png
new file mode 100644
index 0000000..4ee3f23
Binary files /dev/null and b/static/icons/card_scrool_icon_02.png differ
diff --git a/static/icons/card_scrool_icon_03.png b/static/icons/card_scrool_icon_03.png
new file mode 100644
index 0000000..5eb83bc
Binary files /dev/null and b/static/icons/card_scrool_icon_03.png differ
diff --git a/static/icons/card_set.png b/static/icons/card_set.png
new file mode 100644
index 0000000..72f2fe7
Binary files /dev/null and b/static/icons/card_set.png differ
diff --git a/static/icons/favorite_icon.png b/static/icons/favorite_icon.png
new file mode 100644
index 0000000..3d081c0
Binary files /dev/null and b/static/icons/favorite_icon.png differ
diff --git a/static/icons/loding.gif b/static/icons/loding.gif
new file mode 100644
index 0000000..5bb90fd
Binary files /dev/null and b/static/icons/loding.gif differ
diff --git a/static/icon/play_icon.png b/static/icons/play_icon.png
similarity index 100%
rename from static/icon/play_icon.png
rename to static/icons/play_icon.png
diff --git a/static/icon/video_tool_00.png b/static/icons/video_tool_00.png
similarity index 100%
rename from static/icon/video_tool_00.png
rename to static/icons/video_tool_00.png
diff --git a/static/icon/video_tool_01.png b/static/icons/video_tool_01.png
similarity index 100%
rename from static/icon/video_tool_01.png
rename to static/icons/video_tool_01.png
diff --git a/static/icon/video_tool_02.png b/static/icons/video_tool_02.png
similarity index 100%
rename from static/icon/video_tool_02.png
rename to static/icons/video_tool_02.png
diff --git a/static/images/card-null.png b/static/images/card-null.png
new file mode 100644
index 0000000..438c00b
Binary files /dev/null and b/static/images/card-null.png differ
diff --git a/static/images/card_code.png b/static/images/card_code.png
new file mode 100644
index 0000000..644d17a
Binary files /dev/null and b/static/images/card_code.png differ
diff --git a/static/images/images_add.png b/static/images/images_add.png
new file mode 100644
index 0000000..4b8810c
Binary files /dev/null and b/static/images/images_add.png differ
diff --git a/static/images/logo.png b/static/images/logo.png
new file mode 100644
index 0000000..2f11843
Binary files /dev/null and b/static/images/logo.png differ
diff --git a/static/images/logo_null.png b/static/images/logo_null.png
new file mode 100644
index 0000000..10a17fd
Binary files /dev/null and b/static/images/logo_null.png differ
diff --git a/static/images/null_icon.png b/static/images/null_icon.png
new file mode 100644
index 0000000..602aa2f
Binary files /dev/null and b/static/images/null_icon.png differ
diff --git a/static/images/user_cover_null.png b/static/images/user_cover_null.png
new file mode 100644
index 0000000..6ce000e
Binary files /dev/null and b/static/images/user_cover_null.png differ
diff --git a/static/img/vinyl_back.png b/static/images/vinyl_back.png
similarity index 100%
rename from static/img/vinyl_back.png
rename to static/images/vinyl_back.png
diff --git a/static/img/logo.jpeg b/static/img/logo.jpeg
deleted file mode 100644
index 6f4568a..0000000
Binary files a/static/img/logo.jpeg and /dev/null differ