Commit 21855b89 by wuwx

Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop

2 parents 29ba00c5 41feb0c6
/* login/index/components/Agree/Agree.wxss */
.agree {
position: fixed;
left: 0;
bottom: 100rpx;
// position: fixed;
// left: 0;
// bottom: 100rpx;
width: 100%;
margin-top: 20rpx;
text {
color: #5092FF;
}
......
<block wx:if="{{show}}">
<view class="agree text-center">
<view class="icon {{agree}}" bindtap="agree">
<view class="agree text-center" bindtap="agree">
<view class="icon {{agree}}">
<image webp src="{{IMGURL}}login/radio.png"></image>
</view>
<block wx:if="{{text}}">{{text}}</block>
......
......@@ -4,12 +4,13 @@
text-align: center;
margin-bottom: 40rpx;
}
.tips.true{
padding-top: 48rpx;
}
.login-list {
display: flex;
align-items: center;
justify-content: center;
gap: 0 118rpx;
.item {
display: flex;
......@@ -17,7 +18,7 @@
flex-direction: column;
width: 100rpx;
animation: btn-move .25s forwards;
margin:0 59rpx;
.icon {
width: 68rpx;
height: 68rpx;
......
<view class="tips">其他方式</view>
<view class="tips {{loginType == 2}}">其他方式</view>
<view class="login-list">
<block wx:for="{{loginList}}" wx:key="index">
<block wx:if="{{loginType != index}}">
......
......@@ -2,6 +2,6 @@
<mask show="{{loading}}"></mask>
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
<type-list loginType="{{loginType}}" />
<agree show="{{loginType == 2}}" text="7天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
<type-list loginType="{{loginType}}" />
</view>
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
module.exports = Behavior({
data: {
IMGURL: IMG_URL
IMGURL: IMG_URL,
IMG_VERSION: IMG_VERSION()
}
})
......@@ -229,6 +229,9 @@ Page({
height: _this.data.imgHeight,
});
console.log('actNum',actNum)
let qrcodeH = actNum== 2 ? 100 : 100
let qrcodeY = actNum== 2 ? 20 : 0
let arr = [456, 222, 0, 496];
let imgList = [
{
......@@ -245,10 +248,10 @@ Page({
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
x: _this.data.imgWidth - 64,
y: _this.data.imgHeight - arr[actNum] - 64,
width: 64,
height: 64,
x: _this.data.imgWidth - qrcodeH + 20,
y: _this.data.imgHeight - qrcodeH + qrcodeY,
width: qrcodeH -20,
height: qrcodeH -20,
url: res.data, //二维码
},
];
......@@ -441,7 +444,18 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {},
onShow(options) {
// wx.nextTick(()=>{
// let {senceData ,actNum, activeNavIdx} = this.data
// console.log('senceData: ', senceData,actNum,activeNavIdx);
// let item = senceData[actNum]?.productList[activeNavIdx].proName;
// console.log('item: ', item);
// wx.setNavigationBarTitle({
// title: item.proName,
// })
// })
},
/**
* 生命周期函数--监听页面隐藏
......
/* pages/checkProduct/checkProduct.wxss */
.productCon{
.productCon {
box-sizing: border-box;
padding-top: 88px;
display: block;
......@@ -12,7 +12,7 @@
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
z-index: 2;
.img-wrap {
position: absolute;
top: 20%;
......@@ -23,6 +23,81 @@
height: 311px;
// background-color: red;
overflow: auto;
.prod-item {
background-color: #f5f7fb;
.prod-item {
padding: 0 32rpx 32rpx;
margin: 16rpx auto 0;
// background-color: #f5f7fb;
// border-radius: 48rpx 48rpx 0 0;
}
.prod-card {
display: flex;
height: 120rpx;
background-image: linear-gradient(1deg, #ffffff 10%, #fdfcff 100%);
border: 2rpx solid #ffffff;
// box-shadow: 0 8rpx 20rpx 0 rgba(197, 205, 235, 0.35);
border-radius: 20rpx;
padding: 0 24rpx;
// box-sizing: border-box;
position: relative;
}
.prod-card .card-img {
padding-top: 10rpx;
width: 100rpx;
height: 100rpx;
flex-shrink: 0;
border-radius: 4rpx;
}
.img-desc {
position: absolute;
width: 104rpx;
height: 40rpx;
line-height: 40rpx;
background: #d7f5eb;
border-radius: 4rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 24rpx;
color: #24b38c;
letter-spacing: 0;
text-align: center;
}
.prod-info {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 12rpx 0;
margin-left: 24rpx;
}
.prod-info > text {
display: block;
white-space: nowrap;
// height: 40rpx;
// line-height: 40rpx;
}
.prod-info .title {
font-weight: 500;
font-size: 16rpx;
color: #323436;
}
.prod-info .sale,
.prod-info .earnings {
font-size: 16rpx;
color: #7a8299;
}
.prod-info .sale-num {
font-size: 14rpx;
color: #323436;
}
.prod-info .earnings-num {
font-size: 14rpx;
font-weight: Bold;
color: #f35251;
}
}
.img {
width: 100%;
// height: auto;
......@@ -55,7 +130,7 @@
color: #323436;
text-align: center;
}
.btn-wechat{
.btn-wechat {
width: auto;
margin: 0;
padding: 0;
......
<!--pages/checkProduct/checkProduct.wxml-->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">{{senceData[actNum].productList[activeNavIdx].proName}}</navigation-bar>
<!-- <view style="height:{{headerHeight}}px">
</view> -->
......@@ -10,6 +10,27 @@
<view class="share-wrap" wx:if="{{isShow}}">
{{IMG_URL}}
<view class="img-wrap">
<view class="prod-item">
<view class="prod-card">
<view class="card-img">
<!-- <text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png" /> -->
<image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
</view>
<view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<!-- senceData[actNum]['productList'][activeNavIdx].changeSale || -->
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text>
<text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
<!-- <view class="" bindtap="downVideo" data-src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/360_AR.mp4?v=" hover-class="none" hover-stop-propagation="false">
视频下载
</view> -->
</view>
</view>
<image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image mode="widthFix" class="img" src="{{item}}"/>
......
......@@ -2,6 +2,7 @@
<view class="customerManagementCon">
<!-- required hidden="{{hidden}}" -->
<scroll-view
style="{{ margin-right: 5px;}}"
wx:if="{{customerList.length}}"
scroll-y
enable-back-to-top
......
......@@ -19,9 +19,10 @@
&::after {
content: '';
width: 100%;
height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx;
height: 264rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-color: #fff;
// background-size: 100% 486rpx;
position: absolute;
left: 0;
top: 0;
......
......@@ -53,8 +53,6 @@ Component({
},
lifetimes: {
ready: function () {
console.log('this.data.wrapactiveNavIdx: ', this.data.wrapactiveNavIdx);
if(!this.data.outshowVideo){
this.setData({
......@@ -150,14 +148,26 @@ Component({
},
// 视频下载
downVideo(e){
let {src} = e.currentTarget.dataset
console.log('src: ', src);
wx.saveVideoToPhotosAlbum({
filePath: src,
success (res) {
console.log('视频下载',res)
}
})
let {url} = e.target.dataset
console.log(url)
wx.$api.showToast('正在下载视频...')
wx.downloadFile({
url:url,
success (res) {
// console.log(res,111)
if (res.statusCode === 200) {
wx.saveVideoToPhotosAlbum({
filePath: res.tempFilePath,
success (res) {
setTimeout(() =>{
wx.$api.showToast('下载成功!')
},2000)
}
})
}
}
})
},
saleTextChange(e) {},
changeTab(e) {
......@@ -172,9 +182,11 @@ wx.saveVideoToPhotosAlbum({
});
},
scrolltoupper(event) {
console.log(event.detail.scrollHeight,event.detail.scrollTop)
const idx = this.data.heightArr.findIndex(
(item) => item > event.detail.scrollTop
(item) => item > event.detail.scrollHeight
);
console.log('idx',idx)
this.setData({
curTabIdx: idx,
});
......@@ -197,6 +209,21 @@ wx.saveVideoToPhotosAlbum({
this.data.allHeight = heightArr[heightArr.length - 1];
})
.exec();
// let query = wx.createSelectorQuery().in(this);
// let heightArr = [];
// let s = 0;
// query
// .selectAll(".img-item")
// .boundingClientRect((react) => {
// react.forEach((item) => {
// // s += item.height;
// heightArr.push(item.top);
// });
// this.data.heightArr = heightArr;
// // console.log(heightArr[heightArr.length-1])
// this.data.allHeight = heightArr[heightArr.length - 1];
// })
// .exec();
},
// 获取用户信息
getUserInfo({ detail }) {
......@@ -213,10 +240,12 @@ wx.saveVideoToPhotosAlbum({
// console.log('phone: ', phone);
wx.$storage.set('wx_user_info', {...userInfo,phone});
// }
this.triggerEvent("authorized", {
phone,
// isShare: false,
});
setTimeout(()=>{
this.triggerEvent("authorized", {
phone,
// isShare: false,
});
},1e3)
//隐藏更多按钮,显示视频列表
this.setData({
getMoreBtn:true,
......
......@@ -147,8 +147,8 @@
}
.project-img {
height: 1600rpx;
white-space: nowrap;
// height: 1600rpx;
// white-space: nowrap;
.img-item {
position: relative;
}
......@@ -170,7 +170,7 @@
}
.stickyTab {
position: sticky;
z-index: 1;
z-index: 2;
background-color: #f5f7fb;
}
// .out-tab{
......@@ -329,6 +329,7 @@
font-size: 0;
}
.video-item {
position: relative;
width: calc(50% - 12rpx);
margin-bottom: 32rpx;
}
......@@ -337,6 +338,14 @@
height: 590rpx;
// border: 1rpx dashed #AFB0B2;
}
.video-item .download{
position: absolute;
top:0;
right: 2px;
font-size: 26rpx;
color: #666;
z-index: 1;
}
.video-item:nth-child(even) {
margin-left: 22rpx;
}
......
......@@ -25,9 +25,6 @@
<image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text>
</view>
<!-- <view class="" bindtap="downVideo" data-src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/360_AR.mp4?v=" hover-class="none" hover-stop-propagation="false">
视频下载
</view> -->
</view>
</view>
</view>
......@@ -86,6 +83,7 @@
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<view class="download" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}">视频下载</view>
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<view class="video-text">{{item.name}}</view>
</view>
......
......@@ -236,6 +236,34 @@ var senceData = [
}
]
},
{
name: '新车洽谈场景',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
src: `${IMG_URL}index/car1.png`,
// name: "新车洽谈场景",
msg: "1.0 新车权益销售",
"sceneCode":"SC001",
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '100',
// profit: '92.4万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0,
flow:10000,
"productCode":"PC001",
"productName":"数字无忧权益卡",
"category":"服务类",
}
]
},
]
......
......@@ -45,7 +45,33 @@ Page({
actNum: 3, //car 场景选择
tabIndx: 1,
navList: ['看线索', '看产品'],
typeList: ['联系电话', '意向客户', '线索来源', '重置'],
typeList: [
{
0: '无电话',
1: '有电话',
2: '联系电话',
selectIndex: 2,
key: 'hasPhone'
},
{
0: '非意向客户',
1: '是意向客户',
2: '意向客户',
selectIndex: 2,
key: 'starTag'
},
{
0: '来自访客',
1: '来自门店',
2: '线索来源',
selectIndex: 2,
key: 'clueSource'
},
{
2: '重置',
selectIndex: 2
}
],
clueList: [],
// 预估弹框
visible: false,
......@@ -256,16 +282,16 @@ Page({
this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
if (i.profit) {
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
let sale = `senceData[${index}].productList[${lastIndex}].sale`
let name = `senceData[${index}].productList[${lastIndex}].profit`
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`
let profit = _this.formula(i.productType, sales, flow)
console.log(name, profit)
this.setData({
[name]: profit,
[sale]: sales,
[flowKey]: flow,
});
[flowKey]: flow
})
}
})
})
......@@ -317,11 +343,11 @@ Page({
break
case 'protectMembrane':
// 漆面保护膜
profit = (flow * 0.05 * 3000 * 12).toFixed(0)
profit = (sales * 0.05 * 3000 * 12).toFixed(0)
break
case 'colorMembrane':
// 改色膜
profit = (flow * 0.05 * 5000 * 12).toFixed(0)
profit = (sales * 0.05 * 5000 * 12).toFixed(0)
break
case 'digitBeauty':
// 数字化美容
......@@ -478,65 +504,69 @@ Page({
this.getTagApi(params)
},
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
let itemList = []
let params = {
clueSource: '',
hasPhone: '',
starTag: ''
}
console.log('index: ', index)
switch (index) {
case 0:
itemList = ['无', '有']
break
case 1:
itemList = ['否', '是']
break
case 2:
itemList = ['访客', '门店'] //线索来源(1访客,2门店)
break
case 3:
params = {
clueSource: '',
hasPhone: '',
starTag: ''
}
break
// let itemList = []
// let params = {
// clueSource: '',
// hasPhone: '',
// starTag: ''
// }
// console.log('index: ', index)
// 重置筛选
if (index == 3) {
typeList.forEach(item => {
item.selectIndex = 2
})
this.setData({
typeList
})
return this.getPageApi()
}
let itemList = Object.values(typeList[index]).slice(0, 2)
itemList.push('全部')
let _this = this
wx.pro.showActionSheet({
itemList,
success(res) {
let num
if (index == 2) {
num = res.tapIndex + 1
} else {
num = res.tapIndex
}
switch (index) {
case 0:
params.hasPhone = num
break
case 1:
params.starTag = num
break
case 2:
params.clueSource = num
break
}
// 选中全部
let selectIndex = res.tapIndex
typeList[index].selectIndex = selectIndex
let params = typeList.reduce((obj, item, index) => {
if (item['key']) {
selectIndex = index == 2 ? selectIndex + 1 : selectIndex
let itemIndx = item.selectIndex
obj[item['key']] = itemIndx == 2 ? '' : itemIndx
}
return obj
}, {})
console.log(params)
// let num
// if (index == 2) {
// num = res.tapIndex + 1
// } else {
// num = res.tapIndex
// }
// switch (index) {
// case 0:
// params.hasPhone = num
// break
// case 1:
// params.starTag = num
// break
// case 2:
// params.clueSource = num
// break
// }
_this.setData({ typeList })
_this.getPageApi(params)
},
fail(res) {
console.log(res.errMsg)
},
complete(res) {
console.log('res: ', res)
}
})
if (index == 3) {
this.getPageApi(params)
}
},
// 打电话
phoneCallFn(e) {
......
......@@ -3,6 +3,7 @@ page {
width: 100vw;
background-color: #F2F3F7 !important;
}
.reclaim {
.header-wrap {
position: sticky;
......@@ -10,7 +11,7 @@ page {
width: 100%;
background-size: 100% 100%;
margin-bottom: 32rpx;
z-index: 1;
z-index: 2;
.header {
position: absolute;
left: 0;
......@@ -20,12 +21,15 @@ page {
display: flex;
justify-content: space-between;
align-items: center;
.tabContainer {
width: 60%;
}
.left {
display: flex;
align-items: center;
.clue {
position: relative;
margin-left: 24px;
......@@ -34,13 +38,16 @@ page {
font-size: 14px;
color: #8a8c90;
}
.product {
position: relative;
}
.act {
font-weight: 600;
font-size: 22px;
color: #323436;
&::after {
position: absolute;
left: 50%;
......@@ -55,13 +62,16 @@ page {
}
}
}
.right {
display: flex;
align-items: center;
.img {
width: 40rpx;
height: 40rpx;
}
.apply {
margin-left: 4px;
margin-right: 16px;
......@@ -72,16 +82,19 @@ page {
}
}
}
// .content{
// position: relative;
// }
.clue {
padding: 0px 10px 0;
background-color: #f2f3f7;
.types {
margin-bottom: 8px;
display: flex;
align-items: center;
.type {
margin-left: 8px;
display: flex;
......@@ -94,13 +107,19 @@ page {
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
.active {
color: #3964fe;
}
}
.list {
.msg {
padding: 10px 16px 16px;
......@@ -109,6 +128,7 @@ page {
background-color: #fff;
border-radius: 4px;
}
.like {
position: absolute;
right: 12px;
......@@ -116,44 +136,52 @@ page {
width: 23px;
height: 23px;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 14px;
color: #323436;
.avatar {
margin-left: 2px;
width: 20px;
height: 20px;
}
}
.line {
margin-top: 10px;
margin-bottom: 10px;
height: 0;
border-bottom: #eeeeee 1px dashed;
}
.want-more {
overflow: hidden;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
margin-top: 4px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #393b3e;
}
// .action{
// }
......@@ -165,18 +193,22 @@ page {
color: #8a8c90;
}
}
.info {
margin-top: 10px;
display: flex;
justify-content: space-between;
.phone-wrap {
display: flex;
align-items: center;
}
.phone {
font-size: 12px;
color: #3666fe;
}
.phone-img {
margin-left: 12px;
margin-right: 8px;
......@@ -184,11 +216,13 @@ page {
height: 20px;
border-radius: 50%;
}
.copy {
width: 20px;
height: 20px;
border-radius: 50%;
}
.btn {
width: 85px;
height: 24px;
......@@ -200,11 +234,13 @@ page {
line-height: 24px;
}
}
.noDataImg {
width: 512rpx;
height: 512rpx;
margin-left: 100rpx;
position: relative;
.noDataTxt {
font-family: PingFangSC-Regular;
font-size: 24rpx;
......@@ -215,16 +251,19 @@ page {
transform: translateX(-50%);
}
}
.shop {
.name-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.source {
font-size: 10px;
color: #8a8c90;
}
.btn {
border: 1px solid var(--btnColor);
border-radius: 12px;
......@@ -232,14 +271,17 @@ page {
font-size: 12px;
color: var(--btnColor);
}
.shop-action-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.shop-record {
width: 100%;
}
.shop-source {
margin-top: 4px;
width: 100%;
......@@ -249,17 +291,20 @@ page {
}
}
}
.scene {
margin: 0 10px 16px;
display: flex;
justify-content: space-between;
.item-wrap {
// margin-right: 4px;
position: relative;
width: 86px;
height: 90px;
border-radius:10px;
border-radius: 10px;
}
.item {
// padding-top: 10px;
width: 86px;
......@@ -267,28 +312,32 @@ page {
background: #f7f8fc;
border-radius: 6px;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
box-shadow: 0 0 10px #999;
&::after{
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display:block;
display: block;
content: "";
width:6px;
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
......@@ -296,6 +345,7 @@ page {
width: 28px;
height: 28px;
}
.name {
margin-bottom: 2px;
font-weight: 500;
......@@ -303,6 +353,7 @@ page {
color: #323436;
text-align: center;
}
.msg {
font-weight: 400;
font-size: 9px;
......@@ -311,9 +362,11 @@ page {
}
}
}
.guide {
width: 100%;
height: 100%;
.guide-img {
position: fixed;
top: 0;
......@@ -323,6 +376,7 @@ page {
z-index: 2;
}
}
.chat {
position: fixed;
right: -4px;
......@@ -330,8 +384,9 @@ page {
width: 60px;
height: 60px;
border-radius: 50%;
z-index: 1;
z-index: 2;
}
.output-value {
position: fixed;
right: 5px;
......@@ -341,6 +396,7 @@ page {
// border-radius: 50%;
z-index: 1;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
......@@ -349,31 +405,36 @@ page {
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45,45,51,0.50);
background-color: rgba(45, 45, 51, 0.50);
z-index: 1;
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
height: 744rpx;
background-color: #fff;
box-shadow: 0 -8rpx 20rpx 0 rgba(180,186,204,0.32);
box-shadow: 0 -8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 32rpx 32rpx 0 0;
}
.dialog-header {
display: flex;
justify-content: space-between;
padding: 32rpx 48rpx;
border-bottom: 1rpx solid #eee;
}
.header-btn {
display: inline-block;
font-size: 32rpx;
line-height: 48rpx;
}
.btn-gray {
color: #6C737A;
}
.btn-primary {
background-color: #fff;
border: none;
......@@ -381,14 +442,17 @@ page {
padding: 0;
font-weight: 500;
color: #5850FF;
width:auto;
width: auto;
}
.btn-primary::after {
border: none;
}
.dialog-content {
padding: 40rpx 24rpx 60rpx;
}
.dialog-title {
font-weight: 600;
font-size: 36rpx;
......@@ -398,14 +462,16 @@ page {
line-height: 56rpx;
margin-bottom: 24rpx;
}
.dialog-form {
width: 100%;
height: 384rpx;
background-image: linear-gradient(179deg, rgba(123,112,255,0.02) 15%, rgba(99,92,255,0.10) 100%);
background-image: linear-gradient(179deg, rgba(123, 112, 255, 0.02) 15%, rgba(99, 92, 255, 0.10) 100%);
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
......@@ -413,11 +479,13 @@ page {
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 216rpx;
padding: 16rpx 20rpx;
......@@ -426,10 +494,12 @@ page {
margin-left: 64rpx;
margin-right: 16rpx;
}
.form-unit {
font-size: 28rpx;
color: #6E6E7A;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
......@@ -444,5 +514,4 @@ page {
line-height: 48rpx;
margin-top: 40rpx;
}
}
}
\ No newline at end of file
......@@ -34,7 +34,7 @@ Page({
wx.$storage.rm('sessionId')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('userInfo')
wx.$router.go('login.index')
wx.$router.reLaunch('login.index')
})
}
}
......
......@@ -26,6 +26,7 @@ page {
content: '';
width: 100%;
height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/personal/bg.webp') no-repeat;
background-size: 100% 486rpx;
position: absolute;
left: 0;
......
......@@ -64,6 +64,20 @@
background-size: 100% 100%; */
}
.active::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
/* 选中 - end */
.scene-title {
......
......@@ -6,7 +6,8 @@ const IMAGES = {
arrow: `${IMG_URL}/output/arrow.png`,
funnel: `${IMG_URL}/output/funnel.png`,
money: `${IMG_URL}/output/money.png`,
paper: `${IMG_URL}/output/paper.png`
paper: `${IMG_URL}/output/paper.png`,
link: `${IMG_URL}/output/link.webp`
}
Component({
/**
......@@ -31,6 +32,7 @@ Component({
current: 0,
totalMoney: 0,
totalOrder: 0,
startInd: 0,
list: [],
nowList: [],
todayList: [],
......@@ -78,14 +80,20 @@ Component({
let that = this
let { index } = e.currentTarget.dataset
let { dataObj, userInfo, list } = this.data
const itemList = ['本月', '本日', '全部']
wx.showActionSheet({
// '全部'
itemList: ['本月', '本日'],
itemList,
// 先处理成全部默认去请求
success(res) {
// if (res.tapIndex!=2) {
// let parmas =
let key = res.tapIndex == 0 ? 'monthTime' : 'todayTime'
const keyName = {
0: 'monthTime',
1: 'todayTime',
2: 'defaultTime'
}
let key = keyName[res.tapIndex]
let merchantId = list[index]['merchantId']
let params = {
partnerMerchantId: userInfo.merchantId, // userInfo.merchantId
......@@ -97,7 +105,7 @@ Component({
.getMerchantById(params)
.then(result => {
console.log(result)
that.setMerchantObj(index, result)
that.setMerchantObj(index, result, itemList[res.tapIndex])
})
.catch(err => {})
......@@ -120,10 +128,15 @@ Component({
startTime: `${month}-01 00:00:00`,
endTime: `${month}-${today} 23:59:59`
}
const defaultTime = {
startTime: '',
endTime: ''
}
this.setData({
dataObj: {
todayTime,
monthTime
monthTime,
defaultTime
}
})
},
......@@ -200,7 +213,8 @@ Component({
if (!list[index]['showList'][sceneIdx - 1]) return
list[index].startInd = sceneIdx - 1
this.setData({
list
list,
startInd: sceneIdx
})
},
getMerchantById(params) {
......@@ -217,10 +231,11 @@ Component({
})
})
},
setMerchantObj(index, item) {
setMerchantObj(index, item, selectName) {
console.log(item)
item = item[0]
let obj = {}
obj.selectName = selectName
obj.totalMoney = item?.totalMoney || 0
obj.totalOrder = item?.totalOrder || 0
obj.merchantName = item?.merchantName
......@@ -236,7 +251,8 @@ Component({
let { list } = this.data
// item.list[index] = list[index]
console.log('listObj', listObj)
// console.log('listObj', listObj)
console.log(obj.selectName)
let listObj = `list[${index}]`
this.setData({
[listObj]: Object.assign(list[index], obj)
......@@ -248,7 +264,8 @@ Component({
let { current } = e.detail
this.setData({
totalMoney: list[current].totalMoney,
totalOrder: list[current].totalOrder
totalOrder: list[current].totalOrder,
startInd: 0
})
// list
if (current >= 1 && list[current + 1] && list[current + 1].startInd == -1) {
......
......@@ -236,7 +236,7 @@
}
.short {
height: 1050rpx !important;
height: 1150rpx !important;
}
.funneItem:nth-of-type(1) {
......@@ -244,9 +244,17 @@
}
.navOhterApp {
display: flex;
align-items: center;
box-sizing: border-box;
font-size: 24rpx;
color: #5C7097;
// margin: 50rpx 20rpx 0;
margin-bottom: 50rpx;
.linkImg{
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
margin-right: 10rpx;
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
<!-- sceneIndx==3? 'short': -->
<swiper
indicator-dots="{{indicatorDots}}"
class="full"
class=" {{startInd ==4?'short':'full'}}"
autoplay="{{autoplay}}"
bindchange="swiperChange"
interval="{{interval}}"
......@@ -28,7 +28,7 @@
<view class="contitle">
<view class="name">{{item.merchantName}}</view>
<view class="select" data-index="{{index}}" bind:tap="pickSheet">
<view>全部</view>
<view>{{item.selectName||'全部'}}</view>
<image
class="arrow {{isAct?'isAct':''}}"
webp
......@@ -114,6 +114,7 @@
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
......
......@@ -9,7 +9,7 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 0,
agree: true,
tabIndx: 0,
tabIndx: 1,
tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: false,
subIndex: -1,
......
......@@ -24,9 +24,11 @@
&::after {
content: '';
width: 100%;
height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx;
// height: 486rpx;
height: 264rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.bg') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
......@@ -45,6 +47,13 @@
// background-color: #fff;
}
.comCom::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
}
.navigation-title {
......
const _routeHooks = Symbol('_routeHooks')
const _query = Symbol('_query')
const _routerList = Symbol('_routerList')
import { IMG_URL } from '~/utils/constantData'
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
import { generateRoutList } from './wxOnAppRoute.js'
import { getNavigationBarTitleText } from '~/utils/cache/storageApi'
import { getUserInfo } from '~/utils/cache/userInfo'
......@@ -15,8 +15,8 @@ class Router {
wx.onAppRoute(e => {
let thisPage = this.getPageInstance()
if (thisPage) {
thisPage.setData({ IMG_URL })
if(Object.keys(this[_query]).length) thisPage.options = {
thisPage.setData({ IMG_URL, img_version: IMG_VERSION() })
if (Object.keys(this[_query]).length) thisPage.options = {
...thisPage.options,
...this[_query]
}
......@@ -58,7 +58,7 @@ class Router {
return pages[pages.length - size]
}
checkRouter(route, events) {
checkRouter (route, events) {
this[_query] = events || {}
const [_parent, _name, last_name] = route.split('.')
let name = route
......@@ -95,7 +95,7 @@ class Router {
}
}
/**跳转至H5 */
jumpH5(url) {
jumpH5 (url) {
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
})
......@@ -103,7 +103,7 @@ class Router {
/**页面跳转
*
*/
jump(e) {
jump (e) {
const item = e.currentTarget.dataset
this.go(item.url, item)
}
......@@ -111,7 +111,7 @@ class Router {
* 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 ||
* 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 $router.back() 可以返回到原页面。小程序中页面栈最多十层
*/
go(route, events) {
go (route, events) {
let { routerMapItem, query } = this.checkRouter(route, events)
if (routerMapItem.isTab) {
wx.switchTab({
......@@ -125,14 +125,14 @@ class Router {
}
}
/**关闭所有页面,打开到应用内的某个页面 */
reLaunch(route, events) {
reLaunch (route, events) {
let { routerMapItem, query } = this.checkRouter(route, events)
wx.reLaunch({
url: `${routerMapItem.url}${query}`
})
}
/**关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。 */
redirectTo(route, events) {
redirectTo (route, events) {
let { routerMapItem, query } = this.checkRouter(route, events)
wx.redirectTo({
url: `${routerMapItem.url}${query}`
......@@ -141,7 +141,7 @@ class Router {
/**prevPageSize = 1
* 返回上prevPageSize页
* callBack返回上prevPageSize页对象 */
back(callBack, prevPageSize = 1) {
back (callBack, prevPageSize = 1) {
let prevPage = this.getPageInstance(Number(prevPageSize) + 1)
if (callBack && 'function' === typeof callBack) callBack(prevPage)
wx.navigateBack({
......@@ -150,18 +150,18 @@ class Router {
this.goHome()
})
}
goHome() {
goHome () {
let [index] = this[_routerList]
wx.reLaunch({
url: index.url
})
}
/**获取上一个页面传的数据 */
getData(callBack) {
getData (callBack) {
const data = this.getPageInstance().getOpenerEventChannel()
if (Object.keys(data).length !== 0) data.on('getData', res => callBack(res))
}
onRoute(fn) {
onRoute (fn) {
this[_routeHooks].push(fn)
return () => {
const i = list.indexOf(fn)
......
......@@ -16,3 +16,8 @@ export const STORAGE_OBJECTkEY = {
firstLogin:'firstLogin',
authphone:'authphone'
}
export const IMG_VERSION = () =>{
const accountInfo = wx.getAccountInfoSync()
return accountInfo.miniProgram.version || '1.0.0'
}
\ No newline at end of file
......@@ -116,7 +116,7 @@ class Share {
USERINFO
} = this.getCommonData(),
thisPage = wx.$router.getPageInstance()
query = `${query? `?${query}&`:'?'}merchantId=${thisPage.merchantId ||USERINFO.merchantId}&shareOpenId=${thisPage.shareOpenId || WXUSERINFO.openId}&sharePhone=${thisPage.sharePhone || USERINFO.phone}`
query = `${query? `?${query}&`:'?'}merchantId=${thisPage.merchantId ||USERINFO.merchantId || ''}&shareOpenId=${thisPage.shareOpenId || WXUSERINFO.openId || ''}&sharePhone=${thisPage.sharePhone || USERINFO.phone || ''}`
return query
}
reportShareData(shareTrackData) {
......
import wxqrcode from '~/utils/lib/wxqrcode.js'
import wxqrcode from "~/utils/lib/wxqrcode.js";
/**
* 微信校验通知类工具封装
*/
const tipsObj = {
phone: {
icon: 'error',
title: '请输入手机号'
icon: "error",
title: "请输入手机号",
},
username: {
icon: 'error',
title: '请输入用户名'
icon: "error",
title: "请输入用户名",
},
password: {
icon: 'error',
title: '请输入密码'
}
}
icon: "error",
title: "请输入密码",
},
};
/**
* 禁止滑动
*/
const noScroll = () => {}
const noScroll = () => {};
/**设置粘贴板内容 */
const setCopyData = (data, callBack) => {
wx.setClipboardData({
data: data,
success(res) {
if (callBack && typeof callBack === 'function') callBack(res)
}
})
}
if (callBack && typeof callBack === "function") callBack(res);
},
});
};
/**
* 防止重复点击
*/
const showLoading = (title = '') => {
const showLoading = (title = "") => {
if (wx.showLoading) {
// 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理
wx.showLoading({
title,
mask: true
})
mask: true,
});
} else {
// 低版本采用Toast兼容处理并将时间设为20秒以免自动消失
wx.showToast({
title,
icon: 'loading',
icon: "loading",
mask: true,
duration: 20000
})
duration: 20000,
});
}
}
};
const hideLoading = () => {
if (wx.hideLoading) {
// 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理
wx.hideLoading()
wx.hideLoading();
} else {
wx.hideToast()
wx.hideToast();
}
}
const showToast = val => {
let obj = {}
if (val && typeof val === 'string') {
obj.title = val
obj.icon = 'none'
};
const showToast = (val) => {
let obj = {};
if (val && typeof val === "string") {
obj.title = val;
obj.icon = "none";
} else {
obj = val
obj = val;
}
return wx.showToast(obj)
}
return wx.showToast(obj);
};
/**
*
......@@ -80,78 +80,98 @@ const showToast = val => {
const wxShowToast = (name, params) => {
if (arguments.length == 2) {
wx.showToast({
title: tipsObj[name]['title'],
icon: tipsObj[name]['icon'],
...params
})
title: tipsObj[name]["title"],
icon: tipsObj[name]["icon"],
...params,
});
} else {
wx.showToast({
...params
})
...params,
});
}
}
};
/**获取设备信息 */
const getSystemInfo = callBack => {
const getSystemInfo = (callBack) => {
wx.getSystemInfo({
success(res) {
callBack(res)
callBack(res);
},
fail(err) {
callBack(err)
}
})
}
callBack(err);
},
});
};
/**拨打电话 */
const phoneCall = phoneNumber => {
const phoneCall = (phoneNumber) => {
wx.makePhoneCall({
phoneNumber: `${phoneNumber}`
})
}
phoneNumber: `${phoneNumber}`,
});
};
/**查看大图 */
const previewImage = params => {
wx.previewImage(params)
}
const 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)
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)
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',
encoding: "binary",
success() {
resolve(filePath)
resolve(filePath);
},
fail() {
reject(new Error('ERROR_BASE64SRC_WRITE'))
}
})
})
}
base64src(qr).then(res => {
console.log(res)
reject(new Error("ERROR_BASE64SRC_WRITE"));
},
});
});
};
base64src(qr).then((res) => {
console.log(res);
wx.getImageInfo({
src: res,
success(obj) {
wx.showShareImageMenu({
path: obj.path
})
path: obj.path,
});
},
fail() {}
})
})
fail() {},
});
});
}
/**获取节点信息
* name(id获取class)
* callBack 回调函数
* isComponents是否在组件
*/
const getViewInfo = (name, callBack, isComponents) => {
const query = !isComponents
? wx.createSelectorQuery()
: wx.createSelectorQuery().in(isComponents);
query
.selectAll(name)
.boundingClientRect((res) => {
console.log('res: ', res);
callBack(res);
})
.exec();
};
const wxApi = {
previewImage,
getSystemInfo,
......@@ -160,7 +180,8 @@ const wxApi = {
setCopyData,
showToast,
phoneCall,
noScroll
}
noScroll,
getViewInfo,
};
export default wxApi
export default wxApi;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!