首页轮播、分销管理、订单管理修改

master
Lee1203 2022-08-15 18:40:35 +08:00
parent 5ab65adf11
commit 2e140221f4
23 changed files with 149 additions and 92 deletions

View File

@ -57,7 +57,7 @@ page {background-color: #FFFFFF;}
/* 首页 */
.index-top{
width: 100%;
height: 420rpx;
height: 500rpx;
position: relative;
z-index: 0;
}

View File

@ -446,25 +446,17 @@ const tools = {
*/
countCustomer(phone=10086){
const res = uni.getSystemInfoSync();
if(res.platform=='ios'){
uni.makePhoneCall({
phoneNumber:phone*1,
success: () => {},
fail: () => {}
})
} else {
uni.showActionSheet({
itemList:[phone,'立即呼叫'],
itemColor:'#3875F6',
success: (res) => {
if(res.tapIndex==1){
uni.makePhoneCall({
phoneNumber:phone
})
}
uni.showActionSheet({
itemList:[phone],
itemColor:'#3875F6',
success: (res) => {
if(res.tapIndex==0){
uni.makePhoneCall({
phoneNumber:phone
})
}
})
}
}
})
},
/**
* @description 图片选择

View File

@ -3,10 +3,10 @@
<view class="index-page pad-x190 border-box" v-if="isLoading">
<!-- 轮播 -->
<view class="index-top">
<swiper-pu newRadius="0" :bannerList="bannerList" newHeight="420rpx" :isplay='isplay' :isDot="false"></swiper-pu>
<swiper-pu newRadius="0" :bannerList="bannerList" newHeight="500rpx" :isplay='isplay' :isDot="false"></swiper-pu>
</view>
<view class="index-content background-white">
<view class="index-statis-bg background-white" :style="{height:statusHeight+120+'px'}" v-if="!isShow"></view>
<view class="index-statis-bg background-white" :style="{height:statusHeight+60+'px'}" v-if="!isShow"></view>
<!-- 搜索 -->
<view class="pull-search-bg background-white radius20 pad-sx30 border-box" v-if="isShow">
<view class="pull-search radius20 flex">
@ -155,10 +155,10 @@
this.isplay =false;
},
onPageScroll(object){
if(object.scrollTop >= this.statusHeight+60 && object.scrollTop <= this.statusHeight+120){
if(object.scrollTop >= this.statusHeight+160 && object.scrollTop <= this.statusHeight+200){
this.isShow = false;
}
if(object.scrollTop <= this.statusHeight+50){
if(object.scrollTop <= this.statusHeight+150){
this.isShow = true;
}
},

View File

@ -18,6 +18,10 @@
<text>订单状态</text>
<text>{{orderDetail.status_text}}</text>
</view>
<view class="flex mar-s20" v-if="orderDetail.status=='closed'">
<text>取消原因</text>
<text>{{orderDetail.close_reason}}</text>
</view>
</view>
</view>
<!-- 订单信息 -->
@ -207,7 +211,14 @@
// 退
refundEv(){
this.$toolAll.tools.countCustomer('18683958573')
this.$requst.get('/api/index/base-config').then(res=>{
if(res.code==0) {
console.log(res,'客服电话');
this.$toolAll.tools.countCustomer(res.data.customer_service_tel);
} else {
this.$toolAll.tools.showToast(res.msg)
}
})
},
//

View File

@ -46,11 +46,11 @@
<view class="btn border-box" @tap.stop="cancleEv(item.coding)">取消订单</view>
</view>
<view class="btns flex" v-if="item.status == 'shipped'">
<view class="btn border-box" @tap.stop="refundEv">客服退款</view>
<!-- <view class="btn border-box" @tap.stop="refundEv">客服退款</view> -->
<view class="btn btn-02 border-box background-orange" @tap.stop="affirmEv(item.id)">确认收货</view>
</view>
<view class="btns flex" v-if="item.status == 'completed' || item.status == 'closed'">
<view class="btn border-box" @tap.stop="refundEv" v-if="item.status == 'completed'">退</view>
<!-- <view class="btn border-box" @tap.stop="refundEv" v-if="item.status == 'completed'">退</view> -->
<view class="btn border-box" @tap.stop="buyAgain(index)">再次购买</view>
</view>
</view>
@ -256,7 +256,14 @@
// 退
refundEv(){
this.$toolAll.tools.countCustomer('18683958573')
this.$requst.get('/api/index/base-config').then(res=>{
if(res.code==0) {
console.log(res,'客服电话');
this.$toolAll.tools.countCustomer(res.data.customer_service_tel);
} else {
this.$toolAll.tools.showToast(res.msg)
}
})
},
//

View File

@ -52,18 +52,18 @@
}
},
onLoad(op) {
if(this.$toolAll.tools.judgeAuth()) {
if(op.invite_code){
// invite_code
uni.setStorageSync('inviteCode',op.invite_code);
this.invite_code = op.invite_code;
}
if(op.invite_name){
this.invite_name = op.invite_name;
}
this.isLoading = true;
if(op.invite_code){
// invite_code
uni.setStorageSync('inviteCode',op.invite_code);
this.invite_code = op.invite_code;
}
if(op.invite_name){
this.invite_name = decodeURIComponent(op.invite_name);
}
this.isLoading = true;
},
onShow() {
this.$toolAll.tools.judgeAuth();
},
methods: {
//

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -350,7 +350,7 @@ page {background-color: #FFFFFF;}
/* 首页 */
.index-top{
width: 100%;
height: 420rpx;
height: 500rpx;
position: relative;
z-index: 0;
}

View File

@ -4587,25 +4587,17 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
*/
countCustomer: function countCustomer() {var phone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10086;
var res = uni.getSystemInfoSync();
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: phone * 1,
success: function success() {},
fail: function fail() {} });
uni.showActionSheet({
itemList: [phone],
itemColor: '#3875F6',
success: function success(res) {
if (res.tapIndex == 0) {
uni.makePhoneCall({
phoneNumber: phone });
} else {
uni.showActionSheet({
itemList: [phone, '立即呼叫'],
itemColor: '#3875F6',
success: function success(res) {
if (res.tapIndex == 1) {
uni.makePhoneCall({
phoneNumber: phone });
}
} });
}
} });
}
},
/**
* @description 图片选择

View File

@ -310,10 +310,10 @@ var _default = {
this.isplay = false;
},
onPageScroll: function onPageScroll(object) {
if (object.scrollTop >= this.statusHeight + 60 && object.scrollTop <= this.statusHeight + 120) {
if (object.scrollTop >= this.statusHeight + 160 && object.scrollTop <= this.statusHeight + 200) {
this.isShow = false;
}
if (object.scrollTop <= this.statusHeight + 50) {
if (object.scrollTop <= this.statusHeight + 150) {
this.isShow = true;
}
},

File diff suppressed because one or more lines are too long

View File

@ -270,6 +270,10 @@ __webpack_require__.r(__webpack_exports__);
@ -397,6 +401,10 @@ var _vuex = __webpack_require__(/*! vuex */ 13); //
//
//
//
//
//
//
//
//引入mapState
var _default = { data: function data() {return { orderDetail: {}, //订单详情
flag: true, isLoading: false, id: 0, //订单id
@ -414,9 +422,9 @@ var _default = { data: function data() {return { orderDetail: {}, //订单详情
submitEdit: function submitEdit() {var _this3 = this;var params = { order_coding: this.orderDetail.coding, //订单号
remarks: this.cancleReason[this.reasonIndex].value //取消原因
};this.$requst.post('/api/order/cancel', params).then(function (res) {if (res.code == 0) {_this3.$toolAll.tools.showToast('取消订单成功(*^▽^*)');uni.navigateTo({ url: '/pagesA/order/order' });} else {_this3.$toolAll.tools.showToast(res.msg);}});}, // 联系客服退款
refundEv: function refundEv() {this.$toolAll.tools.countCustomer('18683958573');}, // 确认收货
affirmEv: function affirmEv(id) {var _this4 = this;var params = { order_id: id //订单号
};this.$requst.post('/api/order/accepted', params).then(function (res) {if (res.code == 0) {_this4.$toolAll.tools.showToast('确认收货成功(*^▽^*)');uni.navigateTo({ url: '/pagesA/order/order' });} else {_this4.$toolAll.tools.showToast(res.msg);}});}, // 再次购买
refundEv: function refundEv() {var _this4 = this;this.$requst.get('/api/index/base-config').then(function (res) {if (res.code == 0) {console.log(res, '客服电话');_this4.$toolAll.tools.countCustomer(res.data.customer_service_tel);} else {_this4.$toolAll.tools.showToast(res.msg);}});}, // 确认收货
affirmEv: function affirmEv(id) {var _this5 = this;var params = { order_id: id //订单号
};this.$requst.post('/api/order/accepted', params).then(function (res) {if (res.code == 0) {_this5.$toolAll.tools.showToast('确认收货成功(*^▽^*)');uni.navigateTo({ url: '/pagesA/order/order' });} else {_this5.$toolAll.tools.showToast(res.msg);}});}, // 再次购买
buyAgain: function buyAgain(index) {var buyList = [];var newArr = this.orderDetail;newArr.skus.forEach(function (item) {var obj = { sku_coding: item.coding, num: item.num };buyList.push(obj);});uni.setStorageSync('buyList', buyList);uni.navigateTo({ url: '/pages/cart/settlement' });}, // 复制查询
copyEV: function copyEV() {this.$toolAll.tools.clickCopy(this.orderDetail.express_number);} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))

File diff suppressed because one or more lines are too long

View File

@ -410,23 +410,30 @@ var _default = { data: function data() {return { newTop: uni.getSystemInfoSync()
},
// 联系客服退款
refundEv: function refundEv() {
this.$toolAll.tools.countCustomer('18683958573');
refundEv: function refundEv() {var _this5 = this;
this.$requst.get('/api/index/base-config').then(function (res) {
if (res.code == 0) {
console.log(res, '客服电话');
_this5.$toolAll.tools.countCustomer(res.data.customer_service_tel);
} else {
_this5.$toolAll.tools.showToast(res.msg);
}
});
},
// 确认收货
affirmEv: function affirmEv(id) {var _this5 = this;
affirmEv: function affirmEv(id) {var _this6 = this;
var params = {
order_id: id //订单号
};
this.$requst.post('/api/order/accepted', params).then(function (res) {
if (res.code == 0) {
_this5.$toolAll.tools.showToast('确认收货成功(*^▽^*)');
_this5.orderList = [];
_this5.page = 1;
_this5.getOrderList();
_this6.$toolAll.tools.showToast('确认收货成功(*^▽^*)');
_this6.orderList = [];
_this6.page = 1;
_this6.getOrderList();
} else {
_this5.$toolAll.tools.showToast(res.msg);
_this6.$toolAll.tools.showToast(res.msg);
}
});
},
@ -449,14 +456,14 @@ var _default = { data: function data() {return { newTop: uni.getSystemInfoSync()
},
// 立即支付
payEv: function payEv(coding) {var _this6 = this;
payEv: function payEv(coding) {var _this7 = this;
this.$requst.post('/api/order/pay', { order_coding: coding }).then(function (res) {
if (res.code == 0) {
console.log(res, '立即支付');
// 调用微信支付
_this6.callPayMent(res.data.payment_params);
_this7.callPayMent(res.data.payment_params);
} else {
_this6.$toolAll.tools.showToast(res.msg);
_this7.$toolAll.tools.showToast(res.msg);
}
});
},
@ -484,24 +491,24 @@ var _default = { data: function data() {return { newTop: uni.getSystemInfoSync()
},
// 分类切换效果
setTabList: function setTabList() {var _this7 = this;
setTabList: function setTabList() {var _this8 = this;
this.$nextTick(function () {
if (_this7.orderNav.length > 0) {
if (_this8.orderNav.length > 0) {
//计算左滑距离
_this7.setLeft();
_this8.setLeft();
}
});
},
//计算左滑距离
setLeft: function setLeft() {var _this8 = this;
setLeft: function setLeft() {var _this9 = this;
var lineLeft = 0;
this.getElementData('#tab_list', function (data) {
var list = data[0];
_this8.getElementData('#tab_item', function (res) {
var el = res[_this8.activeIndex];
lineLeft = el.width / 2 + -list.left + el.left - list.width / 2 - _this8.scrollLeft;
_this8.tabsScrollLeft = _this8.scrollLeft + lineLeft;
_this9.getElementData('#tab_item', function (res) {
var el = res[_this9.activeIndex];
lineLeft = el.width / 2 + -list.left + el.left - list.width / 2 - _this9.scrollLeft;
_this9.tabsScrollLeft = _this9.scrollLeft + lineLeft;
});
});
},

File diff suppressed because one or more lines are too long

View File

@ -225,8 +225,8 @@ var _vuex = __webpack_require__(/*! vuex */ 13); //
//
//
//引入mapState
var _default = { data: function data() {return { disclaimersHeight: "calc(100vh - ".concat(uni.getSystemInfoSync().statusBarHeight + 50, "px)"), disclaimers: '', invite_code: '', invite_name: '', real_name: '', phone: '', deposit_bank: '', bank_account: '', flag: true, backTag: 'backindex', isLoading: false };}, onLoad: function onLoad(op) {if (this.$toolAll.tools.judgeAuth()) {if (op.invite_code) {// 缓存invite_code
uni.setStorageSync('inviteCode', op.invite_code);this.invite_code = op.invite_code;}if (op.invite_name) {this.invite_name = op.invite_name;}this.isLoading = true;}}, methods: { // 提交申请
var _default = { data: function data() {return { disclaimersHeight: "calc(100vh - ".concat(uni.getSystemInfoSync().statusBarHeight + 50, "px)"), disclaimers: '', invite_code: '', invite_name: '', real_name: '', phone: '', deposit_bank: '', bank_account: '', flag: true, backTag: 'backindex', isLoading: false };}, onLoad: function onLoad(op) {if (op.invite_code) {// 缓存invite_code
uni.setStorageSync('inviteCode', op.invite_code);this.invite_code = op.invite_code;}if (op.invite_name) {this.invite_name = decodeURIComponent(op.invite_name);}this.isLoading = true;}, onShow: function onShow() {this.$toolAll.tools.judgeAuth();}, methods: { // 提交申请
submitEv: function submitEv() {var _this = this;if (this.checkEmpty() && this.flag) {var params = { invite_code: this.invite_code, invite_name: this.invite_name, real_name: this.real_name,
phone: this.phone,
deposit_bank: this.deposit_bank,

View File

@ -17,7 +17,31 @@
"libVersion": "2.25.2",
"appid": "wxa02e44170bc722cd",
"projectname": "老农极鲜",
"condition": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": 0,
"list": [
{
"name": "",
"path": "",
"query": "",
"id": 0
}
]
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2

View File

@ -0,0 +1,16 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"name": "",
"pathName": "pagesB/distributor/distributor",
"query": "invite_name=蔡",
"launchMode": "default",
"scene": null
}
]
}
}
}