Commit 6a49815d by 张立顺

切换账号联调

2 parents 0f48add7 4b985613
Showing 68 changed files with 1938 additions and 729 deletions
import api from '~/utils/request/request' import api from '~/utils/request/request'
const { const { appId } = wx.getAccountInfoSync().miniProgram
appId const CODE = {
} = wx.getAccountInfoSync().miniProgram platformEntrance: 'BUSINESS_ASSISTANT',
productCode: 'PC00c3'
}
class UsersApi { class UsersApi {
/**调用后台接口获取用户信息js_code换取sessionId */ /**调用后台接口获取用户信息js_code换取sessionId */
async wxCodeLogin() { async wxCodeLogin() {
const { const { code } = await this.getWxCode()
code return await api.post(
} = await this.getWxCode() {
return await api.post({
method: 'scrm.api.sso.wechat.applets.jscode.login', method: 'scrm.api.sso.wechat.applets.jscode.login',
appId, appId,
code code
...@@ -18,7 +19,8 @@ class UsersApi { ...@@ -18,7 +19,8 @@ class UsersApi {
} }
/**退出登录 */ /**退出登录 */
logout() { logout() {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.logout' method: 'scrm.api.sso.wechat.applets.logout'
}, },
true true
...@@ -44,10 +46,11 @@ class UsersApi { ...@@ -44,10 +46,11 @@ class UsersApi {
delete detail.errMsg delete detail.errMsg
if (detail.iv && detail.encryptedData) { if (detail.iv && detail.encryptedData) {
detail.loginToken = loginToken detail.loginToken = loginToken
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.auth.phone', method: 'scrm.api.sso.wechat.applets.auth.phone',
...detail, ...detail,
platformEntrance: 'BUSINESS_ASSISTANT', // 平台标识:生意助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT platformEntrance: 'BUSINESS_ASSISTANT' // 平台标识:生意助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT
}, },
true true
) )
...@@ -55,17 +58,19 @@ class UsersApi { ...@@ -55,17 +58,19 @@ class UsersApi {
} }
/**账号密码登录 */ /**账号密码登录 */
async accountLogin(data = {}) { async accountLogin(data = {}) {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.password.login', method: 'scrm.api.sso.wechat.applets.password.login',
...data, ...data,
platformEntrance: 'BUSINESS_ASSISTANT', ...CODE
}, },
true true
) )
} }
/** 手机号获取短信验证码 */ /** 手机号获取短信验证码 */
getSmsCode(mobile) { getSmsCode(mobile) {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.sms.get.code', method: 'scrm.api.sso.wechat.applets.sms.get.code',
mobile mobile
}, },
...@@ -74,7 +79,8 @@ class UsersApi { ...@@ -74,7 +79,8 @@ class UsersApi {
} }
/** 手机号短信验证码登录 */ /** 手机号短信验证码登录 */
phoneSmsLogin(data = {}) { phoneSmsLogin(data = {}) {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.sms.login', method: 'scrm.api.sso.wechat.applets.sms.login',
...data, ...data,
source: 'MINIAPP', source: 'MINIAPP',
...@@ -85,9 +91,10 @@ class UsersApi { ...@@ -85,9 +91,10 @@ class UsersApi {
} }
/** 获取登录账号列表 */ /** 获取登录账号列表 */
getAccountList(sessionId) { getAccountList(sessionId) {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.listSelectAccount', method: 'scrm.api.sso.wechat.applets.listSelectAccount',
platformEntrance: 'BUSINESS_ASSISTANT', ...CODE,
sessionId sessionId
}, },
true true
...@@ -96,9 +103,10 @@ class UsersApi { ...@@ -96,9 +103,10 @@ class UsersApi {
/** /**
* 选择账号登录(手机绑定多个账号时) */ * 选择账号登录(手机绑定多个账号时) */
selectAccountLogin(data) { selectAccountLogin(data) {
return api.post({ return api.post(
{
method: 'scrm.api.sso.wechat.applets.selectAccountLogin', method: 'scrm.api.sso.wechat.applets.selectAccountLogin',
platformEntrance: 'BUSINESS_ASSISTANT', ...CODE,
...data ...data
}, },
true true
...@@ -106,11 +114,31 @@ class UsersApi { ...@@ -106,11 +114,31 @@ class UsersApi {
} }
/**检查sessionId 是否过期 */ /**检查sessionId 是否过期 */
checkSession() { checkSession() {
return api.post({ return api.post(
{
method: 'scrm.api.sso.login.status.check' method: 'scrm.api.sso.login.status.check'
}, },
true true
) )
} }
/** 超级管理员切换账号 */
adminSelectLogin(data) {
return api.post(
{
method: 'scrm.api.sso.super.administrator.select.login',
...CODE,
...data
}
// true
)
}
/** 超管切换子账号 */
switchSubLoginInfo(data) {
return api.post({
method: 'scrm.api.sso.wechat.applets.switch.subLoginInfo',
...CODE,
...data
})
}
} }
export default UsersApi
\ No newline at end of file \ No newline at end of file
export default UsersApi
...@@ -26,7 +26,12 @@ promisifyAll() ...@@ -26,7 +26,12 @@ promisifyAll()
import { Storage } from './utils/cache/storage' import { Storage } from './utils/cache/storage'
const $Storage = new Storage() const $Storage = new Storage()
//全局分享
import './utils/share' import './utils/share'
//监听网络状态
import './utils/network'
App({ App({
onLaunch(options) { onLaunch(options) {
/**挂载到wx对象 */ /**挂载到wx对象 */
......
{ {
"pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "pages/webView/webView", "login/index/index", "login/accountItems/accountItems", "pages/mineDetail/customerManagement/customerManagement", "pages/mineDetail/messageBox/messageBox"], "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/mineDetail/customerManagement/customerManagement", "pages/mineDetail/messageBox/messageBox"],
"requiredPrivateInfos": ["getLocation"], "requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
"subpackages": [], "subpackages": [],
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab", "tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar" "navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
...@@ -19,7 +19,7 @@ Component({ ...@@ -19,7 +19,7 @@ Component({
}, 0.2 * 1000) }, 0.2 * 1000)
} else { } else {
let hideTab = wx.$hideTab let hideTab = wx.$hideTab
console.log(hideTab) // console.log(hideTab)
this.setData({ this.setData({
showPopup: true, showPopup: true,
close: false, close: false,
...@@ -55,6 +55,7 @@ Component({ ...@@ -55,6 +55,7 @@ Component({
this.setData({ this.setData({
show: false show: false
}) })
this.triggerEvent('hidePopup')
}, },
confirm() { confirm() {
this.triggerEvent('confirm') this.triggerEvent('confirm')
......
...@@ -25,8 +25,13 @@ Component({ ...@@ -25,8 +25,13 @@ Component({
itemWidth: String, itemWidth: String,
align: { align: {
type: String, type: String,
default: '' value: ''
} },
// 是否有红点
redpoint: {
type: Array,
value: ['看线索']
},
}, },
/** /**
......
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view <scroll-view
class="tab-box {{align}} {{outClassName}}" class="tab-box {{align}} {{outClassName}}"
scroll-x scroll-x
enable-flex enable-flex
scroll-with-animation scroll-with-animation
scroll-into-view="{{to}}"> scroll-into-view="{{to}}"
>
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
bindtap="click" bindtap="click"
data-count="{{index}}" data-count="{{index}}"
id="to-{{index}}"> id="to-{{index}}"
>
<view class="text">{{item}}</view> <view class="text">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> --> <!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" /> <view class="line" />
...@@ -22,12 +25,16 @@ ...@@ -22,12 +25,16 @@
<view class="tab-box flex"> <view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}" style="width:{{itemWidth}}"
bindtap="click" bindtap="click"
data-count="{{index}}"> data-count="{{index}}"
<view class="text text-center">{{item}}</view> >
<view class="text text-center">
{{item}}
</view>
<view class="line" style="lineStyle" /> <view class="line" style="lineStyle" />
<view wx:if="{{filterUtils.hasRedpoint(redpoint,item)}}" class="redpoint" />
</view> </view>
</block> </block>
</view> </view>
......
/**
*
* @param array 数组
* @param item 数组中的某一项
* @returns
*/
var hasRedpoint = function (array, item) {
// console.log('array: ', array);
return array.length > 0 && array.indexOf(item) != -1;
};
module.exports = {
hasRedpoint: hasRedpoint,
};
...@@ -71,6 +71,17 @@ ...@@ -71,6 +71,17 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
.redpoint {
position: absolute;
top: 0;
right: 0;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */ /* 外部出进来的自定义样式 */
.project-tab{ .project-tab{
padding-left: 20px; padding-left: 20px;
...@@ -86,3 +97,4 @@ ...@@ -86,3 +97,4 @@
.project-tab .tab .line{ .project-tab .tab .line{
width:auto; width:auto;
} }
...@@ -16,7 +16,7 @@ page { ...@@ -16,7 +16,7 @@ page {
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx; background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
......
...@@ -10,20 +10,20 @@ ...@@ -10,20 +10,20 @@
{{item.merchantName}}{{item.isSuper?'(超管)':item.userType==1?'(商户号)':'(员工号)'}} {{item.merchantName}}{{item.isSuper?'(超管)':item.userType==1?'(商户号)':'(员工号)'}}
</view> </view>
<view class="icon"> <view class="icon">
<image src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/radio.png" /> <image src="{{IMGURL}}login/radio.png" />
</view> </view>
<view class='radio' /> <view class='radio' />
</view> </view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
<view class="list-not" bindtap="getListSelectAccount"> <view class="list-not text-center" bindtap="getListSelectAccount">
点击刷新 点击刷新
</view> </view>
</block> </block>
</block> </block>
</view> </view>
<view class="btn-box isFullSucreen"> <view class="btn-box isFullSucreen">
<button class="button" bindtap="choiceAccountLogin">确定</button> <button class="button" disabled="{{!loginUserInfoList.length}}" bindtap="choiceAccountLogin">确定</button>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// login/index/components/Agree/Agree.js // login/index/components/Agree/Agree.js
import { imgUrlMixin } from '~/mixins/index'
Component({ Component({
behaviors: [imgUrlMixin],
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
}, },
......
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<view class="agree text-center"> <view class="agree text-center">
<view class="icon {{agree}}" bindtap="agree"> <view class="icon {{agree}}" bindtap="agree">
<image src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/radio.png"></image> <image webp src="{{IMGURL}}login/radio.png"></image>
</view> </view>
<block wx:if="{{text}}">{{text}}</block> <block wx:if="{{text}}">{{text}}</block>
<block wx:else> <block wx:else>
......
// login/index/components/LoginBox.js // login/index/components/LoginBox.js
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import { import { selectAccountLogin, setLoginInfo, loginModal } from '~/login/lib/index'
selectAccountLogin, import md5 from '~/utils/lib/md5'
setLoginInfo, import network from '~/utils/network'
loginModal import { imgUrlMixin } from '~/mixins/index'
} from '~/login/lib/index'
let thisPage let thisPage
Component({ Component({
behaviors: [imgUrlMixin],
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
}, },
...@@ -38,31 +38,28 @@ Component({ ...@@ -38,31 +38,28 @@ Component({
methods: { methods: {
/**隐藏验证码错误 */ /**隐藏验证码错误 */
hideError(name) { hideError(name) {
if (name == 'code') this.setData({ if (name == 'code')
smsError: false this.setData({
}) smsError: false
})
}, },
/**输入回调 */ /**输入回调 */
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
}) })
if (name == 'phone') this.setData({ if (name == 'phone')
phoneReady: thisPage.validate.methods.tel(value) this.setData({
}) phoneReady: thisPage.validate.methods.tel(value)
})
this.hideError(name) this.hideError(name)
this.checkFormData() this.checkFormData()
}, },
/**清除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}`]: ''
}) })
...@@ -71,63 +68,58 @@ Component({ ...@@ -71,63 +68,58 @@ 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).then(({ USERAPI.getSmsCode(formData.phone)
code, .then(({ code, message }) => {
message this.setData({
}) => { smsLoading: false
this.setData({ })
smsLoading: false if (code == '0') this.countDown(countDown)
else wx.$api.showToast(message || '发送验证码失败')
}) })
if (code == '0') this.countDown(countDown) .catch(err => {
else wx.$api.showToast(message || '发送验证码失败') this.setData({
}).catch(err => { smsLoading: false
this.setData({ })
smsLoading: false wx.$api.showToast(err || '发送验证码失败')
}) })
wx.$api.showToast(err || '发送验证码失败')
})
}, },
/**验证码倒计时 */ /**验证码倒计时 */
countDown(countDown) { countDown(countDown) {
if (countDown) this.setData({ if (countDown)
count: countDown this.setData({
}) count: countDown
})
setTimeout(() => { setTimeout(() => {
let { let { count } = this.data
count
} = this.data
this.setData({ this.setData({
count: --count count: --count
}) })
if (count > 0) this.countDown() if (count > 0) this.countDown()
else this.setData({ else
count: null this.setData({
}) count: null
})
}, 1e3) }, 1e3)
}, },
/**检查输入框内容 */ /**检查输入框内容 */
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)
thisPage.checkLoginBtn() },
}) () => {
thisPage.checkLoginBtn()
}
)
} else thisPage.checkLoginBtn() } else thisPage.checkLoginBtn()
} }
}, },
...@@ -139,94 +131,83 @@ Component({ ...@@ -139,94 +131,83 @@ 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 = loginType == 1 ? { obj =
mobile: formData.phone, loginType == 1
code: formData.code ? {
} : { mobile: formData.phone,
userName: formData.account, code: formData.code
password: formData.password }
} : {
this.setBtnLoading()
USERAPI[target](obj).then(({
code,
data,
message
}) => {
this.setBtnLoading(false)
if (code == '0') {
if (loginType == 1) this.checkLoginUserInfo(data)
else {
const {
autoLogin
} = thisPage.data, {
sessionId
} = data,
validTime = 3600 * 24 * 30 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin) {
wx.$storage.set('auto_login_object', {
failureTime: autoLoginFailureTime,
userName: formData.account, userName: formData.account,
password: formData.password password: md5(formData.password)
}
this.setBtnLoading()
USERAPI[target](obj)
.then(({ code, data, message }) => {
this.setBtnLoading(false)
if (code == '0') {
if (loginType == 1) this.checkLoginUserInfo(data)
else {
const { autoLogin } = thisPage.data,
{ sessionId } = data,
validTime = 3600 * 24 * 30 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin) {
wx.$storage.set('auto_login_object', {
failureTime: autoLoginFailureTime,
userName: formData.account,
password: md5(formData.password)
})
} else wx.$storage.rm('auto_login_object')
console.log(data)
setLoginInfo(data, sessionId)
}
} else {
if (loginType == 1)
this.setData({
smsError: true
}) })
} else wx.$storage.rm('auto_login_object') wx.$api.showToast(message || '系统异常')
setLoginInfo(data, sessionId)
} }
} else { })
if (loginType == 1) this.setData({ .catch(err => {
smsError: true wx.$api.showToast('系统异常')
}) this.setBtnLoading(false)
wx.$api.showToast(message || '系统异常') })
}
}).catch(err => {
wx.$api.showToast('系统异常')
this.setBtnLoading(false)
})
}, },
/**微信登录 */ /**微信登录 */
wxLogin({ wxLogin({ detail }) {
detail
}) {
if (!detail.code) return if (!detail.code) return
this.setBtnLoading() this.setBtnLoading()
USERAPI.authUserPhone(detail, this.loginToken).then(({ USERAPI.authUserPhone(detail, this.loginToken)
code, .then(({ code, data, message }) => {
data, if (code == '0') this.checkLoginUserInfo(data)
message else wx.$api.showToast(message || '系统异常')
}) => { this.setBtnLoading(false)
if (code == '0') this.checkLoginUserInfo(data) })
else wx.$api.showToast(message || '系统异常') .catch(({ errMsg }) => {
this.setBtnLoading(false) wx.$api.showToast(errMsg || '系统异常')
}).catch(({ this.setBtnLoading(false)
errMsg })
}) => {
wx.$api.showToast(errMsg || '系统异常')
this.setBtnLoading(false)
})
}, },
/**手机号&微信登录:是否跳转登录列表页 */ /**手机号&微信登录:是否跳转登录列表页 */
checkLoginUserInfo({ checkLoginUserInfo({ loginUserInfoList, sessionId }) {
loginUserInfoList,
sessionId
}) {
/**多个账号 */ /**多个账号 */
if (loginUserInfoList.length > 1) wx.$router.go('login.accountItems', { if (loginUserInfoList.length > 1)
sessionId, wx.$router.go('login.accountItems', {
...thisPage.options sessionId,
}) ...thisPage.options
/**只有一个账号 */ })
else selectAccountLogin({ /**只有一个账号 */ else
id: loginUserInfoList[0].uuid, selectAccountLogin({
sessionId id: loginUserInfoList[0].uuid,
}) sessionId
})
}, },
/**设置登录按钮loading状态 */ /**设置登录按钮loading状态 */
setBtnLoading(loading = true) { setBtnLoading(loading = true) {
...@@ -239,13 +220,10 @@ Component({ ...@@ -239,13 +220,10 @@ Component({
}, },
/**页面初始化 */ /**页面初始化 */
async init() { async init() {
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
...@@ -253,9 +231,7 @@ Component({ ...@@ -253,9 +231,7 @@ 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()
} }
...@@ -267,13 +243,5 @@ Component({ ...@@ -267,13 +243,5 @@ Component({
}) })
if (reload) this.init() if (reload) this.init()
} }
},
lifetimes: {
attached: function () {
this.init()
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
} }
})
\ No newline at end of file \ No newline at end of file
})
<view class="box"> <view class="box">
<block wx:if="{{loginType == 0}}"> <block wx:if="{{loginType == 0}}">
<image webp class="img opacity-view" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/login.png" /> <image webp class="img opacity-view" src="{{IMGURL}}login/login.webp" />
</block> </block>
<block wx:else> <block wx:else>
<view class="input-box opacity-view"> <view class="input-box opacity-view">
......
// login/index/components/TypeList.js // login/index/components/TypeList.js
import { imgUrlMixin } from '~/mixins/index'
Component({ Component({
behaviors: [imgUrlMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<block wx:for="{{loginList}}" wx:key="index"> <block wx:for="{{loginList}}" wx:key="index">
<block wx:if="{{loginType != index}}"> <block wx:if="{{loginType != index}}">
<view class="item" bindtap="changLoginType" data-index="{{index}}"> <view class="item" bindtap="changLoginType" data-index="{{index}}">
<image class="icon" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/icon-{{index}}.png"></image> <image class="icon" webp src="{{IMGURL}}login/icon-{{index}}.png"></image>
{{item}} {{item}}
</view> </view>
</block> </block>
......
...@@ -30,11 +30,18 @@ Page({ ...@@ -30,11 +30,18 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow(options, refresh) {
if (refresh) {
this.setData({
disabled: true
})
}
wx.hideHomeButton({ wx.hideHomeButton({
success: res => { success: res => {
wx.hideLoading() wx.hideLoading()
this.checkLoginBtn() const login = this.selectComponent('#box')
if (login) login.init()
// this.checkLoginBtn()
} }
}) })
}, },
...@@ -64,9 +71,9 @@ Page({ ...@@ -64,9 +71,9 @@ Page({
*/ */
// onShareAppMessage() {}, // onShareAppMessage() {},
/**30天免登 */ /**30天免登 */
changeAgree(e){ changeAgree(e) {
this.setData({ this.setData({
autoLogin:e.detail autoLogin: e.detail
}) })
}, },
checkLoginBtn(disabled = false) { checkLoginBtn(disabled = false) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx; background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
......
import { import { setSessionId, setUserInfo } from '~/utils/cache/storageApi'
setSessionId,
setUserInfo
} from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
const setRouteData = targetPath => { const setRouteData = targetPath => {
let [url, query] = targetPath.split('?'), let [url, query] = targetPath.split('?'),
...@@ -18,25 +15,20 @@ const setRouteData = targetPath => { ...@@ -18,25 +15,20 @@ const setRouteData = targetPath => {
} }
} }
/**选择账号登录 */ /**选择账号登录 */
const selectAccountLogin = ({ const selectAccountLogin = ({ id, sessionId }) => {
id,
sessionId
}) => {
USERAPI.selectAccountLogin({ USERAPI.selectAccountLogin({
id, id,
sessionId sessionId
}).then(({ }).then(({ code, data, message }) => {
code,
data,
message
}) => {
if (code == '0') { if (code == '0') {
console.log(data)
setLoginInfo(data.loginUserInfoList[0], data.sessionId) setLoginInfo(data.loginUserInfoList[0], data.sessionId)
} else wx.$api.showToast(message || '系统异常') } else wx.$api.showToast(message || '系统异常')
}) })
} }
/**设置登录信息 */ /**设置登录信息 */
const setLoginInfo = (userInfo, sessionId) => { const setLoginInfo = (userInfo, sessionId) => {
console.log(userInfo)
setUserInfo(userInfo) setUserInfo(userInfo)
setSessionId(sessionId) setSessionId(sessionId)
loginSuccess() loginSuccess()
...@@ -44,26 +36,19 @@ const setLoginInfo = (userInfo, sessionId) => { ...@@ -44,26 +36,19 @@ const setLoginInfo = (userInfo, sessionId) => {
/**成功跳转 */ /**成功跳转 */
const loginSuccess = () => { const loginSuccess = () => {
const { const {
options: { options: { targetPath }
targetPath
}
} = wx.$router.getPageInstance() } = wx.$router.getPageInstance()
if (targetPath) { if (targetPath) {
const { const { url, obj } = setRouteData(targetPath)
url,
obj
} = setRouteData(targetPath)
wx.$router.reLaunch(url, obj) wx.$router.reLaunch(url, obj)
} else wx.$router.go('pages.index') } else wx.$router.go('pages.index')
} }
const loginModal = async ({ const loginModal = async ({ message, confirmText, cancelText }) => {
message,
confirmText
}) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showModal({ wx.showModal({
content: message || '网络异常', content: message || '网络异常',
confirmText: confirmText || '重试', confirmText: confirmText || '重试',
cancelText: cancelText || '取消',
confirmColor: '#3666FE', confirmColor: '#3666FE',
success(res) { success(res) {
if (res.confirm) resolve(res.confirm) if (res.confirm) resolve(res.confirm)
...@@ -78,4 +63,4 @@ module.exports = { ...@@ -78,4 +63,4 @@ module.exports = {
setRouteData, setRouteData,
setLoginInfo, setLoginInfo,
loginModal loginModal
}
\ No newline at end of file \ No newline at end of file
}
...@@ -35,54 +35,7 @@ Page({ ...@@ -35,54 +35,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
const sessionId = getSessionId(), this.init()
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options,
autoLoginObject = wx.$storage.get('auto_login_object')
wx.nextTick(() => {
let path = 'pages.index',
obj = {}
if (targetPath) obj.targetPath = targetPath
if (sessionId) {
USERAPI.checkSession().then(({
code
}) => {
if (code == '0') {
if (targetPath) {
path = setRouteData(targetPath).url
obj = setRouteData(targetPath).obj
}
wx.$router.reLaunch(path, obj)
} else {
if (autoLoginObject) {
const {
failureTime,
userName,
password
} = autoLoginObject
if (Date.now() < failureTime) {
USERAPI.accountLogin({
userName,
password
}).then(async res => {
if (res.code == '0') {
const {data} = res
setLoginInfo(data, data.sessionId)
} else {
const reload = await loginModal({
message: '登录失败请重试'
})
if(reload) this.onShow()
}
})
} else wx.$router.reLaunch('login.index', obj)
} else wx.$router.reLaunch('login.index', obj)
}
})
} else wx.$router.reLaunch('login.index', obj)
})
}, },
/** /**
...@@ -111,5 +64,64 @@ Page({ ...@@ -111,5 +64,64 @@ Page({
*/ */
onReachBottom() { onReachBottom() {
},
init() {
const sessionId = getSessionId(),
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
wx.nextTick(() => {
let path = 'pages.index',
obj = {}
if (targetPath) obj.targetPath = targetPath
if (sessionId) {
USERAPI.checkSession().then(({
code
}) => {
if (code == '0') {
if (targetPath) {
path = setRouteData(targetPath).url
obj = setRouteData(targetPath).obj
}
wx.$router.reLaunch(path, obj)
} else this.autoLogin(obj)
})
} else this.autoLogin(obj)
})
},
autoLogin(obj) {
const autoLoginObject = wx.$storage.get('auto_login_object')
if (autoLoginObject) {
const {
failureTime,
userName,
password
} = autoLoginObject
if (Date.now() < failureTime) {
USERAPI.accountLogin({
userName,
password
}).then(async ({
data,
code,
message
}) => {
if (code == '0') {
setLoginInfo(data, data.sessionId)
} else {
try {
const reload = await loginModal({
message: message || '登录失败请重试',
cancelText: '返回'
})
if (reload) this.onShow()
} catch (error) {
wx.$router.reLaunch('login.index', obj)
}
}
})
} else wx.$router.reLaunch('login.index', obj)
} else wx.$router.reLaunch('login.index', obj)
} }
}) })
\ No newline at end of file \ No newline at end of file
.layout { .layout {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
display: grid; display: flex;
place-items: center; align-items: center;
justify-content: center;
flex-direction: column;
background-color: #fff;
.loading { .loading {
height: 48rpx; height: 48rpx;
......
<view class="layout"> <view class="layout">
<view class="loading"> <image webp src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/index-loading.webp" mode="widthFix" ></image>
<!-- <view class="loading">
<block wx:for="{{4}}" wx:key="index"> <block wx:for="{{4}}" wx:key="index">
<view></view> <view></view>
</block> </block>
</view> </view> -->
</view> </view>
\ 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'
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = '../../images/'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
IMG_URL:IMG_URLLocal,
carObj:{
name:'kafdkf',
model:'dfdsf3443',
selNum:132,
contact:'',
phone:'',
}
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88*2
})
// console.log(e)
// console.log(this.data.headerHeight)
},
// 提交信息
applyFn(){
console.log(123)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(params){
console.log('params: ', params);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
}
\ No newline at end of file \ No newline at end of file
/* pages/apply/apply.wxss */
.apply {
.head {
width: 100%;
}
.introduce {
height: 180px;
}
.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;
}
}
}
.btn {
margin-top:40px;
width: 100%;
font-weight: 500;
font-size: 17px;
color: #ffffff;
text-align: center;
background: var(--btnColor);
}
}
<!-- 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-title.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">
开店名称
<text class="point">*</text>
</view>
<input class="inp" value="{{carObj.name}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面车型
</view>
<input class="inp" value="{{carObj.model}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面新车销量/基盘客户
</view>
<input class="inp" value="{{carObj.selNum}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
门店联系人
</view>
<input class="inp" value="{{carObj.contact}}" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
联系人手机号
</view>
<input class="inp" value="{{carObj.phone}}" placeholder="请输入手机号" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx; background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
......
// pages/tab/index/components/likeToast/likeToast.js
import { IMG_URL } from "~/utils/constantData.js";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = "../../../../../images/";
Component({
data: {
IMG_URL,
IMG_URLLocal,
type: "fail",
title: "你还没有勾选呢!",
isShow: false,
animationData: "",
},
methods: {
showToast: function (data) {
const self = this;
if (this._showTimer) {
clearTimeout(this._showTimer);
}
if (this._animationTimer) {
clearTimeout(this._animationTimer);
}
// display需要先设置为block之后,才能执行动画
this.setData({
title: data.title,
type: data.type,
isShow: true,
});
this._animationTimer = setTimeout(() => {
const animation = wx.createAnimation({
duration: 500,
timingFunction: "ease",
delay: 0,
});
animation.opacity(1).step();
self.setData({
animationData: animation.export(),
});
}, 50);
this._showTimer = setTimeout(function () {
self.hideToast();
if (data.compelete && typeof data.compelete === "function") {
data.compelete();
}
}, 1200 || 50 + data.duration);
},
hideToast: function () {
if (this._hideTimer) {
clearTimeout(this._hideTimer);
}
let animation = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0,
});
animation.opacity(0).step();
this.setData({
animationData: animation.export(),
});
this._hideTimer = setTimeout(() => {
this.setData({
isShow: false,
});
}, 250);
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/likeToast/likeToast.wxss */
.toast-box {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 11;
display: none;
opacity: 0;
}
.show {
display: block;
opacity: 1;
}
.toast-content {
display: flex;
flex-direction: column;
justify-content:center;
align-items:center;
position: absolute;
left: 50%;
top: 50%;
width: 136px;
height: 136px;
background: rgba(0,0,0,0.70);
border-radius: 8px;
box-sizing: bordre-box;
transform: translate(-50%, -50%);
}
.toast-img {
margin-bottom: 20px;
box-sizing: bordre-box;
text-align: center;
}
.toast-icon {
width: 23px;
height: 23px;
}
.toast-title {
margin-left: 28px;
margin-right: 28px;
font-size: 14px;
color: #ffffff;
text-align: center;
}
<!--pages/tab/index/components/likeToast/likeToast.wxml-->
<view class="toast-box {{isShow? 'show':''}}" animation="{{animationData}}">
<view class="toast-content" >
<view class="toast-img">
<block wx:if="{{type==='success'}}">
<image class="toast-icon" src="{{IMG_URL}}index/like.png"/>
</block>
<block wx:if="{{type==='fail'}}">
<image class="toast-icon" src="{{IMG_URL}}index/dislike.png" />
</block>
</view>
<view class="toast-title">{{title}}</view>
</view>
</view>
// pages/tab/discovery/components/product/product.js // pages/tab/discovery/components/product/product.js
// import {imgUrlMixin} from '~/mixins/index' // import {imgUrlMixin} from '~/mixins/index'
import { IMG_URL } from "~/utils/constantData.js";
Component({ Component({
// behaviors: [imgUrlMixin], // behaviors: [imgUrlMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
stickyTop: Number,
actNum: Number,
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
navList:['360全景导航','AR实景导航','座椅通风','氛围灯','数字化美容'], navList: ["360全景导航", "AR实景导航", "座椅通风", "氛围灯", "数字化美容"],
activeNavIdx: 0, activeNavIdx: 0,
tab:['适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程','适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程'], tab: [
heightArr:[], "场景说明",
curTabIdx:0, "营销链路",
intoViewId: 'to-0', "项目亮点",
IMGURL:'../../../../../images/index/' "转化漏斗",
"合作流程",
"合作案例",
],
heightArr: [],
allHeight: 0,
curTabIdx: 0,
intoViewId: "to-0",
IMGURL: `${IMG_URL}index/`,
}, },
lifetimes:{ lifetimes: {
ready: function (){ ready: function () {
// console.log(11111) // console.log(11111)
this.getImgHeight() this.getImgHeight();
},
},
observers: {
actNum: function () {
console.log(1231)
let navList;
let num = this.data.actNum;
switch (num) {
case 0:
navList = ['数字无忧权益卡']
break;
case 1:
navList = ['汽车太阳膜']
break;
case 2:
navList = ['漆面保护膜','改色膜']
break;
case 3:
navList = ['数字化美容','座椅通风','AR导航','氛围灯','360全景导航']
break;
}
this.setData({
navList
});
}, },
}, },
...@@ -32,37 +68,43 @@ Component({ ...@@ -32,37 +68,43 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
changeTab(e){ changeTab(e) {
let idx = e.detail let idx = e.detail;
this.setData({ this.setData({
intoViewId: `to-${idx}` intoViewId: `to-${idx}`,
}) });
}, },
changeNav(event){ changeNav(event) {
console.log(event,event.target.dataset.index,111) console.log(event, event.target.dataset.index, 111);
this.setData({ this.setData({
activeNavIdx: event.target.dataset.index activeNavIdx: event.target.dataset.index,
}) });
}, },
scrolltoupper(event){ scrolltoupper(event) {
const idx = this.data.heightArr.findIndex(item => item>event.detail.scrollTop) const idx = this.data.heightArr.findIndex(
(item) => item > event.detail.scrollTop
);
this.setData({ this.setData({
curTabIdx: idx curTabIdx: idx,
}) });
// console.log(this.data.curTabIdx1) // console.log(this.data.curTabIdx1)
}, },
getImgHeight(){ getImgHeight() {
let query = wx.createSelectorQuery().in(this) let query = wx.createSelectorQuery().in(this);
let heightArr = [] let heightArr = [];
let s = 0 let s = 0;
query.selectAll('.img-item').boundingClientRect((react) => { query
react.forEach(item => { .selectAll(".img-item")
s += item.height .boundingClientRect((react) => {
heightArr.push(s) react.forEach((item) => {
s += item.height;
heightArr.push(s);
});
this.data.heightArr = heightArr;
// console.log(heightArr[heightArr.length-1])
this.data.allHeight = heightArr[heightArr.length - 1];
}) })
this.data.heightArr = heightArr .exec();
// console.log( this.data.heightArr) },
}).exec() },
} });
}
})
// 特色产品 // 特色产品
.prod-wrap .big-title{ .prod-wrap {
background-color: #f8fafb;
}
.prod-wrap .big-title {
margin-left: 40rpx; margin-left: 40rpx;
font-family: PingFangSC-S0pxibold; font-family: PingFangSC-S0pxibold;
font-weight: 600; font-weight: 600;
font-size: 36rpx; font-size: 36rpx;
color: #1B233D; color: #1b233d;
line-height: 56rpx; line-height: 56rpx;
} }
.prod-wrap .nav-wrap{ .prod-wrap .nav-wrap {
white-space: nowrap; white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
margin-top: 24rpx; margin-top: 24rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 0 20rpx; padding: 0 20rpx;
} }
.prod-wrap .nav-wrap .nav{ .prod-wrap .nav-wrap .nav {
display: inline-block; display: inline-block;
width: 188rpx; width: 188rpx;
height: 64rpx; height: 64rpx;
...@@ -25,97 +28,103 @@ ...@@ -25,97 +28,103 @@
text-align: center; text-align: center;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
line-height: 64rpx; line-height: 64rpx;
margin-right: 12rpx; margin-right: 16rpx;
background: #FFFFFF; background: #ffffff;
border: 2rpx solid #DDE3F0; border: 2rpx solid #dde3f0;
color: #323436;
} }
.prod-wrap .nav-wrap .active-nav{ .prod-wrap .nav-wrap .active-nav {
background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%); color: #ffffff;
border: 2rpx solid rgba(68,97,240,0.50); // background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%);
box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35); background-color: var(--btnColor);
// border: 2rpx solid rgba(68,97,240,0.50);
// box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35);
} }
.prod-wrap .nav-wrap .nav:last-child{ .prod-wrap .nav-wrap .nav:last-child {
margin-right: 0; margin-right: 0;
} }
.prod-item{ .prod-item {
background-color: #F5F7FB; padding-bottom: 32rpx;
margin: 16rpx auto 0;
width: 343px;
background-color: #f5f7fb;
border-radius: 48rpx 48rpx 0 0; border-radius: 48rpx 48rpx 0 0;
padding: 40rpx 24rpx 32rpx;
} }
.prod-card{ .prod-card {
display: flex; display: flex;
height: 208rpx; height: 208rpx;
background-image: linear-gradient(1deg, #FFFFFF 10%, #FDFCFF 100%); background-image: linear-gradient(1deg, #ffffff 10%, #fdfcff 100%);
border: 2rpx solid #FFFFFF; border: 2rpx solid #ffffff;
box-shadow: 0 8rpx 20rpx 0 rgba(197,205,235,0.35); box-shadow: 0 8rpx 20rpx 0 rgba(197, 205, 235, 0.35);
border-radius: 20rpx; border-radius: 20rpx;
padding: 20rpx 24rpx; padding: 20rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
} }
.prod-card .card-img{ .prod-card .card-img {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
flex-shrink: 0; flex-shrink: 0;
border-radius: 4rpx; border-radius: 4rpx;
} }
.img-desc{ .img-desc {
position: absolute; position: absolute;
width: 104rpx; width: 104rpx;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
background: #D7F5EB; background: #d7f5eb;
border-radius: 4rpx; border-radius: 4rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 600; font-weight: 600;
font-size: 24rpx; font-size: 24rpx;
color: #24B38C; color: #24b38c;
letter-spacing: 0; letter-spacing: 0;
text-align: center; text-align: center;
} }
.prod-info{ .prod-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding: 12rpx 0; padding: 12rpx 0;
margin-left: 24rpx; margin-left: 24rpx;
} }
.prod-info>text{ .prod-info > text {
display: block; display: block;
white-space: nowrap; white-space: nowrap;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
} }
.prod-info .title{ .prod-info .title {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 600; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
color: #323436; color: #323436;
} }
.prod-info .sale,.prod-info .earnings{ .prod-info .sale,
.prod-info .earnings {
font-size: 26rpx; font-size: 26rpx;
color: #7A8299; color: #7a8299;
} }
.prod-info .sale-num{ .prod-info .sale-num {
font-size: 26rpx; font-size: 26rpx;
color: #323436; color: #323436;
} }
.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;
} }
.share-btn{ .share-btn {
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%); background-image: linear-gradient(-60deg, #556af5 0%, #7197ff 100%);
border-radius: 12rpx; border-radius: 12rpx;
color: #fff; color: #fff;
padding: 0 20rpx; padding: 0 20rpx;
...@@ -126,23 +135,28 @@ ...@@ -126,23 +135,28 @@
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.share-btn .icon{ .share-btn .icon {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.project-wrap{ .project-wrap {
background-color: #F5F7FB; background-color: #f5f7fb;
} }
.project-img{ .project-img {
height: 500rpx; height: 1200rpx;
white-space: nowrap; white-space: nowrap;
.img-item{ .img-item {
height: 300rpx; height: 300rpx;
} }
} }
.stickyTab {
position: sticky;
z-index: 1;
background-color: #f5f7fb;
}
// .out-tab{ // .out-tab{
// .out-text { // .out-text {
// // color: red !important; // // color: red !important;
...@@ -154,3 +168,28 @@ ...@@ -154,3 +168,28 @@
// } // }
// } // }
.img-item11 {
width: 100%;
height: 1110rpx;
}
.img-item12 {
width: 100%;
height: 1290rpx;
}
.img-item13 {
width: 100%;
height: 596rpx;
}
.img-item14 {
width: 100%;
height: 744rpx;
}
.img-item15 {
width: 100%;
height: 490rpx;
}
.img-item16 {
width: 100%;
height: 1532rpx;
}
<!--pages/tab/discovery/components/product/product.wxml--> <!--pages/tab/discovery/components/product/product.wxml-->
<view class="prod-wrap"> <view class="prod-wrap">
<text class="big-title">特色产品</text> <text class="big-title">特色产品</text>
<scroll-view class="nav-wrap" scroll-x="{{true}}"> <scroll-view class="nav-wrap" scroll-x="{{true}}">
<block wx:for="{{navList}}" wx:key="index"> <block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text> <text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block> </block>
</scroll-view> </scroll-view>
<view class="prod-item"> <view class="prod-item">
<view class="prod-card"> <view class="prod-card">
<view class="card-img"> <view class="card-img">
<text class="img-desc">轻改类</text> <text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png"></image> <image src="{{IMGURL}}discovery_prod1.png" />
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">360全景导航</text> <text class="title">360全景导航</text>
<text class="sale">新车销量 <text class="sale-num">100</text></text> <text class="sale">新车销量 <text class="sale-num">100</text>
<text class="earnings">预估收益 <text class="earnings-num">92.4 万</text></text> </text>
</view> <text class="earnings">预估收益 <text class="earnings-num">92.4 万</text>
</text>
<view class="share-btn"> </view>
<image class="icon" src="{{IMGURL}}share.png"></image>
<text>分享</text> <view class="share-btn">
</view> <image class="icon" src="{{IMGURL}}share.png" />
</view> <text>分享</text>
</view> </view>
</view> </view>
<view class="project-wrap"> </view>
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab> </view>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}"> <view class="project-wrap">
<block wx:for="{{tab}}" wx:key="index"> <!-- -->
<view id="to-{{index}}" class="img-item"> <view class="stickyTab" style="top:{{stickyTop}}rpx">
{{item}} <tab
</view> outClassName="project-tab"
</block> openScroll="{{true}}"
</scroll-view> tab="{{tab}}"
</view> index="{{curTabIdx}}"
bindclick="changeTab"
/>
</view>
<!-- style="{height:{{allHeight}}px}" -->
<scroll-view
class="project-img"
scroll-into-view="{{intoViewId}}"
bindscroll="scrolltoupper"
scroll-y="{{true}}"
>
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item{{actNum+1}}{{index+1}}">
<!-- {{item}} -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
</view>
</block>
</scroll-view>
</view>
const navStyle = "background-color: transparent;";
import { IMG_URL } from "~/utils/constantData.js";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = "../../../images/";
const navStyle = 'background-color: transparent;'
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
/** /**
...@@ -7,61 +11,289 @@ Page({ ...@@ -7,61 +11,289 @@ Page({
*/ */
data: { data: {
navStyle, navStyle,
actClass:'right', IMG_URL,
// IMG_URL IMG_URLLocal,
dataArr:[ actClass: "right",
guideSrcIndex: 1,
guideShow: false,
dataArr: [
{ {
src:'../../../images/index/car1.png', src: `${IMG_URL}index/car1.png`,
name:'新车洽谈场景', name: "新车洽谈场景",
msg:'1.0 新车权益销售' msg: "1.0 新车权益销售",
}, },
{ {
src:'../../../images/index/car2.png', src: `${IMG_URL}index/car2.png`,
name:'新车交付场景', name: "新车交付场景",
msg:'1.1 新车精品升级' msg: "1.1 新车精品升级",
}, },
{ {
src:'../../../images/index/car3.png', src: `${IMG_URL}index/car3.png`,
name:'0-12个月', name: "0-12个月",
msg:'1.2 新车线上转化' msg: "1.2 新车线上转化",
}, },
{ {
src:'../../../images/index/car4.png', src: `${IMG_URL}index/car4.png`,
name:'12个月以上', name: "12个月以上",
msg:'1.3 存量用户众筹' msg: "1.3 存量用户众筹",
}, },
] ],
actNum: 0,
tabIndx: 1,
tabList: ["看线索", "看产品"],
typeList: ["联系电话", "意向客户", "线索来源", "重置"],
clueList: [
{
source: "customer",
name: "张三1",
avatar: "",
like: true,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 3,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 4,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 5,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 6,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 7,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
],
phone: 15718122929,
isOpen: false,
getMoreFlag: true,
},
{
source: "customer",
name: "张三",
avatar: "",
like: false,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
],
phone: 15718122925,
isOpen: true,
},
{
source: "shop",
name: "张三",
avatar: "",
like: false,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
shop: "嘀加鹏辉奥迪4S店",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
shop: "嘀加鹏辉奥迪4S店",
},
],
phone: 15718122925,
isOpen: true,
},
],
filterType: "", //看线索过滤类型
},
//引导图
guideFn() {
if (this.data.guideSrcIndex === 5) {
this.setData({
guideShow: false,
});
return;
}
this.setData({
guideSrcIndex: ++this.data.guideSrcIndex,
});
// console.log('guideSrcIndex',this.data.guideSrcIndex)
}, },
// navbar高度设置
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail;
this.setData({
// tabBarStyle: height / 2 + statusBarHeight,
headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
// headTabFn(e){
// // console.log("name",e.currentTarget.dataset.name)
// let name = e.currentTarget.dataset.name
// this.setData({
// actClass:name
// })
// },
// 选车场景切换
selectCar(e) {
let actNum = e.currentTarget.dataset.num;
this.setData({ this.setData({
tabBarStyle: height / 2 + statusBarHeight actNum,
}) });
console.log(e)
}, },
headTabFn(e){ // 头部看线索,产品切换
// console.log("name",e.currentTarget.dataset.name) changeTabIndx(e) {
let name = e.currentTarget.dataset.name console.log("e.detail: ", e.detail);
this.setData({ this.setData({
actClass:name tabIndx: e.detail,
}) });
},
gotoApply() {
// wx.$router.go('apply',1235)
wx.$router.go("apply");
},
getMore(e) {
console.log("显示更多数据");
let index = e.currentTarget.dataset.outidx;
console.log("index: ", index);
let completeStatus = `clueList[${index}].getMoreFlag`;
this.setData({
[completeStatus]: !this.data.clueList[index].getMoreFlag,
});
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () {
this.prompt = this.selectComponent("#toast");
},
showToast: function (e) {
let type = e.currentTarget.dataset.type;
let tipObj = {};
if (type == "like") {
tipObj = {
type: "fail",
title: "取消标记为意向客户",
};
} else {
tipObj = {
type: "success",
title: "成功标记为意向客户",
};
}
this.prompt.showToast({
type: tipObj.type,
title: tipObj.title,
duration: 1000,
compelete: function () {
console.log("toast框隐藏之后,会调用该函数");
//例如:跳转页面wx.navigateTo({ url: 'xxx' });
},
});
//切换收藏标记
let index = e.currentTarget.dataset.outidx;
let completeStatus = `clueList[${index}].like`;
this.setData({
[completeStatus]: !this.data.clueList[index].like,
});
},
filterTypeFn(e) {
let index = e.currentTarget.dataset.index;
let itemList = [];
// console.log("index: ", typeof index);
switch (index) {
case 0:
itemList = ["有", "无"];
break;
case 1:
itemList = ["是", "否"];
break;
case 2:
itemList = ["访客", "门店"];
break;
case 3:
console.log("重置");
return;
}
this.setData({
filterType: "",
});
wx.pro.showActionSheet({
itemList,
success(res) {
console.log(res.tapIndex);
},
fail(res) {
console.log(res.errMsg);
},
complete(res) {
console.log("res: ", res);
},
});
},
phoneCallFn(e) {
let { phone } = e.currentTarget.dataset;
console.log("phone: ", phone);
wx.$api.phoneCall(phone);
},
setCopyDataFn(e) {
let { phone } = e.currentTarget.dataset;
wx.$api.setCopyData(phone);
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
// setTimeout(()=>{
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// })
}, },
/** /**
...@@ -77,8 +309,7 @@ Page({ ...@@ -77,8 +309,7 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
...@@ -87,6 +318,5 @@ Page({ ...@@ -87,6 +318,5 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {},
} });
})
{ {
"usingComponents": { "usingComponents": {
"product": "./components/product/product" "product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
......
...@@ -3,36 +3,41 @@ page { ...@@ -3,36 +3,41 @@ page {
width: 100vw; width: 100vw;
background-color: #fff; background-color: #fff;
} }
.reclaim{ .reclaim {
.header-wrap{ .header-wrap {
position: relative; position: sticky;
top: 0;
width: 100%; width: 100%;
background-size: 100% 100%; background-size: 100% 100%;
margin-bottom: 16px; margin-bottom: 16px;
.header{ z-index: 1;
.header {
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
display: flex; display: flex;
justify-content:space-between; justify-content: space-between;
align-items:center; align-items: center;
.left{ .tabContainer {
width: 60%;
}
.left {
display: flex; display: flex;
align-items: center; align-items: center;
.clue{ .clue {
position: relative; position: relative;
margin-left: 24px; margin-left: 24px;
margin-right: 24px; margin-right: 24px;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #8A8C90; color: #8a8c90;
} }
.product{ .product {
position: relative; position: relative;
} }
.act{ .act {
font-weight: 600; font-weight: 600;
font-size: 22px; font-size: 22px;
color: #323436; color: #323436;
...@@ -50,14 +55,14 @@ page { ...@@ -50,14 +55,14 @@ page {
} }
} }
} }
.right{ .right {
display: flex; display: flex;
align-items:center; align-items: center;
.img{ .img {
width:20px; width: 20px;
height:20px; height: 20px;
} }
.apply{ .apply {
margin-left: 4px; margin-left: 4px;
margin-right: 16px; margin-right: 16px;
font-weight: 400; font-weight: 400;
...@@ -67,51 +72,237 @@ page { ...@@ -67,51 +72,237 @@ page {
} }
} }
} }
.scene{ // .content{
// position: relative;
// }
.clue {
padding: 8px 10px 0;
background-color: #f2f3f7;
.types {
margin-bottom: 8px;
display: flex;
align-items: center;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
}
.list {
.msg {
padding: 10px 16px 16px;
margin-bottom: 8px;
position: relative;
background-color: #fff;
border-radius: 4px;
}
.like {
position: absolute;
right: 12px;
top: 0;
width: 23px;
height: 23px;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 14px;
color: #323436;
.avatar {
margin-left: 2px;
width: 20px;
height: 20px;
}
}
.line {
margin-top: 10px;
margin-bottom: 10px;
height: 0;
border-bottom: #eeeeee 1px dashed;
}
.want-more {
overflow: hidden;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
margin-top: 4px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #393b3e;
}
// .action{
// }
// .detail{
// }
.time {
font-size: 12px;
color: #8a8c90;
}
}
.info {
margin-top: 10px;
display: flex;
justify-content: space-between;
.phone-wrap {
display: flex;
align-items: center;
}
.phone {
font-size: 12px;
color: #3666fe;
}
.phone-img {
margin-left: 12px;
margin-right: 8px;
width: 20px;
height: 20px;
border-radius: 50%;
}
.copy {
width: 20px;
height: 20px;
border-radius: 50%;
}
.btn {
width: 85px;
height: 24px;
background: var(--btnColor);
border-radius: 12px;
font-size: 12px;
color: #ffffff;
text-align: center;
line-height: 24px;
}
}
.shop {
.name-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.source {
font-size: 10px;
color: #8a8c90;
}
.btn {
border: 1px solid var(--btnColor);
border-radius: 12px;
background-color: #fff;
font-size: 12px;
color: var(--btnColor);
}
.shop-action-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.shop-record {
width: 100%;
}
.shop-source {
margin-top: 4px;
width: 100%;
font-size: 12px;
color: #393b3e;
}
}
}
}
.scene {
margin: 0 10px 16px; margin: 0 10px 16px;
display: flex; display: flex;
justify-content:space-between; justify-content: space-between;
.item{ .item-wrap {
position: relative; position: relative;
width: 106px;
height: 116px;
}
.item {
width: 86px; width: 86px;
height: 90px; height: 90px;
background: #F7F8FC; background: #f7f8fc;
border-radius: 6px; border-radius: 6px;
} }
.act{ .act {
position: absolute; background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
top: 0; background-size: 100% 100%;
left: 0; .item {
background: transparent;
}
} }
.img{ .img {
display:block; display: block;
margin: 10px auto 2px; margin: 10px auto 2px;
width: 28px; width: 28px;
height: 28px; height: 28px;
} }
.name{ .name {
margin-bottom: 2px; margin-bottom: 2px;
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
color: #323436; color: #323436;
text-align: center; text-align: center;
} }
.msg{ .msg {
font-weight: 400; font-weight: 400;
font-size: 9px; font-size: 9px;
color: #8A8C90; color: #8a8c90;
text-align: center; text-align: center;
} }
} }
} }
.guide{ .guide {
width: 100%; width: 100%;
height: 100%; height: 100%;
.guide-img{ .guide-img {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
}
\ No newline at end of file \ No newline at end of file
}
.chat {
position: absolute;
right: 0;
top: 60%;
width: 50px;
height: 50px;
border-radius: 50%;
z-index: 1;
}
.output-value {
position: absolute;
right: 5px;
top: 70%;
width: 40px;
height: 50px;
border-radius: 50%;
z-index: 1;
}
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <wxs src="./index.wxs" module="filterUtils" />
拓客户 <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</navigation-bar>
</navigation-bar>
<view class="reclaim"> <view class="reclaim">
<view class="header-wrap" style="height:{{tabBarStyle*2 + 88}}rpx; background-image: url('../../../images/index/head.png')"> <view class="header-wrap" style="height:{{headerHeight}}rpx; background-image: url('{{IMG_URL}}index/head.png')">
<view class="header"> <view class="header">
<view class="left"> <!-- <view class="left">
<view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left"> <view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left">
看线索 看线索
</view> </view>
<view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right"> <view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right">
看产品 看产品
</view> </view>
</view> </view> -->
<view class="right"> <tab tab="{{tabList}}" itemWidth="{{'35%'}}" index="{{tabIndx}}" bindclick="changeTabIndx" class="tabContainer" />
<image class="img" src="../../../images/index/apply.png"></image> <view class="right" bindtap="gotoApply">
<view class="apply"> <image class="img" src="{{IMG_URL}}index/apply.png" />
申请业务 <view class="apply">申请业务</view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="content" wx:if="{{tabIndx == 1 }}" hover-class="none" hover-stop-propagation="false">
<view class="scene"> <view class="scene">
<view class="item item{{index}}" wx:for="{{dataArr}}" wx:key="name"> <view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" bindtap="selectCar" wx:for="{{dataArr}}" wx:key="name">
<image class="img" src="{{item.src}}"></image> <view class="item">
<view class="name"> <image class="img" src="{{item.src}}" />
{{item.name}} <view class="name">{{item.name}}</view>
</view> <view class="msg">{{item.msg}}</view>
<view class="msg"> </view>
{{item.msg}} </view>
</view> </view>
</view> <product stickyTop="{{headerHeight}}" actNum="{{actNum}}" />
</view> </view>
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
<product></product> <view class="types">
<view class="type" wx:for="{{typeList}}" wx:key="*this" data-index="{{index}}" bindtap="filterTypeFn">
{{item}}
<image class="point" wx:if="{{index != 3}}" src="{{IMG_URL}}index/point.png" />
</view>
</view>
<view class="list" hover-class="none" hover-stop-propagation="false">
<view class="msg" wx:for="{{clueList}}" wx:key="phone">
<!-- 生意助手 -->
<view wx:if="{{item.source == 'customer'}}">
<image class="like" wx:if="{{item.like}}" src="{{IMG_URL}}index/like.png" data-type="like" data-outidx="{{index}}" bindtap="showToast" />
<image class="like" wx:else src="{{IMG_URL}}index/dislike.png" data-type="dislike" data-outidx="{{index}}" bindtap="showToast" />
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.name}}
<image class="avatar" src="{{IMG_URL}}index/avatar.png" />
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="want-more" style="height:{{item.getMoreFlag? 100: 'auto'}}px">
<view class="record" wx:for="{{item.records}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">
{{filterUtils.filterType(itemName.type)}}:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.msg}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.time}}
</view>
</view>
</view>
<view class="want-btn" wx:if="{{item.records.length > 5}}" hover-class="none" hover-stop-propagation="false" data-outidx="{{index}}" bindtap="getMore">
{{ item.getMoreFlag ? '更多数据' : '收起数据'}}
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" />
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply">
+开店面
</view>
</view>
</view>
<!-- 门店助手 -->
<view class="shop" wx:else>
<view class="name-wrap">
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.name}}
<image class="avatar" src="{{IMG_URL}}index/avatar.png" />
</view>
<view class="source" hover-class="none" hover-stop-propagation="false">通过门店助手申请</view>
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="record" wx:for="{{item.records}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="shop-record">
<view class="shop-action-wrap">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">
{{filterUtils.filterType(itemName.type)}}:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.msg}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.time}}
</view>
</view>
<view class="shop-source" hover-class="none" hover-stop-propagation="false">
所属门店:{{itemName.shop}}
</view>
</view>
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" />
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply">
开通活动
</view>
</view>
</view>
</view>
</view>
</view>
</view> </view>
<vas-toast isShow="{{true}}" id='toast' />
<view class="guide" wx:if="{{guideShow}}"> <view class="guide" wx:if="{{guideShow}}">
<image bindtap="guideFn" class="guide-img" src="../../../images/entrustCustomers/guide{{guideSrcIndex}}.png"></image> <image bindtap="guideFn" class="guide-img" src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" />
</view> </view>
<image class="chat" src="{{IMG_URL}}index/contact.png"></image>
<image class="output-value" src="{{IMG_URL}}index/valuation.png"></image>
\ No newline at end of file \ No newline at end of file
/**
*
* @param type 线索类型
* @returns
*/
var filterType = function(type){
var res;
type = +type;
switch (type) {
case 0:
res = '访问页面1'
break;
case 1:
res = '访问页面2'
break;
case 2:
res = '访问页面3'
break;
}
return res;
};
module.exports = {
filterType:filterType
}
...@@ -26,7 +26,6 @@ page { ...@@ -26,7 +26,6 @@ page {
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat;
background-size: 100% 486rpx; background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
......
// pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.js
import { IMG_URL } from '~/utils/constantData.js'
import USERAPI from '~/api/usersApi/index'
import { setUserInfo } from '~/utils/cache/storageApi'
Component({
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
popShow: {
type: Boolean,
value: false
},
merchantRange: Object
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
merchantList: []
},
observers: {
merchantRange: function (e) {
// console.log(e)
this.setData({
merchantList: e
})
}
},
/**
* 组件的方法列表
*/
methods: {
hidePopup() {
console.log(222)
this.triggerEvent('hidePopup')
},
confirm() {
console.log(111)
let { merchantRange, subIndex } = this.data
let actObj = merchantRange.find((item, index) => {
if (item.act) {
subIndex = index
}
return item.act
})
// console.log(actObj)
// this.setData({
// subIndex
// })
if (!actObj) {
return wx.$api.showToast({
title: '请选择服务商',
icon: 'error'
})
} else {
this.changePicker(actObj)
}
},
changePicker(actObj) {
// 修改对应下标显示
console.log('changePicker')
// let { value } = e.detail
// app.globalData.yqdInfo.subIndex = value
// let { merchantId } = this.data.merchantRange[value]
// let obj = {}
// if (merchantId) obj.merchantId = actObj
let { merchantId } = actObj
wx.$api.showLoading('加载中...')
USERAPI.switchSubLoginInfo({ merchantId }).then(res => {
console.log(res)
this.setUserInfo(res)
this.hidePopup()
this.triggerEvent('changeAccount')
// }
wx.$api.hideLoading()
})
// this.tapPicker()
},
select(e) {
// console.log(e)
let { index } = e.currentTarget.dataset
console.log(index)
let { merchantRange } = this.data
merchantRange.forEach((item, ind) => {
if (index == ind) {
item.act = true
} else {
item.act = false
}
this.setData({
merchantRange
})
})
},
input(e) {
console.log(e)
let { merchantRange } = this.data
let { value } = e.detail
merchantRange.forEach(item => {
item.act = false
item.show = item.merchantName.includes(value)
// = show
})
this.setData({
merchantRange
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.wxss */
.search-box {
width: 100%;
height: 104rpx;
padding-left: 32rpx;
// margin-top: 20rpx;
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
}
.search-box .search-input {
background: #F7F8FA;
border-radius: 38rpx;
width: 606rpx;
height: 72rpx;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
font-size: 32rpx;
color: #858A94;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.itemCon {
box-sizing: border-box;
width: 100%;
// background-color: #fff;
height: 80rpx;
color: #323436;
line-height: 80rpx;
padding: 0 32rpx;
}
.active {
// color: aqua;
background: #F0F7FF;
font-size: 28rpx;
color: #3666FE;
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.wxml -->
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
height="60%">
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> -->
<view class="search-box">
<view class="search-input">
<image src="{{IMG_URL}}/output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
</view>
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{merchantList}}" wx:key="index">
<view
class="itemCon text-hide {{item.act?'active':''}}"
hidden="{{!item.show}}"
data-index="{{index}}"
bindtap="select">
{{item.merchantName}}
</view>
</block>
</scroll-view>
</popup>
// pages/tab/output/output.js // pages/tab/output/output.js
import { getSessionId, setSessionId } from '~/utils/cache/storageApi' import { getSessionId, setSessionId } from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -10,7 +11,8 @@ Page({ ...@@ -10,7 +11,8 @@ Page({
agree: true, agree: true,
tabIndx: 1, tabIndx: 1,
tabList: ['我的客户', '我的门店', '我的员工'], tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: true, popupShow: false,
subIndex: -1,
merchantList: [ merchantList: [
{ {
merchantId: 0, merchantId: 0,
...@@ -24,36 +26,11 @@ Page({ ...@@ -24,36 +26,11 @@ Page({
} }
] ]
}, },
confirm() { // 切换园区
let { merchantList } = this.data tapPicker() {
},
select(e) {
console.log(e)
let { index } = e.currentTarget.dataset
console.log(index)
let { merchantList } = this.data
merchantList.forEach((item, ind) => {
if (index == ind) {
item.act = true
} else {
item.act = false
}
this.setData({
merchantList
})
})
},
input(e) {
console.log(e)
let { merchantList } = this.data
let { value } = e.detail
merchantList.forEach(item => {
item.act = false
item.show = item.merchantName.includes(value)
// = show
})
this.setData({ this.setData({
merchantList moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow
}) })
}, },
navbarReady(e) { navbarReady(e) {
...@@ -61,47 +38,55 @@ Page({ ...@@ -61,47 +38,55 @@ Page({
this.setData({ this.setData({
tabBarStyle: height / 2 + statusBarHeight tabBarStyle: height / 2 + statusBarHeight
}) })
console.log(e) // console.log(e)
}, },
changeTabIndx(e) { changeTabIndx(e) {
this.setData({ this.setData({
tabIndx: e.detail tabIndx: e.detail
}) })
}, },
// 切换园区
tapPicker() { getMerchantRange() {
this.setData({ let { userInfo } = wx.$storage.get()
moveArrow: !this.data.moveArrow // 有问题 先取反调试
}) userInfo = userInfo.loginUserInfoList[0]
}, console.log(userInfo.subLoginUser.merchantId)
changePicker(e) { console.log(userInfo)
console.log('changePicker') // userInfo.isSuper &&
let { value } = e.detail USERAPI.adminSelectLogin()
// 修改对应下标显示 .then(result => {
app.globalData.yqdInfo.subIndex = value console.log(result)
let { merchantId } = this.data.merchantRange[value] let { merchantList: merchantRange } = result
let obj = {} console.log(merchantRange)
if (merchantId) obj.merchantId = merchantId let subIndex = -1
wx.$util.showLoading('加载中...') merchantRange.forEach((item, index) => {
api.swtichSubLoginInfo(obj).then(res => { item.show = true
// console.log(res) if (item.merchantId == userInfo.subLoginUser.merchantId) {
let { code, data, message } = res subIndex = index
if (code == 0) { item.act = true
// debugger }
wx.$util.setUserInfo(data) })
this.refresh(data) console.log(subIndex)
} else { this.setData({
this.showToast(message) merchantRange,
} subIndex
}) })
this.tapPicker() })
.catch(err => {})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
setSessionId('xxx') // setSessionId('xxx')
console.log(getSessionId()) // console.log(getSessionId())
// 判断是不是管理员
// subLoginUser
// if (userInfo.duty == '管理员') {
this.getMerchantRange()
// }
// console.log(userInfo)
}, },
/** /**
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"client": "./components/client/client", "client": "./components/client/client",
"merchant": "./components/merchant/mrechant", "merchant": "./components/merchant/mrechant",
"staff": "./components/staff/staff", "staff": "./components/staff/staff",
"popup": "../../../components/Popup/Popup", "search-input": "../../../components/SearchInput/SearchInput",
"search-input": "../../../components/SearchInput/SearchInput" "accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.webp') no-repeat;
background-size: 100% 486rpx; background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -56,90 +56,4 @@ ...@@ -56,90 +56,4 @@
.navigation-title .move { .navigation-title .move {
transform: rotate(-180deg) translateY(0); transform: rotate(-180deg) translateY(0);
}
.search-box {
width: 100%;
height: 104rpx;
padding-left: 32rpx;
// margin-top: 20rpx;
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
}
.search-box .search-input {
background: #F7F8FA;
border-radius: 38rpx;
width: 606rpx;
height: 72rpx;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
font-size: 32rpx;
color: #858A94;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.itemCon {
box-sizing: border-box;
width: 100%;
// background-color: #fff;
height: 80rpx;
color: #323436;
line-height: 80rpx;
padding: 0 32rpx;
}
.active {
// color: aqua;
background: #F0F7FF;
font-size: 28rpx;
color: #3666FE;
} }
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/output.wxml --> <!-- pages/tab/output/output.wxml -->
<!-- <navigation-bar navStyle="{{navStyle}}">服务商账号名称</navigation-bar>
<view class="layout">
</view> -->
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady"> <navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">
<!-- <picker <!-- <picker
range="{{merchantRange}}" range="{{merchantRange}}"
...@@ -11,14 +7,14 @@ ...@@ -11,14 +7,14 @@
bindchange="changePicker" bindchange="changePicker"
bindtap="tapPicker" bindtap="tapPicker"
bindcancel="tapPicker" bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}"> disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title"> <view class="navigation-title" bindtap="tapPicker">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view> <view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}"> <view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="{{${IMG_URL}/output/arrow.png}}" /> <image src="{{IMG_URL}}/output/arrow.png" />
</view>
</view> </view>
</picker> --> </view>
<!-- </picker> -->
</navigation-bar> </navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;"> <view class="layout" style="padding-top:{{tabBarStyle}}px;">
<tab <tab
...@@ -41,52 +37,10 @@ ...@@ -41,52 +37,10 @@
<staff id="staff" /> <staff id="staff" />
</view> </view>
</view> </view>
<!-- title="选择车型" --> <accountSwitchingPop
<popup show="{{popupShow}}" bindconfirm="confirm" height="60%"> wx:if="{{popupShow}}"
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> --> bind:hidePopup="tapPicker"
<view class="search-box"> bind:changeAccount="getMerchantRange"
<view class="search-input"> popShow="{{popupShow}}"
<image src="{{IMG_URL}}/output/searchIcon.png" class="search-icon" /> merchantRange="{{merchantRange}}" />
<input
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">
搜索
<!-- <image class="search-filter" src="/images/filter.png" /> -->
</view>
</view>
</view>
<!-- style="height:0%;" -->
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{merchantList}}" wx:key="index">
<view
class="itemCon {{item.act?'active':''}}"
hidden="{{!item.show}}"
data-index="{{index}}"
bindtap="select">
{{item.merchantName}}
</view>
</block>
</scroll-view>
</popup>
const ISCOMMECTED = Symbol('ISCOMMECTED')
class NetWork {
[ISCOMMECTED] = false;
constructor() {
this.onNetworkStatusChange()
}
/**监听网络变化 */
onNetworkStatusChange() {
wx.onNetworkStatusChange(({
isConnected,
networkType
}) => {
if (!isConnected && !this[ISCOMMECTED]) {
this[ISCOMMECTED] = true
wx.showToast({
icon: 'loading',
title: '网络尚未连接',
mask: true,
duration: 36e3 * 24
})
} else {
if (this[ISCOMMECTED]) {
this[ISCOMMECTED] = false
wx.showLoading()
this.refreshPage()
}
}
})
}
getNetworkType() {
const that = this
return new Promise((resolve, reject) => {
wx.getNetworkType({
success({
networkType
}) {
that[ISCOMMECTED] = networkType == 'none'
resolve(networkType)
},
fail: err => reject(err)
})
})
}
netWorkModal(confirmText = '返回') {
return new Promise((resolve, reject) => {
wx.showModal({
content: '网络尚未连接,请稍后再试',
confirmText,
showCancel: false,
confirmColor: '#3666FE',
success(res) {
if (res.confirm) resolve()
if (res.cancel) reject()
}
})
})
}
/**页面重载 */
refreshPage() {
wx.hideLoading()
wx.showNavigationBarLoading()
const thisPage = wx.$router.getPageInstance(),
{
onLoad,
onShow,
onRoute,
options
} = thisPage
if (onLoad) thisPage.onLoad(options, true)
if (onShow) thisPage.onShow(options, true)
if (onRoute) thisPage.onRoute(options, true)
}
}
export default new NetWork()
\ No newline at end of file \ No newline at end of file
import { import { secretKey, pathEnum, domain, sign } from './http.js'
secretKey, import { getSessionId } from '~/utils/cache/storageApi'
pathEnum, import network from '~/utils/network'
domain,
sign
} from './http.js'
// import util from '../util'
import {
getSessionId
} from '~/utils/cache/storageApi'
/**接口 */ /**接口 */
class Request { class Request {
get(params, returnAll = false) { get(params, returnAll = false) {
...@@ -16,15 +9,17 @@ class Request { ...@@ -16,15 +9,17 @@ class Request {
post(params, returnAll = false) { post(params, returnAll = false) {
return this.request('POST', params, returnAll) return this.request('POST', params, returnAll)
} }
request(RequestMethods, params, returnAll) { async request(RequestMethods, params, returnAll) {
const type = await network.getNetworkType()
if (type == 'none') return
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
let header = let header =
RequestMethods === 'POST' ? RequestMethods === 'POST'
{ ? {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
} : }
{} : {}
let projectName = this.getRopProject(params.method) let projectName = this.getRopProject(params.method)
if (!projectName) projectName = this.getRopProject(params.method) if (!projectName) projectName = this.getRopProject(params.method)
const path = pathEnum[projectName] const path = pathEnum[projectName]
...@@ -39,18 +34,21 @@ class Request { ...@@ -39,18 +34,21 @@ class Request {
success(response) { success(response) {
/**业务代码 */ /**业务代码 */
let { let {
data: { data: { code, message },
code,
message
},
data data
} = response } = response
if (code == 20 || code == 21) { if (code == 20 || code == 21) {
const thisPage = wx.$router.getPageInstance() wx.$storage.rm('sessionId')
if(thisPage.route == 'login/loading/loading') { wx.$storage.rm('userInfo')
const thisPage = wx.$router.getPageInstance(),
autoLoginObject = wx.$storage.get('auto_login_object')
if (thisPage.route == 'login/loading/loading') {
resolve(data) resolve(data)
return return
} else wx.$router.reLaunch('login.index') } else {
if (autoLoginObject) wx.$router.reLaunch('login.loading')
else wx.$router.reLaunch('login.index')
}
} else { } else {
if (returnAll) { if (returnAll) {
resolve(data) resolve(data)
...@@ -112,4 +110,4 @@ class Request { ...@@ -112,4 +110,4 @@ class Request {
return projectName return projectName
} }
} }
export default new Request()
\ No newline at end of file \ No newline at end of file
export default new Request()
...@@ -116,7 +116,6 @@ const clearObjNull = options => { ...@@ -116,7 +116,6 @@ const clearObjNull = options => {
/**获取图片版本号 */ /**获取图片版本号 */
const getImgVersion = () => { const getImgVersion = () => {
return commonApi.getImgVersion()
} }
const Util = { const Util = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!