Commit 32d969da by 前端

fixed

1 parent 323ac314
Showing 102 changed files with 1029 additions and 409 deletions
......@@ -5,21 +5,21 @@ const CODE = {
productCode: 'PC00c3'
}
class outputApi {
/** 获取服务商(生意助手看产值)我的客户页总收益 */
/** 获取服务商(门店助手看产值)我的客户页总收益 */
getMerchantTotal(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.getMerchantTotal',
...data
})
}
/** 分页获取服务商(生意助手看产值)我的客户页数据 */
/** 分页获取服务商(门店助手看产值)我的客户页数据 */
getCustomerPageList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.customerPageList',
...data
})
}
/** 服务商(生意助手看产值)我的客户详情数据 */
/** 服务商(门店助手看产值)我的客户详情数据 */
getCustomerDetail(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.getCustomerDetail',
......@@ -37,7 +37,7 @@ class outputApi {
// true
)
}
/**获取服务商(生意助手看产值)我的门店页数据 */
/**获取服务商(门店助手看产值)我的门店页数据 */
partnerMerchantTotal(data) {
return api.post(
{
......
......@@ -58,7 +58,7 @@ class UsersApi {
return api.post({
method: 'scrm.api.sso.wechat.applets.auth.phone',
...detail,
platformEntrance: 'BUSINESS_ASSISTANT' // 平台标识:生意助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT
platformEntrance: 'BUSINESS_ASSISTANT' // 平台标识:门店助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT
},
true
)
......@@ -168,5 +168,14 @@ class UsersApi {
platformEntrance: 'BUSINESS_ASSISTANT'
})
}
// 登录自动创建服务中心
initServiceCenter(data) {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.init',
...data
}
)
}
}
export default UsersApi
\ No newline at end of file
// app.js
// 初始化sentry
import sentryInit from '~/utils/sentryConfig/sentryInit'
sentryInit()
// import sentryInit from '~/utils/sentryConfig/sentryInit'
// sentryInit()
import util from './utils/util'
import wxApi from './utils/utils_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/viewVideo/index", "pages/viewProd/index", "pages/viewProdBanner/index", "pages/measure/measure/measure", "pages/measure/measureResult/measureResult", "packagesList/activityDetail/activityDetail"],
"requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#5A6066",
"selectedColor": "#3666FE",
"backgroundColor": "#FFFFFF",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/tab/output/output",
"text": "看产值",
"iconPath": "images/output.png",
"selectedIconPath": "images/output_active.png"
},
{
"pagePath": "pages/tab/index/index",
"text": "发现",
"iconPath": "images/home.png",
"selectedIconPath": "images/home_active.png"
},
{
"pagePath": "pages/tab/mine/mine",
"text": "个人中心",
"iconPath": "images/mine.png",
"selectedIconPath": "images/mine_active.png"
}
]
},
"subpackages": [
"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/viewVideo/index",
"pages/viewProd/index",
"pages/viewProdBanner/index",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"packagesList/activityDetail/activityDetail",
"packageOutput/pages/boutique/poutique"
],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#5A6066",
"selectedColor": "#3666FE",
"backgroundColor": "#FFFFFF",
"borderStyle": "white",
"list": [
{
"root": "packagesList/pages",
"name": "packagesList",
"pages": ["videoDetal/videoDetal", "productDetail/productDetail", "scenarioDetail/scenarioDetail"]
"pagePath": "pages/tab/output/output",
"text": "看产值",
"iconPath": "images/output.png",
"selectedIconPath": "images/output_active.png"
},
{
"root": "packagesList/packageOutput",
"name": "packageOutput",
"pages": ["pages/openBusiness", "pages/summary"]
"pagePath": "pages/tab/index/index",
"text": "发现",
"iconPath": "images/home.png",
"selectedIconPath": "images/home_active.png"
},
{
"root": "packagesList/mineDetail",
"name": "mineDetail",
"pages": ["pages/messageBox", "pages/customerManagement", "pages/clue"]
},
{
"root": "packagesList/apply",
"name": "apply",
"pages": ["pages/apply"]
},
{
"root": "packagesList/applyProd",
"name": "applyProd",
"pages": ["pages/apply"]
}
],
"preloadRule": {
"pages/tab/mine/mine": {
"network": "all",
"packages": ["mineDetail"]
},
"pages/tab/index/index": {
"network": "all",
"packages": ["apply", "packageOutput"]
"pagePath": "pages/tab/mine/mine",
"text": "个人中心",
"iconPath": "images/mine.png",
"selectedIconPath": "images/mine_active.png"
}
]
},
"subpackages": [
{
"root": "packagesList/pages",
"name": "packagesList",
"pages": [
"videoDetal/videoDetal",
"productDetail/productDetail",
"scenarioDetail/scenarioDetail"
]
},
"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",
"glsx-image": "/components/image/index"
{
"root": "packagesList/packageOutput",
"name": "packageOutput",
"pages": [
"pages/openBusiness",
"pages/summary"
]
},
"resolveAlias": {
"~/*": "/*"
{
"root": "packagesList/mineDetail",
"name": "mineDetail",
"pages": [
"pages/messageBox",
"pages/customerManagement",
"pages/clue"
]
},
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
{
"root": "packagesList/apply",
"name": "apply",
"pages": [
"pages/apply"
]
},
{
"root": "packagesList/applyProd",
"name": "applyProd",
"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",
"glsx-image": "/components/image/index",
"f2": "@antv/wx-f2",
"ff-canvas": "@antv/f2-canvas"
},
"resolveAlias": {
"~/*": "/*"
},
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
}
\ No newline at end of file
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ page {
color: #282829;
font-size: 28rpx;
--themeColor: #F13C3D;
--btnColor: #3666FE;
--btnColor: linear-gradient(-84deg, #556AF5 0%, #7197FF 100%);
--borderRadius: 8rpx;
--margin: 32rpx;
/* vant 样式覆盖 */
......
......@@ -24,7 +24,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
font-weight: 600;
box-sizing: border-box;
text-align: center;
letter-spacing: 1rpx;
......

2.64 KB | W: | H:

2.02 KB | W: | H:

images/home.png
images/home.png
images/home.png
images/home.png
  • 2-up
  • Swipe
  • Onion skin

2.88 KB | W: | H:

3.5 KB | W: | H:

images/home_active.png
images/home_active.png
images/home_active.png
images/home_active.png
  • 2-up
  • Swipe
  • Onion skin

2.59 KB | W: | H:

2.02 KB | W: | H:

images/mine.png
images/mine.png
images/mine.png
images/mine.png
  • 2-up
  • Swipe
  • Onion skin

2.84 KB | W: | H:

3.41 KB | W: | H:

images/mine_active.png
images/mine_active.png
images/mine_active.png
images/mine_active.png
  • 2-up
  • Swipe
  • Onion skin

876 Bytes | W: | H:

1.67 KB | W: | H:

images/output.png
images/output.png
images/output.png
images/output.png
  • 2-up
  • Swipe
  • Onion skin

1.1 KB | W: | H:

2.7 KB | W: | H:

images/output_active.png
images/output_active.png
images/output_active.png
images/output_active.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -30,12 +30,19 @@ Component({
// password: 'bb123456'
},
phoneReady: false,
countDown: null
countDown: null,
agree: false
},
/**
* 组件的方法列表
*/
methods: {
authChoose(e) {
let { detail: agree } = e
this.setData({
agree
})
},
/**隐藏验证码错误 */
hideError(name) {
if (name == 'code')
......@@ -129,8 +136,19 @@ Component({
showPwd: !this.data.showPwd
})
},
checkAgree() {
let { agree } = this.data
console.log('agree', agree)
if (!agree) {
wx.$api.showToast('请同意用户协议')
return true
}
return false
},
/**手机号&帐号密码登录 */
login() {
const checkAgree = this.checkAgree()
if (checkAgree) return false
const { formData, loginType } = this.data,
target = {
1: 'phoneSmsLogin',
......
{
"component": true,
"usingComponents": {
"input-icon":"../InputIcon/InputIcon"
"input-icon": "../InputIcon/InputIcon",
"auth-setting": "../authSetting/authSetting"
}
}
\ No newline at end of file
}
......@@ -4,30 +4,31 @@
.title {
font-weight: 600;
font-size: 60rpx;
color: #323436;
color: #333333;
padding: 216rpx 0 24rpx;
}
.subtitle {
font-size: 44rpx;
font-size: 48rpx;
color: #323436;
margin-bottom: 120rpx;
margin-bottom: 60rpx;
}
.img {
width: 378rpx;
height: 364rpx;
width: 480rpx;
height: 480rpx;
display: block;
margin: 0 auto;
margin: 0 auto 40rpx;
}
}
.opacity-view {
animation: opacity-view .5s forwards;
// animation: opacity-view .5s forwards;
}
.box {
z-index: 100;
// height: 800rpx;
height: 750rpx;
......@@ -67,14 +68,14 @@
.sms {
width: 160rpx;
flex-shrink: 0;
color: #5092FF;
color: #CCCED1;
font-size: 24rpx;
padding: 0;
text-align: right;
transition: all .25s;
&[disabled]:not([type]) {
color: #CCCED1;
border: none;
&.click-sms {
color: #5092FF;
}
}
......
<block wx:if="{{loginType == 0}}">
<view class="wx opacity-view">
<view class="title">
您好
</view>
<view class="subtitle">
欢迎登录生意助手
</view>
<image webp class="img" src="{{IMGURL}}login/login-2.webp" />
</view>
<view class="wx opacity-view">
<view class="title">
您好
</view>
<view class="subtitle">
欢迎登录门店助手
</view>
<image webp class="img" src="{{IMG_URL_STORE}}/login/login-logo.png" />
</view>
</block>
<block wx:else>
<view class="box">
<view class="input-box opacity-view">
<view class="title">{{loginType == 1?'手机号':'账号'}}登录</view>
<block wx:if="{{loginType == 1}}">
<view class="input">
<input type="number" placeholder="填写手机号" placeholder-class="placeholder" bindinput="input" data-name="phone" value="{{formData.phone}}" maxlength="11" />
<input-icon show="{{formData.phone}}" bindtap="clear" data-name="phone" />
</view>
<view class="input">
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" bindinput="input" data-name="code" value="{{formData.code}}" maxlength="4" />
<input-icon show="{{formData.code}}" bindtap="clear" data-name="code" />
<button class="sms text-center " bindtap="getSmsCode" disabled="{{count || !phoneReady}}" loading="{{smsLoading}}">{{
count? count + 's':'获取验证码'
}}</button>
<block wx:if="{{smsError}}">
<view class="error">验证码错误</view>
</block>
</view>
</block>
<block wx:else>
<view class="input">
<input type="text" placeholder="填写账号" placeholder-class="placeholder" bindinput="input" data-name="account" value="{{formData.account}}" maxlength="15" />
<input-icon show="{{formData.account}}" bindtap="clear" data-name="account" />
</view>
<view class="input">
<input type="text" placeholder="填写密码" placeholder-class="placeholder" bindinput="input" data-name="password" value="{{formData.password}}" maxlength="20" password='{{!showPwd}}' />
<input-icon show bindtap="pwdSwitch" type="{{showPwd?'showPwd':'hidePwd'}}" />
<input-icon show="{{formData.password}}" bindtap="clear" data-name="password" />
</view>
</block>
</view>
</view>
<view class="box">
<view class="input-box opacity-view">
<view class="title">{{loginType == 1?'手机号':'账号'}}登录</view>
<block wx:if="{{loginType == 1}}">
<view class="input">
<input
type="number"
placeholder="填写手机号"
placeholder-class="placeholder"
bindinput="input"
data-name="phone"
value="{{formData.phone}}"
maxlength="11" />
<input-icon show="{{formData.phone}}" bindtap="clear" data-name="phone" />
</view>
<view class="input">
<input
type="number"
placeholder="填写验证码"
placeholder-class="placeholder"
bindinput="input"
data-name="code"
value="{{formData.code}}"
maxlength="4" />
<input-icon show="{{formData.code}}" bindtap="clear" data-name="code" />
<view
class="sms text-center {{(!count&&phoneReady)?'click-sms':''}}"
bindtap="getSmsCode"
loading="{{smsLoading}}">{{
count? count + 's':'获取验证码'
}}
</view>
<block wx:if="{{smsError}}">
<view class="error">验证码错误</view>
</block>
</view>
</block>
<block wx:else>
<view class="input">
<input
type="text"
placeholder="填写账号"
placeholder-class="placeholder"
bindinput="input"
data-name="account"
value="{{formData.account}}"
maxlength="15" />
<input-icon show="{{formData.account}}" bindtap="clear" data-name="account" />
</view>
<view class="input">
<input
type="text"
placeholder="填写密码"
placeholder-class="placeholder"
bindinput="input"
data-name="password"
value="{{formData.password}}"
maxlength="20"
password='{{!showPwd}}' />
<input-icon show bindtap="pwdSwitch" type="{{showPwd?'showPwd':'hidePwd'}}" />
<input-icon show="{{formData.password}}" bindtap="clear" data-name="password" />
</view>
</block>
</view>
</view>
</block>
<block wx:if="{{loginType == 0}}">
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="wxLogin" loading="{{loading}}">微信登录</button>
<block wx:if="{{loginType == 0 &&agree}}">
<button
class="button"
disabled="{{disabled}}"
hover-class="btn-hover"
open-type="getPhoneNumber"
bindgetphonenumber="wxLogin"
loading="{{loading}}">微信登录
</button>
</block>
<block wx:else>
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" bindtap="login" loading="{{loading}}">登录</button>
</block>
\ No newline at end of file
<button
class="button"
disabled="{{disabled}}"
hover-class="btn-hover"
bindtap="login"
loading="{{loading}}">登录
</button>
</block>
<auth-setting bind:choose="authChoose" />
......@@ -17,7 +17,7 @@
align-items: center;
flex-direction: column;
width: 100rpx;
animation: btn-move .25s forwards;
// animation: btn-move .25s forwards;
margin:0 79rpx;
.icon {
width: 68rpx;
......
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')
// var appInstance = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
// auth: {
// type: Boolean,
// value: true,
// observer: function (newVal, oldVal) {
// this.getHeadImage()
// }
// },
// type: {
// type: Boolean,
// value: true
// },
// special: {
// type: Boolean,
// value: false
// },
// index: {
// type: Boolean,
// value: false
// }
},
/**
* 组件的初始数据
*/
data: {
agree: false
// auth: true,
// type: true,
// appLogo: '',
// appName: '',
// merchantName: '',
// gender: 1
},
ready() {
// this.getHeadImage()
},
/**
* 组件的方法列表
*/
methods: {
choose() {
this.setData({
agree: !this.data.agree
})
this.triggerEvent('choose', this.data.agree)
},
jump(e) {
console.log(e)
let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
noScroll() {}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='tips'>
<view class='choose-box' bindtap="choose">
<view class='icon'>
<image src="{{agree?'./images/ok.png':'./images/box.png'}}" class='check-img' />
</view>
</view>
阅读并同意以下协议
<!-- <text catchtap="jump" data-url="agree">《服务协议》</text> -->
<text catchtap="jump" data-url="privacy">《隐私协议》</text>
<text catchtap="jump" data-url="agreement">《用户协议》</text>
</view>
/* components/authSetting/authSetting.wxss */
.tips {
position: fixed;
width: 100%;
left: 0;
bottom: 60rpx;
font-size: 24rpx;
color: #999;
letter-spacing: 2rpx;
padding-left: 28rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.tips text {
color: #4466F0;
}
.tips .icon {
position: absolute;
top: 50%;
left: 50%;
width: 24rpx;
height: 24rpx;
border-radius: 2rpx;
box-sizing: border-box;
transform: translate(-50%, -50%);
}
.tips .icon .check-img {
vertical-align: top;
width: 100%;
height: 100%;
}
.tips .choose-box {
width: 80rpx;
height: 80rpx;
position: relative;
}
\ No newline at end of file
......@@ -28,7 +28,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow(options, refresh) {
1
if (refresh) {
this.setData({
disabled: true
......
......@@ -8,4 +8,4 @@
},
"navigationStyle": "custom",
"disableScroll": true
}
\ No newline at end of file
}
.layout {
position: relative;
padding: 0 80rpx;
padding: 0 95rpx;
font-size: 24rpx;
color: #8A8C90;
// background: #FAFBFF;
// z-index: -2;
&::before {
content: '';
width: 100%;
height: 264rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg-top.webp') no-repeat;
background-size: 100% 264rpx;
height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-top.webp') no-repeat;
background-size: 100% 864rpx;
position: fixed;
left: 0;
top: 0;
......@@ -17,9 +19,9 @@
&::after {
content: '';
width: 100%;
height: 472rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg-bottom.webp') no-repeat;
background-size: 100% 472rpx;
height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-bottom.webp') no-repeat;
background-size: 100% 864rpx;
position: fixed;
left: 0;
bottom: 0;
......
<view class="layout">
<mask show="{{loading}}"></mask>
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">门店助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
<agree show="{{loginType == 2}}" text="7天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
<agree show="{{loginType == 2}}" text="30天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
<type-list loginType="{{loginType}}" />
</view>
\ No newline at end of file
......@@ -43,10 +43,15 @@ const setLoginInfo = (userInfo, sessionId) => {
wx.$api.showToast('仅支持服务商类型账户登录')
return
}
// 自动创建服务中心
initServiceCenter()
setUserInfo(userInfo)
setSessionId(sessionId)
loginSuccess()
}
const initServiceCenter = () => {
USERAPI.initServiceCenter({})
}
/**成功跳转 */
const loginSuccess = () => {
const {
......@@ -105,5 +110,6 @@ module.exports = {
loginSuccess,
setRouteData,
setLoginInfo,
loginModal
loginModal,
initServiceCenter
}
\ No newline at end of file
......@@ -94,7 +94,7 @@ Page({
wx.nextTick(() => {
const sessionId = getSessionId(),
{ url, targetPath = url ? decodeURIComponent(url) : '' } = this.options
let path = 'pages.index',
let path = 'pages.output',
obj = {}
if (targetPath) obj.targetPath = targetPath
if (sessionId) {
......
......@@ -54,12 +54,12 @@
type="danger"
color="{{ color }}"
custom-class="van-calendar__confirm"
disabled="{{ computed.getButtonDisabled(type, currentDate) }}"
disabled="{{ computed.getButtonDisabled(type, currentDate, minRange) }}"
nativeType="text"
bind:click="onConfirm"
>
{{
computed.getButtonDisabled(type, currentDate)
computed.getButtonDisabled(type, currentDate, minRange)
? confirmDisabledText
: confirmText
}}
......
......@@ -119,6 +119,10 @@ var getTime = function (date) {
type: null,
value: null,
},
minRange: {
type: Number,
value: 1,
},
firstDayOfWeek: {
type: Number,
value: 0,
......@@ -180,7 +184,7 @@ var getTime = function (date) {
getInitialDate: function (defaultDate) {
var _this = this;
if (defaultDate === void 0) { defaultDate = null; }
var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate;
var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, allowSameDay = _a.allowSameDay;
var now = (0, utils_1.getToday)().getTime();
if (type === 'range') {
if (!Array.isArray(defaultDate)) {
......@@ -188,7 +192,8 @@ var getTime = function (date) {
}
var _b = defaultDate || [], startDay = _b[0], endDay = _b[1];
var start = this.limitDateRange(startDay || now, minDate, (0, utils_1.getPrevDay)(new Date(maxDate)).getTime());
var end = this.limitDateRange(endDay || now, (0, utils_1.getNextDay)(new Date(minDate)).getTime());
var date = getTime(endDay || now);
var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime());
return [start, end];
}
if (type === 'multiple') {
......@@ -262,7 +267,7 @@ var getTime = function (date) {
this.select([date, null]);
}
else if (allowSameDay) {
this.select([date, date]);
this.select([date, date], true);
}
}
else {
......
......@@ -12,6 +12,7 @@
position="{{ position }}"
closeable="{{ showTitle || showSubtitle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
bind:enter="onOpen"
bind:close="onClose"
bind:after-enter="onOpened"
......
......@@ -15,7 +15,7 @@ function getMonths(minDate, maxDate) {
return months;
}
function getButtonDisabled(type, currentDate) {
function getButtonDisabled(type, currentDate, minRange) {
if (currentDate == null) {
return true;
}
......@@ -25,7 +25,7 @@ function getButtonDisabled(type, currentDate) {
}
if (type === 'multiple') {
return !currentDate.length;
return currentDate.length < minRange;
}
return !currentDate;
......
/// <reference types="miniprogram-api-typings" />
declare type CanvasContext = WechatMiniprogram.CanvasContext;
type CanvasContext = WechatMiniprogram.CanvasContext;
export declare function adaptor(ctx: CanvasContext & Record<string, unknown>): CanvasContext;
export {};
......@@ -14,6 +14,7 @@ function VantComponent(vantOptions) {
mapKeys(vantOptions, options, {
data: 'data',
props: 'properties',
watch: 'observers',
mixins: 'behaviors',
methods: 'methods',
beforeCreate: 'created',
......
/// <reference types="miniprogram-api-typings" />
declare type TrivialInstance = WechatMiniprogram.Component.TrivialInstance;
type TrivialInstance = WechatMiniprogram.Component.TrivialInstance;
export declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): {
relations: {
[x: string]: WechatMiniprogram.Component.RelationOption;
......
......@@ -8,7 +8,7 @@ export { getSystemInfoSync } from './version';
export declare function range(num: number, min: number, max: number): number;
export declare function nextTick(cb: (...args: any[]) => void): void;
export declare function addUnit(value?: string | number): string | undefined;
export declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout | WechatMiniprogram.NodesRef;
export declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout;
export declare function pickExclude(obj: unknown, keys: string[]): {};
export declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
......
......@@ -31,19 +31,9 @@ function addUnit(value) {
}
exports.addUnit = addUnit;
function requestAnimationFrame(cb) {
var systemInfo = (0, version_1.getSystemInfoSync)();
if (systemInfo.platform === 'devtools') {
return setTimeout(function () {
cb();
}, 1000 / 30);
}
return wx
.createSelectorQuery()
.selectViewport()
.boundingClientRect()
.exec(function () {
return setTimeout(function () {
cb();
});
}, 1000 / 30);
}
exports.requestAnimationFrame = requestAnimationFrame;
function pickExclude(obj, keys) {
......
export declare type TimeData = {
export type TimeData = {
days: number;
hours: number;
minutes: number;
......
......@@ -5,7 +5,7 @@ interface VantComponentInstance {
index: number;
$emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
}
export declare type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
export type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
data?: Data;
field?: boolean;
classes?: string[];
......@@ -15,6 +15,7 @@ export declare type VantComponentOptions<Data extends WechatMiniprogram.Componen
relations: Record<string, WechatMiniprogram.Component.RelationOption>;
mixin: string;
};
watch?: Record<string, (...args: any[]) => any>;
methods?: Methods;
beforeCreate?: () => void;
created?: () => void;
......
/// <reference types="miniprogram-api-typings" />
/// <reference types="miniprogram-api-typings" />
export declare type Action = 'confirm' | 'cancel' | 'overlay';
declare type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
export type Action = 'confirm' | 'cancel' | 'overlay';
type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
interface DialogOptions {
lang?: string;
show?: boolean;
......@@ -14,6 +14,9 @@ interface DialogOptions {
overlay?: boolean;
selector?: string;
ariaLabel?: string;
/**
* @deprecated use custom-class instead
*/
className?: string;
customStyle?: string;
transition?: string;
......
......@@ -5,7 +5,7 @@
z-index="{{ zIndex }}"
overlay="{{ overlay }}"
transition="{{ transition }}"
custom-class="van-dialog van-dialog--{{ theme }} {{ className }}"
custom-class="van-dialog van-dialog--{{ theme }}{{ className }} custom-class"
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
......@@ -69,7 +69,7 @@
</van-goods-action-button>
</van-goods-action>
<view wx:else class="van-hairline--top van-dialog__footer">
<view wx:elif="{{ showCancelButton || showConfirmButton }}" class="van-hairline--top van-dialog__footer">
<van-button
wx:if="{{ showCancelButton }}"
size="large"
......
......@@ -28,12 +28,21 @@ var component_1 = require("../common/component");
observer: 'rerender',
},
popupStyle: String,
useBeforeToggle: {
type: Boolean,
value: false,
},
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
transition: true,
showPopup: false,
showWrapper: false,
displayTitle: '',
safeAreaTabBar: false,
},
methods: {
rerender: function () {
......@@ -45,13 +54,14 @@ var component_1 = require("../common/component");
},
updateDataFromParent: function () {
if (this.parent) {
var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction;
var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction, safeAreaTabBar = _a.safeAreaTabBar;
this.setData({
overlay: overlay,
duration: duration,
activeColor: activeColor,
closeOnClickOverlay: closeOnClickOverlay,
direction: direction,
safeAreaTabBar: safeAreaTabBar,
});
}
},
......@@ -81,7 +91,6 @@ var component_1 = require("../common/component");
},
toggle: function (show, options) {
var _this = this;
var _a;
if (options === void 0) { options = {}; }
var showPopup = this.data.showPopup;
if (typeof show !== 'boolean') {
......@@ -90,19 +99,38 @@ var component_1 = require("../common/component");
if (show === showPopup) {
return;
}
this.setData({
transition: !options.immediate,
showPopup: show,
});
if (show) {
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then(function (wrapperStyle) {
_this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });
_this.rerender();
this.onBeforeToggle(show).then(function (status) {
var _a;
if (!status) {
return;
}
_this.setData({
transition: !options.immediate,
showPopup: show,
});
if (show) {
(_a = _this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then(function (wrapperStyle) {
_this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });
_this.rerender();
});
}
else {
_this.rerender();
}
});
},
onBeforeToggle: function (status) {
var _this = this;
var useBeforeToggle = this.data.useBeforeToggle;
if (!useBeforeToggle) {
return Promise.resolve(true);
}
else {
this.rerender();
}
return new Promise(function (resolve) {
_this.$emit('before-toggle', {
status: status,
callback: function (value) { return resolve(value); },
});
});
},
},
});
......@@ -12,7 +12,9 @@
overlay="{{ overlay }}"
position="{{ direction === 'down' ? 'top' : 'bottom' }}"
duration="{{ transition ? duration : 0 }}"
safe-area-tab-bar="{{ safeAreaTabBar }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
rootPortal="{{ rootPortal }}"
bind:enter="onOpen"
bind:leave="onClose"
bind:close="toggle"
......
......@@ -34,6 +34,10 @@ var ARRAY = [];
value: 'down',
observer: 'updateChildrenData',
},
safeAreaTabBar: {
type: Boolean,
value: false,
},
closeOnClickOverlay: {
type: Boolean,
value: true,
......
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
\ No newline at end of file
@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 24px 0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:11px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
\ No newline at end of file
......@@ -35,6 +35,9 @@ var props_1 = require("./props");
}, clearIcon: {
type: String,
value: 'clear',
}, extraEventParams: {
type: Boolean,
value: false,
} }),
data: {
focused: false,
......@@ -50,7 +53,7 @@ var props_1 = require("./props");
var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;
this.value = value;
this.setShowClear();
this.emitChange();
this.emitChange(event.detail);
},
onFocus: function (event) {
this.focused = true;
......@@ -74,7 +77,7 @@ var props_1 = require("./props");
this.value = '';
this.setShowClear();
(0, utils_1.nextTick)(function () {
_this.emitChange();
_this.emitChange({ value: '' });
_this.$emit('clear', '');
});
},
......@@ -90,7 +93,7 @@ var props_1 = require("./props");
if (value === '') {
this.setData({ innerValue: '' });
}
this.emitChange();
this.emitChange({ value: value });
},
onLineChange: function (event) {
this.$emit('linechange', event.detail);
......@@ -98,12 +101,14 @@ var props_1 = require("./props");
onKeyboardHeightChange: function (event) {
this.$emit('keyboardheightchange', event.detail);
},
emitChange: function () {
emitChange: function (detail) {
var _this = this;
this.setData({ value: this.value });
var extraEventParams = this.data.extraEventParams;
this.setData({ value: detail.value });
(0, utils_1.nextTick)(function () {
_this.$emit('input', _this.value);
_this.$emit('change', _this.value);
var data = extraEventParams ? detail : detail.value;
_this.$emit('input', data);
_this.$emit('change', data);
});
},
setShowClear: function () {
......
......@@ -11,6 +11,7 @@ var link_1 = require("../mixins/link");
dot: Boolean,
info: String,
icon: String,
color: String,
classPrefix: {
type: String,
value: 'van-icon',
......
......@@ -27,6 +27,7 @@
name="{{ icon }}"
dot="{{ dot }}"
info="{{ info }}"
color="{{ color }}"
class-prefix="{{ classPrefix }}"
class="van-goods-action-icon__icon"
custom-class="icon-class"
......
......@@ -13,6 +13,10 @@ function rootClass(data) {
classes.push(data.classPrefix);
}
if (data.classPrefix !== 'van-icon') {
classes.push('van-icon')
}
if (isImage(data.name)) {
classes.push('van-icon--image');
} else if (data.classPrefix != null) {
......
......@@ -27,6 +27,10 @@ var button_1 = require("../mixins/button");
type: String,
value: 'fill',
},
webp: {
type: Boolean,
value: false,
},
showError: {
type: Boolean,
value: true,
......
......@@ -11,6 +11,7 @@
src="{{ src }}"
mode="{{ computed.mode(fit) }}"
lazy-load="{{ lazyLoad }}"
webp="{{ webp }}"
class="image-class van-image__img"
show-menu-by-longpress="{{ showMenuByLongpress }}"
bind:load="onLoad"
......
/// <reference types="miniprogram-api-typings" />
/// <reference types="miniprogram-api-typings" />
declare type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
declare type Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;
type IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;
type Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;
export declare function pageScrollMixin(scroller: Scroller): string;
export {};
......@@ -21,7 +21,7 @@ function pageScrollMixin(scroller) {
}
var _scroller = scroller.bind(this);
var _a = page.vanPageScroller, vanPageScroller = _a === void 0 ? [] : _a;
if (!vanPageScroller.length && (0, validator_1.isFunction)(page.onPageScroll)) {
if ((0, validator_1.isFunction)(page.onPageScroll) && page.onPageScroll !== onPageScroll) {
vanPageScroller.push(page.onPageScroll.bind(page));
}
vanPageScroller.push(_scroller);
......
......@@ -53,6 +53,9 @@ function transition(showDefaultValue) {
var _a = this.data, duration = _a.duration, name = _a.name;
var classNames = getClassNames(name);
var currentDuration = (0, validator_1.isObj)(duration) ? duration.enter : duration;
if (this.status === 'enter') {
return;
}
this.status = 'enter';
this.$emit('before-enter');
(0, utils_1.requestAnimationFrame)(function () {
......
......@@ -17,6 +17,10 @@ var component_1 = require("../common/component");
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onClick: function () {
......
<van-transition
wx:if="{{ lockScroll }}"
show="{{ show }}"
custom-class="van-overlay custom-class"
custom-style="z-index: {{ zIndex }}; {{ customStyle }}"
duration="{{ duration }}"
bind:tap="onClick"
catch:touchmove="noop"
>
<slot></slot>
</van-transition>
<van-transition
wx:else
show="{{ show }}"
custom-class="van-overlay custom-class"
custom-style="z-index: {{ zIndex }}; {{ customStyle }}"
duration="{{ duration }}"
bind:tap="onClick"
>
<slot></slot>
</van-transition>
<import src="./overlay.wxml" />
<root-portal wx:if="{{ rootPortal }}">
<include src="./overlay.wxml" />
</root-portal>
<include wx:else src="./overlay.wxml" />
......@@ -55,10 +55,18 @@ var transition_1 = require("../mixins/transition");
type: Boolean,
value: false,
},
safeAreaTabBar: {
type: Boolean,
value: false,
},
lockScroll: {
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
created: function () {
this.observeClass();
......
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<import src="./popup.wxml" />
<van-overlay
wx:if="{{ overlay }}"
show="{{ show }}"
......@@ -9,18 +11,11 @@
duration="{{ duration }}"
bind:click="onClickOverlay"
lock-scroll="{{ lockScroll }}"
root-portal="{{ rootPortal }}"
/>
<view
wx:if="{{ inited }}"
class="custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop }]) }}"
style="{{ computed.popupStyle({ zIndex, currentDuration, display, customStyle }) }}"
bind:transitionend="onTransitionEnd"
>
<slot />
<van-icon
wx:if="{{ closeable }}"
name="{{ closeIcon }}"
class="close-icon-class van-popup__close-icon van-popup__close-icon--{{ closeIconPosition }}"
bind:tap="onClickCloseIcon"
/>
</view>
<root-portal wx:if="{{ rootPortal }}">
<include src="./popup.wxml" />
</root-portal>
<include wx:else src="./popup.wxml" />
@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}
\ No newline at end of file
@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:1em}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}
\ No newline at end of file
@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}
\ No newline at end of file
......@@ -48,6 +48,6 @@
hover-stay-time="70"
>
<slot wx:if="{{ useActionSlot }}" name="action" />
<view wx:else bind:tap="onCancel" class="cancel-class">{{ actionText }}</view>
<view wx:else bind:tap="onCancel" class="van-search__action-button cancel-class">{{ actionText }}</view>
</view>
</view>
@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-action-padding,0 8px)}.van-search__action--hover{background-color:#f2f3f5}
\ No newline at end of file
@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px)}.van-search__action--hover{background-color:#f2f3f5}.van-search__action-button{padding:var(--search-action-padding,0 8px)}
\ No newline at end of file
......@@ -4,6 +4,11 @@ var component_1 = require("../common/component");
var touch_1 = require("../mixins/touch");
var version_1 = require("../common/version");
var utils_1 = require("../common/utils");
var DRAG_STATUS = {
START: 'start',
MOVING: 'moving',
END: 'end',
};
(0, component_1.VantComponent)({
mixins: [touch_1.touch],
props: {
......@@ -57,17 +62,17 @@ var utils_1 = require("../common/utils");
else {
this.startValue = this.format(this.newValue);
}
this.dragStatus = 'start';
this.dragStatus = DRAG_STATUS.START;
},
onTouchMove: function (event) {
var _this = this;
if (this.data.disabled)
return;
if (this.dragStatus === 'start') {
if (this.dragStatus === DRAG_STATUS.START) {
this.$emit('drag-start');
}
this.touchMove(event);
this.dragStatus = 'draging';
this.dragStatus = DRAG_STATUS.MOVING;
(0, utils_1.getRect)(this, '.van-slider').then(function (rect) {
var vertical = _this.data.vertical;
var delta = vertical ? _this.deltaY : _this.deltaX;
......@@ -84,11 +89,15 @@ var utils_1 = require("../common/utils");
});
},
onTouchEnd: function () {
var _this = this;
if (this.data.disabled)
return;
if (this.dragStatus === 'draging') {
this.updateValue(this.newValue, true);
this.$emit('drag-end');
if (this.dragStatus === DRAG_STATUS.MOVING) {
this.dragStatus = DRAG_STATUS.END;
(0, utils_1.nextTick)(function () {
_this.updateValue(_this.newValue, true);
_this.$emit('drag-end');
});
}
},
onClick: function (event) {
......@@ -164,7 +173,7 @@ var utils_1 = require("../common/utils");
getOffsetWidth: function (current, min) {
var scope = this.getScope();
// 避免最小值小于最小step时出现负数情况
return "".concat(Math.max((current - min) * 100 / scope, 0), "%");
return "".concat(Math.max(((current - min) * 100) / scope, 0), "%");
},
// 计算选中条的长度百分比
calcMainAxis: function () {
......
......@@ -29,7 +29,6 @@ function equal(value1, value2) {
props: {
value: {
type: null,
observer: 'observeValue',
},
integer: {
type: Boolean,
......@@ -79,6 +78,11 @@ function equal(value1, value2) {
data: {
currentValue: '',
},
watch: {
value: function () {
this.observeValue();
},
},
created: function () {
this.setData({
currentValue: this.format(this.data.value),
......@@ -86,10 +90,8 @@ function equal(value1, value2) {
},
methods: {
observeValue: function () {
var _a = this.data, value = _a.value, currentValue = _a.currentValue;
if (!equal(value, currentValue)) {
this.setData({ currentValue: this.format(value) });
}
var value = this.data.value;
this.setData({ currentValue: this.format(value) });
},
check: function () {
var val = this.format(this.data.currentValue);
......@@ -109,6 +111,7 @@ function equal(value1, value2) {
},
onBlur: function (event) {
var value = this.format(event.detail.value);
this.setData({ currentValue: value });
this.emitChange(value);
this.$emit('blur', __assign(__assign({}, event.detail), { value: value }));
},
......
......@@ -16,7 +16,6 @@
<slot name="minus" />
</view>
<input
always-embed="{{ false }}"
type="{{ integer ? 'number' : 'digit' }}"
class="input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}"
style="{{ computed.inputStyle({ buttonSize, inputWidth }) }}"
......
......@@ -20,7 +20,7 @@
wx:if="{{ item.inactiveIcon || inactiveIcon }}"
color="{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}"
name="{{ item.inactiveIcon || inactiveIcon }}"
custom-class="van-step__icon"
class="van-step__icon"
/>
<view
wx:else
......@@ -29,7 +29,7 @@
/>
</block>
<van-icon wx:else name="{{ item.activeIcon || activeIcon }}" color="{{ activeColor }}" custom-class="van-step__icon" />
<van-icon wx:else name="{{ item.activeIcon || activeIcon }}" color="{{ activeColor }}" class="van-step__icon" />
</view>
<view
wx:if="{{ index !== steps.length - 1 }}"
......
......@@ -8,6 +8,14 @@ var relation_1 = require("../common/relation");
name: null,
icon: String,
dot: Boolean,
url: {
type: String,
value: '',
},
linkType: {
type: String,
value: 'redirectTo',
},
iconPrefix: {
type: String,
value: 'van-icon',
......@@ -29,6 +37,10 @@ var relation_1 = require("../common/relation");
parent.$emit('change', active);
}
}
var _a = this.data, url = _a.url, linkType = _a.linkType;
if (url && wx[linkType]) {
return wx[linkType]({ url: url });
}
this.$emit('click');
},
updateFromParent: function () {
......
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
var touch_1 = require("../mixins/touch");
......@@ -7,7 +18,13 @@ var validator_1 = require("../common/validator");
var relation_1 = require("../common/relation");
(0, component_1.VantComponent)({
mixins: [touch_1.touch],
classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'],
classes: [
'nav-class',
'tab-class',
'tab-active-class',
'line-class',
'wrap-class',
],
relation: (0, relation_1.useChildren)('tab', function () {
this.updateTabs();
}),
......@@ -78,6 +95,10 @@ var relation_1 = require("../common/relation");
type: Boolean,
value: true,
},
useBeforeChange: {
type: Boolean,
value: false,
},
},
data: {
tabs: [],
......@@ -88,6 +109,7 @@ var relation_1 = require("../common/relation");
skipTransition: true,
scrollWithAnimation: false,
lineOffsetLeft: 0,
inited: false,
},
mounted: function () {
var _this = this;
......@@ -111,15 +133,11 @@ var relation_1 = require("../common/relation");
},
trigger: function (eventName, child) {
var currentIndex = this.data.currentIndex;
var currentChild = child || this.children[currentIndex];
if (!(0, validator_1.isDef)(currentChild)) {
var data = this.getChildData(currentIndex, child);
if (!(0, validator_1.isDef)(data)) {
return;
}
this.$emit(eventName, {
index: currentChild.index,
name: currentChild.getComputedName(),
title: currentChild.data.title,
});
this.$emit(eventName, data);
},
onTap: function (event) {
var _this = this;
......@@ -127,13 +145,14 @@ var relation_1 = require("../common/relation");
var child = this.children[index];
if (child.data.disabled) {
this.trigger('disabled', child);
return;
}
else {
this.setCurrentIndex(index);
this.onBeforeChange(index).then(function () {
_this.setCurrentIndex(index);
(0, utils_1.nextTick)(function () {
_this.trigger('click');
});
}
});
},
// correct the index of active tab
setCurrentIndexByName: function (name) {
......@@ -201,12 +220,13 @@ var relation_1 = require("../common/relation");
.reduce(function (prev, curr) { return prev + curr.width; }, 0);
lineOffsetLeft +=
(rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
_this.setData({ lineOffsetLeft: lineOffsetLeft });
_this.setData({ lineOffsetLeft: lineOffsetLeft, inited: true });
_this.swiping = true;
if (skipTransition) {
(0, utils_1.nextTick)(function () {
// waiting transition end
setTimeout(function () {
_this.setData({ skipTransition: false });
});
}, _this.data.duration);
}
});
},
......@@ -252,14 +272,15 @@ var relation_1 = require("../common/relation");
},
// watch swipe touch end
onTouchEnd: function () {
var _this = this;
if (!this.data.swipeable || !this.swiping)
return;
var _a = this, direction = _a.direction, deltaX = _a.deltaX, offsetX = _a.offsetX;
var minSwipeDistance = 50;
if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
var index = this.getAvaiableTab(deltaX);
if (index !== -1) {
this.setCurrentIndex(index);
var index_1 = this.getAvaiableTab(deltaX);
if (index_1 !== -1) {
this.onBeforeChange(index_1).then(function () { return _this.setCurrentIndex(index_1); });
}
}
this.swiping = false;
......@@ -278,5 +299,26 @@ var relation_1 = require("../common/relation");
}
return -1;
},
onBeforeChange: function (index) {
var _this = this;
var useBeforeChange = this.data.useBeforeChange;
if (!useBeforeChange) {
return Promise.resolve();
}
return new Promise(function (resolve, reject) {
_this.$emit('before-change', __assign(__assign({}, _this.getChildData(index)), { callback: function (status) { return (status ? resolve() : reject()); } }));
});
},
getChildData: function (index, child) {
var currentChild = child || this.children[index];
if (!(0, validator_1.isDef)(currentChild)) {
return;
}
return {
index: currentChild.index,
name: currentChild.getComputedName(),
title: currentChild.data.title,
};
},
},
});
......@@ -9,7 +9,7 @@
container="{{ container }}"
bind:scroll="onTouchScroll"
>
<view class="{{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }}">
<view class="{{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class">
<slot name="nav-left" />
<scroll-view
......@@ -20,7 +20,7 @@
style="{{ color ? 'border-color: ' + color : '' }}"
>
<view class="{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class" style="{{ computed.navStyle(color, type) }}">
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth }) }}" />
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}" />
<view
wx:for="{{ tabs }}"
wx:key="index"
......
......@@ -60,6 +60,7 @@ function trackStyle(data) {
function lineStyle(data) {
return style({
width: utils.addUnit(data.lineWidth),
opacity: data.inited ? 1 : 0,
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
'background-color': data.color,
......
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
\ No newline at end of file
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
\ No newline at end of file
/// <reference types="miniprogram-api-typings" />
/// <reference types="miniprogram-api-typings" />
declare type ToastMessage = string | number;
declare type ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;
type ToastMessage = string | number;
type ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;
interface ToastOptions {
show?: boolean;
type?: string;
......
......@@ -16,7 +16,7 @@ var utils_1 = require("./utils");
var shared_1 = require("./shared");
var validator_1 = require("../common/validator");
(0, component_1.VantComponent)({
props: __assign(__assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {
props: __assign(__assign(__assign(__assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {
type: null,
value: 80,
}, name: {
......@@ -53,7 +53,7 @@ var validator_1 = require("../common/validator");
}, uploadIcon: {
type: String,
value: 'photograph',
} }, shared_1.chooseImageProps), shared_1.chooseVideoProps),
} }, shared_1.imageProps), shared_1.videoProps), shared_1.mediaProps), shared_1.messageFileProps),
data: {
lists: [],
isInCount: true,
......@@ -129,11 +129,12 @@ var validator_1 = require("../common/validator");
if (!this.data.previewFullImage)
return;
var index = event.currentTarget.dataset.index;
var lists = this.data.lists;
var _a = this.data, lists = _a.lists, showmenu = _a.showmenu;
var item = lists[index];
wx.previewImage({
urls: lists.filter(function (item) { return (0, utils_1.isImageFile)(item); }).map(function (item) { return item.url; }),
current: item.url,
showmenu: showmenu,
fail: function () {
wx.showToast({ title: '预览图片失败', icon: 'none' });
},
......@@ -144,11 +145,20 @@ var validator_1 = require("../common/validator");
return;
var index = event.currentTarget.dataset.index;
var lists = this.data.lists;
var sources = [];
var current = lists.reduce(function (sum, cur, curIndex) {
if (!(0, utils_1.isVideoFile)(cur)) {
return sum;
}
sources.push(__assign(__assign({}, cur), { type: 'video' }));
if (curIndex < index) {
sum++;
}
return sum;
}, 0);
wx.previewMedia({
sources: lists
.filter(function (item) { return (0, utils_1.isVideoFile)(item); })
.map(function (item) { return (__assign(__assign({}, item), { type: 'video' })); }),
current: index,
sources: sources,
current: current,
fail: function () {
wx.showToast({ title: '预览视频失败', icon: 'none' });
},
......
export declare const chooseImageProps: {
export declare const imageProps: {
sizeType: {
type: ArrayConstructor;
value: string[];
......@@ -7,8 +7,12 @@ export declare const chooseImageProps: {
type: ArrayConstructor;
value: string[];
};
showmenu: {
type: BooleanConstructor;
value: boolean;
};
};
export declare const chooseVideoProps: {
export declare const videoProps: {
capture: {
type: ArrayConstructor;
value: string[];
......@@ -26,3 +30,24 @@ export declare const chooseVideoProps: {
value: string;
};
};
export declare const mediaProps: {
capture: {
type: ArrayConstructor;
value: string[];
};
mediaType: {
type: ArrayConstructor;
value: string[];
};
maxDuration: {
type: NumberConstructor;
value: number;
};
camera: {
type: StringConstructor;
value: string;
};
};
export declare const messageFileProps: {
extension: null;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.chooseVideoProps = exports.chooseImageProps = void 0;
// props for choose image
exports.chooseImageProps = {
exports.messageFileProps = exports.mediaProps = exports.videoProps = exports.imageProps = void 0;
// props for image
exports.imageProps = {
sizeType: {
type: Array,
value: ['original', 'compressed'],
......@@ -11,9 +11,13 @@ exports.chooseImageProps = {
type: Array,
value: ['album', 'camera'],
},
showmenu: {
type: Boolean,
value: true,
},
};
// props for choose video
exports.chooseVideoProps = {
// props for video
exports.videoProps = {
capture: {
type: Array,
value: ['album', 'camera'],
......@@ -31,3 +35,26 @@ exports.chooseVideoProps = {
value: 'back',
},
};
// props for media
exports.mediaProps = {
capture: {
type: Array,
value: ['album', 'camera'],
},
mediaType: {
type: Array,
value: ['image', 'video'],
},
maxDuration: {
type: Number,
value: 60,
},
camera: {
type: String,
value: 'back',
},
};
// props for file
exports.messageFileProps = {
extension: null,
};
......@@ -10,7 +10,7 @@ export interface File {
}
export declare function isImageFile(item: File): boolean;
export declare function isVideoFile(item: File): boolean;
export declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, }: {
export declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, mediaType, extension, }: {
accept: any;
multiple: any;
capture: any;
......@@ -19,4 +19,6 @@ export declare function chooseFile({ accept, multiple, capture, compressed, maxD
sizeType: any;
camera: any;
maxCount: any;
mediaType: any;
extension: any;
}): Promise<File | File[]>;
......@@ -55,7 +55,7 @@ function formatFile(res) {
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { url: item.path })); });
}
function chooseFile(_a) {
var accept = _a.accept, multiple = _a.multiple, capture = _a.capture, compressed = _a.compressed, maxDuration = _a.maxDuration, sizeType = _a.sizeType, camera = _a.camera, maxCount = _a.maxCount;
var accept = _a.accept, multiple = _a.multiple, capture = _a.capture, compressed = _a.compressed, maxDuration = _a.maxDuration, sizeType = _a.sizeType, camera = _a.camera, maxCount = _a.maxCount, mediaType = _a.mediaType, extension = _a.extension;
return new Promise(function (resolve, reject) {
switch (accept) {
case 'image':
......@@ -70,6 +70,7 @@ function chooseFile(_a) {
case 'media':
wx.chooseMedia({
count: multiple ? Math.min(maxCount, 9) : 1,
mediaType: mediaType,
sourceType: capture,
maxDuration: maxDuration,
sizeType: sizeType,
......@@ -89,12 +90,7 @@ function chooseFile(_a) {
});
break;
default:
wx.chooseMessageFile({
count: multiple ? maxCount : 1,
type: accept,
success: function (res) { return resolve(formatFile(res)); },
fail: reject,
});
wx.chooseMessageFile(__assign(__assign({ count: multiple ? maxCount : 1, type: accept }, (extension ? { extension: extension } : {})), { success: function (res) { return resolve(formatFile(res)); }, fail: reject }));
break;
}
});
......
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
import { IMG_URL, IMG_VERSION,IMG_URL_STORE } from '~/utils/constantData'
module.exports = Behavior({
data: {
IMGURL: IMG_URL,
IMG_URL_STORE,
IMG_VERSION: IMG_VERSION()
}
})
......@@ -4,15 +4,151 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@antv/adjust": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@antv/adjust/-/adjust-0.1.1.tgz",
"integrity": "sha512-9FaMOyBlM4AgoRL0b5o0VhEKAYkexBNUrxV8XmpHU/9NBPJONBOB/NZUlQDqxtLItrt91tCfbAuMQmF529UX2Q==",
"requires": {
"@antv/util": "~1.3.1"
},
"dependencies": {
"@antv/util": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz",
"integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
}
}
},
"@antv/f2": {
"version": "3.7.8",
"resolved": "https://registry.npmjs.org/@antv/f2/-/f2-3.7.8.tgz",
"integrity": "sha512-ZPwgKd/ycQAQBhNoOn7+silxURYJVgtRv/q7f68X9++XRvitQPwtDnpUsR0gyLUbFO1XiFbhXtbRx8RzyZWFdg==",
"requires": {
"@antv/adjust": "~0.1.1",
"@antv/scale": "~0.3.3",
"@antv/util": "~2.0.6",
"@babel/runtime": "^7.7.7",
"@types/hammerjs": "^2.0.36",
"hammerjs": "^2.0.8",
"type-fest": "^0.15.1"
}
},
"@antv/f2-canvas": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@antv/f2-canvas/-/f2-canvas-1.0.5.tgz",
"integrity": "sha512-iE4u1kAcxGaluu1CA6F5R0/dfsCMhubEfOKvR6zRwGC9S9bCil0y6JNCsIkyPZGCQYkAtsg3WDlcu2yneyqUuw==",
"requires": {
"@antv/wx-f2": "^1.1.4"
},
"dependencies": {
"@antv/wx-f2": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@antv/wx-f2/-/wx-f2-1.1.4.tgz",
"integrity": "sha512-XaMUwS16ONcpHIEK4yv6wOIxrwSqzhLx4di2kmumQI8xi5vZK1bslJCtjSaxbNS99febpZkZqgwgAmXOOrMYmA==",
"requires": {
"@antv/f2": "^3.3.3",
"wolfy87-eventemitter": "^5.2.4"
}
}
}
},
"@antv/f6-wx": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/@antv/f6-wx/-/f6-wx-0.0.7.tgz",
"integrity": "sha512-Q6GKLAWBUZ1H74PpUAPPq+laP+DtdTKnIIeq6FCufVyHOgSlJSf+Jm6aPdASok+oNJvgUDcFWvZS9qLqyV/2TA=="
},
"@antv/gl-matrix": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@antv/gl-matrix/-/gl-matrix-2.7.1.tgz",
"integrity": "sha512-oOWcVNlpELIKi9x+Mm1Vwbz8pXfkbJKykoCIOJ/dNK79hSIANbpXJ5d3Rra9/wZqK6MC961B7sybFhPlLraT3Q=="
},
"@antv/scale": {
"version": "0.3.18",
"resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.18.tgz",
"integrity": "sha512-GHwE6Lo7S/Q5fgaLPaCsW+CH+3zl4aXpnN1skOiEY0Ue9/u+s2EySv6aDXYkAqs//i0uilMDD/0/4n8caX9U9w==",
"requires": {
"@antv/util": "~2.0.3",
"fecha": "~4.2.0",
"tslib": "^2.0.0"
}
},
"@antv/util": {
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.17.tgz",
"integrity": "sha512-o6I9hi5CIUvLGDhth0RxNSFDRwXeywmt6ExR4+RmVAzIi48ps6HUy+svxOCayvrPBN37uE6TAc2KDofRo0nK9Q==",
"requires": {
"csstype": "^3.0.8",
"tslib": "^2.0.3"
}
},
"@antv/wx-f2": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@antv/wx-f2/-/wx-f2-2.1.1.tgz",
"integrity": "sha512-15S+Fz9NYFpZvXHaOM65lcNWEpsx7SmIyDDGMDZ0/beNW2T4DkxBdJwVLjE/SBIZc7kbQKJsC8n2p4HLbHcJYg==",
"requires": {
"@antv/f2": "~3.7.0"
}
},
"@babel/runtime": {
"version": "7.21.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
"integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
"requires": {
"regenerator-runtime": "^0.13.11"
}
},
"@types/hammerjs": {
"version": "2.0.41",
"resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz",
"integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA=="
},
"@vant/weapp": {
"version": "1.10.7",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz",
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
"version": "1.10.15",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.10.15.tgz",
"integrity": "sha512-swM4k3pVwt/6Tnijvq86paLiKE1CzbrBQ4lR7+9uRhwKOM0HS3ooK1Q4IjSEyxQ59ZFKmYYvZln77RZcnSDqmA=="
},
"csstype": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"fecha": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz",
"integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw=="
},
"glsx-applet-component": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.3.tgz",
"integrity": "sha512-Ze+HdtFJImhOsWLfV+ZzB86Kf18pm9M9CZWhctPel/qJNMEn29g9ywC16NXmeac+gTu07MOpURyF+YmO8ojkJA=="
},
"hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ=="
},
"regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
},
"tslib": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"type-fest": {
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.15.1.tgz",
"integrity": "sha512-n+UXrN8i5ioo7kqT/nF8xsEzLaqFra7k32SEsSPwvXVGyAcRgV/FUQN/sgfptJTR1oRmmq7z4IXMFSM7im7C9A=="
},
"wolfy87-eventemitter": {
"version": "5.2.9",
"resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.9.tgz",
"integrity": "sha512-P+6vtWyuDw+MB01X7UeF8TaHBvbCovf4HPEMF/SV7BdDc1SMTiBy13SRD71lQh4ExFTG1d/WNzDGDCyOKSMblw=="
}
}
}
......@@ -4,8 +4,11 @@
"description": "",
"main": "app.js",
"dependencies": {
"@antv/f2-canvas": "^1.0.5",
"@antv/f6-wx": "0.0.7",
"@antv/wx-f2": "^2.1.1",
"@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.0.50"
"glsx-applet-component": "^1.1.3"
},
"devDependencies": {},
"scripts": {
......@@ -13,7 +16,7 @@
},
"repository": {
"type": "git",
"url": "http://luyt@192.168.3.233:8090/saas_plus/business-assistant.git"
"url": "http://yangming@192.168.3.233:8090/saas_plus/store-assistant-assemble.git"
},
"author": "",
"license": "ISC"
......
// packageOutput/components/echart/echart.js
Component({
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Object,
observer(onInitChart) {
if (onInitChart) {
this.setData({onInitChart})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageOutput/components/echart/echart.wxss */
.f2-chart {
width: 100%;
height: 500rpx;
}
\ No newline at end of file
<!--packageOutput/components/echart/echart.wxml-->
<view class="container" style="height: 300px;">
<f2 class="f2-chart" onInit="{{onInitChart}}" />
</view>
Page({
data: {
onInitChart(F2, config) {
const chart = new F2.Chart(config);
const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
{ year: '1959 年', sales: 38 },
{ year: '1960 年', sales: 38 },
{ year: '1962 年', sales: 38 },
];
chart.source(data, {
sales: {
tickCount: 5,
},
style: {
stroke: 'linear-gradient(0deg, blue, green 40%, red)'
}
});
chart.tooltip({
showItemMarker: false,
onShow(ev) {
const { items } = ev;
items[0].name = null;
items[0].name = items[0].title;
items[0].value = '¥ ' + items[0].value;
}
});
chart.interval().position('year*sales');
chart.render();
return chart;
}
},
});
{
"usingComponents": {
}
}
\ No newline at end of file
page {
background-color: #fff;
}
.f2-chart {
width: 100%;
height: 500rpx;
}
#column-dom {
width: 100%;
height: 500rpx;
}
\ No newline at end of file
<view class="container" style="height: 300px;">
<f2 class="f2-chart" onInit="{{onInitChart}}" />
</view>
<!-- <view class="container" style="height: 300px;">
<ff-canvas id="column-dom" canvas-id="column" opts="{{ opts }}"></ff-canvas>
</view> -->
......@@ -53,7 +53,7 @@
</view>
</view>
</view>
<!-- 生意助手 -->
<!-- 门店助手 -->
<view wx:else>
<image webp class="like" wx:if="{{item.clueType == 1 && item.starTag == 1}}" src="{{IMG_URL}}index/like.png" data-type="like" data-outidx="{{index}}" data-item="{{item}}" bindtap="showToast" />
<image webp class="like" wx:if="{{item.clueType == 1 && item.starTag == 0}}" src="{{IMG_URL}}index/dislike.png" data-type="dislike" data-outidx="{{index}}" data-item="{{item}}" bindtap="showToast" />
......
......@@ -113,7 +113,7 @@
</view>
</view>
</view>
<!-- 生意助手 -->
<!-- 门店助手 -->
<view wx:else>
<image
webp
......
......@@ -34,7 +34,7 @@ Page({
actNum: 3, //car 场景选择
tabIndx: 0,
// navList: ['看线索', '看产品'],
navList: ['看产品', '客户数字化'],
navList: ['增值服务', '客户数字化'],
isShowService: false,
// 固定按钮
......
<wxs src="./index.wxs" module="filterUtils" />
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
<tab tab="{{navList}}" itemWidth="{{'38%'}}" index="{{tabIndx}}" tabHeight unreadClueCount="{{unreadClueCount}}" bindclick="changeTabIndx" class="tabContainer" />
<tab tab="{{navList}}" itemWidth="{{'40%'}}" index="{{tabIndx}}" tabHeight unreadClueCount="{{unreadClueCount}}" bindclick="changeTabIndx" class="tabContainer" />
</navigation-bar>
<view class="reclaim">
<!-- 头部 -->
......
......@@ -112,7 +112,7 @@
</view>
</view>
</view>
<!-- 生意助手 -->
<!-- 门店助手 -->
<view wx:else>
<image
webp
......
......@@ -19,30 +19,8 @@ Page({
IMAGES,
// isRead: false,
test: `/personal/icon2.png`,
boxItemList: [{
name: '客户管理',
path: 'packagesList.customerManagement'
}, {
name: '消息盒子',
path: 'packagesList.messageBox',
hasRedPot: true,
isRead: false
}, {
name: '看线索',
path: 'packagesList.clue',
hasRedPot: true,
isRead: false
}],
isShowService: false,
},
navGO(e) {
let { path, item } = e.currentTarget.dataset
console.log(item)
if (item.name == "看线索") {
this.clueRead()
}
wx.$router.go(path)
},
logout() {
let _this = this
wx.showModal({
......@@ -85,61 +63,13 @@ Page({
})
console.log(e)
},
messageBoxPageIsRead() {
let { serviceMerchantId } = this.data
console.log(serviceMerchantId,'serviceMerchantId');
const idx = this.data.boxItemList.findIndex(item => item.name == '消息盒子')
mineApi
.messageBoxPageIsRead({
serviceMerchantId
})
.then(result => {
console.log(result, 'result')
this.setData({
['boxItemList[' + idx + ']isRead']: result
})
})
.catch(err => {
console.log(err)
})
},
//看线索-未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param)
const idx = this.data.boxItemList.findIndex(item => item.name == '看线索')
if (code == 0) {
this.setData({
['boxItemList[' + idx + ']isRead']: !!data.unreadClueCount
})
}
},
// 看线索-标记已读
clueRead() {
let { sessionId } = wx.$storage.get()
const idx = this.data.boxItemList.findIndex(item => item.name == '看线索')
// console.log("sessionId: ", sessionId);
let param = {
sessionId
}
readApi(param).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
['boxItemList[' + idx + ']isRead']: !data.unreadClueCount
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: async function (options) {
let { userInfo } = wx.$storage.get()
let serviceMerchantId = userInfo.subLoginUser.merchantId
let serviceMerchantId = userInfo.subLoginUser?.merchantId
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({
serviceMerchantId,
......@@ -160,9 +90,7 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.messageBoxPageIsRead()
this.getUnreadApi()
onShow: function (){
},
/**
......
......@@ -38,9 +38,9 @@ page {
&::after {
content: '';
width: 100%;
height: 486rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/personal/bg.webp') no-repeat;
background-size: 100% 486rpx;
height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-top.webp') no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
top: 0;
......@@ -141,9 +141,12 @@ page {
bottom: 106rpx;
left: 50%;
transform: translateX(-50%);
font-size: 28rpx !important;
color: #8A8C90 !important;
font-size: 32rpx !important;
color: #999999 !important;
font-weight: 400 !important;
border: 2rpx solid #EEEEEE !important;
background-color: #fff !important;
width: 330rpx;
height: 96rpx;
line-height: 96rpx;
border: 2rpx solid #E2E2E2;
border-radius: 12rpx;
}
\ No newline at end of file
<!-- pages/tab/output/output.wxml -->
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的账号</navigation-bar>
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的</navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;">
<view class="userInfoCon">
<glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>
......@@ -9,8 +9,7 @@
<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 class="id">{{userInfo.merchantId}}</view>
</view>
<button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
......
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.27.2",
"libVersion": "2.31.0",
"condition": {
"miniprogram": {
"list": [
......@@ -87,9 +87,17 @@
"query": "scene=sceneId%3D22402",
"launchMode": "default",
"scene": 1047
},
{
"name": "",
"pathName": "packageOutput/pages/boutique/poutique",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
},
"setting": {}
"setting": {},
"projectname": "store-assistant-assemble"
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ class Router {
const router = `${thisPage.__route__}.html`
if (__wxConfig && __wxConfig.page && __wxConfig.page[router]) {
let { navigationBarTitleText, navigationStyle } = __wxConfig.page[router].window
if (!title) title = '生意助手'
if (!title) title = '门店助手'
if (!navigationBarTitleText && !navigationStyle)
wx.setNavigationBarTitle({
title
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!