| @@ -1,7 +1,7 @@ | |||||
| { | { | ||||
| "pages": [ | "pages": [ | ||||
| "pages/login/login", | |||||
| "pages/index/index", | "pages/index/index", | ||||
| "pages/main/main", | |||||
| "pages/user/user", | "pages/user/user", | ||||
| "pages/scan/scan", | "pages/scan/scan", | ||||
| "pages/writeoffPage/writeoffPage", | "pages/writeoffPage/writeoffPage", | ||||
| @@ -19,7 +19,8 @@ | |||||
| "pages/getMerchant/index", | "pages/getMerchant/index", | ||||
| "pages/editSuccess/index", | "pages/editSuccess/index", | ||||
| "pages/exchange/index", | "pages/exchange/index", | ||||
| "pages/creditOperate/index" | |||||
| "pages/creditOperate/index", | |||||
| "pages/goHtml/goHtml" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| @@ -31,7 +32,7 @@ | |||||
| "backgroundColor": "#fff", | "backgroundColor": "#fff", | ||||
| "list": [ | "list": [ | ||||
| { | { | ||||
| "pagePath": "pages/index/index", | |||||
| "pagePath": "pages/main/main", | |||||
| "text": "首页", | "text": "首页", | ||||
| "iconPath": "assets/images/home-n.png", | "iconPath": "assets/images/home-n.png", | ||||
| "selectedIconPath": "assets/images/home-y.png" | "selectedIconPath": "assets/images/home-y.png" | ||||
| @@ -1,11 +1,10 @@ | |||||
| let config = require("../config/config.js"); | let config = require("../config/config.js"); | ||||
| var app = getApp(); | var app = getApp(); | ||||
| let host = "https://btest.malls.iformall.com/B" | |||||
| const func = { | const func = { | ||||
| getMallIcon: function () { | getMallIcon: function () { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.getMallIcon, | |||||
| url: config.api.getMallIcon, | |||||
| data: { | data: { | ||||
| appId: config.weapp.appId, | appId: config.weapp.appId, | ||||
| }, | }, | ||||
| @@ -24,7 +23,7 @@ const func = { | |||||
| userLogin: function (phone, password, latitude, longitude) { | userLogin: function (phone, password, latitude, longitude) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.login, | |||||
| url: config.api.login, | |||||
| data: { | data: { | ||||
| appId: config.weapp.appId, | appId: config.weapp.appId, | ||||
| phone: phone, | phone: phone, | ||||
| @@ -49,7 +48,7 @@ const func = { | |||||
| getUserInfo: function (phone, password, latitude, longitude) { | getUserInfo: function (phone, password, latitude, longitude) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.userDetail, | |||||
| url: config.api.userDetail, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token | "token": app.globalData.token | ||||
| @@ -81,12 +80,12 @@ const func = { | |||||
| getCouponList: function (pageNum, pageSize) { | getCouponList: function (pageNum, pageSize) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.couponList, | |||||
| url: config.api.couponList, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token | "token": app.globalData.token | ||||
| }, | }, | ||||
| method: "GET", | |||||
| method: "get", | |||||
| data: { | data: { | ||||
| pageNum: pageNum, | pageNum: pageNum, | ||||
| pageSize: pageSize | pageSize: pageSize | ||||
| @@ -109,12 +108,12 @@ const func = { | |||||
| getCouponOrderDetail: function (couponOrderId) { | getCouponOrderDetail: function (couponOrderId) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.couponOrderDetail, | |||||
| url: config.api.couponOrderDetail, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token | "token": app.globalData.token | ||||
| }, | }, | ||||
| method: "GET", | |||||
| method: "get", | |||||
| data: { | data: { | ||||
| couponOrderId: couponOrderId | couponOrderId: couponOrderId | ||||
| }, | }, | ||||
| @@ -136,12 +135,12 @@ const func = { | |||||
| getHtml: function (couponOrderId) { | getHtml: function (couponOrderId) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.couponHtmlDetail, | |||||
| url: config.api.couponHtmlDetail, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token | "token": app.globalData.token | ||||
| }, | }, | ||||
| method: "GET", | |||||
| method: "get", | |||||
| data: { | data: { | ||||
| couponOrderId: couponOrderId | couponOrderId: couponOrderId | ||||
| }, | }, | ||||
| @@ -163,7 +162,7 @@ const func = { | |||||
| updateUserPassword: function (phone, yzm, newPwd) { | updateUserPassword: function (phone, yzm, newPwd) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.userUpdatePwd, | |||||
| url: config.api.userUpdatePwd, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| }, | }, | ||||
| @@ -192,11 +191,11 @@ const func = { | |||||
| hasValidationCode: function (phone, yzm) { | hasValidationCode: function (phone, yzm) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.hasValidationCode, | |||||
| url: config.api.hasValidationCode, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| }, | }, | ||||
| method: "GET", | |||||
| method: "get", | |||||
| data: { | data: { | ||||
| phone: phone, | phone: phone, | ||||
| code: yzm, | code: yzm, | ||||
| @@ -221,11 +220,11 @@ const func = { | |||||
| sendValidationCode: function (phone) { | sendValidationCode: function (phone) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.sendValidationCode, | |||||
| url: config.api.sendValidationCode, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| }, | }, | ||||
| method: "GET", | |||||
| method: "get", | |||||
| data: { | data: { | ||||
| phone: phone, | phone: phone, | ||||
| type: 1, | type: 1, | ||||
| @@ -249,7 +248,7 @@ const func = { | |||||
| couponOrderVerify: function (couponOrderId, verifyRemark) { | couponOrderVerify: function (couponOrderId, verifyRemark) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.couponOrderVerify, | |||||
| url: config.api.couponOrderVerify, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token, | "token": app.globalData.token, | ||||
| @@ -278,7 +277,7 @@ const func = { | |||||
| getOpenId: function (code,bUserId) { | getOpenId: function (code,bUserId) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.getOpenId, | |||||
| url: config.api.getOpenId, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": app.globalData.token, | "token": app.globalData.token, | ||||
| @@ -307,7 +306,7 @@ const func = { | |||||
| getSuperOpenId: function (code) { | getSuperOpenId: function (code) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.getSuperOpenId, | |||||
| url: config.api.getSuperOpenId, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| }, | }, | ||||
| @@ -331,7 +330,7 @@ const func = { | |||||
| getUserPhone: function (encryptedData, iv, superopenId, session_key) { | getUserPhone: function (encryptedData, iv, superopenId, session_key) { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: host+config.api.getUserPhone, | |||||
| url: config.api.getUserPhone, | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| }, | }, | ||||
| @@ -39,7 +39,7 @@ Component({ | |||||
| methods: { | methods: { | ||||
| backHome: function () { | backHome: function () { | ||||
| tt.switchTab({ | tt.switchTab({ | ||||
| url: `/pages/index/index`, | |||||
| url: `/pages/main/main`, | |||||
| success(res) { | success(res) { | ||||
| console.log(`${res}`); | console.log(`${res}`); | ||||
| }, | }, | ||||
| @@ -1,8 +1,17 @@ | |||||
| const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync().extConfig : {} | |||||
| let weappId = extConfig.weappId; | |||||
| let dataTowerUrl = extConfig.attr.datatowerurl; | |||||
| let url = extConfig.attr.configUrl; | |||||
| var apiPrefix = url + '/B'; | |||||
| let config = { | let config = { | ||||
| api:{ | |||||
| /** | |||||
| * 接口用途:login | |||||
| */ | |||||
| api: { | |||||
| // 获取进件 页面地址 | |||||
| findTt: "/api/merchant/getTtReceiverUrl", | |||||
| /** | |||||
| * 接口用途:login | |||||
| */ | |||||
| login: '/api/user/login', | login: '/api/user/login', | ||||
| /** | /** | ||||
| * B端用户详情 | * B端用户详情 | ||||
| @@ -10,11 +19,11 @@ let config = { | |||||
| userDetail: '/api/user/detail', | userDetail: '/api/user/detail', | ||||
| getMallIcon: '/api/mall/getAppIcon', | getMallIcon: '/api/mall/getAppIcon', | ||||
| //提现列表 | //提现列表 | ||||
| withdrawLsit:"/api/cashout/list", | |||||
| withdrawLsit: "/api/cashout/list", | |||||
| //账户余额 | //账户余额 | ||||
| balance:"/api/cashout/getCurrentCashOutData", | |||||
| balance: "/api/cashout/getCurrentCashOutData", | |||||
| // 商户提现 | // 商户提现 | ||||
| userWithdraw:"/api/cashout/cashout", | |||||
| userWithdraw: "/api/cashout/cashout", | |||||
| /** | /** | ||||
| * 修改密码 | * 修改密码 | ||||
| */ | */ | ||||
| @@ -106,23 +115,23 @@ let config = { | |||||
| /** | /** | ||||
| *刷卡支付某日期交易总流水 | *刷卡支付某日期交易总流水 | ||||
| */ | */ | ||||
| getMicroPayAmountOnDate:'/api/micropay/getMicroPayAmountOnDate', | |||||
| /** | |||||
| * 首页账单列表 | |||||
| */ | |||||
| listBillOweAndWaitPay:"/api/bill/listBillOweAndWaitPay", | |||||
| getMicroPayAmountOnDate: '/api/micropay/getMicroPayAmountOnDate', | |||||
| /** | |||||
| * 首页账单列表 | |||||
| */ | |||||
| listBillOweAndWaitPay: "/api/bill/listBillOweAndWaitPay", | |||||
| /** | /** | ||||
| * 账单 | * 账单 | ||||
| */ | */ | ||||
| listBill:"/api/bill/listBill", | |||||
| listBill: "/api/bill/listBill", | |||||
| /** | /** | ||||
| * 获得openId | * 获得openId | ||||
| */ | */ | ||||
| getOpenId:"/api/wx/getOpenId", | |||||
| getOpenId: "/api/wx/getOpenId", | |||||
| /** | /** | ||||
| * 获得超级管理员openid | * 获得超级管理员openid | ||||
| */ | */ | ||||
| getSuperOpenId:"/api/wx/getSuperOpenId", | |||||
| getSuperOpenId: "/api/wx/getSuperOpenId", | |||||
| /** | /** | ||||
| * 获得手机号 | * 获得手机号 | ||||
| */ | */ | ||||
| @@ -130,31 +139,31 @@ let config = { | |||||
| /** | /** | ||||
| * | * | ||||
| */ | */ | ||||
| getUserPhoneForBuser:"/api/wx/getUserPhoneForBuser", | |||||
| getUserPhoneForBuser: "/api/wx/getUserPhoneForBuser", | |||||
| /** | /** | ||||
| * 发起微信小程序支付订单 | * 发起微信小程序支付订单 | ||||
| */ | */ | ||||
| createorder:"/api/pay/create", | |||||
| createorder: "/api/pay/create", | |||||
| /** | /** | ||||
| * 更新支付订单状态 | * 更新支付订单状态 | ||||
| */ | */ | ||||
| updatePayBill:'/api/pay/updatePayBill', | |||||
| updatePayBill: '/api/pay/updatePayBill', | |||||
| /** | /** | ||||
| * 获取用户等级及在此商户的折扣率及折扣后的金额 | * 获取用户等级及在此商户的折扣率及折扣后的金额 | ||||
| */ | */ | ||||
| getUserInfo:"/api/user/getUserInfo", | |||||
| getUserInfo: "/api/user/getUserInfo", | |||||
| /** | /** | ||||
| * 扫C端会员码返回会员信息 | * 扫C端会员码返回会员信息 | ||||
| */ | */ | ||||
| memScan:"/api/mem/mem_scan", | |||||
| memScan: "/api/mem/mem_scan", | |||||
| /** | /** | ||||
| * 补充会员信息 | * 补充会员信息 | ||||
| */ | */ | ||||
| cMemberAdd:"/api/cuser/updateUserInfo", | |||||
| cMemberAdd: "/api/cuser/updateUserInfo", | |||||
| /** | /** | ||||
| * | * | ||||
| */ | */ | ||||
| findUserInfo:'/api/cuser/findUserInfo', | |||||
| findUserInfo: '/api/cuser/findUserInfo', | |||||
| /** | /** | ||||
| *b端来源会员信息分页列表接口 | *b端来源会员信息分页列表接口 | ||||
| */ | */ | ||||
| @@ -162,47 +171,47 @@ let config = { | |||||
| /** | /** | ||||
| *C端扫B端储值卡交易流水(消费记录 + 补贴)列表接口 | *C端扫B端储值卡交易流水(消费记录 + 补贴)列表接口 | ||||
| */ | */ | ||||
| cardPayList:"/api/cardPay/list", | |||||
| cardPayList: "/api/cardPay/list", | |||||
| /** | /** | ||||
| *C端扫B端储值卡交易流水SUM | *C端扫B端储值卡交易流水SUM | ||||
| */ | */ | ||||
| payMum:"/api/cardPay/sum", | |||||
| payMum: "/api/cardPay/sum", | |||||
| /** | /** | ||||
| 补贴记录 | 补贴记录 | ||||
| */ | */ | ||||
| subsidyList:"/api/subsidy/list", | |||||
| subsidyList: "/api/subsidy/list", | |||||
| /** | /** | ||||
| * 补贴记录汇总 | * 补贴记录汇总 | ||||
| */ | */ | ||||
| subsidySum:"/api/subsidy/sum", | |||||
| subsidySum: "/api/subsidy/sum", | |||||
| /** | /** | ||||
| * 图片上传 | * 图片上传 | ||||
| */ | */ | ||||
| imgUpload:'/api/upload/awsFileUpload', | |||||
| imgUpload: '/api/upload/awsFileUpload', | |||||
| /** | /** | ||||
| * 获取商户列表 | * 获取商户列表 | ||||
| */ | */ | ||||
| getMerchentList:"/api/merchant/name_list", | |||||
| getMerchentList: "/api/merchant/name_list", | |||||
| /** | /** | ||||
| * 获取消费金额对应积分 | * 获取消费金额对应积分 | ||||
| */ | */ | ||||
| getCreditNum:"/api/credit/findByMerchantIdAndSpend", | |||||
| getCreditNum: "/api/credit/findByMerchantIdAndSpend", | |||||
| /** | /** | ||||
| * 积分新增 | * 积分新增 | ||||
| */ | */ | ||||
| addCredit:"/api/credit/add", | |||||
| addCredit: "/api/credit/add", | |||||
| /** | /** | ||||
| * 根据手机号查询C端会员信息 | * 根据手机号查询C端会员信息 | ||||
| */ | */ | ||||
| findByPhone:"/api/credit/findByPhone", | |||||
| findByPhone: "/api/credit/findByPhone", | |||||
| /** | /** | ||||
| * 获取积分操作记录 | * 获取积分操作记录 | ||||
| */ | */ | ||||
| getCreditList:"/api/credit/list", | |||||
| getCreditList: "/api/credit/list", | |||||
| /** | /** | ||||
| * 查询账户信息 | * 查询账户信息 | ||||
| */ | */ | ||||
| findAccountById:"/api/merchant/findAccountById", | |||||
| findAccountById: "/api/merchant/findAccountById", | |||||
| /** | /** | ||||
| * 更新收款账户信息 | * 更新收款账户信息 | ||||
| */ | */ | ||||
| @@ -214,19 +223,19 @@ let config = { | |||||
| /** | /** | ||||
| * 获得解单的list | * 获得解单的list | ||||
| */ | */ | ||||
| tradeDailyList:"/api/wxMerchantTradeDaily/list", | |||||
| tradeDailyList: "/api/wxMerchantTradeDaily/list", | |||||
| /** | /** | ||||
| *保存或编辑 | *保存或编辑 | ||||
| */ | */ | ||||
| saveOrUpdate:"/api/wxMerchantTradeDaily/saveOrUpdate", | |||||
| saveOrUpdate: "/api/wxMerchantTradeDaily/saveOrUpdate", | |||||
| /** | /** | ||||
| * 解单详情详情 | * 解单详情详情 | ||||
| */ | */ | ||||
| wxMerchantTradeDailyfindById:"/api/wxMerchantTradeDaily/findById", | |||||
| wxMerchantTradeDailyfindById: "/api/wxMerchantTradeDaily/findById", | |||||
| /** | /** | ||||
| * 获取会员可赠送的券列表 | * 获取会员可赠送的券列表 | ||||
| */ | */ | ||||
| wxMerchantcouponSend:"/api/couponSend/list", | |||||
| wxMerchantcouponSend: "/api/couponSend/list", | |||||
| /** | /** | ||||
| * 商户注券操作 | * 商户注券操作 | ||||
| */ | */ | ||||
| @@ -238,11 +247,11 @@ let config = { | |||||
| /** | /** | ||||
| * 获取结算单详情接口 | * 获取结算单详情接口 | ||||
| */ | */ | ||||
| findSettleById:"/api/bill/findSettleById", | |||||
| findSettleById: "/api/bill/findSettleById", | |||||
| /** | /** | ||||
| * 检查用户手机授权状态 | * 检查用户手机授权状态 | ||||
| */ | */ | ||||
| checkPhoneStatus:"/api/wx/checkPhoneStatus", | |||||
| checkPhoneStatus: "/api/wx/checkPhoneStatus", | |||||
| /** | /** | ||||
| * 检查用户是否有权限修改收款账户 | * 检查用户是否有权限修改收款账户 | ||||
| */ | */ | ||||
| @@ -258,11 +267,11 @@ let config = { | |||||
| /** | /** | ||||
| * 获取营销结算列表 | * 获取营销结算列表 | ||||
| */ | */ | ||||
| getSubsidyList:"/api/subsidy/list", | |||||
| getSubsidyList: "/api/subsidy/list", | |||||
| /** | /** | ||||
| * 获取营销结算汇总 | * 获取营销结算汇总 | ||||
| */ | */ | ||||
| getSubsidySummary:"/api/subsidy/summary", | |||||
| getSubsidySummary: "/api/subsidy/summary", | |||||
| /** | /** | ||||
| *刷卡支付订单 | *刷卡支付订单 | ||||
| */ | */ | ||||
| @@ -270,11 +279,11 @@ let config = { | |||||
| /** | /** | ||||
| * 查询商户授权状态 | * 查询商户授权状态 | ||||
| */ | */ | ||||
| getOpenIdByPhone:"/api/merchant/getOpenIdByPhone", | |||||
| getOpenIdByPhone: "/api/merchant/getOpenIdByPhone", | |||||
| /** | /** | ||||
| * B端发卷-查询 | * B端发卷-查询 | ||||
| */ | */ | ||||
| getCouponlist:"/api/coupon/list", | |||||
| getCouponlist: "/api/coupon/list", | |||||
| /** | /** | ||||
| * B端发卷-已上架 | * B端发卷-已上架 | ||||
| */ | */ | ||||
| @@ -286,44 +295,51 @@ let config = { | |||||
| /** | /** | ||||
| * B端发卷-修改通用券 | * B端发卷-修改通用券 | ||||
| */ | */ | ||||
| updataCoupon:"/api/coupon/update", | |||||
| updataCoupon: "/api/coupon/update", | |||||
| /** | /** | ||||
| *B端发卷- 提交审批 | *B端发卷- 提交审批 | ||||
| */ | */ | ||||
| submitExamine:"/api/coupon/apply", | |||||
| submitExamine: "/api/coupon/apply", | |||||
| /** | /** | ||||
| * B端发卷-投放 | * B端发卷-投放 | ||||
| */ | */ | ||||
| addbatch:"/api/wxCouponChannel/addbatch", | |||||
| /** | |||||
| * B端发卷-下架 | |||||
| */ | |||||
| addbatch: "/api/wxCouponChannel/addbatch", | |||||
| /** | |||||
| * B端发卷-下架 | |||||
| */ | |||||
| soldOut: "/api/wxCouponChannel/update", | soldOut: "/api/wxCouponChannel/update", | ||||
| /** | |||||
| * B端发卷-作废 | |||||
| */ | |||||
| cancellation:"/api/coupon/update", | |||||
| /** | |||||
| * B端发卷-作废 | |||||
| */ | |||||
| cancellation: "/api/coupon/update", | |||||
| /** | /** | ||||
| * B端发卷-查询审批历史记录 | * B端发卷-查询审批历史记录 | ||||
| */ | */ | ||||
| lookHistory :"/api/coupon/flowHistory", | |||||
| lookHistory: "/api/coupon/flowHistory", | |||||
| /** | /** | ||||
| * 配送列表 | * 配送列表 | ||||
| */ | */ | ||||
| goodsList:'/api/couponOrder/goodsList', | |||||
| goodsList: '/api/couponOrder/goodsList', | |||||
| /** | /** | ||||
| * 查询配送详情 | * 查询配送详情 | ||||
| */ | */ | ||||
| ouponOrderId:"/api/couponOrder/detail", | |||||
| ouponOrderId: "/api/couponOrder/detail", | |||||
| /** | /** | ||||
| * 发货 | * 发货 | ||||
| */ | */ | ||||
| sendGoods:"/api/couponOrder/sendGoods", | |||||
| }, | |||||
| weapp: { | |||||
| appId: "tt7af40c49e5cd8d5001", | |||||
| dataTowerUrl: "https://mobiletest.malls.iformall.com", | |||||
| } | |||||
| sendGoods: "/api/couponOrder/sendGoods", | |||||
| }, | |||||
| weapp: { | |||||
| appId: weappId, | |||||
| dataTowerUrl: dataTowerUrl, | |||||
| // appId: "tt7af40c49e5cd8d5001", | |||||
| // dataTowerUrl: "https://mobiletest.malls.iformall.com", | |||||
| } | |||||
| } | |||||
| for (var key in config.api) { | |||||
| config.api[key] = apiPrefix + config.api[key]; | |||||
| } | } | ||||
| console.log(config,"config"); | |||||
| module.exports = config; | module.exports = config; | ||||
| @@ -0,0 +1,47 @@ | |||||
| { | |||||
| "ext": { | |||||
| "attr": { | |||||
| "configUrl": "https://btest.malls.iformall.com", | |||||
| "datatowerurl": "https://mobile.malls.iformall.com" | |||||
| }, | |||||
| "name": "富茂券商户端模板", | |||||
| "weappId": "tt7af40c49e5cd8d5001", | |||||
| "appVersion": "Btest.5.1.0" | |||||
| }, | |||||
| "debug": false, | |||||
| "tabBar": { | |||||
| "color": "#9F9F9F", | |||||
| "selectedColor": "#52a0fd", | |||||
| "backgroundColor": "#fff", | |||||
| "list": [ | |||||
| { | |||||
| "pagePath": "pages/main/main", | |||||
| "text": "首页", | |||||
| "iconPath": "assets/images/home-n.png", | |||||
| "selectedIconPath": "assets/images/home-y.png" | |||||
| }, | |||||
| { | |||||
| "pagePath": "pages/user/user", | |||||
| "text": "我的", | |||||
| "iconPath": "assets/images/user-n.png", | |||||
| "selectedIconPath": "assets/images/user-y.png" | |||||
| } | |||||
| ] | |||||
| }, | |||||
| "window": { | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarBackgroundColor": "#52A0FD" | |||||
| }, | |||||
| "extAppid": "tt7af40c49e5cd8d5001", | |||||
| "extEnable": true, | |||||
| "permission": { | |||||
| "scope.userLocation": { | |||||
| "desc": "你的位置信息将用于小程序位置接口的效果展示" | |||||
| } | |||||
| }, | |||||
| "directCommit": false, | |||||
| "networkTimeout": { | |||||
| "request": 30000, | |||||
| "downloadFile": 10000 | |||||
| } | |||||
| } | |||||
| @@ -22,7 +22,7 @@ Page({ | |||||
| }, | }, | ||||
| goBack(){ | goBack(){ | ||||
| tt.reLaunch({ | tt.reLaunch({ | ||||
| url: '/pages/index/index', | |||||
| url: '/pages/main/main', | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -9,7 +9,7 @@ Page({ | |||||
| }, | }, | ||||
| reBack(){ | reBack(){ | ||||
| tt.switchTab({ | tt.switchTab({ | ||||
| url: '/pages/index/index', | |||||
| url: '/pages/main/main', | |||||
| }) | }) | ||||
| }, | }, | ||||
| onLoad(options) { | onLoad(options) { | ||||
| @@ -0,0 +1,11 @@ | |||||
| // d:\fumaolianke\ttFmB\TTB\pages\goHtml\goHtml.js | |||||
| Page({ | |||||
| data: { | |||||
| httpUrl:"" | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| this.setData({ | |||||
| httpUrl:options.url | |||||
| }) | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "usingComponents": {} | |||||
| } | |||||
| @@ -0,0 +1,8 @@ | |||||
| <web-view | |||||
| src="{{httpUrl}}" | |||||
| progressbar-color="{{progressbar-color}}" | |||||
| bindmessage="bindmessage" | |||||
| bindload="bindload" | |||||
| binderror="binderror" | |||||
| > | |||||
| </web-view> | |||||
| @@ -1,705 +1,222 @@ | |||||
| const config = require('../../config/config.js') | const config = require('../../config/config.js') | ||||
| const app = getApp() | |||||
| const Common = require('../../common/common.js') | |||||
| const Http = require('../../utils/http.js') | const Http = require('../../utils/http.js') | ||||
| const HttpBasics = require('../../utils/HttpBasics.js') | const HttpBasics = require('../../utils/HttpBasics.js') | ||||
| const util = require('../../utils/util') | |||||
| const changeNum = require('../../utils/changeNum.js') | |||||
| import * as echarts from '../../ec-canvas/echarts'; | |||||
| var app = getApp() | |||||
| function setOption(chart, xdata, ydata) { | |||||
| const option = { | |||||
| title: { | |||||
| padding: [10, 0, 0, 20], | |||||
| textStyle: { | |||||
| fontSize: 14, | |||||
| color: '#FF6A6A' | |||||
| }, | |||||
| }, | |||||
| backgroundColor: "#fff", | |||||
| color: ["#006EFF", "#67E0E3", "#9FE6B8"], | |||||
| animation: true, | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: xdata, | |||||
| splitLine: { | |||||
| show: false | |||||
| }, //去除网格线 | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| } | |||||
| }, | |||||
| yAxis: [{ | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| formatter: function(a, b) { | |||||
| return a | |||||
| } | |||||
| }, | |||||
| type: 'value', | |||||
| }], | |||||
| series: [{ | |||||
| type: 'line', | |||||
| data: ydata, | |||||
| smooth: true, //这句就是让曲线变平滑的 | |||||
| lineStyle: { | |||||
| normal: { | |||||
| color: '#33cdff', | |||||
| } | |||||
| }, | |||||
| areaStyle: { | |||||
| normal: { | |||||
| color: new echarts.graphic.LinearGradient( | |||||
| 0, 0, 0, 1, [{ | |||||
| offset: 0, | |||||
| color: '#FFF' | |||||
| }, { | |||||
| offset: 1, | |||||
| color: '#52A0FD' | |||||
| }] | |||||
| ) | |||||
| } | |||||
| }, | |||||
| }] | |||||
| }; | |||||
| chart.setOption(option) | |||||
| console.log(chart) | |||||
| } | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| function getBarOption(x, y) { | |||||
| return { | |||||
| color: ['#FF6A6A'], | |||||
| fontSize: "14rpx", | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: x | |||||
| }, | |||||
| yAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'value', | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| } | |||||
| }, | |||||
| series: [{ | |||||
| data: y, | |||||
| type: 'line', | |||||
| smooth: true, | |||||
| lineStyle: { | |||||
| normal: { | |||||
| color: '#FF6A6A', | |||||
| } | |||||
| }, | |||||
| areaStyle: {} | |||||
| }] | |||||
| }; | |||||
| }; | |||||
| /** | |||||
| * 核销记录 | |||||
| */ | |||||
| function getScatterOption(x, y) { | |||||
| return { | |||||
| color: '#FFCE00', | |||||
| fontSize: "14rpx", | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: x | |||||
| }, | |||||
| yAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'value', | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| } | |||||
| }, | |||||
| series: [{ | |||||
| data: y, | |||||
| type: 'line', | |||||
| smooth: true, | |||||
| areaStyle: {} | |||||
| }] | |||||
| }; | |||||
| }; | |||||
| /** | |||||
| * 获取交易记录 | |||||
| */ | |||||
| function getTabletListOrder() { | |||||
| let newArr = { | |||||
| xList: [], | |||||
| amountList: [] | |||||
| } | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.dateAmountRecordListOrder, app.globalData.token, '', {}, (res) => { | |||||
| // 日期 | |||||
| res.data && res.data.map(file => { | |||||
| newArr.xList.push(file.mouthAndDate) | |||||
| newArr.amountList.push(file.amountStr) | |||||
| }) | |||||
| resolve(newArr); | |||||
| }) | |||||
| }) | |||||
| }; | |||||
| /** | |||||
| * 获取核销记录 | |||||
| */ | |||||
| function getTabletListVerify() { | |||||
| let newArr = { | |||||
| xList: [], | |||||
| amountList: [] | |||||
| } | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.dateAmountRecordListVerified, app.globalData.token, '', {}, (res) => { | |||||
| // 日期 | |||||
| res.data && res.data.map(file => { | |||||
| newArr.xList.push(file.mouthAndDate) | |||||
| newArr.amountList.push(file.amountStr) | |||||
| }) | |||||
| resolve(newArr) | |||||
| }) | |||||
| }) | |||||
| }; | |||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| token:'', | |||||
| currentIndex: 0, | |||||
| userInfo: {}, | |||||
| recordMoney: 0, | |||||
| recordData: [], | |||||
| userInfoLoadIf: false, | |||||
| ec: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| classIfyList: [ | |||||
| // { | |||||
| // text: '收银台', | |||||
| // icon: 'iconfont icon-shouyintai1', | |||||
| // id: 3 | |||||
| // }, | |||||
| { | |||||
| text: '会员核销', | |||||
| icon: 'iconfont icon-hexiao', | |||||
| id: 0 | |||||
| }, | |||||
| // { | |||||
| // text: '消费卡收款', | |||||
| // icon: 'iconfont icon-shouye1', | |||||
| // id: 1 | |||||
| // }, | |||||
| // { | |||||
| // text: '当日解单', | |||||
| // icon: 'iconfont icon-shoufukuan', | |||||
| // id: 2 | |||||
| // }, | |||||
| { | |||||
| text: '会员积分', | |||||
| icon: 'iconfont icon-jifen', | |||||
| id: 4 | |||||
| }, | |||||
| // { | |||||
| // text: '会员赠券', | |||||
| // icon: 'iconfont icon-quan', | |||||
| // id: 5 | |||||
| // }, | |||||
| { | |||||
| text: '营销结算', | |||||
| icon: 'iconfont icon-jiesuan', | |||||
| id: 6 | |||||
| }, | |||||
| // { | |||||
| // text: '商户建券', | |||||
| // icon: 'iconfont icon-lingquanzhongxin', | |||||
| // id: 7 | |||||
| // }, | |||||
| // { | |||||
| // text: '商品配送', | |||||
| // icon: 'iconfont icon-wuliu', | |||||
| // id: 8 | |||||
| // } | |||||
| ], | |||||
| amountMoney: '', | |||||
| djZmoney:'', | |||||
| writeOffMoney: '', | |||||
| getFullYear: new Date().getFullYear(), | |||||
| getMonth: new Date().getMonth() + 1, | |||||
| getDate: new Date().getDate(), | |||||
| dateTime: '', | |||||
| show: null, | |||||
| billList: [], | |||||
| ifShowChart: null, | |||||
| ifShowChart1: null, | |||||
| ifShowChart2: null, | |||||
| ecBar: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| ecScatter: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| djArr:[], | |||||
| djMoney:[], | |||||
| count:'' | |||||
| }, | |||||
| //获取商户信息 | |||||
| getUserInfo() { | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.userDetail, app.globalData.token, '', {}, (res) => { | |||||
| resolve(res.data); | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //今日交易额 | |||||
| getUnverifiedAmountOnDate() { | |||||
| let { | |||||
| getFullYear, | |||||
| getMonth, | |||||
| getDate, | |||||
| amountMoney, | |||||
| writeOffMoney | |||||
| } = this.data | |||||
| let dateTimer = getFullYear + '-' + getMonth + '-' + getDate | |||||
| Http.getRequest(config.api.getUnverifiedAmountOnDate, app.globalData.token, '', { | |||||
| date: dateTimer | |||||
| }, (res) => { | |||||
| console.log(res) | |||||
| this.setData({ | |||||
| amountMoney: res.data.amount, | |||||
| count: res.data.orderCount, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //今日核销额 | |||||
| getVerifiedAmountOnDate() { | |||||
| let { | |||||
| getFullYear, | |||||
| getMonth, | |||||
| getDate | |||||
| } = this.data | |||||
| let dateTimer = getFullYear + '-' + getMonth + '-' + getDate | |||||
| Http.getRequest(config.api.getVerifiedAmountOnDate, app.globalData.token, '', { | |||||
| date: dateTimer | |||||
| }, (res) => { | |||||
| this.setData({ | |||||
| writeOffMoney: res.data.amount | |||||
| logo: '../../assets/images/logo.png', | |||||
| phone: '', | |||||
| pwd: '', | |||||
| status:'', | |||||
| showpass: "hidepass", | |||||
| focus:false, | |||||
| password: true | |||||
| }, | |||||
| onLoad() { | |||||
| Common.getMallIcon() | |||||
| .then(data => { | |||||
| // debugge | |||||
| console.log(data,777) | |||||
| this.setData({ | |||||
| logo: data.data&&data.data.mallImgUrl ? data.data.mallImgUrl : '../../assets/images/logo.png', | |||||
| }) | |||||
| }) | }) | ||||
| }) | |||||
| }, | }, | ||||
| onPullDownRefresh: function() { | |||||
| let that = this; | |||||
| // that.getUnverifiedAmountOnDate() | |||||
| // that.getVerifiedAmountOnDate(); | |||||
| that.getpaybill(); | |||||
| if (that.oneComponent) { | |||||
| that.getrecordData(); | |||||
| } | |||||
| if (that.jiaoyiComponent) { | |||||
| that.getTabletListOrder(); | |||||
| } | |||||
| if (that.hexiaoComponent) { | |||||
| that.getTabletListVerify(); | |||||
| } | |||||
| tt.hideNavigationBarLoading(); | |||||
| tt.stopPullDownRefresh(); | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| onShow() { | |||||
| var that = this; | var that = this; | ||||
| this.checkuserstatus() | |||||
| }, | |||||
| onReady() { | |||||
| // this.oneComponent = this.selectComponent('#mychart-pament'); | |||||
| // this.jiaoyiComponent = this.selectComponent('#mychart-jiaoyi'); | |||||
| // this.hexiaoComponent = this.selectComponent('#mychart-hexiao'); | |||||
| this.getrecordData(); | |||||
| this.getTabletListOrder(); | |||||
| this.getTabletListVerify(); | |||||
| this.getUserInfo().then(res => { | |||||
| this.setData({ | |||||
| userInfo: res, | |||||
| userInfoLoadIf:true | |||||
| }) | |||||
| app.globalData.merchant = res; | |||||
| tt.setNavigationBarTitle({ | |||||
| title: res.mall_name + "(" + res.merchant_name + ")" | |||||
| }) | |||||
| }) | |||||
| app.globalData.userInfo = this.getUserInfo; | |||||
| }, | |||||
| /** | |||||
| * gotolook | |||||
| */ | |||||
| gotobill: function(e) { | |||||
| console.log(e) | |||||
| let owe = e.currentTarget.dataset.data.owe; | |||||
| let status = e.currentTarget.dataset.data.status; | |||||
| let receivedate = e.currentTarget.dataset.data.receiveDate; | |||||
| let starttime = e.currentTarget.dataset.data.starttime; | |||||
| let endtime = e.currentTarget.dataset.data.endtime; | |||||
| let id = e.currentTarget.dataset.data.id; | |||||
| var transactionId = e.currentTarget.dataset.data.transactionId; | |||||
| var priceDetail = e.currentTarget.dataset.data.priceDetail; | |||||
| var freeze = e.currentTarget.dataset.data.freeze; | |||||
| let pay = e.currentTarget.dataset.data.pay ? e.currentTarget.dataset.data.pay : 0; | |||||
| let latePayPrice = e.currentTarget.dataset.data.latePayPrice ? e.currentTarget.dataset.data.latePayPrice : 0; | |||||
| let serviceChargePay = e.currentTarget.dataset.data.serviceChargePay ? e.currentTarget.dataset.data.serviceChargePay : 0; | |||||
| if (starttime && endtime) { | |||||
| var end = starttime + "至" + endtime; | |||||
| } else { | |||||
| var end = ""; | |||||
| var phone = tt.getStorageSync("phone"); | |||||
| var pwd = tt.getStorageSync("pwd"); | |||||
| that.ttLogin(); | |||||
| if (phone) { | |||||
| that.setData({ | |||||
| phone: phone | |||||
| }); | |||||
| } | } | ||||
| if (transactionId) { | |||||
| var tradeTime = e.currentTarget.dataset.data.tradeTime; | |||||
| } else { | |||||
| var tradeTime = e.currentTarget.dataset.data.payDate; | |||||
| if (pwd) { | |||||
| that.setData({ | |||||
| pwd: pwd | |||||
| }); | |||||
| } | } | ||||
| console.log(e.currentTarget.dataset.data, tradeTime, 6666666) | |||||
| var billTypeValue = e.currentTarget.dataset.data.billTypeValue; | |||||
| let receivePay = e.currentTarget.dataset.data.receivePay; | |||||
| tt.navigateTo({ | |||||
| url: `/pages/bill/billdetail/index?owe=${owe}&receivedate=${receivedate}&status=${status}&end=${end}&id=${id}&tradeTime=${tradeTime}&transactionId=${transactionId}&priceDetail=${priceDetail}&billTypeValue=${billTypeValue}&receivePay=${receivePay}&freeze=${freeze}&pay=${pay}&latePayPrice=${latePayPrice}&serviceChargePay=${serviceChargePay}`, | |||||
| }) | |||||
| }, | }, | ||||
| /** | |||||
| * 核销记录 | |||||
| */ | |||||
| // hexiaoInit: function(heXiaox, heXiaoYiy) { | |||||
| // this.hexiaoComponent.init((canvas, width, height) => { | |||||
| // const barChart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // canvas.setChart(barChart); | |||||
| // barChart.setOption(getScatterOption(heXiaox, heXiaoYiy)); | |||||
| // return barChart; | |||||
| // }); | |||||
| // }, | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| // jiaoyiInit: function(jiaoYix, jiaoYiy) { | |||||
| // this.jiaoyiComponent.init((canvas, width, height) => { | |||||
| // const barChart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // canvas.setChart(barChart); | |||||
| // barChart.setOption(getBarOption(jiaoYix, jiaoYiy)); | |||||
| // return barChart; | |||||
| // }); | |||||
| // }, | |||||
| // init_one: function(xdata, ydata) { //初始化第一个图表 | |||||
| // console.log(this.oneComponent, xdata, ydata) | |||||
| // this.oneComponent.init((canvas, width, height) => { | |||||
| // const chart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // console.log(chart, xdata, ydata) | |||||
| // setOption(chart, xdata, ydata) | |||||
| // this.chart = chart; | |||||
| // return chart; | |||||
| // }); | |||||
| // }, | |||||
| toWriteoff(e) { | |||||
| console.log(e) | |||||
| let id = e.currentTarget.dataset.id | |||||
| console.log(id) | |||||
| if (id == 0) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/scan/scan', | |||||
| }) | |||||
| } else if (id == 1) { | |||||
| // 优惠卡收款 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/cardReceive/cardReceive', | |||||
| }) | |||||
| } else if (id == 2) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/main/solution/solution', | |||||
| }) | |||||
| } else if (id == 3) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/payment/index', | |||||
| }) | |||||
| } else if (id == 4) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/creditSelect/index', | |||||
| }) | |||||
| } else if (id == 5) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/incouponSelect/index', | |||||
| }) | |||||
| } else if (id == 6) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/marktingsettlement/marktingsettlement', | |||||
| }) | |||||
| }else if(id==7){//用户发卷 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/sendDiscounts/sendDiscounts', | |||||
| //显示具体的密码 | |||||
| showpassword:function(){ | |||||
| console.log(this.data.password); | |||||
| let that = this; | |||||
| if (that.data.password){ | |||||
| that.setData({ | |||||
| password: false, | |||||
| focus:true | |||||
| }) | }) | ||||
| } else if (id == 8) {//商品配送 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/delivery/delivery', | |||||
| }else{ | |||||
| that.setData({ | |||||
| password: true, | |||||
| focus: true | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| toTran(e) { | |||||
| let type = e.currentTarget.dataset.type | |||||
| tt.navigateTo({ | |||||
| url: `./transaction/transaction?type=${type}`, | |||||
| }) | |||||
| }, | |||||
| onShow() { | |||||
| let that = this; | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| if (that.oneComponent) { | |||||
| that.getrecordData(); | |||||
| } | |||||
| if (that.jiaoyiComponent) { | |||||
| that.getTabletListOrder(); | |||||
| } | |||||
| if (that.hexiaoComponent) { | |||||
| that.getTabletListVerify(); | |||||
| } | |||||
| /** | |||||
| * 获得交易记录和核销额 | |||||
| */ | |||||
| that.getUnverifiedAmountOnDate(); | |||||
| that.getVerifiedAmountOnDate(); | |||||
| that.getpaybill(); | |||||
| that.setData({ | |||||
| currentIndex: 0 | |||||
| }) | |||||
| }, | |||||
| getpaybill: function() { | |||||
| ttLogin(flag){ | |||||
| let that = this; | let that = this; | ||||
| that.getUserInfo().then(res => { | |||||
| Http.postRequest(config.api.listBillOweAndWaitPay, app.globalData.token, '', { | |||||
| merchantId: res.merchant_id, | |||||
| tenantId: res.tenant_id, | |||||
| }, (res) => { | |||||
| console.log(res); | |||||
| if (res) { | |||||
| res.data.map(file => { | |||||
| if (file.starttime && file.endtime) { | |||||
| file.end = file.starttime.substring(0, 7).replace(/-/g, ".") + "-" + file.endtime.substring(0, 7).replace(/-/g, "."); | |||||
| tt.login({ | |||||
| success: res => { | |||||
| Common.getSuperOpenId(res.code) | |||||
| .then(res => { | |||||
| console.log(res) | |||||
| if (res.data&& res.data.data&&res.data.data.openId){ | |||||
| app.globalData.superopenId = res.data.data.openId; | |||||
| } | |||||
| if (res.data && res.data.data && res.data.data.session_key){ | |||||
| app.globalData.session_key = res.data.data.session_key; | |||||
| } | |||||
| if (res.data.code == 200) { | |||||
| app.globalData.phone = res.data.data.phone; | |||||
| that.setData({ | |||||
| ifAlBoss: true, | |||||
| status: "use" | |||||
| }) | |||||
| if (flag =='fromgetPhoneNumber'){ | |||||
| tt.navigateTo({ | |||||
| url: `/pages/datatower/datatower?superopenId=${app.globalData.superopenId}&phone=${app.globalData.phone}`, | |||||
| }) | |||||
| } | |||||
| } else { | } else { | ||||
| file.end = ""; | |||||
| file.endtime = "" | |||||
| if (flag =='fromgetPhoneNumber'){ | |||||
| tt.showToast({ | |||||
| title: res.data.message, | |||||
| icon: "none", | |||||
| duration: 2000 | |||||
| }) | |||||
| } | |||||
| } | } | ||||
| file.receiveDate = util.fmtDate(file.receiveDate); | |||||
| }) | |||||
| that.setData({ | |||||
| billList: res.data, | |||||
| djArr : res.data.filter(item => item.status == 2), | |||||
| }).catch(error => { | |||||
| console.log(error,"error"); | |||||
| that.setData({ | |||||
| error: error.message | |||||
| }) | |||||
| }) | }) | ||||
| that.data.djMoney = that.data.djArr.map(item => parseInt(item.owe / 100)) | |||||
| let money = 0 | |||||
| that.data.djMoney.filter(function (item, index) { | |||||
| money += item; | |||||
| }) | |||||
| that.setData({ | |||||
| djZmoney: changeNum.changePeoNumber(money) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| }, | }, | ||||
| getTabletListVerify: function() { | |||||
| showpass: function () { | |||||
| let that = this; | let that = this; | ||||
| getTabletListVerify() | |||||
| .then(res => { | |||||
| if (res.xList.length > 0 && res.amountList.length > 0) { | |||||
| that.setData({ | |||||
| ifShowChart1: 'show1' | |||||
| }) | |||||
| // that.hexiaoInit(res.xList, res.amountList) | |||||
| } else { | |||||
| /** | |||||
| * 判断是否显示数据表 | |||||
| */ | |||||
| that.setData({ | |||||
| ifShowChart1: 'show' | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| /** | |||||
| * 交易 | |||||
| */ | |||||
| getTabletListOrder: function() { | |||||
| let that = this; | |||||
| getTabletListOrder() | |||||
| .then(res => { | |||||
| console.log(res); | |||||
| if (res.xList.length > 0 && res.amountList.length > 0) { | |||||
| // that.jiaoyiInit(res.xList, res.amountList) | |||||
| that.setData({ | |||||
| ifShowChart: 'show1' | |||||
| }) | |||||
| } else { | |||||
| /** | |||||
| * 判断是否显示数据表 | |||||
| */ | |||||
| that.setData({ | |||||
| ifShowChart: 'show' | |||||
| forgetPwd: function () { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/index/forgetpwd/forgetpwd', | |||||
| }) | |||||
| }, | |||||
| getLoginInfo(e) { | |||||
| var phoneReg = /^1[0|1|2|3|4|5|6|7|8|9]\d{9}$/; | |||||
| let { | |||||
| phone, | |||||
| pwd | |||||
| } = e.detail.value; | |||||
| if (phoneReg.test(phone)) { | |||||
| if (pwd != '') { | |||||
| Common.userLogin(phone, pwd, app.globalData.latitude, app.globalData.longitude) | |||||
| .then(res => { | |||||
| console.log(res); | |||||
| if (res.code == 200) { | |||||
| HttpBasics.setBUserId(res.data.bUserId); | |||||
| tt.setStorageSync("phone", phone); | |||||
| tt.setStorageSync("pwd", pwd); | |||||
| tt.setStorageSync("bUserId", res.data.bUserId); | |||||
| app.globalData.bUserId = res.data.bUserId; | |||||
| tt.setStorage({ | |||||
| key: 'bUserId', | |||||
| data: res.data.bUserId, | |||||
| }) | |||||
| tt.login({ | |||||
| success:function(res){ | |||||
| Common.getOpenId(res.code,app.globalData.bUserId) | |||||
| .then(res => { | |||||
| console.log(res,888) | |||||
| app.globalData.openId = res.data.data.openId; | |||||
| app.globalData.token = res.data.data.token; | |||||
| HttpBasics.setToken(res.data.data.token); | |||||
| tt.setStorageSync("openId", res.data.data.openId); | |||||
| tt.setStorageSync("session_key", res.data.data.session_key); | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/success.png', | |||||
| title: '登录成功', | |||||
| }) | |||||
| tt.switchTab({ | |||||
| url: '/pages/main/main', | |||||
| success(res) { | |||||
| console.log(`${res}`); | |||||
| }, | |||||
| fail(err) { | |||||
| console.log(err,`switchTab调用失败`); | |||||
| }, | |||||
| }) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } else { | |||||
| tt.showToast({ | |||||
| image:'./../../assets/images/fail.png', | |||||
| title: res.message, | |||||
| icon: "none" | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| } | |||||
| } else { | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '密码不能为空', | |||||
| icon: "none", | |||||
| }) | |||||
| } | |||||
| } else if(phone=="") { | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '请输入手机号', | |||||
| icon: "none" | |||||
| }) | |||||
| }else{ | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '手机号有误', | |||||
| icon: "none" | |||||
| }) | }) | ||||
| } | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 收银记录 | |||||
| * 获得超级管理员手机号 | |||||
| */ | */ | ||||
| getrecordData() { | |||||
| let _this = this; | |||||
| HttpBasics.get({ | |||||
| url: config.api.getMicroPayAmountOnDate | |||||
| }) | |||||
| .then(res => { | |||||
| _this.setData({ | |||||
| recordMoney: res.data.amount | |||||
| }) | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }); | |||||
| HttpBasics.get({ | |||||
| url: config.api.listMicropay | |||||
| }) | |||||
| .then(res => { | |||||
| let dataX = []; | |||||
| let dataY = []; | |||||
| if (res.data && res.data.length > 0) { | |||||
| _this.setData({ | |||||
| ifShowChart2: "show1" | |||||
| }) | |||||
| res.data.map((item, index) => { | |||||
| dataX.push(item.mouthAndDate) | |||||
| dataY.push(Number(item.amountStr)) | |||||
| }) | |||||
| // _this.init_one(dataX, dataY) | |||||
| } else { | |||||
| _this.setData({ | |||||
| ifShowChart2: "show" | |||||
| getPhoneNumber: function (e) { | |||||
| this.ttLogin("fromgetPhoneNumber"); | |||||
| if (app.globalData.superopenId && app.globalData.session_key){ | |||||
| let { encryptedData, iv } = { encryptedData: e.detail.encryptedData, iv: e.detail.iv }; | |||||
| if (encryptedData && iv) { | |||||
| Common.getUserPhone(encryptedData, iv, app.globalData.superopenId, app.globalData.session_key) | |||||
| .then(res => { | |||||
| if (res.data.code == 200 && res.data.data.admin == 1) { | |||||
| app.globalData.phone = res.data.data.phone; | |||||
| tt.navigateTo({ | |||||
| url: `/pages/datatower/datatower?superopenId=${app.globalData.superopenId}&phone=${app.globalData.phone}`, | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| } | } | ||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| toTran(e) { | |||||
| let type = e.currentTarget.dataset.type | |||||
| tt.navigateTo({ | |||||
| url: `/pages/transaction/transaction?type=${type}`, | |||||
| }) | |||||
| }, | |||||
| toRecord() { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/record/list/index`, | |||||
| }) | |||||
| } | |||||
| }, | }, | ||||
| checkuserstatus() { | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function (res) { | |||||
| let _this = this; | let _this = this; | ||||
| HttpBasics.get({ | |||||
| url: config.api.checkPhoneStatus | |||||
| }) | |||||
| .then(res => { | |||||
| }) | |||||
| .catch(err => { | |||||
| if (err.code == 11005) { | |||||
| tt.redirectTo({ | |||||
| url: `/pages/getuserinfo/index` | |||||
| }) | |||||
| return { | |||||
| title: '数据塔台', | |||||
| path: '/pages/main/main', | |||||
| success: function (res) { | |||||
| // 转发成功 | |||||
| }, | |||||
| fail: function (res) { | |||||
| // 转发失败 | |||||
| } | } | ||||
| }); | |||||
| } | |||||
| }, | }, | ||||
| }) | |||||
| }) | |||||
| @@ -1,10 +1,6 @@ | |||||
| { | { | ||||
| "backgroundTextStyle": "dark", | |||||
| "navigationBarBackgroundColor": "#52A0FD", | |||||
| "navigationBarTitleText": "", | |||||
| "navigationBarTextStyle": "white", | |||||
| "enablePullDownRefresh": true, | |||||
| "usingComponents": { | |||||
| "ec-canvas": "../../ec-canvas/ec-canvas" | |||||
| } | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarTitleText": "登录", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#52A0FD" | |||||
| } | } | ||||
| @@ -1,106 +1,30 @@ | |||||
| <view class='firstPage'> | |||||
| <view class='fix'> | |||||
| <image src='../../assets/images/bannerbg.png'></image> | |||||
| <view class='writeOff writeOff1'> | |||||
| <!-- <view class='topBox clearfix' tt:if="{{djArr.length>0||count > 0}}" > | |||||
| <view class='left fl' > | |||||
| <text>待缴账单</text> | |||||
| <text>{{djArr.length}}</text> | |||||
| <text>¥{{djZmoney}}</text> | |||||
| </view> | |||||
| <view class='right fr'> | |||||
| <text>今日交易单数</text> | |||||
| <text>{{count}}</text> | |||||
| <text>¥{{amountMoney/100}}</text> | |||||
| </view> | |||||
| </view> --> | |||||
| <!-- tt:if="{{djArr.length == 0 && count == 0}}" --> | |||||
| <view class='topBox2 clearfix' > | |||||
| <view class='imgBox'> | |||||
| <image src='{{userInfo.merchant_img_url}}' mode='{{widthFix}}' ></image> | |||||
| </view> | |||||
| <text class='name'>{{userInfo.mall_name}}({{userInfo.merchant_name}})</text> | |||||
| </view> | |||||
| <view class="logoin_wrap"> | |||||
| <view class='logo'> | |||||
| <image src='{{logo}}' mode="widthFix"></image> | |||||
| </view> | |||||
| <form bindsubmit='getLoginInfo'> | |||||
| <view class='login'> | |||||
| <view> | |||||
| <input type='number' name='phone' value='{{phone}}' placeholder='请输入手机号' placeholder-style='color:#BFBFBF;' maxlength='11' class='inp' /> | |||||
| </view> | |||||
| <view> | |||||
| <input password='{{password}}' focus='{{focus}}' class='inp' placeholder='请输入密码' placeholder-style='color:#BFBFBF;' name='pwd' value='{{pwd}}' /> | |||||
| <image class='showpassword' bindtap='showpassword' src='../../assets/images/password.png' mode='widthFix'></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='location'> | |||||
| <view class='message' tt:if="{{billList.length>0}}"> | |||||
| <image src='../../assets/images/mess.png' mode='widthFix'></image> | |||||
| <text>{{billList.length}}</text> | |||||
| </view> | |||||
| <swiper tt:if="{{billList.length>0}}" current='{{currentIndex}}' class="swiper_container" vertical="true" autoplay="true" circular="true" interval="3000"> | |||||
| <block tt:for="{{billList}}" tt:key="index"> | |||||
| <swiper-item bindtap="gotobill" data-data='{{item}}' data-id='{{item.id}}'> | |||||
| <view class="swiper_item clearfix"> | |||||
| <text tt:if="{{item.status=='1'}}" class="state1 fl">欠缴</text> | |||||
| <text tt:if="{{item.status=='2'}}" class="state2 fl">待缴</text> | |||||
| <text class="fl billtype">{{item.name}}{{item.end}}</text> | |||||
| <text class="fl">{{item.owe/100}}元</text> | |||||
| </view> | |||||
| </swiper-item> | |||||
| </block> | |||||
| </swiper> | |||||
| </view> | |||||
| <view class='writeOff'> | |||||
| <view class='classification clearfix' tt:if="{{userInfoLoadIf}}"> | |||||
| <view tt:for='{{classIfyList}}' tt:if="{{!(item.id==4&&userInfo.creditLocked==1)}}" tt:key='{{index}}'> | |||||
| <view hover-class='active' style='background:{{item.bg}}' bindtap='toWriteoff' data-id='{{item.id}}'> | |||||
| <icon class='{{item.icon}}'></icon> | |||||
| </view> | |||||
| <text>{{item.text}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='jiaoyi jiaoyi1 jiaoyi2' hover-class='actives' bindtap='toTran' data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>交易记录</text> | |||||
| </view> | |||||
| <view>今日交易额:{{amountMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart!='show'}}"> | |||||
| <ec-canvas id="mychart-jiaoyi" canvas-id="mychart-multi-bar" ec="{{ ecBar }}"></ec-canvas> | |||||
| </view> --> | |||||
| <view class='transaction' tt:if="{{ifShowChart=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave01.png' mode='widthFix'></image> | |||||
| <view class="nothave">暂无数据</view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='jiaoyi' hover-class='actives' bindtap='toTran' data-type='1'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>核销记录</text> | |||||
| </view> | |||||
| <view>今日核销额:{{writeOffMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart1!='show'}}"> | |||||
| <ec-canvas id="mychart-hexiao" canvas-id="mychart-multi-scatter" ec="{{ ecScatter }}"></ec-canvas> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart1=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave02.png' mode='widthFix'></image> | |||||
| <view class="nothave1">暂无数据</view> | |||||
| </view> --> | |||||
| </view> | |||||
| <!-- <view class='jiaoyi jiaoyi1' hover-class='actives' bindtap='toRecord' data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>收银记录</text> | |||||
| </view> | |||||
| <view>今日收银:{{recordMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart2!='show'}}"> | |||||
| <ec-canvas id="mychart-pament" canvas-id="mychart-pament-bar" ec="{{ ec }}"></ec-canvas> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart2=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nohave03.png' mode='widthFix'></image> | |||||
| <view class="nothave2">暂无数据</view> | |||||
| </view> | |||||
| <navigator url='../index/index' open-type='navigate' hover-class='none'> | |||||
| </navigator> | |||||
| <button form-type='submit' class='button' hover-class='active'>登录管理门店</button> | |||||
| <!-- <view class='forget clearfix'> | |||||
| <text class='fr' bindtap='forgetPwd'>忘记密码</text> | |||||
| </view> --> | |||||
| <!-- <view> | |||||
| <button class="phone" tt:if="{{!ifAlBoss}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"><image class='adminlogo' src='../../assets/images/admin.png' mode='widthFix'></image>数据塔台</button> | |||||
| <button class="phone" tt:if="{{ifAlBoss}}" bindtap="getPhoneNumber"><image class='adminlogo' src='../../assets/images/admin.png' mode='widthFix'></image>数据塔台</button> | |||||
| </view> --> | </view> --> | ||||
| </view> | |||||
| </form> | |||||
| <view class='defaultLogo'> | |||||
| <text>POWERED BY IFORMALL</text> | |||||
| </view> | |||||
| </view> | |||||
| @@ -1,431 +1,142 @@ | |||||
| @import "../../iconfont.ttss"; | |||||
| /* .top { | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10 80; | |||||
| padding-bottom: 200rpx; | |||||
| } */ | |||||
| page { | |||||
| background: #f8f8fa; | |||||
| } | |||||
| .img{ | |||||
| display: block; | |||||
| width: 160rpx; | |||||
| margin: 0 auto; | |||||
| } | |||||
| @font-face { | |||||
| font-family: 'iconfont'; /* project id 1353693 */ | |||||
| src: url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.eot'); | |||||
| src: url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.eot?#iefix') format('embedded-opentype'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.woff2') format('woff2'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.woff') format('woff'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.ttf') format('truetype'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.svg#iconfont') format('svg'); | |||||
| } | |||||
| .iconfonts { | |||||
| display: inline-block; | |||||
| vertical-align: middle; | |||||
| width: 40rpx; | |||||
| height: 40rpx; | |||||
| margin-top: -7rpx; | |||||
| margin-right: -26rpx; | |||||
| } | |||||
| .firstPage { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .location { | |||||
| position: relative; | |||||
| width: 100%; | |||||
| font-size: 30rpx; | |||||
| text-align: left; | |||||
| color: #fff; | |||||
| } | |||||
| .fix image { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| width: 100%; | |||||
| height: 168rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } | |||||
| .location image { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| width: 100%; | |||||
| height: 168rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } | |||||
| .location text { | |||||
| display: block; | |||||
| text-align: left; | |||||
| position: relative; | |||||
| z-index: 100; | |||||
| font-size: 30rpx; | |||||
| color: #000; | |||||
| letter-spacing: 1.16rpx; | |||||
| } | |||||
| .fix{ | |||||
| margin-bottom: 10rpx; | |||||
| } | |||||
| .writeOff { | |||||
| width: 100%; | |||||
| height: 24.5%; | |||||
| margin-top: 10rpx; | |||||
| } | |||||
| .writeOff>text { | |||||
| width: 92%; | |||||
| height: 50rpx; | |||||
| display: block; | |||||
| font-size: 30rpx; | |||||
| font-weight: bold; | |||||
| padding-top: 1.4%; | |||||
| margin: 0 auto; | |||||
| } | |||||
| .topBox{ | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| background: #fff; | |||||
| width: 570rpx; | |||||
| margin: 20rpx auto 0; | |||||
| border-top: 1px solid #f6f5f5; | |||||
| padding: 30rpx 70rpx; | |||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.05); | |||||
| color: #000; | |||||
| border-radius:32rpx; | |||||
| } | |||||
| .topBox view{ | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| text-align: center; | |||||
| } | |||||
| .topBox2{ | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| background: #fff; | |||||
| height: 240rpx; | |||||
| width: 710rpx; | |||||
| margin: 20rpx auto; | |||||
| color: #000099; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| text-align: center; | |||||
| border-radius:32rpx; | |||||
| } | |||||
| .imgBox{ | |||||
| width: 120rpx; | |||||
| height: 120rpx; | |||||
| margin: 20rpx auto; | |||||
| } | |||||
| .topBox2 image{ | |||||
| width: 120rpx; | |||||
| height: 120rpx; | |||||
| margin: 20rpx auto; | |||||
| } | |||||
| .name{ | |||||
| font-size: 30rpx; | |||||
| text-align: center; | |||||
| height: 60rpx; | |||||
| line-height: 60rpx; | |||||
| } | |||||
| .left>text:nth-child(2), .right>text:nth-child(2){ | |||||
| font-size: 80rpx; | |||||
| margin: 10rpx 0; | |||||
| color:#FD782D; | |||||
| } | |||||
| .left>text,.right>text{ | |||||
| width: 255rpx; | |||||
| overflow: hidden; | |||||
| text-overflow:ellipsis; | |||||
| white-space: nowrap; | |||||
| color: #475669; | |||||
| } | |||||
| .left>text:nth-child(3),.right>text:nth-child(3){ | |||||
| color:#475669; | |||||
| } | |||||
| .classification { | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| width: 710rpx; | |||||
| margin: 0 auto; | |||||
| display: flex; | |||||
| flex-wrap: wrap; | |||||
| } | |||||
| .classification>view { | |||||
| background: #FFF; | |||||
| text-align: center; | |||||
| width: 19.5%; | |||||
| border: .1rpx #eee solid; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| padding-bottom: 30rpx ; | |||||
| border-left: none!important; | |||||
| } | |||||
| .classification>view:nth-child(1) { | |||||
| border-radius: 16rpx 0 0 0; | |||||
| } | |||||
| .classification>view:nth-child(6) { | |||||
| border-radius:0 0 0 16rpx; | |||||
| border-top: none!important; | |||||
| } | |||||
| .classification>view:nth-child(7),.classification>view:nth-child(8) { | |||||
| border-top: none!important; | |||||
| } | |||||
| .classification>view:nth-child(5) { | |||||
| border-right: none!important; | |||||
| border-radius:0 16rpx 0 0; | |||||
| } | |||||
| .classification>view:nth-child(10) { | |||||
| border-top: none!important; | |||||
| border-right: none!important; | |||||
| border-radius:0 0 16rpx 0; | |||||
| } | |||||
| .classification>view>view { | |||||
| width: 110rpx; | |||||
| height: 110rpx; | |||||
| border-radius: 50%; | |||||
| text-align: center; | |||||
| margin: 0 auto; | |||||
| line-height:110rpx; | |||||
| } | |||||
| .icon-shoufukuan{ | |||||
| color: rgb(91, 115, 255); | |||||
| } | |||||
| .icon-hexiao{ | |||||
| color: #EEAF5C; | |||||
| } | |||||
| .icon-shouye1{ | |||||
| color: #FF3A1D; | |||||
| } | |||||
| .icon-shouyintai1{ | |||||
| color: rgb(33, 158, 214); | |||||
| } | |||||
| .icon-jifen{ | |||||
| color: #00cd00; | |||||
| } | |||||
| .icon-quan{ | |||||
| color: #FF5183; | |||||
| } | |||||
| .icon-jiesuan{ | |||||
| color:#1296db; | |||||
| } | |||||
| .icon-lingquanzhongxin{ | |||||
| color: #EEAF5C; | |||||
| } | |||||
| .icon-wuliu{ | |||||
| color:#1296db; | |||||
| font-size: 72rpx !important; | |||||
| } | |||||
| .active { | |||||
| opacity: 0.6; | |||||
| } | |||||
| .actives { | |||||
| opacity: 0.6; | |||||
| } | |||||
| .classification>view>view icon { | |||||
| font-size: 60rpx; | |||||
| } | |||||
| .classification>view>text { | |||||
| font-size: 24rpx; | |||||
| color: #475669; | |||||
| letter-spacing: 2rpx; | |||||
| line-height: 26rpx; | |||||
| } | |||||
| .transaction { | |||||
| position: relative; | |||||
| height:280rpx; | |||||
| } | |||||
| .reportForm { | |||||
| background: #fff; | |||||
| } | |||||
| .toTransaction { | |||||
| width: 92%; | |||||
| height: 87rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| padding: 0 4% 20rpx; | |||||
| line-height: 87rpx; | |||||
| background: #fff; | |||||
| } | |||||
| .toTransaction>view:nth-child(1) text { | |||||
| font-size: 30rpx; | |||||
| color: #000; | |||||
| letter-spacing: 1.16rpx; | |||||
| } | |||||
| .toTransaction>view:nth-child(2) { | |||||
| font-size: 28rpx; | |||||
| color: #919191; | |||||
| text-align: right; | |||||
| } | |||||
| .reportForm { | |||||
| position: relative; | |||||
| width: 100%; | |||||
| height: 245rpx; | |||||
| } | |||||
| .Fill { | |||||
| color: #fff; | |||||
| background: #fff; | |||||
| } | |||||
| .jiaoyi { | |||||
| position: relative; | |||||
| z-index: 1; | |||||
| width: 710rpx; | |||||
| margin: 0 auto; | |||||
| border-radius: 16rpx; | |||||
| margin-top: 30rpx; | |||||
| overflow: hidden; | |||||
| margin-bottom: 30rpx; | |||||
| background:#fff; | |||||
| padding-bottom: 30rpx; | |||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.05); | |||||
| } | |||||
| .swiper_container { | |||||
| position: relative; | |||||
| z-index: 100; | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| width: 100%; | |||||
| } | |||||
| .swiper_item { | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| font-size: 28rpx; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| white-space: nowrap; | |||||
| letter-spacing: 2px; | |||||
| color: #fff; | |||||
| } | |||||
| .swiper_item text { | |||||
| display: inline-block; | |||||
| text-align: left; | |||||
| } | |||||
| .title { | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| text-indent: 0.5em; | |||||
| font-size: 28rpx; | |||||
| color: #fff; | |||||
| background: #52a0fd; | |||||
| } | |||||
| .number { | |||||
| color: red; | |||||
| } | |||||
| .message { | |||||
| position: absolute; | |||||
| z-index: 1000; | |||||
| left: 20rpx; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| width: 40rpx; | |||||
| height: 40rpx; | |||||
| } | |||||
| .message text { | |||||
| font-size: 26rpx; | |||||
| display: block; | |||||
| height: 40rpx; | |||||
| line-height: 36rpx; | |||||
| width: 100%; | |||||
| text-align: center !important; | |||||
| position: relative; | |||||
| z-index: 10; | |||||
| text-indent: 0 !important; | |||||
| color: #FFF; | |||||
| } | |||||
| .message image { | |||||
| position: absolute��important; | |||||
| z-index: 1; | |||||
| top: 0; | |||||
| left: 0; | |||||
| bottom: 0; | |||||
| right: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .state1 { | |||||
| color: red !important; | |||||
| margin-left: 80rpx; | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .state2 { | |||||
| color: #ffce00 !important; | |||||
| margin-left: 80rpx; | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .billtype { | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .nothave{ | |||||
| text-align: center; | |||||
| color: #afd9eb; | |||||
| font-size: 30rpx; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .nothave1{ | |||||
| font-size: 30rpx; | |||||
| color: #ffc3c2; | |||||
| text-align: center; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .nothave2{ | |||||
| font-size: 30rpx; | |||||
| color: #FFCE00; | |||||
| text-align: center; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .container{ | |||||
| width: 100%; | |||||
| height: 240rpx; | |||||
| position: relative; | |||||
| } | |||||
| #mychart-pament { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| height: 100%; | |||||
| left: 0; | |||||
| right: 0; | |||||
| } | |||||
| /* .fix{ | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } */ | |||||
| .jiaoyi2{ | |||||
| /* margin-top: 333rpx; */ | |||||
| position: relative; | |||||
| z-index: 1; | |||||
| } | |||||
| .adminlogo{ | |||||
| width: 100rpx; | |||||
| display: block; | |||||
| margin: 0 auto; | |||||
| } | |||||
| .logoin_wrap { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| } | |||||
| .login { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| position: relative; | |||||
| } | |||||
| .inp{ | |||||
| color: #666; | |||||
| } | |||||
| .login view { | |||||
| position: relative; | |||||
| width: 88%; | |||||
| display: flex; | |||||
| margin: 0 auto; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| border-bottom: 1rpx solid #DADADA; | |||||
| } | |||||
| .line { | |||||
| width: 2rpx; | |||||
| height: 22rpx; | |||||
| background: #d7d7d7; | |||||
| position: absolute; | |||||
| left: 20%; | |||||
| top: 38rpx; | |||||
| } | |||||
| .login view input { | |||||
| font-size: 34rpx; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| } | |||||
| .login view:nth-child(1) input { | |||||
| /* padding-left: 60rpx; */ | |||||
| font-size: 34rpx; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| } | |||||
| .eye{ | |||||
| display: inline-block; | |||||
| width: 50rpx; | |||||
| margin-top:26rpx; | |||||
| } | |||||
| .logo { | |||||
| width: 320rpx; | |||||
| margin: 100rpx auto 30rpx; | |||||
| } | |||||
| .logo image { | |||||
| display: block; | |||||
| width: 320rpx; | |||||
| } | |||||
| .button { | |||||
| background: #52A0FD; | |||||
| border-radius: 8rpx; | |||||
| color: #fff; | |||||
| margin-top: 8%; | |||||
| font-size: 36rpx; | |||||
| width: 90%; | |||||
| } | |||||
| .active{ | |||||
| opacity: .4; | |||||
| } | |||||
| .logoin_wrap navigator { | |||||
| display: block; | |||||
| width: 25%; | |||||
| margin: 0 auto; | |||||
| text-align: right; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .logoin_wrap navigator text { | |||||
| display: block; | |||||
| text-align: center; | |||||
| /* padding-top: 1.5%; */ | |||||
| font-size: 26rpx; | |||||
| height: 45rpx; | |||||
| color: #404040; | |||||
| letter-spacing: 0; | |||||
| line-height: 45rpx; | |||||
| } | |||||
| .forget{ | |||||
| text-align: right; | |||||
| padding:0 40rpx; | |||||
| color: #999; | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .forget text{ | |||||
| font-size: 26rpx; | |||||
| } | |||||
| .defaultLogo{ | |||||
| position: absolute; | |||||
| bottom: 40rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .defaultLogo text { | |||||
| display: block; | |||||
| text-align: center; | |||||
| color: #52A0FD; | |||||
| font-size: 22rpx; | |||||
| } | |||||
| .defaultLogo image { | |||||
| width: 200rpx; | |||||
| } | |||||
| .phone{ | |||||
| display: block!important; | |||||
| background: none!important; | |||||
| color: #999!important; | |||||
| font-size: 26rpx!important; | |||||
| padding: 0!important; | |||||
| margin-top: 40rpx!important; | |||||
| } | |||||
| button::after{ border: none; } | |||||
| .showpassword{ | |||||
| padding: 30rpx; | |||||
| width: 40rpx; | |||||
| position: absolute; | |||||
| z-index: 100; | |||||
| right: 20rpx; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| } | |||||
| @@ -1,216 +0,0 @@ | |||||
| const config = require('../../config/config.js') | |||||
| const app = getApp() | |||||
| const Common = require('../../common/common.js') | |||||
| const Http = require('../../utils/http.js') | |||||
| const HttpBasics = require('../../utils/HttpBasics.js') | |||||
| Page({ | |||||
| data: { | |||||
| logo: '../../assets/images/logo.png', | |||||
| phone: '', | |||||
| pwd: '', | |||||
| status:'', | |||||
| showpass: "hidepass", | |||||
| focus:false, | |||||
| password: true | |||||
| }, | |||||
| onLoad() { | |||||
| Common.getMallIcon() | |||||
| .then(data => { | |||||
| // debugge | |||||
| console.log(data,777) | |||||
| this.setData({ | |||||
| logo: data.data&&data.data.mallImgUrl ? data.data.mallImgUrl : '../../assets/images/logo.png', | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| onShow() { | |||||
| var that = this; | |||||
| var phone = tt.getStorageSync("phone"); | |||||
| var pwd = tt.getStorageSync("pwd"); | |||||
| that.ttLogin(); | |||||
| if (phone) { | |||||
| that.setData({ | |||||
| phone: phone | |||||
| }); | |||||
| } | |||||
| if (pwd) { | |||||
| that.setData({ | |||||
| pwd: pwd | |||||
| }); | |||||
| } | |||||
| }, | |||||
| //显示具体的密码 | |||||
| showpassword:function(){ | |||||
| console.log(this.data.password); | |||||
| let that = this; | |||||
| if (that.data.password){ | |||||
| that.setData({ | |||||
| password: false, | |||||
| focus:true | |||||
| }) | |||||
| }else{ | |||||
| that.setData({ | |||||
| password: true, | |||||
| focus: true | |||||
| }) | |||||
| } | |||||
| }, | |||||
| ttLogin(flag){ | |||||
| let that = this; | |||||
| tt.login({ | |||||
| success: res => { | |||||
| Common.getSuperOpenId(res.code) | |||||
| .then(res => { | |||||
| console.log(res) | |||||
| if (res.data&& res.data.data&&res.data.data.openId){ | |||||
| app.globalData.superopenId = res.data.data.openId; | |||||
| } | |||||
| if (res.data && res.data.data && res.data.data.session_key){ | |||||
| app.globalData.session_key = res.data.data.session_key; | |||||
| } | |||||
| if (res.data.code == 200) { | |||||
| app.globalData.phone = res.data.data.phone; | |||||
| that.setData({ | |||||
| ifAlBoss: true, | |||||
| status: "use" | |||||
| }) | |||||
| if (flag =='fromgetPhoneNumber'){ | |||||
| tt.navigateTo({ | |||||
| url: `/pages/datatower/datatower?superopenId=${app.globalData.superopenId}&phone=${app.globalData.phone}`, | |||||
| }) | |||||
| } | |||||
| } else { | |||||
| if (flag =='fromgetPhoneNumber'){ | |||||
| tt.showToast({ | |||||
| title: res.data.message, | |||||
| icon: "none", | |||||
| duration: 2000 | |||||
| }) | |||||
| } | |||||
| } | |||||
| }).catch(error => { | |||||
| console.log(error,"error"); | |||||
| that.setData({ | |||||
| error: error.message | |||||
| }) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| showpass: function () { | |||||
| let that = this; | |||||
| }, | |||||
| forgetPwd: function () { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/index/forgetpwd/forgetpwd', | |||||
| }) | |||||
| }, | |||||
| getLoginInfo(e) { | |||||
| var phoneReg = /^1[0|1|2|3|4|5|6|7|8|9]\d{9}$/; | |||||
| let { | |||||
| phone, | |||||
| pwd | |||||
| } = e.detail.value; | |||||
| if (phoneReg.test(phone)) { | |||||
| if (pwd != '') { | |||||
| Common.userLogin(phone, pwd, app.globalData.latitude, app.globalData.longitude) | |||||
| .then(res => { | |||||
| console.log(res); | |||||
| if (res.code == 200) { | |||||
| HttpBasics.setBUserId(res.data.bUserId); | |||||
| tt.setStorageSync("phone", phone); | |||||
| tt.setStorageSync("pwd", pwd); | |||||
| tt.setStorageSync("bUserId", res.data.bUserId); | |||||
| app.globalData.bUserId = res.data.bUserId; | |||||
| tt.setStorage({ | |||||
| key: 'bUserId', | |||||
| data: res.data.bUserId, | |||||
| }) | |||||
| tt.login({ | |||||
| success:function(res){ | |||||
| Common.getOpenId(res.code,app.globalData.bUserId) | |||||
| .then(res => { | |||||
| console.log(res,888) | |||||
| app.globalData.openId = res.data.data.openId; | |||||
| app.globalData.token = res.data.data.token; | |||||
| HttpBasics.setToken(res.data.data.token); | |||||
| tt.setStorageSync("openId", res.data.data.openId); | |||||
| tt.setStorageSync("session_key", res.data.data.session_key); | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/success.png', | |||||
| title: '登录成功', | |||||
| }) | |||||
| tt.switchTab({ | |||||
| url: '/pages/index/index', | |||||
| success(res) { | |||||
| console.log(`${res}`); | |||||
| }, | |||||
| fail(err) { | |||||
| console.log(err,`switchTab调用失败`); | |||||
| }, | |||||
| }) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } else { | |||||
| tt.showToast({ | |||||
| image:'./../../assets/images/fail.png', | |||||
| title: res.message, | |||||
| icon: "none" | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } else { | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '密码不能为空', | |||||
| icon: "none", | |||||
| }) | |||||
| } | |||||
| } else { | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '手机号有误', | |||||
| icon: "none" | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 获得超级管理员手机号 | |||||
| */ | |||||
| getPhoneNumber: function (e) { | |||||
| this.ttLogin("fromgetPhoneNumber"); | |||||
| if (app.globalData.superopenId && app.globalData.session_key){ | |||||
| let { encryptedData, iv } = { encryptedData: e.detail.encryptedData, iv: e.detail.iv }; | |||||
| if (encryptedData && iv) { | |||||
| Common.getUserPhone(encryptedData, iv, app.globalData.superopenId, app.globalData.session_key) | |||||
| .then(res => { | |||||
| if (res.data.code == 200 && res.data.data.admin == 1) { | |||||
| app.globalData.phone = res.data.data.phone; | |||||
| tt.navigateTo({ | |||||
| url: `/pages/datatower/datatower?superopenId=${app.globalData.superopenId}&phone=${app.globalData.phone}`, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function (res) { | |||||
| let _this = this; | |||||
| return { | |||||
| title: '数据塔台', | |||||
| path: 'pages/index/index', | |||||
| success: function (res) { | |||||
| // 转发成功 | |||||
| }, | |||||
| fail: function (res) { | |||||
| // 转发失败 | |||||
| } | |||||
| } | |||||
| }, | |||||
| }) | |||||
| @@ -1,6 +0,0 @@ | |||||
| { | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarTitleText": "登录", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#52A0FD" | |||||
| } | |||||
| @@ -1,30 +0,0 @@ | |||||
| <view class="logoin_wrap"> | |||||
| <view class='logo'> | |||||
| <image src='{{logo}}' mode="widthFix"></image> | |||||
| </view> | |||||
| <form bindsubmit='getLoginInfo'> | |||||
| <view class='login'> | |||||
| <view> | |||||
| <input type='number' name='phone' value='{{phone}}' placeholder='请输入手机号' placeholder-style='color:#BFBFBF;' maxlength='11' class='inp' /> | |||||
| </view> | |||||
| <view> | |||||
| <input password='{{password}}' focus='{{focus}}' class='inp' placeholder='请输入密码' placeholder-style='color:#BFBFBF;' name='pwd' value='{{pwd}}' /> | |||||
| <image class='showpassword' bindtap='showpassword' src='../../assets/images/password.png' mode='widthFix'></image> | |||||
| </view> | |||||
| </view> | |||||
| <navigator url='../index/index' open-type='navigate' hover-class='none'> | |||||
| </navigator> | |||||
| <button form-type='submit' class='button' hover-class='active'>登录管理门店</button> | |||||
| <!-- <view class='forget clearfix'> | |||||
| <text class='fr' bindtap='forgetPwd'>忘记密码</text> | |||||
| </view> --> | |||||
| <!-- <view> | |||||
| <button class="phone" tt:if="{{!ifAlBoss}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"><image class='adminlogo' src='../../assets/images/admin.png' mode='widthFix'></image>数据塔台</button> | |||||
| <button class="phone" tt:if="{{ifAlBoss}}" bindtap="getPhoneNumber"><image class='adminlogo' src='../../assets/images/admin.png' mode='widthFix'></image>数据塔台</button> | |||||
| </view> --> | |||||
| </form> | |||||
| <view class='defaultLogo'> | |||||
| <text>POWERED BY IFORMALL</text> | |||||
| </view> | |||||
| </view> | |||||
| @@ -1,142 +0,0 @@ | |||||
| .adminlogo{ | |||||
| width: 100rpx; | |||||
| display: block; | |||||
| margin: 0 auto; | |||||
| } | |||||
| .logoin_wrap { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| } | |||||
| .login { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| position: relative; | |||||
| } | |||||
| .inp{ | |||||
| color: #666; | |||||
| } | |||||
| .login view { | |||||
| position: relative; | |||||
| width: 88%; | |||||
| display: flex; | |||||
| margin: 0 auto; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| border-bottom: 1rpx solid #DADADA; | |||||
| } | |||||
| .line { | |||||
| width: 2rpx; | |||||
| height: 22rpx; | |||||
| background: #d7d7d7; | |||||
| position: absolute; | |||||
| left: 20%; | |||||
| top: 38rpx; | |||||
| } | |||||
| .login view input { | |||||
| font-size: 34rpx; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| } | |||||
| .login view:nth-child(1) input { | |||||
| /* padding-left: 60rpx; */ | |||||
| font-size: 34rpx; | |||||
| height: 100rpx; | |||||
| line-height: 100rpx; | |||||
| } | |||||
| .eye{ | |||||
| display: inline-block; | |||||
| width: 50rpx; | |||||
| margin-top:26rpx; | |||||
| } | |||||
| .logo { | |||||
| width: 320rpx; | |||||
| margin: 100rpx auto 30rpx; | |||||
| } | |||||
| .logo image { | |||||
| display: block; | |||||
| width: 320rpx; | |||||
| } | |||||
| .button { | |||||
| background: #52A0FD; | |||||
| border-radius: 8rpx; | |||||
| color: #fff; | |||||
| margin-top: 8%; | |||||
| font-size: 36rpx; | |||||
| width: 90%; | |||||
| } | |||||
| .active{ | |||||
| opacity: .4; | |||||
| } | |||||
| .logoin_wrap navigator { | |||||
| display: block; | |||||
| width: 25%; | |||||
| margin: 0 auto; | |||||
| text-align: right; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .logoin_wrap navigator text { | |||||
| display: block; | |||||
| text-align: center; | |||||
| /* padding-top: 1.5%; */ | |||||
| font-size: 26rpx; | |||||
| height: 45rpx; | |||||
| color: #404040; | |||||
| letter-spacing: 0; | |||||
| line-height: 45rpx; | |||||
| } | |||||
| .forget{ | |||||
| text-align: right; | |||||
| padding:0 40rpx; | |||||
| color: #999; | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .forget text{ | |||||
| font-size: 26rpx; | |||||
| } | |||||
| .defaultLogo{ | |||||
| position: absolute; | |||||
| bottom: 40rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .defaultLogo text { | |||||
| display: block; | |||||
| text-align: center; | |||||
| color: #52A0FD; | |||||
| font-size: 22rpx; | |||||
| } | |||||
| .defaultLogo image { | |||||
| width: 200rpx; | |||||
| } | |||||
| .phone{ | |||||
| display: block!important; | |||||
| background: none!important; | |||||
| color: #999!important; | |||||
| font-size: 26rpx!important; | |||||
| padding: 0!important; | |||||
| margin-top: 40rpx!important; | |||||
| } | |||||
| button::after{ border: none; } | |||||
| .showpassword{ | |||||
| padding: 30rpx; | |||||
| width: 40rpx; | |||||
| position: absolute; | |||||
| z-index: 100; | |||||
| right: 20rpx; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| } | |||||
| @@ -0,0 +1,705 @@ | |||||
| const config = require('../../config/config.js') | |||||
| const Http = require('../../utils/http.js') | |||||
| const HttpBasics = require('../../utils/HttpBasics.js') | |||||
| const util = require('../../utils/util') | |||||
| const changeNum = require('../../utils/changeNum.js') | |||||
| import * as echarts from '../../ec-canvas/echarts'; | |||||
| var app = getApp() | |||||
| function setOption(chart, xdata, ydata) { | |||||
| const option = { | |||||
| title: { | |||||
| padding: [10, 0, 0, 20], | |||||
| textStyle: { | |||||
| fontSize: 14, | |||||
| color: '#FF6A6A' | |||||
| }, | |||||
| }, | |||||
| backgroundColor: "#fff", | |||||
| color: ["#006EFF", "#67E0E3", "#9FE6B8"], | |||||
| animation: true, | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: xdata, | |||||
| splitLine: { | |||||
| show: false | |||||
| }, //去除网格线 | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| } | |||||
| }, | |||||
| yAxis: [{ | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| formatter: function(a, b) { | |||||
| return a | |||||
| } | |||||
| }, | |||||
| type: 'value', | |||||
| }], | |||||
| series: [{ | |||||
| type: 'line', | |||||
| data: ydata, | |||||
| smooth: true, //这句就是让曲线变平滑的 | |||||
| lineStyle: { | |||||
| normal: { | |||||
| color: '#33cdff', | |||||
| } | |||||
| }, | |||||
| areaStyle: { | |||||
| normal: { | |||||
| color: new echarts.graphic.LinearGradient( | |||||
| 0, 0, 0, 1, [{ | |||||
| offset: 0, | |||||
| color: '#FFF' | |||||
| }, { | |||||
| offset: 1, | |||||
| color: '#52A0FD' | |||||
| }] | |||||
| ) | |||||
| } | |||||
| }, | |||||
| }] | |||||
| }; | |||||
| chart.setOption(option) | |||||
| console.log(chart) | |||||
| } | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| function getBarOption(x, y) { | |||||
| return { | |||||
| color: ['#FF6A6A'], | |||||
| fontSize: "14rpx", | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: x | |||||
| }, | |||||
| yAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'value', | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| } | |||||
| }, | |||||
| series: [{ | |||||
| data: y, | |||||
| type: 'line', | |||||
| smooth: true, | |||||
| lineStyle: { | |||||
| normal: { | |||||
| color: '#FF6A6A', | |||||
| } | |||||
| }, | |||||
| areaStyle: {} | |||||
| }] | |||||
| }; | |||||
| }; | |||||
| /** | |||||
| * 核销记录 | |||||
| */ | |||||
| function getScatterOption(x, y) { | |||||
| return { | |||||
| color: '#FFCE00', | |||||
| fontSize: "14rpx", | |||||
| grid: { | |||||
| top: '3%', | |||||
| left: "5%", | |||||
| right: "7%", | |||||
| bottom: "4%", | |||||
| containLabel: true, | |||||
| }, | |||||
| xAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'category', | |||||
| boundaryGap: false, | |||||
| data: x | |||||
| }, | |||||
| yAxis: { | |||||
| axisLine: { | |||||
| show: false | |||||
| }, | |||||
| axisTick: { | |||||
| show: false | |||||
| }, | |||||
| type: 'value', | |||||
| splitLine: { | |||||
| lineStyle: { | |||||
| type: 'none' | |||||
| } | |||||
| }, | |||||
| axisLabel: { | |||||
| rotate: 40, | |||||
| } | |||||
| }, | |||||
| series: [{ | |||||
| data: y, | |||||
| type: 'line', | |||||
| smooth: true, | |||||
| areaStyle: {} | |||||
| }] | |||||
| }; | |||||
| }; | |||||
| /** | |||||
| * 获取交易记录 | |||||
| */ | |||||
| function getTabletListOrder() { | |||||
| let newArr = { | |||||
| xList: [], | |||||
| amountList: [] | |||||
| } | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.dateAmountRecordListOrder, app.globalData.token, '', {}, (res) => { | |||||
| // 日期 | |||||
| res.data && res.data.map(file => { | |||||
| newArr.xList.push(file.mouthAndDate) | |||||
| newArr.amountList.push(file.amountStr) | |||||
| }) | |||||
| resolve(newArr); | |||||
| }) | |||||
| }) | |||||
| }; | |||||
| /** | |||||
| * 获取核销记录 | |||||
| */ | |||||
| function getTabletListVerify() { | |||||
| let newArr = { | |||||
| xList: [], | |||||
| amountList: [] | |||||
| } | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.dateAmountRecordListVerified, app.globalData.token, '', {}, (res) => { | |||||
| // 日期 | |||||
| res.data && res.data.map(file => { | |||||
| newArr.xList.push(file.mouthAndDate) | |||||
| newArr.amountList.push(file.amountStr) | |||||
| }) | |||||
| resolve(newArr) | |||||
| }) | |||||
| }) | |||||
| }; | |||||
| Page({ | |||||
| data: { | |||||
| token:'', | |||||
| currentIndex: 0, | |||||
| userInfo: {}, | |||||
| recordMoney: 0, | |||||
| recordData: [], | |||||
| userInfoLoadIf: false, | |||||
| ec: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| classIfyList: [ | |||||
| // { | |||||
| // text: '收银台', | |||||
| // icon: 'iconfont icon-shouyintai1', | |||||
| // id: 3 | |||||
| // }, | |||||
| { | |||||
| text: '会员核销', | |||||
| icon: 'iconfont icon-hexiao', | |||||
| id: 0 | |||||
| }, | |||||
| // { | |||||
| // text: '消费卡收款', | |||||
| // icon: 'iconfont icon-shouye1', | |||||
| // id: 1 | |||||
| // }, | |||||
| // { | |||||
| // text: '当日解单', | |||||
| // icon: 'iconfont icon-shoufukuan', | |||||
| // id: 2 | |||||
| // }, | |||||
| { | |||||
| text: '会员积分', | |||||
| icon: 'iconfont icon-jifen', | |||||
| id: 4 | |||||
| }, | |||||
| // { | |||||
| // text: '会员赠券', | |||||
| // icon: 'iconfont icon-quan', | |||||
| // id: 5 | |||||
| // }, | |||||
| { | |||||
| text: '营销结算', | |||||
| icon: 'iconfont icon-jiesuan', | |||||
| id: 6 | |||||
| }, | |||||
| // { | |||||
| // text: '商户建券', | |||||
| // icon: 'iconfont icon-lingquanzhongxin', | |||||
| // id: 7 | |||||
| // }, | |||||
| // { | |||||
| // text: '商品配送', | |||||
| // icon: 'iconfont icon-wuliu', | |||||
| // id: 8 | |||||
| // } | |||||
| ], | |||||
| amountMoney: '', | |||||
| djZmoney:'', | |||||
| writeOffMoney: '', | |||||
| getFullYear: new Date().getFullYear(), | |||||
| getMonth: new Date().getMonth() + 1, | |||||
| getDate: new Date().getDate(), | |||||
| dateTime: '', | |||||
| show: null, | |||||
| billList: [], | |||||
| ifShowChart: null, | |||||
| ifShowChart1: null, | |||||
| ifShowChart2: null, | |||||
| ecBar: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| ecScatter: { | |||||
| lazyLoad: true | |||||
| }, | |||||
| djArr:[], | |||||
| djMoney:[], | |||||
| count:'' | |||||
| }, | |||||
| //获取商户信息 | |||||
| getUserInfo() { | |||||
| return new Promise((resolve, reject) => { | |||||
| Http.getRequest(config.api.userDetail, app.globalData.token, '', {}, (res) => { | |||||
| resolve(res.data); | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //今日交易额 | |||||
| getUnverifiedAmountOnDate() { | |||||
| let { | |||||
| getFullYear, | |||||
| getMonth, | |||||
| getDate, | |||||
| amountMoney, | |||||
| writeOffMoney | |||||
| } = this.data | |||||
| let dateTimer = getFullYear + '-' + getMonth + '-' + getDate | |||||
| Http.getRequest(config.api.getUnverifiedAmountOnDate, app.globalData.token, '', { | |||||
| date: dateTimer | |||||
| }, (res) => { | |||||
| console.log(res) | |||||
| this.setData({ | |||||
| amountMoney: res.data.amount, | |||||
| count: res.data.orderCount, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //今日核销额 | |||||
| getVerifiedAmountOnDate() { | |||||
| let { | |||||
| getFullYear, | |||||
| getMonth, | |||||
| getDate | |||||
| } = this.data | |||||
| let dateTimer = getFullYear + '-' + getMonth + '-' + getDate | |||||
| Http.getRequest(config.api.getVerifiedAmountOnDate, app.globalData.token, '', { | |||||
| date: dateTimer | |||||
| }, (res) => { | |||||
| this.setData({ | |||||
| writeOffMoney: res.data.amount | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| onPullDownRefresh: function() { | |||||
| let that = this; | |||||
| // that.getUnverifiedAmountOnDate() | |||||
| // that.getVerifiedAmountOnDate(); | |||||
| that.getpaybill(); | |||||
| if (that.oneComponent) { | |||||
| that.getrecordData(); | |||||
| } | |||||
| if (that.jiaoyiComponent) { | |||||
| that.getTabletListOrder(); | |||||
| } | |||||
| if (that.hexiaoComponent) { | |||||
| that.getTabletListVerify(); | |||||
| } | |||||
| tt.hideNavigationBarLoading(); | |||||
| tt.stopPullDownRefresh(); | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| var that = this; | |||||
| this.checkuserstatus() | |||||
| }, | |||||
| onReady() { | |||||
| // this.oneComponent = this.selectComponent('#mychart-pament'); | |||||
| // this.jiaoyiComponent = this.selectComponent('#mychart-jiaoyi'); | |||||
| // this.hexiaoComponent = this.selectComponent('#mychart-hexiao'); | |||||
| this.getrecordData(); | |||||
| this.getTabletListOrder(); | |||||
| this.getTabletListVerify(); | |||||
| this.getUserInfo().then(res => { | |||||
| this.setData({ | |||||
| userInfo: res, | |||||
| userInfoLoadIf:true | |||||
| }) | |||||
| app.globalData.merchant = res; | |||||
| tt.setNavigationBarTitle({ | |||||
| title: res.mall_name + "(" + res.merchant_name + ")" | |||||
| }) | |||||
| }) | |||||
| app.globalData.userInfo = this.getUserInfo; | |||||
| }, | |||||
| /** | |||||
| * gotolook | |||||
| */ | |||||
| gotobill: function(e) { | |||||
| console.log(e) | |||||
| let owe = e.currentTarget.dataset.data.owe; | |||||
| let status = e.currentTarget.dataset.data.status; | |||||
| let receivedate = e.currentTarget.dataset.data.receiveDate; | |||||
| let starttime = e.currentTarget.dataset.data.starttime; | |||||
| let endtime = e.currentTarget.dataset.data.endtime; | |||||
| let id = e.currentTarget.dataset.data.id; | |||||
| var transactionId = e.currentTarget.dataset.data.transactionId; | |||||
| var priceDetail = e.currentTarget.dataset.data.priceDetail; | |||||
| var freeze = e.currentTarget.dataset.data.freeze; | |||||
| let pay = e.currentTarget.dataset.data.pay ? e.currentTarget.dataset.data.pay : 0; | |||||
| let latePayPrice = e.currentTarget.dataset.data.latePayPrice ? e.currentTarget.dataset.data.latePayPrice : 0; | |||||
| let serviceChargePay = e.currentTarget.dataset.data.serviceChargePay ? e.currentTarget.dataset.data.serviceChargePay : 0; | |||||
| if (starttime && endtime) { | |||||
| var end = starttime + "至" + endtime; | |||||
| } else { | |||||
| var end = ""; | |||||
| } | |||||
| if (transactionId) { | |||||
| var tradeTime = e.currentTarget.dataset.data.tradeTime; | |||||
| } else { | |||||
| var tradeTime = e.currentTarget.dataset.data.payDate; | |||||
| } | |||||
| console.log(e.currentTarget.dataset.data, tradeTime, 6666666) | |||||
| var billTypeValue = e.currentTarget.dataset.data.billTypeValue; | |||||
| let receivePay = e.currentTarget.dataset.data.receivePay; | |||||
| tt.navigateTo({ | |||||
| url: `/pages/bill/billdetail/index?owe=${owe}&receivedate=${receivedate}&status=${status}&end=${end}&id=${id}&tradeTime=${tradeTime}&transactionId=${transactionId}&priceDetail=${priceDetail}&billTypeValue=${billTypeValue}&receivePay=${receivePay}&freeze=${freeze}&pay=${pay}&latePayPrice=${latePayPrice}&serviceChargePay=${serviceChargePay}`, | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 核销记录 | |||||
| */ | |||||
| // hexiaoInit: function(heXiaox, heXiaoYiy) { | |||||
| // this.hexiaoComponent.init((canvas, width, height) => { | |||||
| // const barChart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // canvas.setChart(barChart); | |||||
| // barChart.setOption(getScatterOption(heXiaox, heXiaoYiy)); | |||||
| // return barChart; | |||||
| // }); | |||||
| // }, | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| // jiaoyiInit: function(jiaoYix, jiaoYiy) { | |||||
| // this.jiaoyiComponent.init((canvas, width, height) => { | |||||
| // const barChart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // canvas.setChart(barChart); | |||||
| // barChart.setOption(getBarOption(jiaoYix, jiaoYiy)); | |||||
| // return barChart; | |||||
| // }); | |||||
| // }, | |||||
| // init_one: function(xdata, ydata) { //初始化第一个图表 | |||||
| // console.log(this.oneComponent, xdata, ydata) | |||||
| // this.oneComponent.init((canvas, width, height) => { | |||||
| // const chart = echarts.init(canvas, null, { | |||||
| // width: width, | |||||
| // height: height | |||||
| // }); | |||||
| // console.log(chart, xdata, ydata) | |||||
| // setOption(chart, xdata, ydata) | |||||
| // this.chart = chart; | |||||
| // return chart; | |||||
| // }); | |||||
| // }, | |||||
| toWriteoff(e) { | |||||
| console.log(e) | |||||
| let id = e.currentTarget.dataset.id | |||||
| console.log(id) | |||||
| if (id == 0) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/scan/scan', | |||||
| }) | |||||
| } else if (id == 1) { | |||||
| // 优惠卡收款 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/cardReceive/cardReceive', | |||||
| }) | |||||
| } else if (id == 2) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/main/solution/solution', | |||||
| }) | |||||
| } else if (id == 3) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/payment/index', | |||||
| }) | |||||
| } else if (id == 4) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/creditSelect/index', | |||||
| }) | |||||
| } else if (id == 5) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/incouponSelect/index', | |||||
| }) | |||||
| } else if (id == 6) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/marktingsettlement/marktingsettlement', | |||||
| }) | |||||
| }else if(id==7){//用户发卷 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/sendDiscounts/sendDiscounts', | |||||
| }) | |||||
| } else if (id == 8) {//商品配送 | |||||
| tt.navigateTo({ | |||||
| url: '/pages/delivery/delivery', | |||||
| }) | |||||
| } | |||||
| }, | |||||
| toTran(e) { | |||||
| let type = e.currentTarget.dataset.type | |||||
| tt.navigateTo({ | |||||
| url: `./transaction/transaction?type=${type}`, | |||||
| }) | |||||
| }, | |||||
| onShow() { | |||||
| let that = this; | |||||
| /** | |||||
| * 交易记录 | |||||
| */ | |||||
| if (that.oneComponent) { | |||||
| that.getrecordData(); | |||||
| } | |||||
| if (that.jiaoyiComponent) { | |||||
| that.getTabletListOrder(); | |||||
| } | |||||
| if (that.hexiaoComponent) { | |||||
| that.getTabletListVerify(); | |||||
| } | |||||
| /** | |||||
| * 获得交易记录和核销额 | |||||
| */ | |||||
| that.getUnverifiedAmountOnDate(); | |||||
| that.getVerifiedAmountOnDate(); | |||||
| that.getpaybill(); | |||||
| that.setData({ | |||||
| currentIndex: 0 | |||||
| }) | |||||
| }, | |||||
| getpaybill: function() { | |||||
| let that = this; | |||||
| that.getUserInfo().then(res => { | |||||
| Http.postRequest(config.api.listBillOweAndWaitPay, app.globalData.token, '', { | |||||
| merchantId: res.merchant_id, | |||||
| tenantId: res.tenant_id, | |||||
| }, (res) => { | |||||
| console.log(res); | |||||
| if (res) { | |||||
| res.data.map(file => { | |||||
| if (file.starttime && file.endtime) { | |||||
| file.end = file.starttime.substring(0, 7).replace(/-/g, ".") + "-" + file.endtime.substring(0, 7).replace(/-/g, "."); | |||||
| } else { | |||||
| file.end = ""; | |||||
| file.endtime = "" | |||||
| } | |||||
| file.receiveDate = util.fmtDate(file.receiveDate); | |||||
| }) | |||||
| that.setData({ | |||||
| billList: res.data, | |||||
| djArr : res.data.filter(item => item.status == 2), | |||||
| }) | |||||
| that.data.djMoney = that.data.djArr.map(item => parseInt(item.owe / 100)) | |||||
| let money = 0 | |||||
| that.data.djMoney.filter(function (item, index) { | |||||
| money += item; | |||||
| }) | |||||
| that.setData({ | |||||
| djZmoney: changeNum.changePeoNumber(money) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| getTabletListVerify: function() { | |||||
| let that = this; | |||||
| getTabletListVerify() | |||||
| .then(res => { | |||||
| if (res.xList.length > 0 && res.amountList.length > 0) { | |||||
| that.setData({ | |||||
| ifShowChart1: 'show1' | |||||
| }) | |||||
| // that.hexiaoInit(res.xList, res.amountList) | |||||
| } else { | |||||
| /** | |||||
| * 判断是否显示数据表 | |||||
| */ | |||||
| that.setData({ | |||||
| ifShowChart1: 'show' | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 交易 | |||||
| */ | |||||
| getTabletListOrder: function() { | |||||
| let that = this; | |||||
| getTabletListOrder() | |||||
| .then(res => { | |||||
| console.log(res); | |||||
| if (res.xList.length > 0 && res.amountList.length > 0) { | |||||
| // that.jiaoyiInit(res.xList, res.amountList) | |||||
| that.setData({ | |||||
| ifShowChart: 'show1' | |||||
| }) | |||||
| } else { | |||||
| /** | |||||
| * 判断是否显示数据表 | |||||
| */ | |||||
| that.setData({ | |||||
| ifShowChart: 'show' | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 收银记录 | |||||
| */ | |||||
| getrecordData() { | |||||
| let _this = this; | |||||
| HttpBasics.get({ | |||||
| url: config.api.getMicroPayAmountOnDate | |||||
| }) | |||||
| .then(res => { | |||||
| _this.setData({ | |||||
| recordMoney: res.data.amount | |||||
| }) | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }); | |||||
| HttpBasics.get({ | |||||
| url: config.api.listMicropay | |||||
| }) | |||||
| .then(res => { | |||||
| let dataX = []; | |||||
| let dataY = []; | |||||
| if (res.data && res.data.length > 0) { | |||||
| _this.setData({ | |||||
| ifShowChart2: "show1" | |||||
| }) | |||||
| res.data.map((item, index) => { | |||||
| dataX.push(item.mouthAndDate) | |||||
| dataY.push(Number(item.amountStr)) | |||||
| }) | |||||
| // _this.init_one(dataX, dataY) | |||||
| } else { | |||||
| _this.setData({ | |||||
| ifShowChart2: "show" | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| toTran(e) { | |||||
| let type = e.currentTarget.dataset.type | |||||
| tt.navigateTo({ | |||||
| url: `/pages/transaction/transaction?type=${type}`, | |||||
| }) | |||||
| }, | |||||
| toRecord() { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/record/list/index`, | |||||
| }) | |||||
| }, | |||||
| checkuserstatus() { | |||||
| let _this = this; | |||||
| HttpBasics.get({ | |||||
| url: config.api.checkPhoneStatus | |||||
| }) | |||||
| .then(res => { | |||||
| }) | |||||
| .catch(err => { | |||||
| if (err.code == 11005) { | |||||
| tt.redirectTo({ | |||||
| url: `/pages/getuserinfo/index` | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,10 @@ | |||||
| { | |||||
| "backgroundTextStyle": "dark", | |||||
| "navigationBarBackgroundColor": "#52A0FD", | |||||
| "navigationBarTitleText": "", | |||||
| "navigationBarTextStyle": "white", | |||||
| "enablePullDownRefresh": true, | |||||
| "usingComponents": { | |||||
| "ec-canvas": "../../ec-canvas/ec-canvas" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,106 @@ | |||||
| <view class='firstPage'> | |||||
| <view class='fix'> | |||||
| <image src='../../assets/images/bannerbg.png'></image> | |||||
| <view class='writeOff writeOff1'> | |||||
| <!-- <view class='topBox clearfix' tt:if="{{djArr.length>0||count > 0}}" > | |||||
| <view class='left fl' > | |||||
| <text>待缴账单</text> | |||||
| <text>{{djArr.length}}</text> | |||||
| <text>¥{{djZmoney}}</text> | |||||
| </view> | |||||
| <view class='right fr'> | |||||
| <text>今日交易单数</text> | |||||
| <text>{{count}}</text> | |||||
| <text>¥{{amountMoney/100}}</text> | |||||
| </view> | |||||
| </view> --> | |||||
| <!-- tt:if="{{djArr.length == 0 && count == 0}}" --> | |||||
| <view class='topBox2 clearfix' > | |||||
| <view class='imgBox'> | |||||
| <image src='{{userInfo.merchant_img_url}}' mode='{{widthFix}}' ></image> | |||||
| </view> | |||||
| <text class='name'>{{userInfo.mall_name}}({{userInfo.merchant_name}})</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='location'> | |||||
| <view class='message' tt:if="{{billList.length>0}}"> | |||||
| <image src='../../assets/images/mess.png' mode='widthFix'></image> | |||||
| <text>{{billList.length}}</text> | |||||
| </view> | |||||
| <swiper tt:if="{{billList.length>0}}" current='{{currentIndex}}' class="swiper_container" vertical="true" autoplay="true" circular="true" interval="3000"> | |||||
| <block tt:for="{{billList}}" tt:key="index"> | |||||
| <swiper-item bindtap="gotobill" data-data='{{item}}' data-id='{{item.id}}'> | |||||
| <view class="swiper_item clearfix"> | |||||
| <text tt:if="{{item.status=='1'}}" class="state1 fl">欠缴</text> | |||||
| <text tt:if="{{item.status=='2'}}" class="state2 fl">待缴</text> | |||||
| <text class="fl billtype">{{item.name}}{{item.end}}</text> | |||||
| <text class="fl">{{item.owe/100}}元</text> | |||||
| </view> | |||||
| </swiper-item> | |||||
| </block> | |||||
| </swiper> | |||||
| </view> | |||||
| <view class='writeOff'> | |||||
| <view class='classification clearfix' tt:if="{{userInfoLoadIf}}"> | |||||
| <view tt:for='{{classIfyList}}' tt:if="{{!(item.id==4&&userInfo.creditLocked==1)}}" tt:key='{{index}}'> | |||||
| <view hover-class='active' style='background:{{item.bg}}' bindtap='toWriteoff' data-id='{{item.id}}'> | |||||
| <icon class='{{item.icon}}'></icon> | |||||
| </view> | |||||
| <text>{{item.text}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='jiaoyi jiaoyi1 jiaoyi2' hover-class='actives' bindtap='toTran' data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>交易记录</text> | |||||
| </view> | |||||
| <view>今日交易额:{{amountMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart!='show'}}"> | |||||
| <ec-canvas id="mychart-jiaoyi" canvas-id="mychart-multi-bar" ec="{{ ecBar }}"></ec-canvas> | |||||
| </view> --> | |||||
| <view class='transaction' tt:if="{{ifShowChart=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave01.png' mode='widthFix'></image> | |||||
| <view class="nothave">暂无数据</view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='jiaoyi' hover-class='actives' bindtap='toTran' data-type='1'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>核销记录</text> | |||||
| </view> | |||||
| <view>今日核销额:{{writeOffMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart1!='show'}}"> | |||||
| <ec-canvas id="mychart-hexiao" canvas-id="mychart-multi-scatter" ec="{{ ecScatter }}"></ec-canvas> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart1=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave02.png' mode='widthFix'></image> | |||||
| <view class="nothave1">暂无数据</view> | |||||
| </view> --> | |||||
| </view> | |||||
| <!-- <view class='jiaoyi jiaoyi1' hover-class='actives' bindtap='toRecord' data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>收银记录</text> | |||||
| </view> | |||||
| <view>今日收银:{{recordMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart2!='show'}}"> | |||||
| <ec-canvas id="mychart-pament" canvas-id="mychart-pament-bar" ec="{{ ec }}"></ec-canvas> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart2=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nohave03.png' mode='widthFix'></image> | |||||
| <view class="nothave2">暂无数据</view> | |||||
| </view> | |||||
| </view> --> | |||||
| </view> | |||||
| @@ -0,0 +1,431 @@ | |||||
| @import "../../iconfont.ttss"; | |||||
| /* .top { | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10 80; | |||||
| padding-bottom: 200rpx; | |||||
| } */ | |||||
| page { | |||||
| background: #f8f8fa; | |||||
| } | |||||
| .img{ | |||||
| display: block; | |||||
| width: 160rpx; | |||||
| margin: 0 auto; | |||||
| } | |||||
| @font-face { | |||||
| font-family: 'iconfont'; /* project id 1353693 */ | |||||
| src: url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.eot'); | |||||
| src: url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.eot?#iefix') format('embedded-opentype'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.woff2') format('woff2'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.woff') format('woff'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.ttf') format('truetype'), | |||||
| url('//at.alicdn.com/t/font_1353693_mi95v4vvx8n.svg#iconfont') format('svg'); | |||||
| } | |||||
| .iconfonts { | |||||
| display: inline-block; | |||||
| vertical-align: middle; | |||||
| width: 40rpx; | |||||
| height: 40rpx; | |||||
| margin-top: -7rpx; | |||||
| margin-right: -26rpx; | |||||
| } | |||||
| .firstPage { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .location { | |||||
| position: relative; | |||||
| width: 100%; | |||||
| font-size: 30rpx; | |||||
| text-align: left; | |||||
| color: #fff; | |||||
| } | |||||
| .fix image { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| width: 100%; | |||||
| height: 168rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } | |||||
| .location image { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| width: 100%; | |||||
| height: 168rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } | |||||
| .location text { | |||||
| display: block; | |||||
| text-align: left; | |||||
| position: relative; | |||||
| z-index: 100; | |||||
| font-size: 30rpx; | |||||
| color: #000; | |||||
| letter-spacing: 1.16rpx; | |||||
| } | |||||
| .fix{ | |||||
| margin-bottom: 10rpx; | |||||
| } | |||||
| .writeOff { | |||||
| width: 100%; | |||||
| height: 24.5%; | |||||
| margin-top: 10rpx; | |||||
| } | |||||
| .writeOff>text { | |||||
| width: 92%; | |||||
| height: 50rpx; | |||||
| display: block; | |||||
| font-size: 30rpx; | |||||
| font-weight: bold; | |||||
| padding-top: 1.4%; | |||||
| margin: 0 auto; | |||||
| } | |||||
| .topBox{ | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| background: #fff; | |||||
| width: 570rpx; | |||||
| margin: 20rpx auto 0; | |||||
| border-top: 1px solid #f6f5f5; | |||||
| padding: 30rpx 70rpx; | |||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.05); | |||||
| color: #000; | |||||
| border-radius:32rpx; | |||||
| } | |||||
| .topBox view{ | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| text-align: center; | |||||
| } | |||||
| .topBox2{ | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| background: #fff; | |||||
| height: 240rpx; | |||||
| width: 710rpx; | |||||
| margin: 20rpx auto; | |||||
| color: #000099; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| text-align: center; | |||||
| border-radius:32rpx; | |||||
| } | |||||
| .imgBox{ | |||||
| width: 120rpx; | |||||
| height: 120rpx; | |||||
| margin: 20rpx auto; | |||||
| } | |||||
| .topBox2 image{ | |||||
| width: 120rpx; | |||||
| height: 120rpx; | |||||
| margin: 20rpx auto; | |||||
| } | |||||
| .name{ | |||||
| font-size: 30rpx; | |||||
| text-align: center; | |||||
| height: 60rpx; | |||||
| line-height: 60rpx; | |||||
| } | |||||
| .left>text:nth-child(2), .right>text:nth-child(2){ | |||||
| font-size: 80rpx; | |||||
| margin: 10rpx 0; | |||||
| color:#FD782D; | |||||
| } | |||||
| .left>text,.right>text{ | |||||
| width: 255rpx; | |||||
| overflow: hidden; | |||||
| text-overflow:ellipsis; | |||||
| white-space: nowrap; | |||||
| color: #475669; | |||||
| } | |||||
| .left>text:nth-child(3),.right>text:nth-child(3){ | |||||
| color:#475669; | |||||
| } | |||||
| .classification { | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| width: 710rpx; | |||||
| margin: 0 auto; | |||||
| display: flex; | |||||
| flex-wrap: wrap; | |||||
| } | |||||
| .classification>view { | |||||
| background: #FFF; | |||||
| text-align: center; | |||||
| width: 19.5%; | |||||
| border: .1rpx #eee solid; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| padding-bottom: 30rpx ; | |||||
| border-left: none!important; | |||||
| } | |||||
| .classification>view:nth-child(1) { | |||||
| border-radius: 16rpx 0 0 0; | |||||
| } | |||||
| .classification>view:nth-child(6) { | |||||
| border-radius:0 0 0 16rpx; | |||||
| border-top: none!important; | |||||
| } | |||||
| .classification>view:nth-child(7),.classification>view:nth-child(8) { | |||||
| border-top: none!important; | |||||
| } | |||||
| .classification>view:nth-child(5) { | |||||
| border-right: none!important; | |||||
| border-radius:0 16rpx 0 0; | |||||
| } | |||||
| .classification>view:nth-child(10) { | |||||
| border-top: none!important; | |||||
| border-right: none!important; | |||||
| border-radius:0 0 16rpx 0; | |||||
| } | |||||
| .classification>view>view { | |||||
| width: 110rpx; | |||||
| height: 110rpx; | |||||
| border-radius: 50%; | |||||
| text-align: center; | |||||
| margin: 0 auto; | |||||
| line-height:110rpx; | |||||
| } | |||||
| .icon-shoufukuan{ | |||||
| color: rgb(91, 115, 255); | |||||
| } | |||||
| .icon-hexiao{ | |||||
| color: #EEAF5C; | |||||
| } | |||||
| .icon-shouye1{ | |||||
| color: #FF3A1D; | |||||
| } | |||||
| .icon-shouyintai1{ | |||||
| color: rgb(33, 158, 214); | |||||
| } | |||||
| .icon-jifen{ | |||||
| color: #00cd00; | |||||
| } | |||||
| .icon-quan{ | |||||
| color: #FF5183; | |||||
| } | |||||
| .icon-jiesuan{ | |||||
| color:#1296db; | |||||
| } | |||||
| .icon-lingquanzhongxin{ | |||||
| color: #EEAF5C; | |||||
| } | |||||
| .icon-wuliu{ | |||||
| color:#1296db; | |||||
| font-size: 72rpx !important; | |||||
| } | |||||
| .active { | |||||
| opacity: 0.6; | |||||
| } | |||||
| .actives { | |||||
| opacity: 0.6; | |||||
| } | |||||
| .classification>view>view icon { | |||||
| font-size: 60rpx; | |||||
| } | |||||
| .classification>view>text { | |||||
| font-size: 24rpx; | |||||
| color: #475669; | |||||
| letter-spacing: 2rpx; | |||||
| line-height: 26rpx; | |||||
| } | |||||
| .transaction { | |||||
| position: relative; | |||||
| height:280rpx; | |||||
| } | |||||
| .reportForm { | |||||
| background: #fff; | |||||
| } | |||||
| .toTransaction { | |||||
| width: 92%; | |||||
| height: 87rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| padding: 0 4% 20rpx; | |||||
| line-height: 87rpx; | |||||
| background: #fff; | |||||
| } | |||||
| .toTransaction>view:nth-child(1) text { | |||||
| font-size: 30rpx; | |||||
| color: #000; | |||||
| letter-spacing: 1.16rpx; | |||||
| } | |||||
| .toTransaction>view:nth-child(2) { | |||||
| font-size: 28rpx; | |||||
| color: #919191; | |||||
| text-align: right; | |||||
| } | |||||
| .reportForm { | |||||
| position: relative; | |||||
| width: 100%; | |||||
| height: 245rpx; | |||||
| } | |||||
| .Fill { | |||||
| color: #fff; | |||||
| background: #fff; | |||||
| } | |||||
| .jiaoyi { | |||||
| position: relative; | |||||
| z-index: 1; | |||||
| width: 710rpx; | |||||
| margin: 0 auto; | |||||
| border-radius: 16rpx; | |||||
| margin-top: 30rpx; | |||||
| overflow: hidden; | |||||
| margin-bottom: 30rpx; | |||||
| background:#fff; | |||||
| padding-bottom: 30rpx; | |||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.05); | |||||
| } | |||||
| .swiper_container { | |||||
| position: relative; | |||||
| z-index: 100; | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| width: 100%; | |||||
| } | |||||
| .swiper_item { | |||||
| position: relative; | |||||
| z-index: 1000; | |||||
| font-size: 28rpx; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| white-space: nowrap; | |||||
| letter-spacing: 2px; | |||||
| color: #fff; | |||||
| } | |||||
| .swiper_item text { | |||||
| display: inline-block; | |||||
| text-align: left; | |||||
| } | |||||
| .title { | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| text-indent: 0.5em; | |||||
| font-size: 28rpx; | |||||
| color: #fff; | |||||
| background: #52a0fd; | |||||
| } | |||||
| .number { | |||||
| color: red; | |||||
| } | |||||
| .message { | |||||
| position: absolute; | |||||
| z-index: 1000; | |||||
| left: 20rpx; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| width: 40rpx; | |||||
| height: 40rpx; | |||||
| } | |||||
| .message text { | |||||
| font-size: 26rpx; | |||||
| display: block; | |||||
| height: 40rpx; | |||||
| line-height: 36rpx; | |||||
| width: 100%; | |||||
| text-align: center !important; | |||||
| position: relative; | |||||
| z-index: 10; | |||||
| text-indent: 0 !important; | |||||
| color: #FFF; | |||||
| } | |||||
| .message image { | |||||
| position: absolute��important; | |||||
| z-index: 1; | |||||
| top: 0; | |||||
| left: 0; | |||||
| bottom: 0; | |||||
| right: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .state1 { | |||||
| color: red !important; | |||||
| margin-left: 80rpx; | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .state2 { | |||||
| color: #ffce00 !important; | |||||
| margin-left: 80rpx; | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .billtype { | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .nothave{ | |||||
| text-align: center; | |||||
| color: #afd9eb; | |||||
| font-size: 30rpx; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .nothave1{ | |||||
| font-size: 30rpx; | |||||
| color: #ffc3c2; | |||||
| text-align: center; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .nothave2{ | |||||
| font-size: 30rpx; | |||||
| color: #FFCE00; | |||||
| text-align: center; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .container{ | |||||
| width: 100%; | |||||
| height: 240rpx; | |||||
| position: relative; | |||||
| } | |||||
| #mychart-pament { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| height: 100%; | |||||
| left: 0; | |||||
| right: 0; | |||||
| } | |||||
| /* .fix{ | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| right: 0; | |||||
| z-index: 10; | |||||
| } */ | |||||
| .jiaoyi2{ | |||||
| /* margin-top: 333rpx; */ | |||||
| position: relative; | |||||
| z-index: 1; | |||||
| } | |||||
| @@ -40,7 +40,7 @@ Page({ | |||||
| }) | }) | ||||
| setTimeout(function () { | setTimeout(function () { | ||||
| tt.reLaunch({ | tt.reLaunch({ | ||||
| url: '/pages/index/index', | |||||
| url: '/pages/main/main', | |||||
| }) | }) | ||||
| }, 1200) | }, 1200) | ||||
| @@ -5,7 +5,7 @@ Page({ | |||||
| }, | }, | ||||
| returnPage(){ | returnPage(){ | ||||
| tt.switchTab({ | tt.switchTab({ | ||||
| url: '/pages/index/index', | |||||
| url: '/pages/main/main', | |||||
| }) | }) | ||||
| }, | }, | ||||
| checkList(e){ | checkList(e){ | ||||
| @@ -16,8 +16,12 @@ Page({ | |||||
| userInfo: {}, | userInfo: {}, | ||||
| flag: 'hidden', | flag: 'hidden', | ||||
| isSet:false, | isSet:false, | ||||
| haveData: false | |||||
| haveData: false, | |||||
| ttBalanceUrl:"",//余额链接 | |||||
| ttImportUrl:"",//进件链接 | |||||
| }, | }, | ||||
| toDetail() { | toDetail() { | ||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `./signInDetail/signInDetail?userInfo=${this.data.userInfo}` | url: `./signInDetail/signInDetail?userInfo=${this.data.userInfo}` | ||||
| @@ -31,7 +35,7 @@ Page({ | |||||
| toExit() { | toExit() { | ||||
| console.log(1) | console.log(1) | ||||
| tt.reLaunch({ | tt.reLaunch({ | ||||
| url: '/pages/login/login', | |||||
| url: '/pages/index/index', | |||||
| }) | }) | ||||
| }, | }, | ||||
| showVersion: function () { | showVersion: function () { | ||||
| @@ -79,10 +83,7 @@ Page({ | |||||
| this.setData({ | this.setData({ | ||||
| userInfo: res | userInfo: res | ||||
| }) | }) | ||||
| console.log(this.data.userInfo) | |||||
| if (this.data.userInfo.merchant_id){ | |||||
| this.findAccountById(this.data.userInfo.merchant_id); | |||||
| } | |||||
| }) | }) | ||||
| // this.setData({ | // this.setData({ | ||||
| // appVersion:appVersion | // appVersion:appVersion | ||||
| @@ -122,36 +123,50 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| goWebView(e){ | |||||
| tt.showLoading({ | |||||
| title: "获取中!", | |||||
| }); | |||||
| let type = e.currentTarget.dataset.type | |||||
| this.findAccountById(this.data.userInfo.merchant_id,type) | |||||
| }, | |||||
| /** | /** | ||||
| * 查询收款账户状态 | * 查询收款账户状态 | ||||
| */ | */ | ||||
| findAccountById(merchant_id){ | |||||
| findAccountById(merchant_id,type){ | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.findAccountById, | |||||
| url: config.api.findTt, | |||||
| data:{ | data:{ | ||||
| id: merchant_id | |||||
| id: merchant_id, | |||||
| urlType:type | |||||
| } | } | ||||
| }).then(res=>{ | }).then(res=>{ | ||||
| console.log(res) | |||||
| tt.hideLoading() | |||||
| console.log(); | |||||
| /** | /** | ||||
| * receiverAccount | * receiverAccount | ||||
| * 如有:已设置收款账户 | * 如有:已设置收款账户 | ||||
| * 没有;未设置收款账户 | * 没有;未设置收款账户 | ||||
| */ | */ | ||||
| if (res && res.data && res.data.receiverAccount){ | |||||
| this.setData({ | |||||
| isSet: true, | |||||
| receiverAccount: res.data.receiverAccount, | |||||
| receiverComments: res.data.receiverComments, | |||||
| receiverType: res.data.receiverType | |||||
| }) | |||||
| }else{ | |||||
| this.setData({ | |||||
| isSet: false | |||||
| }) | |||||
| } | |||||
| }).catch(error=>{ | |||||
| console.log(error) | |||||
| tt.setClipboardData({ | |||||
| data: res.data, | |||||
| success: function() { | |||||
| tt.showToast({ | |||||
| title: '复制成功 请到浏览器打开', | |||||
| icon: "none", | |||||
| duration: 3000, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }).catch(err=>{ | |||||
| tt.hideLoading() | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon:"none", | |||||
| duration:2000 | |||||
| }) | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -36,6 +36,21 @@ | |||||
| <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | ||||
| </view> | </view> | ||||
| </navigator> | </navigator> | ||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin}}" data-type="{{1}}"> | |||||
| <text>开通收款账户</text> | |||||
| <text>点击复制链接</text> | |||||
| </view> | |||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin}}" data-type="{{2}}"> | |||||
| <text>账户余额</text> | |||||
| <text>点击复制链接</text> | |||||
| </view> | |||||
| <!-- <navigator url='/pages/accountManagement/index?merchant_id={{userInfo.merchant_id}}&merchant_name={{userInfo.merchant_name}}&phone={{userInfo.phone}}' open-type='navigate' hover-class='none'> | <!-- <navigator url='/pages/accountManagement/index?merchant_id={{userInfo.merchant_id}}&merchant_name={{userInfo.merchant_name}}&phone={{userInfo.phone}}' open-type='navigate' hover-class='none'> | ||||
| <view> | <view> | ||||
| <text>收款账户管理</text> | <text>收款账户管理</text> | ||||
| @@ -63,6 +78,7 @@ | |||||
| <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | ||||
| </view> | </view> | ||||
| </navigator> | </navigator> | ||||
| <view bindtap='phone' data-phone='{{userInfo.service_phone}}'> | <view bindtap='phone' data-phone='{{userInfo.service_phone}}'> | ||||
| @@ -13,7 +13,7 @@ Page({ | |||||
| flag: false, | flag: false, | ||||
| detail: '', | detail: '', | ||||
| remark: '', | remark: '', | ||||
| contentType: 0, | |||||
| contentType: 0, | |||||
| }, | }, | ||||
| rule() { | rule() { | ||||
| @@ -33,7 +33,7 @@ Page({ | |||||
| var that = this; | var that = this; | ||||
| Common.getCouponOrderDetail(couponOrderId) | Common.getCouponOrderDetail(couponOrderId) | ||||
| .then(res => { | .then(res => { | ||||
| console.log(res) | |||||
| console.log(res,"res123") | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.setData({ | this.setData({ | ||||
| @@ -11,7 +11,7 @@ | |||||
| "scripts": false, | "scripts": false, | ||||
| "mockLogin": false | "mockLogin": false | ||||
| }, | }, | ||||
| "appid": "tt7af40c49e5cd8d5001", | |||||
| "appid": "tt1f6669db8058907a01", | |||||
| "projectname": "tt富茂B", | "projectname": "tt富茂B", | ||||
| "condition": { | "condition": { | ||||
| "miniprogram": { | "miniprogram": { | ||||
| @@ -1,28 +1,9 @@ | |||||
| const config = require("../config/config.js"); | |||||
| const app = getApp(); | |||||
| class HttpBasics { | class HttpBasics { | ||||
| constructor(address) { | |||||
| if (address) { | |||||
| this.address = address; | |||||
| } | |||||
| } | |||||
| /** | |||||
| * 配置 | |||||
| */ | |||||
| config = config; | |||||
| /** | |||||
| * 请求路径前缀 | |||||
| */ | |||||
| address ='https://btest.malls.iformall.com/B';// | |||||
| /** | |||||
| * 请求头 | |||||
| */ | |||||
| headers = { | headers = { | ||||
| "Content-Type": "application/json;charset=UTF-8", | "Content-Type": "application/json;charset=UTF-8", | ||||
| token: "" | token: "" | ||||
| // token: "0b272d7d-d669-401a-8d4b-a9eef9340dc1:1027:tt-cuser" | |||||
| }; | }; | ||||
| /** | /** | ||||
| * 设置token | * 设置token | ||||
| * @param {*} token | * @param {*} token | ||||
| @@ -30,7 +11,7 @@ class HttpBasics { | |||||
| setToken(token) { | setToken(token) { | ||||
| this.headers.token = token; | this.headers.token = token; | ||||
| } | } | ||||
| /** | |||||
| /** | |||||
| * 设置bUserId | * 设置bUserId | ||||
| */ | */ | ||||
| setBUserId(bUserId){ | setBUserId(bUserId){ | ||||
| @@ -42,7 +23,10 @@ class HttpBasics { | |||||
| */ | */ | ||||
| get({ url, data, headers }) { | get({ url, data, headers }) { | ||||
| headers = { ...this.headers, ...headers }; | headers = { ...this.headers, ...headers }; | ||||
| url = `${this.address}${url}`; | |||||
| url = `${url}`; | |||||
| // tt.showLoading({ | |||||
| // title: 'loading...', | |||||
| // }) | |||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: url, | url: url, | ||||
| @@ -50,17 +34,17 @@ class HttpBasics { | |||||
| data: data, | data: data, | ||||
| method: "get", | method: "get", | ||||
| success: res => { | success: res => { | ||||
| // tt.hideLoading(); | |||||
| this.responseMap(res, resolve, reject); | this.responseMap(res, resolve, reject); | ||||
| }, | }, | ||||
| fail: err => { | fail: err => { | ||||
| // tt.hideLoading(); | |||||
| console.log(err) | console.log(err) | ||||
| if (err.errMsg == 'request:fail timeout') { | if (err.errMsg == 'request:fail timeout') { | ||||
| err.errMsg = '请求超时,请检查您的网络设置!' | err.errMsg = '请求超时,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail'){ | |||||
| } else if (err.errMsg == 'request:fail '){ | |||||
| err.errMsg = '未检查到您的网络,请检查您的网络设置!' | err.errMsg = '未检查到您的网络,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail request connect error') { | |||||
| err.errMsg = '连接失败' | |||||
| } | |||||
| } | |||||
| reject(err); | reject(err); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -72,24 +56,27 @@ class HttpBasics { | |||||
| */ | */ | ||||
| post({ url, data, headers }) { | post({ url, data, headers }) { | ||||
| headers = { ...this.headers, ...headers }; | headers = { ...this.headers, ...headers }; | ||||
| url = `${this.address}${url}`; | |||||
| url = `${url}`; | |||||
| // tt.showLoading({ | |||||
| // title: 'loading...', | |||||
| // }) | |||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| tt.request({ | tt.request({ | ||||
| url: url, | url: url, | ||||
| header: headers, | header: headers, | ||||
| data: data, | data: data, | ||||
| method: "post", | |||||
| method: "POST", | |||||
| success: res => { | success: res => { | ||||
| tt.hideLoading(); | |||||
| this.responseMap(res, resolve, reject); | this.responseMap(res, resolve, reject); | ||||
| }, | }, | ||||
| fail: err => { | fail: err => { | ||||
| // tt.hideLoading(); | |||||
| if (err.errMsg == 'request:fail timeout') { | if (err.errMsg == 'request:fail timeout') { | ||||
| err.errMsg = '请求超时,请检查您的网络设置!' | err.errMsg = '请求超时,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail') { | |||||
| } else if (err.errMsg == 'request:fail ') { | |||||
| err.errMsg = '未检查到您的网络,请检查您的网络设置!' | err.errMsg = '未检查到您的网络,请检查您的网络设置!' | ||||
| } else if (err.errMsg == 'request:fail request connect error') { | |||||
| err.errMsg = '连接失败' | |||||
| } | |||||
| } | |||||
| reject(err); | reject(err); | ||||
| }, | }, | ||||
| complete: res => {} | complete: res => {} | ||||
| @@ -97,7 +84,7 @@ class HttpBasics { | |||||
| }); | }); | ||||
| } | } | ||||
| /** | /** | ||||
| * 过滤 请求信息 | |||||
| * 过滤 请求信息 | |||||
| * @param {*} res | * @param {*} res | ||||
| * @param {*} resolve | * @param {*} resolve | ||||
| * @param {*} reject | * @param {*} reject | ||||
| @@ -110,12 +97,13 @@ class HttpBasics { | |||||
| resolve(res.data); | resolve(res.data); | ||||
| } else if (res.data.code == 1052) { | } else if (res.data.code == 1052) { | ||||
| tt.reLaunch({ | tt.reLaunch({ | ||||
| url: '/pages/index/index' | |||||
| url: '/pages/main/main' | |||||
| }) | }) | ||||
| } else { | } else { | ||||
| reject(res.data); | reject(res.data); | ||||
| } | } | ||||
| } else { | |||||
| } | |||||
| else { | |||||
| console.log("请求出错:", res); | console.log("请求出错:", res); | ||||
| reject(res.data); | reject(res.data); | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| //let host = 'https://biformall.youlane.cn/B' | //let host = 'https://biformall.youlane.cn/B' | ||||
| //let host = 'http://17168c59.ngrok.io/B' | //let host = 'http://17168c59.ngrok.io/B' | ||||
| let host = 'https://btest.malls.iformall.com/B' | |||||
| let host = '' | |||||
| const postRequest = (url, token, message, postData, doSuccess, doFail) => { | const postRequest = (url, token, message, postData, doSuccess, doFail) => { | ||||
| let body = { ...postData }; | let body = { ...postData }; | ||||
| @@ -15,7 +15,6 @@ const postRequest = (url, token, message, postData, doSuccess, doFail) => { | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": token | "token": token | ||||
| // "token": "0b272d7d-d669-401a-8d4b-a9eef9340dc1:1027:tt-cuser" | |||||
| }, | }, | ||||
| data: body, | data: body, | ||||
| method: 'POST', | method: 'POST', | ||||
| @@ -49,7 +48,6 @@ const getRequest = (url, token, message, getData, doSuccess, doFail) => { | |||||
| header: { | header: { | ||||
| "content-type": "application/json;charset=UTF-8", | "content-type": "application/json;charset=UTF-8", | ||||
| "token": token | "token": token | ||||
| // "token": "0b272d7d-d669-401a-8d4b-a9eef9340dc1:1027:tt-cuser" | |||||
| }, | }, | ||||
| data: body, | data: body, | ||||
| method: 'GET', | method: 'GET', | ||||
| @@ -59,8 +57,7 @@ const getRequest = (url, token, message, getData, doSuccess, doFail) => { | |||||
| }; | }; | ||||
| doSuccess(res.data); | doSuccess(res.data); | ||||
| }, | }, | ||||
| fail: function (err) { | |||||
| console.log(err); | |||||
| fail: function (res) { | |||||
| if (message != "") { | if (message != "") { | ||||
| tt.hideLoading() | tt.hideLoading() | ||||
| }; | }; | ||||
| @@ -69,7 +66,6 @@ const getRequest = (url, token, message, getData, doSuccess, doFail) => { | |||||
| icon:"none" | icon:"none" | ||||
| }) | }) | ||||
| }, | }, | ||||
| }) | }) | ||||
| } | } | ||||
| module.exports = { | module.exports = { | ||||