Commit b797b972 by 张立顺

bug 修复

1 parent 40f3d0b3
...@@ -43,46 +43,38 @@ class outputApi { ...@@ -43,46 +43,38 @@ class outputApi {
{ {
method: 'scrm.api.boutiquecoupon.partnermerchant.yqList', method: 'scrm.api.boutiquecoupon.partnermerchant.yqList',
...data ...data
} },
// true true
) )
} }
/** 查找可开通的产品 */ /** 查找可开通的产品 */
getNoOpenPro(data) { getNoOpenPro(data) {
return api.post( return api.post({
{
method: 'scrm.api.busassistant.activity.findNotOpenProducts', method: 'scrm.api.busassistant.activity.findNotOpenProducts',
...data ...data
} })
)
} }
/**查询场景和产品的开通状态 */ /**查询场景和产品的开通状态 */
getSceneProStatus(data) { getSceneProStatus(data) {
return api.post( return api.post({
{
method: 'scrm.api.busassistant.activity.findSceneProductStatus', method: 'scrm.api.busassistant.activity.findSceneProductStatus',
...data ...data
} })
)
} }
/** 申请开通活动*/ /** 申请开通活动*/
applyActivity(data) { applyActivity(data) {
return api.post( return api.post({
{
method: 'scrm.api.busassistant.activity.apply', method: 'scrm.api.busassistant.activity.apply',
...data ...data
} })
)
} }
/** 查询门店众筹活动产值 */ /** 查询门店众筹活动产值 */
getActivityRevenue(data) { getActivityRevenue(data) {
return api.post( return api.post({
{
method: 'scrm.api.busassistant.merchant.activity.Revenue', method: 'scrm.api.busassistant.merchant.activity.Revenue',
...data ...data
} })
)
} }
} }
export default outputApi export default outputApi
...@@ -3,4 +3,20 @@ ...@@ -3,4 +3,20 @@
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
// justify-content: center;
.bg {
width: 512rpx;
height: 512rpx;
}
.tips {
margin-top: -15rpx;
font-size: 24rpx;
color: #CCCED1;
text-align: center;
}
} }
\ No newline at end of file \ No newline at end of file
<!-- components/Nothing-tips/nothingTips.wxml --> <!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon"> <view class="nothingCon">
<image wx:if="{{bg}}" src="{{bg}}" webp></image> <image
wx:if="{{bg}}"
class="bg"
src="{{bg}}"
webp></image>
<view wx:if="{{tips}}" class="tips">{{tips}}</view> <view wx:if="{{tips}}" class="tips">{{tips}}</view>
<slot/> <slot/>
</view> </view>
......
...@@ -41,10 +41,10 @@ Page({ ...@@ -41,10 +41,10 @@ Page({
return return
} }
this.submitForm() this.submitForm()
console.log(123) // console.log(123)
}, },
submitForm() { submitForm() {
let { carObj } = this.data let { carObj, clueId } = this.data
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let MerchantInfo = userInfo.subLoginUser let MerchantInfo = userInfo.subLoginUser
let params = { let params = {
...@@ -55,15 +55,19 @@ Page({ ...@@ -55,15 +55,19 @@ Page({
phone: carObj.phone, phone: carObj.phone,
applyMerchantName: carObj.name, applyMerchantName: carObj.name,
carType: carObj.model, carType: carObj.model,
baseCustomer: carObj.selNum baseCustomer: carObj.selNum,
clueId
} }
// return wx.$api.showToast('申请成功')
applyApi applyApi
.merchantApply(params) .merchantApply(params)
.then(result => { .then(result => {
console.log(result) console.log(result)
if (result) { if (result) {
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => {
wx.$router.back() wx.$router.back()
}, 1000)
} }
}) })
.catch(err => {}) .catch(err => {})
...@@ -81,7 +85,11 @@ Page({ ...@@ -81,7 +85,11 @@ Page({
*/ */
onLoad(options) {}, onLoad(options) {},
onRoute(params) { onRoute(params) {
console.log('params: ', params) // 线索id
this.setData({
clueId: params
})
// console.log('params: ', params)
}, },
/** /**
......
...@@ -2,6 +2,5 @@ ...@@ -2,6 +2,5 @@
"usingComponents": {}, "usingComponents": {},
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
\ No newline at end of file \ No newline at end of file
/* pages/checkProduct/checkProduct.wxss */ /* pages/checkProduct/checkProduct.wxss */
.productCon{
box-sizing: border-box;
padding-top: 88px;
display: block;
}
// 分享模态框 // 分享模态框
.share-wrap { .share-wrap {
position: fixed; position: fixed;
......
<!--pages/checkProduct/checkProduct.wxml--> <!--pages/checkProduct/checkProduct.wxml-->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar> <navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar>
<view style="height:{{headerHeight}}px"> <!-- <view style="height:{{headerHeight}}px">
</view> </view> -->
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" outshowVideo="{{outshowVideo}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" /> <product stickyTop="{{headerHeight}}" class="productCon" style="padding-top:{{headerHeight}}px" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" outshowVideo="{{outshowVideo}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 --> <!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> --> <!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<view class="share-wrap" wx:if="{{isShow}}"> <view class="share-wrap" wx:if="{{isShow}}">
......
// pages/mineDetail/customerManagement/customerManagement.js // pages/mineDetail/customerManagement/customerManagement.js
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
import USERAPI from '~/api/usersApi/index' // import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData'
console.log(IMG_URL)
const listObj = Object.freeze([ const listObj = Object.freeze([
{ {
key: 'merchantId', key: 'merchantId',
...@@ -16,14 +17,14 @@ const listObj = Object.freeze([ ...@@ -16,14 +17,14 @@ const listObj = Object.freeze([
maxLength: 20 maxLength: 20
}, },
{ {
key: 'phone', key: 'contactName',
label: '联系人:', label: '联系人:',
placeholder: '请输入客户门店联系人', placeholder: '请输入客户门店联系人',
editLabel: '联系人', editLabel: '联系人',
maxLength: 10 maxLength: 10
}, },
{ {
key: 'contactName', key: 'phone',
label: '手机号:', label: '手机号:',
placeholder: '请输入客户门店联系人手机号', placeholder: '请输入客户门店联系人手机号',
editLabel: '手机号', editLabel: '手机号',
...@@ -68,68 +69,10 @@ Component({ ...@@ -68,68 +69,10 @@ Component({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
pages: 1, pages: 1,
customerList: [ customerList: [{}],
{
id: 0,
merchantId: 0,
merchantName: 'string',
loginAccountUuid: 'string',
contactName: 'string',
phone: 'string',
mainBrand: 'string',
newCarSales: 0,
existUserNumber: 0,
createdBy: 'string',
createdDate: '2022-10-14T07:33:40.778Z',
updatedBy: 'string',
updatedDate: '2022-10-14T07:33:40.778Z',
deletedFlag: 'string',
partnerMerchantId: 0,
actualMerchantName: 'string',
isEdit: false
},
{
id: 0,
merchantId: 0,
merchantName: 'string',
loginAccountUuid: 'string',
contactName: 'string',
phone: 'string',
mainBrand: 'string',
newCarSales: 0,
existUserNumber: 0,
createdBy: 'string',
createdDate: '2022-10-14T07:33:40.778Z',
updatedBy: 'string',
updatedDate: '2022-10-14T07:33:40.778Z',
deletedFlag: 'string',
partnerMerchantId: 0,
actualMerchantName: 'string',
isEdit: false
},
{
id: 0,
merchantId: 0,
merchantName: 'string',
loginAccountUuid: 'string',
contactName: 'string',
phone: 'string',
mainBrand: 'string',
newCarSales: 0,
existUserNumber: 0,
createdBy: 'string',
createdDate: '2022-10-14T07:33:40.778Z',
updatedBy: 'string',
updatedDate: '2022-10-14T07:33:40.778Z',
deletedFlag: 'string',
partnerMerchantId: 0,
actualMerchantName: 'string',
isEdit: true
}
],
listObj, listObj,
isSuper: false, isSuper: false,
bgUrl: `${USERAPI}/output/empty.png` bgUrl: `${IMG_URL}/output/empty.png`
}, },
attached() { attached() {
// this.initTime() // this.initTime()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="customerManagementCon"> <view class="customerManagementCon">
<!-- required hidden="{{hidden}}" --> <!-- required hidden="{{hidden}}" -->
<scroll-view <scroll-view
wx:if="{{!customerList.length}}" wx:if="{{customerList.length}}"
scroll-y scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view wx:else> <view wx:else>
<nothing-tips tips="这是一个" bg="{{}}" /> <nothing-tips tips="暂无相关客户~" bg="{{bgUrl}}" />
</view> </view>
</view> </view>
...@@ -56,6 +56,7 @@ Component({ ...@@ -56,6 +56,7 @@ Component({
copyLink(e) { copyLink(e) {
console.log(e) console.log(e)
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
console.log(url)
handleCopy(url) handleCopy(url)
// console.log(e.current.) // console.log(e.current.)
// wx.$api.setCopyData(url, () => { // wx.$api.setCopyData(url, () => {
......
<!-- 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> <view class="big-title">特色产品</view>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}"> <scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<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>
......
...@@ -142,9 +142,16 @@ Component({ ...@@ -142,9 +142,16 @@ Component({
.partnerMerchantTotal({ merchantId: userInfo.merchantId }) .partnerMerchantTotal({ merchantId: userInfo.merchantId })
.then(result => { .then(result => {
// debugger // debugger
// console.log('result', result) console.log('result', result)
let { code, data } = result
let { dataList, yqMerchantIds } = result // 没有关联园区店
if (code == -1) {
this.setData({
list: []
})
return wx.$api.showTips(result.message)
}
let { dataList, yqMerchantIds } = data
const list = yqMerchantIds.reduce((list, item, index) => { const list = yqMerchantIds.reduce((list, item, index) => {
let obj = {} let obj = {}
obj.totalMoney = dataList[index]?.totalMoney || 0 obj.totalMoney = dataList[index]?.totalMoney || 0
...@@ -216,7 +223,7 @@ Component({ ...@@ -216,7 +223,7 @@ Component({
let obj = {} let obj = {}
obj.totalMoney = item?.totalMoney || 0 obj.totalMoney = item?.totalMoney || 0
obj.totalOrder = item?.totalOrder || 0 obj.totalOrder = item?.totalOrder || 0
// obj.merchantName = item.merchantName obj.merchantName = item?.merchantName
// obj.merchantId = item // obj.merchantId = item
obj.startInd = obj.startInd =
item?.sceneList.findIndex(item => { item?.sceneList.findIndex(item => {
......
...@@ -48,20 +48,24 @@ Page({ ...@@ -48,20 +48,24 @@ Page({
}) })
}, },
init() { init() {
this.setUserInfo()
this.getMerchantRange()
},
setUserInfo() {
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
console.log(userInfo) console.log(userInfo)
this.setData({ this.setData({
userInfo, userInfo,
isSuper: userInfo.isSuper isSuper: userInfo.isSuper
}) })
this.getMerchantRange()
}, },
getMerchantRange(e) { getMerchantRange(e) {
// 重新刷新 // 重新刷新
// let { detail } = e || null // let { detail } = e || null
// console.log(detail) // console.log(detail)
console.log(e)
if (e) { if (e) {
this.init() this.setUserInfo()
let clientModule = this.selectComponent('#client') let clientModule = this.selectComponent('#client')
let merchantModule = this.selectComponent('#merchant') let merchantModule = this.selectComponent('#merchant')
// console.log('clientModule', clientModule) // console.log('clientModule', clientModule)
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
bindcancel="tapPicker" bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}"> --> disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title" bindtap="tapPicker"> <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||userInfo.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>
......
...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod'] ...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试 2测试
3生产 3生产
*/ */
const index = 1 const index = 2
const secretKey = { const secretKey = {
ip: {}, ip: {},
......
import { import { secretKey, pathEnum, domain, sign } from './http.js'
secretKey, import { getSessionId } from '~/utils/cache/storageApi'
pathEnum,
domain,
sign
} from './http.js'
import {
getSessionId
} from '~/utils/cache/storageApi'
import network from '~/utils/network' import network from '~/utils/network'
/**接口 */ /**接口 */
class Request { class Request {
...@@ -22,11 +15,11 @@ class Request { ...@@ -22,11 +15,11 @@ class Request {
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)
let path = pathEnum[projectName] let path = pathEnum[projectName]
...@@ -42,10 +35,7 @@ class Request { ...@@ -42,10 +35,7 @@ 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) {
...@@ -68,7 +58,7 @@ class Request { ...@@ -68,7 +58,7 @@ class Request {
if (code == '0') { if (code == '0') {
resolve(data.data) resolve(data.data)
} else { } else {
console.trace(data) // console.trace(data)
wx.showToast({ wx.showToast({
title: message || '系统异常', title: message || '系统异常',
icon: 'none' icon: 'none'
......
...@@ -139,6 +139,7 @@ export function handleCopy(url) { ...@@ -139,6 +139,7 @@ export function handleCopy(url) {
}) })
} }
base64src(qr).then(res => { base64src(qr).then(res => {
console.log(res)
wx.getImageInfo({ wx.getImageInfo({
src: res, src: res,
success(obj) { success(obj) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!