小钻风 4 years ago
parent 6da559612d
commit bc3a492476

@ -8,7 +8,6 @@ Vue.use(uView);
import store from './store'
Vue.prototype.$store = store
//全局注册自定义组件
import goodsList from 'components/goodsList.vue'
import orderGoods from 'components/orderGoods.vue'
@ -16,30 +15,21 @@ import largeImageList from 'components/largeImageList.vue'
Vue.component('goods-list', goodsList)
Vue.component('order-goods', orderGoods)
Vue.component('large-image-list', largeImageList)
// 测试域名
Vue.prototype.BASE_URL = "https://testapi.reecook.cn"
Vue.prototype.IMAGE_URL = "https://testcdn.reecook.cn/static"
// Vue.prototype.BASE_URL = "https://testapi.reecook.cn"
// Vue.prototype.IMAGE_URL = "https://testcdn.reecook.cn/static"
// 正式域名
// Vue.prototype.BASE_URL = "https://api.reecook.cn"
// Vue.prototype.IMAGE_URL = "https://cdn.reecook.cn/static"
Vue.prototype.BASE_URL = "https://api.reecook.cn"
Vue.prototype.IMAGE_URL = "https://cdn.reecook.cn/static"
//腾讯地图key
Vue.prototype.MAP_KEY = "SPVBZ-2EXWJ-WTEFC-K7ANJ-VG7G6-V7FQ6"
//小程序静态资源存储地址由于小程序代码包大小限制比较大的静态资源图片放在了宝塔上对应域名下的recook-weapp文件夹里面
Vue.prototype.STATIC_URL = Vue.prototype.IMAGE_URL + "/recook-weapp/"
//过滤器 保留两位小数
Vue.filter('toFixed', (param, num) => {
// console.log(param,typeof param,parseFloat(param))
return parseFloat(param).toFixed(num);
})
Vue.config.productionTip = false
App.mpType = 'app'

@ -454,7 +454,7 @@
</template>
<template v-else>
<view class="flex-sub" style="margin-right: 3rpx;" @tap="addcart"></view>
<view class="flex-sub buy-now" @tap="createOrder"></view>
<view class="flex-sub buy-now" @tap="$u.throttle(createOrder,1000)"></view>
</template>
</view>
</u-popup>
@ -708,7 +708,9 @@
}
},
//
//
createOrder() {
console.log(this.checkedSku)
if (!this.sku_id) {

@ -128,6 +128,7 @@
},
onLoad(options) {
console.log(options)
if (options.orderId) {
this.orderId = parseInt(options.orderId)
}
@ -213,7 +214,6 @@
userId: uni.getStorageSync("userInfo").id,
orderId: this.orderId,
}).then(res => {
console.log(res.data);
if (res.data.code == "FAIL") {
this.$u.toast(res.data.msg);
return
@ -224,6 +224,9 @@
success: () => {
setTimeout(function() {
uni.navigateBack()
uni.$emit("cancelOrderSuccess", {
msg: '订单已取消',
});
}, 1000)
}
})
@ -289,6 +292,9 @@
mask: true,
success: () => {
setTimeout(function() {
uni.$emit("cancelOrderSuccess", {
msg: '订单已删除',
});
uni.navigateBack()
}, 1000)
}

@ -27,8 +27,9 @@
</view>
<view class="" v-else>
<view class="orders-box" style="padding: 10rpx 0;">
<view v-for="(item2,index2) in item1.orders" :key="index2" style="padding: 10rpx 20rpx;">
<navigator :url="'../orderDetail/orderDetail?orderId='+item2.id" class="order-item bg-white clear">
<view v-for="(item2,index2) in item1.orders" :key="index2" style="padding: 10rpx 20rpx;" @click="OrdersDetails(item2.id,index2)">
<view class="order-item bg-white clear">
<view class="order-item-top flex justify-between align-center">
<view class="flex align-center">
<view class="text-center text-white buy" style=""></view>
@ -55,7 +56,7 @@
</view>
<view class="">{{item2.totalGoodsCount}}件商品 总计<text class="text-red">{{item2.goodsTotalAmount | toFixed(2)}}</text></view>
</view>
</navigator>
</view>
</view>
</view>
<u-loadmore :status="item1.loadStatus" margin-bottom="40" />
@ -89,6 +90,12 @@
this.orderTypeIndex = parseInt(options.type)
}
this.setNav()
//
uni.$off('cancelOrderSuccess');
uni.$on("cancelOrderSuccess", res => {
console.log(res)
this.setNav()
})
},
created () {
let that = this
@ -106,7 +113,12 @@
}
})
},
methods: {
methods: {
OrdersDetails(id,index){
uni.navigateTo({
url: "../orderDetail/orderDetail?orderId=" + id
})
},
//
closedTips (){
this.show = false

@ -0,0 +1,17 @@
function noMore() {
let that = this;
if (that.btn_show) {
that.btn_show = false;
setTimeout(function () {
that.btn_show = true;
console.log(that.btn_show)
}, 1000)
} else {
console.log("请勿频繁点击")
}
}
export default {
noMore
}
Loading…
Cancel
Save