From 40c21cef29868a16143781f478683982d12eb28b Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 13 Jan 2024 18:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/store.js | 9 + api/user.js | 5 + components/WaterfallsFlow/WaterfallsFlowp.vue | 195 ++ .../WaterfallsFlowItemp.vue | 347 +++ components/shortPopup.vue | 4 +- pages.json | 8 + pages/goods_details/index_v.vue | 12 +- pages/nongKe/specialty/index.vue | 7 +- pages/nongKe/specialty/short_index.vue | 2040 +++++++++++++++++ pages/order_details/stay.vue | 10 +- pages/order_pay_status/index.vue | 7 +- pages/select_address/select_address_n.nvue | 1 - pages/supply_chains/supply_chains.vue | 10 +- pages/user/index.vue | 2 +- pages/users/order_confirm/index.vue | 19 +- pages/users/order_list/index.vue | 12 +- pages/users/user_info/index.vue | 27 +- 17 files changed, 2672 insertions(+), 43 deletions(-) create mode 100644 components/WaterfallsFlow/WaterfallsFlowp.vue create mode 100644 components/WaterfallsFlowItem/WaterfallsFlowItemp.vue create mode 100644 pages/nongKe/specialty/short_index.vue diff --git a/api/store.js b/api/store.js index eee6dc6..3ef1f67 100644 --- a/api/store.js +++ b/api/store.js @@ -599,4 +599,13 @@ export function merchantLicenseIdentify(data) { return request.post(`merchant_license_identify`, data, { noAuth: true }); +} + +/* + 从供销平台获取村店铺负责人,联系电话 +*/ +export function getVillageInfo(data) { + return requestb.get(`shop_call/getVillageCompany`, data, { + noAuth: true + }); } \ No newline at end of file diff --git a/api/user.js b/api/user.js index 4594d26..5d2c556 100644 --- a/api/user.js +++ b/api/user.js @@ -730,3 +730,8 @@ export function getBillDetil() { export function merstreet(data) { return request1.get(`company/street_company`, data); } + +//填写邀请码 +export function bindPromotionCode(data) { + return request.post(`user/change/bind_promotion_code`, data) +} \ No newline at end of file diff --git a/components/WaterfallsFlow/WaterfallsFlowp.vue b/components/WaterfallsFlow/WaterfallsFlowp.vue new file mode 100644 index 0000000..5dae0de --- /dev/null +++ b/components/WaterfallsFlow/WaterfallsFlowp.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/components/WaterfallsFlowItem/WaterfallsFlowItemp.vue b/components/WaterfallsFlowItem/WaterfallsFlowItemp.vue new file mode 100644 index 0000000..6c34a99 --- /dev/null +++ b/components/WaterfallsFlowItem/WaterfallsFlowItemp.vue @@ -0,0 +1,347 @@ + + + + diff --git a/components/shortPopup.vue b/components/shortPopup.vue index b353eab..648ed55 100644 --- a/components/shortPopup.vue +++ b/components/shortPopup.vue @@ -58,10 +58,10 @@ - 采购车 + 购物车 {{goodsNum}} - 加入采购清单 + 加入购物车 diff --git a/pages.json b/pages.json index 0744972..92abdf0 100644 --- a/pages.json +++ b/pages.json @@ -417,6 +417,14 @@ "navigationStyle": "custom" } + },{ + "path": "specialty/short_index", + "style": { + "navigationBarTitleText": "集体店铺", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "specialty/indexa", "style": { diff --git a/pages/goods_details/index_v.vue b/pages/goods_details/index_v.vue index 379cc2f..c129ee9 100644 --- a/pages/goods_details/index_v.vue +++ b/pages/goods_details/index_v.vue @@ -227,10 +227,6 @@ - {{storeInfo.merchant.type_name}} - 自营 {{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注 @@ -240,8 +236,8 @@ - 进店 @@ -620,7 +616,8 @@ params: [] }, product_type: 0, - referer: '' + referer: '', + village_id: '' }; }, computed: { @@ -636,6 +633,7 @@ onLoad(options) { // console.log(options) this.referer = options.referer + this.village_id = options.village_id if (options.product_type) { this.product_type = options.product_type } diff --git a/pages/nongKe/specialty/index.vue b/pages/nongKe/specialty/index.vue index c085b25..d341882 100644 --- a/pages/nongKe/specialty/index.vue +++ b/pages/nongKe/specialty/index.vue @@ -39,7 +39,7 @@ - + @@ -83,11 +83,12 @@ configMap } from '@/utils'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; - import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' + import WaterfallsFlowp from '@/components/WaterfallsFlow/WaterfallsFlowp.vue' const app = getApp(); export default { components: { - easyLoadimage + easyLoadimage, + WaterfallsFlowp }, data() { return { diff --git a/pages/nongKe/specialty/short_index.vue b/pages/nongKe/specialty/short_index.vue new file mode 100644 index 0000000..90a9aa4 --- /dev/null +++ b/pages/nongKe/specialty/short_index.vue @@ -0,0 +1,2040 @@ + + + + + \ No newline at end of file diff --git a/pages/order_details/stay.vue b/pages/order_details/stay.vue index 663e932..924ce03 100644 --- a/pages/order_details/stay.vue +++ b/pages/order_details/stay.vue @@ -539,10 +539,10 @@ that.$set(that, 'orderInfo', res.data); this.pay_type = this.orderInfo.pay_type if (this.orderInfo.interest !== null) { - this.moerTime(this.orderInfo.interest.start_time) + this.moerTime(this.orderInfo.interest.start_time, this.orderInfo.cancel_unix) } else { this.isSelfOrder = true - this.moerTime(this.orderInfo.create_time) + this.moerTime(this.orderInfo.create_time, this.orderInfo.cancel_unix) // console.log(this.orderInfo.create_time) } @@ -593,16 +593,16 @@ }); }, //计算是否逾期 - moerTime(autoTime) { - + moerTime(autoTime, c_time) { if (this.isSelfOrder) { let limitPayTime = 60 //支付时间限制 let curData = new Date(autoTime); + // curData.setSeconds(curData.getSeconds() + (60 * limitPayTime)); curData.setSeconds(curData.getSeconds() + (60 * limitPayTime)); this.be_overdue = curData.getFullYear() + '-' + (curData.getMonth() + 1) + '-' + curData.getDate() + ' ' + curData.getHours() + ':' + - (curData.getMinutes() > 10 ? curData.getMinutes() : "0" + curData.getMinutes()) + (curData.getMinutes() > 9 ? curData.getMinutes() : "0" + curData.getMinutes()) return } diff --git a/pages/order_pay_status/index.vue b/pages/order_pay_status/index.vue index a18793a..b179c34 100644 --- a/pages/order_pay_status/index.vue +++ b/pages/order_pay_status/index.vue @@ -139,7 +139,7 @@ text: '展开更多', timer: null, product_type: '', - + source: null }; }, computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), @@ -152,6 +152,7 @@ }); this.orderId = options.order_id; this.order_type = options.order_type; + this.source = options.source || null; this.status = options.status || 0; this.msg = options.msg || ''; this.product_type = options.product_type @@ -221,7 +222,7 @@ */ goOrderDetails: function(val) { let that = this; - if (this.product_type == 98) { + if (this.product_type == 98 && this.source!=103) { if(val==1){ uni.navigateTo({ url: `/pages/users/order_list/indexCopy?status=2&product_type=${this.product_type}` @@ -232,7 +233,7 @@ }) } - } else if (this.product_type == 99) { + } else if (this.product_type == 99 && this.source!=103) { if(val==1){ uni.navigateTo({ url: `/pages/users/order_list/relase?status=2&product_type=${this.product_type}` diff --git a/pages/select_address/select_address_n.nvue b/pages/select_address/select_address_n.nvue index dfe66c8..978de97 100644 --- a/pages/select_address/select_address_n.nvue +++ b/pages/select_address/select_address_n.nvue @@ -117,7 +117,6 @@ this.locationInfo.formatted_addresses.recommend = '定位中' uni.getLocation({ type: 'wgs84', - timeout: '4', success: (res) => { res = wgsToGcj(res); let latitude, longitude; diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index bad8858..0197e3f 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -99,7 +99,7 @@ - @@ -1140,6 +1140,10 @@ import { data } from '../../uni_modules/uview-ui/libs/mixin/mixin'; .list-con-right { width: 356rpx; + height: 482rpx; + display: flex; + flex-direction: column; + justify-content: space-between; .con-right { width: 356rpx; diff --git a/pages/user/index.vue b/pages/user/index.vue index 91e3c40..970d9af 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -601,7 +601,7 @@ }, // 订单数字 orderNum() { - orderData().then(({ + orderData({source: 103}).then(({ data }) => { // console.log(data); diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 3dfe967..6eb0020 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -1229,7 +1229,7 @@ jsConfig = res.data.result.config, // 暂不跳转 goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message + - '&product_type=' + that.product_type, + '&product_type=' + that.product_type + '&source=' + that.source, goPagesOrder = '/pages/order_details/stay?order_id=' + orderId + '&credit_buy=1&product_type=' + that.product_type; @@ -1300,7 +1300,7 @@ success: (e) => { // 暂不跳转 let url = '/pages/order_pay_status/index?order_id=' + orderId + - '&msg=支付成功' + '&product_type=' + that.product_type; + '&msg=支付成功' + '&product_type=' + that.product_type + '&source=' + that.source; return that.$util.Tips({ title: '支付成功', @@ -1314,7 +1314,7 @@ console.log(e,'111111111') // 暂不跳转 let url = '/pages/order_pay_status/index?order_id=' + orderId + - '&msg=取消支付' + '&product_type=' + that.product_type; + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source; return that.$util.Tips({ title: '取消支付', }, { @@ -1326,7 +1326,7 @@ uni.hideLoading(); // 暂不跳转 // let url = '/pages/order_pay_status/index?order_id=' + orderId + - // '&msg=取消支付' + '&product_type=' + that.product_type; + // '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source; // return that.$util.Tips({ // title: '取消支付', // }, { @@ -1363,8 +1363,7 @@ fail: function(e) { // 暂不跳转 let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=取消支付' + '&product_type=' + that - .product_type + orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source; return that.$util.Tips({ title: '取消支付' }, { @@ -1388,7 +1387,7 @@ case 'h5': let host = window.location.protocol + "//" + window.location.host; let url = - `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}` + `${host}/pages/order_pay_status/index?order_id=${orderId}&msg=${res.message}&product_type=${that.product_type}&source${that.source}` let eUrl = encodeURIComponent(url) let jsurl = jsConfig.mweb_url || jsConfig.h5_url let locations = `${jsurl}&redirect_url=${eUrl}` @@ -1416,7 +1415,7 @@ // 暂不跳转 let pages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=支付失败' + '&product_type=' + that - .product_type + .product_type + '&source=' + that.source return that.$util.Tips({ title: '支付失败' }, { @@ -1429,7 +1428,7 @@ // // 暂不跳转 // let pages = '/pages/order_pay_status/index?order_id=' + // orderId + '&msg=取消支付' + '&product_type=' + that - // .product_type + // .product_type + '&source=' + that.source // return that.$util.Tips({ // title: '取消支付' @@ -1444,7 +1443,7 @@ default: // 暂不跳转 let pages = '/pages/order_pay_status/index?order_id=' + - orderId + '&msg=取消支付' + '&product_type=' + that.product_type + orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source return that.$util.Tips({ title: '取消支付' diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index fae4355..a404a4b 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -253,7 +253,7 @@ 申请开票 - 查看详情 + 查看详情 { that.$set(that, 'orderData', res.data); }) @@ -674,7 +675,8 @@ import { Toast } from '../../../libs/uniApi'; groupOrderList({ page: that.page, limit: that.limit, - product_type: 0 + product_type: 0, + source: 103 }).then(res => { that.isReady = true; let list = res.data.list || []; @@ -701,7 +703,8 @@ import { Toast } from '../../../libs/uniApi'; status: arr, page: that.page, limit: that.limit, - product_type: 0 + product_type: 0, + source: 103 }).then(res => { let list = res.data.list || []; let loadend = list.length < that.limit; @@ -730,6 +733,7 @@ import { Toast } from '../../../libs/uniApi'; status: 10, page: 1, limit: 1, + source: 103 }).then(res => { let list = res.data.list || []; that.presellOrderCount = res.data.count; diff --git a/pages/users/user_info/index.vue b/pages/users/user_info/index.vue index 8ff0b3f..8553b09 100644 --- a/pages/users/user_info/index.vue +++ b/pages/users/user_info/index.vue @@ -90,14 +90,14 @@ 填写邀请码 - + 填写邀请码 - - 确认 + + 确认 @@ -162,7 +162,8 @@ getLogout, userAcc, editAvatar, - updateInfo + updateInfo, + bindPromotionCode } from '@/api/user.js'; import { switchH5Login, getAppVersion } from '@/api/api.js'; import { mapGetters } from "vuex"; @@ -171,6 +172,7 @@ import authorize from '@/components/Authorize'; import Cache from '@/utils/cache'; import { HTTP_REQUEST_URL } from '@/config/app'; +import { Toast } from '../../../libs/uniApi'; export default { components: { authorize @@ -180,6 +182,7 @@ domain: HTTP_REQUEST_URL, userInfo: {}, loginType: 'h5', + promotion_code: '', //邀请码 userIndex: 0, switchUserInfo: [], isAuto: false, //没有授权的不会自动授权 @@ -368,6 +371,7 @@ } }, showPopup(){ + if(this.promotion_code) return Toast('已经填写过了'); this.$refs.popup.open(); }, //注销账号 @@ -383,6 +387,7 @@ let that = this; getUserInfo().then(res => { that.$set(that, 'userInfo', res.data); + this.promotion_code = this.userInfo.promotion_code; if (res.data.phone) { that.userAcc(); } @@ -393,6 +398,20 @@ */ getVerion(){ this.$store.dispatch('INIT_CONFIG', true); + }, + // 填写邀请码 + submitCode(){ + if(!this.promotion_code) return ; + bindPromotionCode({ + promotion_code: this.promotion_code + }).then(res=>{ + this.$refs.popup.close(); + this.$nextTick(()=>{ + Toast('修改成功'); + }) + }).catch(err=>{ + console.log(err); + }) } } }