Commit b797b972 by 张立顺

bug 修复

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