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