Commit a04de189 by 张立顺

冲突解决

2 parents 9c39825b 8e713c53
Showing 121 changed files with 2049 additions and 524 deletions
project.config.json project.config.json
project.private.config.json project.private.config.json
sitemap.json sitemap.json
miniprogram_npm
node_modules
# local env files # local env files
.env.local .env.local
......
## 正式版appid wx2c28337db96364d2 ## 正式版appid wx2c28337db96364d2
## 体验版appid wx24ebae5768e74138 ## 体验版appid wx24ebae5768e74138
#### computed和watch方法使用
先导入并混合
```
// 注意: computed 函数中不能访问 this ,只有 data 对象可供访问
```
```js
// 导入方法
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
// 混入
behaviors: [computedBehavior],
// 使用
computed: {
test(data) {
return data.bgUrl + data.test
}
},
// 默认已深度监听
watch: {
'test, pages': function (a, b) {
console.log(a)
// this.setData({
// sum: a + b,
// })
}
},
```
/**
* 申请门店开通
*/
// import api from '~/utils/request/request'
// const serverApi = {
// productByscene:'scrm.api.busassistant.activity.productByscene'
// }
// export const productBysceneApi = (data) =>{
// return api.post(
// {
// method: serverApi.productByscene,
// ...data
// },
// true
// )
// }
...@@ -84,5 +84,28 @@ class outputApi { ...@@ -84,5 +84,28 @@ class outputApi {
...data ...data
}) })
} }
/**长按海报埋点 */
reportPosterTrack(data) {
return api.post({
method: 'scrm.api.busassistant.crowdFunding.poster.shared.createRecord',
...data
})
}
/**获取活动最新战报 */
getNewReportUrl(data) {
return api.post({
method: 'scrm.api.stoassistant.crowd.activity.newest.report',
...data
})
}
/**获取最新喜报 */
getNewGoodUrl(data) {
return api.post({
method: 'scrm.api.busassistant.crowdFunding.good.report',
...data
})
}
} }
export default outputApi export default outputApi
...@@ -50,6 +50,7 @@ App({ ...@@ -50,6 +50,7 @@ App({
// 存储设备信息 // 存储设备信息
setSystem_info() setSystem_info()
// console.log('test')
}, },
onShow(options) { onShow(options) {
...@@ -59,6 +60,5 @@ App({ ...@@ -59,6 +60,5 @@ App({
onPageNotFound(e) { onPageNotFound(e) {
wx.$router.goHome() wx.$router.goHome()
}, },
onHide() {}, onHide() {}
globalData: {}
}) })
{ {
"pages": [ "pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "login/index/index", "login/accountItems/accountItems", "pages/checkProduct/checkProduct"],
"login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/mine/mine",
"pages/webView/webView",
"pages/apply/apply",
"login/index/index",
"login/accountItems/accountItems",
"pages/checkProduct/checkProduct",
"packageOutput/pages/summary/summary",
"packageOutput/pages/openBusiness/openBusiness",
"pages/mineDetail/customerManagement/customerManagement",
"pages/mineDetail/messageBox/messageBox"
],
"requiredPrivateInfos": ["getLocation"], "requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
...@@ -47,15 +33,46 @@ ...@@ -47,15 +33,46 @@
} }
] ]
}, },
"subpackages": [], "subpackages": [
{
"root": "packagesList/packageOutput",
"name": "packageOutput",
"pages": ["pages/openBusiness", "pages/summary"]
},
{
"root": "packagesList/mineDetail",
"name": "mineDetail",
"pages": ["pages/messageBox", "pages/customerManagement"]
},
{
"root": "packagesList/webView",
"name": "webView",
"pages": ["pages/webView"]
},
{
"root": "packagesList/apply",
"name": "apply",
"pages": ["pages/apply"]
}
],
"preloadRule": {
"pages/tab/mine/mine": {
"network": "all",
"packages": ["mineDetail"]
},
"pages/tab/index/index": {
"network": "all",
"packages": ["apply", "packageOutput"]
}
},
"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", "nothing-tips": "/components/Nothing-tips/nothingTips",
"crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster" "crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster",
"glsx-image": "/components/image/index"
}, },
"style": "v2",
"resolveAlias": { "resolveAlias": {
"~/*": "/*" "~/*": "/*"
}, },
......
@import "/style/common.wxss"; @import "/style/common.wxss";
/* @font-face {
font-family: "Gotham";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/Gotham-Black.woff");
} */
/* @font-face {
font-family: "number";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/Alimama_ShuHeiTi_Bold_Number.ttf");
} */
@font-face {
font-family: "number";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/subset-AlimamaShuHeiTi-Bold.woff");
}
page { page {
background-color: #F7F7F7; background-color: #F7F7F7;
color: #282829; color: #282829;
...@@ -16,6 +31,10 @@ image { ...@@ -16,6 +31,10 @@ image {
vertical-align: top; vertical-align: top;
} }
.font-number {
font-family: 'number';
}
.icon-mine-arrow { .icon-mine-arrow {
width: 16rpx !important; width: 16rpx !important;
height: 28rpx !important; height: 28rpx !important;
......
...@@ -6,68 +6,102 @@ Component({ ...@@ -6,68 +6,102 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
// 默认母链海报 不是须样式须单独处理 通过item.type 区分类型
item: { item: {
type: Object, type: Object,
observer(n) { observer(n) {
this.check(n).then(res => { // 如果是喜报和战报就跳过图片生成
if (res) this.setData({ if (n.type == 'warReport') {
poster: res, // n.posterUrl
wx.$api.showLoading('图片加载中')
return this.setData({
poster: n.posterUrl,
show: true show: true
}) })
else this.begin() }
}).catch(() => this.begin())
n.posterUrl &&
this.checkUrl()
.then(result => {
result &&
this.setData({
poster: result,
show: true
})
})
.catch(err => {
console.log(err)
this.begin()
})
} }
}, },
findKey: { scrollImg: {
type: String, type: Boolean,
value: 'activityId' value: true
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: {}, data: {
_item_: null,
findKey: 'posterUrl',
height: '68%'
// poster: 'https://wx.glsx.com.cn/upload/biz/599036445419769856.png'
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
begin() { successOnload() {
let { // debugger
item // console.log('a123456')
} = this.data wx.$api.hideLoading()
item.posterUrl && this.getImageInfo(item) // this.setData({
// show: true
// })
}, },
check(n) { // 图片缓存 有取小程序缓存图片
checkUrl() {
console.log('checkUrl')
let { item: postObj } = this.data
const fileList = wx.$storage.get('fileList') || [], const fileList = wx.$storage.get('fileList') || [],
fn = wx.getFileSystemManager(), fn = wx.getFileSystemManager(),
{ { findKey } = this.data
findKey
} = this.data
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// return reject()
if (fileList.length) { if (fileList.length) {
fn.readdir({ fn.readdir({
dirPath: wx.env.USER_DATA_PATH, dirPath: wx.env.USER_DATA_PATH,
success({ success({ files }) {
files let obj = fileList.find(e => e[findKey] === postObj[findKey])
}) { const poster = files.find(s => obj?.path.includes(s))
console.log(files, '文件列表')
if (files.length < 21) {
let item = fileList.find(e => e[findKey] === n[findKey])
if (item) {
const poster = files.find(s => s.includes(item.fileId))
wx.hideLoading() wx.hideLoading()
if (poster) resolve(`${wx.env.USER_DATA_PATH}/${poster}`) // console.log(poster)
else reject() // 处理图片文件缓存太多的问题
} else reject() let filesLength = files.length
} else { console.log(files)
wx.$storage.rm('fileList') if (filesLength > 21) {
files.map(e => { files.map((e, index) => {
// debugger
// console.log(filesLength - index > 21)
filesLength - index > 21 &&
index != 0 &&
fn.unlink({ fn.unlink({
filePath: `${wx.env.USER_DATA_PATH}/${e}` filePath: `${wx.env.USER_DATA_PATH}/${e}`,
fail(res) {
console.error(res)
}
}) })
}) })
}
// console.log(poster)
if (poster) {
resolve(`${wx.env.USER_DATA_PATH}/${poster}`)
} else {
reject() reject()
} }
} }
...@@ -75,44 +109,89 @@ Component({ ...@@ -75,44 +109,89 @@ Component({
} else reject() } else reject()
}) })
}, },
getImageInfo(n, width, height) { begin() {
let { item } = this.data
item.posterUrl && this.getImageInfo(item)
},
check(n) {
this.setData({
_item_: n
})
},
getImageInfo(n) {
// console.log(n)
wx.$api.showLoading('处理中') wx.$api.showLoading('处理中')
let that = this let that = this
wx.getImageInfo({ wx.getImageInfo({
src: `${n.posterUrl}?v=${Date.now()}`, src: `${n.posterUrl}?v=${Date.now()}`,
success: function (res) { success: function (res) {
console.log(res) // console.log(res)
// w = res.width // w = res.width
// h = res.height // h = res.height
that.init(n, res.width, res.height) that.init(n, res.width, res.height)
}, },
fail: function (res) { fail: function (res) {
console.log(res) // console.log(res)
wx.$api.showToast('生成失败') wx.$api.showToast('生成失败')
} }
}) })
}, },
async init(n, ImgWidth, ImgHeight) { async init(n, ImgWidth, ImgHeight) {
let proportion = ImgWidth / 247 const { findKey } = this.data
let actualHeight = ImgHeight / proportion // debugger
console.log(actualHeight) // const {pixelRatio} = wx.getWindowInfo()
n.activityName = n.activityName.length > 12 ? `${n.activityName.substring(0, 12)}...` : n.activityName let actualWidth = 247 //默认宽度
const drawfun = new Draw({ let canvasHeight = 1959 //最大高度
width: 279, let proportion = ImgWidth / actualWidth //图片实例化对应的比例
let actualHeight = ImgHeight / proportion //实际高度
// 解决 createOffscreenCanvas 最大高度不能超过4096的问题
// 这个 pixelRatio 不写是默认两倍 需转换计算
if (actualHeight > canvasHeight) {
actualWidth = actualWidth / (actualHeight / canvasHeight)
actualHeight = canvasHeight
}
// console.log(actualHeight)
// 默认母链海报 不是须单独处理
this.setData({
width: actualWidth + 32,
height: actualHeight + 82
})
const drawfun = new Draw( // 大画布
{
// height: 554 // height: 554
height: 82 + actualHeight width: actualWidth + 32,
height: actualHeight + 82
// pixelRatio
}, },
this this
), ),
{ userInfo } = wx.$storage.get(),
merchantName = userInfo.merchantName.length > 12 ? `${userInfo.merchantName.substring(0, 12)}...` : userInfo.merchantName
console.log(merchantName)
// console.log(n.activityName)
let imageList = [],
textList = []
// debugger
if (n.type == 'warReport') {
imageList = [
{ {
userInfo x: 0,
} = wx.$storage.get(), y: 0,
merchantName = userInfo.merchantName.length > 12 ? `${userInfo.merchantName.substring(0, 12)}...` : userInfo.merchantName, width: actualWidth + 32,
height: actualHeight + 82,
url: n.posterUrl
}
]
textList = []
} else {
n.activityName = n.activityName.length > 12 ? `${n.activityName.substring(0, 12)}...` : n.activityName
imageList = [
{ {
findKey
} = this.data,
res = await drawfun.begin({
imageList: [{
x: 0, x: 0,
y: 0, y: 0,
width: 279, width: 279,
...@@ -122,12 +201,13 @@ Component({ ...@@ -122,12 +201,13 @@ Component({
{ {
x: 16, x: 16,
y: 70, y: 70,
width: 247, width: actualWidth,
height: actualHeight, height: actualHeight,
url: n.posterUrl url: n.posterUrl
} }
], ]
textList: [{ textList = [
{
x: 12, x: 12,
y: 14, y: 14,
fontSize: 14, fontSize: 14,
...@@ -160,19 +240,51 @@ Component({ ...@@ -160,19 +240,51 @@ Component({
} }
} }
] ]
}
let res = await drawfun.begin({
imageList,
textList
}) })
console.log(res) // console.log(res)
wx.hideLoading() wx.hideLoading()
this.setData({ this.setData({
poster: res.path, poster: res.path,
show: true show: true
}) })
let fileList = wx.$storage.get('fileList') || [] let fileList = wx.$storage.get('fileList') || []
fileList.push({ // console.log([findKey])
// this.setData({
// [findKey]: n[findKey]
// })
// 去重
// debugger
// let fileLength = fileList.length
let obj = {
fileId: res.fileId, fileId: res.fileId,
path: res.path, path: res.path,
[findKey]: n[findKey] [findKey]: n[findKey]
}) }
// console.log(fileLength)
// if (fileLength) {
// fileList.forEach((item, index) => {
// // console.log(index)
// console.log(condition.posterUrl == n.posterUrl)
// if (condition.posterUrl == n.posterUrl) {
// item = obj
// } else if (index == fileLength) {
// fileList.unshift(obj)
// }
// })
// } else {
// fileList.unshift(obj)
// }
fileList.unshift(obj)
// console.log(fileList)
// fileList = [...fileList, ...fileList]
fileList = fileList.slice(0, 21)
// console.log(fileList)
wx.$storage.set('fileList', fileList) wx.$storage.set('fileList', fileList)
}, },
download() { download() {
...@@ -190,6 +302,7 @@ Component({ ...@@ -190,6 +302,7 @@ Component({
}) })
}, },
hide() { hide() {
console.log('hide')
this.setData({ this.setData({
show: false, show: false,
poster: '' poster: ''
...@@ -200,6 +313,10 @@ Component({ ...@@ -200,6 +313,10 @@ Component({
this.setData({ this.setData({
showAuth: true showAuth: true
}) })
},
longpress() {
let { item } = this.data
this.triggerEvent('longtouch', item)
} }
} }
}) })
{ {
"component": true, "component": true
"usingComponents": {
"authorize":"/components/Authorize/Authorize"
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -5,43 +5,80 @@ ...@@ -5,43 +5,80 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100vw;
height: 100vh;
z-index: 998; z-index: 998;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.bg { .bg {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
background: rgba(28, 27, 35, 0.60); background: rgba(0, 0, 0, .8);
} }
.poster { .poster {
width: 558rpx; box-sizing: border-box;
height: 68%; width: 500rpx;
max-height: 68%;
// height: 68%;
// height: 1108rpx; // height: 1108rpx;
overflow: scroll; overflow: scroll;
// smoo
// overflow: scroll;
border-radius: 8rpx 8rpx 0 0; border-radius: 8rpx 8rpx 0 0;
}
.pd {
padding: 32rpx;
background-color: #fff;
} }
.btn { .btn {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 558rpx; width: 500rpx;
height: 90rpx; height: 90rpx;
background: #F7F8FA; background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx; border-radius: 0 0 12rpx 12rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #3666FE; color: #3666FE;
margin-top: -2rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
} }
.tips { .tips {
margin: 40rpx 80rpx 0; margin: 40rpx 80rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #FFFFFF;
line-height: 36rpx; line-height: 36rpx;
.underline {
font-weight: 600;
text-decoration: underline;
}
} }
} }
.titleTime {
height: 64rpx;
line-height: 64rpx;
width: 100%;
// background-color: rgba(54, 102, 254, 0.08);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #fff;
text-align: center;
}
\ No newline at end of file \ No newline at end of file
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<!-- catchtouchmove="noScroll" --> <!-- catchtouchmove="noScroll" catchtouchmove="noScroll" -->
<view class="layout"> <view class="layout">
<view class="bg" bindtap="hide" catchtouchmove="noScroll" /> <view class="bg" bindtap="hide" />
<view class="poster"> <!-- style="height:{{height}}" -->
<!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> --> <view class="poster {{item.type == 'warReport'?'pd':''}}">
<image src="{{poster}}" mode="widthFix" show-menu-by-longpress /> <block wx:if="{{scrollImg}}">
<!-- </scroll-view> --> <scroll-view scroll-y scroll-x="false" style="height: 100%">
<!-- mode="widthFix" -->
<image
bindload="successOnload"
src="{{poster}}"
mode="widthFix"
show-menu-by-longpress
bindlongpress="longpress" />
</scroll-view>
<!-- </view> -->
</block>
<block wx:else>
<!-- <view class="poster {{item.type == 'warReport'?'pd':''}}"> -->
<!-- mode="widthFix" -->
<scroll-view scroll-y scroll-x="false" style="height: 100%">
<image
bindload="successOnload"
src="{{poster}}"
mode="widthFix"
show-menu-by-longpress
bindlongpress="longpress" />
</scroll-view>
<!-- </view> -->
`
</block>
</view> </view>
<view class="btn"> <view class="btn">
<glsx-image src="output/longtap.png" class="icon" />
长按图片转发 长按图片转发
</view> </view>
<view class="tips">提示:这是您的专属活动海报,请长按转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> <view wx:if="{{item.type == 'warReport'}}" class="titleTime">最近更新时间: {{item.updatedTime}}</view>
<view wx:else class="tips">
温馨提示:您可以转发到门店群,门店员工通过扫描海报二维码可以注册登录
<text class="underline">门店助手</text>
小程序,执行活动任务,转发活动链接促成订单。
</view>
</view> </view>
</block> </block>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> --> <!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> -->
// components/FullscreenVideo/FullscreenVideo.js
Component({
/**
* 组件的属性列表
*/
properties: {
src:String,
title:String,
},
/**
* 组件的初始数据
*/
data: {
fullScreen: false,
},
lifetimes: {
ready() {
// this.play();
},
},
/**
* 组件的方法列表
*/
methods: {
/**播放视屏 */
play(e) {
//执行全屏方法
var videoContext = wx.createVideoContext("myvideo", this);
videoContext.requestFullScreen();
this.setData({
fullScreen: true,
});
},
/**关闭视屏 */
closeVideo() {
//执行退出全屏方法
var videoContext = wx.createVideoContext("myvideo", this);
videoContext.exitFullScreen();
this.setData({
fullScreen: false,
});
},
/**视屏进入、退出全屏 */
fullScreenFn(e) {
var isFull = e.detail.fullScreen;
//视屏全屏时显示加载video,非全屏时,不显示加载video
this.setData({
fullScreen: isFull,
});
},
},
});
/* components/FullscreenVideo/FullscreenVideo.wxss */
.show{
display:block;
}
.hide{
display:none;
}
\ No newline at end of file \ No newline at end of file
<!-- components/FullscreenVideo/FullscreenVideo.wxml -->
<!-- -->
<video id='myvideo' class='{{fullScreen?"show":"hide"}}' src="{{src}}" title="{{title}}" autoplay="true" direction="{{0}}" bindfullscreenchange="fullScreenFn" bindended="closeVideo" controls></video>
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,9 @@ Component({ ...@@ -5,6 +5,9 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
options: {
addGlobalClass: true
},
sceneActive: { sceneActive: {
type: Number, type: Number,
value: -1 value: -1
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml --> <!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="/pages/tab/output/index.wxs" module="filter" />
<view class="flex scene"> <view class="flex scene">
<view <view class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
wx:for="{{custSceneList}}"
wx:key="index"
bindtap="handleClick"
data-idx="{{index + 1}}">
<!-- && sceneActive != (index + 1) -->
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon"> <view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image> <image src="{{openedIcon}}" webp></image>
</view> </view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" ></image> <image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}"></image>
<view wx:else class="no-open-img"> <view wx:else class="no-open-img">
<image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" ></image> <image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}"></image>
<image webp wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" ></image> <image webp wx:else="" class="scene-img" src="{{IMGURL}}output/icon-car0{{index + 1}}.png?v={{img_version}}"></image>
</view> </view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}"> <view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}} {{item.title}}
</view> </view>
<view>{{item.subTitle}}</view> <view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}"> <view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}} ¥ {{filter.money_three_for_two_thousands(scenePriceList[index].total || 0.00)}}
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
background: #F7F8FC; background: #F7F8FC;
margin-right: 4rpx; margin-right: 4rpx;
font-size: 18rpx; font-size: 18rpx;
/* color: #8A8C90; */ color: #8A8C90;
color: #323436; /* padding: 32rpx 0 28rpx; */
padding: 32rpx 0 28rpx; padding: 24rpx 0 18rpx;
border-radius: 12rpx; border-radius: 12rpx;
font-weight: 500; font-weight: 500;
border: 2rpx solid #F7F8FC;
/* margin-bottom: 20rpx; */ /* margin-bottom: 20rpx; */
} }
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
margin: 10rpx 0 4rpx; margin: 10rpx 0 4rpx;
font-weight: 600;
} }
/* 已开通 - start */ /* 已开通 - start */
...@@ -66,7 +68,8 @@ ...@@ -66,7 +68,8 @@
.active.scene-item { .active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%); background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
border: 2rpx solid #3666FE; border: 2rpx solid #3666FE;
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); /* box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); */
filter: drop-shadow(0 12rpx 12rpx rgba(180, 186, 204, 0.40));
} }
.active::after { .active::after {
...@@ -90,17 +93,17 @@ ...@@ -90,17 +93,17 @@
color: #323436; color: #323436;
} }
/* .scene-title.on-open { .scene-title.on-open {
color: #8A8C90; color: #8A8C90;
} */ }
.no-open-img { .no-open-img {
position: relative; position: relative;
} }
.scene-img { .scene-img {
width: 56rpx; width: 92rpx;
height: 56rpx; height: 64rpx;
} }
.lock-img { .lock-img {
...@@ -114,9 +117,10 @@ ...@@ -114,9 +117,10 @@
margin-top: 22rpx; margin-top: 22rpx;
font-size: 24rpx; font-size: 24rpx;
color: #3666FE; color: #3666FE;
font-weight: 600; /* font-weight: 600; */
font-family: 'number';
} }
.notOpened { /* .notOpened {
color: #8A8C90; color: #8A8C90;
}
\ No newline at end of file \ No newline at end of file
} */
\ No newline at end of file \ No newline at end of file
// components/image/index.js
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
Component({
externalClasses: ['custom-class', 'class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: '',
observer: function (url, o) {
if (url) {
let isWebp = url.includes('webp')
this.setData({
isWebp,
imagePath: `${IMG_URL}${url}?v=` + IMG_VERSION()
})
}
}
},
mode: {
type: String,
value: 'scaleToFill'
},
webp: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: '',
isWebp: false
},
// 组件生命周期
lifetimes: {
// 在组件实例进入页面节点树时执行
// attached: function () {
// let src = this.data.src
// let prefix = IMG_URL
// this.setData({
// imagePath: `${prefix}${src}?v=` + IMG_VERSION()
// })
// },
// 在组件实例被从页面节点树移除时执行
detached: function () {}
},
/**
* 组件的方法列表
*/
methods: {}
})
/* components/image/index.wxss */
\ No newline at end of file \ No newline at end of file
<!-- components/image/index.wxml -->
<image
src="{{imagePath}}"
mode="{{mode}}"
webp="{{webp||isWebp}}"
lazy-load
class="custom-class class" />
// login/index/components/LoginBox.js // login/index/components/LoginBox.js
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import { import { checkLoginUserInfo, setLoginInfo, loginModal } from '~/login/lib/index'
checkLoginUserInfo,
setLoginInfo,
loginModal
} from '~/login/lib/index'
import md5 from '~/utils/lib/md5' import md5 from '~/utils/lib/md5'
import network from '~/utils/network' import network from '~/utils/network'
import { import { imgUrlMixin } from '~/mixins/index'
imgUrlMixin
} from '~/mixins/index'
let thisPage let thisPage
Component({ Component({
behaviors: [imgUrlMixin], behaviors: [imgUrlMixin],
...@@ -32,6 +26,8 @@ Component({ ...@@ -32,6 +26,8 @@ Component({
code: '', code: '',
account: '', account: '',
password: '' password: ''
// account: 'bb123456',
// password: 'bb123456'
}, },
phoneReady: false, phoneReady: false,
countDown: null countDown: null
...@@ -49,11 +45,8 @@ Component({ ...@@ -49,11 +45,8 @@ Component({
}, },
/**输入回调 */ /**输入回调 */
input(e) { input(e) {
const { const { value } = e.detail,
value { name } = e.currentTarget.dataset
} = e.detail, {
name
} = e.currentTarget.dataset
this.setData({ this.setData({
[`formData.${name}`]: value [`formData.${name}`]: value
}) })
...@@ -66,9 +59,7 @@ Component({ ...@@ -66,9 +59,7 @@ Component({
}, },
/**清除input value */ /**清除input value */
clear(e) { clear(e) {
const { const { name } = e.currentTarget.dataset
name
} = e.currentTarget.dataset
this.setData({ this.setData({
[`formData.${name}`]: '' [`formData.${name}`]: ''
}) })
...@@ -77,21 +68,14 @@ Component({ ...@@ -77,21 +68,14 @@ Component({
}, },
/**获取验证码 */ /**获取验证码 */
getSmsCode() { getSmsCode() {
const { const { phoneReady, formData, count } = this.data,
phoneReady,
formData,
count
} = this.data,
countDown = 60 countDown = 60
if (!phoneReady || count) return if (!phoneReady || count) return
this.setData({ this.setData({
smsLoading: true smsLoading: true
}) })
USERAPI.getSmsCode(formData.phone) USERAPI.getSmsCode(formData.phone)
.then(({ .then(({ code, message }) => {
code,
message
}) => {
this.setData({ this.setData({
smsLoading: false smsLoading: false
}) })
...@@ -112,9 +96,7 @@ Component({ ...@@ -112,9 +96,7 @@ Component({
count: countDown count: countDown
}) })
setTimeout(() => { setTimeout(() => {
let { let { count } = this.data
count
} = this.data
this.setData({ this.setData({
count: --count count: --count
}) })
...@@ -127,13 +109,11 @@ Component({ ...@@ -127,13 +109,11 @@ Component({
}, },
/**检查输入框内容 */ /**检查输入框内容 */
checkFormData() { checkFormData() {
const { const { loginType, formData } = this.data
loginType,
formData
} = this.data
if (loginType != 0) { if (loginType != 0) {
if (loginType == 1) { if (loginType == 1) {
this.setData({ this.setData(
{
phoneReady: formData.phone && thisPage.validate.methods.tel(formData.phone) phoneReady: formData.phone && thisPage.validate.methods.tel(formData.phone)
}, },
() => { () => {
...@@ -151,39 +131,30 @@ Component({ ...@@ -151,39 +131,30 @@ Component({
}, },
/**手机号&帐号密码登录 */ /**手机号&帐号密码登录 */
login() { login() {
const { const { formData, loginType } = this.data,
formData,
loginType
} = this.data,
target = { target = {
1: 'phoneSmsLogin', 1: 'phoneSmsLogin',
2: 'accountLogin' 2: 'accountLogin'
} [loginType], }[loginType],
obj = obj =
loginType == 1 ? { loginType == 1
? {
mobile: formData.phone, mobile: formData.phone,
code: formData.code code: formData.code
} : { }
: {
userName: formData.account, userName: formData.account,
password: md5(formData.password) password: md5(formData.password)
} }
this.setBtnLoading() this.setBtnLoading()
USERAPI[target](obj) USERAPI[target](obj)
.then(({ .then(({ code, data, message }) => {
code,
data,
message
}) => {
this.setBtnLoading(false) this.setBtnLoading(false)
if (code == '0') { if (code == '0') {
if (loginType == 1) checkLoginUserInfo(data) if (loginType == 1) checkLoginUserInfo(data)
else { else {
const { const { autoLogin } = thisPage.data,
autoLogin { sessionId, loginUserInfoList } = data,
} = thisPage.data, {
sessionId,
loginUserInfoList
} = data,
validTime = 3600 * 24 * 7 * 1e3, validTime = 3600 * 24 * 7 * 1e3,
autoLoginFailureTime = Date.now() + validTime autoLoginFailureTime = Date.now() + validTime
if (autoLogin && loginUserInfoList[0]) { if (autoLogin && loginUserInfoList[0]) {
...@@ -209,17 +180,14 @@ Component({ ...@@ -209,17 +180,14 @@ Component({
}) })
}, },
/**微信登录 */ /**微信登录 */
wxLogin({ wxLogin({ detail }) {
detail if (!detail.code) {
}) { wx.$api.showToast('当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。')
if (!detail.code) return return
}
this.setBtnLoading() this.setBtnLoading()
USERAPI.authUserPhone(detail, this.loginToken) USERAPI.authUserPhone(detail, this.loginToken)
.then(({ .then(({ code, data, message }) => {
code,
data,
message
}) => {
if (code == '0') checkLoginUserInfo(data) if (code == '0') checkLoginUserInfo(data)
else { else {
wx.$api.showToast(message || '系统异常') wx.$api.showToast(message || '系统异常')
...@@ -227,9 +195,7 @@ Component({ ...@@ -227,9 +195,7 @@ Component({
} }
this.setBtnLoading(false) this.setBtnLoading(false)
}) })
.catch(({ .catch(({ errMsg }) => {
errMsg
}) => {
wx.$api.showToast(errMsg || '系统异常') wx.$api.showToast(errMsg || '系统异常')
this.setBtnLoading(false) this.setBtnLoading(false)
this.init() this.init()
...@@ -249,11 +215,7 @@ Component({ ...@@ -249,11 +215,7 @@ Component({
network.getNetworkType() network.getNetworkType()
thisPage = wx.$router.getPageInstance() thisPage = wx.$router.getPageInstance()
try { try {
const { const { data, code, message } = await USERAPI.wxCodeLogin()
data,
code,
message
} = await USERAPI.wxCodeLogin()
if (code == '0') { if (code == '0') {
thisPage.setData({ thisPage.setData({
disabled: false disabled: false
...@@ -261,10 +223,8 @@ Component({ ...@@ -261,10 +223,8 @@ Component({
this.loginToken = data this.loginToken = data
} else this.reLogin(message) } else this.reLogin(message)
wx.hideLoading() wx.hideLoading()
} catch ({ } catch ({ errMsg }) {
errMsg // console.error(errMsg)
}) {
console.error(errMsg)
this.reLogin() this.reLogin()
} }
}, },
......
import { import { checkLoginUserInfo, setRouteData, setLoginInfo, loginModal } from '../lib/index'
checkLoginUserInfo, import { getSessionId } from '~/utils/cache/storageApi'
setRouteData,
setLoginInfo,
loginModal
} from '../lib/index'
import {
getSessionId,
} from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -39,9 +27,7 @@ Page({ ...@@ -39,9 +27,7 @@ Page({
const appEnter = wx.getEnterOptionsSync() const appEnter = wx.getEnterOptionsSync()
if (appEnter.scene == 1037) { if (appEnter.scene == 1037) {
if (Object.keys(appEnter.referrerInfo).length) { if (Object.keys(appEnter.referrerInfo).length) {
const { const { extraData } = appEnter.referrerInfo
extraData
} = appEnter.referrerInfo
if (extraData && Object.keys(extraData).length) this.phoneSmsLogin(extraData) if (extraData && Object.keys(extraData).length) this.phoneSmsLogin(extraData)
else this.init() else this.init()
} else this.init() } else this.init()
...@@ -51,44 +37,31 @@ Page({ ...@@ -51,44 +37,31 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
init() { init() {
wx.nextTick(() => { wx.nextTick(() => {
const sessionId = getSessionId(), const sessionId = getSessionId(),
{ { url, targetPath = url ? decodeURIComponent(url) : '' } = this.options
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
let path = 'pages.index', let path = 'pages.index',
obj = {} obj = {}
if (targetPath) obj.targetPath = targetPath if (targetPath) obj.targetPath = targetPath
if (sessionId) { if (sessionId) {
USERAPI.checkSession().then(({ USERAPI.checkSession().then(({ code }) => {
code
}) => {
if (code == '0') { if (code == '0') {
if (targetPath) { if (targetPath) {
path = setRouteData(targetPath).url path = setRouteData(targetPath).url
...@@ -103,25 +76,14 @@ Page({ ...@@ -103,25 +76,14 @@ Page({
autoLogin(obj) { autoLogin(obj) {
const autoLoginObject = wx.$storage.get('auto_login_object') const autoLoginObject = wx.$storage.get('auto_login_object')
if (autoLoginObject) { if (autoLoginObject) {
const { const { failureTime, userName, password } = autoLoginObject
failureTime,
userName,
password
} = autoLoginObject
if (Date.now() < failureTime) { if (Date.now() < failureTime) {
USERAPI.accountLogin({ USERAPI.accountLogin({
userName, userName,
password password
}).then(async ({ }).then(async ({ data, code, message }) => {
data,
code,
message
}) => {
if (code == '0' && data.loginUserInfoList.length) { if (code == '0' && data.loginUserInfoList.length) {
const { const { sessionId, loginUserInfoList } = data
sessionId,
loginUserInfoList
} = data
setLoginInfo(loginUserInfoList[0], sessionId) setLoginInfo(loginUserInfoList[0], sessionId)
} else { } else {
try { try {
...@@ -144,11 +106,8 @@ Page({ ...@@ -144,11 +106,8 @@ Page({
USERAPI.phoneSmsLogin({ USERAPI.phoneSmsLogin({
mobile: extraData.phone, mobile: extraData.phone,
code: extraData.smscode code: extraData.smscode
}).then(({ })
code, .then(({ code, data, message }) => {
data,
message
}) => {
if (code == '0') checkLoginUserInfo(data) if (code == '0') checkLoginUserInfo(data)
else { else {
wx.$api.showToast(message || '系统异常') wx.$api.showToast(message || '系统异常')
......
{
"name": "business-assistant",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@vant/weapp": {
"version": "1.10.7",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz",
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
}
}
}
{
"name": "business-assistant",
"version": "1.0.0",
"description": "",
"main": "app.js",
"dependencies": {
"@vant/weapp": "^1.10.5"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://luyt@192.168.3.233:8090/saas_plus/business-assistant.git"
},
"author": "",
"license": "ISC"
}
...@@ -58,6 +58,7 @@ Page({ ...@@ -58,6 +58,7 @@ Page({
baseCustomer: carObj.selNum, baseCustomer: carObj.selNum,
clueId clueId
} }
// return wx.$api.showToast('申请成功') // return wx.$api.showToast('申请成功')
applyApi applyApi
.merchantApply(params) .merchantApply(params)
...@@ -67,7 +68,8 @@ Page({ ...@@ -67,7 +68,8 @@ Page({
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back(page => { wx.$router.back(page => {
page.getClueInit && page.getClueInit() let node = page.selectComponent('#indexclue')
node && node.getClueInit()
}) })
}, 1000) }, 1000)
} }
......
...@@ -26,7 +26,16 @@ ...@@ -26,7 +26,16 @@
<text class="name">{{merchantName}}</text> <text class="name">{{merchantName}}</text>
<text>门店场景已开通,待开展业务,信息如下:</text> <text>门店场景已开通,待开展业务,信息如下:</text>
</view> --> </view> -->
<slot/> <slot />
<view class="time">{{time}}</view> <view class="time">{{filter.timeformat(time)}}</view>
</view> </view>
<wxs module="filter">
module.exports = {
timeformat: function (time) {
time = time.slice(0,-3)
return time
}
}
</wxs>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
// import USERAPI from '~/api/usersApi/index' // import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
console.log(IMG_URL)
const listObj = Object.freeze([ const listObj = Object.freeze([
{ {
key: 'merchantId', key: 'merchantId',
...@@ -10,6 +10,11 @@ const listObj = Object.freeze([ ...@@ -10,6 +10,11 @@ const listObj = Object.freeze([
editLabel: '商户号' editLabel: '商户号'
}, },
{ {
key: 'actualAccountName',
label: '商户账号:',
editLabel: '商户账号'
},
{
key: 'merchantName', key: 'merchantName',
label: '门店名称:', label: '门店名称:',
placeholder: '请输入您的客户门店简称', placeholder: '请输入您的客户门店简称',
...@@ -78,6 +83,11 @@ Component({ ...@@ -78,6 +83,11 @@ Component({
customerList: [{}], customerList: [{}],
listObj, listObj,
isSuper: false, isSuper: false,
testData: [
{
a: 1
}
],
bgUrl: `${IMG_URL}/output/empty.png` bgUrl: `${IMG_URL}/output/empty.png`
}, },
attached() { attached() {
...@@ -93,14 +103,14 @@ Component({ ...@@ -93,14 +103,14 @@ Component({
*/ */
methods: { methods: {
restPageNum() { restPageNum() {
console.log('restPageNum') // console.log('restPageNum')
this.setData({ this.setData({
pageNum: 1 pageNum: 1
}) })
this.getMerchantCustomInfoList() this.getMerchantCustomInfoList('reset')
}, },
scrollonReachBottom() { scrollonReachBottom() {
console.log('scrollonReachBottom') // console.log('scrollonReachBottom')
let { pages, pageNum } = this.data let { pages, pageNum } = this.data
// 判断当前页是否是末页 // 判断当前页是否是末页
if (pages == pageNum) return wx.$api.showToast('列表已到底') if (pages == pageNum) return wx.$api.showToast('列表已到底')
...@@ -111,7 +121,7 @@ Component({ ...@@ -111,7 +121,7 @@ Component({
this.getMerchantCustomInfoList() this.getMerchantCustomInfoList()
}, },
// 分页查询客户列表 // 分页查询客户列表
getMerchantCustomInfoList() { getMerchantCustomInfoList(type) {
wx.$api.showLoading('加载中...') wx.$api.showLoading('加载中...')
let { pageNum, pageSize, customerList } = this.data let { pageNum, pageSize, customerList } = this.data
let params = { let params = {
...@@ -123,10 +133,15 @@ Component({ ...@@ -123,10 +133,15 @@ Component({
.then(result => { .then(result => {
console.log(result) console.log(result)
let { pages, list, total } = result let { pages, list, total } = result
console.log(list)
list = list.map(item => { list = list.map(item => {
item.merchantName = item.merchantName || item.actualMerchantName item.merchantName = item.merchantName || item.actualMerchantName
item.phone = item.phone || item.actualPhone
// || item.actualContactName
item.contactName = item.contactName || item.actualContactName
return item return item
}) })
console.log(list)
this.setData({ this.setData({
customerList: pageNum == 1 ? list : [...customerList, ...list], customerList: pageNum == 1 ? list : [...customerList, ...list],
triggered: false, triggered: false,
...@@ -135,7 +150,14 @@ Component({ ...@@ -135,7 +150,14 @@ Component({
}) })
.catch(err => {}) .catch(err => {})
.finally(() => { .finally(() => {
if (type == 'reset') {
wx.$api.showToast({
title: '刷新成功',
icon: 'success'
})
} else {
wx.$api.hideLoading() wx.$api.hideLoading()
}
}) })
}, },
submit(data) { submit(data) {
...@@ -149,11 +171,12 @@ Component({ ...@@ -149,11 +171,12 @@ Component({
mineApi mineApi
.saveMerchantCustomInfo(objList) .saveMerchantCustomInfo(objList)
.then(result => { .then(result => {
console.log(result) wx.$api.showToast('更新成功')
this.setData({ // console.log(result)
pageNum: 1 // this.setData({
}) // pageNum: 1
this.getMerchantCustomInfoList() // })
// this.getMerchantCustomInfoList()
}) })
.catch(err => {}) .catch(err => {})
}, },
...@@ -164,23 +187,21 @@ Component({ ...@@ -164,23 +187,21 @@ Component({
// let // let
let status = customerList[index].isEdit let status = customerList[index].isEdit
// console.log(isEdit) // console.log(isEdit)
// customerList[index]['isEdit'] = !customerList[index]['isEdit']
if (item.isEdit) { if (item.isEdit) {
// 提交客户信息更新 // 提交客户信息更新
// this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index])
// let {} =
!isSuper && this.submit(customerList[index]) !isSuper && this.submit(customerList[index])
} else { }
customerList[index]['isEdit'] = true console.log(index)
// let indexEdit = console.log(!status)
this.setData({ this.setData({
customerList [`customerList[${index}].isEdit`]: !status
}) })
}
}, },
input(e) { input(e) {
let { index, name } = e.currentTarget.dataset let { index, name } = e.currentTarget.dataset
console.log(index) // console.log(index)
console.log(name) // console.log(name)
let { customerList, listObj } = this.data let { customerList, listObj } = this.data
let { value } = e.detail let { value } = e.detail
// listObj // listObj
......
...@@ -15,8 +15,13 @@ page { ...@@ -15,8 +15,13 @@ page {
font-size: 28rpx; font-size: 28rpx;
caret-color: #3666FE; caret-color: #3666FE;
width: 430rpx; width: 430rpx;
} }
.disabled {
// color: #333;
color: #a6a9ad;
}
.customerBox { .customerBox {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- type="number" --> <!-- type="number" -->
<input <input
placeholder="{{item.isEdit? childItem['placeholder']:''}}" placeholder="{{item.isEdit? childItem['placeholder']:''}}"
class="input" class="input {{item.isEdit&&(ind == 0|| ind == 1) ? 'disabled':''}}"
placeholder-class="placeholder-class" placeholder-class="placeholder-class"
maxlength="{{childItem.maxLength}}" maxlength="{{childItem.maxLength}}"
value="{{item[childItem['key']] }}" value="{{item[childItem['key']] }}"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
data-index="{{index}}" data-index="{{index}}"
data-name="{{childItem['key']}}" data-name="{{childItem['key']}}"
data-reg="{{childItem['reg']}}" data-reg="{{childItem['reg']}}"
disabled="{{!item.isEdit || ind == 0 }}" disabled="{{!item.isEdit || ind == 0|| ind == 1 }}"
always-embed></input> always-embed></input>
</gl-cell> </gl-cell>
<!-- <gl-cell <!-- <gl-cell
......
// 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' // import { handleCopy } from '~/utils/utils_wx'
let drawQrcode = require('~/utils/lib/weapp-qrcode.js') import outputApi from '~/api/outputApi/index'
import { deleteSecond } from '~/utils/format'
// import drawQrcode from '~/utils/lib/weapp-qrcode.js'
Component({ Component({
options: {
addGlobalClass: true
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -32,12 +37,13 @@ Component({ ...@@ -32,12 +37,13 @@ Component({
list: 'messageList' list: 'messageList'
} }
}, },
// findKey: '',
warReportList: [], warReportList: [],
messageList: [], messageList: [],
serviceMerchantId: '' serviceMerchantId: ''
}, },
attached() { attached() {
this.ewmChange() // this.ewmChange()
// this.initTime() // this.initTime()
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let merchantId = userInfo.subLoginUser.merchantId let merchantId = userInfo.subLoginUser.merchantId
...@@ -53,20 +59,20 @@ Component({ ...@@ -53,20 +59,20 @@ Component({
*/ */
methods: { methods: {
// 实例化二维码canvas // 实例化二维码canvas
ewmChange(url) { // ewmChange(url) {
let size = {} // let size = {}
size.w = (wx.getSystemInfoSync().windowWidth / 750) * 600 // size.w = (wx.getSystemInfoSync().windowWidth / 750) * 600
size.h = size.w // size.h = size.w
var that = this // var that = this
drawQrcode({ // drawQrcode({
width: size.w, // width: size.w,
height: size.h, // height: size.h,
canvasId: 'myQrcode', // canvasId: 'myQrcode',
text: url || that.data.text // text: url || that.data.text
// v1.0.0+版本支持在二维码上绘制图片 // // v1.0.0+版本支持在二维码上绘制图片
}) // })
}, // },
preView(e) { preView(e) {
let { valueurl } = e.currentTarget.dataset let { valueurl } = e.currentTarget.dataset
// console.log(e) // console.log(e)
...@@ -81,25 +87,53 @@ Component({ ...@@ -81,25 +87,53 @@ Component({
current: valueurl current: valueurl
}) })
}, },
downLoad(e) { showPoster(e) {
const { item } = e.currentTarget.dataset const { item } = e.currentTarget.dataset
let updatedTime = deleteSecond(item.createdTime)
this.setData({ this.setData({
// findKey: 'crowdFundActivityId',
posterItem: { posterItem: {
activityName: item.activityName, activityName: item.activityName,
posterUrl: item.valueUrl posterUrl: item.valueUrl,
updatedTime,
// crowdFundActivityId: item.valueUrl,
type: 'warReport'
} }
}) })
}, },
copyLink(e) { async copyLink(e) {
console.log(e) const { item } = e.currentTarget.dataset
let that = this // posterObj = this.selectComponent('#poster')
let { url } = e.currentTarget.dataset // this.setData({
this.ewmChange(url) // findKey: 'activityId'
setTimeout(() => { // })
this.share() // try {
}, 100) // let flag = await posterObj.check(item)
// posterObj.setData({
// poster: flag,
// show: true
// })
// } catch (error) {
wx.$api.showLoading('加载中...')
outputApi
.getPosterUrl({
id: item.crowdFundActivityId
})
.then(res => {
item.posterUrl = res
item.type = 'motherChainPoster'
console.log(item)
this.setData({
posterItem: item,
isShowTip: false
})
})
.catch(() => {
wx.$api.showToast('下载海报失败')
})
// }
}, },
share(e) { share(e) {
// console.log(e) // console.log(e)
let that = this let that = this
...@@ -138,12 +172,26 @@ Component({ ...@@ -138,12 +172,26 @@ Component({
tabBarStyle: height / 2 + statusBarHeight tabBarStyle: height / 2 + statusBarHeight
}) })
}, },
refreshList(e) { async refreshList(e) {
// console.log(e) console.log(e)
let { type } = this.data let { type } = this.data
let { typename } = e.currentTarget.dataset let { typename } = e.currentTarget.dataset
type[typename].pageNum = 1 type[typename].pageNum = 1
this.getMessageList(typename) let res = await this.getMessageList(typename)
let toastObj = {
success: {
title: '刷新成功',
icon: 'success'
},
fail: {
title: '刷新失败',
icon: 'error'
}
}
wx.$api.showToast({
...toastObj[res],
duration: 1000
})
}, },
scrollonReachBottom(e) { scrollonReachBottom(e) {
console.log(e) console.log(e)
...@@ -169,6 +217,7 @@ Component({ ...@@ -169,6 +217,7 @@ Component({
}, },
getMessageList(typeName) { getMessageList(typeName) {
let that = this let that = this
return new Promise((resolve, reject) => {
let { serviceMerchantId, type, warReportList, messageList } = this.data let { serviceMerchantId, type, warReportList, messageList } = this.data
let list = type[typeName]['list'] let list = type[typeName]['list']
// console.log('list', this.data[list]) // console.log('list', this.data[list])
...@@ -193,11 +242,15 @@ Component({ ...@@ -193,11 +242,15 @@ Component({
type, type,
triggered: false triggered: false
}) })
resolve('success')
})
.catch(err => {
reject('fail')
}) })
.catch(err => {})
.finally(() => { .finally(() => {
wx.$api.hideLoading() wx.$api.hideLoading()
}) })
})
} }
} }
}) })
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"msg-box": "./components/msgBox/msgBox", "msg-box": "../components/msgBox/msgBox",
"tab": "./components/Tab/Tab" "tab": "../components/Tab/Tab"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
&::after { &::after {
content: ''; content: '';
width: 100%; width: 100%;
height: 264rpx; height: 265rpx;
// 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-color: #fff; background-color: #fff;
// background-size: 100% 486rpx; // background-size: 100% 486rpx;
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.tabContainer { .tabContainer {
height: 100rpx; height: 100rpx;
background-color: #fff;
} }
.list { .list {
......
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
index="{{tabIndx}}" index="{{tabIndx}}"
bindclick="changeTabIndx" bindclick="changeTabIndx"
class="tabContainer" /> class="tabContainer" />
<view hidden="{{tabIndx==1}}" class="scrollCon"> <!-- -->
<view class="scrollCon" hidden="{{tabIndx==1}}">
<scroll-view <scroll-view
wx:if="{{tabBarStyle}}"
scroll-y scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
...@@ -24,30 +26,29 @@ ...@@ -24,30 +26,29 @@
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
scroll-top="{{scrollTop}}" scroll-top="{{scrollTop}}"
class=" list" class="list"
data-typeName="warReport" data-typeName="warReport"
refresher-triggered="{{triggered}}"> refresher-triggered="{{triggered}}">
<!-- -->
<msg-box <msg-box
wx:for="{{warReportList}}" wx:for="{{warReportList}}"
wx:key='index' wx:key='index'
merchantName="{{item.merchantName}}" merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}" messageType="{{item.messageType}}"
time="{{item.updatedTime}}"> time="{{item.createdTime}}">
<view class="warReportBox" wx:if="{{item.messageType == 2}}"> <view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item"> <view class="item">
<view class="label">当前产值</view> <view class="label">当前产值</view>
<view class="num">{{item.currentValue||'0.0'}}元</view> <view class="num font-number">{{item.currentValue||'0.0'}}元</view>
</view> </view>
</view> </view>
<view class="warReportBox" wx:if="{{item.messageType == 3}}"> <view class="warReportBox" wx:if="{{item.messageType == 3}}">
<view class="item"> <view class="item">
<view class="label">总产值</view> <view class="label">总产值</view>
<view class="num">{{item.totalValue}}元</view> <view class="num font-number">{{item.totalValue}}元</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">完成目标</view> <view class="label">完成目标</view>
<view class="num">{{item.completeRate}}</view> <view class="num font-number">{{item.completeRate}}</view>
</view> </view>
</view> </view>
<view class="warReportLink"> <view class="warReportLink">
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
wx:if="{{item.valueUrl}}" wx:if="{{item.valueUrl}}"
data-valueurl="{{item.valueUrl}}" data-valueurl="{{item.valueUrl}}"
data-item="{{item}}" data-item="{{item}}"
bind:tap="downLoad"> bind:tap="showPoster">
战报详情 战报详情
</view> </view>
</view> </view>
...@@ -74,20 +75,19 @@ ...@@ -74,20 +75,19 @@
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
scroll-top="{{scrollTop}}" scroll-top="{{scrollTop}}"
class=" list" class="list"
data-typeName="message" data-typeName="message"
refresher-triggered="{{triggered}}"> refresher-triggered="{{triggered}}">
<!-- -->
<msg-box <msg-box
wx:for="{{messageList}}" wx:for="{{messageList}}"
wx:key='index' wx:key='index'
merchantName="{{item.merchantName}}" merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}" messageType="{{item.messageType}}"
time="{{item.updatedTime}}"> time="{{item.createdTime}}">
<view wx:if="{{item.messageType == 1}}"> <view wx:if="{{item.messageType == 1}}">
<view class="cell"> <view class="cell">
<view class="label">活动名称:</view> <view class="label">活动名称:</view>
<view class="value">{{item.activityName}}</view> <view class="value">{{item.activityName||item.productName}}</view>
</view> </view>
<view class="cell"> <view class="cell">
<view class="label">开始时间:</view> <view class="label">开始时间:</view>
...@@ -97,33 +97,28 @@ ...@@ -97,33 +97,28 @@
<view class="label">结算时间:</view> <view class="label">结算时间:</view>
<view class="value">{{item.activityEndTime||'-'}}</view> <view class="value">{{item.activityEndTime||'-'}}</view>
</view> </view>
<!-- <view class="cell"> <view class="cell" wx:if="{{item.crowdFundActivityId}}">
<view class="label">活动链接:</view> <view class="label">母链海报:</view>
<view <view class="link" bind:tap="copyLink" data-item="{{item}}">下载母链海报分享给门店开展活动</view>
class="link"
wx:if="{{item.activityUrl}}"
bind:tap="copyLink"
data-url="{{item.activityUrl}}">
下载海报
</view> </view>
</view> -->
</view> </view>
<view class="cell" wx:if="{{item.messageType == 4}}"> <view class="cell" wx:if="{{item.messageType == 4}}">
<view class="label">产品名称:</view> <view class="label">产品名称:</view>
<view class="value">{{item.activityName}}</view> <view class="value">{{item.activityName||item.productName}}</view>
</view> </view>
<view class="cell" wx:if="{{item.messageType == 5}}"> <view class="cell" wx:if="{{item.messageType == 5}}">
<view class="label">新车交付场景:</view> <view class="label">新车交付场景:</view>
<view class="value">{{item.activityName}}</view> <view class="value">{{item.activityName||item.productName}}</view>
</view> </view>
<view class="cell" wx:if="{{item.messageType == 6}}"> <view class="cell" wx:if="{{item.messageType == 6}}">
<view class="label">0~12个月场景:</view> <view class="label">0~12个月场景:</view>
<view class="value">{{item.activityName}}</view> <view class="value">{{item.activityName||item.productName}}</view>
</view> </view>
</msg-box> </msg-box>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<crowdfund-poster item="{{posterItem}}" /> <!-- findKey="{{findKey}}" -->
<crowdfund-poster id="poster" item="{{posterItem}}" />
<canvas class="erweimaCanvas" style="width: 600rpx; height: 600rpx;" canvas-id="myQrcode" /> <canvas class="erweimaCanvas" style="width: 600rpx; height: 600rpx;" canvas-id="myQrcode" />
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js // packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import wxqrcode from '~/utils/lib/wxqrcode' import wxqrcode from '~/utils/lib/wxqrcode'
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import { import {
IMG_URL IMG_URL
} from '~/utils/constantData' } from '~/utils/constantData'
=======
import { IMG_URL } from '~/utils/constantData'
import { deleteSecond } from '~/utils/format'
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp` download: `${IMG_URL}/output/download.webp`
...@@ -14,7 +19,7 @@ Component({ ...@@ -14,7 +19,7 @@ Component({
properties: { properties: {
orderObj: { orderObj: {
type: Object, type: Object,
value: () => {}, value: () => { },
observer(n) { observer(n) {
n && this.dealStaffList() n && this.dealStaffList()
} }
...@@ -32,7 +37,13 @@ Component({ ...@@ -32,7 +37,13 @@ Component({
IMGURL: IMG_URL, IMGURL: IMG_URL,
IMAGES, IMAGES,
isShowTip: true, isShowTip: true,
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
orderFormList: [{ orderFormList: [{
=======
isShowPoster: false,
orderFormList: [
{
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
label: '总场次', label: '总场次',
name: 'totalNum' name: 'totalNum'
}, },
...@@ -46,30 +57,51 @@ Component({ ...@@ -46,30 +57,51 @@ Component({
prefix: '¥' prefix: '¥'
} }
], ],
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
merchantFormList: [{ merchantFormList: [{
label: '活动时间', label: '活动时间',
=======
merchantFormList: [
{
label: '预计活动时间',
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
name: 'time' name: 'time'
}, },
{ {
label: '实际活动时间',
name: 'realTime'
},
{
label: '订单数', label: '订单数',
name: 'orderCount' name: 'orderCount',
className: 'font-number'
}, },
{ {
label: '产值', label: '产值',
name: 'realAmount', name: 'realAmount',
className: 'red', className: 'red font-number',
prefix: '¥' prefix: '¥',
isNumber: true
}, },
{ {
label: '预估产值', label: '预估产值',
name: 'predictAmount', name: 'predictAmount',
prefix: '¥' className: 'font-number',
prefix: '¥',
isNumber: true
} }
], ],
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
tableHeadList: [{ tableHeadList: [{
label: '', label: '',
width: '', width: '',
width: '28rpx' width: '28rpx'
=======
tableHeadList: [
{
label: 'rankIdx',
width: '40rpx'
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
}, },
{ {
label: '业务员', label: '业务员',
...@@ -104,8 +136,8 @@ Component({ ...@@ -104,8 +136,8 @@ Component({
var list = this.data.orderObj var list = this.data.orderObj
list && list &&
list.activityList?.forEach(item => { list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束 // 1-未开始;2-活动中;3-已结束
let sliceNum = item.actStatus == 2 ? 3 : 10 let sliceNum = item.activityStatus == 3 ? 3 : 10
item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : [] item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
}) })
...@@ -158,7 +190,7 @@ Component({ ...@@ -158,7 +190,7 @@ Component({
path: obj.path path: obj.path
}) })
}, },
fail() {} fail() { }
}) })
}) })
}, },
...@@ -167,6 +199,7 @@ Component({ ...@@ -167,6 +199,7 @@ Component({
// wx.$router.jumpH5(item.activityUrl) // wx.$router.jumpH5(item.activityUrl)
}, },
async download(e) { async download(e) {
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
const { const {
item item
} = e.currentTarget.dataset, } = e.currentTarget.dataset,
...@@ -191,6 +224,122 @@ Component({ ...@@ -191,6 +224,122 @@ Component({
wx.$api.showToast('下载海报失败') wx.$api.showToast('下载海报失败')
}) })
} }
=======
const { item } = e.currentTarget.dataset
// posterObj = this.selectComponent('#crowdPoster'),
// { options } = wx.$router.getPageInstance()
// const { options } = wx.$router.getPageInstance()
// console.log(options)
// try {
// let flag = await posterObj.check(item)
// posterObj.setData({
// poster: flag,
// show: true
// })
// } catch (error) {
wx.$api.showLoading('加载中...')
outputApi
.getPosterUrl({
id: item.activityId
})
.then(res => {
item.posterUrl = res
this.setData({
crowdPosterItem: item,
isShowTip: false
})
})
.catch(() => {
wx.$api.showToast('下载海报失败')
})
// }
},
/**长按海报 */
async longtouch(e) {
console.log('长按海报', e)
let { activityId } = e.detail
const res = await outputApi.reportPosterTrack({
activityId
})
this.triggerEvent('posterTrack')
},
/**长按战报/喜报 */
async handlePosterTouch(e) { },
/**战报 */
handleReport(e) {
const { item, idx } = e.currentTarget.dataset
wx.$api.showLoading('战报生成中')
outputApi
.getNewReportUrl({ activityId: item.activityId })
.then(res => {
// console.log(res)
if (!res.url) {
wx.$api.showToast('战报生成失败')
return true
}
var posterItem = {
...item,
posterUrl: res.url,
updatedTime: deleteSecond(res.updatedDate),
type: 'warReport'
}
this.setData({
crowdPosterItem: posterItem,
isShowTip: false
})
wx.$api.hideLoading()
this.triggerEvent('handleZhanReport', { item: item, idx: idx, posterItem: posterItem })
})
.catch(() => {
wx.$api.showToast('下载战报失败')
})
.finally(() => {
wx.$api.hideLoading()
})
},
/**喜报 */
handleXiReport(e) {
const { item } = e.currentTarget.dataset
wx.$api.showLoading('喜报生成中')
outputApi
.getNewGoodUrl({ activityId: item.activityId })
.then(res => {
if (!res.goodUrl) {
wx.$api.showToast('暂无喜报')
return true
}
var posterItem = {
...item,
posterUrl: res.goodUrl,
updatedTime: res.goodReportDate ? deleteSecond(res.goodReportDate) : '',
type: 'warReport'
}
this.setData({
crowdPosterItem: posterItem
})
wx.$api.hideLoading()
})
.catch(() => {
wx.$api.showToast('下载喜报失败')
})
.finally(() => {
// wx.$api.hideLoading()
})
// var posterItem = {
// ...item,
// posterUrl: item.goodUrl,
// // date: item.goodReportDate,
// updatedTime: deleteSecond(item.goodReportDate),
// type: 'warReport'
// }
// this.setData({
// // posterItem: posterItem,
// // isShowPoster: true,
// crowdPosterItem: posterItem,
// isShowTip: false
// })
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */ /* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout { .crowdfund-layout {
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
padding-bottom: 136rpx;
.box { .box {
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -30,7 +31,8 @@ ...@@ -30,7 +31,8 @@
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
font-weight: 600; // font-weight: 600;
// font-family: 'number';
} }
&-label { &-label {
...@@ -114,7 +116,7 @@ ...@@ -114,7 +116,7 @@
} }
&-label { &-label {
width: 104rpx; width: 156rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 16rpx; margin-right: 16rpx;
} }
...@@ -132,47 +134,173 @@ ...@@ -132,47 +134,173 @@
background: #F7F8FC; background: #F7F8FC;
border-radius: 20rpx; border-radius: 20rpx;
margin-top: 16rpx; margin-top: 16rpx;
padding: 0 12rpx;
.rank-head { .rank-title {
position: relative; position: relative;
height: 52rpx; height: 72rpx;
line-height: 52rpx; line-height: 72rpx;
text-align: center; text-align: center;
font-size: 20rpx; font-size: 26rpx;
color: #5A6066; color: #5A6066;
margin-bottom: 20rpx; font-weight: 600;
border-bottom: 1rpx solid rgba(204, 206, 209, 0.50); border-bottom: 1rpx solid rgba(204, 206, 209, 0.50);
.activity-status { // .activity-status {
position: absolute; // position: absolute;
top: 0; // top: 0;
right: 22rpx; // right: 22rpx;
font-size: 24rpx; // font-size: 24rpx;
} // }
} }
.rank-table { .rank-table {
color: #5A6066; color: #5A6066;
font-size: 20rpx; font-size: 20rpx;
padding-left: 20rpx;
.tr { .rank {
display: flex;
justify-content: space-between;
height: 64rpx;
padding: 20rpx 16rpx;
border-bottom: 1rpx dotted rgba(204, 206, 209, 0.50);
.rank-left {
display: flex;
}
&-num {
width: 40rpx;
line-height: 64rpx;
text-align: center;
}
.rank-head {
position: relative;
width: 64rpx;
height: 64rpx;
margin-right: 12rpx;
.icon-wechat {
position: absolute;
bottom: -4rpx;
right: -4rpx;
width: 40rpx;
height: 40rpx;
}
image {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.rank-content {
font-size: 20rpx;
.rank-row {
position: relative;
display: flex; display: flex;
height: 32rpx; height: 32rpx;
line-height: 32rpx; line-height: 32rpx;
padding-bottom: 16rpx; margin-bottom: 8rpx;
.th, .down-tips {
.td { position: absolute;
width: calc((100% - 116rpx) / 4); left: -116rpx;
top: -60rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #FFFFFF;
background: rgba(0, 0, 0, 0.60);
padding: 0 16rpx;
border-radius: 12rpx;
font-weight: 500;
.icon-rank { &::after {
width: 24rpx; display: inline-block;
height: 24rpx; content: '';
vertical-align: middle; position: absolute;
padding-right: 4rpx; bottom: -27rpx;
right: 67rpx;
width: 0;
height: 0;
border: 18rpx solid;
border-color: #686868 transparent transparent;
} }
} }
.rank-row-name {
max-width: 200rpx;
font-size: 24rpx;
color: #3666FE;
margin-right: 12rpx;
}
.name-disabled {
max-width: 200rpx;
font-size: 24rpx;
color: #5A6066;
margin-right: 12rpx;
}
&-dept {
color: #8A8C90;
}
&-txt {
color: rgba(90, 96, 102, 1);
padding: 0 10rpx 0 0;
}
&-txt::after {
display: inline-block;
content: '';
background-color: #CCCED1;
width: 1.2rpx;
height: 54%;
margin-left: 10rpx;
}
&-txt:last-child::after {
background-color: transparent;
}
}
.rank-row:last-child {
margin-bottom: 0;
}
}
.rank-price {
text-align: right;
font-size: 26rpx;
color: #8A8C90;
height: 64rpx;
line-height: 64rpx;
}
.txt-red {
color: #F35251;
}
// .th,
// .td {
// width: calc((100% - 116rpx) / 4);
// .icon-rank {
// width: 24rpx;
// height: 24rpx;
// vertical-align: middle;
// padding-right: 4rpx;
// }
// }
}
.rank:last-child {
border: none;
} }
.tr-no-data { .tr-no-data {
...@@ -185,11 +313,16 @@ ...@@ -185,11 +313,16 @@
.btn-more { .btn-more {
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
color: #5A6066; // color: #5A6066;
border: 2rpx solid #EEEEEE; // border: 2rpx solid #EEEEEE;
border-radius: 28rpx; // border-radius: 28rpx;
text-align: center; text-align: center;
margin: 0 20rpx 16rpx; margin: 0 20rpx;
.icon-more {
width: 92rpx;
height: 36rpx;
}
} }
} }
} }
...@@ -240,6 +373,36 @@ ...@@ -240,6 +373,36 @@
} }
} }
} }
// 战报
.new-report {
display: flex;
margin-top: 20rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #5A6066;
.report-left {
box-sizing: border-box;
display: flex;
font-size: 20rpx;
color: #3666FE;
padding: 0 20rpx;
height: 100%;
background: rgba(54, 102, 254, 0.06);
border: 2rpx solid rgba(62,113,254,0.70);
border-radius: 30rpx;
margin-right: 4rpx;
.icon-report {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
margin-top: -2rpx;
}
}
}
} }
} }
} }
...@@ -248,3 +411,7 @@ ...@@ -248,3 +411,7 @@
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
// .totalAmount{
// font-family: 'number';
// }
\ No newline at end of file \ No newline at end of file
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="crowdfund-layout">
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt font-number">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<!-- text-hide -->
<view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}">
{{item.activityName}}
</view>
<view class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
母链海报
</view>
<view class="down-tips" wx:if="{{index == 0 && isShowTip}}">下载活动海报分享给门店开展活动</view>
</view>
<view class="content">
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{subItem.isNumber ? filter.money_three_for_two_thousands(item[subItem.name]) : item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank" wx:if="{{item.showStaffList.length}}">
<view class="rank-title">员工任务排名</view>
<view class="rank-table">
<view wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="rank">
<view class="rank-left">
<view class="rank-num">{{idx + 1}}</view>
<view class="rank-head">
<glsx-image wx:if="{{subItem.shareType == 1}}" class="icon-wechat" src="output/icon-wechat.webp" />
<image wx:if="{{subItem.imageUrl}}" src="{{subItem.imageUrl}}" />
<glsx-image wx:else src="output/icon-head.webp" />
</view>
<view class="rank-content">
<view class="rank-row">
<!-- <text wx:if="{{subItem.goodUrl}}" class="rank-row-name text-hide" bindtap="handleXiReport" data-item="{{subItem}}">{{subItem.shareName}}</text> -->
<text wx:if="{{subItem.goodUrl}}" class="rank-row-name text-hide">{{subItem.shareName}}</text>
<text wx:else class="name-disabled text-hide">{{subItem.shareName}}</text>
<text class="rank-row-dept">{{subItem.departmentName || ''}}</text>
</view>
<view class="rank-row">
<text class="rank-row-txt">访客<text class="font-number">{{subItem.browseCount || 0}}</text>人</text>
<text class="rank-row-txt">成交<text class="font-number">{{subItem.dealCount || 0}}</text>单</text>
</view>
</view>
</view>
<view wx:if="{{subItem.totalAmount}}" class="rank-price txt-red font-number">
¥ {{filter.money_three_for_two_thousands(subItem.totalAmount || 0.00)}}
</view>
<view wx:else class="rank-price">暂无业绩</view>
</view>
</view>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">
<glsx-image class="icon-more" src="output/icon-more.webp" />
</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest" wx:if="{{item.activityStatus == 2 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">{{item.suggestTxt}}推荐以下建议:</view>
<view class="suggest-block">
<view class="suggest-step" wx:for="{{item.suggestList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view>
</view>
</view>
</view>
<!-- 战报 -->
<view class="new-report" wx:if="{{item.activityStatus != 1}}">
<view class="report-left" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view>
<view class="report-left" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view>
</view>
</view>
</view>
</view>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{false}}" bindlongtouch="longtouch" />
<!-- <poster
posterItem="{{posterItem}}"
id="poster"
show="{{isShowPoster}}"
bindlongtouch="handlePosterTouch" /> -->
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
// packagesList/packageOutput/components/poster/poster.js
Component({
/**
* 组件的属性列表
*/
properties: {
posterItem: {
type: Object,
value: {}
},
show: {
type: Boolean,
value: false
},
scrollImg: {
type: Boolean,
value: true
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
hide() {
this.setData({
show: false,
poster: ''
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/packageOutput/components/poster/poster.wxss */
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 998;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(0,0,0,.8);
}
.bg-white {
padding: 32rpx 32rpx 0 32rpx;
background-color: #FFFFFF;
}
.poster {
width: 500rpx;
height: 68%;
// height: 1108rpx;
overflow: scroll;
border-radius: 8rpx 8rpx 0 0;
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 500rpx;
height: 90rpx;
background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx;
font-weight: 500;
font-size: 32rpx;
color: #3666FE;
margin-top: -2rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
}
.tips {
margin: 40rpx 80rpx 0;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
.underline{
font-weight: 600;
text-decoration: underline;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/packageOutput/components/poster/poster.wxml-->
<block wx:if="{{show}}">
<!-- catchtouchmove="noScroll" -->
<view class="layout">
<view class="bg" bindtap="hide" />
<block wx:if="{{scrollImg}}">
<view class="poster">
<!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> -->
<image src="{{posterItem.posterUrl}}" mode="widthFix" show-menu-by-longpress />
<!-- </scroll-view> -->
</view>
</block>
<block wx:else>
<image src="{{posterItem.posterUrl}}" class="poster" mode="widthFix" show-menu-by-longpress bindlongpress="longpress" />
</block>
<view class="btn">
<glsx-image src="output/longtap.png" class="icon"></glsx-image>
长按图片转发
</view>
<view class="tips">最近更新时间:{{posterItem.date}} </view>
</view>
</block>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> -->
/**设置千分位 */
var setPrice = function (n = 0.0) {
if ((typeof n == 'string' || typeof n == 'number') && !isNaN(n)) {
n = parseFloat(n).toFixed(2)
var r = getRegExp('(d{1,3})(?=(d{3})+(?:.))', 'g')
var p = n.replace(r, ',')
return p
// var r = getRegExp('/./', 'g')
// var p = n.replace(r, 'test')
// return n
} else {
console.log(n, '不是一个数字', !isNaN(n))
}
}
var threeNumForTwo = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
...@@ -36,7 +36,6 @@ Page({ ...@@ -36,7 +36,6 @@ Page({
outputApi.getSceneProStatus(params).then(res => { outputApi.getSceneProStatus(params).then(res => {
var proList = res.find(item => item.sceneCode == sceneCode) var proList = res.find(item => item.sceneCode == sceneCode)
this.setData({ this.setData({
// ['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList.filter(item => item.openFlag == 0)
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList ['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList
}) })
this.setCurActivity() this.setCurActivity()
...@@ -79,7 +78,10 @@ Page({ ...@@ -79,7 +78,10 @@ Page({
// wx.$api.showToast('申请成功') // wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back(page => { wx.$router.back(page => {
page.getClueInit && page.getClueInit() let node = page.selectComponent('#indexclue')
// console.log(node)
node.getClueInit && node.getClueInit()
// page.getClueInit && page.getClueInit()
}) })
}, 1000) }, 1000)
}, },
...@@ -102,7 +104,7 @@ Page({ ...@@ -102,7 +104,7 @@ Page({
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
icon: 'success', icon: 'success',
duration: 3000, duration: 2000,
mask: true, mask: true,
success: () => { success: () => {
this.handleJump() this.handleJump()
...@@ -129,8 +131,11 @@ Page({ ...@@ -129,8 +131,11 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() {
wx.setNavigationBarTitle({
title: '开通店面业务',
})
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
......
...@@ -65,6 +65,7 @@ page { ...@@ -65,6 +65,7 @@ page {
flex-wrap: wrap; flex-wrap: wrap;
.activity-item { .activity-item {
position: relative;
box-sizing: border-box; box-sizing: border-box;
width: calc((100% - 40rpx) / 3); width: calc((100% - 40rpx) / 3);
height: 64rpx; height: 64rpx;
...@@ -74,6 +75,14 @@ page { ...@@ -74,6 +75,14 @@ page {
font-size: 28rpx; font-size: 28rpx;
margin: 0 20rpx 16rpx 0; margin: 0 20rpx 16rpx 0;
border-radius: 4rpx; border-radius: 4rpx;
.icon-mark {
position: absolute;
top: 0;
right: 0;
width: 60rpx;
height: 60rpx;
}
} }
.activity-item:nth-child(3n) { .activity-item:nth-child(3n) {
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view> <view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box" wx:if="{{sceneActive != 1}}"> <view class="activity-box" wx:if="{{sceneActive != 1}}">
<view wx:for="{{activityList}}" wx:key="index" class="activity-item"> <view wx:for="{{activityList}}" wx:key="index" class="activity-item">
<!-- productStatus:0未申请;1申请中;2已开通;3:已结束 -->
<view wx:if="{{item.openFlag != 0 && item.productStatus == 2}}">
<glsx-image wx:if="{{sceneActive == 4}}" src="output/mark-active.webp" class="icon-mark"></glsx-image>
<glsx-image wx:if="{{sceneActive == 2 || sceneActive == 3}}" src="output/mark-open.webp" class="icon-mark"></glsx-image>
</view>
<view wx:if="{{item.openFlag == 0}}" class="text-hide {{ item.checked ? 'active' : '' }}" bindtap="handleActClick" data-idx="{{index}}">{{item.productName}}</view> <view wx:if="{{item.openFlag == 0}}" class="text-hide {{ item.checked ? 'active' : '' }}" bindtap="handleActClick" data-idx="{{index}}">{{item.productName}}</view>
<view class="text-hide item-disabled" wx:else>{{item.productName}}</view> <view class="text-hide item-disabled" wx:else>{{item.productName}}</view>
</view> </view>
......
{ {
"enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"scene-box": "../../../components/SceneBox/SceneBox", "scene-box": "../../../components/SceneBox/SceneBox",
"output-transform": "./components/outputTransform/outputTransform", "output-transform": "../components//outputTransform/outputTransform",
"output-crowdfund": "./components/outputCrowdfund/outputCrowdfund" "output-crowdfund": "../components/outputCrowdfund/outputCrowdfund"
} }
} }
...@@ -38,6 +38,18 @@ ...@@ -38,6 +38,18 @@
border-bottom: 1rpx dashed #CCCED1; border-bottom: 1rpx dashed #CCCED1;
} }
.title-open {
float: right;
font-size: 28rpx;
color: #3666FE;
font-weight: 400;
}
.icon-open {
width: 38rpx;
height: 38rpx;
}
.scene-box { .scene-box {
padding: 27rpx 0 24rpx; padding: 27rpx 0 24rpx;
} }
...@@ -80,11 +92,21 @@ ...@@ -80,11 +92,21 @@
} }
.activity-item.active { .activity-item.active {
background: #3666FE; // background: #3666FE;
box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40), 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32); box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40), 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32);
color: #FFFFFF; // color: #FFFFFF;
border-width: 0; border-width: 0;
} }
.activity-item.open.active {
background: #3666FE;
color: #FFFFFF;
}
.activity-item.no-open.active {
background: #CCCED1;
color: #323436;
}
} }
.activity-content { .activity-content {
...@@ -129,17 +151,27 @@ ...@@ -129,17 +151,27 @@
} }
} }
.btn { .btn-box {
position: fixed; position: fixed;
bottom: 16rpx; bottom: 0;
left: 0; left: 0;
width: 100%;
height: 116rpx;
background-color: #FFFFFF;
}
.btn-box.shadow {
box-shadow: 0 -2rpx 2rpx 0 rgba(0, 0, 0, 0.08);
}
.btn {
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
margin: 0 32rpx; margin: 14rpx 32rpx;
.btn-blue { .btn-blue {
background: #3666FE; background: #3666FE;
...@@ -150,6 +182,34 @@ ...@@ -150,6 +182,34 @@
background: #CCCED1; background: #CCCED1;
border-radius: 8rpx; border-radius: 8rpx;
} }
.btn-share {
background: #3666FE;
border-radius: 12rpx;
// animation: xing ease-in-out 2s infinite;
}
}
}
@keyframes xing {
0% {
transform: scale(0.85);
}
25% {
transform: scale(1);
}
50% {
transform: scale(0.85);
}
75% {
transform: scale(1);
}
100% {
transform: scale(0.85);
} }
} }
......
<!-- packageOutput/pages/summary/summary.wxml --> <!-- packageOutput/pages/summary/summary.wxml -->
<view class="summary"> <view class="summary">
<view class="layout {{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}"> <view class="layout {{ (sceneActive != 1 && isShowData) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'bg-white' : 'p-rl-20'}}"> <view class="{{ (sceneActive != 1 && isShowData) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'm-rl-20' : ''}}"> <view class="{{ (sceneActive != 1 && isShowData) ? 'm-rl-20' : ''}}">
<view class="title bg-white ">选产品/活动</view> <view class="title bg-white">
选产品/活动
<view class="title-open" bindtap="handleJump">
<glsx-image class="icon-open" :webp="{{true}}" src="output/icon-open.webp"></glsx-image>
开通活动
</view>
</view>
<view class="scene-box bg-white"> <view class="scene-box bg-white">
<scene-box <scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange" />
formData="{{sceneObj}}"
scenePriceList="{{scenePriceList}}"
sceneActive="{{sceneActive}}"
bindhandleSceneChange="handleSceneChange" />
</view> </view>
</view> </view>
</view> </view>
<!-- 活动 --> <!-- 活动 -->
<view class="p-rl-20 bg-white"> <view class="p-rl-20 bg-white">
<scroll-view <scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}">
scroll-x="{{true}}"
enable-flex
class="activity-box"
scroll-with-animation
scroll-left="{{scrollLeft}}">
<view class="flex"> <view class="flex">
<view <view class="activity-item {{ activityActive == index ? 'active' : ''}} {{(item.productStatus == 2 || item.productStatus == 3) ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">
class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.productStatus == 2 ? 'open' : 'no-open'}}"
wx:for="{{activityList}}"
wx:key="index"
bindtap="handleActChange"
data-idx="{{index}}">
{{item.productName}} {{item.productName}}
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- 活动内容 --> <!-- 活动内容 -->
<view class="activity-content {{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? '' : 'p-rl-20'}}"> <view class="activity-content {{ (sceneActive != 1 && isShowData) ? '' : 'p-rl-20'}}">
<view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}"> <view wx:if="{{isShowData && sceneActive != 1}}">
<view class="activity-title title bg-white p-l-20 no-border"> <view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view> <view>看产值</view>
<view class="select" bindtap="handleSearch"> <view class="select" bindtap="handleSearch">
...@@ -49,20 +41,29 @@ ...@@ -49,20 +41,29 @@
</view> </view>
</view> </view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" /> <output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" />
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" /> <output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack"/>
</view> </view>
<view wx:else class="content-empty bg-white"> <view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" /> <image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{sceneActive != 1}}"> <view wx:if="{{sceneActive != 1 && activityList.length}}">
<view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}"> <view class="isFullSucreen btn-box" wx:if="{{ !isShowData && !merchantInfo.isSuper}}">
<view class="btn">
<view class="btn-blue" bindtap="handleJump">点击开通</view> <view class="btn-blue" bindtap="handleJump">点击开通</view>
</view> </view>
</view> </view>
<view class="isFullSucreen btn" wx:if="{{sceneActive == 1}}"> </view>
<view wx:if="{{sceneActive == 1}}" class="isFullSucreen btn-box">
<view class="btn">
<view class="btn-disabled">点击开通</view> <view class="btn-disabled">点击开通</view>
</view> </view>
</view>
<view wx:if="{{sceneActive == 4 && activityList.length && isShowData && activityList[activityActive].outputData.shareBtnIdx && activityList[activityActive].outputData.shareBtnIdx != -1}}" class="isFullSucreen btn-box shadow" bindtap="handleBtnShare">
<view class="btn">
<view class="btn-share">活动进行中,分享母链海报开展活动</view>
</view>
</view>
</view> </view>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{true}}" bindlongtouch="longtouch" />
\ No newline at end of file \ No newline at end of file
// pages/apply/apply.js
const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js'
import applyApi from '~/api/applyApi/index'
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = '../../images/'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
IMG_URL,
carObj: {
name: '',
model: '',
selNum: '',
contact: '',
phone: ''
}
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight
// headerHeight: height / 2 + statusBarHeight + 88*2
})
},
// 提交信息
applyFn() {
let { name } = this.data.carObj
console.log('name: ', name)
if (!name) {
wx.pro.showToast({
title: '请输入开店名称',
icon: 'error'
})
return
}
this.submitForm()
// console.log(123)
},
submitForm() {
let { carObj, clueId } = this.data
let { userInfo } = wx.$storage.get()
let MerchantInfo = userInfo.subLoginUser
let params = {
serviceMerchantId: MerchantInfo.merchantId,
serviceMerchantName: MerchantInfo.merchantName,
serviceMerchantPhone: MerchantInfo.phone,
merchantContact: carObj.contact,
phone: carObj.phone,
applyMerchantName: carObj.name,
carType: carObj.model,
baseCustomer: carObj.selNum,
clueId
}
// return wx.$api.showToast('申请成功')
applyApi
.merchantApply(params)
.then(result => {
console.log(result)
if (result) {
wx.$api.showToast('申请成功')
setTimeout(() => {
wx.$router.back(page => {
let node = page.selectComponent('#indexclue')
node && node.getClueInit()
})
}, 1000)
}
})
.catch(err => {})
},
bindinputFn(e) {
// console.log("e: ", e);
let name = e.currentTarget.dataset.name
let content = e.detail.value
this.setData({
[`carObj.${name}`]: content
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onRoute(params) {
// 线索id
this.setData({
clueId: params
})
// console.log('params: ', params)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"usingComponents": {},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"enablePullDownRefresh": true
}
\ No newline at end of file \ No newline at end of file
/* pages/apply/apply.wxss */
page {
background: white;
height: 100%;
position: relative;
}
.apply {
.head {
width: 100%;
}
.introduce {
height: 360rpx;
}
.content {
padding: 16px 17px 0;
.item{
}
.top{
display: flex;
align-items: center;
.line{
width: 3px;
height: 14px;
background:var(--btnColor);
}
.title{
margin-left: 8px;
font-weight: 500;
font-size: 18px;
color: #323436;
}
}
.inp-wrap{
.title{
margin-top: 8px;
margin-bottom: 8px;
font-weight: 500;
font-size: 14px;
color: #323436;
.point{
color: #F35251;
}
}
.inp{
padding: 7px 12px;
border: 1px solid #E3E4E8;
border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8A8C90;
}
}
}
.btn {
width: 648rpx;
font-weight: 500;
font-size: 17px;
color: #ffffff;
background: var(--btnColor);
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
}
}
<!-- pages/apply/apply.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务
</navigation-bar>
<view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-bg.png" />
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false" style="margin-top: 32rpx;">
开店名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
\ No newline at end of file \ No newline at end of file
/* packagesList/webView/pages/webView.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -49,7 +49,13 @@ Page({ ...@@ -49,7 +49,13 @@ Page({
hasUserInfo: false, hasUserInfo: false,
phone: '', //授权手机号 phone: '', //授权手机号
userInfo: '', userInfo: '',
isAuthphone: true //授权昵称弹窗显示,更多按钮显示 isAuthphone: true, //授权昵称弹窗显示,更多按钮显示
// 视频播放地址
videoSrc:'',
videoTitle:'',
//下载海报授权
showAuth: false,
img_version:0.1
}, },
observers: { observers: {
actNum: function (actNum) { actNum: function (actNum) {
...@@ -130,7 +136,7 @@ Page({ ...@@ -130,7 +136,7 @@ Page({
//接受跳转的路由参数(小程序页面跳转) //接受跳转的路由参数(小程序页面跳转)
onRoute(options) { onRoute(options) {
console.log('分享options: ', options) // console.log('分享onRoute ', options)
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
// if(!Object.keys(options).includes('actNum'))return // if(!Object.keys(options).includes('actNum'))return
let { senceData } = this.data let { senceData } = this.data
...@@ -197,10 +203,18 @@ Page({ ...@@ -197,10 +203,18 @@ Page({
content: '生成并下载页面为海报', content: '生成并下载页面为海报',
success: async res => { success: async res => {
if (res.confirm) { if (res.confirm) {
// let hasAuth = await _this.toSetting() wx.getSetting({
// if(hasAuth){ success: (res)=> {
if(res.authSetting['scope.writePhotosAlbum']===false){
_this.setData({
showAuth: true
})
}else{
_this.download() _this.download()
// } }
}
})
} }
}, },
confirmText:'下载', confirmText:'下载',
...@@ -362,6 +376,16 @@ Page({ ...@@ -362,6 +376,16 @@ Page({
} }
}) })
}, },
authFail(){
wx.showToast({
title: "下载海报前需要您授权'添加到相册'权限",
icon: "none",
duration: 2500,
});
},
authSuccess(){
this.download()
},
// //模态框关闭 // //模态框关闭
// modelClose() { // modelClose() {
// this.triggerEvent("modelclose", false); // this.triggerEvent("modelclose", false);
...@@ -418,7 +442,7 @@ Page({ ...@@ -418,7 +442,7 @@ Page({
*/ */
async onLoad(options) { async onLoad(options) {
await this.getData() await this.getData()
console.log('分享options12255565: ', options) // console.log('分享onLoad: ', options)
// actNum,activeNavIdx isShare // actNum,activeNavIdx isShare
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
...@@ -536,11 +560,33 @@ Page({ ...@@ -536,11 +560,33 @@ Page({
}, 500) }, 500)
} }
})(), })(),
//视频弹窗
videoplay(){
wx.$eventbus.on('getvideo',(e)=>{
// console.log('getvideo event bus: ', e);
let obj = {
videoTitle:e.title,
videoSrc:e.src
}
this.getVideoUrl(obj)
wx.nextTick(() => {
this.videocomp.play();
});
})
},
//设置视频url
getVideoUrl(params){
this.setData(params)
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady: function() {
this.videocomp = this.selectComponent("#videocomp1");
this.videoplay()
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
......
{ {
"usingComponents": { "usingComponents": {
"product": "../tab/index/components/product/product" "product": "../tab/index/components/product/product",
"FullscreenVideo":"../../components/FullscreenVideo/FullscreenVideo",
"authorize":"/components/Authorize/Authorize"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
......
...@@ -56,3 +56,9 @@ ...@@ -56,3 +56,9 @@
<!-- 授权昵称 --> <!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow --> <!-- !hasUserInfo && !isShow -->
<view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view> <view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view>
<!-- 全屏视频组件 -->
<FullscreenVideo id="videocomp1" src="{{videoSrc}}" title="{{videoTitle}}"></FullscreenVideo>
<!-- 下载授权 -->
<block wx:if="{{showAuth}}">
<authorize title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?" scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
...@@ -7,11 +7,12 @@ Component({ ...@@ -7,11 +7,12 @@ Component({
*/ */
properties: { properties: {
item: { item: {
type: Object, // type: Object,
type: null,
observer(n) { observer(n) {
console.log(n, '=================') console.log(n, '=================')
this.getImageInfo(n) this.getImageInfo(n)
} },
} }
}, },
......
...@@ -19,47 +19,72 @@ ...@@ -19,47 +19,72 @@
background: rgba(28, 27, 35, 0.60); background: rgba(28, 27, 35, 0.60);
} }
.titleTime {
height: 64rpx;
line-height: 64rpx;
width: 100%;
background-color: rgba(54, 102, 254, 0.08);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 22rpx;
color: #3666FE;
text-align: center;
}
.imgCon { .imgCon {
height: calc(100% - 64rpx); // height: calc(100% - 64rpx);
height: 100%;
overflow: scroll; overflow: scroll;
} }
.poster { .poster {
position: relative;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 32rpx;
// padding-bottom: 10rpx; // padding-bottom: 10rpx;
width: 558rpx; width: 558rpx;
// height: 60%; // height: 60%;
height: 1108rpx; height: 1108rpx;
// overflow: scroll; // overflow: scroll;
border-radius: 8rpx; border-radius: 8rpx 8rpx 0 0;
&::after {
content: '';
width: 100%;
height: 132rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/bgImg.webp') no-repeat;
background-size: 100% 132rpx;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// bgImg.webp
} }
// .btn {
// width: 320rpx;
// height: 88rpx;
// line-height: 88rpx;
// background: #3666FE;
// // background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
// border-radius: 16rpx;
// font-weight: 500;
// font-size: 32rpx;
// color: #FFFFFF;
// text-align: center;
// margin-top: 32rpx;
// }
.btn { .btn {
width: 320rpx; display: flex;
height: 88rpx; align-items: center;
line-height: 88rpx; justify-content: center;
background: #3666FE; width: 558rpx;
// background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%); height: 90rpx;
border-radius: 16rpx; background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #3666FE;
text-align: center;
margin-top: 32rpx; // margin-top: -2rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
} }
.tips { .tips {
......
...@@ -3,12 +3,18 @@ ...@@ -3,12 +3,18 @@
<!-- catchtouchmove="noScroll" --> <!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide" /> <view class="bg" bindtap="hide" />
<view class="poster"> <view class="poster">
<view class="titleTime">最近更新时间 {{item.updatedTime}}</view> <!-- <view class="titleTime">最近更新时间 {{item.updatedTime}}</view> -->
<view class="imgCon" catchtouchmove="noScroll"> <!-- catchtouchmove="noScroll" -->
<image src="{{poster}}" mode="widthFix" /> <view class="imgCon">
<image src="{{poster}}" mode="widthFix" show-menu-by-longpress />
</view>
</view> </view>
<!-- <view class="btn" bindtap="download">下载图片并转发</view> -->
<view class="btn">
<glsx-image src="output/longtap.png" class="icon" />
长按图片转发
</view> </view>
<view class="btn" bindtap="download">下载图片并转发</view> <view class="titleTime">最近更新时间: {{item.updatedTime}}</view>
<!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> --> <!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> -->
</view> </view>
</block> </block>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view <view
class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}" class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}"
wx:for="{{typeList}}" wx:for="{{typeList}}"
wx:key="*this" wx:key="index"
data-index="{{index}}" data-index="{{index}}"
style="{{index == 0 ? 'margin-left: 0px;' : ''}}" style="{{index == 0 ? 'margin-left: 0px;' : ''}}"
bindtap="filterTypeFn"> bindtap="filterTypeFn">
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bottomTips" wx:if="{{clueList.length>8}}">到底啦!</view> <view class="bottomTips" wx:if="{{clueList.length>10}}">到底啦!</view>
<view class="noDataImg" wx:if="{{!clueList.length}}"> <view class="noDataImg" wx:if="{{!clueList.length}}">
<image webp src="{{IMG_URL}}index/trEmpty.png " /> <image webp src="{{IMG_URL}}index/trEmpty.png " />
<text class="noDataTxt">没有符合条件的线索~</text> <text class="noDataTxt">没有符合条件的线索~</text>
......
...@@ -14,7 +14,7 @@ Component({ ...@@ -14,7 +14,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
refresherFlag:true,
}, },
/** /**
...@@ -27,5 +27,14 @@ Component({ ...@@ -27,5 +27,14 @@ Component({
let { num } = e.currentTarget.dataset let { num } = e.currentTarget.dataset
this.triggerEvent('selectCar',num) this.triggerEvent('selectCar',num)
}, },
refresherrefreshFn(){
this.triggerEvent('refresherrefresh')
setTimeout(()=>{
this.setData({
refresherFlag:false
})
},1000)
}
} }
}) })
/* pages/tab/index/components/indexProduct/indexProduct.wxss */ /* pages/tab/index/components/indexProduct/indexProduct.wxss */
.content-scroll{
height: 100vh;
// height: calc(100% - 80rpx);
}
.content-product { .content-product {
.scene { .scene {
// margin-top: 32rpx; // margin-top: 32rpx;
......
<!--pages/tab/index/components/indexProduct/indexProduct.wxml--> <!--pages/tab/index/components/indexProduct/indexProduct.wxml-->
<!-- class="content-scroll" -->
<!-- style="height: calc(100vh - {{headerHeight/2}}px)" -->
<!-- <scroll-view
scroll-y="true"
refresher-enabled="{{true}}"
refresher-triggered="{{refresherFlag}}"
bindrefresherrefresh="refresherrefreshFn"> -->
<view <view
class="content-product" class="content-product"
hover-class="none" hover-class="none"
...@@ -24,6 +31,7 @@ ...@@ -24,6 +31,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- stickyTop="{{headerHeight}}" -->
<product <product
img_version="{{img_version}}" img_version="{{img_version}}"
isShow="{{false}}" isShow="{{false}}"
...@@ -33,3 +41,4 @@ ...@@ -33,3 +41,4 @@
origin="home" origin="home"
bindsharehandle="sharehandle" /> bindsharehandle="sharehandle" />
</view> </view>
<!-- </scroll-view> -->
\ No newline at end of file \ No newline at end of file
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
color: #6C6C6C; color: #6C6C6C;
display: flex; display: flex;
align-items: center; align-items: center;
.icon{
.icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 6rpx; margin-right: 6rpx;
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
.prod-info .earnings-num { .prod-info .earnings-num {
font-size: 28rpx; font-size: 28rpx;
// font-family: DINAlternate-Bold; // font-family: DINAlternate-Bold;
font-weight: Bold; // font-weight: Bold;
color: #f35251; color: #f35251;
} }
...@@ -178,6 +179,7 @@ ...@@ -178,6 +179,7 @@
.project-img { .project-img {
overflow: auto; overflow: auto;
// height: 1600rpx; // height: 1600rpx;
// white-space: nowrap; // white-space: nowrap;
.img-item { .img-item {
...@@ -207,6 +209,12 @@ ...@@ -207,6 +209,12 @@
background-color: #f5f7fb; background-color: #f5f7fb;
} }
.stickyTab-fixed {
position: fixed;
left: 0;
top: 352rpx;
}
// .out-tab{ // .out-tab{
// .out-text { // .out-text {
// // color: red !important; // // color: red !important;
...@@ -427,6 +435,11 @@ ...@@ -427,6 +435,11 @@
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.video-item .video-card {
width: 100%;
height: 590rpx;
}
.video-item video { .video-item video {
width: 100%; width: 100%;
height: 590rpx; height: 590rpx;
...@@ -436,9 +449,13 @@ ...@@ -436,9 +449,13 @@
.video-item .download { .video-item .download {
position: absolute; position: absolute;
top: 0; top: 0;
right: 2px; right: 0;
font-size: 26rpx; width: 48rpx;
color: #666; height: 48rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/down-video.png");
background-repeat: no-repeat;
// font-size: 26rpx;
// color: #666;
z-index: 1; z-index: 1;
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<!-- senceData[actNum]['productList'][activeNavIdx].changeSale || --> <!-- senceData[actNum]['productList'][activeNavIdx].changeSale || -->
<text class="sale" wx:if="{{ actNum!=4}}" 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 class="sale" wx:if="{{ actNum!=4}}" 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>
<text class="earnings" wx:if="{{ actNum!=4}}" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">¥{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings" wx:if="{{ actNum!=4}}" decode="{{true}}">预估收益&nbsp;<text class="earnings-num font-number">¥{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text> </text>
</view> </view>
<view class="share-btn" wx:if="{{!isShare && origin =='home' && actNum!=4}}" bindtap="onShareFn"> <view class="share-btn" wx:if="{{!isShare && origin =='home' && actNum!=4}}" bindtap="onShareFn">
...@@ -42,10 +42,14 @@ ...@@ -42,10 +42,14 @@
</view> </view>
<view class="project-wrap {{isShow ?'check-prod':''}}"> <view class="project-wrap {{isShow ?'check-prod':''}}">
<!-- stickyTop+88 --> <!-- stickyTop+88 -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx"> <!-- style="top:{{isShare ? stickyTop : stickyTop}}rpx" -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx" >
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight /> <tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view> </view>
<!-- wx:if="{{navFixed}}" -->
<!-- <view class="stickyTab stickyTab-fixed">
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view> -->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"--> <!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> --> <!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> -->
<view class="project-img" hover-class="none" hover-stop-propagation="false"> <view class="project-img" hover-class="none" hover-stop-propagation="false">
...@@ -81,14 +85,13 @@ ...@@ -81,14 +85,13 @@
<view class="video-item"> <view class="video-item">
<view class="download" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}">视频下载</view> <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}}" />
<!-- <image class="video-card" webp bindtap="getVideoUrl" data-title="{{item.name}}" data-src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" src="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}"></image> -->
<view class="video-text">{{item.name}}</view> <view class="video-text">{{item.name}}</view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
......
{ {
"usingComponents": { "usingComponents": {
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"crowdfund-poster": "./components/CrowdfundPoster/CrowdfundPoster", "indexProduct": "./components/indexProduct/indexProduct",
"indexProduct":"./components/indexProduct/indexProduct", "indexClue": "./components/indexClue/indexClue",
"indexClue":"./components/indexClue/indexClue" "FullscreenVideo": "../../../components/FullscreenVideo/FullscreenVideo"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 50, "onReachBottomDistance": 50
"enablePullDownRefresh":true
} }
...@@ -107,7 +107,7 @@ page { ...@@ -107,7 +107,7 @@ page {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 3; z-index: 999;
} }
} }
......
...@@ -19,19 +19,21 @@ ...@@ -19,19 +19,21 @@
</view> </view>
</view> </view>
<!-- 托客户内容 --> <!-- 托客户内容 -->
<indexProduct wx:if="{{tabIndx == 1 }}" <indexProduct
wx:if="{{tabIndx == 1 }}"
bindselectCar="selectCar" bindselectCar="selectCar"
senceData="{{senceData}}" senceData="{{senceData}}"
actNum="{{actNum}}" actNum="{{actNum}}"
img_version="{{img_version}}" img_version="{{img_version}}"
headerHeight="{{headerHeight}}"></indexProduct> headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" />
<!-- 看线索内容 --> <!-- 看线索内容 -->
<indexClue <indexClue
id="indexclue"
wx:if="{{tabIndx == 0 }}" wx:if="{{tabIndx == 0 }}"
headerHeight="{{headerHeight}}" headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}" disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" bindshowToggleToast="showToggleToast" />
></indexClue>
</view> </view>
<!-- 收藏、取消提示框 --> <!-- 收藏、取消提示框 -->
<vas-toast id='toast' /> <vas-toast id='toast' />
...@@ -98,5 +100,8 @@ ...@@ -98,5 +100,8 @@
</form> </form>
</view> </view>
</view> </view>
<crowdfund-poster item="{{posterItem}}" /> <!-- -->
<crowdfund-poster wx:if="{{!guideShow}}" item="{{posterItem}}" />
<!-- 全屏视频组件 -->
<FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" />
// pages/tab/mine/mine.js // pages/tab/mine/mine.js
<<<<<<< HEAD
import { import {
IMG_URL IMG_URL
} from '~/utils/constantData' } from '~/utils/constantData'
=======
// import { IMG_URL } from '~/utils/constantData'
>>>>>>> dev_v3.1
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
icon0: `${IMG_URL}/personal/icon1.png`, icon0: `/personal/icon1.png`,
icon1: `${IMG_URL}/personal/icon2.png`, icon1: `/personal/icon2.png`,
userAvatarUrl: `${IMG_URL}/personal/userAvatarUrl.png` userAvatarUrl: `/personal/userAvatarUrl.png`
}) })
Page({ Page({
/** /**
...@@ -16,12 +20,18 @@ Page({ ...@@ -16,12 +20,18 @@ Page({
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
IMAGES, IMAGES,
isRead: false isRead: false,
test: `/personal/icon2.png`
}, },
navGO(e) { navGO(e) {
<<<<<<< HEAD
let { let {
path path
} = e.currentTarget.dataset } = e.currentTarget.dataset
=======
let { path } = e.currentTarget.dataset
// console.log(path)
>>>>>>> dev_v3.1
wx.$router.go(path) wx.$router.go(path)
}, },
logout() { logout() {
...@@ -48,10 +58,15 @@ Page({ ...@@ -48,10 +58,15 @@ Page({
}) })
} }
}) })
<<<<<<< HEAD
wx.$storage.rm('fileList') wx.$storage.rm('fileList')
=======
// wx.$storage.rm('fileList')
>>>>>>> dev_v3.1
wx.$storage.rm('sessionId') wx.$storage.rm('sessionId')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('userInfo') wx.$storage.rm('userInfo')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('posterId')
wx.$router.reLaunch('login.index') wx.$router.reLaunch('login.index')
}) })
} }
...@@ -69,10 +84,14 @@ Page({ ...@@ -69,10 +84,14 @@ Page({
console.log(e) console.log(e)
}, },
messageBoxPageIsRead() { messageBoxPageIsRead() {
<<<<<<< HEAD
console.log(111) console.log(111)
let { let {
serviceMerchantId serviceMerchantId
} = this.data } = this.data
=======
let { serviceMerchantId } = this.data
>>>>>>> dev_v3.1
mineApi mineApi
.messageBoxPageIsRead({ .messageBoxPageIsRead({
serviceMerchantId serviceMerchantId
...@@ -80,7 +99,8 @@ Page({ ...@@ -80,7 +99,8 @@ Page({
.then(result => { .then(result => {
console.log(result) console.log(result)
this.setData({ this.setData({
isRead: result isRead: result,
test: `/personal/icon2.png`
}) })
}) })
.catch(err => { .catch(err => {
......
...@@ -13,6 +13,19 @@ page { ...@@ -13,6 +13,19 @@ page {
background-color: #fff; background-color: #fff;
} }
.testfont {
font-weight: bold;
font-size: 30rpx;
}
.testfont2 {
font-size: 30rpx;
}
.test3 {
font-size: 40rpx;
}
.layout { .layout {
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
......
<!-- pages/tab/output/output.wxml --> <!-- pages/tab/output/output.wxml -->
<!-- <navigation-bar navStyle="{{navStyle}}">服务商账号名称</navigation-bar> <navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的账号</navigation-bar>
<view class="layout">
</view> -->
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">
我的账号
<!-- <picker
range="{{merchantRange}}"
value="{{subIndex}}"
range-key="merchantName"
bindchange="changePicker"
bindtap="tapPicker"
bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="{{${IMG_URL}/output/arrow.png}}" />
</view>
</view>
</picker> -->
</navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;"> <view class="layout" style="padding-top:{{tabBarStyle}}px;">
<view class="userInfoCon"> <view class="userInfoCon">
<image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp> <glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>
头像 头像
</image> </glsx-image>
<!-- <view class=" test">123456789.0</view>
<view class=" test2">123456789.0</view>
<view class=" test3">123456789.0</view> -->
<view class="name">{{userInfo.merchantName}}</view> <view class="name">{{userInfo.merchantName}}</view>
<view class="id">账号:{{userInfo.merchantId}}</view> <view class="id">账号:{{userInfo.merchantId}}</view>
<view class="createTime">创建时间:{{userInfo.createdDate}}</view> <view class="createTime">创建时间:{{userInfo.createdDate}}</view>
</view> </view>
<view class="utilBoxTitle">常用工具</view> <view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon"> <view class="boxItemCon">
<view class="item" data-path="pages.customerManagement" bind:tap="navGO"> <view class="item" data-path="packagesList.customerManagement" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<image class="img" src="{{IMAGES.icon0}}" /> <glsx-image class="img" src="{{IMAGES.icon0}}" />
</view> </view>
<view class="name">客户管理</view> <view class="name">客户管理</view>
</view> </view>
<view class="item" data-path="pages.messageBox" bind:tap="navGO"> <view class="item" data-path="packagesList.messageBox" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<view class="redPot" hidden="{{!isRead}}" /> <view class="redPot" hidden="{{!isRead}}" />
<image class="img" src="{{IMAGES.icon1}}" /> <!-- <image class="img" src="{{IMAGES.icon1}}" /> -->
<glsx-image class="img" src="{{test}}" />
<!-- <image class="img" src="{{IMAGES.icon1}}" /> -->
</view> </view>
<view class="name">消息盒子</view> <view class="name">消息盒子</view>
</view> </view>
......
// pages/tab/output/components/sceneBox/sceneBox.js // pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
Component({ Component({
options: {
addGlobalClass: true
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml --> <!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="flex scene"> <view class="flex scene">
<view <view
class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
...@@ -9,12 +10,12 @@ ...@@ -9,12 +10,12 @@
<view wx:if="{{formData['showList'][index]}}" class="open-icon"> <view wx:if="{{formData['showList'][index]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image> <image src="{{openedIcon}}" webp></image>
</view> </view>
<image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" /> <image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="lock-img " src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" /> <image wx:else class="lock-img " src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" />
<view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view> <view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view>
<view>{{item.subTitle}}</view> <view class="scene-label">{{item.subTitle}}</view>
<!-- wx:if="{{scenePriceList.length}}" --> <!-- wx:if="{{scenePriceList.length}}" -->
<view class="total-price">¥ {{formData['showList'][index].totalMoney||0}}</view> <view class="total-price">¥ {{filter.money_three_for_two_thousands(formData['showList'][index].totalMoney||0)}}</view>
</view> </view>
</view> </view>
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
.scene-item { .scene-item {
box-sizing: border-box; box-sizing: border-box;
height: 248rpx;
position: relative; position: relative;
width: 25%; width: 25%;
/* flex: 1; */ /* flex: 1; */
...@@ -18,10 +19,11 @@ ...@@ -18,10 +19,11 @@
font-size: 18rpx; font-size: 18rpx;
/* color: #8A8C90; */ /* color: #8A8C90; */
color: #323436; color: #323436;
padding: 32rpx 0 28rpx; padding: 24rpx 0 18rpx;
border-radius: 12rpx; border-radius: 12rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-weight: 500; font-weight: 500;
border: 2rpx solid transparent;
} }
.scene-item:last-child { .scene-item:last-child {
...@@ -56,7 +58,8 @@ ...@@ -56,7 +58,8 @@
.active.scene-item { .active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%); background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
border: 2rpx solid #3666FE; border: 2rpx solid #3666FE;
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); /* box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); */
filter: drop-shadow(0 12rpx 12rpx rgba(180, 186, 204, 0.40));
/* background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/carselect.png') no-repeat; /* background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/carselect.png') no-repeat;
background-size: 100% 100%; */ background-size: 100% 100%; */
} }
...@@ -83,13 +86,18 @@ ...@@ -83,13 +86,18 @@
} }
.scene-img { .scene-img {
width: 56rpx; width: 92rpx;
height: 56rpx; height: 64rpx;
} }
/* .notOpened { /* .notOpened {
color: #8A8C90; color: #8A8C90;
} */ } */
.scene-label {
font-size: 16rpx;
}
.total-price { .total-price {
height: 40rpx; height: 40rpx;
...@@ -97,7 +105,8 @@ ...@@ -97,7 +105,8 @@
margin-top: 22rpx; margin-top: 22rpx;
font-size: 24rpx; font-size: 24rpx;
color: #3666FE; color: #3666FE;
font-weight: 600; /* font-weight: 600; */
font-family: "number";
} }
.lock-img { .lock-img {
......
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!