| | |
| | | member: {}, |
| | | showShare: false |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | |
| | | </view> |
| | | <!-- 富文本 --> |
| | | <view> |
| | | <!-- <mp-html content="{{info.content}}"></mp-html> --> |
| | | <mp-html content="{{info.content}}"></mp-html> |
| | | </view> |
| | | <view class="spaceList"> |
| | | <view class="item" wx:for="{{ info.spaceList }}"> |
| | |
| | | url: '/web/personnel/getUserDetail', |
| | | }) |
| | | } |
| | | // 更新会员信息 |
| | | export const editMember = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/editUsers', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | // 首页 每日上新 |
| | | export const getDailyUpdates = (data) => { |
| | | return request({ |
| | |
| | | export const getShopDetail = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/shopDetail?shopId='+data, |
| | | data |
| | | }) |
| | | } |
| | | // 更新会员信息 |
| | | export const editMember = (data) => { |
| | | return request({ |
| | | url: '/web/customer/editMember', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | |
| | | "permission": { |
| | | "scope.userLocation": { |
| | | "desc": "你的位置信息将用于小程序位置接口的效果展示" |
| | | }, |
| | | "scope.writePhotosAlbum":{ |
| | | "desc": "授权相册权限后,您才能正常保存图片" |
| | | } |
| | | }, |
| | | "componentFramework": "glass-easel", |
| | |
| | | address:'', |
| | | latitude:'', |
| | | longitude:'', |
| | | shopInfo:{} |
| | | shopInfo:{}, |
| | | |
| | | bottomLift: 0 |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | const obj =JSON.parse(options.data); |
| | | this.setData({shopInfo: obj , |
| | | linkPhone:obj.linkPhone, |
| | |
| | | justify-content: flex-end; |
| | | .input{ |
| | | text-align: right; |
| | | max-width: 450rpx; |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden;//文本超出隐藏 |
| | | text-overflow: ellipsis; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .bottombtn{ |
| | | position: fixed; |
| | | left: 40rpx; |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | background: #B08771; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottombtn"> |
| | | <button bind:tap="saveInfo" class="savebutton">保存</button> |
| | | </view> |
| | | <view bindtap="saveInfo" style="bottom: {{ bottomLift }}px" class="bottombtn">保存</view> |
| | | </view> |
| | |
| | | } |
| | | .list .line .val .input { |
| | | text-align: right; |
| | | max-width: 450rpx; |
| | | width: 100%; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | |
| | | .list .line .val .icon { |
| | | width: 40rpx; |
| | | } |
| | | .bottombtn{ |
| | | .bottombtn { |
| | | position: fixed; |
| | | bottom: 0px; |
| | | width: 100%; |
| | | padding: 20px; |
| | | } |
| | | .savebutton{ |
| | | bottom: 20px; |
| | | width: 100%; |
| | | border: none; |
| | | color: white; |
| | | left: 40rpx; |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | background: #B08771; |
| | | border-radius: 8px; |
| | | } |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | |
| | | // pages/store/staff.jsdownloadImg |
| | | import { getUserCard } from '../../api/index' |
| | | import { downloadImg } from '../../utils/common' |
| | | import { |
| | | getUserCard |
| | | } from '../../api/index' |
| | | // import { downloadImg } from '../../utils/common' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | */ |
| | | data: { |
| | | bottomLift: 0, |
| | | isShow: false, |
| | | userCard:'', |
| | | isShow: true, |
| | | userCard: '', |
| | | isShow2: false, |
| | | userInfo:{} |
| | | userInfo: {} |
| | | }, |
| | | |
| | | /** |
| | |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | var userType = options.userType |
| | | |
| | | if(userType == 1){ |
| | | |
| | | if (userType == 1) { |
| | | //如果查询自己的信息 |
| | | this.setData({userInfo: wx.getStorageSync('member')}) |
| | | this.setData({ |
| | | userInfo: wx.getStorageSync('member') |
| | | }) |
| | | console.log(this.data) |
| | | } |
| | | } |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | }, |
| | | showQrcode(){ |
| | | this.setData({isShow:true}) |
| | | showQrcode() { |
| | | this.setData({ |
| | | isShow: true |
| | | }) |
| | | }, |
| | | closeCard(){ |
| | | this.setData({isShow2: false}) |
| | | closeCard() { |
| | | this.setData({ |
| | | isShow2: false |
| | | }) |
| | | }, |
| | | |
| | | |
| | | saveCard(){ |
| | | downloadImg(this.data.userCard); |
| | | saveCard() { |
| | | wx.downloadFile({ |
| | | url: this.data.userCard, |
| | | success: function (res) { |
| | | console.log('下载成功', res); |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: res.tempFilePath, |
| | | success(result) { |
| | | console.log(result) |
| | | wx.showToast({ |
| | | title: '保存成功', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | }) |
| | | // wx.saveFile({ |
| | | // tempFilePath: res.tempFilePath, |
| | | // success: function (res) { |
| | | // console.log(res.savedFilePath) |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | | openModal() { |
| | | if(this.data.userCard !=null && this.data.userCard != ''){ |
| | | this.setData({isShow2: true}) |
| | | if (this.data.userCard != null && this.data.userCard != '') { |
| | | this.setData({ |
| | | isShow2: true |
| | | }) |
| | | return; |
| | | } |
| | | getUserCard().then(res =>{ |
| | | this.setData({userCard: res.data}) |
| | | this.setData({isShow2: true}) |
| | | }) |
| | | getUserCard().then(res => { |
| | | this.setData({ |
| | | userCard: res.data |
| | | }) |
| | | this.setData({ |
| | | isShow2: true |
| | | }) |
| | | }) |
| | | }, |
| | | onClose() { |
| | | this.setData({isShow: false}) |
| | | this.setData({ |
| | | isShow: false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | { |
| | | "usingComponents": { |
| | | "van-popup": "@vant/weapp/popup/index", |
| | | "back": "../../components/back/index" |
| | | "back": "../../components/back/index", |
| | | "van-overlay": "@vant/weapp/overlay/index" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .container { |
| | | padding: 26rpx 40rpx; |
| | | background-color: #fff; |
| | | .avatar { |
| | | margin-top: 260rpx; |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | border-radius: 50%; |
| | | border: 4rpx solid #FFFFFF; |
| | | position: relative; |
| | | z-index: 2; |
| | | } |
| | | .desc { |
| | | display: flex; |
| | |
| | | |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | margin-bottom: 42rpx; |
| | | margin-bottom: 40rpx; |
| | | .icon { |
| | | width: 30rpx; |
| | | } |
| | |
| | | color: #777777; |
| | | margin-left: 24rpx; |
| | | margin-right: 44rpx; |
| | | width: 140rpx; |
| | | } |
| | | .val{ |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | |
| | | color: #999999; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .card_wrap{ |
| | | position: fixed; |
| | | border-radius: 8rpx; |
| | | top: 50%; |
| | | left: 75rpx; |
| | | transform: translate(0, -50%); |
| | | width: 600rpx; |
| | | background-color: rgba(0, 0, 0, .2); |
| | | z-index: 999; |
| | | .img1{ |
| | | image{ |
| | | width: 600rpx; |
| | | border-radius: 8rpx ; |
| | | } |
| | | } |
| | | .btns{ |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | .btn{ |
| | | width: 290rpx; |
| | | height: 88rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #fff; |
| | | } |
| | | .save{ |
| | | border: none; |
| | | background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%); |
| | | } |
| | | } |
| | | } |
| | |
| | | <text class="val">{{userInfo.shopName}}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix" style="width: 45rpx;" ></image> |
| | | <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix"></image> |
| | | <text class="label">门店地址</text> |
| | | <text class="val">{{userInfo.shopAddress}}</text> |
| | | </view> |
| | |
| | | </view> |
| | | <!-- footer --> |
| | | <view class="footer" style="bottom: {{bottomLift}}px;"> |
| | | <view class="btn" bindtap="openModal"> |
| | | <view class="btn" bindtap="openModal"> |
| | | <image src="../../static/icon/share.png" mode="widthFix"></image> |
| | | <view>分享</view> |
| | | </view> |
| | | </view> |
| | | <!-- 详情 --> |
| | | <van-popup show="{{ isShow }}" closeable round bind:close="onClose"> |
| | | <van-popup show="{{ isShow }}" closeable round bind:close="onClose"> |
| | | <view class="modal"> |
| | | <view class="header"> |
| | | <image class="avatar" src="{{userInfo.imgurlFull}}"></image> |
| | | <view class="content"> |
| | | <view class="name">{{userInfo.name}}</view> |
| | | <view class="desc">导购 | {{userInfo.jobDate ||'0'}}年经验</view> |
| | | <view class="name">{{userInfo.name}}</view> |
| | | <view class="desc">导购 | {{userInfo.jobDate ||'0'}}年经验</view> |
| | | </view> |
| | | </view> |
| | | <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image> |
| | | <view class="text">长按图片识别二维码</view> |
| | | </view> |
| | | </van-popup> <!-- 用户名片 --> |
| | | <van-popup class="modalcard" show="{{ isShow2 }}" round custom-style="background-color: rgba(0,0,0,0);"> |
| | | <view class="img1"> |
| | | <image class="qrcodecard" src="{{userCard}}"></image> |
| | | </view> |
| | | <view class="btns"> |
| | | <button class="btn1" bind:tap="closeCard">取消</button> |
| | | <button class="btn2" bind:tap="saveCard">保持到相册</button> |
| | | </view> |
| | | </van-popup> |
| | | </view>prod |
| | | <!-- 用户名片 --> |
| | | <view wx:if="{{ isShow2 }}" class="card_wrap"> |
| | | <view class="img1"> |
| | | <image mode="widthFix" src="{{userCard}}"></image> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="btn" bind:tap="closeCard">取消</view> |
| | | <view class="btn save" bind:tap="saveCard">保存到相册</view> |
| | | </view> |
| | | </view> |
| | | <van-overlay z-index="10" show="{{ isShow2 }}" bind:click="onClickHide" /> |
| | | </view> |
| | |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | z-index: 1; |
| | | } |
| | | .container { |
| | | padding: 26rpx 40rpx; |
| | | background-color: #fff; |
| | | } |
| | | .container .avatar { |
| | | margin-top: 260rpx; |
| | |
| | | height: 140rpx; |
| | | border-radius: 50%; |
| | | border: 4rpx solid #FFFFFF; |
| | | position: relative; |
| | | z-index: 2; |
| | | } |
| | | .container .desc { |
| | | display: flex; |
| | |
| | | } |
| | | .guide .line { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | margin-bottom: 42rpx; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | .guide .line .icon { |
| | | width: 30rpx; |
| | | width: 30rpx; |
| | | } |
| | | .guide .line .label { |
| | | color: #777777; |
| | | min-width: 140rpx; |
| | | margin-left: 24rpx; |
| | | margin-left: 24rpx; |
| | | margin-right: 44rpx; |
| | | width: 140rpx; |
| | | } |
| | | .guide .line .val { |
| | | flex: 1; |
| | | } |
| | | .footer { |
| | | display: flex; |
| | |
| | | color: #999999; |
| | | text-align: center; |
| | | } |
| | | .modalcard{ |
| | | display: inline-block; |
| | | .card_wrap { |
| | | position: fixed; |
| | | border-radius: 8rpx; |
| | | top: 50%; |
| | | left: 75rpx; |
| | | transform: translate(0, -50%); |
| | | width: 600rpx; |
| | | height: 1100rpx; |
| | | box-sizing: border-box; |
| | | background-color: rgba(0, 0, 0, 0.2); |
| | | z-index: 999; |
| | | } |
| | | .modalcard .img1{ |
| | | .card_wrap .img1 image { |
| | | width: 600rpx; |
| | | border-radius: 8rpx ; |
| | | } |
| | | .card_wrap .btns { |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | height: 956rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | .modalcard .qrcodecard{ |
| | | width: 600rpx; |
| | | height: 956rpx; |
| | | border-radius: 26rpx ; |
| | | } |
| | | .modalcard .btns{ |
| | | width: 100%; |
| | | display: flex; |
| | | margin-top:30rpx ; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .modalcard .btns .btn1{ |
| | | width: 290rpx; |
| | | border-radius: 8rpx !important; |
| | | height:88rpx ; |
| | | font-size: 32rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: white; |
| | | .card_wrap .btns .btn { |
| | | width: 290rpx; |
| | | height: 88rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #FFFFFF; |
| | | background:rgba(0,0,0,0) |
| | | } |
| | | .modalcard .btns .btn2{ |
| | | width: 290rpx; |
| | | height:88rpx ; |
| | | font-size: 32rpx; |
| | | color: white; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 8rpx !important; |
| | | background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%); |
| | | border-radius: 8px; |
| | | color: #fff; |
| | | } |
| | | .card_wrap .btns .save { |
| | | border: none; |
| | | } |
| | | |
| | | background: linear-gradient(180deg, #E0B49C 0%, #B68B74 100%); |
| | | } |
| | |
| | | // pages/userinfo/index.js |
| | | import { |
| | | getMemberInfo, |
| | | editMember, |
| | | uploadUrl |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | editFalg: false, |
| | | slogans: '', |
| | | costomerNum: '', |
| | | qrcodeImg: '', |
| | | qrcodeImgFull: '', |
| | | companyQrcodeImg: '', |
| | | companyQrcodeImgFull: '', |
| | | userInfo: { |
| | | name: '', |
| | | phone: '', |
| | | jobDate: '', |
| | | }, |
| | | endDate: '', // 获取当前年 |
| | | |
| | | // 下面为实例 |
| | |
| | | }, |
| | | onLoad(options) { |
| | | const endDate = new Date().getFullYear() + '-09-01' |
| | | this.setData({endDate}) |
| | | console.log('endYear', endDate); |
| | | this.setData({ |
| | | endDate |
| | | }) |
| | | this.getUserInfo() |
| | | }, |
| | | startEdit() { |
| | | this.setData({ |
| | | editFalg: true |
| | | }) |
| | | }, |
| | | onSubmit() { |
| | | |
| | | console.log('点了'); |
| | | const { |
| | | slogans, |
| | | costomerNum, |
| | | userInfo |
| | | } = this.data |
| | | editMember({ |
| | | ...userInfo, |
| | | slogans, |
| | | costomerNum |
| | | }).then(res => { |
| | | this.setData({ |
| | | editFalg: false |
| | | }) |
| | | wx.showToast({ |
| | | title: '信息保存成功', |
| | | }) |
| | | }) |
| | | }, |
| | | getUserInfo() { |
| | | getMemberInfo().then(res => { |
| | | this.setData({ |
| | | userInfo: res.data, |
| | | slogans: res.data.slogans, |
| | | costomerNum: res.data.costomerNum, |
| | | qrcodeImgFull: res.data.qrcodeImgFull, |
| | | qrcodeImg: res.data.qrcodeImg, |
| | | companyQrcodeImgFull: res.data.companyQrcodeImgFull, |
| | | companyQrcodeImg: res.data.companyQrcodeImg, |
| | | }) |
| | | }) |
| | | }, |
| | | bindDateChange(e) { |
| | | console.log('点击了', e.detail.value); |
| | | const { |
| | | userInfo |
| | | } = this.data |
| | | const endDate = new Date().getFullYear() |
| | | userInfo.jobDate = endDate - e.detail.value |
| | | this.setData({ |
| | | userInfo |
| | | }) |
| | | }, |
| | | bindRegionChange(e) { |
| | | console.log('picker发送选择改变,携带值为', e.detail.value) |
| | |
| | | region: e.detail.value |
| | | }) |
| | | }, |
| | | getBindchooseavatar(e) { |
| | | var that = this |
| | | const { userInfo } = this.data |
| | | if (e.detail.avatarUrl) { |
| | | wx.uploadFile({ |
| | | url: uploadUrl, |
| | | filePath: e.detail.avatarUrl, |
| | | name: 'file', |
| | | success (res) { |
| | | console.log(JSON.parse(res.data)) |
| | | let data = JSON.parse(ress.data) |
| | | userInfo.imgurl = data.data.imgaddr |
| | | userInfo.imgurlFull = data.data.url |
| | | this.setData({userInfo}) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | selMedia() { |
| | | console.log('dianjile'); |
| | | wx.chooseMedia({ |
| | | count: 1, |
| | | mediaType: ['image'], |
| | | sourceType: ['album', 'camera'], |
| | | maxDuration: 16, |
| | | camera: 'back', |
| | | success(res) { |
| | | console.log(res.tempFiles[0].tempFilePath) |
| | | console.log(res.tempFiles[0].size) |
| | | } |
| | | }) |
| | | const { |
| | | editFalg, |
| | | qrcodeImgFull |
| | | } = this.data |
| | | if (editFalg) { |
| | | wx.chooseMedia({ |
| | | count: 1, |
| | | mediaType: ['image'], |
| | | sourceType: ['album', 'camera'], |
| | | maxDuration: 16, |
| | | camera: 'back', |
| | | success: (res) => { |
| | | // console.log(res.tempFiles[0].tempFilePath) |
| | | // console.log(res.tempFiles[0].size) |
| | | wx.uploadFile({ |
| | | url: uploadUrl, |
| | | filePath: res.tempFiles[0].tempFilePath, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'member' |
| | | }, |
| | | header: { |
| | | token: wx.getStorageSync('token') |
| | | }, |
| | | success: (ress) => { |
| | | console.log('ress', JSON.parse(ress.data)); |
| | | let data = JSON.parse(ress.data) |
| | | this.setData({ |
| | | qrcodeImg: data.data.imgaddr, |
| | | qrcodeImgFull: data.data.url, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | wx.previewImage({ |
| | | urls: [qrcodeImgFull], |
| | | }) |
| | | } |
| | | }, |
| | | selMedia2() { |
| | | const { |
| | | editFalg, |
| | | companyQrcodeImgFull |
| | | } = this.data |
| | | if (editFalg) { |
| | | wx.chooseMedia({ |
| | | count: 1, |
| | | mediaType: ['image'], |
| | | sourceType: ['album', 'camera'], |
| | | maxDuration: 16, |
| | | camera: 'back', |
| | | success: (res) => { |
| | | // console.log(res.tempFiles[0].tempFilePath) |
| | | // console.log(res.tempFiles[0].size) |
| | | wx.uploadFile({ |
| | | url: uploadUrl, |
| | | filePath: res.tempFiles[0].tempFilePath, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'member' |
| | | }, |
| | | header: { |
| | | token: wx.getStorageSync('token') |
| | | }, |
| | | success: (ress) => { |
| | | console.log('ress', JSON.parse(ress.data)); |
| | | let data = JSON.parse(ress.data) |
| | | this.setData({ |
| | | companyQrcodeImg: data.data.imgaddr, |
| | | companyQrcodeImgFull: data.data.url, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | | wx.previewImage({ |
| | | urls: [companyQrcodeImgFull], |
| | | }) |
| | | } |
| | | }, |
| | | onReady() { |
| | | |
| | |
| | | border-radius: 50%; |
| | | box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.08); |
| | | border: 4rpx solid #FFFFFF; |
| | | border: 1px solid; |
| | | } |
| | | .avatar_btn{ |
| | | width: 168rpx; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | .qrcode{ |
| | | width: 40rpx; |
| | | } |
| | | .label{ |
| | | width: 210rpx; |
| | | font-size: 30rpx; |
| | |
| | | flex: 1; |
| | | color: #111111; |
| | | text-align: right; |
| | | .van-cell{ |
| | | padding: 0; |
| | | } |
| | | .picker{ |
| | | .picker_wrap{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | } |
| | | } |
| | | input{ |
| | | text-align: right; |
| | |
| | | <view class="container"> |
| | | <image class="avatar" src="" mode="widthFix"></image> |
| | | <view bindtap="selMedia" class="avatar_btn">更换头像</view> |
| | | <image class="avatar" src="{{ userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png' }}" mode="widthFix"></image> |
| | | <button open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">更换头像</button> |
| | | <view class="list"> |
| | | <view class="line"> |
| | | <view class="label">姓名</view> |
| | | <van-field type="text" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 18 }}" clearable /> |
| | | <view class="input">{{ userInfo.name }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">电话</view> |
| | | <van-field type="number" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 11 }}" clearable /> |
| | | <view class="input">{{ userInfo.phone }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">签名</view> |
| | | <van-field type="text" border="{{false}}" class="input" model:value="{{ endDate }}" maxlength="{{ 18 }}" clearable /> |
| | | <van-field wx:if="{{ editFalg }}" type="text" border="{{false}}" class="input" model:value="{{ slogans }}" maxlength="{{ 18 }}" clearable /> |
| | | <view wx:else class="input">{{ slogans }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">从业年限</view> |
| | | <view class="val"> |
| | | <view class="input"> |
| | | <picker mode="date" value="{{date}}" fields="year" start="1970-09-01" end="{{endDate}}" bindchange="bindDateChange"> |
| | | <view class="picker"> |
| | | 当前选择: {{endDate}} |
| | | <view wx:if="{{ editFalg }}" class="input"> |
| | | <picker class="picker" mode="date" value="{{date}}" fields="year" start="1970-09-01" end="{{endDate}}" bindchange="bindDateChange"> |
| | | <view class="picker_wrap"> |
| | | <view>{{ userInfo.jobDate }} <text wx:if="{{ userInfo.jobDate || userInfo.jobDate == 0 }}">年</text></view> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | <view wx:else class="input"><text>{{ userInfo.jobDate }} 年</text></view> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">服务客户</view> |
| | | <van-field type="text" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 5 }}" clearable /> |
| | | <van-field wx:if="{{ editFalg }}" type="text" border="{{false}}" class="input" model:value="{{ costomerNum }}" maxlength="{{ 5 }}" clearable /> |
| | | <view wx:else class="input">{{ costomerNum }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">门店名称</view> |
| | | <view class="input">名称</view> |
| | | <view class="input">{{ userInfo.shopName }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">门店城市</view> |
| | | <view class="input">名称</view> |
| | | <view class="input">{{ userInfo.shopCity }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">门店地址</view> |
| | | <view class="input">名称</view> |
| | | <view class="input">{{ userInfo.shopAddress }}</view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">微信二维码</view> |
| | | <view class="val" bindtap="changeAddr"> |
| | | <view class="input">{{ address }}</view> |
| | | <view class="val" bindtap="selMedia"> |
| | | <view class="input"></view> |
| | | <image class="qrcode" mode="widthFix" src="../../static/icon/mingpian_erweima@2x.png"></image> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label">企业微信二维码</view> |
| | | <view class="val" bindtap="changeAddr"> |
| | | <view class="input">{{ address }}</view> |
| | | <view class="val" bindtap="selMedia2"> |
| | | <view class="input"></view> |
| | | <image class="qrcode" mode="widthFix" src="../../static/icon/mingpian_erweima@2x.png"></image> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <view bindtap="onSubmit" class="save">保存</view> |
| | | <view wx:if="{{ !editFalg }}" bindtap="startEdit" class="save">编辑</view> |
| | | <view wx:else bindtap="onSubmit" class="save">保存</view> |
| | | </view> |
| | | <!-- --> |
| | | </view> |
| | |
| | | border-radius: 50%; |
| | | box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.08); |
| | | border: 4rpx solid #FFFFFF; |
| | | border: 1px solid; |
| | | } |
| | | .avatar_btn { |
| | | width: 168rpx; |
| | |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | } |
| | | .list .line .qrcode { |
| | | width: 40rpx; |
| | | } |
| | | .list .line .label { |
| | | width: 210rpx; |
| | | font-size: 30rpx; |
| | |
| | | color: #111111; |
| | | text-align: right; |
| | | } |
| | | .list .line .input .van-cell { |
| | | padding: 0; |
| | | } |
| | | .list .line .input .picker .picker_wrap { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | .list .line input { |
| | | text-align: right; |
| | | } |
| | |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/userinfo/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |
| | | ] |
| | | } |
| | |
| | | // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/' |
| | | |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 测试服 |
| | | export const baseUrl = 'http://192.168.0.135:10027' // 本地 |
| | | |
| | | // 腾讯地图开发者 key |
| | | export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ' |