Browse Source

提交代码

zh
杨豪 3 years ago
parent
commit
4e60bca597
  1. 3
      common/config.js
  2. 8
      manifest.json
  3. 142
      pages/index/addTask.vue
  4. 4
      pages/my/index.vue

3
common/config.js

@ -1,5 +1,6 @@
// const ROOTPATH1 = "http://192.168.0.112:8891/sqx_fast"; // 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 ROOTPATH1 = "http://192.168.1.17:8891/sqx_fast";
const ROOTPATH = "https://shop.canmoujiang.com/sqx_fast"; const ROOTPATH = "https://shop.canmoujiang.com/sqx_fast";
module.exports = { module.exports = {

8
manifest.json

@ -1,5 +1,5 @@
{ {
"name" : "餐谋匠吃货圈", "name" : "番茄商家版",
"appid" : "__UNI__uni_sqx", "appid" : "__UNI__uni_sqx",
"description" : "", "description" : "",
"versionName" : "1.0.6", "versionName" : "1.0.6",
@ -146,7 +146,11 @@
"provider" : "wx63ffb7b7894e99ae" "provider" : "wx63ffb7b7894e99ae"
} }
}, },
"permission" : {} "permission" : {
"scope.userLocation" : {
"desc" : "获取您当前位置进行定位操作"
}
}
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true

142
pages/index/addTask.vue

@ -35,11 +35,46 @@
<!-- <input type="digit" v-model="money" class="input" maxlength="9" :placeholder="jineplaceName" /> --> <!-- <input type="digit" v-model="money" class="input" maxlength="9" :placeholder="jineplaceName" /> -->
</view> </view>
</view> </view>
<view class="order-des"> <!-- <view class="order-des">
<view class="title">返现金额(每单)</view> <view class="title">返现金额(每单)</view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<input type="digit" v-model="money" class="input" maxlength="9" :placeholder="jineplaceName" /> <input type="digit" v-model="merchantMoney" class="input" maxlength="9" :placeholder="jineplaceName" />
</view>
</view> -->
<view class="order-des">
<view class="title">满返金额</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="memberPrice" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="merchantMoney" class="input" maxlength="9" :placeholder="jineplaceName" />
</view>
</view>
<!-- <view class="order-des">
<view class="title">会员满返</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="memberPrice" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="memberMoney" class="input" maxlength="9" placeholder="请输入优惠金额" />
</view>
</view>
<view class="order-des">
<view class="title">普通用户满返</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="price" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="money" class="input" maxlength="9" placeholder="请输入优惠金额" />
</view> </view>
</view> -->
<view class="order-des">
<view class="title">任务分类</view>
<checkbox-group @change="fromTypeChange" v-model="fromType">
<label v-for="item in fromTypeList" :key="item.id" style="font-size: 24rpx;">
<checkbox :value="item.id" :checked="fromType.includes(item.id+'')" /><text>{{item.name}}</text>
</label>
</checkbox-group>
</view> </view>
<view class="order-des"> <view class="order-des">
<view class="title">接单数量(每日)</view> <view class="title">接单数量(每日)</view>
@ -142,7 +177,11 @@
startingTime: '', startingTime: '',
closingTime: '', closingTime: '',
merchantId: 0, merchantId: 0,
merchantMoney:'',
money: '', money: '',
price: '',
memberMoney: '',
memberPrice: '',
orderId: '', //ID orderId: '', //ID
show: false, show: false,
show1: false, show1: false,
@ -164,6 +203,9 @@
name: '美团' name: '美团'
} }
], ],
showPlatform: false,
fromTypeList:[],
fromType: [],
params: { params: {
year: true, year: true,
month: true, month: true,
@ -188,6 +230,19 @@
this.checkMerchant(); this.checkMerchant();
let that = this; 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 => { that.$Request.getT('/common/type/149').then(res => {
if (res.code == 0) { if (res.code == 0) {
if (res.data && res.data.value) { if (res.data && res.data.value) {
@ -244,6 +299,9 @@
// //
openMsg() { openMsg() {
},
fromTypeChange(e){
this.fromType = e.detail.value
}, },
checkMerchant() { checkMerchant() {
let userId = this.$queue.getData('userId'); let userId = this.$queue.getData('userId');
@ -258,10 +316,13 @@
if (res.code == 0) { if (res.code == 0) {
this.merchantId = res.data.merchantId; this.merchantId = res.data.merchantId;
this.title = res.data.goodsTitle; 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.serviceMoney = res.data.serviceMoney ? res.data.serviceMoney : 0;
this.WeeklyNum = res.data.numStar; this.WeeklyNum = res.data.numStar;
this.upImageNum = res.data.numImg; this.upImageNum = res.data.numImg;
this.commentNum = res.data.numWord; this.commentNum = res.data.numWord;
@ -271,8 +332,6 @@
this.pingjiaName = this.pingjialist[0].name; this.pingjiaName = this.pingjialist[0].name;
} }
this.DistributionNum = res.data.scope; this.DistributionNum = res.data.scope;
this.ReceivingNum = res.data.sumNum; this.ReceivingNum = res.data.sumNum;
this.startTime = res.data.startTime; this.startTime = res.data.startTime;
@ -280,7 +339,8 @@
this.imageList.push(res.data.titleImg); this.imageList.push(res.data.titleImg);
this.platform = res.data.classify == 1 ? '饿了么' : '美团'; this.platform = res.data.classify == 1 ? '饿了么' : '美团';
this.platformId = res.data.classify; 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,"") // let asd = res.data.startTime.substring(0,10).replace(/-/g,"")
// console.log(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,"")) // console.log(res.data.endTime.substring(0,10).replace(/-/g,""))
@ -369,18 +429,46 @@
this.$queue.showToast('请输入配送范围!'); this.$queue.showToast('请输入配送范围!');
return; 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(); uni.hideLoading();
this.$queue.showToast('请输入返现金额'); this.$queue.showToast('请输入返现金额');
return; return;
} }
if (this.money < this.zuidi) { if (this.merchantMoney < this.zuidi) {
uni.hideLoading(); uni.hideLoading();
this.$queue.showToast('每单最低返现金额为' + this.zuidi + '元'); this.$queue.showToast('每单最低返现金额为' + this.zuidi + '元');
return; return;
} }
if(this.fromType.length == 0){
uni.hideLoading();
this.$queue.showToast('请选择任务分类');
return;
}
if (this.ReceivingNum == '') { if (this.ReceivingNum == '') {
uni.hideLoading(); uni.hideLoading();
@ -410,6 +498,11 @@
'userId': userId, 'userId': userId,
'merchantId': this.merchantId, 'merchantId': this.merchantId,
'goodsTitle': this.title, 'goodsTitle': this.title,
money: this.money,
price: this.memberPrice,
memberMoney: this.memberMoney,
memberPrice: this.memberPrice,
activityIds: this.fromType.toString(),
// 'titleImg': images, // 'titleImg': images,
// 'img': images1, // 'img': images1,
'sumNum': this.ReceivingNum, 'sumNum': this.ReceivingNum,
@ -417,7 +510,7 @@
'endTime': this.endTime + ' ' + '23:59:59', 'endTime': this.endTime + ' ' + '23:59:59',
'classify': this.platformId, 'classify': this.platformId,
// 'typeId': this.pinleiId, // 'typeId': this.pinleiId,
"merchantMoney": this.money, "merchantMoney": this.merchantMoney,
"numImg": this.upImageNum, "numImg": this.upImageNum,
"numStar": this.WeeklyNum, "numStar": this.WeeklyNum,
"numWord": this.commentNum, "numWord": this.commentNum,
@ -427,11 +520,11 @@
} }
uni.hideLoading(); uni.hideLoading();
// let shijiancha = this.DateDiff(this.startTime, this.endTime); // 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 + '元,并且活动一经发布,不可取消!'; let urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + zongjine + '元,并且活动一经发布,不可取消!';
if (this.serviceMoney != 0) { if (this.serviceMoney != 0) {
// zongjine = zongjine + fuwufei; // 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); this.sjcNumber);
urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + fuwufei + '元,(含' + this.serviceMoney + urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + fuwufei + '元,(含' + this.serviceMoney +
'元每单服务费)并且活动一经发布,不可取消!'; '元每单服务费)并且活动一经发布,不可取消!';
@ -637,6 +730,17 @@
page { page {
width: 100%; 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 { .container {
width: 100%; width: 100%;
@ -684,6 +788,17 @@
margin-top: 10upx; margin-top: 10upx;
} }
} }
.special-box{
display: flex;
align-items: center;
text{
color: #FF4701;
}
input{
width: 40%;
margin-left: 6rpx;
}
}
.order-list { .order-list {
margin-top: 20upx; margin-top: 20upx;
@ -726,7 +841,6 @@
border-bottom: 0; border-bottom: 0;
} }
} }
} }
.btns { .btns {

4
pages/my/index.vue

@ -302,7 +302,7 @@
if (res.code === 0) { if (res.code === 0) {
this.money = res.data.cannotMoney ? res.data.cannotMoney : 0; this.money = res.data.cannotMoney ? res.data.cannotMoney : 0;
this.cashMoney = res.data.mayMoney ? res.data.mayMoney : 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'); let token = this.$queue.getData('token');
if (token) { if (token) {
// if (this.MerchantList == 1) { // if (this.MerchantList == 1) {
if (url == "../activity/index") { if (url == "../activity/index" || url == "/pages/my/toExamine") {
uni.switchTab({ uni.switchTab({
url: url url: url
}) })

Loading…
Cancel
Save