Browse Source

修改小程序

master
xh-pan1 2 years ago
parent
commit
06c1a70a76
  1. 15
      App.vue
  2. 17
      component/share.vue
  3. 1
      components/AliHbPay/index.vue
  4. 3
      components/CashierList/index.vue
  5. 88
      components/DefaultHead/index.vue
  6. 4
      components/Empty/index.vue
  7. 24
      components/GlobalLoading/index.js
  8. 89
      components/GlobalLoading/index.vue
  9. 148
      components/ListBottomTips/index.vue
  10. 1
      components/Loading/index.vue
  11. 56
      components/Skeleton/index.vue
  12. 5
      components/activities/combinedSales.vue
  13. 5
      components/adWindow.vue
  14. 5
      components/basics/categoryList.vue
  15. 300
      components/basics/categoryShow.vue
  16. 99
      components/basics/components/ProductSkeleton.vue
  17. 1
      components/canvasShow/basics/banner.vue
  18. 4
      components/canvasShow/basics/group/app/index.vue
  19. 40
      components/canvasShow/basics/header/mixin.js
  20. 23
      components/canvasShow/basics/live/app/item.vue
  21. 47
      components/canvasShow/basics/live/mixin.js
  22. 8
      components/canvasShow/basics/newProduct/mixin.js
  23. 25
      components/canvasShow/basics/product/app/index.vue
  24. 22
      components/canvasShow/basics/product/mixin.js
  25. 1
      components/canvasShow/basics/shop.vue
  26. 4
      components/canvasShow/basics/spike/app/index.vue
  27. 93
      components/canvasShow/basics/spike/mixin.js
  28. 13
      components/canvasShow/basics/video.vue
  29. 4
      components/canvasShow/canvasShowPage.vue
  30. 5
      components/canvasShow/config/api.js
  31. 3
      components/canvasShow/config/mixin/funMixin.js
  32. 30
      components/canvasShow/config/mixin/sendReqMixin.js
  33. 3
      components/canvasShow/config/mixin/server.js
  34. 5
      components/diyLoading/index.vue
  35. 36
      components/wx/wxSendCoupon.vue
  36. 16
      config/api.js
  37. 1
      main.js
  38. 18
      manifest.json
  39. 6
      pages.json
  40. 2
      pages/tabbar/cart/index.vue
  41. 74
      pages/tabbar/index/component/Agreement.vue
  42. 171
      pages/tabbar/index/component/FixedHead.vue
  43. 153
      pages/tabbar/index/component/Skeleton.vue
  44. 293
      pages/tabbar/index/index.vue
  45. 2
      pages/tabbar/user/index.data.js
  46. 3
      pages/tabbar/user/index.vue
  47. 2
      pages_category_page1/activity.vue
  48. 1
      pages_category_page1/coupon/list.vue
  49. 1
      pages_category_page1/coupon/product.vue
  50. 2
      pages_category_page1/discount/platformDiscount.vue
  51. 9
      pages_category_page1/discount/spikeList.vue
  52. 4
      pages_category_page1/distributionModule/invite.vue
  53. 4
      pages_category_page1/distributionModule/promotion.vue
  54. 6
      pages_category_page1/distributionModule/recruit.vue
  55. 1
      pages_category_page1/distributionModule/salesIndex.vue
  56. 1
      pages_category_page1/distributionModule/shareProduct.vue
  57. 1
      pages_category_page1/distributionModule/totalClient.vue
  58. 157
      pages_category_page1/goodsModule/Skeleton/GoodListSkeleton.vue
  59. 4
      pages_category_page1/goodsModule/addEvaluate.vue
  60. 2
      pages_category_page1/goodsModule/canvasGoods.vue
  61. 9
      pages_category_page1/goodsModule/combination.vue
  62. 2
      pages_category_page1/goodsModule/evaSuccessful.vue
  63. 2
      pages_category_page1/goodsModule/evaluate.vue
  64. 3
      pages_category_page1/goodsModule/evaluateDetails.vue
  65. 1
      pages_category_page1/goodsModule/evaluateList.vue
  66. 1
      pages_category_page1/goodsModule/goodsDetails.vue
  67. 132
      pages_category_page1/goodsModule/goodsList.vue
  68. 11
      pages_category_page1/goodsModule/invitePoster.vue
  69. 2
      pages_category_page1/goodsModule/inviteSpell.vue
  70. 3
      pages_category_page1/goodsModule/putQuestions.vue
  71. 1
      pages_category_page1/goodsModule/qADetail.vue
  72. 1
      pages_category_page1/integral/exchangeDetail.vue
  73. 1
      pages_category_page1/integral/index.vue
  74. 3
      pages_category_page1/integral/sign.vue
  75. 2
      pages_category_page1/memberCenter/activityList.vue
  76. 3
      pages_category_page1/memberCenter/index.vue
  77. 1
      pages_category_page1/memberCenter/memberSign.vue
  78. 2
      pages_category_page1/orderModule/Intervene.vue
  79. 4
      pages_category_page1/orderModule/addLogistics.vue
  80. 12
      pages_category_page1/orderModule/afterSaleApplyRefund.vue
  81. 11
      pages_category_page1/orderModule/afterSaleApplyRetund.vue
  82. 42
      pages_category_page1/orderModule/index.vue
  83. 10
      pages_category_page1/orderModule/orderConfirm.vue
  84. 8
      pages_category_page1/orderModule/orderDetails.vue
  85. 2
      pages_category_page1/orderModule/platformJoin.vue
  86. 4
      pages_category_page1/search/index/index.vue
  87. 3
      pages_category_page1/store/index.vue
  88. 1
      pages_category_page2/channelCoupon/index.vue
  89. 4
      pages_category_page2/livePage/components/liveBox.vue
  90. 1
      pages_category_page2/livePage/index.vue
  91. 2
      pages_category_page2/orderModule/afterSale.vue
  92. 2
      pages_category_page2/orderModule/returnDetails.vue
  93. 3
      pages_category_page2/userModule/accountLogin.vue
  94. 7
      pages_category_page2/userModule/addAddress.vue
  95. 10
      pages_category_page2/userModule/addBankcard.vue
  96. 6
      pages_category_page2/userModule/address.vue
  97. 12
      pages_category_page2/userModule/bindPhone.vue
  98. 4
      pages_category_page2/userModule/collection.vue
  99. 1
      pages_category_page2/userModule/footprintList.vue
  100. 3
      pages_category_page2/userModule/login.vue

15
App.vue

@ -23,19 +23,6 @@ export default {
const self = this
uni.getSystemInfo({
success: function (res) {
console.log(res, '检查机型')
// model
// const iphoneModels = [
// 'iPhone X',
// 'iPhone XR',
// 'iPhone XS Max',
// 'iPhone 11',
// 'iPhone 11 Pro',
// 'iPhone 11 Pro Max',
// 'iPhone 12/13 (Pro)',
// 'iPhone 12/13 mini',
// 'iPhone 12/13 Pro Max'
// ]
if (res.safeArea.top > 20 && res.model.indexOf('iPhone') !== -1) {
self.globalData.isIphone = true
}
@ -99,7 +86,7 @@ uni-rich-text img {
height: 100%;
}
.default-img {
background: url(./static/images/default.png) no-repeat center;
background: url('https://ceres.zkthink.com/static/root/default.png') no-repeat center;
background-size: 100% 100%;
}

17
component/share.vue

@ -8,28 +8,28 @@
<view class="ul">
<!-- #ifdef APP-PLUS -->
<view class="li" @click="share('weixin')">
<image class="icon" src="../static/images/share/weixin2x.png"></image>
<image class="icon" src="https://ceres.zkthink.com/static/img/share/weixin2x.png"></image>
<label class="label">微信</label>
</view>
<view class="li" @click="share('weixinpyq')">
<image class="icon" src="../static/images/share/pyq.png"></image>
<image class="icon" src="https://ceres.zkthink.com/static/img/share/pyq.png"></image>
<label class="label">朋友圈</label>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="li">
<button open-type="share" @share='onShareAppMessage' :data-obj="wxShareData" class="share-button">
<image class="icon" src="../static/images/share/forward.png"></image>
<image class="icon" src="https://ceres.zkthink.com/static/img/share/forward.png"></image>
<label class="label">好友</label>
</button>
</view>
<view class="li" @click="share('weixinpyq')">
<image class="icon" src="../static/images/share/pyq.png"></image>
<image class="icon" src="https://ceres.zkthink.com/static/img/share/pyq.png"></image>
<label class="label">朋友圈</label>
</view>
<!-- #endif -->
<view class="li" @click="share('lianjie')">
<image class="icon" src="../static/images/share/lianjie.png"></image>
<image class="icon" src="https://ceres.zkthink.com/static/img/share/lianjie.png"></image>
<label class="label">链接</label>
</view>
</view>
@ -97,12 +97,10 @@ export default {
wxShareData: {
url: ''
}
// longUrl: ''
};
},
mounted() {
// this.longUrl = API.shareLink + '/#' + this.url
// console.log(this.longUrl, this.url
this.wxShareData = this.url
},
computed:{
@ -132,7 +130,7 @@ export default {
success: () => {
},
fail: (err) => {
console.log("err",err)
throw Error(err)
}
})
// #endif
@ -183,7 +181,6 @@ export default {
data;
if (view) {
data = view.data;
console.log('是否重写分享方法', data.isOverShare);
if (!data.isOverShare) {
data.isOverShare = true;
view.onShareAppMessage = function () {

1
components/AliHbPay/index.vue

@ -193,7 +193,6 @@ export default {
*/
handleChangePeriods(event) {
this.flowerObj.hbByStagesPeriods = event
console.log(event)
this.handleHbStagesAndPrice()
},

3
components/CashierList/index.vue

@ -158,6 +158,8 @@ export default {
this.paymentList[0].disabled = false
this.paymentList[1].disabled = true
this.paymentList[2].disabled = true
this.paymentList.splice(1, 1)
this.paymentList.splice(1, 1)
this.paymentMode = 1
// #endif
// #ifdef MP-ALIPAY
@ -210,7 +212,6 @@ export default {
flowerObj.hbByStagesList[index].rate = rate
})
}
console.log(flowerObj)
},
/**

88
components/DefaultHead/index.vue

@ -0,0 +1,88 @@
<!--
* @FileDescription: 适配自定义头部状态栏高度
* @Author: kahu
* @Date: 2023/3/7
* @LastEditors: kahu
* @LastEditTime: 2023/3/7
-->
<template>
<view class="default_head_content">
<!-- 小程序不支持style写computed形式 -->
<view
v-if="needSetStatusBarHeight"
class="status_bar_fit"
:style="{
'height':`${statusBarHeight}px`,
'background-color':`${backgroundColor}`
}"
></view>
</view>
</template>
<script>
export default {
name: "DefaultHead",
props: {
needSetStatusBarHeight: {
type: Boolean,
default: () => true
},
backgroundColor: {
type: String,
default: () => '#fff'
}
},
data() {
return {
//
systemInfo: {},
//
menuButtonInfo: {
width: 0,
height: 0,
top: 0,
left: 0,
bottom: 0,
right: 0
},
//
statusBarHeight: 0
}
},
emits:['getInfoData'],
mounted() {
this.handleGetSystemInfo()
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
this.handleGetMenuButtonInfo()
// #endif
this.$emit('getInfoData',{
systemInfo:this.systemInfo,
menuButtonInfo:this.menuButtonInfo
})
},
methods: {
handleGetSystemInfo() {
this.systemInfo = uni.getSystemInfoSync();
this.statusBarHeight = this.systemInfo.statusBarHeight
},
handleGetMenuButtonInfo() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect();
}
}
}
</script>
<style
lang="scss"
scoped
>
.default_head_content {
width: 100%;
background: #fff;
.status_bar_fit {
width: 100%;
}
}
</style>

4
components/Empty/index.vue

@ -7,8 +7,8 @@
-->
<template>
<view v-if="show" class="empty-content" :style="{
paddingTop: this.paddingTop+'rpx',
background: this.background
paddingTop: paddingTop+'rpx',
background: background
}">
<image :src="iconUrl" />
<p class="tips">

24
components/GlobalLoading/index.js

@ -1,24 +0,0 @@
import Vue from 'vue'
import store from "../../store";
import GlobalLoading from "./index.vue";
export function showLoading(info=''){
store.commit("SET_SHOW_LOADING",{flag:true,info})
}
export function hideLoading(){
store.commit("SET_SHOW_LOADING",{flag:false,info:''})
}
export function showLoadingAuto(info='',time = 2000){
store.commit("SET_SHOW_LOADING",{flag:true,info})
setTimeout(()=>{
store.commit("SET_SHOW_LOADING",{flag:false,info:''})
},time)
}
Vue.prototype.$showLoading = showLoading
Vue.prototype.$hideLoading = hideLoading
Vue.prototype.$showLoadingAuto = showLoadingAuto
// Vue.component("globalLoading",GlobalLoading)
// export default GlobalLoading

89
components/GlobalLoading/index.vue

@ -1,89 +0,0 @@
<template>
<view class="loading-content" v-if="loadingFlag" @touchmove.stop.prevent="moveHandle"
@click.stop.prevent="moveHandle">
<!-- 遮罩 -->
<view catchtouchmove="true" class="full-mask" v-if="false"/>
<!-- loading -->
<view class="loading-gif">
<view class="flex mask">
<image src="@/static/images/loading/loading.gif"></image>
<!-- <p> {{ loadingInfo }} </p>-->
</view>
</view>
</view>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
name: "GlobalLoading",
methods: {
moveHandle() {
return;
}
},
mounted() {
console.log("+++++++++++++++++++__++++++++++++++++++++")
console.log(this.loadingFlag, this.loadingInfo)
},
computed: {
...mapGetters(["loadingFlag", "loadingInfo"])
}
}
</script>
<style lang="scss" scoped>
.loading-content {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 9999;
//pointer-events: none;
.mask {
//background-color: rgba(75, 53, 53, 0.52);
}
.full-mask {
position: absolute;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.52);
z-index: 9998;
pointer-events: none;
}
.loading-gif {
z-index: 9999;
position: relative;
width: 100%;
height: 100%;
.flex {
width: 200rpx;
height: 200rpx;
position: absolute;
border-radius: 15rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
image {
width: 150rpx;
height: 150rpx;
}
p {
color: #fff;
}
}
}
}
</style>

148
components/ListBottomTips/index.vue

@ -0,0 +1,148 @@
<!--
* @FileDescription: 底部
* @Author: kahu
* @Date: 2023/3/7
* @LastEditors: kahu
* @LastEditTime: 2023/3/7
-->
<template>
<view class="bottom_tips_content">
<view :class="['line_inner_row',loading?'is_loading':'']">
<view class="text_box">
<view
:class="['text_item', loading?'text_loading':'',`delay-${index % 10}`]"
v-for="(item,index) in type===0?onBottomText:loadingText"
:key="index"
>
{{ item }}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "ListBottomTips",
data() {
return {}
},
props: {
loadingText: {
type: String,
default: "加载中..."
},
onBottomText:{
type:String,
default:'已经到达底部了~'
},
type:{
type:Number,
default:0 // 01
},
loading:{
type:Boolean,
default:true
}
},
methods: {}
}
</script>
<style
lang="scss"
scoped
>
.bottom_tips_content {
padding: 20rpx 30rpx;
box-sizing: border-box;
.line_inner_row {
width: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
font-weight: bold;
.text_box {
display: flex;
.text_item {
animation-delay: calc(.1s * var(--jumpTime))
}
.delay-0{
animation-delay: calc(0s )
}
.delay-1{
animation-delay: calc(.1s )
}
.delay-2{
animation-delay: calc(.2s )
}
.delay-3{
animation-delay: calc(.3s )
}
.delay-4{
animation-delay: calc(.4s )
}
.delay-5{
animation-delay: calc(.5s )
}
.delay-6{
animation-delay: calc(.6s )
}
.delay-7{
animation-delay: calc(.7s )
}
.delay-8{
animation-delay: calc(.8s )
}
.delay-9{
animation-delay: calc(.9s )
}
}
&:before, &:after {
flex-shrink: 0;
flex-grow: 0;
content: '';
width: 20%;
height: 5rpx;
border-radius: 8rpx;
background-color: #898989;
}
}
.is_loading {
animation: breathe 1s ease-in-out 0s infinite alternate;
}
.text_loading{
animation: jump 2s ease-in-out infinite;
}
}
@keyframes breathe {
from {
opacity: 1;
}
to {
opacity: .5;
}
}
@keyframes jump {
30% {
transform: translateY(-12rpx)
}
60% {
transform: translateY(12rpx)
}
0%,100% {
transform: translateY(0rpx)
}
}
</style>

1
components/Loading/index.vue

@ -29,7 +29,6 @@ export default {
},
mounted() {
console.log(getCurrentPages())
//#ifdef H5
//#endif
},

56
components/Skeleton/index.vue

@ -1,24 +1,37 @@
<template>
<view v-if="loading" :style="{
<view
v-if="loading"
:style="{
width: windowWinth + 'px',
height: windowHeight + 'px',
backgroundColor: bgColor,
position: 'absolute',
left: left + 'px',
top: top + 'px',
top: isFixedOnFather?'0px':top + 'px',
zIndex: 100,
overflow: 'hidden'
}"
@touchmove.stop.prevent>
<view v-for="(item, index) in RectNodes" :key="$u.guid()" :class="[animation ? 'skeleton-fade' : '']" :style="{
@touchmove.stop.prevent
>
<view
v-for="(item, index) in RectNodes"
:key="$u.guid()"
:class="[animation ? 'skeleton-fade' : '']"
:style="{
width: item.width + 'px',
height: item.height + 'px',
backgroundColor: elColor,
position: 'absolute',
left: (item.left - left) + 'px',
top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
}"></view>
<view v-for="(item, index) in circleNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{
}"
></view>
<view
v-for="(item, index) in circleNodes"
:key="$u.guid()"
:class="animation ? 'skeleton-fade' : ''"
:style="{
width: item.width + 'px',
height: item.height + 'px',
backgroundColor: elColor,
@ -26,8 +39,13 @@
position: 'absolute',
left: (item.left - left) + 'px',
top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
}"></view>
<view v-for="(item, index) in filletNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{
}"
></view>
<view
v-for="(item, index) in filletNodes"
:key="$u.guid()"
:class="animation ? 'skeleton-fade' : ''"
:style="{
width: item.width + 'px',
height: item.height + 'px',
backgroundColor: elColor,
@ -35,7 +53,8 @@
position: 'absolute',
left: (item.left - left) + 'px',
top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
}">
}"
>
</view>
</view>
</template>
@ -50,6 +69,7 @@
* @property {Boolean} animation 骨架块是否显示动画效果默认false
* @property {String Number} border-radius u-skeleton-fillet类名元素对应的骨架块的圆角大小单位rpx默认10
* @property {Boolean} loading 是否显示骨架组件请求完成后将此值设置为false默认true
* @property {Boolean} isFixedOnFather 是否吸住父组件顶部应用于子组件情况父组件需要有定位
* @example <u-skeleton :loading="true" :animation="true"></u-skeleton>
*/
export default {
@ -68,7 +88,7 @@ export default {
//
animation: {
type: Boolean,
default: false
default: true
},
// u-skeleton-fillet
borderRadius: {
@ -79,6 +99,15 @@ export default {
loading: {
type: Boolean,
default: true
},
//
isFixedOnFather: {
type: Boolean,
default: true
},
marginTop: {
type: Number,
default: 0
}
},
data() {
@ -108,7 +137,7 @@ export default {
this.windowHeight = res[0][0].height;
this.windowWinth = res[0][0].width;
res[0][0].bottom = res[0][0].height
this.top = res[0][0].bottom - res[0][0].height;
this.top = this.marginTop + res[0][0].top;
this.left = res[0][0].left;
});
//
@ -172,7 +201,10 @@ export default {
}
</script>
<style lang="scss" scoped>
<style
lang="scss"
scoped
>
.skeleton-fade {
width: 100%;

5
components/activities/combinedSales.vue

@ -170,7 +170,6 @@ export default {
"GET").then(res => {
uni.hideLoading()
this.skuProData = res.data
// console.log(this.skuProData,'this.skuProData', res.data)
//productData.names
const mapKeys = Object.keys(this.skuProData.map)
if (mapKeys.length === 1 && mapKeys[0] === '单款项') {
@ -219,7 +218,6 @@ export default {
//
if(flag){
for (var key in mapinfo) {
console.log(key,'key')
this.selectedSku = mapinfo[key]
break
}
@ -228,7 +226,6 @@ export default {
},
nameCodeValueCodeClick(nameCode, valueCode, reSelectSku) {
this.selectedAttr[nameCode] = valueCode
console.log(this.selectedAttr, 'this.selectedAttr')
if (reSelectSku) {
let attrList = []
for (var key in this.selectedAttr) {
@ -246,7 +243,6 @@ export default {
},
//
submitBtn() {
console.log(this.selectedSku,'this.selectedSku')
const curPro = this.selectComposeData[this.tabIndex].composeProductInfoList[this.curProIndex]
for(let i=0;i<curPro.composeSkuInfoList.length;i++){
if(curPro.composeSkuInfoList[i].skuId === this.selectedSku.skuId){
@ -275,7 +271,6 @@ export default {
this.composePrice = parseFloat(total * promote / 10).toFixed(2)
break
}
console.log(total, this.composePrice, 'total')
},
//
getPrice(item){

5
components/adWindow.vue

@ -112,17 +112,15 @@ export default {
},
// 广
getAd() {
console.log(this.triggerCondition,'triggerCondition000000')
const res = uni.getStorageSync('storage_key'),
token = res.token;
setTimeout(() => {
this.buyerUserId = res.buyerUserId
this.isLogin = !!token
console.log(this.buyerUserId,this.isLogin,this.triggerCondition)
NET.request(API.GetAd, {
triggerCondition: this.triggerCondition
}, 'POST').then(res => {
console.log('123131321323', res)
if (res.data) {
this.adInfo = res.data[0]
if (this.adInfo.jumpContent) {
@ -184,7 +182,6 @@ export default {
},
goRoll() {
this.visible = false
console.log(this.jumpContent, 'this.jumpContent')
switch (this.adInfo.jumpType) {
case 1:
uni.navigateTo({

5
components/basics/categoryList.vue

@ -49,7 +49,7 @@ export default {
<style lang="scss" scoped>
.tabs-nav-warp{
margin-top: 20rpx;
//margin-top: 20rpx;
padding:0 30rpx;
.tabs-nav{
.ul{
@ -60,7 +60,8 @@ export default {
font-size: 30rpx;
color: #999999;
position: relative;
padding-bottom: 18rpx;
padding: 18rpx 0;
box-sizing: border-box;
&:first-child{
margin-left: 0;
}

300
components/basics/categoryShow.vue

@ -1,131 +1,180 @@
<template>
<view class="goodRecommend">
<!-- 骨架屏 -->
<view class="product-list">
<view class="product-list-box" >
<view class="product-list-item-warp" v-for="(item,index) in productList" :key="index">
<view class="product-list-item" v-if="JSON.stringify(item)!=='{}'">
<view class="product-list-img" @click="jumpProductDetail(item)">
<img v-show="item.image" class="img" :src="item.image">
</view>
<view class="product-list-info u-skeleton-fillet">
<view class="product-name">{{item.productName}}</view>
<view class="flex">
<view class="shop-box" @click.stop="jumpStore(item)">
<view class="shop-name" @click="jumpProductDetail(item)">{{item.shopName}}</view>
<view class="shop-logo">
<img :src="item.shopLogo">
<ProductSkeleton :loading="loading" :isFirst="isFirst" />
<template v-if="!isFirst">
<view class="product-list">
<view class="product-list-box">
<view
class="product-list-item-warp"
v-for="(item,index) in productList"
:key="index"
>
<view
class="product-list-item"
>
<view
class="product-list-img"
@click="handleJumpProductDetail(item)"
>
<img
v-show="item.image"
class="img"
:src="item.image"
>
</view>
<view class="product-list-info u-skeleton-fillet">
<view class="product-name">{{ item.productName }}</view>
<view class="flex">
<view
class="shop-box"
@click.stop="handleJumpStore(item)"
>
<view
class="shop-name"
@click="handleJumpProductDetail(item)"
>{{ item.shopName }}
</view>
<view class="shop-logo">
<img :src="item.shopLogo">
</view>
</view>
<view class="buy-count">{{ item.users ? item.users : 0 }}人付款</view>
</view>
<view class="buy-count">{{item.users?item.users: 0}}人付款</view>
</view>
<div class="price-warp">
<!-- #ifdef MP-WEIXIN -->
<img class="iconImg" v-if="item.activityType == 1" src="../canvasShow/static/images/groupBuyIcon.png">
<img class="iconImg" v-if="item.activityType == 2" src="../canvasShow/static/images/spikeIcon.png">
<img class="iconImg" v-if="item.activityType == 4" src="../canvasShow/static/images/spikeIcon.png">
<img class="iconImg" v-if="item.activityType == 3" src="../canvasShow/static/images/discountListIcon.png">
<img class="iconImg" v-if="item.activityType == 5" src="../canvasShow/static/images/discountListIcon.png">
<img class="iconImg" v-if="item.activityType == 8" src="../canvasShow/static/images/memberCenterIcon.png">
<!-- #endif -->
<!-- #ifdef H5 || APP-PLUS -->
<image class="iconImg" v-if="item.activityType == 1" src="../canvasShow/static/images/groupBuyIcon.png"></image>
<image class="iconImg" v-if="item.activityType == 2" src="../canvasShow/static/images/spikeIcon.png"></image>
<image class="iconImg" v-if="item.activityType == 4" src="../canvasShow/static/images/spikeIcon.png"></image>
<image class="iconImg" v-if="item.activityType == 3" src="../canvasShow/static/images/discountListIcon.png"></image>
<image class="iconImg" v-if="item.activityType == 5" src="../canvasShow/static/images/discountListIcon.png"></image>
<image class="iconImg" v-if="item.activityType == 8" src="../canvasShow/static/images/memberCenterIcon.png"></image>
<!-- #endif -->
<div class="price">
¥ {{item.price}}
<div class="price-warp">
<image
class="iconImg"
:src="getPriceActivity(item.activityType)"
/>
<div class="price">
¥ {{ item.price }}
</div>
<div class="original-price">
¥ {{ item.originalPrice }}
</div>
</div>
<div class="original-price">
¥ {{item.originalPrice}}
</div>
</div>
</view>
</view>
<view class="product-list-item ske-loading" v-else>
<view class="product-list-img child-loading">
<img v-show="item.image" class="img" :src="item.image">
</view>
<view class="product-list-info">
<view class="product-name child-loading" style="border-radius: 5rpx; margin-top: 10rpx;width: 100%;padding: 20rpx 0"></view>
<view class="product-name child-loading" style="border-radius: 5rpx; margin-top: 10rpx;width: 100%;padding: 20rpx 0"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-if="ifShow" class="emptyCart-box flex-items-plus flex-column">
<image class="emptyCart-img" src="https://ceres.zkthink.com/static/img/bgnull.png" mode="widthFix" />
<label class="font-color-999 fs26 mar-top-30">这里空空如也~</label>
</view>
</view >
<!-- 空状态 -->
<Empty
background="#fff"
:show="!loading && productList.length<0"
src="https://ceres.zkthink.com/static/img/bgnull.png"
>
这里空空如也
</Empty>
<!-- 底部提示 -->
<ListBottomTips
v-show="loading || total!==0&&total===productList.length"
:loading="loading"
:type="productList.length<total?1:0"
/>
</template>
</view>
</template>
<script>
import Empty from "@/components/Empty";
import ProductSkeleton from "./components/ProductSkeleton";
import ListBottomTips from "@/components/ListBottomTips";
const NET = require('@/utils/request')
const API = require('@/config/api')
export default {
name: "categoryShow",
name: "categoryShow",
components: {
Empty,
ListBottomTips,
ProductSkeleton
},
props: {
categoryid: {
classifyId: {
type: Number,
default: 0
}
},
data () {
computed: {
//
getPriceActivity() {
return (activityType) => {
switch (activityType) {
case 1:
return require('../canvasShow/static/images/groupBuyIcon.png')
case 2:
return require('../canvasShow/static/images/spikeIcon.png')
case 3:
return require('../canvasShow/static/images/discountListIcon.png')
case 4:
return require('../canvasShow/static/images/spikeIcon.png')
case 5:
return require('../canvasShow/static/images/discountListIcon.png')
case 8:
return require('../canvasShow/static/images/memberCenterIcon.png')
}
}
}
},
data() {
return {
activeTab: 0,
page:1,
pageSize:10,
page: 1,
pageSize: 10,
total: 0,
productList: [],
ifShow: false
isFirst:true,
loading: true //
}
},
mounted () {
this.productList = [{},{},{},{},{},{},{},{}]
this.getData();
mounted() {
this.handleResetList()
this.handleResetPage()
this.handleGetProductData();
},
methods:{
getData(){
console.log('加载了getData')
// uni.showLoading({
// mask: true,
// title:'...'
// })
if (this.total!=0&&this.productList.length>=this.total){
console.log("加载完了")
methods: {
//
handleResetList() {
uni.pageScrollTo({
scrollTop: 0,
duration: 0
});
this.isFirst = true
this.productList = []
},
handleResetPage() {
this.total = 0
this.page = 1
},
//
handleGetProductData() {
if (this.total !== 0 && this.productList.length >= this.total) {
return
}
NET.request(API.getProducts, {
classifyId: this.categoryid,
page:this.page,
pageSize:this.pageSize
this.loading = true
NET.request(API.getProductsV2, {
classifyId: this.classifyId,
page: this.page,
pageSize: this.pageSize
}, 'GET').then(res => {
this.productList = [...this.productList,...res.data.list]
this.productList = this.productList.filter(item=>JSON.stringify(item)!=='{}')
this.productList = [...this.productList, ...res.data.list]
this.total = res.data.total
uni.hideLoading()
if (this.productList.length ===0) {
this.ifShow = true
}
}).catch(res => {
uni.hideLoading()
}).catch(err => {
throw Error(err)
}).finally(() => {
this.loading = false
this.isFirst = false
})
},
//
jumpStore(item){
handleJumpStore(item) {
uni.navigateTo({
url: `/pages_category_page1/store/index?storeId=${item.shopId}`
url: `/pages_category_page1/store/index?storeId=${ item.shopId }`
})
},
//
jumpProductDetail(item){
handleJumpProductDetail(item) {
uni.navigateTo({
url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + item.shopId + '&productId=' + item.productId + '&skuId=' + item
.skuId
@ -133,10 +182,11 @@ name: "categoryShow",
}
},
watch: {
'categoryid': {
handler(newVal, oldVal) {
this.ifShow = false
this.getData()
'classifyId': {
handler() {
this.handleResetList()
this.handleResetPage()
this.handleGetProductData()
},
deep: true
}
@ -144,9 +194,13 @@ name: "categoryShow",
}
</script>
<style lang="scss" scoped>
<style
lang="scss"
scoped
>
.goodRecommend {
padding-top: 20rpx;
.product-list {
position: relative;
padding: 0 13upx;
@ -156,16 +210,20 @@ name: "categoryShow",
display: flex;
flex-wrap: wrap;
flex-direction: row;
&.swiper{
&.swiper {
height: 620upx;
}
}
&.product-swiper .product-list-box{
&.product-swiper .product-list-box {
padding-left: 0;
}
&-item-warp{
&-item-warp {
margin: 0 0 20upx 0;
}
&-item {
width: 348upx;
padding: 0 7upx;
@ -178,35 +236,41 @@ name: "categoryShow",
height: 348upx;
background-color: #d0d0d0;
border-radius: 10upx 10upx 0 0;
.img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
&-info {
background-color: #FFFFFF;
//box-shadow: 0px 0px 15px 0px rgba(52, 52, 52, 0.15);
border-radius: 0 0 10upx 10upx;
padding: 20upx;
label{
label {
font-weight: normal;
}
.product-name{
.product-name {
font-size: 28upx;
color: #333;
display: block;
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 18upx;
line-height: 40upx;
}
.flex{
.flex {
display: flex;
align-items: center;
}
.shop-box{
.shop-box {
background-color: #333333;
border-radius: 0upx 20upx 20upx 0upx;
line-height: 40upx;
@ -215,7 +279,8 @@ name: "categoryShow",
height: 40upx;
margin-right: 10upx;
float: left;
.shop-name{
.shop-name {
font-size: 20upx;
color: #FFEBC4;
padding: 0 8upx 0 12upx;
@ -224,43 +289,50 @@ name: "categoryShow",
float: left;
max-width: 170rpx;
white-space: nowrap;
overflow:hidden;
text-overflow:ellipsis;
overflow: hidden;
text-overflow: ellipsis;
}
.shop-logo{
.shop-logo {
border: 2upx solid #707070;
border-radius: 50%;
overflow: hidden;
float: right;
img{
img {
width: 34upx;
height: 34upx;
display: block;
}
}
}
.buy-count{
.buy-count {
color: #C5AA7B;
font-size: 20upx;
border: 2upx solid #E4E5E6;
line-height: 36upx;
padding: 0 5upx;
}
.price-warp{
.price-warp {
display: flex;
align-items: baseline;
line-height: 56upx;
.iconImg {
width: 58rpx;
height: 36rpx;
margin-right: 10rpx;
}
.price{
.price {
color: #C83732;
font-size: 40upx;
margin-right: 20upx;
}
.original-price{
.original-price {
font-size: 24upx;
color: #ccc;
text-decoration: line-through;
@ -268,8 +340,10 @@ name: "categoryShow",
}
}
}
.emptyCart-box {
margin-top: 70rpx;
.emptyCart-img {
width: 216rpx;
height: 156rpx;

99
components/basics/components/ProductSkeleton.vue

@ -0,0 +1,99 @@
<!--
* @FileDescription: ProductSkeleton
* @Author: kahu
* @Date: 2023/3/8
* @LastEditors: kahu
* @LastEditTime: 2023/3/8
-->
<template>
<view v-if="isFirst">
<Skeleton
:loading="isFirst && loading"
:animation="true"
bgColor="#FFF"
/>
<view class="skeleton_content u-skeleton">
<view class="empty_row"></view>
<view class="product_box">
<view
class="product_item "
v-for="item in 40"
>
<view class="image u-skeleton-fillet"></view>
<view class="text_box ">
<view
class="text u-skeleton-fillet"
v-for="item in 2"
></view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Skeleton from "@/components/Skeleton";
export default {
name: "ProductSkeleton",
data() {
return {}
},
methods: {},
components:{Skeleton},
props: {
isFirst: {
type: Boolean,
default: () => true
},
loading: {
type: Boolean,
default: () => true
}
}
}
</script>
<style
lang="scss"
scoped
>
.skeleton_content {
width: 100%;
height: calc(100vh - 50px);
padding: 30rpx 30rpx;
box-sizing: border-box;
.product_box {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.product_item {
margin: 10rpx 0;
width: 49%;
height: 500rpx;
//padding: 30rpx 30rpx;
//box-sizing: border-box;
.image {
width: 100%;
height: 70%;
}
.text_box {
padding: 0 20rpx;
.text {
margin-top: 15rpx;
width: 100%;
height: 60rpx;
}
}
}
}
}
</style>

1
components/canvasShow/basics/banner.vue

@ -38,7 +38,6 @@
},
computed: {
bannerList: function () {
console.log(this.componentContent)
return this.componentContent.bannerData.filter(function (item) {
return item.bannerUrl
})

4
components/canvasShow/basics/group/app/index.vue

@ -32,8 +32,8 @@
</div>
</swiper-item>
<!-- #ifdef MP-WEIXIN -->
<swiper-item v-if="productData.products.length" class="swiper-slide pro-item-warp" v-for="item in (3 - productData.products.length)">
</swiper-item>
<!-- <swiper-item v-if="productData.products.length" class="swiper-slide pro-item-warp" v-for="item in (3 - productData.products.length)">
</swiper-item> -->
<!-- #endif -->
</swiper>
<view class="swiper-dots" v-if="productData.products && productData.products.length > 3">

40
components/canvasShow/basics/header/mixin.js

@ -1,5 +1,5 @@
import api from '../../config/api'
import {funMixin} from '../../config/mixin'
import { funMixin } from '../../config/mixin'
export const commonMixin = {
name: 'headerComponent',
@ -7,39 +7,41 @@ export const commonMixin = {
props: {
terminal: {
type: Number,
default: 4
default: 4,
},
typeId: {
type: Number,
default: 1
default: 1,
},
shopId: {
type: Number,
default: 0
default: 0,
},
componentContent: {
type: Object
}
type: Object,
},
},
data () {
data() {
return {
classifyData: []
classifyData: [],
}
},
mounted() {
this.getData()
this.getData()
},
methods: {
getData() {
const _ = this
_.sendReq({
url: `${api.getClassify}?page=1&pageSize=20`,
method: 'GET'
}, (res) => {
_.classifyData = res.data
console.log(_.classifyData)
},(err)=>{
})
}
}
_.sendReq(
{
url: `${api.getClassify}?page=1&pageSize=20`,
method: 'GET',
},
(res) => {
_.classifyData = res.data
},
(err) => {}
)
},
},
}

23
components/canvasShow/basics/live/app/item.vue

@ -1,3 +1,11 @@
<!--
* @Descripttion:
* @version: 1.0.0
* @Author: kahu
* @Date: 2022-10-12 11:48:03
* @LastEditors: kahu
* @LastEditTime: 2023-03-08 14:41:56
-->
<template>
<view class="live-box">
<view class="live-ongoing" v-if="liveData.liveStatus === 101" @click="toLive">
@ -147,7 +155,6 @@ export default {
_this.liveStatus = res.liveStatus
})
.catch(err => {
console.log('get live status', err)
})
this.timer = setInterval(() => {
livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
@ -155,10 +162,9 @@ export default {
// 101: , 102: , 103: , 104: , 105: , 106: 107
_this.liveStatus = res.liveStatus
this.countTime()
console.log('get live status', res.liveStatus)
})
.catch(err => {
console.log('get live status', err)
throw new Error(err)
})
}, 60000)
// #endif
@ -197,16 +203,14 @@ export default {
}
},
toLive() {
console.log(liveAppid,'liveAppid')
console.log(this.liveData.roomId,'this.liveData.roomId')
if (!liveAppid || !this.liveData) { return }
//
// let customParams = encodeURIComponent(JSON.stringify({ path: 'livePage/index', pid: 1 }))
// #ifdef MP-WEIXIN
wx.navigateTo({
url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}`
// url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}&custom_params=${customParams}`
})
// wx.navigateTo({
// url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}`
// // url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}&custom_params=${customParams}`
// })
// #endif
},
onSubscribe() {
@ -229,7 +233,6 @@ export default {
}
})
.catch(err => {
console.log(err)
uni.showToast({
title: res.message || '订阅失败,请稍后再试!',
icon: "none"

47
components/canvasShow/basics/live/mixin.js

@ -1,6 +1,6 @@
const NET = require('@/utils/request')
const API = require('@/config/api')
import {funMixin} from '../../config/mixin'
import { funMixin } from '../../config/mixin'
export const commonMixin = {
mixins: [funMixin],
@ -10,51 +10,54 @@ export const commonMixin = {
roomId: [], // 填写具体的房间号
roomList: [],
page: {
page: 1,
pageSize: 6,
},
page: 1,
pageSize: 6,
},
}
},
props: {
terminal: {
type: Number,
default: 4
default: 4,
},
typeId: {
type: Number,
default: 1
default: 1,
},
shopId: {
type: Number,
default: 0
default: 0,
},
componentContent: {
type: Object
}
type: Object,
},
},
created() {
this.getLiveRooms()
},
methods: {
// 获取直播间列表
getLiveRooms () {
NET.request(API.LiveRoomes, this.page, 'get').then(res => {
console.log(res)
this.roomList = res.data.list
})
getLiveRooms() {
NET.request(API.LiveRoomes, this.page, 'get').then((res) => {
this.roomList = res.data.list
})
},
toLiveRoom (item) {
toLiveRoom(item) {
this.roomId.push(item.roomid)
if (!this.appid || !this.roomId.length) { return }
if (!this.appid || !this.roomId.length) {
return
}
// 路由参数
let customParams = encodeURIComponent(JSON.stringify({ path: 'livePage/index', pid: 1 }))
let customParams = encodeURIComponent(
JSON.stringify({ path: 'livePage/index', pid: 1 })
)
// let customParams
// 开发者在直播间页面路径上携带自定义参数(如示例中的path和pid参数),后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断)
// #ifdef MP-WEIXIN
wx.navigateTo({
url: `plugin-private://${this.appid}/pages/live-player-plugin?room_id=${this.roomId}&custom_params=${customParams}`
})
// wx.navigateTo({
// url: `plugin-private://${this.appid}/pages/live-player-plugin?room_id=${this.roomId}&custom_params=${customParams}`,
// })
// #endif
}
}
},
},
}

8
components/canvasShow/basics/newProduct/mixin.js

@ -53,7 +53,7 @@ export const commonMixin = {
if (_.componentContent.productData.sourceType === '1') {
if(_.componentContent.productData.productIdList && _.componentContent.productData.productIdList.length>0){
_.sendReq({
url: `${api.getProducts}?page=1&pageSize=99&ids=${_.componentContent.productData.productIdList}`,
url: `${api.getProductsV2}?page=1&pageSize=99&ids=${_.componentContent.productData.productIdList}`,
method: 'GET'
}, (proRes) => {
_.productData = proRes.data.list
@ -61,7 +61,7 @@ export const commonMixin = {
_.componentContent.productData.imgTextData = _.productData
}
// _.$forceUpdate() // 刷新轮播图
})
} else {
_.productData = []
@ -69,7 +69,7 @@ export const commonMixin = {
} else if(_.componentContent.productData.sourceType === '2'){
if(_.componentContent.productData.categoryId) {
_.sendReq({
url: `${api.getProducts}?page=1&pageSize=99&classifyId=${_.componentContent.productData.categoryId}`,
url: `${api.getProductsV2}?page=1&pageSize=99&classifyId=${_.componentContent.productData.categoryId}`,
method: 'GET'
}, (proRes) => {
_.productData = proRes.data.list
@ -81,7 +81,7 @@ export const commonMixin = {
})
} else {
_.productData = []
}
}
}

25
components/canvasShow/basics/product/app/index.vue

@ -176,7 +176,8 @@
v-else
class="product-list"
>
<div class="product-list-box">
<ProductSkeleton style="" v-if="isFirst" :loading="loading" :isFirst="isFirst" />
<div class="product-list-box" v-else>
<div
class="product-list-item-warp"
v-for="(item,index) in productData"
@ -185,7 +186,6 @@
<div
@click="jumpProductDetail(item)"
class="product-list-item"
v-if="JSON.stringify(item)!=='{}'"
>
<div class="product-list-img">
<img
@ -292,22 +292,6 @@
</div>
</div>
</div>
<!-- 自定义骨架屏 -->
<div
class="product-list-item ske-loading"
v-else
>
<div class="product-list-img child-loading">
</div>
<div class="product-list-info">
<label class="product-name child-loading"></label>
<div class="price-warp child-loading" style="padding: 5px 0">
</div>
<div class="price-warp child-loading" style="padding: 5px 0">
</div>
</div>
</div>
</div>
</div>
</div>
@ -321,9 +305,12 @@
<script>
import { commonMixin } from '../mixin'
import ProductSkeleton from "@/components/basics/components/ProductSkeleton";
export default {
mixins: [commonMixin],
components:{
ProductSkeleton
},
data() {
return {
swiperCurrent: 0,

22
components/canvasShow/basics/product/mixin.js

@ -32,7 +32,9 @@ export const commonMixin = {
// },
data () {
return {
productData: []
productData: [1,2,3,4],
loading:true,
isFirst:true
}
},
watch: {
@ -54,33 +56,37 @@ export const commonMixin = {
}
},
methods: {
getData(isFirst) {
getData() {
const _ = this
this.productData = [{},{},{},{},{},{},{},{}]
// 纵向
_.loading=true
if (_.componentContent.productData.sourceType === '1') {
if(_.componentContent.productData.productIdList && _.componentContent.productData.productIdList.length>0){
_.sendReq({
url: `${api.getProducts}?page=1&pageSize=99&ids=${_.componentContent.productData.productIdList}`,
url: `${api.getProductsV2}?page=1&pageSize=99&ids=${_.componentContent.productData.productIdList}`,
method: 'GET'
}, (proRes) => {
_.productData = proRes.data.list
_.productData = _.productData.filter(item=>JSON.stringify(item) !== '{}')
if(isFirst){
if(_.isFirst){
_.componentContent.productData.imgTextData = _.productData
}
_.isFirst = false
_.loading = false
})
} else {
_.productData = []
_.isFirst = false
_.loading = false
}
} else if(_.componentContent.productData.sourceType === '2'){
if(_.componentContent.productData.categoryId) {
_.sendReq({
url: `${api.getProducts}?page=1&pageSize=99&classifyId=${_.componentContent.productData.categoryId}`,
url: `${api.getProductsV2}?page=1&pageSize=99&classifyId=${_.componentContent.productData.categoryId}`,
method: 'GET'
}, (proRes) => {
_.productData = proRes.data.list
_.productData = _.productData.filter(item=>JSON.stringify(item) !== '{}')
if(isFirst){
if(_.isFirst){
_.componentContent.productData.imgTextData = _.productData
}
// _.swiper.update()

1
components/canvasShow/basics/shop.vue

@ -52,7 +52,6 @@ export default {
// },
computed: {
imgList: function () {
console.log(this.componentContent)
return this.componentContent.imgTextData.filter(function (item) {
return item.img
})

4
components/canvasShow/basics/spike/app/index.vue

@ -1,6 +1,6 @@
<template>
<div class="spike">
<div class="spike-card" v-if="productData.products && productData.products.length>0">
<div class="spike" v-if="productData.products && productData.products.length>0">
<div class="spike-card">
<div class="spike-card-top">
<h2 class="spike-card-top-title">
<!-- #ifdef MP-WEIXIN -->

93
components/canvasShow/basics/spike/mixin.js

@ -1,43 +1,43 @@
import api from '../../config/api'
import {funMixin} from '../../config/mixin'
import { funMixin } from '../../config/mixin'
export const commonMixin = {
name: 'spikeList',
mixins: [funMixin],
data () {
data() {
return {
productData: {
products: []
products: [],
},
count: [],
state: 0,
timer: null
timer: null,
}
},
props: {
terminal: {
type: Number,
default: 4
default: 4,
},
typeId: {
type: Number,
default: 1
default: 1,
},
shopId: {
type: Number,
default: 0
default: 0,
},
componentContent: {
type: Object
}
type: Object,
},
},
watch: {
'componentContent': {
componentContent: {
handler(newVal, oldVal) {
this.getData()
},
deep: true
}
deep: true,
},
},
created() {
this.getData()
@ -45,54 +45,60 @@ export const commonMixin = {
methods: {
getData() {
const _ = this
if(_.componentContent.shopSeckillId){
if(this.typeId === 1){
if (_.componentContent.shopSeckillId) {
if (this.typeId === 1) {
const params = {
method: 'GET',
url: `${api.getPlatformSeckills}?ids=${_.componentContent.shopSeckillId}`,
}
this.sendReq(params, (res) => {
if(res.data.length> 0){
if (res.data.length > 0) {
_.productData = res.data[0]
_.productData.products.map(function(value){
value.sliderVal = (value.stockNumber/value.total*100).toFixed(2)
return value;
});
_.productData.products.map(function (value) {
value.sliderVal = (
(value.stockNumber / value.total) *
100
).toFixed(2)
return value
})
// 只有进行中和未开始活动, 用倒计时
this.timer = setInterval(()=>{
this.timer = setInterval(() => {
_.getTime(_.productData)
}, 1000)
}
})
}
if(this.typeId === 3){
if (this.typeId === 3) {
const params = {
method: 'GET',
url: `${api.getSeckills}?shopId=${_.shopId}&ids=${_.componentContent.shopSeckillId}`,
}
this.sendReq(params, (res) => {
if(res.data.length> 0){
if (res.data.length > 0) {
_.productData = res.data[0]
_.productData.products.map(function(value){
value.sliderVal = (value.stockNumber/value.total*100).toFixed(2)
return value;
});
_.productData.products.map(function (value) {
value.sliderVal = (
(value.stockNumber / value.total) *
100
).toFixed(2)
return value
})
// 只有进行中和未开始活动, 用倒计时
if(_.productData.state !==2) {
this.timer = setInterval(()=>{
if (_.productData.state !== 2) {
this.timer = setInterval(() => {
_.getTime(_.productData)
}, 1000)
}
} else {
_.productData = {
products:[]
products: [],
}
}
})
}
} else {
_.productData = {
products:[]
products: [],
}
}
},
@ -100,38 +106,35 @@ export const commonMixin = {
const date = new Date().getTime()
let startTime = ''
let endTime = ''
if(this.typeId === 1){
startTime = new Date(info.startTime.replace(/-/g,'/')).getTime()
endTime = new Date(info.endTime.replace(/-/g,'/')).getTime()
if (this.typeId === 1) {
startTime = new Date(info.startTime.replace(/-/g, '/')).getTime()
endTime = new Date(info.endTime.replace(/-/g, '/')).getTime()
} else {
startTime = new Date(info.effectiveStart.replace(/-/g,'/')).getTime()
endTime = new Date(info.effectiveEnd.replace(/-/g,'/')).getTime()
startTime = new Date(info.effectiveStart.replace(/-/g, '/')).getTime()
endTime = new Date(info.effectiveEnd.replace(/-/g, '/')).getTime()
}
if(date > endTime){
if (date > endTime) {
this.state = 2
} else if(startTime > date) {
} else if (startTime > date) {
this.state = 0
this.countDown(startTime-date) // 未开始
this.countDown(startTime - date) // 未开始
} else {
this.state = 1
this.countDown(endTime-date) // 进行中
this.countDown(endTime - date) // 进行中
}
},
countDown(time) {
const fn = (v) => v < 10 ? `0${v}` : v
const fn = (v) => (v < 10 ? `0${v}` : v)
const t = parseInt(time / 1000)
const text = this.state == 0 ? '开始' : '结束'
const hour = parseInt(t / 3600)
const min = parseInt((t % 3600) / 60)
const s = t % 60
// console.log(min, '分',t)
this.count = [text, fn(hour), fn(min), fn(s)]
// console.log(text, fn(hour), fn(min), fn(s))
}
},
},
beforeDestroy() {
clearInterval(this.timer)
}
},
}

13
components/canvasShow/basics/video.vue

@ -8,12 +8,15 @@
<video class="myVideo" id="myVideo" :src="componentContent.videoUrl" enable-danmu danmu-btn controls></video>
</div>
<div class="videoCoverBox" v-if="componentContent.coverImg && !isPlay" @click="handlePlayVideo">
<image :src="componentContent.coverImg" ></image>
<image :src="componentContent.coverImg" />
</div>
<div class="videoRightBox" v-if="!componentContent.coverImg">
<video class="myVideo" id="myVideo" :src="componentContent.videoUrl" enable-danmu danmu-btn controls></video>
</div>
<div class="clear"></div>
<!-- <div style="width:100vw;height:200px">
<image :src="componentContent.coverImg" />
</div>-->
</div>
</template>
@ -30,7 +33,6 @@ export default {
}
},
created(){
console.log('componentContent',this.componentContent)
},
mounted() {
this.videoContext = uni.createVideoContext('myVideo',this)
@ -91,12 +93,15 @@ export default {
margin-bottom: 20upx;
}
.videoRightBox {
width: 100%;
width: 100vw;
height: 56.25vw; //16:9
}
}
}
.videoCoverBox{
aspect-ratio: 16/9;
width: 100vw;
height: 56.25vw; //16:9
position: relative;
&:before{
content: '';

4
components/canvasShow/canvasShowPage.vue

@ -105,11 +105,11 @@
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-shop>
<!-- <com-live v-if="item.type==='live'"
<!-- <com-live v-if="item.type==='live'"
:componentContent="item.componentContent"
:terminal="terminal"
:typeId="typeId"
:shopId="shopId"></com-live>-->
:shopId="shopId "></com-live>-->
</div>
</div>
</template>

5
components/canvasShow/config/api.js

@ -2,7 +2,7 @@
// 获取当前环境变量 true => 生产环境 false => 开发环境
// const BASEURL = process.env.VUE_APP_DOMAIN_PREFIX
const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://ceres.zkthink.com/api' : 'https://ceres.zkthink.com/api'
const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://122.9.152.120/ceres-app-api' : 'http://122.9.152.120/ceres-app-api'
// const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://127.0.0.1:9007' : 'http://127.0.0.1:9007'
@ -11,6 +11,7 @@ export const api = {
fileUpload: BASEURL + '/file/upload', // 文件上传
getClassify: BASEURL + '/canvas/getClassify', // 查询分类层级
getProducts: BASEURL + '/canvas/getProducts', // 选择商品查询
getProductsV2: BASEURL + '/canvas/getProducts2', // 选择商品查询V2(2023.3.9 优化版本接口)
saveCanvas: BASEURL + '/canvas/saveCanvas', // 保存画布
getCanvas: BASEURL + '/canvas/getCanvas', // 读取画布
getShops: BASEURL + '/canvas/getShops', // 选择店铺查询
@ -19,7 +20,7 @@ export const api = {
takeCoupon: BASEURL + '/coupon/takeCoupon', // 领取优惠券
selectCanvasCustomList: BASEURL + '/canvas/selectCanvasCustomList', // 自定义页面查询
getPlatformSeckills: `${BASEURL}/canvas/getPlatformSeckills`, // 平台秒杀活动
getSeckills: `${BASEURL}/renovation/getSeckills`, // 商家秒杀活动
getSeckills: `${BASEURL}/renovation/getSeckills`, // 商家秒杀活动w
getMinDiscount: `${BASEURL}/canvas/getMinDiscount`, // 平台限时折扣
getDiscounts: `${BASEURL}/renovation/getDiscounts`, // 商家限时折扣
getAdminGroupWorks: `${BASEURL}/canvas/getGroupWorks`, // 平台拼团专区

3
components/canvasShow/config/mixin/funMixin.js

@ -19,7 +19,6 @@ export const tool = {
}
},
mounted() {
// console.log('加载了组件')
},
methods: {
...mapMutations({
@ -28,7 +27,6 @@ export const tool = {
// 判断url
jumpLink (linkObj) {
var link = ''
console.log(linkObj.data)
if(linkObj && linkObj.typeText && linkObj.data){
switch (linkObj.typeText) {
case '类别':
@ -198,7 +196,6 @@ export const tool = {
// },
// 加入购物车
addCart(id){
console.log(id)
}
}
}

30
components/canvasShow/config/mixin/sendReqMixin.js

@ -5,7 +5,7 @@ import request from './server'
/* eslint-disable */
export const sendReq = {
data () {
data() {
return {
// 加载中
loading: false,
@ -15,23 +15,27 @@ export const sendReq = {
/*
* 发送请求
*/
sendReq (params, callback) {
sendReq(params, callback) {
let self = this
request({
method: params.method || 'POST',
url: params.url,
data: params.data || {},
withCredentials : true,
withCredentials: true,
headers: {
'Content-type': params.contentType || 'application/json;charset=utf-8'
'Content-type':
params.contentType || 'application/json;charset=utf-8',
},
}).then(
(res) => {
if (res && res.data) {
callback && callback(res.data)
}
},
(error) => {
throw new Error(error)
}
}).then((res) => {
if (res && res.data) {
callback && callback(res.data)
}
}, (error) => {
console.log(error)
})
}
}
)
},
},
}

3
components/canvasShow/config/mixin/server.js

@ -37,14 +37,12 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(
(response) => {
console.log(response)
if (response.data.code && response.data.code !=='200' && response.data.message) {
Vue.prototype.$message.error(response.data.message)
}
return response
},
err => {
console.log(err)
// 失败响应
if (err && err.response) {
switch (err.response.status) {
@ -107,7 +105,6 @@ service.interceptors.response.use(
//真机获取
service.defaults.adapter = function (config) {
return new Promise((resolve, reject) => {
console.log(config)
var settle = require('axios/lib/core/settle');
var buildURL = require('axios/lib/helpers/buildURL');
uni.request({

5
components/diyLoading/index.vue

@ -6,7 +6,7 @@
<!-- loading -->
<view class="loading-gif">
<view class="flex mask">
<image src="@/static/images/loading/loading.gif"></image>
<image src="https://ceres.zkthink.com/static/loading/loading.gif" />
<!-- <p> {{ loadingInfo }} </p>-->
</view>
</view>
@ -29,8 +29,7 @@ export default {
}
},
mounted() {
console.log("+++++++++++++++++++__++++++++++++++++++++")
console.log(this.loadingFlag, this.loadingInfo)
},
computed: {
...mapGetters(["loadingFlag", "loadingInfo"])

36
components/wx/wxSendCoupon.vue

@ -166,28 +166,27 @@
},
//
sendcoupon(e){
console.log('领取了微信卡券', e)
const errcode = e.detail.errcode,resultList = e.detail.send_coupon_result
switch (errcode) {
case 'OK':
break
case 'PARAM_ERROR':
console.log('参数错误,请开发者查看msg中具体的错误信息并进行修复处理')
console.error('参数错误,请开发者查看msg中具体的错误信息并进行修复处理')
break
case 'USER_NOT_EXISTS':
console.log('登录态获取失效')
console.error('登录态获取失效')
break
case 'USER_GET_FAILED':
console.log('登录态获取失败')
console.error('登录态获取失败')
break
case 'SIGN_ERROR':
console.log('签名错误')
console.error('签名错误')
break
case 'SYSTEMERROR':
console.log('发券超时')
console.error('发券超时')
break
case 'FREQUENCY_LIMITED':
console.log('发券频率过高')
console.error('发券频率过高')
break
}
if(errcode === 'OK'){
@ -204,61 +203,61 @@
})
switch (item.code) {
case 'FAILED':
console.log('该张券发券失败,查看message中的具体错误信息')
console.error('该张券发券失败,查看message中的具体错误信息')
break
case 'NOTENOUGH':
uni.showToast({
title:cName + '优惠券已被领取完',
icon:"none"
})
console.log('总预算用完')
console.error('总预算用完')
break
case 'DAYLIMIT':
uni.showToast({
title:cName + '优惠券领取张数已达到上限',
icon:"none"
})
console.log('用户达到单天限领')
console.error('用户达到单天限领')
break
case 'NATURELIMIT':
uni.showToast({
title:cName + '优惠券领取张数已达到上限',
icon:"none"
})
console.log('用户自然人限领')
console.error('用户自然人限领')
break
case 'MAXQUOTA':
uni.showToast({
title:cName + '优惠券领取张数已达到上限',
icon:"none"
})
console.log('用户领取张数达到上限')
console.error('用户领取张数达到上限')
break
case 'DUPREQUEST':
uni.showToast({
title:cName + '优惠券领取张数已达到上限',
icon:"none"
})
console.log('已通过该发券凭证给用户发券')
console.error('已通过该发券凭证给用户发券')
break
case 'NOTRUNNING':
console.log('批次状态非运营中')
console.error('批次状态非运营中')
break
case 'EXPIRED':
uni.showToast({
title:cName + '优惠券已过期',
icon:"none"
})
console.log('该批次已过期')
console.error('该批次已过期')
break
case 'NOTMONEY':
console.log('账户余额不足')
console.error('账户余额不足')
break
case 'USERLIMIT':
console.log('用户已超限领额度')
console.error('用户已超限领额度')
break
case 'FREQUENCYLIMIT':
console.log('超过频率限制')
console.error('超过频率限制')
break
}
})
@ -269,7 +268,6 @@
},
//
userconfirm(e){
console.log('用户确认领券', e)
this.$emit('closeAd')
}
}

16
config/api.js

@ -1,15 +1,13 @@
// const DOMAIN_PREFIX = 'http://127.0.0.1:9007'
const DOMAIN_PREFIX = 'https://ceres.zkthink.com/api'
const DOMAIN_PREFIX = 'http://122.9.152.120/ceres-app-api'
// const DOMAIN_PREFIX = 'http://14.22.116.132:81/ceres-app-api'
// https://ceresdev.zkthink.com
// #ifndef H5
const WX_API_BASE = DOMAIN_PREFIX // app
// const WX_API_BASE = 'http://3j073r3905.qicp.vip:29544'
// #endif
// const DOMAIN_PREFIX = 'https://ceres.zkthink.com/api'
const WX_API_BASE = DOMAIN_PREFIX
// #ifdef H5
// const WX_API_BASE = '/api' // h5
const WX_API_BASE = DOMAIN_PREFIX // app
const TERMINAL = 2
// #endif
@ -23,7 +21,7 @@ const TERMINAL = 1
module.exports = {
terminal: TERMINAL, // 画布设备 1 小程序,2 H5,3 App 4 电脑
SettledMerchantPrefix: DOMAIN_PREFIX + '/settled-merchant', //商家入驻链接
SettledMerchantPrefix: DOMAIN_PREFIX.replace('ceres-app-api', "ceres-settled-merchant/"), //商家入驻链接
// shareLink: DOMAIN_PREFIX + '/h5', // 分享地址
shareLink: 'https://ceres.zkthink.com/h5', // 分享地址
@ -169,7 +167,7 @@ module.exports = {
// 画布模块
getProducts: WX_API_BASE + '/canvas/getProducts', // 选择商品查询
getProductsV2: WX_API_BASE + '/canvas/getProducts2', // 选择商品查询
//服务协议
Query: WX_API_BASE + '/dict/getByName', // 查询分类层级

1
main.js

@ -21,5 +21,4 @@ App.mpType = 'app'
const app = new Vue({
...App
})
console.log(store)
app.$mount()

18
manifest.json

@ -1,6 +1,6 @@
{
"name" : "cereshop",
"appid" : "__UNI__10DC0A0",
"appid" : "__UNI__D2138DD",
"description" : "cereshop",
"versionName" : "1.7.4",
"versionCode" : 174,
@ -51,7 +51,8 @@
]
},
"ios" : {
"idfa" : false
"idfa" : false,
"dSYMs" : false
},
/* ios */
"sdkConfigs" : {
@ -118,7 +119,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxf0713a10bbae8732",
"appid" : "wxd7066af4ee73022d",
"requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ],
"setting" : {
"urlCheck" : false,
@ -131,12 +132,11 @@
"permission" : {},
"plugins" : {
//
// "live-player-plugin" : {
// // "version": "1.3.2", //
// "version" : "latest",
// "provider" : "wx2b03c6e691cd7370"
// },
//
/*"live-player-plugin" : {
// "version": "1.3.2", //
"version" : "latest",
"provider" : "wx2b03c6e691cd7370"
},*///
"sendCoupon" : {
"version" : "latest",
"provider" : "wxf3f436ba9bd4be7b"

6
pages.json

@ -1,7 +1,7 @@
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"global-loading": "@/components/GlobalLoading/index.vue"
"global-loading": "@/components/diyLoading/index.vue"
},
"pages": [
// pageshttps://uniapp.dcloud.io/collocation/pages
@ -581,7 +581,7 @@
"enablePullDownRefresh": false
}
},
/* {
{
"path": "livePage/index",
"style": {
"navigationBarTitleText": "直播推荐",
@ -590,7 +590,7 @@
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
},*/
},
{
"path": "channelCoupon/index",
"style": {

2
pages/tabbar/cart/index.vue

@ -296,7 +296,6 @@ export default {
const res = await NET.request(API.ShoppingCart, {}, 'GET')
this.dataList = res.data
this.settleAccountsObj.allNum = this.dataList.length
console.log(this.dataList)
if (this.dataList.length === 0) {
this.isEmpty = true
uni.setStorageSync('allCartNum', 0)
@ -705,7 +704,6 @@ export default {
icon: 'none'
})
this.showDeleteModal = true
console.log(123123,this.settleAccountsObj,this.showDeleteModal)
}
,

74
pages/tabbar/index/component/Agreement.vue

@ -0,0 +1,74 @@
<!--
* @FileDescription: Agreement
* @Author: kahu
* @Date: 2023/3/7
* @LastEditors: kahu
* @LastEditTime: 2023/3/7
-->
<template>
<TuiModal
:show="privacyShow"
:custom="true"
:fadein="true"
>
<view class="Put-box1">
<view class="text-align fs34 fs-bold">
协议与隐私政策
</view>
<p class="mar-top-20">欢迎来到cereshop我们根据最新的法律法规监管政策要求更新了cereshop隐私政策</p>
<view class="flex-display flex-sp-between">
<view
class="btn submit"
@click="privacyShow = false"
>
同意
</view>
</view>
</view>
</TuiModal>
</template>
<script>
import TuiModal from "@/components/modal/modal";
export default {
name: "Agreement",
components: {TuiModal},
data() {
return {
privacyShow: false,
}
},
created() {
// this.privacyShow = true
if (!uni.getStorageSync('storage_key')) {
// #ifdef APP-PLUS
this.privacyShow = true
// #endif
}
},
methods: {}
}
</script>
<style
lang="scss"
scoped
>
.Put-box1 {
.btn {
text-align: center;
margin-top: 40rpx;
border: 1px solid #333333;
height: 80upx;
line-height: 80upx;
width: 100%;
color: #333333;
}
.submit {
background-color: #333333;
color: #FFEBC4;
}
}
</style>

171
pages/tabbar/index/component/FixedHead.vue

@ -0,0 +1,171 @@
<!--
* @FileDescription: index
* @Author: kahu
* @Date: 2023/3/7
* @LastEditors: kahu
* @LastEditTime: 2023/3/7
-->
<template>
<view class="header_content">
<!-- 头部 -->
<view
class="header_box"
id="header_box"
>
<DefaultHead @getInfoData="handleGetSystemInfoData" />
<!-- 和胶囊齐平nav条 -->
<view
:style="{
'padding-top':`${headerObj.menuPadding}px`,
'transform':`translateY(-${headerObj.menuButtonTogetherNavInfo.transformTop}px)`
}"
class="logo_row"
>
<!-- logo -->
<view class="logo_box">
<image src="https://ceres.zkthink.com/static/assets/img/logo.png" />
</view>
<!-- 右侧搜索 -->
<template>
<!-- #ifndef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
<view
class="search_box"
@click="handleSearch"
>
<image src="https://ceres.zkthink.com/static/img/search.png" />
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
<view
class="search_box"
:style="{
'position':'absolute',
'left':`${headerObj.systemInfo.menuButtonInfo.left}px`,
'transform':`translateX(-110%)`
}"
@click="handleSearch"
>
<image src="https://ceres.zkthink.com/static/img/search.png" />
</view>
<!-- #endif -->
</template>
</view>
<!-- 其他内容 -->
<slot />
</view>
<!-- 空盒子撑高 -->
<view
class="empty_box"
:style="{height:headerObj.height+'px'}"
/>
</view>
</template>
<script>
import DefaultHead from "@/components/DefaultHead";
export default {
name: "FixedHead",
components: {
DefaultHead
},
data() {
return {
//
headerObj: {
height: 0, //
systemInfo: {}, // 西
menuPadding: 0, // statusBartop - statusBarHeight
//
menuButtonTogetherNavInfo: {
height: 36, // navCSSnav
transformTop: 0 // navmenuPadding
}
},
}
},
methods: {
//
handleSearch() {
uni.navigateTo({
url: `/pages_category_page1/search/index/index`
})
},
/**
* 获取系统信息
* 由DefaultHead回调
*/
handleGetSystemInfoData(data) {
this.headerObj.systemInfo = data
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
this.headerObj.menuPadding = data.menuButtonInfo.top - data.systemInfo.statusBarHeight
const {menuButtonTogetherNavInfo} = this.headerObj
// nav
const menuButtonHeight = data.menuButtonInfo.height
const menuButtonTogetherNavHeight = menuButtonTogetherNavInfo.height
if (menuButtonHeight < menuButtonTogetherNavHeight) {
// nav
menuButtonTogetherNavInfo.transformTop = (menuButtonTogetherNavHeight - menuButtonHeight) / 2
}
// #endif
this.$nextTick(()=>{
let query = uni.createSelectorQuery().in(this);
//
query.select('#header_box').boundingClientRect(boxData => {
this.headerObj.height = boxData.height
if(boxData.height<data.menuButtonInfo.bottom){
this.headerObj.height = data.menuButtonInfo.bottom+10
}
}).exec()
})
},
}
}
</script>
<style
lang="scss"
scoped
>
.header_content {
position: relative;
//
.header_box {
width: 100%;
height: auto;
position: fixed;
background-color: #fff;
z-index: 9999;
image {
width: 100%;
height: 100%;
display: inline-block;
}
.logo_row {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
.logo_box {
width: 286rpx;
height: 72rpx;
}
.search_box {
width: 60rpx;
height: 60rpx;
}
}
}
.empty_box {
width: 100%;
position: relative;
}
}
</style>

153
pages/tabbar/index/component/Skeleton.vue

@ -0,0 +1,153 @@
<!--
* @FileDescription: Skeleton
* @Author: kahu
* @Date: 2023/3/8
* @LastEditors: kahu
* @LastEditTime: 2023/3/8
-->
<template>
<view v-if="isFirst">
<Skeletons
:loading="loading && isFirst"
:animation="true"
bgColor="#FFF"
/>
<div class="skeleton_content u-skeleton">
<div class="empty_box u-skeleton-fillet"></div>
<div class="banner_box u-skeleton-fillet"></div>
<div class="icon_box ">
<div class="icon_item" v-for="item in 4">
<div class="img u-skeleton-fillet"></div>
<div class="text u-skeleton-fillet"></div>
</div>
</div>
<div class="hot_box ">
<div class="left u-skeleton-fillet"></div>
<div class="right ">
<div class="top u-skeleton-fillet"></div>
<div class="bottom u-skeleton-fillet"></div>
</div>
</div>
<div class="new_box ">
<div class="item u-skeleton-fillet" v-for="item in 3"></div>
</div>
<div class="hot_box ">
<div class="left u-skeleton-fillet"></div>
<div class="right ">
<div class="top u-skeleton-fillet"></div>
<div class="bottom u-skeleton-fillet"></div>
</div>
</div>
</div>
</view>
</template>
<script>
import Skeletons from "@/components/Skeleton";
export default {
name: "Skeleton",
components:{Skeletons},
data() {
return {}
},
props:{
loading:{
type:Boolean,
default:true
},
isFirst:{
type:Boolean,
default:true
}
},
methods: {}
}
</script>
<style
lang="scss"
scoped
>
.skeleton_content {
width: 100%;
height: calc(100vh - 50px);
overflow-y: hidden;
box-sizing: border-box;
.empty_box{
width: 100%;
height: 140rpx;
}
.banner_box {
width: 100%;
height: 320rpx;
}
.icon_box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 60rpx;
box-sizing: border-box;
.icon_item {
width: 80rpx;
.img {
width: 100%;
height: 80rpx;
}
.text {
margin-top: 20rpx;
width: 100%;
height: 30rpx;
}
}
}
.hot_box {
width: 100%;
height: 390rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx;
box-sizing: border-box;
.left {
width: 49%;
height: 100%;
}
.right {
width: 49%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.top, .bottom {
width: 100%;
height: 49%;
}
}
}
.new_box {
width: 100%;
height: 390rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx;
box-sizing: border-box;
.item {
width: 30%;
height: 100%;
}
}
}
</style>

293
pages/tabbar/index/index.vue

@ -1,190 +1,115 @@
<template>
<div class="hom-page" :style="{'padding-top': height + 'px'}">
<!-- <gg></gg>-->
<global-loading />
<u-sticky offset-top="0" h5-nav-height="0" bg-color="#fff">
<view class="head">
<!-- #ifdef MP-WEIXIN -->
<view
class="header weiXinBox"
:style="{'padding-top': topHeight + 'px'}"
>
<view
class="topBox"
:style="{'height': height + 'px'}"
>
<image
class="logo"
src="https://ceres.zkthink.com/static/assets/img/logo.png"
mode="widthFix"
></image>
</view>
</view>
<view
class="wxBtnBg"
:style="{'padding-top': (topHeight + height + 10) + 'px'}"
>
<view
class="weiXinBoxBtn"
@click="searchPro"
>
<image
class="search-icon"
src="https://ceres.zkthink.com/static/images/searchImg.png"
mode="widthFix"
>
</image>
<text>请输入您想要的宝贝</text>
</view>
</view>
<!-- #endif -->
<!-- #ifdef H5 || APP-PLUS -->
<view class="header">
<view class="topBox topWap">
<image
class="logo"
src="https://ceres.zkthink.com/static/assets/img/logo.png"
mode="widthFix"
></image>
<view
class="search-btn"
@click="searchPro"
>
<image
class="search-icon"
src="https://ceres.zkthink.com/static/img/search.png"
mode="widthFix"
>
</image>
</view>
</view>
</view>
<!-- #endif -->
<category-list @tabChange="tabChange"></category-list>
<div class="hom-page home_page_content">
<!-- 头部 -->
<FixedHead>
<category-list @tabChange="tabChange"></category-list>
</FixedHead>
<!-- 首页画布骨架屏 -->
<Skeleton v-if="isFirst" :loading="loading" :isFirst="isFirst" />
<template v-if="!isFirst">
<!-- 首页画布 -->
<view
id="home_canvas_page"
v-if="activeTab===0"
>
<canvas-page
ref="canvasPage"
:componentsData="componentsData"
:terminal="terminal"
:typeId="1"
/>
</view>
</u-sticky>
<canvas-page ref="canvasPage"
:componentsData="componentsData"
v-if="activeTab==0"
:terminal="terminal"
:typeId="1"
></canvas-page>
<category-show ref="categoryShow"
v-else
:categoryid="categoryid"></category-show>
<ad-window ref="adWindow"
:triggerCondition="1"></ad-window>
<view class="reachBottom"
v-if="topLeft > 400">
<image class="reach-icon"
src="https://ceres.zkthink.com/static/img/reachBottom.png"
mode="widthFix">
</image>
<text class="reach-text">这里到底了哦~~</text>
</view>
<tui-modal :show="privacyShow"
:custom="true"
:fadein="true">
<view class="Put-box1">
<view class="text-align fs34 fs-bold">
协议与隐私政策
</view>
<p class="mar-top-20">欢迎来到cereshop我们根据最新的法律法规监管政策要求更新了cereshop隐私政策</p>
<view class="flex-display flex-sp-between">
<view class="btn submit"
@click="privacyShow = false">
同意
</view>
</view>
</view>
</tui-modal>
<!-- 其他分类 -->
<category-show
ref="categoryShow"
v-else
:classifyId="classifyId"
/>
<ListBottomTips
:loading="false"
v-if="activeTab===0 && scrollTop>400"
/>
<Agreement />
<global-loading />
<ad-window
ref="adWindow"
:triggerCondition="1"
/>
</template>
</div>
</template>
<script>
import tuiModal from "@/components/modal/modal";
import AdWindow from "@/components/adWindow";
const NET = require('@/utils/request')
const API = require('../../../config/api')
import api from '@/components/canvasShow/config/api'
import CategoryList from "@/components/basics/categoryList.vue"
import CategoryShow from "@/components/basics/categoryShow.vue"
import comHeader from '@/components/canvasShow/basics/header/app'
import canvasPage from '@/components/canvasShow/canvasShowPage.vue'
import FixedHead from "./component/FixedHead";
import ListBottomTips from "@/components/ListBottomTips";
import Agreement from "./component/Agreement";
import Skeleton from "./component/Skeleton";
const NET = require('@/utils/request')
const API = require('../../../config/api')
export default {
components: {
AdWindow,
CategoryList,
CategoryShow,
canvasPage,
tuiModal
FixedHead,
ListBottomTips,
Agreement,
Skeleton
},
data() {
return {
loading: true,
isFirst: true,
classifyId: 0, // ID
terminal: API.terminal,
activeTab: 0,
categoryid: 0,
topHeight: 0,
height: 0,
topLeft: 0,
privacyShow: false,
componentsData: [],
typeId: 1
typeId: 1,
scrollTop: 0
}
},
onReachBottom() {
this.HandleLoadMoreProduct()
},
onLoad() {
if (!uni.getStorageSync('storage_key')) {
// #ifdef APP-PLUS
this.privacyShow = true
// #endif
}
this.$nextTick(() => {
this.canvasGet()
this.$nextTick(async () => {
await this.handleGetCanvas()
this.$refs.adWindow.getAd()
})
},
onShow() {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.topHeight = menuButtonInfo.top
this.height = menuButtonInfo.height
// #endif
},
onPageScroll(e) {
this.topLeft = e.scrollTop
this.scrollTop = e.scrollTop
},
methods: {
//
canvasGet() {
var _this = this
var apiUrl = api.getCanvas + '?terminal=' + this.terminal + '&type=' + this.typeId
if (this.shopId) {
apiUrl += '&shopId=' + this.shopId
}
let params = {
url: apiUrl,
method: 'GET'
async handleGetCanvas() {
this.loading = true
const apiUrl = api.getCanvas + '?terminal=' + this.terminal + '&type=' + this.typeId
const {data} = await NET.request(apiUrl, {}, 'GET')
if (JSON.stringify(data) !== '{}') {
this.componentsData = JSON.parse(data.json)
this.isFirst = false
this.loading = false
}
// uni.showLoading({
// mask: true,
// title: '...',
// })
NET.request(apiUrl, {}, 'GET').then(res => {
if (JSON.stringify(res.data) !== '{}') {
var componentsData = JSON.parse(res.data.json)
this.componentsData = componentsData
}
uni.hideLoading()
}).catch(res => {
uni.hideLoading()
})
},
//
onShareTimeline: function() {
onShareTimeline: function () {
return {
title: this.miniHomeRemark,
imageUrl: this.miniHomeImg,
@ -192,7 +117,7 @@ export default {
}
},
//
onShareAppMessage: function() {
onShareAppMessage: function () {
return {
title: this.miniHomeRemark,
imageUrl: this.miniHomeImg,
@ -202,52 +127,32 @@ export default {
/**
* 请求非首页的子组件的下一页
* */
HandleLoadMoreProduct(){
if (this.activeTab != 0) {
HandleLoadMoreProduct() {
if (this.activeTab !== 0) {
let pitchOnPage = this.$refs.categoryShow
if (pitchOnPage.total !== 0 && pitchOnPage.productList.length < pitchOnPage.total) {
pitchOnPage.page++
pitchOnPage.getData()
pitchOnPage.handleGetProductData()
}
}
},
/**
* 清空非首页的子组件商品数据
* 回滚请求参数到起始页
* */
HandleCleanActiveTabProduct(){
if(this.$refs.categoryShow){
let pitchOnPage = this.$refs.categoryShow
pitchOnPage.total = 0
pitchOnPage.page=1
pitchOnPage.productList=[{},{},{},{},{},{},{},{}]
}
},
tabChange(index, id) {
this.HandleCleanActiveTabProduct()
this.activeTab = index
this.categoryid = id
this.classifyId = id
},
//
searchPro(key, type) {
uni.navigateTo({
url: `/pages_category_page1/search/index/index`
})
}
}
};
</script>
<style lang="scss" scoped>
.hom-page{
margin-top: calc(20rpx + var(--status-bar-height));
}
.head{
background: #fff;
}
<style
lang="scss"
scoped
>
.header {
background: #fff;
.toLive {
height: 40px;
color: #FFF;
@ -259,12 +164,13 @@ export default {
align-items: center;
justify-content: space-between;
width: 100%;
height: 100%;
}
.logo {
width: 280rpx;
height: 42rpx;
margin-top: -40rpx;
height: 100%;
//margin-top: -40rpx;
// margin-left: 30rpx;
}
@ -332,9 +238,9 @@ export default {
.weiXinBox {
width: 100%;
position: fixed;
//position: fixed;
background: #FFFFFF;
z-index: 99;
//z-index: 99;
}
.wxBtnBg {
@ -390,7 +296,7 @@ export default {
}
.topWap {
padding-top: 60rpx;
padding-top: 30rpx;
.logo {
margin-top: 0 !important;
@ -421,20 +327,13 @@ export default {
}
}
.Put-box1 {
.btn {
text-align: center;
margin-top: 40rpx;
border: 1px solid #333333;
height: 80upx;
line-height: 80upx;
// UI
.home_page_content {
#home_canvas_page {
width: 100%;
color: #333333;
position: relative;
}
.submit {
background-color: #333333;
color: #FFEBC4;
}
}
</style>

2
pages/tabbar/user/index.data.js

@ -103,7 +103,7 @@ export const fastCardTwoList = [
id:3,
label:'会员中心',
icon:'https://ceres.zkthink.com/static/img/user/VIP.png',
jumpUrl:'../../../pages_category_page2/userModule/memberAccount'
jumpUrl:'../../../pages_category_page1/memberCenter/index'
},
{
id:4,

3
pages/tabbar/user/index.vue

@ -196,7 +196,6 @@ export default {
if (JSON.stringify(this.cacheUserItem) === '{}') {
return this.$jump('../../../pages_category_page2/userModule/login')
}
console.log(url)
if (url.startsWith('function')) {
const [key, funcName] = url.split(':')
this[funcName]()
@ -232,12 +231,10 @@ export default {
let username = this.userItem.name
let url = null
// #ifdef H5
console.log('h5 test')
window.location.href = API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`
// #endif
// #ifdef APP-PLUS
plus.runtime.openURL(API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`, function (e) {
console.log(e);
})
// #endif
// #ifdef MP-WEIXIN

2
pages_category_page1/activity.vue

@ -61,7 +61,6 @@
timestamp: timestamp
}, 'get').then(res => {
uni.stopPullDownRefresh();
console.log(res)
if (res.code == 200) {
this.productList = res.data.list
} else {
@ -80,7 +79,6 @@
},
//
goodsDateils(shopId, productId, skuId) {
console.log(111)
uni.navigateTo({
url: './goodsModule/goodsDetails?shopId=' + shopId + '&productId=' + productId + '&skuId=' +
skuId

1
pages_category_page1/coupon/list.vue

@ -136,7 +136,6 @@ export default {
},
//
goProductList(item) {
console.log(item, 'test')
uni.navigateTo({
url: `../coupon/product?id=${ item.couponId }`
})

1
pages_category_page1/coupon/product.vue

@ -60,7 +60,6 @@ export default {
}
},
onLoad(options) {
console.log(options,'options')
if (options.id) {
this.cid = options.id
this.getCoupon()

2
pages_category_page1/discount/platformDiscount.vue

@ -115,7 +115,6 @@ export default {
// this.shopId = 0
// this.shopDiscountId = 0
// }
console.log(options.discountId, 'discountId---')
this.discountId = options.discountId
},
@ -136,7 +135,6 @@ export default {
NET.request(API.queryPlatformDiscount,{
discountId: this.discountId
},'GET').then(res => {
console.log(res.data, 'data')
this.discountInfo = res.data
this.time = new Date(this.discountInfo.endTime).getTime() - new Date().getTime()
this.dateformat(this.time)

9
pages_category_page1/discount/spikeList.vue

@ -144,9 +144,7 @@
}
},
onLoad(options) {
console.log(options,'options有没有999')
this.currentTime = new Date().getTime();
console.log(this.currentTime, 'current')
if (options.shopId && options.shopSeckillId) {
this.shopId = options.shopId
this.shopSeckillId = options.shopSeckillId
@ -165,7 +163,6 @@
this.getQueryPlatformSeckillData()
}else{
this.getShopSeckillList()
console.log('店铺')
}
},
onReachBottom() {
@ -181,7 +178,6 @@
beforeDestroy(){
//
clearInterval(this.ticker)
console.log('销毁前清楚定时器')
},
methods: {
changeTit(index, item) {
@ -261,14 +257,11 @@
obj["time"] = item
let date = new Date(this.getCaption(item, 0).replace(/-/g, '/'))
let endDate = new Date(this.getCaption(item, 1).replace(/-/g, '/'))
console.log(date, 'date121212121')
obj["timestamp"] = date.getTime()
obj["endTime"] = endDate.getTime()
obj["startTime"] = item.substring(5, 16)
console.log(obj)
this.querySessionData.push(obj)
})
console.log(this.querySessionData, 'data')
this.session = this.querySessionData[0].time.substring(0, 16)
this.timestamp = this.querySessionData[0].timestamp
this.endTime = this.querySessionData[0].endTime
@ -331,7 +324,6 @@
// this.page = this.page
// } else {
// this.spikeLikeList = this.spikeLikeList.concat(res.data.list)
// console.log(this.spikeLikeList, 'list')
// }
// }).catch(res => {
// uni.showToast({
@ -374,7 +366,6 @@
this.page = this.page
} else {
this.spikeLikeList = this.spikeLikeList.concat(res.data.page.list)
console.log(this.spikeLikeList, 'classifies')
}
}).catch(res => {
uni.showToast({

4
pages_category_page1/distributionModule/invite.vue

@ -171,17 +171,14 @@
//
if(res.errMsg == 'shareAppMessage:ok'){
console.log(res)
}
},
fail: function(){
//
if(res.errMsg == 'shareAppMessage:fail cancel'){
console.log(res)
//
}else if(res.errMsg == 'shareAppMessage:fail'){
console.log(res)
// detail message
}
},
@ -192,7 +189,6 @@
//
if( options.from == 'button' ){
var eData = options.target.dataset;
console.log( eData.id); // shareBtn
// shareObj
shareObj.path = '/pages_category_page1/store/index?storeId='+this.shopId
}

4
pages_category_page1/distributionModule/promotion.vue

@ -180,17 +180,14 @@
//
if (res.errMsg == 'shareAppMessage:ok') {
console.log(res)
}
},
fail: function() {
//
if (res.errMsg == 'shareAppMessage:fail cancel') {
console.log(res)
//
} else if (res.errMsg == 'shareAppMessage:fail') {
console.log(res)
// detail message
}
},
@ -201,7 +198,6 @@
//
if (options.from == 'button') {
var eData = options.target.dataset;
console.log(eData.id); // shareBtn
// shareObj
shareObj.path = '/pages_category_page1/store/index?storeId=' + this.shopId
}

6
pages_category_page1/distributionModule/recruit.vue

@ -73,15 +73,15 @@
</view>
<view class="flex-items flex-row mar-top-60">
<view class="fs26 font-color-656">真实姓名<label class="font-color-red">*</label></view>
<input class="recruitName mar-left-20 fs26" v-model="userName"/>
<input class="recruitName mar-left-20 fs26" maxlength="20" v-model="userName"/>
</view>
<view class="flex-items flex-row mar-top-30 phoneStyle">
<label class="fs26 font-color-656">联系电话<label class="font-color-red">*</label></label>
<input class="recruitIphone mar-left-20 fs26" disabled="disabled" type="number" v-model="mobile"/>
<input class="recruitIphone mar-left-20 fs26" disabled="disabled" type="number" v-model="mobile" maxlength="11"/>
</view>
<view class="flex-items flex-row mar-top-30 mar-left-40">
<label class="fs26 font-color-656">邀请码</label>
<input class="recruitIphone mar-left-20 fs26" v-model="inviteId"/>
<input class="recruitIphone mar-left-20 fs26" v-model="inviteId" maxlength="6"/>
</view>
<view class="flex-row-plus massageDes-but fs28">
<view class="exitBut" @click="exitButClick">取消</view>

1
pages_category_page1/distributionModule/salesIndex.vue

@ -169,7 +169,6 @@
},
//
godistributionOrder(){
console.log('点击分销订单')
uni.navigateTo({
url: `distributionOrder?shopId=${this.item.shopId}&distributorId=${this.item.distributorId}`
});

1
pages_category_page1/distributionModule/shareProduct.vue

@ -193,7 +193,6 @@
});
},
fail(err) {
console.log(err, 'err报错999')
}
});
// #endif

1
pages_category_page1/distributionModule/totalClient.vue

@ -90,7 +90,6 @@
}, 'GET').then(res => {
uni.hideLoading()
this.SalesCustomerDatalist = this.SalesCustomerDatalist.concat(res.data.list)
console.log(this.SalesCustomerDatalist)
this.SalesCustomerData = res.data
if (res.data.list.length == res.data.total) {
this.loadingType = 1

157
pages_category_page1/goodsModule/Skeleton/GoodListSkeleton.vue

@ -0,0 +1,157 @@
<!--
* @FileDescription: GoodListSkeleton
* @Author: kahu
* @Date: 2023/3/9
* @LastEditors: kahu
* @LastEditTime: 2023/3/9
-->
<template>
<view
class="good_list_skeleton_content"
v-if="isFirst"
>
<Skeleton :loading="loading && isFirst" :isFixedOnFather="false"/>
<view class="good_list_skeleton u-skeleton">
<!-- <view class="search_row">
<view class="input_box u-skeleton-fillet"></view>
<view class="icon u-skeleton-fillet"></view>
</view>-->
<view class="good_row_box" v-for="item in 20">
<view class="good_row_item">
<view class="image u-skeleton-fillet"></view>
<view class="info_box">
<view class="name u-skeleton-fillet"></view>
<view class="pay u-skeleton-fillet"></view>
<view class="price_row ">
<view class="price u-skeleton-fillet"></view>
<view class="old_price u-skeleton-fillet"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Skeleton from "@/components/Skeleton";
export default {
name: "GoodListSkeleton",
components: {
Skeleton
},
data() {
return {}
},
props: {
loading: {
type: Boolean,
default: () => true
},
isFirst: {
type: Boolean,
default: () => true
}
},
methods: {}
}
</script>
<style
lang="scss"
scoped
>
.good_list_skeleton_content {
width: 100%;
height: calc(100vh - 80px);
background-color: #fff;
overflow: hidden;
box-sizing: border-box;
padding: 20rpx 30rpx;
.good_list_skeleton {
width: 100%;
//height: 200px;
//background-color: #000;
.search_row {
width: 100%;
height: 78rpx;
padding: 10rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
.input_box {
background-color: #000;
width: 85%;
height: 100%;
}
.icon {
background-color: #000;
width: 10%;
height: 100%;
}
}
.good_row_box {
width: 100%;
padding: 10rpx 10rpx;
box-sizing: border-box;
.good_row_item {
width: 100%;
height: 240rpx;
display: flex;
align-items: center;
justify-content: space-between;
.image {
width: 300rpx;
height: 100%;
}
.info_box {
height: 100%;
flex: 1;
padding: 5rpx 10rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
.name {
width: 100%;
height: 60rpx;
}
.pay {
width: 30%;
height: 50rpx;
}
.price_row {
width: 100%;
display: flex;
align-items: flex-end;
justify-content: flex-start;
.price {
width: 30%;
height: 50rpx;
}
.old_price {
margin-left: 20rpx;
width: 30%;
height: 40rpx;
}
}
}
}
}
}
}
</style>

4
pages_category_page1/goodsModule/addEvaluate.vue

@ -19,7 +19,7 @@
</view>
<view class="fs26 mar-top-40 mar-left-20 addEvaluateText">追加评价</view>
<view class="textarea-box mar-top-20 mar-left-20">
<textarea class="textarea-text" v-model="commentText" placeholder-style="color:#BBBBBB" placeholder="亲,有什么需要追加的吗"/>
<textarea class="textarea-text" v-model="commentText" maxlength="200" placeholder-style="color:#BBBBBB" placeholder="亲,有什么需要追加的吗"/>
</view>
<view class="mar-left-10 mar-top-10 evaluateImg">
<u-upload :action="action" ref="uUpload" :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']" :header="headerToken" :form-data="formData"></u-upload>
@ -56,7 +56,7 @@
if(options.detail){
const params = this.$getJumpParam(options)
this.addCommentVOList = params.addCommentVOList
this.orderProductVO = options.type===1?this.addCommentVOList.skus[0]:this.addCommentVOList
this.orderProductVO = params.type===1?this.addCommentVOList.skus[0]:this.addCommentVOList
this.productImage = this.orderProductVO.image
}else{
if(options.type == 1){

2
pages_category_page1/goodsModule/canvasGoods.vue

@ -195,7 +195,7 @@ export default {
}
}
if(params.ids || params.classifyId){
NET.request(API.getProducts, params, 'GET').then(res => {
NET.request(API.getProductsV2, params, 'GET').then(res => {
uni.hideLoading()
this.list = this.list.concat(res.data.list)
if (this.list.length === 0) {

9
pages_category_page1/goodsModule/combination.vue

@ -115,7 +115,6 @@ export default {
}
},
onLoad(option) {
console.log(option.priceId, 'priceId')
this.priceId = option.priceId
this.getSelectByPriceId() //
this.getSelectProductListByPriceId()
@ -200,7 +199,6 @@ export default {
// this.skuImg = res.data.image
this.skuPrice = res.data.price
this.skuOriginalPrice = res.data.originalPrice
// console.log(this.skuOriginalPrice,333)
this.stockNumber = res.data.stockNumber
this.detailList.ifHuabei = res.data.ifHuabei
//this.renderHuabei(this.skuPrice)
@ -211,10 +209,6 @@ export default {
//
colorActiveClick(res, index, resIndex) {
let t = this;
console.log(res,index,resIndex)
console.log(this.selectArr)
console.log(this.subIndex)
console.log(this.attrItemIdArr)
t.selectArr[index] = res;
t.subIndex[index] = resIndex;
t.attrItemIdArr[index] = res.valueCode
@ -258,7 +252,6 @@ export default {
}
}
}
//console.log(this.skuProdList, 'list')
},
checkItem() {
var self = this;
@ -284,7 +277,6 @@ export default {
},
//
numSub() {
console.log('this.buyNum', this.buyNum)
if (this.buyNum > 1) {
this.buyNum = this.buyNum - 1
} else {
@ -341,7 +333,6 @@ export default {
url: '../../pages/tabbar/cart/index'
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})

2
pages_category_page1/goodsModule/evaSuccessful.vue

@ -35,7 +35,7 @@ export default {
methods: {
goToOrder() {
uni.navigateTo({
url: '../orderModule/index?type=0'
url: '../orderModule/index?type='
})
},
goToHome() {

2
pages_category_page1/goodsModule/evaluate.vue

@ -22,7 +22,7 @@
<label style="width: 80upx;" v-else>非常好</label>
</view>
<view class="textarea-box mar-top-40 mar-left-20">
<textarea class="textarea-text" v-model="commentText" placeholder-style="color:#BBBBBB" placeholder="感谢您对宝贝的看法"/>
<textarea class="textarea-text" v-model="commentText" maxlength="200" placeholder-style="color:#BBBBBB" placeholder="感谢您对宝贝的看法"/>
</view>
<view class="mar-left-10 evaluateImg">
<u-upload :action="action" ref="uUpload" :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']" :header="headerToken" :form-data="formData"></u-upload>

3
pages_category_page1/goodsModule/evaluateDetails.vue

@ -108,11 +108,9 @@
},
commentImgData(imgData){
this.imageList = imgData.split(",");
console.log(this.imageList)
},
imgDataResultData(imgData){
this.imgDataResult = imgData.split(",");
console.log(this.imgDataResult)
},
//
zanTap(){
@ -169,7 +167,6 @@
imgsArray.push(this.imgDataResult[i]);
}
}
console.log(imgsArray, 'imgs')
uni.previewImage({
current: index,
urls: imgsArray,

1
pages_category_page1/goodsModule/evaluateList.vue

@ -63,7 +63,6 @@
},
onLoad(list) {
this.commentList = JSON.parse(list.commentList)
console.log(this.commentList, '1111')
this.commentListLength = this.commentList.length
},
methods: {

1
pages_category_page1/goodsModule/goodsDetails.vue

@ -775,7 +775,6 @@ export default {
shopId: storeId,
distributorId: salesId
}, 'POST').then(res => {
console.log('分销关系绑定成功!')
})
}
,

132
pages_category_page1/goodsModule/goodsList.vue

@ -1,16 +1,8 @@
<template>
<view class="container">
<global-loading />
<!-- 骨架屏 -->
<u-skeleton
el-color="#efefef"
bg-color="#fff"
:loading="loading && isFirstComeIn"
:animation="true"
></u-skeleton>
<!-- 商品列表 -->
<view class="flex-items-plus flex-row search">
<view class="searchBg u-skeleton-fillet">
<view class="searchBg">
<view class="searchImg-box flex-items-plus">
<image
class="searchImg"
@ -19,6 +11,7 @@
<input
class="search-box"
v-model="keyWord"
maxlength="20"
placeholder-class="searchboxPlace"
placeholder="请输入您想要的宝贝"
/>
@ -30,7 +23,7 @@
</view>
</view>
<view class="shop-list-nav">
<view class="mlr-20 u-skeleton-fillet">
<view class="mlr-20">
<view
class="nav-item-sort"
@click="sortTap(1)"
@ -82,9 +75,18 @@
</view>
</view>
</view>
</view>
<view class="listBox u-skeleton">
<!-- 骨架 -->
<GoodListSkeleton
v-if="loading && isFirstComeIn"
:loading="loading"
:isFirst="isFirstComeIn"
/>
<!-- 商品列表 -->
<view
class="listBox"
v-else
>
<view
v-for="(item, index) in list"
:key="index"
@ -96,10 +98,10 @@
<view class="itemBox">
<img
:src="item.image"
class="pic-img u-skeleton-fillet default-img"
class="pic-img default-img"
>
</view>
<view class="itemInfo u-skeleton-fillet">
<view class="itemInfo">
<p>{{ item.productName }}</p>
<view
class="number"
@ -163,34 +165,22 @@
</view>
</view>
<!-- 搜索为空 -->
<view
v-if="ifEmpty"
class="emptyCart-box flex-items-plus flex-column"
>
<image
class="emptyCart-img"
src="https://ceres.zkthink.com/static/images/searchEmpty.png"
></image>
<label class="font-color-999 fs26 mar-top-30">搜索不到你要找的宝贝呢</label>
<label class="font-color-999 fs26 mar-top-10">换个词试试吧</label>
</view>
<!-- 空状态 -->
<Empty :show="list.length<=0">
<view class="text_center font-color-999 fs26 mar-top-30">搜索不到你要找的宝贝呢</view>
<view class="text_center font-color-999 fs26 mar-top-10">换个词试试吧</view>
</Empty>
<view
class="reachBottom"
v-if="noMoreData && !ifEmpty"
>
<image
class="reach-icon"
src="https://ceres.zkthink.com/static/img/reachBottom.png"
mode="widthFix"
></image>
<text class="reach-text">这里到底了哦~~</text>
</view>
<!-- 底部状态 -->
<ListBottomTips v-if="!isFirstComeIn" :loading="loading" :type="total<=list.length && total!==0?0:1" />
</view>
</template>
<script>
import GoodListSkeleton from "@/pages_category_page1/goodsModule/Skeleton/GoodListSkeleton";
import Empty from "@/components/Empty";
import ListBottomTips from "@/components/ListBottomTips";
const NET = require('../../utils/request')
const API = require('../../config/api')
export default {
@ -203,18 +193,19 @@ export default {
page: 1,
pageSize: 20,
source: 2,
list: [{}, {}, {}, {}, {}, {}, {}, {}, {}],
loadingType: 0,
list: [],
sortIndex: 1,
ifNew: 0,//
type: 0,//
volume: 0,//
topLeft: 0,
ifEmpty: false,
noMoreData: false,
total: 0
}
},
components: {
GoodListSkeleton,
Empty,
ListBottomTips
},
onLoad(option) {
if (option.keyWord) {
this.keyWord = option.keyWord
@ -225,36 +216,18 @@ export default {
this.searchList(1)
},
onReachBottom() {
if (this.loadingType == 1) {
if (this.total <= this.list.length) {
uni.stopPullDownRefresh()
} else {
this.page = this.page + 1
this.searchList(0)
}
},
// onPageScroll(e) {
// this.topLeft = e.scrollTop
// },
methods: {
sortTap(index) {
this.loadingType = 0
this.noMoreData = false
this.total = 0
this.page = 1
this.list = [{}, {}, {}, {}, {}, {}, {}, {}, {}]
this.isFirstComeIn = true
// if(index == 1){
// this.type = 1
// this.volume = 1
// this.sortIndex = index
// }else if(index == 2){
// this.type = this.type != 1 ? 1:2
// this.sortIndex = index
// }else if(index == 3){
// this.volume = this.volume != 1 ? 1:2
// this.sortIndex = index
// }
console.log(index, 'index')
if (index === 1) {
this.type = 0
this.volume = 0
@ -263,10 +236,8 @@ export default {
if (this.type === 0) {
this.type = 1
} else {
console.log(this.type, 'this.type1')
this.type = this.type != 1 ? 1 : 2
}
console.log(this.type, 'this.type2')
} else if (index === 3) {
this.type = 0
if (this.volume === 0) {
@ -275,6 +246,8 @@ export default {
this.volume = this.volume != 1 ? 1 : 2
}
}
this.list = []
this.isFirstComeIn = true
this.sortIndex = index
this.searchList()
},
@ -282,13 +255,9 @@ export default {
this.keyWord = ''
},
searchList(type) {
// uni.showLoading({
// mask: true,
// title: '...',
// })
this.loading = true
if (type == 1) {
this.list = [{}, {}, {}, {}, {}, {}, {}, {}, {}]
this.list = []
this.isFirstComeIn = true
this.page = 1
}
@ -303,17 +272,9 @@ export default {
}, 'GET').then(res => {
uni.hideLoading()
this.list = this.list.concat(res.data.list)
this.list = this.list.filter(item=>JSON.stringify(item)!=='{}')
this.total = res.data.total
this.loading = false
this.isFirstComeIn = false
this.ifEmpty = this.list.length === 0
if (this.total === this.list.length) {
this.noMoreData = true
this.loadingType = 1
}
}).catch(res => {
uni.hideLoading()
})
} else {
NET.request(API.GgetSearchProducts, {
@ -327,15 +288,9 @@ export default {
this.loading = false
this.isFirstComeIn = false
this.list = this.list.concat(res.data.list)
this.list = this.list.filter(item=>JSON.stringify(item)!=='{}')
this.total = res.data.total
this.ifEmpty = this.list.length === 0
if (this.total === this.list.length) {
this.noMoreData = true
this.loadingType = 1
}
}).catch(res => {
uni.hideLoading()
this.loading = false
this.isFirstComeIn = false
})
}
},
@ -357,6 +312,9 @@ page {
background: #f8f8f8;
}
.text_center{
text-align: center;
}
//
.reachBottom {
margin-top: 30rpx;
@ -382,6 +340,7 @@ input {
.container {
height: 100%;
background: #f8f8f8;
position: relative;
.search {
padding: 20rpx;
@ -557,7 +516,8 @@ input {
.shop-list-nav {
background: #fff;
.mlr-20{
.mlr-20 {
margin: 0 20rpx;
display: flex;
flex-direction: row;

11
pages_category_page1/goodsModule/invitePoster.vue

@ -104,7 +104,6 @@ export default {
canvasId: 'posterCanvas', // ID
success: (res) => {
this.$hideLoading()
console.log(res.tempFilePath, 'test0000')
that.saveDownload(res.tempFilePath)
},
fail: () => {
@ -120,15 +119,11 @@ export default {
// #endif
// #ifdef MP-ALIPAY
const CanvasContext = my.createCanvasContext('posterCanvas');
console.log('kahu', CanvasContext)
CanvasContext.toTempFilePath({
success: (res) => {
console.log(2222)
console.log(res.apFilePath)
my.saveImage({
url: res.apFilePath,
success: res => {
console.log('saveImage', res)
// uni.hideLoading();
this.$hideLoading()
uni.showToast({
@ -170,7 +165,6 @@ export default {
url: res.tempFilePath,//
success: (res1) => {
this.$hideLoading()
console.log(res1)
if (res1.statusCode === 200) {
// uni.hideLoading();
uni.showModal({
@ -210,17 +204,13 @@ export default {
// title:"..."
// })
this.$showLoading()
console.log(file, 'test1')
uni.getImageInfo({
src: file,
success: (res1) => {
console.log(res1, 'test2')
// 2-
console.log(2222)
uni.saveImageToPhotosAlbum({ //
filePath: res1.path, //
success: (res2) => {
console.log(3333)
this.$hideLoading()
// uni.hideLoading();
uni.showToast({
@ -266,7 +256,6 @@ export default {
// #ifdef MP-WEIXIN
this.qrcode = res.data.xcxQrcode
// #endif
console.log(this.qrcode, 'this.qrcode')
this.getCanvas()
this.loadingQrcode = false
}).catch(res => {

2
pages_category_page1/goodsModule/inviteSpell.vue

@ -223,7 +223,6 @@
this.getInviteSpell()
},
onLoad(options) {
console.log(options,'options')
this.isIphone = getApp().globalData.isIphone;
let item = getApp().globalData.inviteSpellShareIte
if (item) {
@ -392,7 +391,6 @@
this.$refs.shareSpell.shareShow = false
},
goinvitePoster(){
console.log(this.inviteSpell, 'test')
let data = {
image:this.inviteSpell.image,
headImage:this.inviteSpell.headImage,

3
pages_category_page1/goodsModule/putQuestions.vue

@ -13,7 +13,7 @@
</view>
<view class="questionCent">
<view class="uni-textarea">
<textarea v-model="questionText" placeholder="请说出你的问题..." auto-height />
<textarea v-model="questionText" maxlength="200" placeholder="请说出你的问题..." auto-height />
</view>
<!-- <view class="anonymous">-->
<!-- <view class="flex-row-plus flex-items" @click="changeCheck">-->
@ -44,7 +44,6 @@
},
onLoad(params) {
this.qudata = this.$getJumpParam(params);
console.log(this.qudata)
},
methods: {
seeAllFn () {

1
pages_category_page1/goodsModule/qADetail.vue

@ -57,6 +57,7 @@
<input
class="uni-input"
v-model="answerText"
maxlength="200"
focus
placeholder="被邀请的用户才能回答"
/>

1
pages_category_page1/integral/exchangeDetail.vue

@ -117,7 +117,6 @@ export default {
onLoad(options) {
if (options.data) {
this.currentCoupon = JSON.parse(options.data)
console.log(this.currentCoupon)
this.getProductList()
}
},

1
pages_category_page1/integral/index.vue

@ -221,7 +221,6 @@ export default {
},
//
goExchangeDetail (item) {
console.log(item, 'test')
if (this.memberData.credit < item.credit) {
this.isConvertible = true
} else {

3
pages_category_page1/integral/sign.vue

@ -142,10 +142,8 @@ export default {
//
if (that.currentMonth === selectMonth) {
console.log('currentMoth === selectMonth', that.currentMonth === selectMonth)
that.continuousNum = that.signList[that.signList.length - 1].continueDay || 0;
that.lastDay = that.signList[that.signList.length - 1].createTime.substring(0,10);
console.log('this.lastDay', that.lastDay)
}
//
@ -171,7 +169,6 @@ export default {
}).catch(res => {})
},
signDate(event) {
console.log(event);
},
//
signInFn() {

2
pages_category_page1/memberCenter/activityList.vue

@ -97,7 +97,6 @@ export default {
}
},
onPageScroll(res) {
console.log(res,'ssssssssss')
let scrollTop = res.scrollTop //
let offsetTop = this.boxFixedTop //
this.isFixed = scrollTop > offsetTop ? true : false; // this.isFixedtrue
@ -105,7 +104,6 @@ export default {
onReady(){
const query = uni.createSelectorQuery().in(this);
query.select('#boxFixed').boundingClientRect(data => {
console.log(data,'boxFixed')
this.boxFixedTop = data.top
}).exec()
},

3
pages_category_page1/memberCenter/index.vue

@ -182,15 +182,12 @@ export default {
},
methods: {
swiperChange(item) {
console.log(item.detail.current, 'index')
this.activeIndex = item.detail.current
console.log(typeof this.activeIndex, typeof (this.memberListData.length - 1))
let num = 0
num = this.activeIndex + 1
if (num === this.memberListData.length) {
this.nextGrowth = this.memberListData[this.activeIndex].growth
} else {
console.log('caonima ')
this.nextGrowth = this.memberListData[this.activeIndex + 1].growth
}
this.equityList = this.memberListData[this.activeIndex].membershipList

1
pages_category_page1/memberCenter/memberSign.vue

@ -175,7 +175,6 @@
1)
const date = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
this.currentData = year + '-' + month + '-' + date
console.log(this.currentData, 'currentDate')
}
}
}

2
pages_category_page1/orderModule/Intervene.vue

@ -7,7 +7,7 @@
<view class="addEvaluate flex-column-plus">
<view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>问题描述</view>
<view class="textarea-box mar-top-20 mar-left-20">
<textarea class="textarea-text" v-model="commentText" placeholder-style="color:#BBBBBB" placeholder="填写相关问题"/>
<textarea class="textarea-text" v-model="commentText" maxlength="200" placeholder-style="color:#BBBBBB" placeholder="填写相关问题"/>
</view>
<view class="fs26 mar-top-40 mar-left-20 addEvaluateText"><label>*</label>举证照片</view>
<view class="mar-left-10 mar-top-10 evaluateImg">

4
pages_category_page1/orderModule/addLogistics.vue

@ -16,7 +16,7 @@
<view class="item item-start">
<view class="l">物流编号</view>
<view class="r-box r-box2">
<input v-model="SendReturnQuery.logisticsNum" type="text" placeholder-class="fs28" placeholder="请填写" class="r-box-input"></input>
<input v-model="SendReturnQuery.logisticsNum" maxlength="20" type="text" placeholder-class="fs28" placeholder="请填写" class="r-box-input"></input>
</view>
</view>
</view>
@ -24,7 +24,7 @@
<view class="item item-start">
<view class="l">退款说明</view>
<view class="r-box r-box2">
<input v-model="SendReturnQuery.returnGoodsDesc" type="text" placeholder-class="fs28" placeholder="选填" class="r-box-input"></input>
<input v-model="SendReturnQuery.returnGoodsDesc" maxlength="200" type="text" placeholder-class="fs28" placeholder="选填" class="r-box-input"></input>
</view>
</view>
</view>

12
pages_category_page1/orderModule/afterSaleApplyRefund.vue

@ -116,6 +116,7 @@
<view class="r-box r-box2">
<input
v-model="ReturnMoneyQuery.returnDesc"
maxlength="200"
type="text"
placeholder="选填"
class="r-box-input"
@ -360,17 +361,14 @@ export default {
this.fileList = this.$refs.uUpload.lists
},
async onLoad(options) {
console.log(options, 'options')
if (uni.getStorageSync('applyItem')) {
this.afterRefund = uni.getStorageSync('applyItem')
this.list.push(this.afterRefund)
} else if (uni.getStorageSync('afterSaleApplyRefund')) {
this.list = uni.getStorageSync('afterSaleApplyRefund')
}
console.log(this.list, 'this.list')
this.orderId = parseInt(options.orderId)
this.isAllSelect = options.isAllSelect
console.log(this.isAllSelect, 'this.isAllSelect')
const res = uni.getStorageSync('storage_key');
this.headerToken.Authorization = res.token
this.list.forEach(el => {
@ -413,7 +411,6 @@ export default {
confirmTap() {
console.log(this.fileList, 'commentImgs')
if (this.fileList.length > 0) {
this.commentImgsFlag = true
for (let i = 0; i < this.fileList.length; i++) {
@ -447,7 +444,6 @@ export default {
// title: '...',
// })
let skusobjdata = []
console.log(this.list)
this.list.forEach((i) => {
let skusobj = {}
skusobj["skuId"] = i.skuId
@ -475,10 +471,10 @@ export default {
title: '提交成功'
})
setTimeout(() => {
uni.navigateTo({
url: '../../pages_category_page2/orderModule/afterSale'
uni.redirectTo({
url:'/pages_category_page2/orderModule/afterSale'
})
}, 2000)
}, 1500)
}).catch(res => {
uni.showToast({
title: '商品已在售后,请勿重新操作!',

11
pages_category_page1/orderModule/afterSaleApplyRetund.vue

@ -70,6 +70,7 @@
<view class="l">退款说明</view>
<view class="r-box r-box2">
<input v-model="ReturnMoneyQuery.returnDesc"
maxlength="200"
type="text"
placeholder="选填"
class="r-box-input"></input>
@ -229,11 +230,9 @@ export default {
},
async onLoad(option) {
this.retundlist = JSON.parse(decodeURIComponent(option.list))
console.log(option,'this.retundlist')
this.orderId = option.orderId
this.isAllSelect = option.isAllSelect
// console.log(this.retundlist, 'retundlist')
this.retundlist.forEach(el => {
this.sellPriceitem = this.sellPriceitem + el.number * el.price
})
@ -318,9 +317,11 @@ export default {
uni.showToast({
title: '提交成功'
})
uni.navigateTo({
url: '../../pages_category_page2/orderModule/afterSale'
})
setTimeout(() => {
uni.redirectTo({
url:'/pages_category_page2/orderModule/afterSale'
})
}, 1500)
}).catch(res => {
uni.showToast({
title: '商品已在售后,请勿重新操作!',

42
pages_category_page1/orderModule/index.vue

@ -63,8 +63,8 @@
class="product-img default-img"
/>
<view class="info-box">
<text class="product-name">{{ skuItem.productName }}</text>
<view class="product-sku">{{ skuItem.value }}</view>
<text class="product-name">{{ skuItem.productName&&skuItem.productName }}</text>
<view class="product-sku">{{ skuItem.value&&skuItem.value }}</view>
<view class="price-sku-box">
<view class="box-h flex-items-plus">
<text class="product-price">
@ -72,9 +72,9 @@
class="fuhao"
>
</text>
{{ skuItem.price }}
{{ skuItem.price && skuItem.price }}
</text>
<text class="product-num">x {{ skuItem.number }}</text>
<text class="product-num">x {{ skuItem.number&&skuItem.number }}</text>
</view>
<view
v-if="skuItem.commentId === 0 && orderItem.state === 4"
@ -91,13 +91,16 @@
</view>
</view>
</view>
<view class="total-price-box">
总价¥{{
(orderItem.orderPrice + orderItem.logisticsPrice).toFixed(2)
}},优惠¥{{ orderItem.discountPrice }}
<span v-if="orderItem.price > 0">
<view class="total-price-box" >
<template v-if="orderItem.orderPrice!==undefined || orderItem.discountPrice!==undefined">
总价¥{{
(orderItem.orderPrice + orderItem.logisticsPrice).toFixed(2)
}},优惠¥{{ orderItem.discountPrice }}
<span v-if="orderItem.price > 0">
{{ orderItem.state === 1 ? '应付¥' : '实付¥' }}{{ orderItem.price }}
</span>
</template>
</view>
</view>
<view
@ -174,7 +177,7 @@ export default {
},
data() {
return {
loading: false,
loading: true,
orderState: '',// params
page: 1,
pageSize: 20,
@ -200,15 +203,21 @@ export default {
}
},
onShow() {
// #ifdef H5
const pageList = getCurrentPages();//
const {options} = pageList[pageList.length - 1];//
if (options.type) {
this.tabCurrentType = options.type
this.orderState = options.type
}else{
this.orderState = ''
}
if(Number(options.isJumpBack)===1){
setTimeout(()=>{
this.handleRefreshList()
},2000)
}else{
this.handleRefreshList()
}
// #endif
this.handleRefreshList()
},
onReachBottom() {
++this.page
@ -280,7 +289,7 @@ export default {
*/
getOrderStatusLabel(state, returnType = 0) {
if (returnType) return '退款中'
return orderTypeEnum[state]
return orderTypeEnum[state] || ''
},
/**
@ -548,7 +557,6 @@ export default {
*/
async handleGoPay() {
const {payObj} = this
console.log('支付', payObj.payInfo)
await handleDoPay(this.payObj.payInfo)
payObj.showPayPopup = false
payObj.totalPrice = 0
@ -688,15 +696,15 @@ export default {
/**
* 立即评价
* @param type
* @param skuItem
* @param orderId
*/
goEvaluate(type, skuItem, orderId) {
goEvaluate( skuItem, orderId) {
const params = {
commentData: skuItem,
orderId
}
console.log(params)
this.$jump('../goodsModule/evaluate', params)
},

10
pages_category_page1/orderModule/orderConfirm.vue

@ -488,7 +488,6 @@ export default {
},
onLoad(options) {
this.getQuery()
console.log(options, 'options')
this.type = options.type
if (options.receiveId) {
this.receiveId = options.receiveId
@ -500,7 +499,6 @@ export default {
}
if (uni.getStorageSync("skuItemDTOList") != "") {
this.skuItemDTOList = uni.getStorageSync('skuItemDTOList')
console.log(this.skuItemDTOList, '66666')
if (this.skuItemDTOList[0].shopDiscountId > 0) {
this.sumitType = 4
} else if (this.skuItemDTOList[0].shopSeckillId > 0) {
@ -509,7 +507,6 @@ export default {
this.getSettlement(false)
} else if (uni.getStorageSync("skuItemList") != "") {
this.skuItemList = uni.getStorageSync("skuItemList")
//console.log(this.skuItemList, 999)
this.shopGroupWorkId = this.skuItemList.shopGroupWorkId
this.sumitType = this.skuItemList.type
this.collageId = this.skuItemList.collageId
@ -538,7 +535,6 @@ export default {
}, 'GET').then(res => {
this.integralRatio = parseFloat(res.data.dictDescribe)
}).catch(res => {
console.log('平台端未配置积分兑换比例(1积分抵扣多少金额)')
})
},
//
@ -581,7 +577,6 @@ export default {
receiveId: this.receiveId
}
// composeId: 68
console.log(this.skuItemDTOList, 'this.skuItemDTOList')
}
NET.request(_url, _data, 'POST').then(res => {
uni.hideLoading()
@ -614,7 +609,7 @@ export default {
this.settlement.shops.forEach((item) => {
item.totalAfterDiscount = item.total
})
//
// --TODO pxh
for (let s = 0; s < shopLen; s++) {
const curShop = this.settlement.shops[s]
curShop.skus.forEach((item) => {
@ -780,7 +775,6 @@ export default {
},
//
shopCouponItemTap(index, coupon) {
console.log(index,coupon.checked)
//
if (coupon.checked) {
coupon.checked = false
@ -825,7 +819,6 @@ export default {
this.isShopCoupons = false
let useCoupon = this.useShopCoupon(this.shopIndex, index)
console.log(useCoupon)
if (useCoupon) {
// 使
for (let i = 0; i < this.selectShopCoupon.length; i++) {
@ -955,7 +948,6 @@ export default {
this.integralNum = 0
let shopSumPrice = 0
let shopsLen = this.settlement.shops.length
console.log(this.settlement, 'fsfsfs')
for (let i = 0; i < shopsLen; i++) {
this.totalPrice += parseFloat(this.settlement.shops[i].totalAfterDiscount)
shopSumPrice += parseFloat(this.settlement.shops[i].totalAfterDiscount)

8
pages_category_page1/orderModule/orderDetails.vue

@ -709,7 +709,6 @@
if (res.confirm) {
this.doDel()
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
@ -744,7 +743,6 @@
},
//退
applayItemTap(proItem) {
console.log(this.dataList.skus.length, 'dataList99999')
if (this.dataList.skus.length > 1) {
this.isAllSelect = 0
}
@ -782,7 +780,6 @@
if (res.confirm) {
this.doCancel()
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
@ -835,10 +832,8 @@
this.dataList.skus.map(item => {
if (item.afterState) {
this.isAllSelect = 0
console.log('要拆单')
}
})
console.log(this.isAllSelect, 'this.isAllSelect')
if (this.orderRefundList.length === 0) {
uni.showToast({
title: '您所有商品已经申请退款,请勿重复申请',
@ -862,7 +857,6 @@
if (res.confirm) {
this.confirmReceiveGooods()
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
@ -904,13 +898,11 @@
let isAllSelect = 1
let newArr = JSON.parse(JSON.stringify(productData))
newArr.skus.map((item, index) => {
console.log("item----", item)
if (item.afterState) {
newArr.skus.splice(index, 1)
isAllSelect = 0
}
})
console.log(isAllSelect, '00000000000')
uni.navigateTo({
url: 'afterSaleApply?item=' + JSON.stringify(newArr) + '&isAllSelect=' + isAllSelect
})

2
pages_category_page1/orderModule/platformJoin.vue

@ -8,7 +8,7 @@
<view class="item item-start">
<view class="l"><text class="font-color-C5AA7B">*</text>问题描述</view>
</view>
<textarea v-model="reason" class="text-area" placeholder="填写相关问题" placeholder-style="color:#bbb;" bindinput="proofRemarkInput"></textarea>
<textarea v-model="reason" maxlength="200" class="text-area" placeholder="填写相关问题" placeholder-style="color:#bbb;" bindinput="proofRemarkInput"></textarea>
</view>
<view class="afterSale-select-box mt20">

4
pages_category_page1/search/index/index.vue

@ -5,7 +5,7 @@
<view class="flex-items-plus flex-row mar-top-20">
<view class="searchImg-box flex-items-plus">
<image class="searchImg" src="https://ceres.zkthink.com/static/img/searchImg.png"></image>
<input class="search-box" v-model="keyWord" placeholder-class="searchboxPlace"
<input class="search-box" v-model="keyWord" maxlength="20" placeholder-class="searchboxPlace"
placeholder="请输入您想要的宝贝" />
<!-- <image class="searchClose-icon" @click="searchTextDel"
src="https://ceres.zkthink.com/static/img/index/searchClose_icon.png"></image>-->
@ -131,7 +131,6 @@
if (res.confirm) {
this.deleteAllSearch()
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
@ -157,7 +156,6 @@
this.findSearchHistory()
}).catch(res => {})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})

3
pages_category_page1/store/index.vue

@ -212,7 +212,6 @@
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.topHeight = menuButtonInfo.top
console.log(this.topHeight, menuButtonInfo.top, 'fsfsfsfs')
// #endif
// #ifdef APP
this.topHeight = 50
@ -302,7 +301,6 @@
this.page = this.page
}
this.storeInfo = res.data;
console.log(this.storeInfo, '测试')
this.total = res.data.page.total
this.storeInfolist = this.storeInfolist.concat(res.data.page.list)
}).catch(res => {
@ -572,7 +570,6 @@
}
this.isLoading = false
}).catch(err => {
console.log(err)
this.isLoading = false
})
} else {

1
pages_category_page2/channelCoupon/index.vue

@ -101,7 +101,6 @@ export default {
}
},
onLoad(options) {
console.log(options,'options')
this.params.productId = options.productId
this.params.shopCouponId = options.shopCouponId
this.params.shopId = options.shopId

4
pages_category_page2/livePage/components/liveBox.vue

@ -141,7 +141,6 @@ export default {
_this.liveStatus = res.liveStatus
})
.catch(err => {
console.log('get live status', err)
})
this.timer = setInterval(() => {
livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
@ -149,10 +148,8 @@ export default {
// 101: , 102: , 103: , 104: , 105: , 106: 107
_this.liveStatus = res.liveStatus
this.countTime()
console.log('get live status', res.liveStatus)
})
.catch(err => {
console.log('get live status', err)
})
}, 60000)
// #endif
@ -221,7 +218,6 @@ export default {
}
})
.catch(err => {
console.log(err)
uni.showToast({
title: res.message || '订阅失败,请稍后再试!',
icon: "none"

1
pages_category_page2/livePage/index.vue

@ -57,7 +57,6 @@ export default {
}
this.isLoading = false
}).catch(err => {
console.log(err)
this.isLoading = false
})
},

2
pages_category_page2/orderModule/afterSale.vue

@ -131,7 +131,6 @@
},
onBackPress(e) {
if (e.from === 'navigateBack') {
console.log(1)
return false;
}
this.back();
@ -157,7 +156,6 @@
})
},
back(){
console.log(2)
uni.switchTab({
url:'../../pages/tabbar/user/index'
});

2
pages_category_page2/orderModule/returnDetails.vue

@ -199,7 +199,7 @@
close-icon-size="20">
<view class="interventionBox">
<view class="intTit">申请平台介入</view>
<textarea class="textarea-text" v-model="reason" placeholder-style="color:#BBBBBB" placeholder="请输入介入原因"/>
<textarea class="textarea-text" v-model="reason" maxlength="200" placeholder-style="color:#BBBBBB" placeholder="请输入介入原因"/>
<view class="btnBox">
<button @click="interventionFn" class="primary">确定</button>
<button @click="closeInterventionFn">取消</button>

3
pages_category_page2/userModule/accountLogin.vue

@ -149,7 +149,6 @@ export default {
text: cartNum.toString()
})
}
console.log(cartNum)
uni.setStorageSync('allCartNum', cartNum)
})
if (this.inviteSpelltype == true) {
@ -167,7 +166,6 @@ export default {
'pages_category_page2/userModule/accountLogin' &&
that.beforePage.route !== 'pages_category_page2/userModule/login' &&
that.beforePage.route !== 'pages_category_page2/userModule/register') {
console.log(19)
uni.navigateBack({
delta: 1
})
@ -187,7 +185,6 @@ export default {
}
}
}).catch(res => {
console.log('Login failed')
console.dir(res)
uni.hideLoading()
uni.showToast({

7
pages_category_page2/userModule/addAddress.vue

@ -11,10 +11,10 @@
<!-- #endif -->
<view class="addressBack-box">
<view class="consignee-box bor-line-F7F7F7">
<input v-model="addressData.username" class="fs28" placeholder-class="consignee" placeholder="收货人" />
<input v-model="addressData.username" maxlength="20" class="fs28" placeholder-class="consignee" placeholder="收货人" />
</view>
<view class="iphoneNum-box bor-line-F7F7F7">
<input type="number" v-model="addressData.phone" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
<input type="number" v-model="addressData.phone" maxlength="11" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
</view>
<view @click="locationClick" class="location-box bor-line-F7F7F7 flex-row-plus flex-sp-between flex-items">
<view class="fs28 location">所在地</view>
@ -26,7 +26,7 @@
</view>
</view>
<view class="detailAddress-box">
<input class="fs28" v-model="addressData.address" placeholder-class="detailAddress" placeholder="详细地址:如道路、门牌号、小区、楼栋号、单元等" />
<input class="fs28" v-model="addressData.address" maxlength="60" placeholder-class="detailAddress" placeholder="详细地址:如道路、门牌号、小区、楼栋号、单元等" />
</view>
</view>
<view class="addressTagBack-box">
@ -118,7 +118,6 @@ const API = require('../../config/api')
},
onLoad(options) {
this.type = options.type
console.log(this.type,'this.type')
if(options.ordertype == 1){
this.ordertype = 1
}

10
pages_category_page2/userModule/addBankcard.vue

@ -2,16 +2,16 @@
<view class="container flex-center flex-column">
<view class="addressBack-box">
<view class="consignee-box bor-line-F7F7F7">
<input v-model="username" class="fs28" placeholder-class="consignee" placeholder="姓名" />
<input v-model="username" maxlength="20" class="fs28" placeholder-class="consignee" placeholder="姓名" />
</view>
<view class="iphoneNum-box bor-line-F7F7F7">
<input type="number" v-model="phone" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
<input type="number" v-model="phone" maxlength="11" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
</view>
<view class="consignee-box bor-line-F7F7F7">
<input v-model="bankName" class="fs28" placeholder-class="consignee" placeholder="银行名称" />
<input v-model="bankName" maxlength="20" class="fs28" placeholder-class="consignee" placeholder="银行名称" />
</view>
<view class="cardnum">
<input type="number" class="fs28" v-model="cardNum" placeholder-class="detailAddress" placeholder="卡号" />
<input type="number" class="fs28" v-model="cardNum" maxlength="20" placeholder-class="detailAddress" placeholder="卡号" />
</view>
</view>
<view class="deleteBankcard-box" v-if="type == 2">
@ -57,7 +57,6 @@
this.renderBankcard(this.bankcardId)
uni.removeStorageSync('bankcardId')
}
console.log(this.type, 'type')
},
onShow() {
@ -106,7 +105,6 @@
})
let phoneCodeVerification = /^[1][3-9][0-9]{9}$/;
const method = this.type == 1 ? 'POST' : 'PUT';
console.log(this.cardNum.length,333)
if (this.username == '') {
uni.showToast({
title: '请输入姓名!',

6
pages_category_page2/userModule/address.vue

@ -87,7 +87,6 @@
},
methods: {
back() {
console.log(this.type,'type')
if (this.type == 1 || this.type == 2 ) {
uni.navigateTo({
url: '../../pages_category_page1/orderModule/orderConfirm?type=' + this.type
@ -120,7 +119,6 @@
pageSize: this.pageSize
}, "GET").then(res => {
this.addresList = res.data
console.log(this.addresList,'this.addresList')
if (res.data.list.length == 0) {
this.loadingType = 1
this.page = this.page
@ -132,10 +130,8 @@
this.addresListlist.forEach((item) => {
item.receivePhone = hidden(item.receivePhone, 3, 4)
})
console.log(this.addresListlist.length,'this.addresListlist')
uni.hideLoading();
}).catch(err => {
console.log(err)
uni.hideLoading();
})
},
@ -159,7 +155,6 @@
let self = this
uni.chooseAddress({
success(res) {
console.log(res, 'fsfsdfs')
self.addData['username'] = res.userName
self.addData['phone'] = res.telNumber
self.addData['ssqText'] = `${res.provinceName}-${res.cityName}-${res.countyName}`
@ -180,7 +175,6 @@
}, 500);
},
fail:(res)=>{
console.log('err---选择地址',res)
}
})
}

12
pages_category_page2/userModule/bindPhone.vue

@ -22,7 +22,7 @@
<image class="loginIcon" src="https://ceres.zkthink.com/static/images/phone.png"></image>
</view>
<view>
<input v-model="phone" placeholder-class="iphoneNum-input" type="number" placeholder="请输入您的手机号" />
<input v-model="phone" maxlength="11" placeholder-class="iphoneNum-input" type="number" placeholder="请输入您的手机号" />
</view>
</view>
<view class="flex-row-plus mar-top-20">
@ -31,7 +31,7 @@
<image class="loginIcon" src="https://ceres.zkthink.com/static/images/code.png"></image>
</view>
<view>
<input v-model="code" placeholder-class="codeNum-input" placeholder="请输入验证码" />
<input v-model="code" maxlength="6" placeholder-class="codeNum-input" placeholder="请输入验证码" />
</view>
</view>
<view :class="disabled === true ? 'on' : ''" :disabled="disabled" class="getcode" @click="codede">{{text}}
@ -155,7 +155,6 @@
},
fail: (res) => {
this.$hideLoading()
console.log('getPhoneNumber failed', res);
uni.hideLoading()
uni.showToast({
title: '验证失败',
@ -165,11 +164,9 @@
});
},
onAuthError() {
console.log('onAuthError')
},
getPhoneNumber(e) {
if (e.detail.errMsg === "getPhoneNumber:ok") {
console.log(e)
uni.login({
provider: 'weixin',
success: (res) => {
@ -185,12 +182,10 @@
}, 'POST').then(res2 => {
const item = res2.data
uni.setStorageSync('storage_key', item);
console.log(uni.getStorageSync('storage_key'))
this.bindSalesCustomer()
this.gotoHome()
}).catch(res => {})
}).catch(err => {
console.log(err, 22222)
})
},
fail: () => {
@ -235,7 +230,6 @@
'buyerUserId': this.buyerUserId,
'encrypted': encrypted
}, 'POST').then(res => {
console.log('UpdateAliPhone res: ', res)
const item = res.data
uni.setStorageSync('storage_key', item);
this.bindSalesCustomer()
@ -255,7 +249,6 @@
const salesId = uni.getStorageSync('salesId')
if (shopId && salesId) {
//
console.log('bindPhone bindSalesCustomer')
NET.request(API.BindSalesCustomer, {
shopId: shopId,
distributorId: salesId
@ -263,7 +256,6 @@
uni.removeStorageSync('salesId');
uni.removeStorageSync('shopId');
}).catch(res => {
console.log('bindPhone bindSalesCustomer error')
console.dir(res)
})
}

4
pages_category_page2/userModule/collection.vue

@ -313,7 +313,6 @@
this.cancelCollect(this.ids)
this.storeCollect.splice(this.currentIndex, 1);
} else {
console.log('删除')
let ids = []
this.storeCollect.forEach((value, index) => {
if (value.selected == 1) {
@ -387,7 +386,6 @@
},
//
productActionClick() {
console.log('打开')
this.cardModal = true
this.paoductDelSubmit = true
this.shopDelSubmit = false
@ -464,7 +462,6 @@
if(shopActionSwipe){
shopActionSwipe.forEach(item=>item.close())
}
console.log(shopActionSwipe)
},
finishClick() {
this.allCheckShow = false
@ -487,7 +484,6 @@
this.productPage = this.productPage
} else {
this.productCollect = this.productCollect.concat(res.data.list)
console.log(this.productCollect, 222)
this.productCollect.forEach((value, index) => {
value['show'] = false

1
pages_category_page2/userModule/footprintList.vue

@ -272,7 +272,6 @@
},
//
open(index,findex) {
console.log('打开')
this.footprintList[findex].products[index].show = true;
this.footprintList[findex].products.map((val, idx) => {
if(index != idx) this.footprintList[findex].products[idx].show = false;

3
pages_category_page2/userModule/login.vue

@ -148,7 +148,6 @@
}
that.loginSuc(res.data, data)
}).catch(err => {
console.log('wxLogin failed', err)
})
},
fail: function(err) {
@ -203,7 +202,6 @@
'buyerUserId': res.data.buyerUserId
})
}).catch(err => {
console.log('alipayLogin failed', err)
})
},
goToHome() {
@ -272,7 +270,6 @@
uni.removeStorageSync('salesId');
uni.removeStorageSync('shopId');
}).catch(err => {
console.log('login bindSalesCustomer error')
console.dir(err)
})
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save