diff --git a/common/config.js b/common/config.js index 7aefba4..cb61b9c 100644 --- a/common/config.js +++ b/common/config.js @@ -1,5 +1,6 @@ // const ROOTPATH1 = "http://192.168.0.112:8891/sqx_fast"; -const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast"; +// const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast"; +const ROOTPATH1 = "https://fanqie.app.cyjyyjy.com/sqx_fast"; // const ROOTPATH1 = "http://192.168.1.17:8891/sqx_fast"; const ROOTPATH = "https://shop.canmoujiang.com/sqx_fast"; module.exports = { diff --git a/manifest.json b/manifest.json index 275c8ae..733ef96 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "餐谋匠吃货圈", + "name" : "番茄商家版", "appid" : "__UNI__uni_sqx", "description" : "", "versionName" : "1.0.6", @@ -146,7 +146,11 @@ "provider" : "wx63ffb7b7894e99ae" } }, - "permission" : {} + "permission" : { + "scope.userLocation" : { + "desc" : "获取您当前位置进行定位操作" + } + } }, "mp-alipay" : { "usingComponents" : true diff --git a/pages/index/addTask.vue b/pages/index/addTask.vue index e06d772..973a43b 100644 --- a/pages/index/addTask.vue +++ b/pages/index/addTask.vue @@ -35,11 +35,46 @@ - + + + 满返金额 + + 满: + + 返: + + + + + + 任务分类 + + + 接单数量(每日) @@ -142,7 +177,11 @@ startingTime: '', closingTime: '', merchantId: 0, + merchantMoney:'', money: '', + price: '', + memberMoney: '', + memberPrice: '', orderId: '', //修改是用到的ID show: false, show1: false, @@ -164,6 +203,9 @@ name: '美团' } ], + showPlatform: false, + fromTypeList:[], + fromType: [], params: { year: true, month: true, @@ -188,6 +230,19 @@ this.checkMerchant(); let that = this; + //获取任务分类 + that.$Request.getT('/helpClassify/selectClassifyList').then(res => { + if (res.code == 0) { + this.fromTypeList = res.data.filter(item=> { + if(item.state == 1){ + item.name = item.classifyName + item.value = item.id + return item + } + }) + } + }); + that.$Request.getT('/common/type/149').then(res => { if (res.code == 0) { if (res.data && res.data.value) { @@ -244,6 +299,9 @@ // 开启订阅消息 openMsg() { + }, + fromTypeChange(e){ + this.fromType = e.detail.value }, checkMerchant() { let userId = this.$queue.getData('userId'); @@ -258,10 +316,13 @@ if (res.code == 0) { this.merchantId = res.data.merchantId; this.title = res.data.goodsTitle; - this.money = res.data.merchantMoney; + this.merchantMoney = res.data.merchantMoney; + this.money = res.data.money; + this.price = res.data.price; + this.memberPrice = res.data.memberPrice; + this.memberMoney = res.data.memberMoney; this.serviceMoney = res.data.serviceMoney ? res.data.serviceMoney : 0; - this.WeeklyNum = res.data.numStar; this.upImageNum = res.data.numImg; this.commentNum = res.data.numWord; @@ -271,8 +332,6 @@ this.pingjiaName = this.pingjialist[0].name; } - - this.DistributionNum = res.data.scope; this.ReceivingNum = res.data.sumNum; this.startTime = res.data.startTime; @@ -280,7 +339,8 @@ this.imageList.push(res.data.titleImg); this.platform = res.data.classify == 1 ? '饿了么' : '美团'; this.platformId = res.data.classify; - + this.fromType = res.data.activityIds.split(','); //任务分类 + console.log(this.fromType) // let asd = res.data.startTime.substring(0,10).replace(/-/g,"") // console.log(res.data.startTime.substring(0,10).replace(/-/g,"")) // console.log(res.data.endTime.substring(0,10).replace(/-/g,"")) @@ -369,18 +429,46 @@ this.$queue.showToast('请输入配送范围!'); return; } - - if (this.money == '') { + + if (this.memberPrice == '') { + uni.hideLoading(); + this.$queue.showToast('请输入满足金额'); + return; + } + // if (this.memberMoney == '') { + // uni.hideLoading(); + // this.$queue.showToast('请输入会员优惠金额'); + // return; + // } + // if (this.price == '') { + // uni.hideLoading(); + // this.$queue.showToast('请输入普通用户满足金额'); + // return; + // } + + // if (this.money == '') { + // uni.hideLoading(); + // this.$queue.showToast('请输入普通用户优惠金额'); + // return; + // } + + if (this.merchantMoney == '') { uni.hideLoading(); this.$queue.showToast('请输入返现金额'); return; } - if (this.money < this.zuidi) { + if (this.merchantMoney < this.zuidi) { uni.hideLoading(); this.$queue.showToast('每单最低返现金额为' + this.zuidi + '元'); return; } + + if(this.fromType.length == 0){ + uni.hideLoading(); + this.$queue.showToast('请选择任务分类'); + return; + } if (this.ReceivingNum == '') { uni.hideLoading(); @@ -410,6 +498,11 @@ 'userId': userId, 'merchantId': this.merchantId, 'goodsTitle': this.title, + money: this.money, + price: this.memberPrice, + memberMoney: this.memberMoney, + memberPrice: this.memberPrice, + activityIds: this.fromType.toString(), // 'titleImg': images, // 'img': images1, 'sumNum': this.ReceivingNum, @@ -417,7 +510,7 @@ 'endTime': this.endTime + ' ' + '23:59:59', 'classify': this.platformId, // 'typeId': this.pinleiId, - "merchantMoney": this.money, + "merchantMoney": this.merchantMoney, "numImg": this.upImageNum, "numStar": this.WeeklyNum, "numWord": this.commentNum, @@ -427,11 +520,11 @@ } uni.hideLoading(); // let shijiancha = this.DateDiff(this.startTime, this.endTime); - let zongjine = this.money * this.ReceivingNum * this.sjcNumber; + let zongjine = this.merchantMoney * this.ReceivingNum * this.sjcNumber; let urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + zongjine + '元,并且活动一经发布,不可取消!'; if (this.serviceMoney != 0) { // zongjine = zongjine + fuwufei; - let fuwufei = (this.serviceMoney * this.ReceivingNum * this.sjcNumber) + (this.money * this.ReceivingNum * + let fuwufei = (this.serviceMoney * this.ReceivingNum * this.sjcNumber) + (this.merchantMoney * this.ReceivingNum * this.sjcNumber); urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + fuwufei + '元,(含' + this.serviceMoney + '元每单服务费)并且活动一经发布,不可取消!'; @@ -637,6 +730,17 @@ page { width: 100%; } + checkbox .wx-checkbox-input { + transform: scale(0.7); + // border-radius: 50% !important; + /* color: #ffffff !important; */ + } + + checkbox .wx-checkbox-input.wx-checkbox-input-checked { + color: #fff; + background: #FF4701!important; + border-color: #FF4701 !important; + } .container { width: 100%; @@ -684,6 +788,17 @@ margin-top: 10upx; } } + .special-box{ + display: flex; + align-items: center; + text{ + color: #FF4701; + } + input{ + width: 40%; + margin-left: 6rpx; + } + } .order-list { margin-top: 20upx; @@ -726,7 +841,6 @@ border-bottom: 0; } } - } .btns { diff --git a/pages/my/index.vue b/pages/my/index.vue index d5e0adf..8c54f7e 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -302,7 +302,7 @@ if (res.code === 0) { this.money = res.data.cannotMoney ? res.data.cannotMoney : 0; this.cashMoney = res.data.mayMoney ? res.data.mayMoney : 0; - this.myMoney = parseFloat(this.money) + parseFloat(this.cashMoney); + this.myMoney = (parseFloat(this.money) + parseFloat(this.cashMoney)).toFixed(2); } }); }, @@ -431,7 +431,7 @@ let token = this.$queue.getData('token'); if (token) { // if (this.MerchantList == 1) { - if (url == "../activity/index") { + if (url == "../activity/index" || url == "/pages/my/toExamine") { uni.switchTab({ url: url })