Commit 32c0d8e6 by 前端

活动申请

1 parent ea9d5c8c
import api from "./request"; import api from "./request";
module.exports = { module.exports = {
// 智能名片详情 // 智能名片详情
getCardDetail(data) { getCardDetail(data) {
return api.post( return api.post({
{
method: `entmicro.api.business.card.cardDetail`, method: `entmicro.api.business.card.cardDetail`,
...data, ...data,
}, },
...@@ -16,6 +15,14 @@ module.exports = { ...@@ -16,6 +15,14 @@ module.exports = {
return api.post({ return api.post({
method: `entmicro.api.business.card.activity.apply`, method: `entmicro.api.business.card.activity.apply`,
...data, ...data,
},true) }, true)
},
// 检查登录用户是否是滴加智慧云员工
checkPhone(data) {
return api.post({
method: `entmicro.api.business.activityRecord.checkPhone`,
...data,
}, true)
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"]; ...@@ -14,7 +14,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
3预发布 3预发布
4生产 4生产
*/ */
const index = 2; const index = 1;
const secretKey = { const secretKey = {
ip: {}, ip: {},
dev: { dev: {
......
// components/customer/customer.js
import {
componentsMixin
} from "../../mixins/index";
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 关闭客服弹框
closeQR() {
console.log(333);
this.triggerEvent('closeQR')
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/customer/customer.wxss */
.model {
position: fixed;
left: 0;
right: 0;
top: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
z-index: 999999;
.bg-icon {
position: absolute;
top: 300rpx;
left: 0;
width: 750rpx;
height: 800rpx;
}
.tip-icon {
position: absolute;
top: 500rpx;
right: 33rpx;
width: 80rpx;
height: 80rpx;
}
.close-icon {
position: absolute;
top: 1000rpx;
right: 343rpx;
width: 64rpx;
height: 64rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--components/customer/customer.wxml-->
<block>
<view class="model">
<image class="bg-icon" webp src="{{IMGURL}}home/QR_code_bg.png?v={{img_version}}"></image>
<image class="tip-icon" webp src="{{IMGURL}}home/QR_code_tip.png?v={{img_version}}"></image>
<image class="close-icon" bindtap="closeQR" webp src="{{IMGURL}}home/close_icon.png?v={{img_version}}"></image>
</view>
</block>
...@@ -51,13 +51,13 @@ Component({ ...@@ -51,13 +51,13 @@ Component({
id: "0", id: "0",
name: "scene1", name: "scene1",
title: "客户沉淀", title: "客户沉淀",
url: "car4", url: "car5",
}, },
{ {
id: "1", id: "1",
name: "scene2", name: "scene2",
title: "客户活跃", title: "客户活跃",
url: "car1", url: "car6",
}, },
], ],
productList: { productList: {
......
// packagesList/pages/activityApply/activityApply.js // packagesList/pages/activityApply/activityApply.js
import { entmicroApi } from "../../../api/api"; import {
entmicroApi
} from "../../../api/api";
import util from "../../../utils/util"
Page({ Page({
/** /**
...@@ -9,21 +12,25 @@ Page({ ...@@ -9,21 +12,25 @@ Page({
}, },
// 提交表单 // 提交表单
submitApply() { submitApply() {
wx.$util.showLoading("提交中..."); wx.$util.showLoading("提交中...");
let validFlag = this.selectComponent("#applyForm").validateForm(); let validFlag = this.selectComponent("#applyForm").validateForm();
console.log(validFlag); console.log(validFlag);
if (!validFlag) return if (!validFlag) return
let params = JSON.parse(JSON.stringify(validFlag)) let params = JSON.parse(JSON.stringify(validFlag))
params.cardId = wx.$storage.get("scene").cardId; params.cardId = wx.$storage.get("scene").cardId;
params.merchant = params.merchant =
wx.$storage.get("scene").merchant || wx.$storage.get("scene").merchant ||
wx.$storage.get("scene").merchantId; wx.$storage.get("scene").merchantId;
params.openId = wx.$storage.get("aicard_info").openId; params.openId = wx.$storage.get("aicard_info").openId;
params.unionId = wx.$storage.get("aicard_info").unionId; params.unionId = wx.$storage.get("aicard_info").unionId;
console.log(params); console.log(params);
entmicroApi.activityApply(params).then(({ data, code, message }) => { entmicroApi.activityApply(params).then(({
data,
code,
message
}) => {
if (code == 0) { if (code == 0) {
wx.hideLoading(); wx.hideLoading();
wx.showToast({ wx.showToast({
...@@ -44,7 +51,15 @@ console.log(validFlag); ...@@ -44,7 +51,15 @@ console.log(validFlag);
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (util.getUserInfo() && util.getUserInfo().phone) {
console.log(util.getUserInfo().phone)
let params = {
phone: util.getUserInfo().phone
}
entmicroApi.checkPhone(params).then(res => {
console.log(res);
})
}
}, },
/** /**
......
/* packagesList/pages/activityApply/activityApply.wxss */ /* packagesList/pages/activityApply/activityApply.wxss */
.apply-main {
position: relative;
}
.top-img { .top-img {
width: 750rpx; width: 750rpx;
height: 320rpx; height: 320rpx;
...@@ -66,4 +70,31 @@ radio .wx-radio-input.wx-radio-input-checked::before { ...@@ -66,4 +70,31 @@ radio .wx-radio-input.wx-radio-input-checked::before {
font-weight: 500; font-weight: 500;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
line-height: 80rpx; line-height: 80rpx;
}
.caculate-box {
position: absolute;
top: 230rpx;
left: 32rpx;
display: flex;
align-items: center;
justify-content: center;
width: 228rpx;
height: 64rpx;
background: #5850FF;
box-shadow: 0 6rpx 24rpx 0 rgba(175, 181, 219, 0.40);
border-radius: 32rpx;
.caculate-img {
width: 36rpx;
height: 36rpx;
margin-right: 16rpx;
}
.caculate-text {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
} }
\ No newline at end of file \ No newline at end of file
<!--packagesList/pages/activityApply/activityApply.wxml--> <!--packagesList/pages/activityApply/activityApply.wxml-->
<view> <view class="apply-main">
<image class="top-img" mode="widthFix" webp src="{{IMGURL}}application/application_top.png?v={{img_version}}"></image> <image class="top-img" mode="widthFix" webp src="{{IMGURL}}application/application_top.png?v={{img_version}}"></image>
<view class="apply-box"> <view class="apply-box">
<view class="cooperation"> <view class="cooperation">
<CooperationApply id="applyForm"></CooperationApply> <CooperationApply id="applyForm"></CooperationApply>
</view> </view>
</view> </view>
<button class="submit-btn" bindtap="submitApply">提交申请</button> <button class="submit-btn" bindtap="submitApply">提交申请</button>
<!-- 展业测算 -->
<view class="caculate-box">
<image class="caculate-img" mode="widthFix" webp src="{{IMGURL}}application/caculate_icon.png?v={{img_version}}"></image>
<text class="caculate-text">展业测算</text>
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!