Commit 0dc42bb2 by 张立顺

bugfix

1 parent 0087f45d
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab", "tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar", "navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup" "popup": "/components/Popup/Popup",
"nothing-tips": "/components/Nothing-tips/nothingTips"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
// components/Nothing-tips/nothingTips.js
Component({
/**
* 组件的属性列表
*/
properties: {
tips: String,
bg: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/Nothing-tips/nothingTips.wxss */
.nothingCon {
width: 100vw;
height: 100vh;
background-color: #fff;
}
\ No newline at end of file \ No newline at end of file
<!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon">
<image wx:if="{{bg}}" src="{{bg}}" webp></image>
<view wx:if="{{tips}}" class="tips">{{tips}}</view>
<slot/>
</view>
// pages/mineDetail/customerManagement/customerManagement.js // pages/mineDetail/customerManagement/customerManagement.js
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
import USERAPI from '~/api/usersApi/index'
const listObj = Object.freeze([ const listObj = Object.freeze([
{ {
key: 'merchantId', key: 'merchantId',
...@@ -126,7 +128,8 @@ Component({ ...@@ -126,7 +128,8 @@ Component({
} }
], ],
listObj, listObj,
isSuper: false isSuper: false,
bgUrl: `${USERAPI}/output/empty.png`
}, },
attached() { attached() {
// this.initTime() // this.initTime()
......
{ {
"navigationBarTitleText": "订单补录", "navigationBarTitleText": "客户管理",
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"gl-cell": "../../../components/GlCell/GlCell" "gl-cell": "../../../components/GlCell/GlCell"
......
...@@ -4,14 +4,17 @@ page { ...@@ -4,14 +4,17 @@ page {
} }
.customerManagementCon { .customerManagementCon {
width: 100%;
height: 100%; height: 100%;
// width: 100vw;
// height: 100vh;
} }
.input { .input {
text-align: left; text-align: left;
font-size: 28rpx; font-size: 28rpx;
caret-color: #3666FE; caret-color: #3666FE;
width: 430rpx;
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<view class="customerManagementCon"> <view class="customerManagementCon">
<!-- required hidden="{{hidden}}" --> <!-- required hidden="{{hidden}}" -->
<scroll-view <scroll-view
wx:if="{{!customerList.length}}"
scroll-y scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
...@@ -68,5 +69,8 @@ ...@@ -68,5 +69,8 @@
</gl-cell> --> </gl-cell> -->
</view> </view>
</scroll-view> </scroll-view>
<view wx:else>
<nothing-tips tips="这是一个" bg="{{}}" />
</view>
</view> </view>
// pages/mineDetail/messageBox/messageBox.js // pages/mineDetail/messageBox/messageBox.js
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
import { handleCopy } from '~/utils/utils_wx'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -55,11 +56,48 @@ Component({ ...@@ -55,11 +56,48 @@ Component({
copyLink(e) { copyLink(e) {
console.log(e) console.log(e)
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
handleCopy(url)
// console.log(e.current.) // console.log(e.current.)
wx.$api.setCopyData(url, () => { // wx.$api.setCopyData(url, () => {
// wx.$spi.showToast('复制成功') // // wx.$spi.showToast('复制成功')
}) // })
}, },
// handleCopy(e) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
// var qr = wxqrcode.createQrCodeImg(currentItem.activityUrl)
// const base64src = function (base64data) {
// return new Promise((resolve, reject) => {
// const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
// if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
// const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
// const buffer = wx.base64ToArrayBuffer(bodyData)
// wx.getFileSystemManager().writeFile({
// filePath,
// data: buffer,
// encoding: 'binary',
// success() {
// resolve(filePath)
// },
// fail() {
// reject(new Error('ERROR_BASE64SRC_WRITE'))
// }
// })
// })
// }
// base64src(qr).then(res => {
// wx.getImageInfo({
// src: res,
// success(obj) {
// wx.showShareImageMenu({
// path: obj.path
// })
// },
// fail() {
// }
// })
// })
// },
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail
console.log(e) console.log(e)
......
...@@ -9,7 +9,7 @@ Page({ ...@@ -9,7 +9,7 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 0, loginType: 0,
agree: true, agree: true,
tabIndx: 1, tabIndx: 0,
tabList: ['我的客户', '我的门店', '我的员工'], tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: false, popupShow: false,
subIndex: -1, subIndex: -1,
......
import wxqrcode from '~/utils/lib/wxqrcode.js'
/** /**
* 微信校验通知类工具封装 * 微信校验通知类工具封装
*/ */
...@@ -114,6 +115,42 @@ const previewImage = params => { ...@@ -114,6 +115,42 @@ const previewImage = params => {
wx.previewImage(params) wx.previewImage(params)
} }
export function handleCopy(url) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
var qr = wxqrcode.createQrCodeImg(url)
const base64src = function (base64data) {
return new Promise((resolve, reject) => {
const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
const buffer = wx.base64ToArrayBuffer(bodyData)
wx.getFileSystemManager().writeFile({
filePath,
data: buffer,
encoding: 'binary',
success() {
resolve(filePath)
},
fail() {
reject(new Error('ERROR_BASE64SRC_WRITE'))
}
})
})
}
base64src(qr).then(res => {
wx.getImageInfo({
src: res,
success(obj) {
wx.showShareImageMenu({
path: obj.path
})
},
fail() {}
})
})
}
const wxApi = { const wxApi = {
previewImage, previewImage,
getSystemInfo, getSystemInfo,
......
账号登录: 10988866666(超管)xiong110 账号登录: 10988866666(超管)xiong110
测试环境 bb123456 密码 bb123456
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!