|
@@ -14,9 +14,10 @@
|
|
|
<uni-icons type="closeempty" size="24" @click.native.stop="delSearchVal"
|
|
|
v-if="searchVal"></uni-icons>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="right">
|
|
|
- <uni-icons type="closeempty" size="24" @click.native.stop="delVal" color="#9199af" v-if="searchVal"></uni-icons>
|
|
|
+ <uni-icons type="closeempty" size="24" @click.native.stop="delVal" color="#9199af"
|
|
|
+ v-if="searchVal"></uni-icons>
|
|
|
<uni-icons type="mic" size="24" @click.native.stop="micOpen" color="#9199af"></uni-icons>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -33,14 +34,12 @@
|
|
|
</view>
|
|
|
<view class="content3">
|
|
|
|
|
|
- <mescroll-body v-if='cardHolderList' :up="upOption" ref="mescrollRef" @init="mescrollInit" @up="upCallback"
|
|
|
- @down="downCallback">
|
|
|
+ <mescroll-body v-if='cardHolderList' :up="upOption" :down="downOption" ref="mescrollRef"
|
|
|
+ @init="mescrollInit" @up="upCallback" @down="downCallback">
|
|
|
<view v-for='(item,index) in cardHolderList' @longpress="longpress" class="item flex">
|
|
|
<!-- <view class="card-list-item" style="background:red"> -->
|
|
|
- <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-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 class="card-list-item"
|
|
@@ -66,7 +65,7 @@
|
|
|
<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
|
|
|
color="#5e6d82"></uni-icons>{{ item.phone }}
|
|
|
</view>
|
|
|
- <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
+ <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
|
|
|
<text>{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
</view>
|
|
@@ -89,7 +88,7 @@
|
|
|
<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
|
|
|
color="#5e6d82"></uni-icons>{{ item.phone }}
|
|
|
</view>
|
|
|
- <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
+ <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
|
|
|
<text>{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
</view>
|
|
@@ -127,7 +126,7 @@
|
|
|
<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
|
|
|
color="#5e6d82"></uni-icons>{{ item.phone }}
|
|
|
</view>
|
|
|
- <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
+ <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
|
|
|
<text>{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
</view>
|
|
@@ -161,7 +160,7 @@
|
|
|
<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
|
|
|
color="#5e6d82"></uni-icons>{{ item.phone }}
|
|
|
</view>
|
|
|
- <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
+ <view @click='remarkEdit(item)' class="row2" style="color: #808080">
|
|
|
<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
|
|
|
<text>{{item.remark?item.remark:'单击添加备注'}}</text>
|
|
|
</view>
|
|
@@ -231,7 +230,7 @@
|
|
|
<view class="right">
|
|
|
全选
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<u-picker :show="isShowType" :columns="typeColumns" keyName="circleName" title="选择分类" @close="isShowType=false"
|
|
|
@cancel="isShowType=false" closeOnClickOverlay @confirm="typeConfirm"></u-picker>
|
|
@@ -253,7 +252,8 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <u-popup :show="popupshow" :closeOnClickOverlay='true' :overlayOpacity='0.4' @close='handleHiddenShare' :round="10" mode="bottom">
|
|
|
+ <u-popup :show="popupshow" :closeOnClickOverlay='true' :overlayOpacity='0.4' @close='handleHiddenShare'
|
|
|
+ :round="10" mode="bottom">
|
|
|
<view>
|
|
|
<!-- <view class="share-to">
|
|
|
<text>分享到</text>
|
|
@@ -262,14 +262,16 @@
|
|
|
|
|
|
<view class="block" @click="toUrl()">
|
|
|
<button class="moment">
|
|
|
- <image style='width:108rpx;height:108rpx;' src="@/static/imgs/scancode.png" mode="aspectFill"></image>
|
|
|
+ <image style='width:108rpx;height:108rpx;' src="@/static/imgs/scancode.png"
|
|
|
+ mode="aspectFill"></image>
|
|
|
<view>扫码分享</view>
|
|
|
</button>
|
|
|
</view>
|
|
|
<view class="block">
|
|
|
- <button class="shareBtn" type="default" data-name="shareBtn" open-type="share">
|
|
|
- <image style='width:108rpx;height:108rpx;' src="@/static/imgs/shade.png" mode="aspectFill"></image>
|
|
|
- <view>分享微信好友</view>
|
|
|
+ <button class="shareBtn" type="default" data-name="shareBtn" open-type="share">
|
|
|
+ <image style='width:108rpx;height:108rpx;' src="@/static/imgs/shade.png" mode="aspectFill">
|
|
|
+ </image>
|
|
|
+ <view>分享微信好友</view>
|
|
|
</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -277,9 +279,19 @@
|
|
|
</u-popup>
|
|
|
<!-- <image :src="poster" style="width: 750rpx;height: 1334rpx;"></image> -->
|
|
|
<!-- 生成图片 -->
|
|
|
- <poster :data="canvasData" background-color="#FFF"
|
|
|
- :width='750' :height='420'
|
|
|
- @on-success="posterSuccess" ref="poster" @on-error="posterError"></poster>
|
|
|
+ <poster :data="canvasData" background-color="#FFF" :width='750' :height='420' @on-success="posterSuccess"
|
|
|
+ ref="poster" @on-error="posterError"></poster>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <u-popup :show="isPhone" @close="cancelClick" mode="center" :round="10">
|
|
|
+ <view class='sq-view'>
|
|
|
+ <view class="text">
|
|
|
+ 手机登录后才能查看名片哦~
|
|
|
+ </view>
|
|
|
+ <button class="confirm" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号</button>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <!-- #endif -->
|
|
|
+ <u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -293,6 +305,20 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ userInfo:{},
|
|
|
+ downOption: {
|
|
|
+ auto: false,
|
|
|
+ },
|
|
|
+ upOption: {
|
|
|
+ auto: false,
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ encryptedData: '',
|
|
|
+ session_key: '',
|
|
|
+ iv: '',
|
|
|
+ },
|
|
|
+ key:'',
|
|
|
+ isPhone: false,
|
|
|
canReset: false,
|
|
|
poster: '',
|
|
|
canvasData: {},
|
|
@@ -313,22 +339,24 @@
|
|
|
delShow: false,
|
|
|
qrcodeShow: false,
|
|
|
unread: 0,
|
|
|
- clicknum:0,
|
|
|
+ clicknum: 0,
|
|
|
noticeList: [],
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
- if (uni.getStorageSync("userInfo")) {
|
|
|
+ if (uni.getStorageSync("userInfo").phone) {
|
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
|
this.$nextTick(function() {
|
|
|
- this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页
|
|
|
- this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题
|
|
|
- this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
|
|
|
+ this.mescroll.resetUpScroll()
|
|
|
+ // this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页
|
|
|
+ // this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题
|
|
|
+ // this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
|
|
|
});
|
|
|
+ this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
|
} else {
|
|
|
this.login()
|
|
|
}
|
|
|
- this.searchVal = uni.getStorageSync("search_val") ? uni.getStorageSync("search_val") : ''
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
@@ -340,8 +368,8 @@
|
|
|
})
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
-
|
|
|
- console.log(res,this.popupshow)
|
|
|
+
|
|
|
+ console.log(res, this.popupshow)
|
|
|
let that = this;
|
|
|
//生成名片图片
|
|
|
let imageUrl = this.poster
|
|
@@ -349,16 +377,16 @@
|
|
|
if (res.from === 'button') {
|
|
|
let path = `/pages/cardHolder/scanCodeAddCard?id=${that.currectData.id}`
|
|
|
return {
|
|
|
- title: this.popupshow?`${that.currectData.name}分享的名片~`:'电子名片',
|
|
|
+ title: this.popupshow ? `${that.currectData.name}分享的名片~` : '电子名片',
|
|
|
path: path,
|
|
|
- imageUrl: this.popupshow?imageUrl:'',
|
|
|
+ imageUrl: this.popupshow ? imageUrl : '',
|
|
|
};
|
|
|
}
|
|
|
if (res.from === 'menu') {
|
|
|
return {
|
|
|
title: '商通线上商城',
|
|
|
path: '/pages/tabBarPro/index/index',
|
|
|
- imageUrl: this.popupshow?imageUrl:''
|
|
|
+ imageUrl: this.popupshow ? imageUrl : ''
|
|
|
};
|
|
|
}
|
|
|
},
|
|
@@ -371,24 +399,103 @@
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- delVal(){
|
|
|
- this.searchVal =""
|
|
|
+ getPhoneNumber(e) {
|
|
|
+ console.log(e)
|
|
|
+ if (e.mp.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
+ this.isPhone = false
|
|
|
+ this.params.iv = e.mp.detail.iv
|
|
|
+ this.params.encryptedData = e.mp.detail.encryptedData
|
|
|
+ this.params.session_key = this.accessToken
|
|
|
+ console.log(this.params)
|
|
|
+ let appId = 'wx5d8906c2208c899f'
|
|
|
+ let sessionKey = this.userInfo.sessionKey
|
|
|
+ let encryptedData = this.params.encryptedData
|
|
|
+ let iv = this.params.iv
|
|
|
+
|
|
|
+ let pc = this.$WXBizDataCrypt(appId, sessionKey)
|
|
|
+
|
|
|
+ let data = this.$WXBizDataCrypt.prototype.decryptData(encryptedData, iv, appId, sessionKey)
|
|
|
+
|
|
|
+ console.log('解密后 data: ', data)
|
|
|
+ this.getTokenAsync(data)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ async getTokenAsync(val) {
|
|
|
+ let that = this
|
|
|
+ uni.getUserInfo({
|
|
|
+ provider: 'weixin',
|
|
|
+ success: function(info) {
|
|
|
+ console.log("info", info)
|
|
|
+ that.userInfo.nickname = info.userInfo.nickName
|
|
|
+ that.userInfo.head = info.userInfo.avatarUrl
|
|
|
+ that.userInfo.phone = val.phoneNumber
|
|
|
+ that.$request.baseRequest('commonUserApp', 'edit', {
|
|
|
+ commonUserInfo: JSON.stringify(that.userInfo)
|
|
|
+ }, failres => {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: failres.errmsg,
|
|
|
+ })
|
|
|
+ uni.hideLoading()
|
|
|
+ }).then(res1 => {
|
|
|
+ that.userInfo = res1.data
|
|
|
+ uni.setStorageSync("userInfo", that.userInfo)
|
|
|
+ that.mescroll.resetUpScroll()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // that.userInfo.phone = val.phoneNumber
|
|
|
+ // that.userInfo.userId = that.userInfo.id
|
|
|
+ // console.log(that.userInfo)
|
|
|
+ // that.$request.baseRequest('user', 'syncUserInfo', that.userInfo).then(syncRes => {
|
|
|
+
|
|
|
+ // this.$request.baseRequest('sunMemberInfoApp', 'add', {
|
|
|
+ // sunMemberInfo: JSON.stringify({
|
|
|
+ // name: that.userInfo.nickname,
|
|
|
+ // phone: val.phoneNumber,
|
|
|
+ // sex: '1'
|
|
|
+ // })
|
|
|
+ // }, failres => {
|
|
|
+ // console.log('res+++++', failres.errmsg)
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // type: 'error',
|
|
|
+ // message: failres.errmsg,
|
|
|
+ // })
|
|
|
+ // uni.hideLoading()
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.errno == 200) {
|
|
|
+
|
|
|
+ // uni.setStorageSync('userInfo', that.userInfo)
|
|
|
+ // that.$store.commit('login', that.userInfo)
|
|
|
+ // // that.$api.setUserInfo(that.userInfo)
|
|
|
+ // uni.hideLoading()
|
|
|
+ // // that.liangxinLogin()
|
|
|
+ // that.init()
|
|
|
+ // this.isShowAlert = false
|
|
|
+ // }
|
|
|
+
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ delVal() {
|
|
|
+ this.searchVal = ""
|
|
|
this.mescroll.resetUpScroll()
|
|
|
},
|
|
|
- handleHiddenShare(){
|
|
|
+ handleHiddenShare() {
|
|
|
console.log(11111)
|
|
|
- this.popupshow=false
|
|
|
+ this.popupshow = false
|
|
|
},
|
|
|
posterError(err) {
|
|
|
- console.log(err)
|
|
|
+ console.log(err)
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
posterSuccess(url) {
|
|
|
- console.log("hahahah",url)
|
|
|
- // 生成成功,会把临时路径在这里返回
|
|
|
- this.poster = url;
|
|
|
+ console.log("hahahah", url)
|
|
|
+ // 生成成功,会把临时路径在这里返回
|
|
|
+ this.poster = url;
|
|
|
this.popupshow = true
|
|
|
- console.log(url)
|
|
|
+ console.log(url)
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
toHome(item) {
|
|
@@ -415,7 +522,7 @@
|
|
|
var data = [{
|
|
|
type: 'image',
|
|
|
path: this.currectData.currentBackground,
|
|
|
- use:'bg',
|
|
|
+ use: 'bg',
|
|
|
x: -10,
|
|
|
y: 0,
|
|
|
width: 530,
|
|
@@ -425,7 +532,7 @@
|
|
|
type: 'image',
|
|
|
path: this.currectData.headSculpture,
|
|
|
shape: 'circle',
|
|
|
- use:'head',
|
|
|
+ use: 'head',
|
|
|
x: 30,
|
|
|
y: 30,
|
|
|
width: 100,
|
|
@@ -433,38 +540,38 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:this.currectData.name,
|
|
|
- use:'name',
|
|
|
+ text: this.currectData.name,
|
|
|
+ use: 'name',
|
|
|
x: 150,
|
|
|
y: 50,
|
|
|
- size:24,
|
|
|
- color:'#000'
|
|
|
-
|
|
|
+ size: 24,
|
|
|
+ color: '#000'
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:this.currectData.post,
|
|
|
- use:'post',
|
|
|
+ text: this.currectData.post,
|
|
|
+ use: 'post',
|
|
|
x: 240,
|
|
|
y: 55,
|
|
|
- size:18,
|
|
|
- color:'#666666'
|
|
|
-
|
|
|
+ size: 18,
|
|
|
+ color: '#666666'
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:this.currectData.companyName,
|
|
|
- use:'companyName',
|
|
|
+ text: this.currectData.companyName,
|
|
|
+ use: 'companyName',
|
|
|
x: 150,
|
|
|
y: 95,
|
|
|
- size:18,
|
|
|
- color:'#000'
|
|
|
-
|
|
|
+ size: 18,
|
|
|
+ color: '#000'
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/address1.png',
|
|
|
- use:'address-icon',
|
|
|
+ use: 'address-icon',
|
|
|
x: 145,
|
|
|
y: 130,
|
|
|
width: 15,
|
|
@@ -472,19 +579,20 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'textarea',
|
|
|
- text:this.currectData.province+this.currectData.city+this.currectData.area+this.currectData.detailedAddress,
|
|
|
- lineSpace:1,
|
|
|
- width:320,
|
|
|
- use:'address',
|
|
|
+ text: this.currectData.province + this.currectData.city + this.currectData.area + this
|
|
|
+ .currectData.detailedAddress,
|
|
|
+ lineSpace: 1,
|
|
|
+ width: 320,
|
|
|
+ use: 'address',
|
|
|
x: 175,
|
|
|
y: 135,
|
|
|
- size:14,
|
|
|
- color:'#000'
|
|
|
+ size: 14,
|
|
|
+ color: '#000'
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/phone1.png',
|
|
|
- use:'phone-icon',
|
|
|
+ use: 'phone-icon',
|
|
|
x: 145,
|
|
|
y: 163,
|
|
|
width: 16,
|
|
@@ -492,17 +600,17 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:this.currectData.phone,
|
|
|
- use:'phone',
|
|
|
+ text: this.currectData.phone,
|
|
|
+ use: 'phone',
|
|
|
x: 175,
|
|
|
y: 167,
|
|
|
- size:14,
|
|
|
- color:'#000'
|
|
|
+ size: 14,
|
|
|
+ color: '#000'
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/remark1.png',
|
|
|
- use:'remark-icon',
|
|
|
+ use: 'remark-icon',
|
|
|
x: 145,
|
|
|
y: 197,
|
|
|
width: 13,
|
|
@@ -510,19 +618,19 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'textarea',
|
|
|
- text:this.currectData.remark?this.currectData.remark:'单击添加备注',
|
|
|
- use:'remark',
|
|
|
- lineSpace:2,
|
|
|
- width:200,
|
|
|
+ text: this.currectData.remark ? this.currectData.remark : '单击添加备注',
|
|
|
+ use: 'remark',
|
|
|
+ lineSpace: 2,
|
|
|
+ width: 200,
|
|
|
x: 175,
|
|
|
y: 200,
|
|
|
- size:13,
|
|
|
- color:'#000'
|
|
|
+ size: 13,
|
|
|
+ color: '#000'
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/bg3.png',
|
|
|
- use:'bg1',
|
|
|
+ use: 'bg1',
|
|
|
x: 0,
|
|
|
y: 243,
|
|
|
width: 370,
|
|
@@ -531,7 +639,7 @@
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/bg4.png',
|
|
|
- use:'bg2',
|
|
|
+ use: 'bg2',
|
|
|
x: 355,
|
|
|
y: 243,
|
|
|
width: 150,
|
|
@@ -540,7 +648,7 @@
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/home.png',
|
|
|
- use:'home',
|
|
|
+ use: 'home',
|
|
|
x: 65,
|
|
|
y: 260,
|
|
|
width: 33,
|
|
@@ -548,108 +656,126 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'text',
|
|
|
- text:this.currectData.classifyName?this.currectData.classifyName:'默',
|
|
|
- use:'classify',
|
|
|
+ text: this.currectData.classifyName ? this.currectData.classifyName : '默',
|
|
|
+ use: 'classify',
|
|
|
x: 145,
|
|
|
y: 263,
|
|
|
- size:34,
|
|
|
- color:'#fff'
|
|
|
+ size: 34,
|
|
|
+ color: '#fff'
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
path: '../../static/imgs/card/share.png',
|
|
|
- use:'share',
|
|
|
+ use: 'share',
|
|
|
x: 235,
|
|
|
y: 263,
|
|
|
width: 33,
|
|
|
height: 28
|
|
|
},
|
|
|
]
|
|
|
- console.log(this.currectData.cuttentTemplate,111111)
|
|
|
- for(var i=0;i<data.length;i++){
|
|
|
- switch (this.currectData.cuttentTemplate) {
|
|
|
+ console.log(this.currectData.cuttentTemplate, 111111)
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ switch (this.currectData.cuttentTemplate) {
|
|
|
case '2':
|
|
|
- if(data[i].use==='name'
|
|
|
- ||data[i].use==='companyName'
|
|
|
- ||data[i].use==='address-icon'
|
|
|
- ||data[i].use==='phone-icon'
|
|
|
- ||data[i].use==='remark-icon'){
|
|
|
- data[i].x=30
|
|
|
+ if (data[i].use === 'name' ||
|
|
|
+ data[i].use === 'companyName' ||
|
|
|
+ data[i].use === 'address-icon' ||
|
|
|
+ data[i].use === 'phone-icon' ||
|
|
|
+ data[i].use === 'remark-icon') {
|
|
|
+ data[i].x = 30
|
|
|
}
|
|
|
- if(data[i].use==='post'){
|
|
|
- data[i].x=100
|
|
|
+ if (data[i].use === 'post') {
|
|
|
+ data[i].x = 100
|
|
|
}
|
|
|
- if(data[i].use==='address'
|
|
|
- ||data[i].use==='phone'
|
|
|
- ||data[i].use==='remark'){
|
|
|
- data[i].x=60
|
|
|
+ if (data[i].use === 'address' ||
|
|
|
+ data[i].use === 'phone' ||
|
|
|
+ data[i].use === 'remark') {
|
|
|
+ data[i].x = 60
|
|
|
}
|
|
|
- if(data[i].use=='head'){
|
|
|
- data[i].x=370
|
|
|
+ if (data[i].use == 'head') {
|
|
|
+ data[i].x = 370
|
|
|
}
|
|
|
break;
|
|
|
case '3':
|
|
|
- if(data[i].use==='name'){
|
|
|
- data[i].x=30
|
|
|
- data[i].y=150
|
|
|
+ if (data[i].use === 'name') {
|
|
|
+ data[i].x = 30
|
|
|
+ data[i].y = 150
|
|
|
+ }
|
|
|
+ if (data[i].use === 'companyName') {
|
|
|
+ data[i].x = 30
|
|
|
+ data[i].y = 180
|
|
|
+ }
|
|
|
+ if (data[i].use === 'post') {
|
|
|
+ data[i].x = 100
|
|
|
+ data[i].y = 153
|
|
|
+ }
|
|
|
+ if (data[i].use === 'address-icon' ||
|
|
|
+ data[i].use === 'phone-icon' ||
|
|
|
+ data[i].use === 'remark-icon') {
|
|
|
+ data[i].x = 170
|
|
|
+ }
|
|
|
+ if (data[i].use === 'address-icon') {
|
|
|
+ data[i].y = 150
|
|
|
+ }
|
|
|
+ if (data[i].use === 'address') {
|
|
|
+ data[i].y = 155;
|
|
|
+ data[i].width = 300
|
|
|
+ }
|
|
|
+ if (data[i].use === 'phone-icon') {
|
|
|
+ data[i].y = 180
|
|
|
}
|
|
|
- if(data[i].use==='companyName'){
|
|
|
- data[i].x=30
|
|
|
- data[i].y=180
|
|
|
+ if (data[i].use === 'phone') {
|
|
|
+ data[i].y = 183
|
|
|
}
|
|
|
- if(data[i].use==='post'){
|
|
|
- data[i].x=100
|
|
|
- data[i].y=153
|
|
|
+ if (data[i].use === 'remark-icon') {
|
|
|
+ data[i].y = 210
|
|
|
}
|
|
|
- if(data[i].use==='address-icon'
|
|
|
- ||data[i].use==='phone-icon'
|
|
|
- ||data[i].use==='remark-icon'){
|
|
|
- data[i].x=170
|
|
|
+ if (data[i].use === 'remark') {
|
|
|
+ data[i].y = 212
|
|
|
}
|
|
|
- if(data[i].use==='address-icon'){data[i].y=150}
|
|
|
- if(data[i].use==='address'){data[i].y=155;data[i].width=300}
|
|
|
- if(data[i].use==='phone-icon'){data[i].y=180}
|
|
|
- if(data[i].use==='phone'){data[i].y=183}
|
|
|
- if(data[i].use==='remark-icon'){data[i].y=210}
|
|
|
- if(data[i].use==='remark'){data[i].y=212}
|
|
|
- if(data[i].use==='address'
|
|
|
- ||data[i].use==='phone'
|
|
|
- ||data[i].use==='remark'){
|
|
|
- data[i].x=190
|
|
|
+ if (data[i].use === 'address' ||
|
|
|
+ data[i].use === 'phone' ||
|
|
|
+ data[i].use === 'remark') {
|
|
|
+ data[i].x = 190
|
|
|
}
|
|
|
break;
|
|
|
case '4':
|
|
|
- if(data[i].use==='name'
|
|
|
- ||data[i].use==='companyName'){
|
|
|
- data[i].x=30
|
|
|
+ if (data[i].use === 'name' ||
|
|
|
+ data[i].use === 'companyName') {
|
|
|
+ data[i].x = 30
|
|
|
}
|
|
|
- if(data[i].use==='companyName'){
|
|
|
- data[i].y=90
|
|
|
+ if (data[i].use === 'companyName') {
|
|
|
+ data[i].y = 90
|
|
|
}
|
|
|
- if(data[i].use==='post'){
|
|
|
- data[i].x=100
|
|
|
+ if (data[i].use === 'post') {
|
|
|
+ data[i].x = 100
|
|
|
}
|
|
|
- if(data[i].use=='head'){
|
|
|
- data[i].x=25
|
|
|
- data[i].y=120
|
|
|
+ if (data[i].use == 'head') {
|
|
|
+ data[i].x = 25
|
|
|
+ data[i].y = 120
|
|
|
}
|
|
|
- if(data[i].use==='address-icon'
|
|
|
- ||data[i].use==='phone-icon'
|
|
|
- ||data[i].use==='remark-icon'){
|
|
|
- data[i].x=170
|
|
|
+ if (data[i].use === 'address-icon' ||
|
|
|
+ data[i].use === 'phone-icon' ||
|
|
|
+ data[i].use === 'remark-icon') {
|
|
|
+ data[i].x = 170
|
|
|
}
|
|
|
- if(data[i].use==='address'){data[i].width=300}
|
|
|
- if(data[i].use==='address'
|
|
|
- ||data[i].use==='phone'
|
|
|
- ||data[i].use==='remark'){
|
|
|
- data[i].x=190
|
|
|
+ if (data[i].use === 'address') {
|
|
|
+ data[i].width = 300
|
|
|
+ }
|
|
|
+ if (data[i].use === 'address' ||
|
|
|
+ data[i].use === 'phone' ||
|
|
|
+ data[i].use === 'remark') {
|
|
|
+ data[i].x = 190
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
|
}
|
|
|
- this.canvasData= {clicknum:this.clicknum++,list:data}
|
|
|
-
|
|
|
+ this.canvasData = {
|
|
|
+ clicknum: this.clicknum++,
|
|
|
+ list: data
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
async delConfirm() {
|
|
|
uni.showLoading({
|
|
@@ -857,6 +983,7 @@
|
|
|
})
|
|
|
},
|
|
|
login() {
|
|
|
+ debugger
|
|
|
let that = this
|
|
|
uni.login({
|
|
|
"provider": "weixin",
|
|
@@ -865,34 +992,22 @@
|
|
|
loginType: 1,
|
|
|
raw: JSON.stringify(wxres)
|
|
|
}, failres => {
|
|
|
- this.$refs.uToast.show({
|
|
|
+ that.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: failres.errmsg,
|
|
|
})
|
|
|
uni.hideLoading()
|
|
|
}).then(res => {
|
|
|
- uni.getUserInfo({
|
|
|
- provider: 'weixin',
|
|
|
- success: function(info) {
|
|
|
- console.log(info)
|
|
|
- res.data.nickname = info.userInfo.nickName
|
|
|
- res.data.head = info.userInfo.avatarUrl
|
|
|
- that.$request.baseRequest('commonUserApp', 'edit', {
|
|
|
- commonUserInfo: JSON.stringify(res.data)
|
|
|
- }, failres => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: failres.errmsg,
|
|
|
- })
|
|
|
- uni.hideLoading()
|
|
|
- }).then(res1 => {
|
|
|
- uni.setStorageSync("userInfo", res1.data)
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ console.log(res.data)
|
|
|
+ that.isPhone = true
|
|
|
+ that.userInfo = res.data
|
|
|
})
|
|
|
},
|
|
|
fail: function(err) {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: err.code,
|
|
|
+ })
|
|
|
// 登录授权失败
|
|
|
// err.code是错误码
|
|
|
}
|
|
@@ -1234,32 +1349,59 @@
|
|
|
transform: translateY(-50%);
|
|
|
text-align: center;
|
|
|
}
|
|
|
- /deep/.u-checkbox-group{
|
|
|
+
|
|
|
+ /deep/.u-checkbox-group {
|
|
|
position: absolute;
|
|
|
- right: 20px;
|
|
|
- z-index: 99;
|
|
|
- top: 30px;
|
|
|
+ right: 20px;
|
|
|
+ z-index: 99;
|
|
|
+ top: 30px;
|
|
|
}
|
|
|
- .del-style{
|
|
|
+
|
|
|
+ .del-style {
|
|
|
background: #fff;
|
|
|
padding: 20rpx;
|
|
|
- width:calc(100vw - 40rpx);
|
|
|
+ width: calc(100vw - 40rpx);
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- bottom:0
|
|
|
+ bottom: 0
|
|
|
}
|
|
|
- .share-content{
|
|
|
- display:flex;
|
|
|
- padding:20rpx;
|
|
|
+
|
|
|
+ .share-content {
|
|
|
+ display: flex;
|
|
|
+ padding: 20rpx;
|
|
|
justify-content: center;
|
|
|
- button{
|
|
|
- background:transparent;
|
|
|
- line-height:1;
|
|
|
+ font-size: 24rpx;
|
|
|
+
|
|
|
+ button {
|
|
|
+ background: transparent;
|
|
|
+ line-height: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ button:after {
|
|
|
+ border: none;
|
|
|
}
|
|
|
- button:after{
|
|
|
- border:none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sq-view {
|
|
|
+ padding: 60rpx 80rpx 0 80rpx;
|
|
|
+
|
|
|
+ .text {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #1A1A1A;
|
|
|
+ margin-bottom: 60rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .confirm {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ color: white;
|
|
|
+ // margin: 40rpx auto;
|
|
|
+ background: #18254C;
|
|
|
+ border-radius: 20rpx;
|
|
|
}
|
|
|
- font-size:24rpx;
|
|
|
}
|
|
|
</style>
|