This commit is contained in:
chenrx
2024-05-29 21:22:20 +08:00
parent ce39d00b83
commit 1f0d01e0f0
18 changed files with 747 additions and 777 deletions
+11 -9
View File
@@ -70,14 +70,17 @@
"pages/clues/index",
"pages/clues/detail/index"
],
"echarts": [
{
"root": "ecCanvas",
"pages": [
"pages/index/index"
]
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序打卡签到"
}
],
},
"echarts": [{
"root": "ecCanvas",
"pages": [
"pages/index/index"
]
}],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
@@ -96,8 +99,7 @@
"lcb-backChannel": "/components/backChannel/index",
"kefuSuccess": "/components/kefuSuccess/index"
},
"plugins": {
},
"plugins": {},
"navigateToMiniProgramAppIdList": [
"wx98e64c11aac45966"
]
+73 -68
View File
@@ -2,10 +2,10 @@ const env = "d";
const version = 1,
//理车宝
app_id = '1c156bb57cd6984a' +
'',
key = '71fd71173b776766a2ae1209d9a2c2ed';
//理车宝
app_id = '1c156bb57cd6984a' +
'',
key = '71fd71173b776766a2ae1209d9a2c2ed';
//好店云
// app_id = 'ebb6d3808b2fa324',
@@ -26,6 +26,7 @@ api = {
appUserUkey: "app/user/ukey", //登录/退出登录
appUser: "app/user", //用户信息
appSms: "app/sms", //获取验证码
appUserTel: "app/user/tel", //获取用户手机号
appSeriesCars: "app/series/cars", //获取车型库
appSeriesAttrs: "app/series/attrs", //获取车型属性
appCustomersTabs: "app/customers/tabs", //获取tab
@@ -87,92 +88,96 @@ api = {
materialStatisticsChart: 'material/statistics/chart', //数据分析_图表
appCusorder2: 'app/cusorder2', //新建订单(新)/修改订单信息
appCustomersDefeats: 'app/customers/defeats', //战败客户列表 /战败/再战申请
appServices:'app/services', //获取代办服务列表
appFine:'app/fine', //获取精品赠送列表 /获取精品选装
appServices: 'app/services', //获取代办服务列表
appFine: 'app/fine', //获取精品赠送列表 /获取精品选装
materialHomeBiz:'material/home/biz', //店铺海报
materialHomePosters:'material/home/posters', //保存店铺海报
materialHomeBiz: 'material/home/biz', //店铺海报
materialHomePosters: 'material/home/posters', //保存店铺海报
appDelivery:'app/delivery', //获取车辆确定随车资料
appDelivery: 'app/delivery', //获取车辆确定随车资料
materialHomeBiz_posters:'material/home/biz_posters', //店铺海报模版
materialHomeBiz_posters: 'material/home/biz_posters', //店铺海报模版
appTransferLists:'app/transfer/lists', //调拨记录
appTransfer:'app/transfer', //调拨详情 /确认发车/接车 /报备异常
appTransferRemind:'app/transfer/remind', //调拨提醒
appTransferLists: 'app/transfer/lists', //调拨记录
appTransfer: 'app/transfer', //调拨详情 /确认发车/接车 /报备异常
appTransferRemind: 'app/transfer/remind', //调拨提醒
appCusorderCdata:'app/cusorder/cdata', //上传资料
appCusorderCdata: 'app/cusorder/cdata', //上传资料
appBrokerageOrders:'app/brokerage/orders', //转介绍列表
appBrokerage:'app/brokerage', //获取佣金设置 /更新佣金设置 /创建佣金设置
appTransferTabs:'app/transfer/tabs', //调拨记录_tab
appTransferTransport:'app/transfer/transport', //上传运输单
appBrokerageOrders: 'app/brokerage/orders', //转介绍列表
appBrokerage: 'app/brokerage', //获取佣金设置 /更新佣金设置 /创建佣金设置
appBizSituation_tabs:'app/biz/situation_tabs', //店铺概况_tab
appBizSituation:'app/biz/situation', //店铺概况 /店铺概况保存
appBizStreet:'app/biz/street', //获取乡镇
appCusorderV2Inten:'app/cusorderV2/inten', //新增意向金订单
appCusorderV2:'app/cusorderV2', //新建订单 /获取订单列表 /订单详情 /修改订单信息
appCusorderV2Tabs:'app/cusorderV2/tabs', //获取订单列表tab
appCusorderdata:'app/Cusorderdata', //获取订单图片 /上传编辑国补资料
appCusorderV2Info:'app/cusorderV2/info', //修改订单基本信息
appCusorderV2Status:'app/cusorderV2/status', //删除订单
appTransferTabs: 'app/transfer/tabs', //调拨记录_tab
appTransferTransport: 'app/transfer/transport', //上传运输单
appSytactivityTabs:'app/sytactivity/tabs', //私域通_tab
appSytactivityList:'app/sytactivity/list', //活动列表
appSytactivityDetail:'app/sytactivity/detail', //活动详情
appSytactivityLog:'app/sytactivity/log', //实时战报
appSytactivityRanking:'app/sytactivity/ranking', //活动排名
appBizSituation_tabs: 'app/biz/situation_tabs', //店铺概况_tab
appBizSituation: 'app/biz/situation', //店铺概况 /店铺概况保存
appBizStreet: 'app/biz/street', //获取乡镇
appInventoryTabs:'app/inventory/tabs', //盘点记录_tab
appInventoryLists:'app/inventory/lists', //盘点记录
appInventory:'app/inventory', //盘点详情 /盘点上传图片
appInventoryRemind:'app/inventory/remind', //盘点提醒
appCusorderV2Inten: 'app/cusorderV2/inten', //新增意向金订单
appCusorderV2: 'app/cusorderV2', //新建订单 /获取订单列表 /订单详情 /修改订单信息
appCusorderV2Tabs: 'app/cusorderV2/tabs', //获取订单列表tab
appCusorderdata: 'app/Cusorderdata', //获取订单图片 /上传编辑国补资料
appCusorderV2Info: 'app/cusorderV2/info', //修改订单基本信息
appCusorderV2Status: 'app/cusorderV2/status', //删除订单
appGoodsRemind:'app/goods/remind', //库存提醒/预警
appGoodsLists:'app/goods/lists', //库存列表
appSytactivityTabs: 'app/sytactivity/tabs', //私域通_tab
appSytactivityList: 'app/sytactivity/list', //活动列表
appSytactivityDetail: 'app/sytactivity/detail', //活动详情
appSytactivityLog: 'app/sytactivity/log', //实时战报
appSytactivityRanking: 'app/sytactivity/ranking', //活动排名
appCustomersOffline_sources:'app/customers/offline_sources', //客户来源
appCustomersTag:'app/customers/tag', //客户标签
appInventoryTabs: 'app/inventory/tabs', //盘点记录_tab
appInventoryLists: 'app/inventory/lists', //盘点记录
appInventory: 'app/inventory', //盘点详情 /盘点上传图片
appInventoryRemind: 'app/inventory/remind', //盘点提醒
appCityOncard:'app/city/oncard', //获取上牌城市
appFinanceNums:'app/finance/nums', //获取金融分期期数
appGoodsRemind: 'app/goods/remind', //库存提醒/预警
appGoodsLists: 'app/goods/lists', //库存列表
appCusorderV2Customer:'app/cusorderV2/customer', //获取客户订单
appCustomersOffline_sources: 'app/customers/offline_sources', //客户来源
appCustomersTag: 'app/customers/tag', //客户标签
appCustomersVisit_tabs:'app/customers/visit_tabs', //回访待跟进tab
appCityOncard: 'app/city/oncard', //获取上牌城市
appFinanceNums: 'app/finance/nums', //获取金融分期期数
appIdcardInfo:'app/idcard/info', //识别身份证号码
appCusorderV2Customer: 'app/cusorderV2/customer', //获取客户订单
appCustomersComments:'app/customers/comments', //用户评论
appCustomersVisit_tabs: 'app/customers/visit_tabs', //回访待跟进tab
appCityArea:'app/city/area', //获取省/市/区/街道
appIdcardInfo: 'app/idcard/info', //识别身份证号码
appEmployeesLeave:'app/employees/leave', //获取离职 //提交离职
appCustomersComments: 'app/customers/comments', //用户评论
appCusorderV2Admins:'app/cusorderV2/admins', //分配订单
appCityArea: 'app/city/area', //获取省/市/区/街道
appCusorderdataInfo:'app/cusorderdata/info', //保单信息确认
appEmployeesLeave: 'app/employees/leave', //获取离职 //提交离职
appBizStats:'app/biz/stats', //数据看板首页
appBizStats_customer:'app/biz/stats_customer', //客户数据
appBizStats_wxqy:'app/biz/stats_wxqy', //企微数据
appBizStats_order:'app/biz/stats_order', //订单数据
appBizStats_days:'app/biz/stats_days', //客户/订单走势图
appBizStats_customer_pid:'app/biz/stats_customer_pid', //客户数据二级
appBizStats_order_series:'app/biz/stats_order_series', //品牌数据二级
appCusorderV2Admins: 'app/cusorderV2/admins', //分配订单
appOptions:'app/options', //获取车辆选装包
appCusorderdataInfo: 'app/cusorderdata/info', //保单信息确认
appResetgroupid:'app/user/resetgroupid', //切换角色
appBizStats: 'app/biz/stats', //数据看板首页
appBizStats_customer: 'app/biz/stats_customer', //客户数据
appBizStats_wxqy: 'app/biz/stats_wxqy', //企微数据
appBizStats_order: 'app/biz/stats_order', //订单数据
appBizStats_days: 'app/biz/stats_days', //客户/订单走势图
appBizStats_customer_pid: 'app/biz/stats_customer_pid', //客户数据二级
appBizStats_order_series: 'app/biz/stats_order_series', //品牌数据二级
appOptions: 'app/options', //获取车辆选装包
appResetgroupid: 'app/user/resetgroupid', //切换角色
appClues: "app/clues", //获取线索列表 获取线索详情
appCluesLogs: "app/clueslogs", //线索日志
appSignConf: "app/sign/conf", //签到配置信息
appUserConf: "app/sign/userConf", //用户签到配置信息
appSign: "app/sign", //用户签到
}
//远程图片存储地址
@@ -192,17 +197,17 @@ var elementScrollTop = '150'
/**
* 提醒模板id
*/
var bookTmpId ='zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo'
*/
var bookTmpId = 'zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo'
/**
* 开奖模板id
*/
*/
var getLotteryTmpId = '5Lv1DATQLG23omDhIA8DS2ZBM6zU9prvt94BO7S9exc'
/**
* 模板id
*/
*/
var subscribeTmpId = {
book: 'zT5wqntUU0ipSJY7Hlw4T4lKfWwTddn3tv8udUv-rdo',
getlottery: '5Lv1DATQLG23omDhIA8DS2ZBM6zU9prvt94BO7S9exc'
@@ -210,9 +215,9 @@ var subscribeTmpId = {
/**
* 接口白名单
*/
*/
var white401UrlList = {
'app/home/qrcode':'app/home/qrcode'
'app/home/qrcode': 'app/home/qrcode'
}
/**
+28
View File
@@ -1006,4 +1006,32 @@ apiQuery.getAppCluesLogs = function (params) {
HttpRequest(true, Config.api.appCluesLogs, 2, params, "GET", resolve, reject)
})
}
//获取签到配置信息
apiQuery.getappSignConf = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appSignConf, 2, params, "GET", resolve, reject)
})
}
//获取用户签到配置信息
apiQuery.getappUserConf = function (params) {
return new Promise(function (resolve, reject) {
HttpNoUkeyRequest(false, Config.api.appUserConf, 2, params, "GET", resolve, reject)
})
}
//获取签到配置信息
apiQuery.getappUserTel = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appUserTel, 2, params, "GET", resolve, reject)
})
}
//用户签到
apiQuery.postAppSign = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appSign, 2, params, "POST", resolve, reject)
})
}
export default apiQuery;
+39 -36
View File
@@ -1,6 +1,8 @@
import Config from '../config';
import { toEncrypt, randomString } from 'stringEncrypt';
import {
toEncrypt,
randomString
} from 'stringEncrypt';
let app = getApp();
function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack, reject) {
@@ -10,8 +12,8 @@ function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack
let paramSession = sessionChoose == 1 ? {
'content-type': 'application/x-www-form-urlencoded'
} : {
'content-type': 'application/json'
};
'content-type': 'application/json'
};
var params = Object.prototype.toString.call(params) == "[object Object]" ? params : {};
params["version"] = Config.version;
params["nonce_str"] = randomString();
@@ -45,7 +47,7 @@ function HttpNoUkeyRequest(loading, url, sessionChoose, params, method, callBack
} else {
app.printErrorClient('failrequest', ['api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
reject(res.data);
if (Config.white401UrlList[url] === url) {//接口白名单
if (Config.white401UrlList[url] === url) { //接口白名单
return
}
wx.showToast({
@@ -75,8 +77,8 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
let paramSession = sessionChoose == 1 ? {
'content-type': 'application/x-www-form-urlencoded'
} : {
'content-type': 'application/json'
};
'content-type': 'application/json'
};
var params = Object.prototype.toString.call(params) == "[object Object]" ? params : {};
params["ukey"] = ukey;
params["version"] = Config.version;
@@ -104,21 +106,21 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
// HttpRequest(loading, url, sessionChoose, params, method, callBack, reject)
// })
//if (getCurrentPages().pop().route != 'pages/login/index'){
wx.clearStorage()
wx.reLaunch({
url: '/pages/login/index'
})
wx.clearStorage()
wx.reLaunch({
url: '/pages/login/index'
})
//}
}else{
if (res.data.code==200){
} else {
if (res.data.code == 200) {
callBack(res.data);
}else{
app.printErrorClient('failrequest',['api地址:'+url,'传入数据:'+JSON.stringify(serectParams),'响应数据:'+JSON.stringify(res.data)])
} else {
app.printErrorClient('failrequest', ['api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
reject(res.data);
if (Config.white401UrlList[url] === url) {//接口白名单
if (Config.white401UrlList[url] === url) { //接口白名单
return
}
if(res.data.msg){
if (res.data.msg) {
wx.showToast({
title: res.data.msg,
icon: "none"
@@ -129,7 +131,7 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
},
fail: function (res) {
console.warn("HttpRequst当中wx.request fail 执行了:调用失败")
app.printErrorClient('failrequest',['HttpRequst当中wx.request fail 执行了:调用失败','api地址:'+url,'传入数据:'+JSON.stringify(serectParams),'响应数据:'+JSON.stringify(res.data)])
app.printErrorClient('failrequest', ['HttpRequst当中wx.request fail 执行了:调用失败', 'api地址:' + url, '传入数据:' + JSON.stringify(serectParams), '响应数据:' + JSON.stringify(res.data)])
}
})
} else {
@@ -140,16 +142,16 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
// HttpRequest(loading, url, sessionChoose, params, method, callBack, reject)
// })
//if (getCurrentPages().pop().route != 'pages/login/index') {
wx.clearStorage()
wx.reLaunch({
url: '/pages/login/index'
})
wx.clearStorage()
wx.reLaunch({
url: '/pages/login/index'
})
//}
}
}
function asyncLogin(flag) {
return new Promise((reslove, reject) => {
if (app.globalData.loginRuning) {
//已经在执行了
@@ -158,7 +160,7 @@ function asyncLogin(flag) {
app.globalData.loginRuning = true;
work(reslove, reject, flag)
}
})
}
@@ -177,7 +179,7 @@ function _resloveRun() {
function work(reslove, reject, flag) {
wx.checkSession({
success: function () {
//同步获取token
let ukey = app.getStorageByKey("ukey");
console.log("asyncLogin(checkSession-success)-ukey:" + ukey)
@@ -196,20 +198,22 @@ function work(reslove, reject, flag) {
}
})
}
function wxLogin(reslove) {
wx.login({
success(res) {
console.log("执行了wx.login-code:"+res.code)
console.log("执行了wx.login-code:" + res.code)
if (res.code) {
let params = {
code: res.code,
by_code: 1,
app_id: Config.app_id,
nonce_str: randomString()
}
let sendData={
let sendData = {
...params,
sign: toEncrypt(params)
}
}
wx.request({
url: Config.api.baseUrl + Config.api.appUserUkey,
data: sendData,
@@ -219,7 +223,7 @@ function wxLogin(reslove) {
},
method: "GET",
success: function (res) {
console.log("wx.login-ukey:"+res.data.data.ukey)
console.log("wx.login-ukey:" + res.data.data.ukey)
if (res.data.code == 200) {
app.globalData.ukey = res.data.data.ukey;
app.setStorage("ukey", res.data.data.ukey, function () {
@@ -246,10 +250,9 @@ app.asyncLogin = asyncLogin;
export { HttpNoUkeyRequest, HttpRequest, asyncLogin, app }
export {
HttpNoUkeyRequest,
HttpRequest,
asyncLogin,
app
}
+1 -1
View File
@@ -134,7 +134,7 @@ let combineUrl = (DATA) => {
let toEncrypt = (DATA) => {
// let secretKey = randomString()
let data = combineUrl(DATA)
//console.log(data)//加密原始数据
// console.log(data)//加密原始数据
return md5.hex_md5(data);
}
+2 -2
View File
@@ -270,11 +270,11 @@
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 0?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="0" wx:if="{{detailinfo.status==0}}">
未见客户
</view>
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 1?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="1" wx:if="{{detailinfo.status==2}}">
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 1?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="1" wx:if="{{detailinfo.status==1}}">
到店客户
</view>
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 3?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="3">
战败客户
申请战败
</view>
</view>
<scroll-view scroll-y="true" style="max-height:1000rpx;">
+1 -1
View File
@@ -19,7 +19,7 @@
<view class="absolute right-0 box-middle mr40 pt30 pb30 font-30 color-36afa2" bindtap='getAppSms'>{{text}}</view>
</view>
<view class="mt30 font-22 color-ccc text-center">
<label class="inline-block text-middle statement fn-clear"><checkbox class="fn-fl" checked="" /><text class="pt3 fn-fl">我已阅读并同意</text></label>
<label class="inline-block text-middle statement fn-clear"><checkbox class="fn-fl" checked="true" /><text class="pt3 fn-fl">我已阅读并同意</text></label>
<text class="text-middle color-36afa2" bindtap="pushLink" data-url="/pages/statement/registration/index">《理车用户注册协议》</text>
<!-- <text class="text-middle">和</text>
<text class="text-middle color-36afa2" bindtap="pushLink" data-url="/pages/statement/privacy/index">《理车用户隐私政策》</text> -->
File diff suppressed because it is too large Load Diff
+33 -26
View File
@@ -17,11 +17,13 @@ Page({
isShowBg: true,
showHomeIcon: true
},
qrcode_img: 'http://qnimg.banping.com/20240511/171539407575215900.png',
qrcode_img: '',
qrcode_count_time: 30,
wxTimerList: {},
wxTimer: null,
nowTime: ""
nowTime: "",
item: {},
info: "",
},
/**
@@ -30,7 +32,7 @@ Page({
onLoad(options) {
let that = this
wx.getScreenBrightness({
success: (res)=>{
success: (res) => {
that.setData({
ori_screen_bright: res.value
})
@@ -42,13 +44,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.postMpQrcode()
this.setData({
nowTime:_.utils.getNowTimeFormate("TIME")
})
this.getappSignConf()
},
onHide(){
onHide() {
if (wxTimer) {
wxTimer.stop();
wxTimer = null
@@ -78,8 +77,8 @@ Page({
/**
* 接口请求小程序码
*/
postMpQrcode(){
if(this.loading) return
getappSignConf() {
if (this.loading) return
wx.showLoading({
title: '重新生成中...',
mask: true
@@ -95,30 +94,38 @@ Page({
})
/////接口方法
this.setData({
qrcode_img: this.data.qrcode_img,
loading:false
},()=>{
wx.hideLoading()
this.getTimes(this.data.qrcode_count_time).then(()=>{
this.postMpQrcode()
_.apiQuery.getappSignConf().then(res => {
this.setData({
qrcode_img: res.data.qcode,
qrcode_count_time: res.data.qrcode_count_time,
loading: false,
info: res.data
}, () => {
wx.hideLoading()
this.getTimes(this.data.qrcode_count_time).then(() => {
this.getappSignConf()
})
this.setScreenBright()
})
this.setScreenBright()
})
},
/**
* 设置亮度
*/
setScreenBright(){
wx.setScreenBrightness({value: 1 })
setScreenBright() {
wx.setScreenBrightness({
value: 1
})
},
/**
* 恢复亮度
*/
resetScreenBright(){
wx.setScreenBrightness({value: this.data.ori_screen_bright })
*/
resetScreenBright() {
wx.setScreenBrightness({
value: this.data.ori_screen_bright
})
},
/**
@@ -145,8 +152,8 @@ Page({
},
//推送链接
pushLink(e){
if(e.currentTarget.dataset.url){
pushLink(e) {
if (e.currentTarget.dataset.url) {
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
+12 -9
View File
@@ -4,11 +4,11 @@
<view class="container">
<view class="fn-flex fn-flex-between font-28 inner30">
<view class=" text-bold">
{{nowTime}}
{{info.time}}
</view>
<view class="text-right">
<view class="font-32 text-bold">车管家 XXX</view>
<view class="mt10 color-999">长沙- 长沙店</view>
<view class="font-32 text-bold">{{info.uname}}</view>
<view class="mt10 color-999">{{info.shop}}</view>
</view>
</view>
@@ -16,17 +16,20 @@
<view class="text-center color-fff font-34s pt20 pb20" style="background-color:#1a1c26;color:#fff3e4;">邀请客户微信扫码</view>
<view class="ulib-r20 bg-fff inner40" style="min-height:20vh;">
<view class="text-center">
<image class="img-400x400" src="{{qrcode_img}}" />
<image class="img-400x400" src="data:image/PNG;base64,{{qrcode_img}}" />
<view class="text-center font-28 fn-flex fn-flex-center fn-flex-middle mt25">
<text>{{wxTimerList.wxTimer.tim||0}}秒后失效</text><view class="ml15 font-24" style="color:#36f" bindtap="postMpQrcode">立即刷新</view>
<text>{{wxTimerList.wxTimer.tim||0}}秒后失效</text>
<view class="ml15 font-24" style="color:#36f" bindtap="getappSignConf">立即刷新</view>
</view>
<view class="font-20 mt25" style="color:#f10">客户点击签到,授权手机号及地理位置方可签到成功</view>
</view>
</view>
</view>
<view class="text-center mt30 font-34">本期到店礼</view>
<view class="ml30 mr30 mt30 pb30" data-url="" bindtap="pushLink">
<image mode="widthFix" style="width:100%;" src="http://qnimg.banping.com/20230523/f2b79e3e6108a5816ebfcc0c5c5d51723431a598.png" />
<view wx:if="{{info.item.title}}">
<view class="text-center mt30 font-34">{{info.item.title}}</view>
<view class="ml30 mr30 mt30 pb30" data-url="" bindtap="pushLink">
<image mode="widthFix" style="width:100%;" src="{{info.item.img}}" />
</view>
</view>
</view>
+86 -55
View File
@@ -14,35 +14,31 @@ Page({
isShowBg: true,
showHomeIcon: false
},
list: [{
icon: 'iconfont icon-yonghu',
title: '用户全程0负担',
content: '无需额外付费,即可享受报价权益'
}, {
icon: 'iconfont icon-yonghu',
title: '1次覆盖全范围',
content: '权益覆盖空间站所有合作品牌'
}, {
icon: 'iconfont icon-yonghu',
title: '赔付至高2万元',
content: '根据所购车型官方指导价划分,赔付差价'
}, {
icon: 'iconfont icon-yonghu',
title: '保价长达3个月',
content: '自购车之日起(含购车当日)90天'
}],
list: [],
userinfo: {},
has_mobile: false,
lat: 0,
lng: 0
lng: 0,
qkey: '',
info: '',
show_sign: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var obj = wx.getEnterOptionsSync()
if (obj.query.key) {
this.setData({
qkey: obj.query.key
})
}
this.getappUserConf({
'key': this.data.qkey
})
this.isBindMobile()
},
/**
@@ -73,74 +69,109 @@ Page({
},
getappUserConf(params) {
_.apiQuery.getappUserConf(params).then(res => {
this.setData({
info: res.data,
show_sign: true
})
})
},
/**
* 是否绑定用户手机号
*/
isBindMobile() {
_.userManager.isBindMobile().then(re => {
if (re) {
this.setData({
has_mobile: true
})
} else {
this.setData({
has_mobile: false
})
}
})
},
//授权手机号码
getPhoneNumber(e) {
if (e.detail.errMsg && e.detail.errMsg.indexOf('ok') > -1){
let that = this;
_.apiQuery.authUserPhone(e).then(res=>{
_.apiQuery.getUserInfo()
let that = this
_.apiQuery.asyncLogin().then(res => {
_.apiQuery.getappUserTel().then(res => {
var isBinMobile = false
if (res.data.mobile) {
isBinMobile = true
}
that.setData({
has_mobile: true
})
})
}else{
app.printErrorClient('failGetPhoneNumber',['用户拒绝授权手机号码:'+JSON.stringify(e)])
})
},
//授权手机号码
getPhoneNumber(e) {
if (e.detail.errMsg && e.detail.errMsg.indexOf('ok') > -1) {
let that = this;
_.apiQuery.authUserPhone(e).then(res => {
_.apiQuery.getappUserTel().then(res => {
if (res.data.mobile) {
that.setData({
has_mobile: true
})
this.bindsignup()
} else {
that.setData({
has_mobile: false
})
wx.showToast({
title: '授权手机号失败', //提示的内容
duration: 2000, //持续的时间
icon: 'none', //图标有success、error、loading、none四种
})
}
})
})
} else {
app.printErrorClient('failGetPhoneNumber', ['用户拒绝授权手机号码:' + JSON.stringify(e)])
}
},
/**
* 授权地理位置
*/
getUserLocation(){
*/
getUserLocation() {
let that = this
return new Promise(function (resolve, reject) {
if(app.getStorageByKey('u_lat')&&app.getStorageByKey('u_lng')){
if (app.getStorageByKey('u_lat') && app.getStorageByKey('u_lng')) {
that.setData({
lat: app.getStorageByKey('u_lat'),
lng: app.getStorageByKey('u_lng')
},()=>{
}, () => {
resolve()
})
}else{
//u_lat u_lng
} else {
//u_lat u_lng
_.userManager.getUserLocation().then(location => {
console.log(location)
that.setData({
lat: location.lat,
lng: location.lng
},()=>{
}, () => {
resolve()
})
}).catch(res=>{
}).catch(res => {
reject(res)
})
}
})
},
},
/**
* 签到
/**
* 签到
*/
bindsignup(){
this.getUserLocation().then(()=>{
///......
//签到方法
bindsignup() {
this.getUserLocation().then(() => {
let params = {
'key': this.data.qkey,
'lng': this.data.lng.toFixed(11),
'lat': this.data.lat.toFixed(11)
}
_.apiQuery.postAppSign(params).then(res => {
let arr = [];
for (const key in res.data) {
arr.push(`${key}=${res.data[key]}`)
}
let string = '?' + arr.join('&')
wx.navigateTo({
url: '/pages/signup/status' + string,
})
})
})
}
}
})
+7 -8
View File
@@ -4,21 +4,19 @@
<view class="container" style="min-height:50vh;">
<view class="inner40">
<view class="color-fff">
<view class="font-40">欢迎到访</view>
<view class="font-28 mt10"> 汽车之家空间中·娄底娄星车卖场 </view>
<view class="font-40">欢迎到访</view>
<view class="font-28 mt10"> {{info.biz_name}} </view>
</view>
<view class="card ulib-r20 inner30 box-shadow-000-10-15 relative mt40">
<view class="fn-flex fn-flex-middle fn-flex-between">
<view class="font-30">专属管家 <text class="iconfont icon-yonghu"></text>张三 为您服务 </view>
<view class="font-30">专属管家 <text class="iconfont icon-yonghu"></text>{{info.biz_uname}} 为您服务 </view>
</view>
<!-- <text class="iconfont icon-kefu absolute right-0 box-middle mr30 font-80 color-ccc" style="opacity:1;"></text> -->
</view>
<view class="card ulib-r20 bg-fff inner30 box-shadow-000-10-15 relative mt40 pb50">
<view class="font-34">价格不用比,买贵赔给你</view>
<block wx:for="{{list}}" wx:key="index">
<block wx:for="{{info.lists}}" wx:key="index">
<view class="fn-flex fn-flex-middle pt30 pb30 font-26 box-shadow-000-10-15 ulib-r20 inner30 mt30">
<view class="font-40"><text class="{{item.icon}}"></text></view>
<view class="ml30">
@@ -28,10 +26,11 @@
</view>
</block>
</view>
<view class="fixed left-0 right-0 bottom-0 mb40 ml40 mr40">
<view class="fixed left-0 right-0 bottom-0 mb40 ml40 mr40" wx:if="{{show_sign}}">
<button wx:if="{{!has_mobile}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="btn btn-36afa2 color-fff">签到有礼</button>
<button wx:else class="btn btn-36afa2 color-fff" bindtap="bindsignup">签到有礼</button>
</view>
</view>
</view>
+12
View File
@@ -10,4 +10,16 @@ page{
.card{
background-image:linear-gradient(to right,#fff,#fff3d4)
}
.popup{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 200px; /* 弹出框宽度 */
height: 100px; /* 弹出框高度 */
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
text-align: center;
padding: 20px;
}
+5 -2
View File
@@ -10,7 +10,8 @@ Page({
txtColor: '#fff',
bgColor: '#1a1c26',
isShowBg: true,
showHomeIcon: false
showHomeIcon: false,
result:[]
}
},
@@ -18,7 +19,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
result:options
})
},
/**
+6 -7
View File
@@ -2,24 +2,23 @@
<lcb-navBar titleText="{{navBar.title}}" txtColor="{{navBar.txtColor}}" bgColor="{{navBar.bgColor}}" showHomeIcon="{{navBar.showHomeIcon}}" isShowBg="{{navBar.isShowBg}}"></lcb-navBar>
<view class="container">
<view class="inner40 ml20 mr20">
<view class="inner40 ml20 mr20" wx:if="{{result.type=='success'}}">
<view class="bg-fff box-shadow-000-10-15 text-center ulib-r20 pt60 pb80 pl30 pr30">
<text class="iconfont icon-chenggong font-120" style="color:#07c160;"></text>
<view class="font-36 mt25">打卡成功</view>
<view class="font-28 mt10 color-888">您将获得XXX一份,请及时领取</view>
<view class="mt50">
<image mode="widthFix"style="width:100%;" src="http://qnimg.banping.com/20230523/f2b79e3e6108a5816ebfcc0c5c5d51723431a598.png" />
<view class="font-28 mt10 color-888" wx:if="{{result.item_title}}">您将获得{{result.item_title}}一份,请及时领取</view>
<view class="mt50" wx:if="{{result.item_img}}">
<image mode="widthFix" style="width:100%;" src="{{result.item_img}}" />
</view>
</view>
</view>
<view class="inner40 ml20 mr20">
<view class="inner40 ml20 mr20" wx:else>
<view class="bg-fff box-shadow-000-10-15 text-center ulib-r20 pt60 pb80 pl30 pr30">
<text class="iconfont icon-guanbi font-120" style="color:#ff4d00;"></text>
<view class="font-36 mt25">打卡失败</view>
<view class="font-28 mt10 color-888">您未在门店的有效范围之内</view>
<view class="font-28 mt10 color-888">{{result.msg}}</view>
</view>
</view>
</view>
-3
View File
@@ -1,7 +1,4 @@
/* pages/signup/status.wxss */
//- page{
//- background-image:linear-gradient(to bottom, #f9fdff, #fff);
//- }
page{
background-repeat:no-repeat;
background-position:center bottom;
+1 -1
View File
@@ -1,5 +1,5 @@
{
"appid": "wx71095d4049de3ed1",
"appid": "wx4733380c110313ec",
"compileType": "miniprogram",
"libVersion": "3.0.0",
"packOptions": {
+7
View File
@@ -8,6 +8,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/signup/index",
"pathName": "pages/signup/index",
"query": "key=2juXoYIdOE1HZ4s6lMUtJ",
"launchMode": "default",
"scene": null
},
{
"name": "待跟进客户",
"pathName": "pages/customer/filterList/index",