diff --git a/app.json b/app.json
index 5cf42a2..a934f79 100644
--- a/app.json
+++ b/app.json
@@ -13,7 +13,10 @@
"pages/sharePage/sharePage",
"pages/mine/otherCard/othercarddetail",
"pages/moments/list/momentsshowlist",
- "pages/moments/momentsdetail/momentsdetail"
+ "pages/moments/momentsdetail/momentsdetail",
+ "pages/moments/showlist/showlist",
+ "pages/mine/setting/columnsetting",
+ "pages/serve/index/index"
],
"window": {
"backgroundTextStyle": "dark",
@@ -26,12 +29,16 @@
"color": "#8F8F8F",
"selectedColor": "#1296db",
"borderStyle": "black",
- "list": [
- {
+ "list": [{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "images/ic_card_normal.png",
"selectedIconPath": "images/ic_card_sel.png"
+ }, {
+ "text": "服务",
+ "pagePath": "pages/serve/index/index",
+ "iconPath": "images/ic_serve_normal.png",
+ "selectedIconPath": "images/ic_serve_sel.png"
},
{
"text": "我的",
@@ -56,7 +63,10 @@
"van-submit-bar": "/vant/dist/submit-bar/index",
"van-stepper": "/vant/dist/stepper/index",
"van-image": "/vant/dist/image/index",
- "van-loading": "/vant/dist/loading/index"
+ "van-loading": "/vant/dist/loading/index",
+ "van-switch": "/vant/dist/switch/index",
+ "van-tab": "/vant/dist/tab/index",
+ "van-tabs": "/vant/dist/tabs/index"
},
"plugins": {
"chooseLocation": {
diff --git a/images/ic_serve_normal.png b/images/ic_serve_normal.png
new file mode 100644
index 0000000..d3aa228
Binary files /dev/null and b/images/ic_serve_normal.png differ
diff --git a/images/ic_serve_sel.png b/images/ic_serve_sel.png
new file mode 100644
index 0000000..da1fcf4
Binary files /dev/null and b/images/ic_serve_sel.png differ
diff --git a/images/ic_setting.png b/images/ic_setting.png
new file mode 100644
index 0000000..d945528
Binary files /dev/null and b/images/ic_setting.png differ
diff --git a/pages/index/index.js b/pages/index/index.js
index 4da40ce..c1a2595 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -28,7 +28,8 @@ Page({
shareRecordId: '',
isShowBarCode: false,
browUserList: [],
- shareImgUrl: ''
+ shareImgUrl: '',
+ tempUserId: ''
},
onLoad(options) {
var self = this
@@ -101,6 +102,7 @@ Page({
cId: datas[_self.data.curIndex].configColumnId,
type: datas[_self.data.curIndex].configColumnType,
name: datas[_self.data.curIndex].configColumnName,
+ mode: datas[_self.data.curIndex].configTableMode,
list: res.data.slice(0, datas[_self.data.curIndex].configColumnRowCount)
}
_self.data.dataList.push(tempItem)
@@ -216,6 +218,17 @@ Page({
dataList: _self.data.dataList
})
},
+ //显示更多栏目数据
+ showMore(e) {
+ var item = e.currentTarget.dataset.item
+ if (item.mode == '2') {
+ var userid = e.currentTarget.dataset.userid
+ var idx = e.currentTarget.dataset.idx
+ wx.navigateTo({
+ url: '../moments/showlist/showlist?id=' + item.cId + '&userId=' + userid + '&index=' + idx,
+ })
+ }
+ },
onPullDownRefresh() {
this.setData({
dataList: [],
@@ -487,6 +500,9 @@ Page({
if (res.data) {
self.toSaveLocalImg(res.data.cardTemplateUseDispatchPhoto)
self.getBrowCardUserList(res.data.cardTemplateUseId)
+ self.setData({
+ tempUserId: res.data.creator
+ })
self.getMainColumn(res.data.creator)
}
}).catch(res => {
@@ -714,7 +730,6 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
- console.log(res)
var self = this
wx.showShareMenu({
withShareTicket: true,
@@ -729,7 +744,7 @@ Page({
var param = '/pages/sharePage/sharePage?cardTemplateDispatchId=' + postId;
return {
- title: '名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享名片分享',
+ title: '名片分享',
path: param,
imageUrl: self.data.shareImgUrl
}
@@ -750,13 +765,13 @@ Page({
//显示详情
showDetail(e) {
var type = e.currentTarget.dataset.ctype //需要跳详情
- // if (type.indexOf('dda5007c-5fb7-48f2-8537-3cb8ea298242') != -1) {
- //需要跳详情
- var cId = e.currentTarget.dataset.cid
- var uId = e.currentTarget.dataset.id
- wx.navigateTo({
- url: '../moments/momentsdetail/momentsdetail?uId=' + uId + '&cId=' + cId,
- })
- // }
+ if (type.indexOf('dda5007c-5fb7-48f2-8537-3cb8ea298242') != -1) {
+ //需要跳详情
+ var cId = e.currentTarget.dataset.cid
+ var uId = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '../moments/momentsdetail/momentsdetail?uId=' + uId + '&cId=' + cId,
+ })
+ }
}
})
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 078ef1a..d8a7823 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -9,7 +9,7 @@
-
-
+ wx:if="{{item.templateAreaServerLink != '1'}}">
+
@@ -95,15 +95,16 @@
-
+
{{item.name}}
-
- 更多
+
+ 更多 >
@@ -118,7 +119,9 @@
- {{child.value}}
+
+
+ {{child.value}}
@@ -265,9 +268,6 @@
- 详情 >
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 094b5e7..b46a550 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -24,6 +24,7 @@ page {
.area-box {
white-space: nowrap;
word-break: break-all;
+ z-index: 111;
}
.card-bgImg {
diff --git a/pages/mine/index/index.js b/pages/mine/index/index.js
index 6d7d50f..30fdc9b 100644
--- a/pages/mine/index/index.js
+++ b/pages/mine/index/index.js
@@ -163,4 +163,10 @@ Page({
url: '../myCard/myCard',
})
},
+ //跳转设置页面
+ showSetting() {
+ wx.navigateTo({
+ url: '../../mine/setting/columnsetting'
+ })
+ }
})
\ No newline at end of file
diff --git a/pages/mine/index/index.wxml b/pages/mine/index/index.wxml
index f6d8b25..4f09c2e 100644
--- a/pages/mine/index/index.wxml
+++ b/pages/mine/index/index.wxml
@@ -9,6 +9,7 @@
+
@@ -53,25 +54,4 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/mine/index/index.wxss b/pages/mine/index/index.wxss
index 6bb77fd..feb2625 100644
--- a/pages/mine/index/index.wxss
+++ b/pages/mine/index/index.wxss
@@ -60,6 +60,15 @@ page {
height: 400px;
}
+.UCenter-bg .icon {
+ width: 48rpx;
+ height: 48rpx;
+ z-index: 10;
+ top: 200rpx;
+ position: absolute;
+ right: 48rpx;
+}
+
.scroll-content {
width: 100%;
border-top-right-radius: 60rpx;
diff --git a/pages/mine/myCard/myCard.js b/pages/mine/myCard/myCard.js
index 284e2ab..e1293c0 100644
--- a/pages/mine/myCard/myCard.js
+++ b/pages/mine/myCard/myCard.js
@@ -177,7 +177,7 @@ Page({
this.setData({
token: app.globalData.token
})
- // this.getList()
+ this.getList()
},
diff --git a/pages/mine/myCard/myCard.wxml b/pages/mine/myCard/myCard.wxml
index 5b85cb2..d170b52 100644
--- a/pages/mine/myCard/myCard.wxml
+++ b/pages/mine/myCard/myCard.wxml
@@ -8,57 +8,74 @@
-
-
-
- 主名片
-
+
+
+
+
+ 主名片
+
+
+ {{list.cardTemplateUseTitle}}
- {{list.cardTemplateUseTitle}}
+
+
+
+
-
-
-
- 置顶
-
+
+
+
+
+ 置顶
+
+
+
+
+ {{list.cardTemplateUseDTO.cardTemplateUseTitle}}
+ 置顶
+ 取消置顶
-
- {{list.cardTemplateUseDTO.cardTemplateUseTitle}}
- 置顶
- 取消置顶
-
+
+
+
+
-
-
-
- 置顶
-
+
+
+
+
+ 置顶
+
+
-
-
-
-
- {{list.creatorName}}
-
-
- 浏览时间:{{list.gmtCreate}}
+
+
+
+ {{list.creatorName}}
+
+
+ 浏览时间:{{list.gmtCreate}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/mine/myCardDetail/myCardDetail.wxss b/pages/mine/myCardDetail/myCardDetail.wxss
index f215471..2521068 100644
--- a/pages/mine/myCardDetail/myCardDetail.wxss
+++ b/pages/mine/myCardDetail/myCardDetail.wxss
@@ -1,7 +1,8 @@
-page{
+page {
background: #f7f7f7;
}
-.card{
+
+.card {
width: 100%;
height: 0;
position: relative;
@@ -10,65 +11,79 @@ page{
z-index: 100;
/* text-align: center; */
}
-.card-bgImg{
+
+.card-bgImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
-.area-box{
+
+.area-box {
white-space: nowrap;
background: none !important;
+ z-index: 111;
}
-.area-box image{
+
+.area-box image {
width: 100%;
height: 100%;
}
-.card-info{
+
+.card-info {
padding: 20rpx;
+ margin-bottom: 90rpx;
background: #fff;
}
-.card-title{
+
+.card-title {
font-size: 38rpx;
background: #f7f7f7;
line-height: 70rpx;
padding: 0 20rpx;
}
-.row{
+
+.row {
display: flex;
padding: 15rpx 0;
border-bottom: 1px solid #EEE;
/* margin-bottom: 15rpx; */
}
-.item-title{
+
+.item-title {
flex: 1;
font-size: 32rpx;
line-height: 50rpx;
color: #808080;
}
-.item-input{
+
+.item-input {
flex: 4;
box-sizing: border-box;
display: flex;
align-items: center;
}
-.item-input input{
+
+.item-input input {
width: 100%;
text-align: right;
height: 50rpx;
font-size: 32rpx;
color: #333;
}
-.item-input image{
+
+.item-input image {
max-width: 70%;
max-height: 120rpx;
}
-.item-code-input image{
+
+.item-code-input image {
max-width: 35%;
max-height: 160rpx;
}
-.share{
+
+.share {
padding: 20rpx 15rpx;
text-align: center;
position: fixed;
@@ -78,33 +93,37 @@ page{
background: #fff;
z-index: 1000;
}
-.share .btn{
+
+.share .btn {
display: inline-block;
width: 32% !important;
background: #0054bd;
color: #fff;
margin-right: 2%;
- font-size:28rpx;
+ font-size: 28rpx;
font-weight: normal;
height: 70rpx;
line-height: 70rpx;
text-align: center;
border-radius: 10rpx;
}
-.share .btn:last-child{
+
+.share .btn:last-child {
margin-right: 0;
}
-.hide-link{
+
+.hide-link {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 0 15rpx;
- background: rgba(0,0,0,0.6);
+ background: rgba(0, 0, 0, 0.6);
z-index: 1000;
}
-.hide{
+
+.hide {
position: absolute;
top: 50%;
left: 50%;
@@ -114,7 +133,8 @@ page{
border-radius: 10rpx;
background: #fff;
}
-.hide-btn{
+
+.hide-btn {
display: flex;
width: 49%;
height: 60rpx;
@@ -125,18 +145,22 @@ page{
justify-content: center;
align-items: center;
}
-.hide-text{
+
+.hide-text {
font-size: 30rpx;
color: #000;
margin-bottom: 20rpx;
}
-.hide-btn-box{
+
+.hide-btn-box {
display: flex;
justify-content: space-between;
}
-.input-box{
+
+.input-box {
width: 100%;
}
-.cuIcon-cameraadd{
+
+.cuIcon-cameraadd {
font-size: 60rpx;
}
\ No newline at end of file
diff --git a/pages/mine/setting/columnsetting.js b/pages/mine/setting/columnsetting.js
new file mode 100644
index 0000000..20f0b7d
--- /dev/null
+++ b/pages/mine/setting/columnsetting.js
@@ -0,0 +1,174 @@
+// pages/mine/setting/columnsetting.js
+const app = getApp()
+Page({
+ data: {
+ curIndex: 0,
+ menuList: [],
+ imgUrl: app.urls.baseImgUrl,
+ inputColumnName: '',
+ isShowInput: false,
+ curId: '',
+ curIndex: 0,
+ curIdx: 0
+ },
+ onLoad: function (options) {
+ this.getColumnList()
+ try {
+ var isFrist = wx.getStorageSync('isFirst')
+ if (isFrist) {
+
+ } else {
+ wx.setStorage({
+ key: 'isFirst',
+ data: true
+ })
+ wx.showModal({
+ title: '提示',
+ content: '点击列表条目名称可以自定义栏目名称,点击开关可以控制是否在首页展示该条目.',
+ showCancel: false,
+ success(res) {
+
+ }
+ })
+ }
+ } catch (err) {
+ console.log('获取失败')
+ wx.showModal({
+ title: '提示',
+ content: '点击列表条目名称可以自定义栏目名称,点击开关可以控制是否在首页展示该条目.',
+ showCancel: false,
+ success(res) {
+
+ }
+ })
+ }
+ },
+ getColumnList() {
+ wx.showLoading({
+ title: '加载中...',
+ })
+ var _self = this
+ app.http.get(app.urls.getMineColumnList, {
+ header: {
+ token: app.globalData.token
+ }
+ })
+ .then(res => {
+ var data = res.data
+ wx.hideLoading({})
+ data.forEach(it => {
+ it.configColumnList.sort((a, b) => a.configColumnOrder - b.configColumnOrder)
+ })
+ _self.setData({
+ menuList: data
+ })
+ })
+ .catch(err => {
+ wx.hideLoading({})
+ })
+ },
+ //保存我的栏目是否显示
+ doSaveColumnDisplay(e) {
+ // configColumnId
+ var id = e.currentTarget.dataset.id
+ var index = e.currentTarget.dataset.index
+ var idx = e.currentTarget.dataset.idx
+ console.log(id + '===' + idx + '===' + index)
+ var _self = this
+ wx.showLoading({
+ title: '保存中...',
+ })
+ app.http.post(app.urls.doSaveColumnDisplay, {
+ header: {
+ token: app.globalData.token
+ },
+ data: {
+ configColumnId: id
+ }
+ })
+ .then(res => {
+ wx.hideLoading({})
+ var setMode = _self.data.menuList[index].configColumnList[idx].configColumnSet
+ if (setMode == '0') {
+ setMode = '1'
+ } else {
+ setMode = '0'
+ }
+ _self.data.menuList[index].configColumnList[idx].configColumnSet = setMode
+ _self.setData({
+ menuList: _self.data.menuList
+ })
+ })
+ .catch(err => {
+ console.log(err)
+ wx.hideLoading({})
+ wx.showToast({
+ title: '保存失败',
+ icon: 'error'
+ })
+ })
+ },
+ //保存我的栏目名称
+ doSaveColumnName() {
+ var _self = this
+ wx.showLoading({
+ title: '修改中...',
+ })
+ app.http.post(app.urls.doSaveColumnName, {
+ header: {
+ token: app.globalData.token
+ },
+ data: {
+ configColumnId: _self.data.curId,
+ configColumnName: _self.data.inputColumnName
+ }
+ })
+ .then(res => {
+ wx.hideLoading({})
+ _self.data.menuList[_self.data.curIndex].configColumnList[_self.data.curIdx].configColumnRemark = _self.data.menuList[_self.data.curIndex].configColumnList[_self.data.curIdx].configColumnName
+ _self.data.menuList[_self.data.curIndex].configColumnList[_self.data.curIdx].configColumnName = _self.data.inputColumnName
+ // 刷新数据
+ _self.setData({
+ menuList: _self.data.menuList,
+ inputColumnName: '',
+ })
+ })
+ .catch(err => {
+ wx.hideLoading({})
+ wx.showToast({
+ title: '修改失败',
+ icon: 'error'
+ })
+ })
+ },
+ showInput(e) {
+ var id = e.currentTarget.dataset.id //栏目
+ var index = e.currentTarget.dataset.index //栏目组
+ var idx = e.currentTarget.dataset.idx //栏目
+ this.setData({
+ isShowInput: true,
+ curId: id,
+ curIndex: index,
+ curIdx: idx
+ })
+ },
+ //保存自定义栏目名称
+ addName(e) {
+ var _self = this
+ _self.setData({
+ isShowInput: false,
+ })
+ _self.doSaveColumnName()
+ },
+ //栏目名称输入监听
+ textInput(e) {
+ this.setData({
+ inputColumnName: e.detail.value
+ })
+ },
+ onHide(e) {
+ this.setData({
+ isShowInput: false
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/mine/setting/columnsetting.json b/pages/mine/setting/columnsetting.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/mine/setting/columnsetting.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/mine/setting/columnsetting.wxml b/pages/mine/setting/columnsetting.wxml
new file mode 100644
index 0000000..0ea10b7
--- /dev/null
+++ b/pages/mine/setting/columnsetting.wxml
@@ -0,0 +1,69 @@
+
+ 设置
+
+
+
+
+
+
+
+
+
+
+
+ {{item.configColumnName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.configColumnName}}
+
+
+ 原名称:{{item.configColumnRemark}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
\ No newline at end of file
diff --git a/pages/mine/setting/columnsetting.wxss b/pages/mine/setting/columnsetting.wxss
new file mode 100644
index 0000000..389a010
--- /dev/null
+++ b/pages/mine/setting/columnsetting.wxss
@@ -0,0 +1,8 @@
+/* pages/mine/setting/columnsetting.wxss */
+
+.scroll-content {
+ width: 100%;
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+}
\ No newline at end of file
diff --git a/pages/moments/showlist/showlist.js b/pages/moments/showlist/showlist.js
new file mode 100644
index 0000000..d76c210
--- /dev/null
+++ b/pages/moments/showlist/showlist.js
@@ -0,0 +1,334 @@
+// pages/moments/showlist/showlist.js
+const app = getApp()
+var innerAudioContext = wx.createInnerAudioContext()
+Page({
+ data: {
+ currentIndex: 0,
+ tabList: [],
+ curId: '', //当前栏目ID
+ tempUserId: '', //当前栏目用户ID
+ dataList: [], //当前数据
+ speedStep: 5, //快进快退秒数
+ waitFlag: false,
+ topHeight: app.globalData.CustomBar,
+ },
+
+ onLoad(options) {
+ this.setData({
+ curId: options.id,
+ tempUserId: options.userId,
+ })
+ this.getTabs()
+ },
+ getTabs() {
+ var _self = this
+ wx.showLoading({
+ title: '加载中...',
+ })
+ app.http.get(app.urls.getMainColumn, {
+ header: {
+ token: app.globalData.token
+ },
+ data: {
+ cardTemplateUseId: _self.data.tempUserId
+ }
+ })
+ .then(res => {
+ for (var i = 0; i < res.data.length; i++) {
+ if (res.data[i].configColumnId == _self.data.curId) {
+ _self.setData({
+ currentIndex: i
+ })
+ }
+ }
+ wx.hideLoading({})
+ _self.setData({
+ tabList: res.data
+ })
+ _self.getMainMoment(_self.data.curId)
+ })
+ .catch(err => {
+ wx.hideLoading({})
+ })
+ },
+ onChange(e) {
+ var index = e.detail.index
+ var id = this.data.tabList[index].configColumnId
+ var _self = this
+ _self.setData({
+ currentIndex: index
+ })
+ //重新请求数据
+ _self.getMainMoment(id)
+ },
+ //切换标签
+ changeTab(e) {
+ var curIndex = e.currentTarget.dataset.currentindex
+ var id = this.data.dataList[curIndex].configColumnId
+ var _self = this
+ _self.setData({
+ currentIndex: curIndex
+ })
+ //重新请求数据
+ _self.getMainMoment(id)
+ },
+ getMainMoment(id) {
+ wx.showLoading({
+ title: '加载中...',
+ })
+ var _self = this
+ app.http.get(app.urls.getMainMoment.format({
+ configColumnId: id
+ }), {
+ header: {
+ token: app.globalData.token
+ },
+ data: {
+ userId: _self.data.tempUserId
+ }
+ })
+ .then(res => {
+ wx.hideLoading({})
+ _self.buildMainData(res.data)
+ })
+ .catch(err => {
+ wx.hideLoading({})
+ })
+ },
+ buildMainData(datas) {
+ var _self = this
+ datas.forEach(it => {
+ it.list.forEach(iem => {
+ switch (iem.dataType) {
+ case '2': //图片
+ var items = iem.value.split(',')
+ var tempList = []
+ items.forEach(item => {
+ var tempItem = {
+ id: item,
+ path: app.urls.baseImgUrl + item,
+ }
+ tempList.push(tempItem)
+ })
+ iem.valueList = tempList
+ break
+ case '3': //音频
+ var items = iem.value.split(',')
+ var tempList = []
+ items.forEach(item => {
+ var tempItem = {
+ id: item, //id
+ path: app.urls.baseImgUrl + item, //地址
+ isPlay: false, //是否播放中
+ duration: 100000, //时长
+ curDuration: 0,
+ curDurationStr: '00:00',
+ totalDurationStr: '00:00'
+ }
+ tempList.push(tempItem)
+ })
+ iem.valueList = tempList
+ break
+ case '4': //视频
+ var items = iem.value.split(',')
+ var tempList = []
+ for (var i = 0; i < items.length; i++) {
+ var ss = items[i].split('&')
+ var videoUrl = app.urls.baseImgUrl + ss[0]
+ var imgUrl = app.urls.baseImgUrl + ss[1]
+ var tempItem = {
+ path: videoUrl,
+ imgPath: imgUrl
+ }
+ tempList.push(tempItem)
+ }
+ iem.valueList = tempList
+ break
+ case '6':
+ var items = iem.value.split('-')
+ var tempList = []
+ items.forEach(item => {
+ var latlng = item.split(',')
+ var tempItem = {
+ name: '',
+ address: '',
+ latitude: latlng[0],
+ longitude: latlng[1],
+ }
+ tempList.push(tempItem)
+ })
+ iem.valueList = tempList
+ break
+ case '8': //单选
+ iem.dictionariesList.forEach(ss => {
+ if (iem.value.indexOf(ss.dataId) != -1) {
+ iem.selValue = ss.dataName
+ }
+ })
+ break
+ case '9': //多选
+ iem.dictionariesList.forEach(ss => {
+ if (iem.value.indexOf(ss.dataId) != -1) {
+ ss.isSel = true
+ } else {
+ ss.isSel = false
+ }
+ })
+ break
+ }
+ })
+ })
+ _self.setData({
+ dataList: datas
+ })
+ },
+ //预览图片
+ viewImg(e) {
+ wx.previewImage({
+ urls: [e.currentTarget.dataset.url],
+ })
+ },
+ //预览视频
+ viewVideo(e) {
+ var url = e.currentTarget.dataset.url
+ wx.previewMedia({
+ sources: [{
+ url: url,
+ type: 'video'
+ }],
+ })
+ },
+ play(e) {
+ //进行播放
+ const _self = this
+ const index = e.currentTarget.dataset.index
+ const idx = e.currentTarget.dataset.idx
+ const ix = e.currentTarget.dataset.i
+ const a = e.currentTarget.dataset.a
+ var audio = e.currentTarget.dataset.item
+ //先需要停止其他录音文件的播放
+ _self.data.dataList.forEach(it => {
+ it.list.forEach(item => {
+ item.list.forEach(ix => {
+ if (ix.dataType == '3') {
+ if (ix.valueList) {
+ ix.valueList.forEach(ii => {
+ if (ii.isPlay) {
+ innerAudioContext.stop()
+ }
+ ii.isPlay = false
+ ii.curDuration = 0
+ ii.curDuationStr = '00:00'
+ })
+ }
+ }
+ })
+ })
+ })
+ if (!audio.isPlay) {
+ innerAudioContext = wx.createInnerAudioContext()
+ innerAudioContext.src = _self.data.dataList[index].list[idx].list[ix].valueList[a].path + '.mp3'
+ innerAudioContext.autoplay = true
+ console.log(_self.data.dataList[index].list[idx].list[ix].valueList[a].path)
+ } else {
+ innerAudioContext.stop()
+ }
+ innerAudioContext.onPlay(() => {
+ console.log('onPlay')
+ _self.data.dataList[index].list[idx].list[ix].valueList[a]['isPlay'] = true
+ _self.setData({
+ dataList: _self.data.dataList
+ })
+ });
+
+ innerAudioContext.onCanplay((res) => {})
+ innerAudioContext.onStop((res) => {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
+ _self.setData({
+ dataList: _self.data.dataList,
+ })
+ innerAudioContext.destroy()
+ })
+ innerAudioContext.onEnded((res) => {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
+ _self.setData({
+ dataList: _self.data.dataList,
+ })
+ innerAudioContext.destroy()
+ })
+ innerAudioContext.onError((res) => {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
+ _self.setData({
+ dataList: _self.data.dataList,
+ })
+ innerAudioContext.destroy()
+ })
+ innerAudioContext.onSeeking(() => {})
+ innerAudioContext.onWaiting(() => {})
+ innerAudioContext.onTimeUpdate(() => {
+ if (innerAudioContext.duration != Infinity) {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = parseInt(innerAudioContext.currentTime)
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].duration = parseInt(innerAudioContext.duration)
+ var curM = parseInt(innerAudioContext.currentTime / 60) //分钟
+ var curS = parseInt(innerAudioContext.currentTime % 60) //秒
+ var tM = parseInt(innerAudioContext.duration / 60) //分钟
+ var tS = parseInt(innerAudioContext.duration % 60) //秒
+ var curMStr = curM > 9 ? curM : '0' + curM
+ var curSStr = curS > 9 ? curS : '0' + curS
+ var totalMStr = tM > 9 ? tM : '0' + tM
+ var totalSStr = +tS > 9 ? tS : '0' + tS
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = curMStr + ':' + curSStr
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].totalDurationStr = totalMStr + ':' + totalSStr
+ _self.setData({
+ dataList: _self.data.dataList
+ })
+ }
+ })
+ },
+ //倒退5秒
+ rewind(e) {
+ var _self = this
+ var index = e.currentTarget.dataset.index
+ var item = e.currentTarget.dataset.item
+ var idx = e.currentTarget.dataset.idx
+ var a = e.currentTarget.dataset.a
+ var ix = e.currentTarget.dataset.i
+ if (item.isPlay) {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration - _self.data.speedStep
+ innerAudioContext.seek(_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration)
+ _self.setData({
+ dataList: _self.data.dataList
+ })
+ }
+
+ },
+ //快进5秒
+ speed(e) {
+ var _self = this
+ var index = e.currentTarget.dataset.index
+ var item = e.currentTarget.dataset.item
+ var idx = e.currentTarget.dataset.idx
+ var a = e.currentTarget.dataset.a
+ var ix = e.currentTarget.dataset.i
+ if (item.isPlay) {
+ _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = _self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration + _self.data.speedStep
+ innerAudioContext.seek(_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration)
+ _self.setData({
+ dataList: _self.data.dataList
+ })
+ }
+ },
+ slider4change(e) {
+ var index = e.currentTarget.dataset.index
+ var item = e.currentTarget.dataset.item
+ if (item.isPlay) {
+ innerAudioContext.seek(e.detail.value)
+ }
+ },
+})
\ No newline at end of file
diff --git a/pages/moments/showlist/showlist.json b/pages/moments/showlist/showlist.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/moments/showlist/showlist.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/moments/showlist/showlist.wxml b/pages/moments/showlist/showlist.wxml
new file mode 100644
index 0000000..8624d78
--- /dev/null
+++ b/pages/moments/showlist/showlist.wxml
@@ -0,0 +1,197 @@
+
+ 栏目
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{child.value}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{audio.curDurationStr}}
+
+ {{audio.totalDurationStr}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{child.value}}
+
+
+
+
+
+
+
+
+
+ {{child.comment}}:{{child.selValue}}
+
+
+
+
+
+
+
+
+ {{child.comment}}
+
+
+
+
+ {{ss.dataName}}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/moments/showlist/showlist.wxss b/pages/moments/showlist/showlist.wxss
new file mode 100644
index 0000000..bf525b0
--- /dev/null
+++ b/pages/moments/showlist/showlist.wxss
@@ -0,0 +1,627 @@
+.tab {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: #fff;
+ display: flex;
+ flex-direction: row;
+ height: 80rpx;
+ z-index: 100;
+}
+
+.tab-box {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 32rpx;
+ color: #000;
+}
+
+.tab-box.active {
+ color: #055fe6;
+ border-bottom: 2px solid #055fe6;
+ box-sizing: border-box;
+}
+
+
+.card-container {
+ height: 0;
+ box-sizing: border-box;
+}
+
+.share-btn {
+ background: #eee;
+}
+
+.card {
+ width: 100%;
+ height: 0;
+ box-sizing: border-box;
+ background: #fff;
+ position: relative;
+ overflow: hidden;
+ /* text-align: center; */
+}
+
+.area-box {
+ white-space: nowrap;
+ word-break: break-all;
+}
+
+.card-bgImg {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.person {
+ padding: 20rpx;
+}
+
+.dynamic-container {
+ margin-top: -50rpx;
+ position: relative;
+ background-color: #fff;
+ padding: 20rpx;
+ border-radius: 20rpx;
+}
+
+.dynamic-title image {
+ width: 30rpx;
+ height: 30rpx;
+ vertical-align: middle;
+ margin-top: -4rpx;
+}
+
+.catelog-title {
+ display: flex;
+ position: relative;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.catelog-title .action {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ max-width: 100%;
+ padding-right: 30rpx;
+}
+
+.title {
+ font-size: 30rpx;
+ position: relative;
+ color: #fff;
+ border-top-right-radius: 48rpx;
+ border-top-left-radius: 48rpx;
+ background: #0054bd;
+ display: inline-block;
+ padding: 10rpx 60rpx 60rpx 10rpx;
+ margin-bottom: -50rpx;
+}
+
+.title text {
+ margin-left: 20rpx;
+}
+
+.column-box {
+ display: flex;
+ flex-direction: column;
+ background-color: #fff;
+ width: 100%;
+}
+
+.column-content {
+ display: flex;
+ flex-direction: column;
+ padding: 10rpx;
+ background-color: #fff;
+ border-radius: 10rpx;
+ width: 100%;
+ box-shadow: 0px 2px 2px #f0f0f0;
+ z-index: 2;
+}
+
+.intro-title image {
+ width: 28rpx;
+ height: 30rpx;
+ vertical-align: middle;
+ margin-top: -4px;
+}
+
+.serve-title image {
+ width: 28rpx;
+ height: 30rpx;
+ vertical-align: middle;
+ margin-top: -4px;
+}
+
+.person-content {
+ padding: 20rpx;
+ border-radius: 20rpx;
+ background: #fff;
+ margin-top: -30rpx;
+ font-size: 30rpx;
+ color: #000;
+ line-height: 40rpx;
+ word-break: break-all;
+ line-height: 40rpx;
+ letter-spacing: 2rpx;
+ position: relative;
+}
+
+.company-title {
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1px solid #ddd;
+}
+
+.company-title image {
+ width: 140rpx;
+ height: 140rpx;
+}
+
+.company-name {
+ width: 520rpx;
+ height: 140rpx;
+ display: flex;
+ align-items: center;
+ font-size: 34rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.company-content {
+ background: #fff;
+ border-radius: 20rpx;
+ padding: 20rpx;
+ margin-top: -30rpx;
+ position: relative;
+}
+
+.company-content image {
+ width: 100%;
+ height: 300rpx;
+ border-radius: 20rpx;
+}
+
+.company .person-content {
+ margin-top: 0;
+}
+
+.dynamic-title {
+ width: 710rpx;
+ margin: 0 auto;
+ display: block;
+}
+
+.dynamic-box {
+ margin-bottom: 20rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ overflow: hidden;
+ position: relative;
+ height: 400rpx;
+}
+
+.dynamic-box image {
+ width: 100%;
+ height: 400rpx;
+}
+
+.dynamic-text {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.6);
+ line-height: 60rpx;
+ color: #fff;
+ padding: 0 10rpx;
+ font-size: 30rpx;
+}
+
+.person-info {
+ display: flex;
+ justify-content: space-between;
+ padding-bottom: 20rpx;
+ border-bottom: 1px solid #EEE;
+}
+
+.avatar {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
+ overflow: hidden;
+}
+
+.avatar image {
+ width: 100%;
+ height: 100%;
+}
+
+.person-name {
+ width: 530rpx;
+}
+
+.name {
+ font-size: 32rpx;
+ margin: 15rpx 0 10rpx;
+ color: #000;
+}
+
+.time {
+ color: #b2b2b2;
+}
+
+.dynamic-content {
+ margin: 20rpx 0;
+}
+
+.dynamic-img {
+ position: relative;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+}
+
+.dynamic-img image {
+ width: 32%;
+ margin-right: 2%;
+ height: 160rpx;
+ margin-bottom: 10rpx;
+}
+
+.dynamic-img image:nth-child(3n) {
+ margin-right: 0;
+}
+
+.dynamic-img-text {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 3rpx;
+ padding: 0 20rpx;
+ background: rgba(0, 0, 0, 0.6);
+ color: #fff;
+ font-size: 32rpx;
+ line-height: 70rpx;
+}
+
+.dynamic-good {
+ margin: 10rpx 0;
+ display: flex;
+ justify-content: space-between;
+}
+
+.good-count {
+ color: #333;
+ font-size: 28rpx;
+}
+
+.good-btn image {
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: top;
+}
+
+.dynamic-reply {
+ background: #eee;
+ padding: 15rpx;
+ margin-top: 15rpx;
+}
+
+.reply {
+ font-size: 32rpx;
+ color: #000;
+ margin-bottom: 5rpx;
+}
+
+.reply-name {
+ font-weight: bold;
+ display: inline;
+}
+
+.dynamic-reply-input {
+ margin-top: 10rpx;
+}
+
+.dynamic-reply-input input {
+ width: 100%;
+ height: 60rpx;
+ border-bottom: 1px solid #eee;
+}
+
+.creat-card {
+ position: fixed;
+ right: 20rpx;
+ bottom: 20rpx;
+ padding: 20rpx;
+ background: #0054bd;
+ border-radius: 50%;
+ box-sizing: border-box;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ width: 140rpx;
+ height: 140rpx;
+ z-index: 100;
+}
+
+.creat-card image {
+ width: 80rpx;
+ height: 60rpx;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+.share-save {
+ text-align: center;
+ display: flex;
+ justify-content: space-between;
+}
+
+.share-btn {
+ border: 1px solid #1296db;
+ background: none;
+ color: #1296db;
+ font-weight: normal;
+}
+
+.save-btn {
+ border: 1px solid #1296db;
+ background: #1296db;
+ color: #fff;
+ font-weight: normal;
+}
+
+.bottom-btn {
+ margin-top: 20rpx;
+ padding: 0 20rpx;
+ width: 100%;
+ white-space: nowrap;
+}
+
+.phone-box .icon {
+ width: 30rpx;
+ height: 30rpx;
+ vertical-align: top;
+}
+
+.wechate-box .icon {
+ width: 35rpx;
+ height: 30rpx;
+ vertical-align: top;
+}
+
+.email-box .icon {
+ width: 30rpx;
+ height: 30rpx;
+ vertical-align: top;
+}
+
+.bottom-btn-box {
+ display: inline-block;
+ min-width: 32%;
+ line-height: 30rpx;
+ padding: 20rpx;
+ box-sizing: border-box;
+ border: 1px solid #DDD;
+ border-radius: 10rpx;
+ margin-right: 10rpx;
+}
+
+.bottom-text {
+ margin-top: 10rpx;
+}
+
+.top-box {
+ padding-bottom: 20rpx;
+ background-color: #F7F7F7;
+}
+
+.good {
+ display: flex;
+ justify-content: space-between;
+ padding-left: 20rpx;
+ padding-bottom: 20rpx;
+ background-color: #fff;
+}
+
+.good-avatar,
+.good-click {
+ line-height: 45rpx;
+ color: #333;
+}
+
+.good-click {
+ display: flex;
+}
+
+.view-count {
+ margin-right: 30rpx;
+ padding-right: 30rpx;
+ border-right: 1px solid #808080;
+ color: #808080;
+ display: flex;
+ flex-direction: row;
+ font-size: 36rpx;
+}
+
+.view-count-no {
+ margin-right: 30rpx;
+ padding-right: 30rpx;
+ color: #808080;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: 36rpx;
+}
+
+.good-avatar image {
+ width: 100%;
+ height: 100%;
+}
+
+.good-click image {
+ width: 38rpx;
+ height: 38rpx;
+}
+
+.view-count image {
+ width: 32rpx;
+ height: 32rpx;
+}
+
+.view-count-no image {
+ width: 32rpx;
+ height: 32rpx;
+}
+
+.avatar-list {
+ width: 45rpx;
+ height: 45rpx;
+ margin-right: 10rpx;
+ vertical-align: top;
+ display: inline-block;
+}
+
+.mid {
+ display: flex;
+ background: #0054bd;
+ border-top-left-radius: 60rpx;
+ border-top-right-radius: 60rpx;
+ padding: 40rpx 0 80rpx;
+ margin-top: -20rpx;
+ position: relative;
+}
+
+.mid-box {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ border-right: 1px solid #2f82ea;
+ background: none;
+ font-weight: normal;
+ width: auto !important;
+ padding: 0 !important;
+}
+
+.mid-box:last-child {
+ border: none;
+}
+
+.mid-box image {
+ width: 60rpx;
+ height: 60rpx;
+ margin-bottom: 20rpx;
+}
+
+.mid-box-text {
+ font-size: 30rpx;
+ color: #fff;
+}
+
+.mid-btn {
+ position: relative;
+ margin-top: -60rpx;
+ display: flex;
+ padding: 30rpx;
+ background: #fff;
+ border-top-left-radius: 60rpx;
+ border-top-right-radius: 60rpx;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+
+.mid-btn-box {
+ flex-shrink: 0;
+ width: 49%;
+ margin-bottom: 20rpx;
+ padding: 15rpx;
+ border-radius: 20rpx;
+ background: #eee;
+ display: flex;
+ justify-content: space-between;
+ box-sizing: border-box;
+}
+
+.mid-btn-box:nth-child(3),
+.mid-btn-box:nth-child(4) {
+ margin-bottom: 0;
+}
+
+.mid-btn-box image {
+ width: 80rpx;
+ height: 80rpx;
+}
+
+.mid-btn-text {
+ width: 200rpx;
+}
+
+.text-top {
+ line-height: 45rpx;
+ font-size: 30rpx;
+ color: #000;
+}
+
+.text-bottom {
+ font-size: 26rpx;
+ color: #898989;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.bar-code {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ left: 0;
+ background: rgba(0, 0, 0, 0.6);
+ z-index: 999;
+}
+
+.bar-code .content {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ max-width: 96%;
+ background: #fff;
+ /* width: 500rpx;
+ height: 500rpx; */
+ border-radius: 10rpx;
+ padding: 20rpx;
+ min-width: 80%;
+ min-height: 50%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.code-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #000;
+}
+
+.code-txt {
+ font-size: 32rpx;
+ color: #000;
+}
+
+.bar-code image {
+ width: 300rpx;
+ height: 300rpx;
+}
\ No newline at end of file
diff --git a/pages/serve/index/index.js b/pages/serve/index/index.js
new file mode 100644
index 0000000..6bee0e3
--- /dev/null
+++ b/pages/serve/index/index.js
@@ -0,0 +1,16 @@
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ shopUrl: 'https://www.baidu.com'
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/serve/index/index.json b/pages/serve/index/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/serve/index/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/serve/index/index.wxml b/pages/serve/index/index.wxml
new file mode 100644
index 0000000..1a0325d
--- /dev/null
+++ b/pages/serve/index/index.wxml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/pages/serve/index/index.wxss b/pages/serve/index/index.wxss
new file mode 100644
index 0000000..c5c921c
--- /dev/null
+++ b/pages/serve/index/index.wxss
@@ -0,0 +1 @@
+/* pages/serve/index/index.wxss */
\ No newline at end of file
diff --git a/pages/sharePage/sharePage.js b/pages/sharePage/sharePage.js
index c0b3ef0..35e3de5 100644
--- a/pages/sharePage/sharePage.js
+++ b/pages/sharePage/sharePage.js
@@ -7,8 +7,8 @@ Page({
* 页面的初始数据
*/
data: {
+ active: 0,
curIndex: 0,
- cardUrl: app.urls.baseImgUrl,
token: '',
cardTemplateUseId: '',
cardTemplateDispatchId: '',
@@ -32,10 +32,12 @@ Page({
imgUrl: app.urls.baseImgUrl,
personId: '',
shareRecordId: '',
- name: '名片',
+ nameTxt: '名片',
dataList: [],
isShowBarCode: false,
- browUserList: []
+ browUserList: [],
+ tempUserId: '',
+ shareImgUrl: ''
},
// 登录
doLogin() {
@@ -132,7 +134,7 @@ Page({
})
} else if (area[i].templateAreaSource == 'name') {
self.setData({
- name: area[i].templateAreaFontValue
+ nameTxt: area[i].templateAreaFontValue
})
}
}
@@ -142,14 +144,17 @@ Page({
dataList: []
})
if (res.data) {
+ self.toSaveLocalImg(res.data.cardTemplateUseDispatchPhoto)
self.getBrowCardUserList(res.data.cardTemplateUseId)
+ self.setData({
+ tempUserId: res.data.creator
+ })
self.getMainColumn(res.data.creator)
}
})
},
//获取首页展示的栏目
getMainColumn(id) {
- console.log(id)
var _self = this
app.http.get(app.urls.getMainColumn, {
header: {
@@ -185,8 +190,11 @@ Page({
.then(res => {
if (res.data.length > 0) {
var tempItem = {
+ cId: datas[_self.data.curIndex].configColumnId,
+ type: datas[_self.data.curIndex].configColumnType,
name: datas[_self.data.curIndex].configColumnName,
- list: res.data
+ mode: datas[_self.data.curIndex].configTableMode,
+ list: res.data.slice(0, datas[_self.data.curIndex].configColumnRowCount)
}
_self.data.dataList.push(tempItem)
}
@@ -246,14 +254,16 @@ Page({
case '4': //视频
var items = iem.value.split(',')
var tempList = []
- items.forEach(item => {
+ for (var i = 0; i < items.length; i++) {
+ var ss = items[i].split('&')
+ var videoUrl = app.urls.baseImgUrl + ss[0]
+ var imgUrl = app.urls.baseImgUrl + ss[1]
var tempItem = {
- id: item,
- path: app.urls.baseImgUrl + item,
- imgPath: '/images/ic_temp.png'
+ path: videoUrl,
+ imgPath: imgUrl
}
tempList.push(tempItem)
- })
+ }
iem.valueList = tempList
break
case '6':
@@ -381,7 +391,6 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
- console.log(res)
var self = this
wx.showShareMenu({
withShareTicket: true,
@@ -396,9 +405,11 @@ Page({
var param = '/pages/sharePage/sharePage?cardTemplateDispatchId=' + postId;
return {
- title: '我的名片',
- path: param
+ title: '名片分享',
+ path: param,
+ imageUrl: self.data.shareImgUrl
}
+ // return返回 title 转发标题 path 路径 imageUrl 自定义图片,可以本地路径 代码包文件路径 支持png jpg 显示长宽比5:4
}
},
//获取浏览当前名片的用户头像列表
@@ -625,9 +636,49 @@ Page({
innerAudioContext.seek(e.detail.value)
}
},
+ //将分享的Base64图片保存至本地
+ toSaveLocalImg(data) {
+ var base64 = data
+ var imgPath = wx.env.USER_DATA_PATH + '/index' + 'share.png'
+ var imageData = base64.replace(/^data:image\/\w+;base64,/, "");
+ var fs = wx.getFileSystemManager();
+ fs.writeFileSync(imgPath, imageData, "base64");
+ this.setData({
+ shareImgUrl: imgPath
+ })
+ },
goHome() {
wx.switchTab({
url: '/pages/index/index',
})
+ },
+ //显示详情
+ showDetail(e) {
+ var type = e.currentTarget.dataset.ctype //需要跳详情
+ if (type.indexOf('dda5007c-5fb7-48f2-8537-3cb8ea298242') != -1) {
+ //需要跳详情
+ var cId = e.currentTarget.dataset.cid
+ var uId = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '../moments/momentsdetail/momentsdetail?uId=' + uId + '&cId=' + cId,
+ })
+ }
+ },
+ //显示更多栏目数据
+ showMore(e) {
+ var item = e.currentTarget.dataset.item
+ if (item.mode == '2') {
+ var userid = e.currentTarget.dataset.userid
+ var idx = e.currentTarget.dataset.idx
+ wx.navigateTo({
+ url: '../../pages/moments/showlist/showlist?id=' + item.cId + '&userId=' + userid + '&index=' + idx
+ })
+ }
+ },
+ //tabbar切换
+ onChange(e) {
+ this.setData({
+ active: e.detail
+ })
}
})
\ No newline at end of file
diff --git a/pages/sharePage/sharePage.wxml b/pages/sharePage/sharePage.wxml
index ced6848..b0a4c18 100644
--- a/pages/sharePage/sharePage.wxml
+++ b/pages/sharePage/sharePage.wxml
@@ -1,291 +1,310 @@
-
- {{nameTxt}}
-
-
-
-
-
-
+
+ {{nameTxt}}
+
+
+
+
+
-
-
-
- {{item.templateAreaFontValue}}
-
-
-
-
-
-
-
-
-
-
-
-
- 加入卡包
-
-
-
- 名片码
-
-
-
-
-
-
- 电话
- {{phoneTxt}}
-
-
-
-
-
- 微信
- {{wechateTxt}}
-
-
-
-
-
- 邮箱
- {{emailTxt}}
-
-
-
-
-
- 地址
- {{addressTxt}}
+
+
+
+
+ {{item.templateAreaFontValue}}
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+ 加入卡包
+
+
+
+ 名片码
-
-
-
- {{cardInfo.cardTemplateUseScansNumber >999? '999+' :
- cardInfo.cardTemplateUseScansNumber}}
+
+
+
+
+ 电话
+ {{phoneTxt}}
+
-
-
- {{cardInfo.cardTemplateUseDispatchNumber>999 ?
- '999+':cardInfo.cardTemplateUseDispatchNumber}}
+
+
+
+ 微信
+ {{wechateTxt}}
+
+
+
+
+
+ 邮箱
+ {{emailTxt}}
+
+
+
+
+
+ 地址
+ {{addressTxt}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{cardInfo.cardTemplateUseScansNumber >999? '999+' :
+ cardInfo.cardTemplateUseScansNumber}}
+
+
+
+ {{cardInfo.cardTemplateUseDispatchNumber>999 ?
+ '999+':cardInfo.cardTemplateUseDispatchNumber}}
+
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+ 更多
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{child.value}}
+
+
+
+
+
+
+
+
+
+
+ {{child.value}}
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {{audio.curDurationStr}}
-
- {{audio.totalDurationStr}}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{audio.curDurationStr}}
+
+ {{audio.totalDurationStr}}
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {{child.value}}
+
+
+
+
+
+ {{child.value}}
+
-
-
-
-
+
+
+
+
+
+ {{child.comment}}:{{child.selValue}}
+
+
+
+
+
+
- {{child.comment}}:{{child.selValue}}
+ {{child.comment}}
+
+
+
+
+ {{ss.dataName}}
-
-
-
-
- {{child.comment}}
-
-
-
-
- {{ss.dataName}}
-
-
-
+ 详情 >
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+ 一段话
+
+
+ 有可能还会与其他内容重叠。元素的背景会延伸穿过内边距。不允许指定负边距值。
+
+
-
-
- 一段话
-
-
- 有可能还会与其他内容重叠。元素的背景会延伸穿过内边距。不允许指定负边距值。
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+ 首页
+ 服务
+
+
\ No newline at end of file
diff --git a/pages/sharePage/sharePage.wxss b/pages/sharePage/sharePage.wxss
index 4ab38f4..094b5e7 100644
--- a/pages/sharePage/sharePage.wxss
+++ b/pages/sharePage/sharePage.wxss
@@ -85,6 +85,12 @@ page {
}
.column-box {
+ display: flex;
+ flex-direction: column;
+ background-color: #fff;
+ width: 100%;
+}
+.column-content {
display: flex;
flex-direction: column;
padding: 10rpx 20rpx 40rpx;
@@ -94,7 +100,6 @@ page {
box-shadow: 0px 2px 2px #f0f0f0;
z-index: 2;
}
-
.intro-title image {
width: 28rpx;
height: 30rpx;
diff --git a/utils/api.js b/utils/api.js
index 5f0793e..e9448dd 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -56,6 +56,9 @@ var apis = {
getMomentsContent: `app/configcolumndata/get/{configColumnId}/{uid}`, //获取栏目数据
getMainColumn: `app/configcolumn/listhome`, //获取首页显示栏目
getMainMoment: `app/configcolumndata/list/{configColumnId}`, //获取首页栏目数据 通过栏目ID获取栏目下的数据列表(包含每条数据的字段集合) 传入userId参数则查询指定人的 , 没传入userId参数则查询当前token的
+ getMineColumnList: `app/configcolumnset/list`, //获取我的栏目配置列表
+ doSaveColumnDisplay: `app/configcolumnset/savedisplay`, //保存我的栏目隐藏显示
+ doSaveColumnName: `app/configcolumnset/savename`, //保存我的栏目名称
//名片信息
getCardList: `app/cardtemplate/list`, //获取名片列表
@@ -76,7 +79,7 @@ var apis = {
setTop: `app/cardtemplateusebag/updatetop/{cardTemplateUseBagId}/{cardTemplateUseTop}`, // 名片置顶
getCardUseId: `app/cardtemplatedispatch/get/{cardTemplateDispatchId}`, //获取名片id
getBrowseHistoryList: `app/cardtemplatescans/listpage/1`, //获取浏览历史
- getCardBrowUserList:`app/cardtemplatescans/listhome`,//需要传递page rows cardTemplateUseId
+ getCardBrowUserList: `app/cardtemplatescans/listhome`, //需要传递page rows cardTemplateUseId
}
module.exports = {
diff --git a/utils/request.js b/utils/request.js
index ded8877..7da2ca1 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -107,7 +107,7 @@ function doAjax(url, method, args) {
} else {
errorback(res)
var hintMsg = '网络错误'
- if (res.data.msg) {
+ if (err.data && res.data.msg) {
hintMsg = res.data.msg
}
wx.showToast({
@@ -120,7 +120,7 @@ function doAjax(url, method, args) {
wx.hideLoading({})
errorback(err)
var hintMsg = '网络错误'
- if (err.data.msg) {
+ if (err.data && err.data.msg) {
hintMsg = err.data.msg
}
wx.showToast({