|
@@ -1,5 +1,6 @@
|
|
<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>
|
|
@@ -27,33 +28,40 @@
|
|
<uni-icons type="bottom" size="20"></uni-icons>
|
|
<uni-icons type="bottom" size="20"></uni-icons>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="content3 flex">
|
|
|
|
|
|
+ <!-- <u-skeleton
|
|
|
|
+ :animate="true"
|
|
|
|
+ rows="3"
|
|
|
|
+ title
|
|
|
|
+ :loading='loading'
|
|
|
|
+ ></u-skeleton> -->
|
|
|
|
+ <mescroll-body v-if='cardHolderList' :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
|
|
|
|
+ <view v-for='item in cardHolderList' class="content3 flex">
|
|
<view class="left">
|
|
<view class="left">
|
|
<view class="top flex-row-center">
|
|
<view class="top flex-row-center">
|
|
- <image src="../../static/uni.png" mode="widthFix" class="img"></image>
|
|
|
|
|
|
+ <image :src="item.cardManagementInfo.headSculpture" mode="widthFix" class="img"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bottom flex flex-evenly">
|
|
<view class="bottom flex flex-evenly">
|
|
<uni-icons type="home" size="20"></uni-icons>
|
|
<uni-icons type="home" size="20"></uni-icons>
|
|
- <text>默</text>
|
|
|
|
- <uni-icons type="redo" size="20"></uni-icons>
|
|
|
|
|
|
+ <text @click='switchType(item)'>{{item.classify?item.classifyName:'默'}}</text>
|
|
|
|
+ <uni-icons type="redo" size="20"></uni-icons>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
<view class="right">
|
|
<view class="row1 flex">
|
|
<view class="row1 flex">
|
|
- <text>张三</text>
|
|
|
|
|
|
+ <text>{{item.cardManagementInfo.name}}</text>
|
|
<text class="line"></text>
|
|
<text class="line"></text>
|
|
- <text>总经理</text>
|
|
|
|
|
|
+ <text>{{item.cardManagementInfo.post}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="row2">
|
|
<view class="row2">
|
|
- 北京xxx有限公司
|
|
|
|
|
|
+ {{item.cardManagementInfo.companyName}}
|
|
</view>
|
|
</view>
|
|
<view class="row3" @click="toMap">
|
|
<view class="row3" @click="toMap">
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
- <text>北京市朝阳区幸福大街8号</text>
|
|
|
|
|
|
+ <text>{{item.cardManagementInfo.province}}{{item.cardManagementInfo.city}}{{item.cardManagementInfo.area}}{{item.cardManagementInfo.detailedAddress}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="row3">
|
|
<view class="row3">
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
- <text>13333333333</text>
|
|
|
|
|
|
+ <text>{{item.cardManagementInfo.phone}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="row3">
|
|
<view class="row3">
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
<uni-icons type="redo" size="20"></uni-icons>
|
|
@@ -61,7 +69,8 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <u-picker :show="isShowType" :columns="typeColumns" keyName="label" title="选择分类" @close="isShowType=false"
|
|
|
|
|
|
+ </mescroll-body>
|
|
|
|
+ <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>
|
|
@@ -70,26 +79,19 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
export default {
|
|
export default {
|
|
|
|
+ mixins: [MescrollMixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
searchVal: '',
|
|
searchVal: '',
|
|
isShowType: false,
|
|
isShowType: false,
|
|
|
|
+ loading:true,
|
|
typeName: '',
|
|
typeName: '',
|
|
- typeColumns: [
|
|
|
|
- [{
|
|
|
|
- label: '重要客户',
|
|
|
|
- id: 2021
|
|
|
|
- }, {
|
|
|
|
- label: '常用客户',
|
|
|
|
- id: 804
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: '次要客户',
|
|
|
|
- id: 804
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- ]
|
|
|
|
|
|
+ typeColumns: [],
|
|
|
|
+ cardHolderList:[],
|
|
|
|
+ currectData:[],
|
|
|
|
+ type:1
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -102,9 +104,115 @@
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- init(){
|
|
|
|
|
|
+ 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),
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.typeName = e.value[0].circleName
|
|
|
|
+ }
|
|
|
|
+ this.isShowType = false
|
|
|
|
+ },
|
|
|
|
+ init(){
|
|
|
|
+
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardClassifyInfo', 'list',{
|
|
|
|
+ page:1,
|
|
|
|
+ limit:9999,
|
|
|
|
+ commonId:uni.getStorageSync("userInfo").id
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.typeColumns=[res.data.items]
|
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
|
+ console.log(this.typeColumns)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ upCallback(page){
|
|
|
|
+ var that = this
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '数据加载中'
|
|
|
|
+ })
|
|
|
|
+ this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list',{
|
|
|
|
+ page:page.num,
|
|
|
|
+ limit:page.size,
|
|
|
|
+ commonId:uni.getStorageSync("userInfo").id
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: failres.errmsg,
|
|
|
|
+ })
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if(page.num == 1) this.cardHolderList = [];
|
|
|
|
+ let curPageLen = res.data.items.length;
|
|
|
|
+ let totalPage = res.data.total;
|
|
|
|
+ for (var i = 0; i < res.data.items.length; i++) {
|
|
|
|
+ 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
|
|
|
|
+ // if(res.data.items.length>0){
|
|
|
|
+ // for(var i=0;i<res.data.items.length;i++){
|
|
|
|
+ // res.data.items[i].name=res.data.items[i].circleName[0]
|
|
|
|
+ // }
|
|
|
|
+ // var itemIndex=res.data.items.findIndex((item)=>{return item.topMarking==1})
|
|
|
|
+
|
|
|
|
+ // if(itemIndex!=-1){
|
|
|
|
+ // var data=res.data.items.splice(itemIndex,1)
|
|
|
|
+ // if(page.num==1){
|
|
|
|
+ // data.push({circleName:'默认分类',name:'默'})
|
|
|
|
+ // }
|
|
|
|
+ // res.data.items=data.concat(res.data.items)
|
|
|
|
+ // }else{
|
|
|
|
+ // if(page.num==1){
|
|
|
|
+ // res.data.items=[{circleName:'默认分类',name:'默'}].concat(res.data.items)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // this.cardTypeList=this.cardTypeList.concat(res.data.items)
|
|
|
|
+ // }else{
|
|
|
|
+ // if(page.num==1){
|
|
|
|
+ // this.cardTypeList=[{circleName:'默认分类',name:'默'}]
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ console.log(that)
|
|
|
|
+ // mescroll.endSuccess(data.result);
|
|
|
|
+ that.mescroll.endBySize(curPageLen, totalPage)
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // if (res.errno == 200) {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
login() {
|
|
login() {
|
|
let that = this
|
|
let that = this
|
|
uni.login({
|
|
uni.login({
|
|
@@ -215,11 +323,6 @@
|
|
selectType() {
|
|
selectType() {
|
|
this.isShowType = true
|
|
this.isShowType = true
|
|
},
|
|
},
|
|
- typeConfirm(val) {
|
|
|
|
- console.log(val.value)
|
|
|
|
- this.typeName = val.value[0].label
|
|
|
|
- this.isShowType = false
|
|
|
|
- },
|
|
|
|
scan() {
|
|
scan() {
|
|
// console.log(1)
|
|
// console.log(1)
|
|
uni.scanCode({
|
|
uni.scanCode({
|