|
@@ -1,6 +1,5 @@
|
|
<template>
|
|
<template>
|
|
<view class="content">
|
|
<view class="content">
|
|
-
|
|
|
|
<u-navbar title="电子名片" placeholder>
|
|
<u-navbar title="电子名片" placeholder>
|
|
<view class="u-nav-slot relative" slot="left">
|
|
<view class="u-nav-slot relative" slot="left">
|
|
<u-icon name="bell" size="26" @click="toNotice"></u-icon>
|
|
<u-icon name="bell" size="26" @click="toNotice"></u-icon>
|
|
@@ -36,66 +35,67 @@
|
|
title
|
|
title
|
|
:loading='loading'
|
|
:loading='loading'
|
|
></u-skeleton> -->
|
|
></u-skeleton> -->
|
|
- <view v-if='islongPress'>
|
|
|
|
- <view @click="del">删除</view>
|
|
|
|
- <view @click='islongPress=false'>取消</view>
|
|
|
|
- <u-checkbox-group placement="column"
|
|
|
|
- @change="checkboxChange($event,'')">
|
|
|
|
- <u-checkbox :checked='checked' name='全部' :customStyle="{marginBottom: '8px'}">
|
|
|
|
- </u-checkbox>
|
|
|
|
- </u-checkbox-group>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <mescroll-body v-if='cardHolderList' :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
|
|
|
|
- <view v-for='(item,index) in cardHolderList' @longpress="longpress" class="content3 flex">
|
|
|
|
- <view class="left">
|
|
|
|
- <view class="top flex-row-center">
|
|
|
|
- <image :src="item.headSculpture" mode="widthFix" class="img"></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom flex flex-evenly">
|
|
|
|
- <uni-icons @click="toHome(item)" type="home" size="20"></uni-icons>
|
|
|
|
- <text @click='switchType(item)'>{{item.classify?item.classifyName:'默'}}</text>
|
|
|
|
- <uni-icons @click='share(item)' type="redo" size="20" color=''></uni-icons>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="right">
|
|
|
|
- <view class="row1 flex">
|
|
|
|
- <text>{{item.name}}</text>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <text>{{item.post}}</text>
|
|
|
|
- <u-checkbox-group v-if='islongPress' placement="column"
|
|
|
|
- @change="checkboxChange($event,index)">
|
|
|
|
- <u-checkbox :name='index+1' :checked='item.checked' :customStyle="{marginBottom: '8px'}">
|
|
|
|
- </u-checkbox>
|
|
|
|
- </u-checkbox-group>
|
|
|
|
- </view>
|
|
|
|
- <view class="row2">
|
|
|
|
- {{item.companyName}}
|
|
|
|
- </view>
|
|
|
|
- <view class="row3" @click="toMap(item)">
|
|
|
|
- <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
- <text>{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="row3">
|
|
|
|
- <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
- <text>{{item.phone}}</text>
|
|
|
|
|
|
+ <view v-if='islongPress'>
|
|
|
|
+ <view @click="del">删除</view>
|
|
|
|
+ <view @click='islongPress=false'>取消</view>
|
|
|
|
+ <u-checkbox-group placement="column" @change="checkboxChange($event,'')">
|
|
|
|
+ <u-checkbox :checked='checked' name='全部' :customStyle="{marginBottom: '8px'}">
|
|
|
|
+ </u-checkbox>
|
|
|
|
+ </u-checkbox-group>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <mescroll-body v-if='cardHolderList' :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback"
|
|
|
|
+ @down="downCallback">
|
|
|
|
+ <view v-for='(item,index) in cardHolderList' @longpress="longpress" class="content3 flex">
|
|
|
|
+ <view class="left">
|
|
|
|
+ <view class="top flex-row-center">
|
|
|
|
+ <image :src="item.headSculpture" mode="widthFix" class="img"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="bottom flex flex-evenly">
|
|
|
|
+ <uni-icons @click="toHome(item)" type="home" size="20"></uni-icons>
|
|
|
|
+ <text @click='switchType(item)'>{{item.classify?item.classifyName:'默'}}</text>
|
|
|
|
+ <uni-icons @click='share(item)' type="redo" size="20" color=''></uni-icons>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view @click='remarkEdit(item)' class="row3">
|
|
|
|
- <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
- <text >{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
|
|
|
+ <view class="right">
|
|
|
|
+ <view class="row1 flex">
|
|
|
|
+ <text>{{item.name}}</text>
|
|
|
|
+ <text class="line"></text>
|
|
|
|
+ <text>{{item.post}}</text>
|
|
|
|
+ <u-checkbox-group v-if='islongPress' placement="column" @change="checkboxChange($event,index)">
|
|
|
|
+ <u-checkbox :name='index+1' :checked='item.checked' :customStyle="{marginBottom: '8px'}">
|
|
|
|
+ </u-checkbox>
|
|
|
|
+ </u-checkbox-group>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="row2">
|
|
|
|
+ {{item.companyName}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="row3" @click="toMap(item)">
|
|
|
|
+ <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
+ <text>{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="row3">
|
|
|
|
+ <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
+ <text>{{item.phone}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view @click='remarkEdit(item)' class="row3">
|
|
|
|
+ <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
+ <text>{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
</mescroll-body>
|
|
</mescroll-body>
|
|
<u-picker :show="isShowType" :columns="typeColumns" keyName="circleName" title="选择分类" @close="isShowType=false"
|
|
<u-picker :show="isShowType" :columns="typeColumns" keyName="circleName" title="选择分类" @close="isShowType=false"
|
|
@cancel="isShowType=false" closeOnClickOverlay @confirm="typeConfirm"></u-picker>
|
|
@cancel="isShowType=false" closeOnClickOverlay @confirm="typeConfirm"></u-picker>
|
|
<lyuan-tx-asr ref="asr" :uploadMethod="uploadFile" @change="asrChange" @fileChange="fileChange" appId=""
|
|
<lyuan-tx-asr ref="asr" :uploadMethod="uploadFile" @change="asrChange" @fileChange="fileChange" appId=""
|
|
secretId="" secretKey=""></lyuan-tx-asr>
|
|
secretId="" secretKey=""></lyuan-tx-asr>
|
|
<u-toast ref="uToast"></u-toast>
|
|
<u-toast ref="uToast"></u-toast>
|
|
- <u-modal :show="delShow" title="提示" showCancelButton='true' @cancel="delShow=false" @confirm="delConfirm" :content='"已选中"+this.checkedList.length+"张名片,确定删除?"'></u-modal>
|
|
|
|
- <u-modal :show="modalShow" @confirm='remarkConfirm' :confirmColor="remark?'#2979ff':'#ccc'" showCancelButton='true' title="备注" >
|
|
|
|
|
|
+ <u-modal :show="delShow" title="提示" showCancelButton='true' @cancel="delShow=false" @confirm="delConfirm"
|
|
|
|
+ :content='"已选中"+this.checkedList.length+"张名片,确定删除?"'></u-modal>
|
|
|
|
+ <u-modal :show="modalShow" @confirm='remarkConfirm' :confirmColor="remark?'#2979ff':'#ccc'"
|
|
|
|
+ showCancelButton='true' title="备注">
|
|
<view class="slot-content">
|
|
<view class="slot-content">
|
|
- <u--textarea v-model="remark" placeholder="输入备注,不超过150个字" ></u--textarea>
|
|
|
|
|
|
+ <u--textarea v-model="remark" placeholder="输入备注,不超过150个字"></u--textarea>
|
|
</view>
|
|
</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
<view v-if='qrcodeShow' class="shade">
|
|
<view v-if='qrcodeShow' class="shade">
|
|
@@ -105,7 +105,7 @@
|
|
</view>
|
|
</view>
|
|
<image :src="currectData.qrCode" mode=""></image>
|
|
<image :src="currectData.qrCode" mode=""></image>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<u-popup :show="popupshow" mode="bottom">
|
|
<u-popup :show="popupshow" mode="bottom">
|
|
<view>
|
|
<view>
|
|
@@ -113,7 +113,7 @@
|
|
<text>分享到</text>
|
|
<text>分享到</text>
|
|
</view>
|
|
</view>
|
|
<view class="content">
|
|
<view class="content">
|
|
-
|
|
|
|
|
|
+
|
|
<view class="block" @click="toUrl()">
|
|
<view class="block" @click="toUrl()">
|
|
<button class="moment">
|
|
<button class="moment">
|
|
<text class="iconfont icon-weixin"></text>
|
|
<text class="iconfont icon-weixin"></text>
|
|
@@ -122,12 +122,7 @@
|
|
</button>
|
|
</button>
|
|
</view>
|
|
</view>
|
|
<view class="block">
|
|
<view class="block">
|
|
- <button class="wechat" open-type="share">
|
|
|
|
- <text class="iconfont icon-pengyouquan"></text>
|
|
|
|
- <!-- <image src="/static/img/wechat.png" mode="aspectFill"></image> -->
|
|
|
|
- <button class="shareBtn" type="default" data-name="shareBtn">
|
|
|
|
- 分享给微信好友</button>
|
|
|
|
- </button>
|
|
|
|
|
|
+ <button class="shareBtn" type="default" data-name="shareBtn" open-type="share"> 分享</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="cancel" @click.stop="handleHiddenShare">
|
|
<view class="cancel" @click.stop="handleHiddenShare">
|
|
@@ -135,33 +130,43 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
+ <!-- <image :src="poster" style="width: 750rpx;height: 1334rpx;"></image> -->
|
|
|
|
+ <!-- 生成图片 -->
|
|
|
|
+ <poster v-if="list.length" :list="list" background-color="#FFF"
|
|
|
|
+ @on-success="posterSuccess" ref="poster" @on-error="posterError"></poster>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import Poster from '../../components/zhangyuhao-poster/Poster.vue'
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
export default {
|
|
export default {
|
|
mixins: [MescrollMixin],
|
|
mixins: [MescrollMixin],
|
|
|
|
+ components: {
|
|
|
|
+ Poster
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ poster: '',
|
|
|
|
+ canvasData: [],
|
|
searchVal: '',
|
|
searchVal: '',
|
|
isShowType: false,
|
|
isShowType: false,
|
|
- loading:true,
|
|
|
|
|
|
+ loading: true,
|
|
typeName: '',
|
|
typeName: '',
|
|
typeColumns: [],
|
|
typeColumns: [],
|
|
- cardHolderList:[],
|
|
|
|
- currectData:[],
|
|
|
|
- type:1,
|
|
|
|
- popupshow:false,
|
|
|
|
- modalShow:false,
|
|
|
|
- remark:'',
|
|
|
|
|
|
+ cardHolderList: [],
|
|
|
|
+ currectData: [],
|
|
|
|
+ type: 1,
|
|
|
|
+ popupshow: false,
|
|
|
|
+ modalShow: false,
|
|
|
|
+ remark: '',
|
|
islongPress: false,
|
|
islongPress: false,
|
|
- checked:false,
|
|
|
|
- checkedList:[],
|
|
|
|
- delShow:false,
|
|
|
|
- qrcodeShow:false,
|
|
|
|
- unread:0,
|
|
|
|
- noticeList:[],
|
|
|
|
|
|
+ checked: false,
|
|
|
|
+ checkedList: [],
|
|
|
|
+ delShow: false,
|
|
|
|
+ qrcodeShow: false,
|
|
|
|
+ unread: 0,
|
|
|
|
+ noticeList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -173,55 +178,97 @@
|
|
}
|
|
}
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ onLoad: function() {
|
|
|
|
+ wx.showShareMenu({
|
|
|
|
+ withShareTicket: true,
|
|
|
|
+ menus: ["shareAppMessage", "shareTimeline"]
|
|
|
|
+ })
|
|
|
|
+ },
|
|
onShareAppMessage(res) {
|
|
onShareAppMessage(res) {
|
|
- debugger
|
|
|
|
|
|
+ console.log(1111)
|
|
let that = this;
|
|
let that = this;
|
|
- let imageUrl = that.shareUrl || '';
|
|
|
|
|
|
+ //生成名片图片
|
|
|
|
+ let imageUrl = this.poster
|
|
|
|
+ console.log("imageUrl",imageUrl)
|
|
if (res.from === 'button') {
|
|
if (res.from === 'button') {
|
|
- //这块需要传参,不然链接地址进去获取不到数据
|
|
|
|
- let path = `/` + that.$scope.route + `?item=` + that.$scope.options.item;
|
|
|
|
|
|
+ let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
|
|
return {
|
|
return {
|
|
- title: '名片夹',
|
|
|
|
|
|
+ title: `${that.currectData.name}分享的名片~`,
|
|
path: path,
|
|
path: path,
|
|
|
|
+ imageUrl: imageUrl,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ if (res.from === 'menu') {
|
|
|
|
+ return {
|
|
|
|
+ title: '商通线上商城',
|
|
|
|
+ path: '/pages/tabBarPro/index/index',
|
|
imageUrl: imageUrl
|
|
imageUrl: imageUrl
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- // if (res.from === 'menu') {
|
|
|
|
- // return {
|
|
|
|
- // title: '商通线上商城',
|
|
|
|
- // path: '/pages/tabBarPro/index/index',
|
|
|
|
- // imageUrl: imageUrl
|
|
|
|
- // };
|
|
|
|
- // }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 分享到朋友圈
|
|
|
|
+ onShareTimeline() {
|
|
|
|
+ return {
|
|
|
|
+ title: '商通线上商城',
|
|
|
|
+ path: '/pages/index/index',
|
|
|
|
+ imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg'
|
|
|
|
+ };
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- toHome(item){
|
|
|
|
|
|
+ posterError(err) {
|
|
|
|
+ console.log(err)
|
|
|
|
+ },
|
|
|
|
+ posterSuccess(url) {
|
|
|
|
+ // 生成成功,会把临时路径在这里返回
|
|
|
|
+ this.poster = url;
|
|
|
|
+ console.log(url)
|
|
|
|
+ },
|
|
|
|
+ toHome(item) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: "/pages/mySet/myHome?id="+item.personalHomeId
|
|
|
|
|
|
+ url: "/pages/mySet/myHome?id=" + item.personalHomeId
|
|
})
|
|
})
|
|
},
|
|
},
|
|
delSearchVal() {
|
|
delSearchVal() {
|
|
this.searchVal = ""
|
|
this.searchVal = ""
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
},
|
|
},
|
|
- toUrl(){
|
|
|
|
|
|
+ toUrl() {
|
|
console.log(this.currectData)
|
|
console.log(this.currectData)
|
|
- this.popupshow=false
|
|
|
|
- this.qrcodeShow=true
|
|
|
|
|
|
+ this.popupshow = false
|
|
|
|
+ this.qrcodeShow = true
|
|
},
|
|
},
|
|
- share(item){
|
|
|
|
- this.currectData=item
|
|
|
|
- this.popupshow=true
|
|
|
|
|
|
+ share(item) {
|
|
|
|
+ this.currectData = item
|
|
|
|
+ this.canvasData = [{
|
|
|
|
+ type: 'image',
|
|
|
|
+ path: item.currentBackground,
|
|
|
|
+ x: 0,
|
|
|
|
+ y: 0,
|
|
|
|
+ width: 750,
|
|
|
|
+ height: 424
|
|
|
|
+ },{
|
|
|
|
+ type: 'text',
|
|
|
|
+ text:item.name,
|
|
|
|
+ x: 0,
|
|
|
|
+ y: 0,
|
|
|
|
+ size:13
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ ]
|
|
|
|
+ this.popupshow = true
|
|
},
|
|
},
|
|
- async delConfirm(){
|
|
|
|
|
|
+ async delConfirm() {
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '数据加载中',
|
|
title: '数据加载中',
|
|
- mask:true
|
|
|
|
|
|
+ mask: true
|
|
})
|
|
})
|
|
-
|
|
|
|
- for(var i=0;i<this.checkedList.length;i++){
|
|
|
|
- await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'delete',{
|
|
|
|
- id:this.checkedList[i].data.id,
|
|
|
|
|
|
+
|
|
|
|
+ for (var i = 0; i < this.checkedList.length; i++) {
|
|
|
|
+ await this.$request.baseRequest('admin.unimall.cardHolderInfo', 'delete', {
|
|
|
|
+ id: this.checkedList[i].data.id,
|
|
}, failres => {
|
|
}, failres => {
|
|
console.log('res+++++', failres.errmsg)
|
|
console.log('res+++++', failres.errmsg)
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
@@ -229,55 +276,63 @@
|
|
message: failres.errmsg,
|
|
message: failres.errmsg,
|
|
})
|
|
})
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- console.log(i,this.checkedList.length-1)
|
|
|
|
- if(i==this.checkedList.length-1){
|
|
|
|
|
|
+ console.log(i, this.checkedList.length - 1)
|
|
|
|
+ if (i == this.checkedList.length - 1) {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '删除成功',
|
|
message: '删除成功',
|
|
})
|
|
})
|
|
- this.delShow=false
|
|
|
|
- this.islongPress=false
|
|
|
|
|
|
+ this.delShow = false
|
|
|
|
+ this.islongPress = false
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- del(){
|
|
|
|
- this.delShow=true
|
|
|
|
|
|
+ del() {
|
|
|
|
+ this.delShow = true
|
|
},
|
|
},
|
|
-
|
|
|
|
- longpress(){
|
|
|
|
- console.log("长按事件",1111111111);
|
|
|
|
- this.islongPress = true;
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ longpress() {
|
|
|
|
+ console.log("长按事件", 1111111111);
|
|
|
|
+ this.islongPress = true;
|
|
|
|
+
|
|
},
|
|
},
|
|
checkboxChange(e, i) {
|
|
checkboxChange(e, i) {
|
|
- console.log(e,i,111111111)
|
|
|
|
- if(i===''){
|
|
|
|
|
|
+ console.log(e, i, 111111111)
|
|
|
|
+ if (i === '') {
|
|
console.log(this.checked)
|
|
console.log(this.checked)
|
|
this.checked = !this.checked;
|
|
this.checked = !this.checked;
|
|
this.cardHolderList.map(item => item.checked = this.checked);
|
|
this.cardHolderList.map(item => item.checked = this.checked);
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
var checkList = this.cardHolderList.filter((item) => {
|
|
var checkList = this.cardHolderList.filter((item) => {
|
|
- return item.checked == true
|
|
|
|
- })
|
|
|
|
- var data=checkList.map((item,index) => {return {index:index,data:item}})
|
|
|
|
|
|
+ return item.checked == true
|
|
|
|
+ })
|
|
|
|
+ var data = checkList.map((item, index) => {
|
|
|
|
+ return {
|
|
|
|
+ index: index,
|
|
|
|
+ data: item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.checkedList = JSON.parse(JSON.stringify(data))
|
|
this.checkedList = JSON.parse(JSON.stringify(data))
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
if (e[0]) {
|
|
if (e[0]) {
|
|
- this.checkedList.push({index:i,data:this.cardHolderList[i]})
|
|
|
|
|
|
+ this.checkedList.push({
|
|
|
|
+ index: i,
|
|
|
|
+ data: this.cardHolderList[i]
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
var index = this.checkedList.findIndex((item) => {
|
|
var index = this.checkedList.findIndex((item) => {
|
|
return item.index == i
|
|
return item.index == i
|
|
})
|
|
})
|
|
this.checkedList.splice(index, 1)
|
|
this.checkedList.splice(index, 1)
|
|
}
|
|
}
|
|
- if(this.checkedList.length!=this.cardHolderList.length){
|
|
|
|
- this.checked=false
|
|
|
|
|
|
+ if (this.checkedList.length != this.cardHolderList.length) {
|
|
|
|
+ this.checked = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// for(var i=0;i<this.cardList.length;i++){
|
|
// for(var i=0;i<this.cardList.length;i++){
|
|
// console.log(this.cardList[i].checked)
|
|
// console.log(this.cardList[i].checked)
|
|
// // if(this.cardList[i].checkedList.length>0){
|
|
// // if(this.cardList[i].checkedList.length>0){
|
|
@@ -286,11 +341,11 @@
|
|
// }
|
|
// }
|
|
console.log(this.checkedList)
|
|
console.log(this.checkedList)
|
|
},
|
|
},
|
|
- remarkConfirm(){
|
|
|
|
- if(this.remark){
|
|
|
|
- this.currectData.remark=this.remark
|
|
|
|
- this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update',{
|
|
|
|
- cardHolderInfo:JSON.stringify(this.currectData),
|
|
|
|
|
|
+ remarkConfirm() {
|
|
|
|
+ if (this.remark) {
|
|
|
|
+ this.currectData.remark = this.remark
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update', {
|
|
|
|
+ cardHolderInfo: JSON.stringify(this.currectData),
|
|
}, failres => {
|
|
}, failres => {
|
|
console.log('res+++++', failres.errmsg)
|
|
console.log('res+++++', failres.errmsg)
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
@@ -302,25 +357,25 @@
|
|
type: 'success',
|
|
type: 'success',
|
|
message: '修改备注成功',
|
|
message: '修改备注成功',
|
|
})
|
|
})
|
|
- this.modalShow=false
|
|
|
|
|
|
+ this.modalShow = false
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- remarkEdit(item){
|
|
|
|
- this.currectData=item
|
|
|
|
- this.modalShow=true
|
|
|
|
|
|
+ remarkEdit(item) {
|
|
|
|
+ this.currectData = item
|
|
|
|
+ this.modalShow = true
|
|
},
|
|
},
|
|
- switchType(item){
|
|
|
|
- this.type=2
|
|
|
|
- this.currectData=item
|
|
|
|
- this.isShowType=true
|
|
|
|
|
|
+ switchType(item) {
|
|
|
|
+ this.type = 2
|
|
|
|
+ this.currectData = item
|
|
|
|
+ this.isShowType = true
|
|
},
|
|
},
|
|
- typeConfirm(e){
|
|
|
|
- if(this.type==2){
|
|
|
|
- this.currectData.classify=e.value[0].circleName
|
|
|
|
- this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update',{
|
|
|
|
- cardHolderInfo:JSON.stringify(this.currectData),
|
|
|
|
|
|
+ typeConfirm(e) {
|
|
|
|
+ if (this.type == 2) {
|
|
|
|
+ this.currectData.classify = e.value[0].circleName
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'update', {
|
|
|
|
+ cardHolderInfo: JSON.stringify(this.currectData),
|
|
}, failres => {
|
|
}, failres => {
|
|
console.log('res+++++', failres.errmsg)
|
|
console.log('res+++++', failres.errmsg)
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
@@ -334,17 +389,17 @@
|
|
})
|
|
})
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.typeName = e.value[0].circleName
|
|
this.typeName = e.value[0].circleName
|
|
}
|
|
}
|
|
this.isShowType = false
|
|
this.isShowType = false
|
|
},
|
|
},
|
|
- init(){
|
|
|
|
|
|
+ init() {
|
|
this.getList()
|
|
this.getList()
|
|
- this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list',{
|
|
|
|
- page:1,
|
|
|
|
- limit:9999,
|
|
|
|
- commonId:uni.getStorageSync("userInfo").id
|
|
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list', {
|
|
|
|
+ page: 1,
|
|
|
|
+ limit: 9999,
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id
|
|
}, failres => {
|
|
}, failres => {
|
|
console.log('res+++++', failres.errmsg)
|
|
console.log('res+++++', failres.errmsg)
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
@@ -352,39 +407,41 @@
|
|
message: failres.errmsg,
|
|
message: failres.errmsg,
|
|
})
|
|
})
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- this.typeColumns=[res.data.items]
|
|
|
|
|
|
+ this.typeColumns = [res.data.items]
|
|
this.mescroll.resetUpScroll()
|
|
this.mescroll.resetUpScroll()
|
|
console.log(this.typeColumns)
|
|
console.log(this.typeColumns)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getList(){
|
|
|
|
- this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list',{
|
|
|
|
- receiveId:uni.getStorageSync("userInfo").id,
|
|
|
|
- }, failres => {
|
|
|
|
- console.log('res+++++', failres.errmsg)
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: failres.errmsg,
|
|
|
|
- })
|
|
|
|
- }).then(res => {
|
|
|
|
- this.noticeList=res.data.items
|
|
|
|
- if(this.noticeList.length>0){
|
|
|
|
- var data=this.noticeList.filter((item)=>{return item.newsFlag==0})
|
|
|
|
- this.unread=data?data.length:0
|
|
|
|
- }
|
|
|
|
- console.log(this.unread)
|
|
|
|
|
|
+ getList() {
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
|
|
|
|
+ receiveId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
})
|
|
})
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.noticeList = res.data.items
|
|
|
|
+ if (this.noticeList.length > 0) {
|
|
|
|
+ var data = this.noticeList.filter((item) => {
|
|
|
|
+ return item.newsFlag == 0
|
|
|
|
+ })
|
|
|
|
+ this.unread = data ? data.length : 0
|
|
|
|
+ }
|
|
|
|
+ console.log(this.unread)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- upCallback(page){
|
|
|
|
|
|
+ upCallback(page) {
|
|
var that = this
|
|
var that = this
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
- title: '数据加载中'
|
|
|
|
- })
|
|
|
|
- this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list',{
|
|
|
|
- page:page.num,
|
|
|
|
- limit:page.size,
|
|
|
|
- commonId:uni.getStorageSync("userInfo").id,
|
|
|
|
- searchContent:this.searchVal
|
|
|
|
|
|
+ title: '数据加载中'
|
|
|
|
+ })
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
|
|
|
|
+ page: page.num,
|
|
|
|
+ limit: page.size,
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ searchContent: this.searchVal
|
|
}, failres => {
|
|
}, failres => {
|
|
console.log('res+++++', failres.errmsg)
|
|
console.log('res+++++', failres.errmsg)
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
@@ -394,17 +451,17 @@
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
}).then(res => {
|
|
}).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
- if(page.num == 1) this.cardHolderList = [];
|
|
|
|
|
|
+ if (page.num == 1) this.cardHolderList = [];
|
|
let curPageLen = res.data.items.length;
|
|
let curPageLen = res.data.items.length;
|
|
let totalPage = res.data.total;
|
|
let totalPage = res.data.total;
|
|
for (var i = 0; i < res.data.items.length; i++) {
|
|
for (var i = 0; i < res.data.items.length; i++) {
|
|
- res.data.items[i].checked=false
|
|
|
|
- if(res.data.items[i].classify){
|
|
|
|
- res.data.items[i].classifyName=res.data.items[i].classify[0]
|
|
|
|
|
|
+ res.data.items[i].checked = false
|
|
|
|
+ if (res.data.items[i].classify) {
|
|
|
|
+ res.data.items[i].classifyName = res.data.items[i].classify[0]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.cardHolderList=res.data.items
|
|
|
|
- this.loading=false
|
|
|
|
|
|
+ this.cardHolderList = res.data.items
|
|
|
|
+ this.loading = false
|
|
// if(res.data.items.length>0){
|
|
// if(res.data.items.length>0){
|
|
// for(var i=0;i<res.data.items.length;i++){
|
|
// for(var i=0;i<res.data.items.length;i++){
|
|
// res.data.items[i].name=res.data.items[i].circleName[0]
|
|
// res.data.items[i].name=res.data.items[i].circleName[0]
|
|
@@ -428,17 +485,17 @@
|
|
// this.cardTypeList=[{circleName:'默认分类',name:'默'}]
|
|
// this.cardTypeList=[{circleName:'默认分类',name:'默'}]
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
console.log(that)
|
|
console.log(that)
|
|
- // mescroll.endSuccess(data.result);
|
|
|
|
- that.mescroll.endBySize(curPageLen, totalPage)
|
|
|
|
|
|
+ // mescroll.endSuccess(data.result);
|
|
|
|
+ that.mescroll.endBySize(curPageLen, totalPage)
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
// if (res.errno == 200) {
|
|
// if (res.errno == 200) {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
-
|
|
|
|
|
|
+
|
|
// }
|
|
// }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -472,7 +529,7 @@
|
|
})
|
|
})
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
}).then(res1 => {
|
|
}).then(res1 => {
|
|
- uni.setStorageSync("userInfo",res1.data)
|
|
|
|
|
|
+ uni.setStorageSync("userInfo", res1.data)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -551,7 +608,7 @@
|
|
},
|
|
},
|
|
selectType() {
|
|
selectType() {
|
|
this.isShowType = true
|
|
this.isShowType = true
|
|
- this.type=1
|
|
|
|
|
|
+ this.type = 1
|
|
},
|
|
},
|
|
scan() {
|
|
scan() {
|
|
// console.log(1)
|
|
// console.log(1)
|
|
@@ -563,14 +620,14 @@
|
|
console.log('条码类型:' + res.scanType);
|
|
console.log('条码类型:' + res.scanType);
|
|
console.log('条码内容:' + res.result);
|
|
console.log('条码内容:' + res.result);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: "/pages/cardHolder/scanCodeAddCard?id="+res.result
|
|
|
|
|
|
+ url: "/pages/cardHolder/scanCodeAddCard?id=" + res.result
|
|
})
|
|
})
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
toMap(item) {
|
|
toMap(item) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: "/pages/cardHolder/map?location="+item.location
|
|
|
|
|
|
+ url: "/pages/cardHolder/map?location=" + item.location
|
|
})
|
|
})
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -592,6 +649,7 @@
|
|
|
|
|
|
.content1 {
|
|
.content1 {
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
|
+
|
|
.search {
|
|
.search {
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|
|
@@ -609,8 +667,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.content2 {
|
|
.content2 {
|
|
- .all-type {
|
|
|
|
- }
|
|
|
|
|
|
+ .all-type {}
|
|
}
|
|
}
|
|
|
|
|
|
.content3 {
|
|
.content3 {
|
|
@@ -623,15 +680,15 @@
|
|
width: 30%;
|
|
width: 30%;
|
|
|
|
|
|
.top {
|
|
.top {
|
|
-
|
|
|
|
|
|
+
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
.img {
|
|
.img {
|
|
width: 80%;
|
|
width: 80%;
|
|
}
|
|
}
|
|
|
|
|
|
- .bottom {
|
|
|
|
- }
|
|
|
|
|
|
+ .bottom {}
|
|
}
|
|
}
|
|
|
|
|
|
.right {
|
|
.right {
|
|
@@ -645,23 +702,26 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .slot-content{
|
|
|
|
- width:100%;
|
|
|
|
|
|
+
|
|
|
|
+ .slot-content {
|
|
|
|
+ width: 100%;
|
|
}
|
|
}
|
|
- .shade{
|
|
|
|
- background:rgba(0,0,0,0.2);
|
|
|
|
- width:100%;height:100vh;
|
|
|
|
- position:fixed;
|
|
|
|
- top:0;
|
|
|
|
- left:0;
|
|
|
|
|
|
+
|
|
|
|
+ .shade {
|
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100vh;
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
}
|
|
}
|
|
- .qrCode{
|
|
|
|
- position:absolute;
|
|
|
|
- top:50%;
|
|
|
|
- left:0;
|
|
|
|
- right:0;
|
|
|
|
|
|
+
|
|
|
|
+ .qrCode {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 0;
|
|
|
|
+ right: 0;
|
|
transform: translateY(-50%);
|
|
transform: translateY(-50%);
|
|
- text-align:center;
|
|
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|