Commit a04de189 by 张立顺

冲突解决

2 parents 9c39825b 8e713c53
Showing 121 changed files with 2121 additions and 713 deletions
project.config.json
project.private.config.json
sitemap.json
miniprogram_npm
node_modules
# local env files
.env.local
......
## 正式版appid wx2c28337db96364d2
## 体验版appid wx24ebae5768e74138
\ No newline at end of file
## 体验版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 {
...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
......@@ -50,6 +50,7 @@ App({
// 存储设备信息
setSystem_info()
// console.log('test')
},
onShow(options) {
......@@ -59,6 +60,5 @@ App({
onPageNotFound(e) {
wx.$router.goHome()
},
onHide() {},
globalData: {}
onHide() {}
})
{
"pages": [
"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"
],
"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"],
"requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents",
"window": {
......@@ -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": {
"tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup",
"nothing-tips": "/components/Nothing-tips/nothingTips",
"crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster"
"crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster",
"glsx-image": "/components/image/index"
},
"style": "v2",
"resolveAlias": {
"~/*": "/*"
},
......
@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 {
background-color: #F7F7F7;
color: #282829;
......@@ -16,6 +31,10 @@ image {
vertical-align: top;
}
.font-number {
font-family: 'number';
}
.icon-mine-arrow {
width: 16rpx !important;
height: 28rpx !important;
......
{
"component": true,
"usingComponents": {
"authorize":"/components/Authorize/Authorize"
}
"component": true
}
\ No newline at end of file
......@@ -5,43 +5,80 @@
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(28, 27, 35, 0.60);
background: rgba(0, 0, 0, .8);
}
.poster {
width: 558rpx;
height: 68%;
box-sizing: border-box;
width: 500rpx;
max-height: 68%;
// height: 68%;
// height: 1108rpx;
overflow: scroll;
// smoo
// overflow: scroll;
border-radius: 8rpx 8rpx 0 0;
}
.pd {
padding: 32rpx;
background-color: #fff;
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 558rpx;
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;
}
}
}
.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
<block wx:if="{{show}}">
<!-- catchtouchmove="noScroll" -->
<view class="layout">
<view class="bg" bindtap="hide" catchtouchmove="noScroll" />
<view class="poster">
<!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> -->
<image src="{{poster}}" mode="widthFix" show-menu-by-longpress />
<!-- </scroll-view> -->
</view>
<view class="btn">
长按图片转发
</view>
<view class="tips">提示:这是您的专属活动海报,请长按转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view>
</view>
<!-- catchtouchmove="noScroll" catchtouchmove="noScroll" -->
<view class="layout">
<view class="bg" bindtap="hide" />
<!-- style="height:{{height}}" -->
<view class="poster {{item.type == 'warReport'?'pd':''}}">
<block wx:if="{{scrollImg}}">
<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 class="btn">
<glsx-image src="output/longtap.png" class="icon" />
长按图片转发
</view>
<view wx:if="{{item.type == 'warReport'}}" class="titleTime">最近更新时间: {{item.updatedTime}}</view>
<view wx:else class="tips">
温馨提示:您可以转发到门店群,门店员工通过扫描海报二维码可以注册登录
<text class="underline">门店助手</text>
小程序,执行活动任务,转发活动链接促成订单。
</view>
</view>
</block>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> -->
\ No newline at end of file
<!-- <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
<!-- 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
......@@ -5,6 +5,9 @@ Component({
* 组件的属性列表
*/
properties: {
options: {
addGlobalClass: true
},
sceneActive: {
type: Number,
value: -1
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="/pages/tab/output/index.wxs" module="filter" />
<view class="flex scene">
<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}}">
<!-- && sceneActive != (index + 1) -->
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" ></image>
<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:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" ></image>
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{scenePriceList[index].total}}
</view>
</view>
</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}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<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">
<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/icon-car0{{index + 1}}.png?v={{img_version}}"></image>
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{filter.money_three_for_two_thousands(scenePriceList[index].total || 0.00)}}
</view>
</view>
</view>
\ No newline at end of file
......@@ -16,11 +16,12 @@
background: #F7F8FC;
margin-right: 4rpx;
font-size: 18rpx;
/* color: #8A8C90; */
color: #323436;
padding: 32rpx 0 28rpx;
color: #8A8C90;
/* padding: 32rpx 0 28rpx; */
padding: 24rpx 0 18rpx;
border-radius: 12rpx;
font-weight: 500;
border: 2rpx solid #F7F8FC;
/* margin-bottom: 20rpx; */
}
......@@ -33,6 +34,7 @@
height: 44rpx;
line-height: 44rpx;
margin: 10rpx 0 4rpx;
font-weight: 600;
}
/* 已开通 - start */
......@@ -66,7 +68,8 @@
.active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
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 {
......@@ -90,17 +93,17 @@
color: #323436;
}
/* .scene-title.on-open {
.scene-title.on-open {
color: #8A8C90;
} */
}
.no-open-img {
position: relative;
}
.scene-img {
width: 56rpx;
height: 56rpx;
width: 92rpx;
height: 64rpx;
}
.lock-img {
......@@ -114,9 +117,10 @@
margin-top: 22rpx;
font-size: 24rpx;
color: #3666FE;
font-weight: 600;
/* font-weight: 600; */
font-family: 'number';
}
.notOpened {
/* .notOpened {
color: #8A8C90;
}
\ 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
<!-- components/image/index.wxml -->
<image
src="{{imagePath}}"
mode="{{mode}}"
webp="{{webp||isWebp}}"
lazy-load
class="custom-class class" />
// login/index/components/LoginBox.js
import USERAPI from '~/api/usersApi/index'
import {
checkLoginUserInfo,
setLoginInfo,
loginModal
} from '~/login/lib/index'
import { checkLoginUserInfo, setLoginInfo, loginModal } from '~/login/lib/index'
import md5 from '~/utils/lib/md5'
import network from '~/utils/network'
import {
imgUrlMixin
} from '~/mixins/index'
import { imgUrlMixin } from '~/mixins/index'
let thisPage
Component({
behaviors: [imgUrlMixin],
......@@ -32,6 +26,8 @@ Component({
code: '',
account: '',
password: ''
// account: 'bb123456',
// password: 'bb123456'
},
phoneReady: false,
countDown: null
......@@ -49,11 +45,8 @@ Component({
},
/**输入回调 */
input(e) {
const {
value
} = e.detail, {
name
} = e.currentTarget.dataset
const { value } = e.detail,
{ name } = e.currentTarget.dataset
this.setData({
[`formData.${name}`]: value
})
......@@ -66,9 +59,7 @@ Component({
},
/**清除input value */
clear(e) {
const {
name
} = e.currentTarget.dataset
const { name } = e.currentTarget.dataset
this.setData({
[`formData.${name}`]: ''
})
......@@ -77,21 +68,14 @@ Component({
},
/**获取验证码 */
getSmsCode() {
const {
phoneReady,
formData,
count
} = this.data,
const { phoneReady, formData, count } = this.data,
countDown = 60
if (!phoneReady || count) return
this.setData({
smsLoading: true
})
USERAPI.getSmsCode(formData.phone)
.then(({
code,
message
}) => {
.then(({ code, message }) => {
this.setData({
smsLoading: false
})
......@@ -112,9 +96,7 @@ Component({
count: countDown
})
setTimeout(() => {
let {
count
} = this.data
let { count } = this.data
this.setData({
count: --count
})
......@@ -127,13 +109,11 @@ Component({
},
/**检查输入框内容 */
checkFormData() {
const {
loginType,
formData
} = this.data
const { loginType, formData } = this.data
if (loginType != 0) {
if (loginType == 1) {
this.setData({
this.setData(
{
phoneReady: formData.phone && thisPage.validate.methods.tel(formData.phone)
},
() => {
......@@ -151,39 +131,30 @@ Component({
},
/**手机号&帐号密码登录 */
login() {
const {
formData,
loginType
} = this.data,
const { formData, loginType } = this.data,
target = {
1: 'phoneSmsLogin',
2: 'accountLogin'
} [loginType],
}[loginType],
obj =
loginType == 1 ? {
mobile: formData.phone,
code: formData.code
} : {
userName: formData.account,
password: md5(formData.password)
}
loginType == 1
? {
mobile: formData.phone,
code: formData.code
}
: {
userName: formData.account,
password: md5(formData.password)
}
this.setBtnLoading()
USERAPI[target](obj)
.then(({
code,
data,
message
}) => {
.then(({ code, data, message }) => {
this.setBtnLoading(false)
if (code == '0') {
if (loginType == 1) checkLoginUserInfo(data)
else {
const {
autoLogin
} = thisPage.data, {
sessionId,
loginUserInfoList
} = data,
const { autoLogin } = thisPage.data,
{ sessionId, loginUserInfoList } = data,
validTime = 3600 * 24 * 7 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin && loginUserInfoList[0]) {
......@@ -209,17 +180,14 @@ Component({
})
},
/**微信登录 */
wxLogin({
detail
}) {
if (!detail.code) return
wxLogin({ detail }) {
if (!detail.code) {
wx.$api.showToast('当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。')
return
}
this.setBtnLoading()
USERAPI.authUserPhone(detail, this.loginToken)
.then(({
code,
data,
message
}) => {
.then(({ code, data, message }) => {
if (code == '0') checkLoginUserInfo(data)
else {
wx.$api.showToast(message || '系统异常')
......@@ -227,9 +195,7 @@ Component({
}
this.setBtnLoading(false)
})
.catch(({
errMsg
}) => {
.catch(({ errMsg }) => {
wx.$api.showToast(errMsg || '系统异常')
this.setBtnLoading(false)
this.init()
......@@ -249,11 +215,7 @@ Component({
network.getNetworkType()
thisPage = wx.$router.getPageInstance()
try {
const {
data,
code,
message
} = await USERAPI.wxCodeLogin()
const { data, code, message } = await USERAPI.wxCodeLogin()
if (code == '0') {
thisPage.setData({
disabled: false
......@@ -261,10 +223,8 @@ Component({
this.loginToken = data
} else this.reLogin(message)
wx.hideLoading()
} catch ({
errMsg
}) {
console.error(errMsg)
} catch ({ errMsg }) {
// console.error(errMsg)
this.reLogin()
}
},
......@@ -276,4 +236,4 @@ Component({
if (reload) this.init()
}
}
})
\ No newline at end of file
})
import {
checkLoginUserInfo,
setRouteData,
setLoginInfo,
loginModal
} from '../lib/index'
import {
getSessionId,
} from '~/utils/cache/storageApi'
import { checkLoginUserInfo, setRouteData, setLoginInfo, loginModal } from '../lib/index'
import { getSessionId } from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onReady() {},
/**
* 生命周期函数--监听页面显示
......@@ -39,9 +27,7 @@ Page({
const appEnter = wx.getEnterOptionsSync()
if (appEnter.scene == 1037) {
if (Object.keys(appEnter.referrerInfo).length) {
const {
extraData
} = appEnter.referrerInfo
const { extraData } = appEnter.referrerInfo
if (extraData && Object.keys(extraData).length) this.phoneSmsLogin(extraData)
else this.init()
} else this.init()
......@@ -51,44 +37,31 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
onReachBottom() {},
init() {
wx.nextTick(() => {
const sessionId = getSessionId(),
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
{ url, targetPath = url ? decodeURIComponent(url) : '' } = this.options
let path = 'pages.index',
obj = {}
if (targetPath) obj.targetPath = targetPath
if (sessionId) {
USERAPI.checkSession().then(({
code
}) => {
USERAPI.checkSession().then(({ code }) => {
if (code == '0') {
if (targetPath) {
path = setRouteData(targetPath).url
......@@ -103,25 +76,14 @@ Page({
autoLogin(obj) {
const autoLoginObject = wx.$storage.get('auto_login_object')
if (autoLoginObject) {
const {
failureTime,
userName,
password
} = autoLoginObject
const { failureTime, userName, password } = autoLoginObject
if (Date.now() < failureTime) {
USERAPI.accountLogin({
userName,
password
}).then(async ({
data,
code,
message
}) => {
}).then(async ({ data, code, message }) => {
if (code == '0' && data.loginUserInfoList.length) {
const {
sessionId,
loginUserInfoList
} = data
const { sessionId, loginUserInfoList } = data
setLoginInfo(loginUserInfoList[0], sessionId)
} else {
try {
......@@ -142,13 +104,10 @@ Page({
phoneSmsLogin(extraData) {
console.log(extraData)
USERAPI.phoneSmsLogin({
mobile: extraData.phone,
code: extraData.smscode
}).then(({
code,
data,
message
}) => {
mobile: extraData.phone,
code: extraData.smscode
})
.then(({ code, data, message }) => {
if (code == '0') checkLoginUserInfo(data)
else {
wx.$api.showToast(message || '系统异常')
......@@ -164,4 +123,4 @@ Page({
}, 1e3)
})
}
})
\ No newline at end of file
})
{
"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({
baseCustomer: carObj.selNum,
clueId
}
// return wx.$api.showToast('申请成功')
applyApi
.merchantApply(params)
......@@ -67,7 +68,8 @@ Page({
wx.$api.showToast('申请成功')
setTimeout(() => {
wx.$router.back(page => {
page.getClueInit && page.getClueInit()
let node = page.selectComponent('#indexclue')
node && node.getClueInit()
})
}, 1000)
}
......
/* pages/mineDetail/messageBox/components/messageBox.wxss */
.msgBox {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #fff;
// width: 100%;
border-radius: 8rpx;
padding: 20rpx;
margin-bottom: 20rpx;
// height: 200rpx;
.title {
// display: flex;
// flex-wrap: wrap;
color: rgba(50, 52, 54, 1);
font-size: 28rpx;
margin-bottom: 8rpx;
view {
// word-break: break-all;
display: inline-block;
white-space: pre-wrap
}
.name {
color: rgba(50, 52, 54, 1);
font-size: 28rpx;
// font-face: PingFangSC;
font-weight: 600;
}
}
.time {
font-size: 24rpx;
color: #8A8C90;
text-align: right;
}
/* pages/mineDetail/messageBox/components/messageBox.wxss */
.msgBox {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #fff;
// width: 100%;
border-radius: 8rpx;
padding: 20rpx;
margin-bottom: 20rpx;
// height: 200rpx;
.title {
// display: flex;
// flex-wrap: wrap;
color: rgba(50, 52, 54, 1);
font-size: 28rpx;
margin-bottom: 8rpx;
view {
// word-break: break-all;
display: inline-block;
white-space: pre-wrap
}
.name {
color: rgba(50, 52, 54, 1);
font-size: 28rpx;
// font-face: PingFangSC;
font-weight: 600;
}
}
.time {
font-size: 24rpx;
color: #8A8C90;
text-align: right;
}
}
\ No newline at end of file
<!-- pages/mineDetail/messageBox/components/messageBox.wxml -->
<!-- <view>pages/mineDetail/messageBox/components/messageBox.wxml</view> -->
<view class="msgBox">
<view class="title">
<text>{{titleObj[messageType]['label']}}</text>
<text class="name">{{merchantName}}</text>
<text>{{titleObj[messageType]['sceneLabel']}}</text>
</view>
<!-- <view class="title" wx:if="{{messageType == 1}}">
<view class="title">
<text>{{titleObj[messageType]['label']}}</text>
<text class="name">{{merchantName}}</text>
<text>{{titleObj[messageType]['sceneLabel']}}</text>
</view>
<!-- <view class="title" wx:if="{{messageType == 1}}">
<text>您好,您的客户</text>
<text class="name">{{merchantName}}</text>
<text>门店活动已开通,活动信息如下:</text>
......@@ -26,7 +26,16 @@
<text class="name">{{merchantName}}</text>
<text>门店场景已开通,待开展业务,信息如下:</text>
</view> -->
<slot/>
<view class="time">{{time}}</view>
<slot />
<view class="time">{{filter.timeformat(time)}}</view>
</view>
<wxs module="filter">
module.exports = {
timeformat: function (time) {
time = time.slice(0,-3)
return time
}
}
</wxs>
\ No newline at end of file
......@@ -2,7 +2,7 @@
import mineApi from '~/api/mineApi/index'
// import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData'
console.log(IMG_URL)
const listObj = Object.freeze([
{
key: 'merchantId',
......@@ -10,6 +10,11 @@ const listObj = Object.freeze([
editLabel: '商户号'
},
{
key: 'actualAccountName',
label: '商户账号:',
editLabel: '商户账号'
},
{
key: 'merchantName',
label: '门店名称:',
placeholder: '请输入您的客户门店简称',
......@@ -78,6 +83,11 @@ Component({
customerList: [{}],
listObj,
isSuper: false,
testData: [
{
a: 1
}
],
bgUrl: `${IMG_URL}/output/empty.png`
},
attached() {
......@@ -93,14 +103,14 @@ Component({
*/
methods: {
restPageNum() {
console.log('restPageNum')
// console.log('restPageNum')
this.setData({
pageNum: 1
})
this.getMerchantCustomInfoList()
this.getMerchantCustomInfoList('reset')
},
scrollonReachBottom() {
console.log('scrollonReachBottom')
// console.log('scrollonReachBottom')
let { pages, pageNum } = this.data
// 判断当前页是否是末页
if (pages == pageNum) return wx.$api.showToast('列表已到底')
......@@ -111,7 +121,7 @@ Component({
this.getMerchantCustomInfoList()
},
// 分页查询客户列表
getMerchantCustomInfoList() {
getMerchantCustomInfoList(type) {
wx.$api.showLoading('加载中...')
let { pageNum, pageSize, customerList } = this.data
let params = {
......@@ -123,10 +133,15 @@ Component({
.then(result => {
console.log(result)
let { pages, list, total } = result
console.log(list)
list = list.map(item => {
item.merchantName = item.merchantName || item.actualMerchantName
item.phone = item.phone || item.actualPhone
// || item.actualContactName
item.contactName = item.contactName || item.actualContactName
return item
})
console.log(list)
this.setData({
customerList: pageNum == 1 ? list : [...customerList, ...list],
triggered: false,
......@@ -135,7 +150,14 @@ Component({
})
.catch(err => {})
.finally(() => {
wx.$api.hideLoading()
if (type == 'reset') {
wx.$api.showToast({
title: '刷新成功',
icon: 'success'
})
} else {
wx.$api.hideLoading()
}
})
},
submit(data) {
......@@ -149,11 +171,12 @@ Component({
mineApi
.saveMerchantCustomInfo(objList)
.then(result => {
console.log(result)
this.setData({
pageNum: 1
})
this.getMerchantCustomInfoList()
wx.$api.showToast('更新成功')
// console.log(result)
// this.setData({
// pageNum: 1
// })
// this.getMerchantCustomInfoList()
})
.catch(err => {})
},
......@@ -164,23 +187,21 @@ Component({
// let
let status = customerList[index].isEdit
// console.log(isEdit)
// customerList[index]['isEdit'] = !customerList[index]['isEdit']
if (item.isEdit) {
// 提交客户信息更新
// this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index])
// let {} =
!isSuper && this.submit(customerList[index])
} else {
customerList[index]['isEdit'] = true
this.setData({
customerList
})
}
console.log(index)
// let indexEdit = console.log(!status)
this.setData({
[`customerList[${index}].isEdit`]: !status
})
},
input(e) {
let { index, name } = e.currentTarget.dataset
console.log(index)
console.log(name)
// console.log(index)
// console.log(name)
let { customerList, listObj } = this.data
let { value } = e.detail
// listObj
......
/* pages/mineDetail/customerManagement/customerManagement.wxss */
page {
background-color: #F2F3F7;
}
.customerManagementCon {
width: 100%;
height: 100%;
// width: 100vw;
// height: 100vh;
}
.input {
text-align: left;
font-size: 28rpx;
caret-color: #3666FE;
width: 430rpx;
}
.customerBox {
box-sizing: border-box;
margin: 20rpx 20rpx 0;
padding: 32rpx;
background: #FFFFFF;
border-radius: 8rpx;
.titleCon {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx dashed #CCCED1;
padding-bottom: 20rpx;
.name {
font-size: 28rpx;
color: #323436;
max-width: 90%;
}
.statusBtn {
font-size: 24rpx;
color: #3666FE;
}
}
}
.list {
overflow: scroll;
}
.cellSty {
display: block;
height: 80rpx;
line-height: 80rpx;
}
.placeholder-class {
color: #C3C3C3;
// font-size: 20rpx;
/* pages/mineDetail/customerManagement/customerManagement.wxss */
page {
background-color: #F2F3F7;
}
.customerManagementCon {
width: 100%;
height: 100%;
// width: 100vw;
// height: 100vh;
}
.input {
text-align: left;
font-size: 28rpx;
caret-color: #3666FE;
width: 430rpx;
}
.disabled {
// color: #333;
color: #a6a9ad;
}
.customerBox {
box-sizing: border-box;
margin: 20rpx 20rpx 0;
padding: 32rpx;
background: #FFFFFF;
border-radius: 8rpx;
.titleCon {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx dashed #CCCED1;
padding-bottom: 20rpx;
.name {
font-size: 28rpx;
color: #323436;
max-width: 90%;
}
.statusBtn {
font-size: 24rpx;
color: #3666FE;
}
}
}
.list {
overflow: scroll;
}
.cellSty {
display: block;
height: 80rpx;
line-height: 80rpx;
}
.placeholder-class {
color: #C3C3C3;
// font-size: 20rpx;
}
\ No newline at end of file
......@@ -39,7 +39,7 @@
<!-- type="number" -->
<input
placeholder="{{item.isEdit? childItem['placeholder']:''}}"
class="input"
class="input {{item.isEdit&&(ind == 0|| ind == 1) ? 'disabled':''}}"
placeholder-class="placeholder-class"
maxlength="{{childItem.maxLength}}"
value="{{item[childItem['key']] }}"
......@@ -48,7 +48,7 @@
data-index="{{index}}"
data-name="{{childItem['key']}}"
data-reg="{{childItem['reg']}}"
disabled="{{!item.isEdit || ind == 0 }}"
disabled="{{!item.isEdit || ind == 0|| ind == 1 }}"
always-embed></input>
</gl-cell>
<!-- <gl-cell
......
// pages/mineDetail/messageBox/messageBox.js
import mineApi from '~/api/mineApi/index'
// 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({
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
......@@ -32,12 +37,13 @@ Component({
list: 'messageList'
}
},
// findKey: '',
warReportList: [],
messageList: [],
serviceMerchantId: ''
},
attached() {
this.ewmChange()
// this.ewmChange()
// this.initTime()
let { userInfo } = wx.$storage.get()
let merchantId = userInfo.subLoginUser.merchantId
......@@ -53,20 +59,20 @@ Component({
*/
methods: {
// 实例化二维码canvas
ewmChange(url) {
let size = {}
size.w = (wx.getSystemInfoSync().windowWidth / 750) * 600
size.h = size.w
var that = this
// ewmChange(url) {
// let size = {}
// size.w = (wx.getSystemInfoSync().windowWidth / 750) * 600
// size.h = size.w
// var that = this
drawQrcode({
width: size.w,
height: size.h,
canvasId: 'myQrcode',
text: url || that.data.text
// v1.0.0+版本支持在二维码上绘制图片
})
},
// drawQrcode({
// width: size.w,
// height: size.h,
// canvasId: 'myQrcode',
// text: url || that.data.text
// // v1.0.0+版本支持在二维码上绘制图片
// })
// },
preView(e) {
let { valueurl } = e.currentTarget.dataset
// console.log(e)
......@@ -81,25 +87,53 @@ Component({
current: valueurl
})
},
downLoad(e) {
showPoster(e) {
const { item } = e.currentTarget.dataset
let updatedTime = deleteSecond(item.createdTime)
this.setData({
// findKey: 'crowdFundActivityId',
posterItem: {
activityName: item.activityName,
posterUrl: item.valueUrl
posterUrl: item.valueUrl,
updatedTime,
// crowdFundActivityId: item.valueUrl,
type: 'warReport'
}
})
},
copyLink(e) {
console.log(e)
let that = this
let { url } = e.currentTarget.dataset
this.ewmChange(url)
setTimeout(() => {
this.share()
}, 100)
async copyLink(e) {
const { item } = e.currentTarget.dataset
// posterObj = this.selectComponent('#poster')
// this.setData({
// findKey: 'activityId'
// })
// try {
// 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) {
// console.log(e)
let that = this
......@@ -138,12 +172,26 @@ Component({
tabBarStyle: height / 2 + statusBarHeight
})
},
refreshList(e) {
// console.log(e)
async refreshList(e) {
console.log(e)
let { type } = this.data
let { typename } = e.currentTarget.dataset
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) {
console.log(e)
......@@ -169,35 +217,40 @@ Component({
},
getMessageList(typeName) {
let that = this
let { serviceMerchantId, type, warReportList, messageList } = this.data
let list = type[typeName]['list']
// console.log('list', this.data[list])
// return
let params = {
serviceMerchantId: serviceMerchantId,
...type[typeName]
}
// console.log(Math.ceil(2.8))
wx.$api.showLoading('加载中...')
mineApi
.messageBoxPage(params)
.then(result => {
console.log(result)
let { count, data, pageSize, pageNum, pages } = result
const listName = `${type[typeName]['list']}`
type[typeName]['pages'] = pages
type[typeName]['pageNum'] = pageNum
console.log(listName)
this.setData({
[listName]: type[typeName].pageNum == 1 ? data : [...this.data[list], ...data],
type,
triggered: false
return new Promise((resolve, reject) => {
let { serviceMerchantId, type, warReportList, messageList } = this.data
let list = type[typeName]['list']
// console.log('list', this.data[list])
// return
let params = {
serviceMerchantId: serviceMerchantId,
...type[typeName]
}
// console.log(Math.ceil(2.8))
wx.$api.showLoading('加载中...')
mineApi
.messageBoxPage(params)
.then(result => {
console.log(result)
let { count, data, pageSize, pageNum, pages } = result
const listName = `${type[typeName]['list']}`
type[typeName]['pages'] = pages
type[typeName]['pageNum'] = pageNum
console.log(listName)
this.setData({
[listName]: type[typeName].pageNum == 1 ? data : [...this.data[list], ...data],
type,
triggered: false
})
resolve('success')
})
})
.catch(err => {})
.finally(() => {
wx.$api.hideLoading()
})
.catch(err => {
reject('fail')
})
.finally(() => {
wx.$api.hideLoading()
})
})
}
}
})
{
"component": true,
"usingComponents": {
"msg-box": "./components/msgBox/msgBox",
"tab": "./components/Tab/Tab"
"msg-box": "../components/msgBox/msgBox",
"tab": "../components/Tab/Tab"
},
"navigationStyle": "custom"
}
......@@ -19,7 +19,7 @@
&::after {
content: '';
width: 100%;
height: 264rpx;
height: 265rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-color: #fff;
// background-size: 100% 486rpx;
......@@ -31,7 +31,7 @@
.tabContainer {
height: 100rpx;
background-color: #fff;
}
.list {
......
......@@ -14,8 +14,10 @@
index="{{tabIndx}}"
bindclick="changeTabIndx"
class="tabContainer" />
<view hidden="{{tabIndx==1}}" class="scrollCon">
<!-- -->
<view class="scrollCon" hidden="{{tabIndx==1}}">
<scroll-view
wx:if="{{tabBarStyle}}"
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
......@@ -24,30 +26,29 @@
refresher-threshold="104"
style="height:100%;"
scroll-top="{{scrollTop}}"
class=" list"
class="list"
data-typeName="warReport"
refresher-triggered="{{triggered}}">
<!-- -->
<msg-box
wx:for="{{warReportList}}"
wx:key='index'
merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}"
time="{{item.updatedTime}}">
time="{{item.createdTime}}">
<view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item">
<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 class="warReportBox" wx:if="{{item.messageType == 3}}">
<view class="item">
<view class="label">总产值</view>
<view class="num">{{item.totalValue}}元</view>
<view class="num font-number">{{item.totalValue}}元</view>
</view>
<view class="item">
<view class="label">完成目标</view>
<view class="num">{{item.completeRate}}</view>
<view class="num font-number">{{item.completeRate}}</view>
</view>
</view>
<view class="warReportLink">
......@@ -57,7 +58,7 @@
wx:if="{{item.valueUrl}}"
data-valueurl="{{item.valueUrl}}"
data-item="{{item}}"
bind:tap="downLoad">
bind:tap="showPoster">
战报详情
</view>
</view>
......@@ -74,20 +75,19 @@
refresher-threshold="104"
style="height:100%;"
scroll-top="{{scrollTop}}"
class=" list"
class="list"
data-typeName="message"
refresher-triggered="{{triggered}}">
<!-- -->
<msg-box
wx:for="{{messageList}}"
wx:key='index'
merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}"
time="{{item.updatedTime}}">
time="{{item.createdTime}}">
<view wx:if="{{item.messageType == 1}}">
<view class="cell">
<view class="label">活动名称:</view>
<view class="value">{{item.activityName}}</view>
<view class="value">{{item.activityName||item.productName}}</view>
</view>
<view class="cell">
<view class="label">开始时间:</view>
......@@ -97,33 +97,28 @@
<view class="label">结算时间:</view>
<view class="value">{{item.activityEndTime||'-'}}</view>
</view>
<!-- <view class="cell">
<view class="label">活动链接:</view>
<view
class="link"
wx:if="{{item.activityUrl}}"
bind:tap="copyLink"
data-url="{{item.activityUrl}}">
下载海报
</view>
</view> -->
<view class="cell" wx:if="{{item.crowdFundActivityId}}">
<view class="label">母链海报:</view>
<view class="link" bind:tap="copyLink" data-item="{{item}}">下载母链海报分享给门店开展活动</view>
</view>
</view>
<view class="cell" wx:if="{{item.messageType == 4}}">
<view class="label">产品名称:</view>
<view class="value">{{item.activityName}}</view>
<view class="value">{{item.activityName||item.productName}}</view>
</view>
<view class="cell" wx:if="{{item.messageType == 5}}">
<view class="label">新车交付场景:</view>
<view class="value">{{item.activityName}}</view>
<view class="value">{{item.activityName||item.productName}}</view>
</view>
<view class="cell" wx:if="{{item.messageType == 6}}">
<view class="label">0~12个月场景:</view>
<view class="value">{{item.activityName}}</view>
<view class="value">{{item.activityName||item.productName}}</view>
</view>
</msg-box>
</scroll-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" />
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import wxqrcode from '~/utils/lib/wxqrcode'
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import {
IMG_URL
} 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'
const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp`
......@@ -14,7 +19,7 @@ Component({
properties: {
orderObj: {
type: Object,
value: () => {},
value: () => { },
observer(n) {
n && this.dealStaffList()
}
......@@ -32,7 +37,13 @@ Component({
IMGURL: IMG_URL,
IMAGES,
isShowTip: true,
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
orderFormList: [{
=======
isShowPoster: false,
orderFormList: [
{
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
label: '总场次',
name: 'totalNum'
},
......@@ -46,30 +57,51 @@ Component({
prefix: '¥'
}
],
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
merchantFormList: [{
label: '活动时间',
=======
merchantFormList: [
{
label: '预计活动时间',
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
name: 'time'
},
{
label: '实际活动时间',
name: 'realTime'
},
{
label: '订单数',
name: 'orderCount'
name: 'orderCount',
className: 'font-number'
},
{
label: '产值',
name: 'realAmount',
className: 'red',
prefix: '¥'
className: 'red font-number',
prefix: '¥',
isNumber: true
},
{
label: '预估产值',
name: 'predictAmount',
prefix: '¥'
className: 'font-number',
prefix: '¥',
isNumber: true
}
],
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
tableHeadList: [{
label: '',
width: '',
width: '28rpx'
=======
tableHeadList: [
{
label: 'rankIdx',
width: '40rpx'
>>>>>>> dev_v3.1:packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
},
{
label: '业务员',
......@@ -104,8 +136,8 @@ Component({
var list = this.data.orderObj
list &&
list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束
let sliceNum = item.actStatus == 2 ? 3 : 10
// 1-未开始;2-活动中;3-已结束
let sliceNum = item.activityStatus == 3 ? 3 : 10
item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
})
......@@ -158,7 +190,7 @@ Component({
path: obj.path
})
},
fail() {}
fail() { }
})
})
},
......@@ -167,6 +199,7 @@ Component({
// wx.$router.jumpH5(item.activityUrl)
},
async download(e) {
<<<<<<< HEAD:packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
const {
item
} = e.currentTarget.dataset,
......@@ -191,6 +224,122 @@ Component({
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
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout {
margin: 20rpx 20rpx;
padding-bottom: 136rpx;
.box {
background-color: #FFFFFF;
......@@ -30,7 +31,8 @@
height: 40rpx;
line-height: 40rpx;
margin-bottom: 14rpx;
font-weight: 600;
// font-weight: 600;
// font-family: 'number';
}
&-label {
......@@ -114,7 +116,7 @@
}
&-label {
width: 104rpx;
width: 156rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
......@@ -132,47 +134,173 @@
background: #F7F8FC;
border-radius: 20rpx;
margin-top: 16rpx;
padding: 0 12rpx;
.rank-head {
.rank-title {
position: relative;
height: 52rpx;
line-height: 52rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
font-size: 20rpx;
font-size: 26rpx;
color: #5A6066;
margin-bottom: 20rpx;
font-weight: 600;
border-bottom: 1rpx solid rgba(204, 206, 209, 0.50);
.activity-status {
position: absolute;
top: 0;
right: 22rpx;
font-size: 24rpx;
}
// .activity-status {
// position: absolute;
// top: 0;
// right: 22rpx;
// font-size: 24rpx;
// }
}
.rank-table {
color: #5A6066;
font-size: 20rpx;
padding-left: 20rpx;
.tr {
.rank {
display: flex;
height: 32rpx;
line-height: 32rpx;
padding-bottom: 16rpx;
justify-content: space-between;
height: 64rpx;
padding: 20rpx 16rpx;
border-bottom: 1rpx dotted rgba(204, 206, 209, 0.50);
.th,
.td {
width: calc((100% - 116rpx) / 4);
.rank-left {
display: flex;
}
.icon-rank {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
padding-right: 4rpx;
&-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;
height: 32rpx;
line-height: 32rpx;
margin-bottom: 8rpx;
.down-tips {
position: absolute;
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;
&::after {
display: inline-block;
content: '';
position: absolute;
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 {
......@@ -185,11 +313,16 @@
.btn-more {
height: 56rpx;
line-height: 56rpx;
color: #5A6066;
border: 2rpx solid #EEEEEE;
border-radius: 28rpx;
// color: #5A6066;
// border: 2rpx solid #EEEEEE;
// border-radius: 28rpx;
text-align: center;
margin: 0 20rpx 16rpx;
margin: 0 20rpx;
.icon-more {
width: 92rpx;
height: 36rpx;
}
}
}
}
......@@ -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;
}
}
}
}
}
}
......@@ -247,4 +410,8 @@
.downloadIcon {
width: 40rpx;
height: 40rpx;
}
\ No newline at end of file
}
// .totalAmount{
// font-family: 'number';
// }
\ 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
{
"component": true,
"usingComponents": {}
}
\ 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
/* 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
<!--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({
outputApi.getSceneProStatus(params).then(res => {
var proList = res.find(item => item.sceneCode == sceneCode)
this.setData({
// ['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList.filter(item => item.openFlag == 0)
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList
})
this.setCurActivity()
......@@ -79,7 +78,10 @@ Page({
// wx.$api.showToast('申请成功')
setTimeout(() => {
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)
},
......@@ -102,7 +104,7 @@ Page({
wx.showToast({
title: '提交成功',
icon: 'success',
duration: 3000,
duration: 2000,
mask: true,
success: () => {
this.handleJump()
......@@ -129,8 +131,11 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() {
wx.setNavigationBarTitle({
title: '开通店面业务',
})
},
/**
* 生命周期函数--监听页面显示
*/
......
......@@ -65,6 +65,7 @@ page {
flex-wrap: wrap;
.activity-item {
position: relative;
box-sizing: border-box;
width: calc((100% - 40rpx) / 3);
height: 64rpx;
......@@ -74,6 +75,14 @@ page {
font-size: 28rpx;
margin: 0 20rpx 16rpx 0;
border-radius: 4rpx;
.icon-mark {
position: absolute;
top: 0;
right: 0;
width: 60rpx;
height: 60rpx;
}
}
.activity-item:nth-child(3n) {
......
......@@ -17,6 +17,11 @@
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box" wx:if="{{sceneActive != 1}}">
<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 class="text-hide item-disabled" wx:else>{{item.productName}}</view>
</view>
......
{
"enablePullDownRefresh": true,
"usingComponents": {
"scene-box": "../../../components/SceneBox/SceneBox",
"output-transform": "./components/outputTransform/outputTransform",
"output-crowdfund": "./components/outputCrowdfund/outputCrowdfund"
"output-transform": "../components//outputTransform/outputTransform",
"output-crowdfund": "../components/outputCrowdfund/outputCrowdfund"
}
}
\ No newline at end of file
}
......@@ -38,6 +38,18 @@
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 {
padding: 27rpx 0 24rpx;
}
......@@ -80,11 +92,21 @@
}
.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);
color: #FFFFFF;
// color: #FFFFFF;
border-width: 0;
}
.activity-item.open.active {
background: #3666FE;
color: #FFFFFF;
}
.activity-item.no-open.active {
background: #CCCED1;
color: #323436;
}
}
.activity-content {
......@@ -129,17 +151,27 @@
}
}
.btn {
.btn-box {
position: fixed;
bottom: 16rpx;
bottom: 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);
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
margin: 0 32rpx;
margin: 14rpx 32rpx;
.btn-blue {
background: #3666FE;
......@@ -150,6 +182,34 @@
background: #CCCED1;
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 -->
<view class="summary">
<view class="layout {{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? 'm-rl-20' : ''}}">
<view class="title bg-white ">选产品/活动</view>
<view class="scene-box bg-white">
<scene-box
formData="{{sceneObj}}"
scenePriceList="{{scenePriceList}}"
sceneActive="{{sceneActive}}"
bindhandleSceneChange="handleSceneChange" />
</view>
</view>
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view
scroll-x="{{true}}"
enable-flex
class="activity-box"
scroll-with-animation
scroll-left="{{scrollLeft}}">
<view class="flex">
<view
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}}
</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content {{ (sceneActive != 1 && activityList[activityActive].productStatus == 2) ? '' : 'p-rl-20'}}">
<view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}">
<view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view>
<view class="select" bindtap="handleSearch">
<view wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt">
{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}}
</view>
<view wx:if="{{sceneActive == 4}}" class="select-txt">
{{baseData.actStatusList[searchForm.scene4Idx]}}
</view>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view>
</view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" />
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" />
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{sceneActive != 1}}">
<view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
<view class="isFullSucreen btn" wx:if="{{sceneActive == 1}}">
<view class="btn-disabled">点击开通</view>
</view>
<view class="layout {{ (sceneActive != 1 && isShowData) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive != 1 && isShowData) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 && isShowData) ? 'm-rl-20' : ''}}">
<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">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange" />
</view>
</view>
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}">
<view class="flex">
<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}}">
{{item.productName}}
</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content {{ (sceneActive != 1 && isShowData) ? '' : 'p-rl-20'}}">
<view wx:if="{{isShowData && sceneActive != 1}}">
<view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view>
<view class="select" bindtap="handleSearch">
<view wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt">
{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}}
</view>
<view wx:if="{{sceneActive == 4}}" class="select-txt">
{{baseData.actStatusList[searchForm.scene4Idx]}}
</view>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view>
</view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" />
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack"/>
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{sceneActive != 1 && activityList.length}}">
<view class="isFullSucreen btn-box" wx:if="{{ !isShowData && !merchantInfo.isSuper}}">
<view class="btn">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
</view>
<view wx:if="{{sceneActive == 1}}" class="isFullSucreen btn-box">
<view class="btn">
<view class="btn-disabled">点击开通</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>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{true}}" bindlongtouch="longtouch" />
\ 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
/* 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
/* packagesList/webView/pages/webView.wxss */
\ No newline at end of file
......@@ -49,7 +49,13 @@ Page({
hasUserInfo: false,
phone: '', //授权手机号
userInfo: '',
isAuthphone: true //授权昵称弹窗显示,更多按钮显示
isAuthphone: true, //授权昵称弹窗显示,更多按钮显示
// 视频播放地址
videoSrc:'',
videoTitle:'',
//下载海报授权
showAuth: false,
img_version:0.1
},
observers: {
actNum: function (actNum) {
......@@ -130,7 +136,7 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
console.log('分享options: ', options)
// console.log('分享onRoute ', options)
if (!options || utils.isEmptyObj(options)) return
// if(!Object.keys(options).includes('actNum'))return
let { senceData } = this.data
......@@ -197,10 +203,18 @@ Page({
content: '生成并下载页面为海报',
success: async res => {
if (res.confirm) {
// let hasAuth = await _this.toSetting()
// if(hasAuth){
_this.download()
// }
wx.getSetting({
success: (res)=> {
if(res.authSetting['scope.writePhotosAlbum']===false){
_this.setData({
showAuth: true
})
}else{
_this.download()
}
}
})
}
},
confirmText:'下载',
......@@ -362,6 +376,16 @@ Page({
}
})
},
authFail(){
wx.showToast({
title: "下载海报前需要您授权'添加到相册'权限",
icon: "none",
duration: 2500,
});
},
authSuccess(){
this.download()
},
// //模态框关闭
// modelClose() {
// this.triggerEvent("modelclose", false);
......@@ -418,7 +442,7 @@ Page({
*/
async onLoad(options) {
await this.getData()
console.log('分享options12255565: ', options)
// console.log('分享onLoad: ', options)
// actNum,activeNavIdx isShare
if (!options || utils.isEmptyObj(options)) return
......@@ -536,11 +560,33 @@ Page({
}, 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": {
"product": "../tab/index/components/product/product"
"product": "../tab/index/components/product/product",
"FullscreenVideo":"../../components/FullscreenVideo/FullscreenVideo",
"authorize":"/components/Authorize/Authorize"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
......
......@@ -55,4 +55,10 @@
</view>
<!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow -->
<view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view>
\ No newline at end of file
<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({
*/
properties: {
item: {
type: Object,
// type: Object,
type: null,
observer(n) {
console.log(n, '=================')
this.getImageInfo(n)
}
},
}
},
......
......@@ -19,47 +19,72 @@
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 {
height: calc(100% - 64rpx);
// height: calc(100% - 64rpx);
height: 100%;
overflow: scroll;
}
.poster {
position: relative;
background-color: #fff;
box-sizing: border-box;
padding: 32rpx;
// padding-bottom: 10rpx;
width: 558rpx;
// height: 60%;
height: 1108rpx;
// 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 {
width: 320rpx;
height: 88rpx;
line-height: 88rpx;
background: #3666FE;
// background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
width: 558rpx;
height: 90rpx;
background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
margin-top: 32rpx;
color: #3666FE;
// margin-top: -2rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
}
.tips {
......
......@@ -3,12 +3,18 @@
<!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide" />
<view class="poster">
<view class="titleTime">最近更新时间 {{item.updatedTime}}</view>
<view class="imgCon" catchtouchmove="noScroll">
<image src="{{poster}}" mode="widthFix" />
<!-- <view class="titleTime">最近更新时间 {{item.updatedTime}}</view> -->
<!-- catchtouchmove="noScroll" -->
<view class="imgCon">
<image src="{{poster}}" mode="widthFix" show-menu-by-longpress />
</view>
</view>
<view class="btn" bindtap="download">下载图片并转发</view>
<!-- <view class="btn" bindtap="download">下载图片并转发</view> -->
<view class="btn">
<glsx-image src="output/longtap.png" class="icon" />
长按图片转发
</view>
<view class="titleTime">最近更新时间: {{item.updatedTime}}</view>
<!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> -->
</view>
</block>
......
......@@ -8,7 +8,7 @@
<view
class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}"
wx:for="{{typeList}}"
wx:key="*this"
wx:key="index"
data-index="{{index}}"
style="{{index == 0 ? 'margin-left: 0px;' : ''}}"
bindtap="filterTypeFn">
......@@ -219,7 +219,7 @@
</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}}">
<image webp src="{{IMG_URL}}index/trEmpty.png " />
<text class="noDataTxt">没有符合条件的线索~</text>
......
......@@ -14,7 +14,7 @@ Component({
* 组件的初始数据
*/
data: {
refresherFlag:true,
},
/**
......@@ -27,5 +27,14 @@ Component({
let { num } = e.currentTarget.dataset
this.triggerEvent('selectCar',num)
},
refresherrefreshFn(){
this.triggerEvent('refresherrefresh')
setTimeout(()=>{
this.setData({
refresherFlag:false
})
},1000)
}
}
})
/* pages/tab/index/components/indexProduct/indexProduct.wxss */
.content-scroll{
height: 100vh;
// height: calc(100% - 80rpx);
}
.content-product {
.scene {
// margin-top: 32rpx;
......
<!--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
class="content-product"
hover-class="none"
hover-stop-propagation="false">
<view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view
class="item-wrap {{actNum== index ? 'act':''}}"
data-num="{{index}}"
data-scenestatus="{{item.sceneStatus}}"
bindtap="selectCar"
wx:for="{{senceData}}"
wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
<view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view
class="item-wrap {{actNum== index ? 'act':''}}"
data-num="{{index}}"
data-scenestatus="{{item.sceneStatus}}"
bindtap="selectCar"
wx:for="{{senceData}}"
wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</scroll-view>
</view>
<!-- stickyTop="{{headerHeight}}" -->
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</view>
<!-- </scroll-view> -->
\ No newline at end of file
......@@ -20,7 +20,8 @@
color: #6C6C6C;
display: flex;
align-items: center;
.icon{
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 6rpx;
......@@ -144,7 +145,7 @@
.prod-info .earnings-num {
font-size: 28rpx;
// font-family: DINAlternate-Bold;
font-weight: Bold;
// font-weight: Bold;
color: #f35251;
}
......@@ -178,6 +179,7 @@
.project-img {
overflow: auto;
// height: 1600rpx;
// white-space: nowrap;
.img-item {
......@@ -207,6 +209,12 @@
background-color: #f5f7fb;
}
.stickyTab-fixed {
position: fixed;
left: 0;
top: 352rpx;
}
// .out-tab{
// .out-text {
// // color: red !important;
......@@ -427,6 +435,11 @@
margin-bottom: 32rpx;
}
.video-item .video-card {
width: 100%;
height: 590rpx;
}
.video-item video {
width: 100%;
height: 590rpx;
......@@ -436,9 +449,13 @@
.video-item .download {
position: absolute;
top: 0;
right: 2px;
font-size: 26rpx;
color: #666;
right: 0;
width: 48rpx;
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;
}
......
......@@ -30,7 +30,7 @@
<!-- 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>
<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>
</view>
<view class="share-btn" wx:if="{{!isShare && origin =='home' && actNum!=4}}" bindtap="onShareFn">
......@@ -42,10 +42,14 @@
</view>
<view class="project-wrap {{isShow ?'check-prod':''}}">
<!-- 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 />
</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"-->
<!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> -->
<view class="project-img" hover-class="none" hover-stop-propagation="false">
......@@ -81,14 +85,13 @@
<view class="video-item">
<view class="download" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}">视频下载</view>
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<!-- <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>
</block>
</view>
</view>
</view>
</block>
</view>
......
{
"usingComponents": {
"vas-toast": "./components/likeToast/likeToast",
"crowdfund-poster": "./components/CrowdfundPoster/CrowdfundPoster",
"indexProduct":"./components/indexProduct/indexProduct",
"indexClue":"./components/indexClue/indexClue"
"indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue",
"FullscreenVideo": "../../../components/FullscreenVideo/FullscreenVideo"
},
"navigationStyle": "custom",
"onReachBottomDistance": 50,
"enablePullDownRefresh":true
"onReachBottomDistance": 50
}
......@@ -107,7 +107,7 @@ page {
left: 0;
width: 100%;
height: 100%;
z-index: 3;
z-index: 999;
}
}
......
......@@ -19,19 +19,21 @@
</view>
</view>
<!-- 托客户内容 -->
<indexProduct wx:if="{{tabIndx == 1 }}"
bindselectCar="selectCar"
senceData="{{senceData}}"
actNum="{{actNum}}"
img_version="{{img_version}}"
headerHeight="{{headerHeight}}"></indexProduct>
<indexProduct
wx:if="{{tabIndx == 1 }}"
bindselectCar="selectCar"
senceData="{{senceData}}"
actNum="{{actNum}}"
img_version="{{img_version}}"
headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" />
<!-- 看线索内容 -->
<indexClue
wx:if="{{tabIndx == 0 }}"
headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast"
></indexClue>
<indexClue
id="indexclue"
wx:if="{{tabIndx == 0 }}"
headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" />
</view>
<!-- 收藏、取消提示框 -->
<vas-toast id='toast' />
......@@ -98,5 +100,8 @@
</form>
</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
<<<<<<< HEAD
import {
IMG_URL
} from '~/utils/constantData'
=======
// import { IMG_URL } from '~/utils/constantData'
>>>>>>> dev_v3.1
import USERAPI from '~/api/usersApi/index'
import mineApi from '~/api/mineApi/index'
const IMAGES = Object.freeze({
icon0: `${IMG_URL}/personal/icon1.png`,
icon1: `${IMG_URL}/personal/icon2.png`,
userAvatarUrl: `${IMG_URL}/personal/userAvatarUrl.png`
icon0: `/personal/icon1.png`,
icon1: `/personal/icon2.png`,
userAvatarUrl: `/personal/userAvatarUrl.png`
})
Page({
/**
......@@ -16,12 +20,18 @@ Page({
data: {
navStyle: 'background-color: rgba(0,0,0,0);',
IMAGES,
isRead: false
isRead: false,
test: `/personal/icon2.png`
},
navGO(e) {
<<<<<<< HEAD
let {
path
} = e.currentTarget.dataset
=======
let { path } = e.currentTarget.dataset
// console.log(path)
>>>>>>> dev_v3.1
wx.$router.go(path)
},
logout() {
......@@ -48,10 +58,15 @@ Page({
})
}
})
<<<<<<< HEAD
wx.$storage.rm('fileList')
=======
// wx.$storage.rm('fileList')
>>>>>>> dev_v3.1
wx.$storage.rm('sessionId')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('userInfo')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('posterId')
wx.$router.reLaunch('login.index')
})
}
......@@ -69,10 +84,14 @@ Page({
console.log(e)
},
messageBoxPageIsRead() {
<<<<<<< HEAD
console.log(111)
let {
serviceMerchantId
} = this.data
=======
let { serviceMerchantId } = this.data
>>>>>>> dev_v3.1
mineApi
.messageBoxPageIsRead({
serviceMerchantId
......@@ -80,7 +99,8 @@ Page({
.then(result => {
console.log(result)
this.setData({
isRead: result
isRead: result,
test: `/personal/icon2.png`
})
})
.catch(err => {
......
......@@ -13,6 +13,19 @@ page {
background-color: #fff;
}
.testfont {
font-weight: bold;
font-size: 30rpx;
}
.testfont2 {
font-size: 30rpx;
}
.test3 {
font-size: 40rpx;
}
.layout {
box-sizing: border-box;
position: relative;
......
<!-- pages/tab/output/output.wxml -->
<!-- <navigation-bar navStyle="{{navStyle}}">服务商账号名称</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>
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的账号</navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;">
<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="id">账号:{{userInfo.merchantId}}</view>
<view class="createTime">创建时间:{{userInfo.createdDate}}</view>
</view>
<view class="utilBoxTitle">常用工具</view>
<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">
<image class="img" src="{{IMAGES.icon0}}" />
<glsx-image class="img" src="{{IMAGES.icon0}}" />
</view>
<view class="name">客户管理</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="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 class="name">消息盒子</view>
</view>
......
// pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="flex scene">
<view
class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
......@@ -9,12 +10,12 @@
<view wx:if="{{formData['showList'][index]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</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}}" />
<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}}" -->
<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>
......@@ -10,6 +10,7 @@
.scene-item {
box-sizing: border-box;
height: 248rpx;
position: relative;
width: 25%;
/* flex: 1; */
......@@ -18,10 +19,11 @@
font-size: 18rpx;
/* color: #8A8C90; */
color: #323436;
padding: 32rpx 0 28rpx;
padding: 24rpx 0 18rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
font-weight: 500;
border: 2rpx solid transparent;
}
.scene-item:last-child {
......@@ -56,7 +58,8 @@
.active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
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-size: 100% 100%; */
}
......@@ -83,21 +86,27 @@
}
.scene-img {
width: 56rpx;
height: 56rpx;
width: 92rpx;
height: 64rpx;
}
/* .notOpened {
color: #8A8C90;
} */
.scene-label {
font-size: 16rpx;
}
.total-price {
height: 40rpx;
line-height: 40rpx;
margin-top: 22rpx;
font-size: 24rpx;
color: #3666FE;
font-weight: 600;
/* font-weight: 600; */
font-family: "number";
}
.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!