This commit is contained in:
THK3121 2023-09-13 14:20:07 +08:00
commit 3cf3fdbc99
88 changed files with 6966 additions and 2442 deletions

98
App.vue
View File

@ -76,6 +76,15 @@
onLaunch: function(option) { onLaunch: function(option) {
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid; this.globalData.uid = this.$store.state.app.uid;
let appkey = uni.getStorage({
key: 'launchFlag'
})
if (appkey) {
setTimeout(() => {
this.$store.dispatch('INIT_CONFIG');
}, 6000)
}
// #ifdef APP-PLUS // #ifdef APP-PLUS
//uni //uni
@ -202,8 +211,11 @@
}, },
onShow() { onShow() {
let that = this let that = this
// H5 // H5
if (this.$store.state.app.token) { if (this.$store.state.app.token) {
@ -232,20 +244,74 @@
// #endif // #endif
}, },
mounted() { mounted() {
uni.onTabBarMidButtonTap((e) => {
// console.log("", e);
uni.switchTab({
url: '/pages/plant_release/index'
})
// uni.navigateTo({
// url: '/pages/plant_release/index'
// })
});
uni.setTabBarItem((e) => { console.log("点击了", e)});
}, },
methods: { methods: {
//
checknetwork() {
uni.onNetworkStatusChange(function(res) {
if (res.isConnected) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
uni.showModal({
title: '系统提示',
content: '当前设备无网络或网络较差',
cancelText: '取消',
confirmText: '确定',
success: (res) => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
// #ifdef H5
uni.navigateTo({
url: '/pages/users/login/login_copy'
})
// #endif
// #ifdef APP-PLUS
plus.runtime.quit()
// #endif
}
}
})
}
})
},
/** /**
* 语音播报 * 语音播报
* *
@ -396,9 +462,17 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: -40rpx; margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3); // box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
} }
.custom_style-txt {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
}
} }
.bg-color-red { .bg-color-red {

View File

@ -24,6 +24,7 @@ export function getWechatConfig() {
); );
} }
/** /**
* 获取微信sdk配置 * 获取微信sdk配置
* @returns {*} * @returns {*}

View File

@ -7,4 +7,50 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/request.js";
//发布委托商品选择 供应链商家接口
export function supplychain(data) {
return request.get("community/supplychain/list", data);
}
//普通商家发布委托商品
export function entrustchain(data) {
return request.post("community/entrust", data);
}
//获取委托商品列表
export function entrustlist(data) {
return request.get("community/entrust/list", data);
}
//供应链商家是否同意委托
export function checkchain(id,data) {
return request.post("community/entrust/check/"+id, data);
}
//供应链商家申请结束委托
export function finishchain(id,data) {
return request.post("community/entrust/apply/finish/"+id, data);
}
//商家申请结束委托
export function finishentrust(id,data) {
return request.post("community/entrust/finish/"+id, data);
}
//委托商品加入购物车
export function addEntrustCart(data) {
return request.post("community/entrust/addEntrustCart", data);
}
//获取委托商品详情
export function entrustdetail(id) {
return request.get("community/entrust/"+id);
}
//编辑委托商品详情
export function editentrust(id,data) {
return request.post("community/entrust/edit/"+id, data);
}

View File

@ -9,6 +9,14 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/request.js";
import Cache from '@/utils/cache' import Cache from '@/utils/cache'
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
}
/** /**
* 提交提现 * 提交提现
*/ */

View File

@ -2,13 +2,12 @@
<view :class="'wf-page wf-page'+type"> <view :class="'wf-page wf-page'+type">
<!-- left --> <!-- left -->
<view> <view>
<view id="left" v-if="leftList.length"> <view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index" <view v-for="(item,index) in leftList" :key="index"
class="wf-itema" @tap="itemTap(item)"> class="wf-itema" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/> <WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="251" :type="type" @goShop="goShop"/>
</view> </view>
</view> </view>
</view> </view>
@ -17,7 +16,7 @@
<view id="right" v-if="rightList.length"> <view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index" <view v-for="(item,index) in rightList" :key="index"
class="wf-itemb" @tap="itemTap(item)"> class="wf-itemb" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/> <WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="336" :type="type" @goShop="goShop"/>
</view> </view>
</view> </view>
</view> </view>
@ -26,7 +25,7 @@
<script> <script>
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue' import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue'
export default { export default {
components: { components: {
WaterfallsFlowItem WaterfallsFlowItem
@ -57,6 +56,7 @@ export default {
rightList: [], // rightList: [], //
mark: 0, // mark: 0, //
boxHeight: [], // 01 boxHeight: [], // 01
}; };
}, },
watch: { watch: {
@ -107,10 +107,7 @@ export default {
immediate: true, immediate: true,
deep:true deep:true
}, },
mounted(){
this.getUserInfo()
},
// item // item
mark() { mark() {
const len = this.allList.length; const len = this.allList.length;
@ -119,9 +116,10 @@ export default {
} }
} }
}, },
methods: { methods: {
// //
waterFall() { waterFall() {
const i = this.mark; const i = this.mark;
@ -170,7 +168,7 @@ export default {
}, },
// item // item
itemTap(item) { itemTap(item) {
// this.$emit('itemTap', item) this.$emit('itemTap', item)
}, },
// item // item
goShop(item) { goShop(item) {

View File

@ -80,7 +80,7 @@ export default {
require: true require: true
}, },
type: { type: {
type: Number, type: Number|String,
default: 0 default: 0
}, },
isStore: { isStore: {

View File

@ -1,7 +1,11 @@
<template> <template>
<view class="wf-item-page" @click="gogogo(item)"> <view class="wf-item-page" @click="gogogo(item)">
<image :src="item.image" mode="widthFix" class="item-img" /> <view class='pictrue'>
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="title">{{item.store_name}}</view> <view class="title">{{item.store_name}}</view>
<!-- <view class="tag"> <!-- <view class="tag">
@ -65,25 +69,33 @@
} }
.item-img { .pictrue {
width: 100%; width: 100% !important;
height: 345rpx;
image {
width: 100%;
height: 345rpx;
}
} }
.item-info {} .item-info {}
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC; font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
margin: 12px 0; margin: 12px 0;
padding-right: 12rpx;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-left: 21rpx; margin-left: 21rpx;
} }
@ -136,6 +148,7 @@
margin-top: 12rpx; margin-top: 12rpx;
height: 26rpx; height: 26rpx;
line-height: 26rpx; line-height: 26rpx;
.relase-one { .relase-one {
// font-style: italic; // font-style: italic;
transform: skewX(-15deg); transform: skewX(-15deg);
@ -143,7 +156,7 @@
font-family: SF Pro Display-Regular Italic, SF Pro Display; font-family: SF Pro Display-Regular Italic, SF Pro Display;
font-weight: 600; font-weight: 600;
color: #FF6D20; color: #FF6D20;
} }
.relase-two { .relase-two {

View File

@ -1,8 +1,10 @@
<template> <template>
<view class="wf-item-page" @click="gogogo(item)"> <view class="wf-item-page">
<view class='pictrue'>
<image :src="item.image[0]" mode="widthFix" class="item-img" /> <!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image[0]" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="goods_item_img" v-if="item.video_link.length>0"> <view class="goods_item_img" v-if="item.video_link.length>0">
<image src="@/static/images/sp.png" mode="aspectFit"></image> <image src="@/static/images/sp.png" mode="aspectFit"></image>
</view> </view>
@ -17,54 +19,32 @@
<script> <script>
import { import {
getUserInfo string
} from '@/api/user.js'; } from '../../plugin/clipboard/clipboard'
export default { export default {
props: { props: {
item: { item: {
type: Object, type: Object,
require: true require: true
},
heightx: {
type: string,
require: true
} }
}, },
data() { data() {
return { return {
user_id: ''
} }
}, },
mounted() {
this.getUserInfo()
},
methods: { methods: {
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
this.user_id = res.data.uid
});
},
gogogo(item) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
// #endif
})
} else {
uni.navigateTo({
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
})
}
},
} }
@ -80,10 +60,17 @@
position: relative; position: relative;
} }
.item-img { .pictrue {
width: 100%; width: 100% !important;
height: 345rpx;
image{
width: 100% ;
height: 345rpx;
}
} }
.item-info { .item-info {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -5,7 +5,7 @@
<block v-for="(item,index) in imgUrls" :key='index'> <block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item> <swiper-item>
<image :src="item" class="slide-image" /> <image :src="item" class="slide-image" mode="aspectFit" />
<!-- <view class="stop" v-if="isType == 2"> <!-- <view class="stop" v-if="isType == 2">
<image class="image" src="/static/images/stop.png"></image> <image class="image" src="/static/images/stop.png"></image>
</view> --> </view> -->

View File

@ -9,7 +9,7 @@
</view> </view>
<view class="iconclose" @click="close"> <view class="iconclose" @click="close">
X <image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
<view class="main"> <view class="main">
@ -61,12 +61,12 @@
<view class="price_num"> <view class="price_num">
<span>委托数量</span> <span>委托数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;" <subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber" class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)"> :isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive> </subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step" <subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true" :min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @increment="incrementTotal($event,i,item)" :isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive> @eventChange="numberChange($event,i)"></subtractive>
</view> </view>
@ -288,6 +288,7 @@
that.$set(item, 'check', true); that.$set(item, 'check', true);
that.$set(item, 'number', val.number); that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price); that.$set(item, 'price', val.price);
that.peicenumber=val.number
} }
}) })
}) })
@ -395,13 +396,18 @@
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
border: 2rpx solid #fff;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
color: #fff;
position: absolute; position: absolute;
top: -150rpx; top: -150rpx;
right: 30rpx; right: 30rpx;
image {
width: 100%;
height: 100%;
}
} }
.search { .search {

View File

@ -9,7 +9,7 @@
</view> </view>
<view class="iconclose" @click="close"> <view class="iconclose" @click="close">
X <image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
<view class="main"> <view class="main">
@ -61,13 +61,14 @@
<view class="price_num"> <view class="price_num">
<span>出售数量</span> <span>出售数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;" <subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber" class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)" > :isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive> </subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step" <subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true" :min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @eventChange="numberChange($event,i)" ></subtractive> :isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive>
</view> </view>
</view> </view>
</view> </view>
@ -130,7 +131,7 @@
bought: [], bought: [],
checkedArr: [], checkedArr: [],
aryys: [],
// picker // picker
storageCustomList: [{ storageCustomList: [{
CustGoodsCode: "TEST001", CustGoodsCode: "TEST001",
@ -165,14 +166,37 @@
}, },
mounted() { mounted() {
this.checkedArr = this.checkedObj this.checkedArr = this.checkedObj
this.aryys = this.checkedObj
this.getBounht(); this.getBounht();
}, },
methods: { methods: {
// //
producrprice(e, i,item) { producrprice(e, i, item) {
this.bought[i].price = e.detail.value this.bought[i].price = e.detail.value
this.$set(item, 'check',false); this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
incrementTotal(e, i, item) {
// console.log(e, i, item)
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
}, },
// picker // picker
bindPickerChange: function(e, storage, num) { bindPickerChange: function(e, storage, num) {
@ -180,7 +204,6 @@
this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock
this.bought[num].product_attr_unique = storage[e.detail.value].unique this.bought[num].product_attr_unique = storage[e.detail.value].unique
this.pickerData = storage[this.index] // this.pickerData = storage[this.index] //
if (this.bought[num].attrValue[this.index].stock == 0) { if (this.bought[num].attrValue[this.index].stock == 0) {
this.$util.Tips({ this.$util.Tips({
title: '库存不足' title: '库存不足'
@ -220,15 +243,22 @@
setValue: function(event) { setValue: function(event) {
this.$set(this.whereb, 'keyword', event.detail.value); this.$set(this.whereb, 'keyword', event.detail.value);
if (!event.detail.value) {
this.whereb.page = 1
this.loadedb = false
this.getBounht()
}
}, },
searchBut() { searchBut() {
this.whereb.page = this.wherec.page = this.wheres.page = this.bought = []
this.bought = [] this.whereb.page = 1
this.isActive == 0 ? this.getBounht() : '' this.loadedb = false
this.getBounht()
}, },
getBounht() { getBounht() {
var that = this; var that = this;
// console.log('1111111', that.loadingb, that.loadedb)
if (that.loadingb || that.loadedb) return; if (that.loadingb || that.loadedb) return;
that.loadingb = true; that.loadingb = true;
@ -259,6 +289,7 @@
that.$set(item, 'check', true); that.$set(item, 'check', true);
that.$set(item, 'number', val.number); that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price); that.$set(item, 'price', val.price);
that.peicenumber=val.number
} }
}) })
}) })
@ -268,32 +299,32 @@
getCheckedGoods() { getCheckedGoods() {
this.checked = [] this.checked = []
this.checkedArr.forEach((item, index) => { this.checkedArr.forEach((item, index) => {
this.check.push(item) this.checkedArr.push(item)
}) })
}, },
/*点击选中与否*/ /*点击选中与否*/
goodsCheck(item) { goodsCheck(item) {
this.$set(item, 'check', !item.check); this.$set(item, 'check', !item.check);
if (item.check) { if (item.check) {
if (this.peicenumber == 0) { if (this.peicenumber == 0) {
item.number = 1 item.number = 1
} }
if (!item.product_attr_unique) { if (!item.product_attr_unique) {
item.product_attr_unique = item.attrValue[0].unique item.product_attr_unique = item.attrValue[0].unique
} }
this.checkedArr.push(item) this.checkedArr.push(item)
} else { } else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
.spu_id == (
itemn.spu && itemn.spu.spu_id)))), 1)
} }
}, },
/*确定提交*/ /*确定提交*/
submit() { submit() {
this.$emit('getProduct', this.checkedArr); this.$emit('getProduct', this.checkedArr);
}, },
@ -345,13 +376,18 @@
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
border: 2rpx solid #fff;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
color: #fff;
position: absolute; position: absolute;
top: -150rpx; top: -150rpx;
right: 30rpx; right: 30rpx;
image {
width: 100%;
height: 100%;
}
} }
.search { .search {

View File

@ -94,6 +94,10 @@
} }
if (newValue < this.min) { if (newValue < this.min) {
newValue = this.min newValue = this.min
this.$util.Tips({
title: '达到最小值了',
icon: 'error'
})
} }
if (newValue < this.max && this.maxDisabled === true) { if (newValue < this.max && this.maxDisabled === true) {
this.maxDisabled = false; this.maxDisabled = false;
@ -104,6 +108,10 @@
this.maxDisabled = true; this.maxDisabled = true;
} }
if (newValue > this.max) { if (newValue > this.max) {
this.$util.Tips({
title: '达到最大值了',
icon: 'error'
})
newValue = this.max newValue = this.max
} }
if (newValue > this.min && this.minDisabled === true) { if (newValue > this.min && this.minDisabled === true) {
@ -114,6 +122,7 @@
return; return;
} }
this.inputValue = newValue / scale; this.inputValue = newValue / scale;
this.$emit('increment', this.inputValue)
}, },
_getDecimalScale() { _getDecimalScale() {
let scale = 1; let scale = 1;

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试 // let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
httpApi = 'https://shop.lihaink.cn' // 生产 // httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325" // httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325' // httpApi = 'http://192.168.0.108:8325'
@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置 // httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif // #endif
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产 httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn" // httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
} }

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.1.0", "versionName" : "1.3.6",
"versionCode" : 110, "versionCode" : 136,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -1,5 +1,32 @@
{ {
"pages": [ "pages": [
//#ifdef APP-PLUS
//
{
"path": "pages/guide/judge",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
{
"path": "pages/guide/guide",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
// #endif
//pageshttps://uniapp.dcloud.io/collocation/pages //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
@ -102,7 +129,25 @@
} }
} }
], ,{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"bounce": "none",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"backgroundColor": "transparent",
"disableScroll": true,
"navigationStyle": "custom"
}
}
],
"subPackages": [{ "subPackages": [{
"root": "pages/goods_cate", "root": "pages/goods_cate",
"name": "goods_cate", "name": "goods_cate",
@ -583,6 +628,12 @@
"navigationBarTitleText": "采购订单" "navigationBarTitleText": "采购订单"
} }
}, },
{
"path": "order_list/relase",
"style": {
"navigationBarTitleText": "委托订单"
}
},
{ {
"path": "order_list/order", "path": "order_list/order",
"style": { "style": {
@ -986,7 +1037,13 @@
"style": { "style": {
"navigationBarTitleText": "订单列表" "navigationBarTitleText": "订单列表"
} }
}, {
"path": "financial_management/index",
"style": {
"navigationBarTitleText": "财务管理"
}
}, },
{ {
"path": "orderRefund/index", "path": "orderRefund/index",
"style": { "style": {
@ -1174,7 +1231,9 @@
"pages": [{ "pages": [{
"path": "plant_detail/index", "path": "plant_detail/index",
"style": { "style": {
"navigationBarTitleText": "内容详情" "navigationBarTitleText": "内容详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false
} }
}, },
{ {
@ -1547,11 +1606,13 @@
"selectedColor": "#E93323", "selectedColor": "#E93323",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tabbar_icon/a.png", "iconPath": "static/tabbar_icon/a.png",
"selectedIconPath": "static/tabbar_icon/a-a.png", "selectedIconPath": "static/tabbar_icon/a-a.png",
"text": "泸州" "text": "泸州"
}, },
{ {
"pagePath": "pages/gather/gather", "pagePath": "pages/gather/gather",
@ -1561,16 +1622,16 @@
}, },
{ {
"pagePath": "pages/plant_release/index", "pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/d.png", "iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/d-a.png", "selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布", "text": "发布"
"visible": false
}, },
{ {
"pagePath": "pages/supply_chains/supply_chains", "pagePath": "pages/supply_chains/supply_chains",
"iconPath": "static/tabbar_icon/c.png", "iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/c-a.png", "selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "供应" "text": "供应"
}, },
{ {
@ -1579,15 +1640,8 @@
"selectedIconPath": "static/tabbar_icon/e-a.png", "selectedIconPath": "static/tabbar_icon/e-a.png",
"text": "我的" "text": "我的"
} }
], ]
"midButton": {
"width": "68px",
"height": "70px",
"iconWidth": "48px",
"pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/d.png",
"text": "发布"
}

View File

@ -0,0 +1,674 @@
<template>
<view class="">
<view class="finance_head">
<view class="top">
<view>
<view v-if="user_id == 0" class="accont">
<u--image
:showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
</view>
<view v-else class="accont">
<u--image
:showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
</view>
</view>
<!-- <view class="right" @click="navTo('/subpkg/topUp/topUp')">
账户充值
</view> -->
</view>
<view class="center">
<view class="title">
<text style="margin-right: 20rpx">账户总金额()</text
><uni-icons
@click="updateEye()"
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'"
color="#fff"
></uni-icons>
</view>
<view class="price" v-show="eyeType"
>{{ all_money }}</view
>
<view class="price" v-show="!eyeType">****</view>
<view class="bubble">
<!-- <image src="../../static/img/contract/bubble.png"></image> -->
<view class="text" v-show="eyeType"
>可提现金额{{ userInfo.user_money || 0.0 }}</view
>
<view class="text" v-show="!eyeType">可提现金额****</view>
</view>
</view>
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
<view class="item">
<view>履约保证金额()</view>
<view class="num" v-show="eyeType">{{
userInfo.deposit || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view>
</view>
<u-line direction="col" length="40%" color="#999999FF"></u-line>
<view class="item">
<view>个人收益金额()</view>
<view class="num" v-show="eyeType">{{
userInfo.user_money || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view>
</view>
</view>
</view>
<view class="bill">
<view style="width: 100%; height: 90rpx; background-color: #fff"></view>
<uni-section
titleFontSize="32rpx"
type="line"
title="账单流水"
></uni-section>
<!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> -->
<!-- <view class="type_box">
<view class="type">
<view :class="current == 0 ? 'active' : ''" @click="changeBillType(0)"
>日账单</view
>
<view :class="current == 1 ? 'active' : ''" @click="changeBillType(1)"
>月账单</view
>
</view>
</view> -->
<!-- 日账单 -->
<view class="bill_list" v-show="current == 0">
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{item.create_time}}</view>
</view>
<view class="bottom">
<view class="left">
<view>收益金额()</view>
<view class="num">{{item.change_amount}}</view>
</view>
<view class="right">
<view>支出金额:{{item.change_amount_desc<0?item.change_amount:'0.00'}}</view>
<view>入账金额:{{item.change_amount_desc>0?item.change_amount:'0.00'}}</view>
</view>
</view>
</view> -->
<view class="item" v-for="(item, index) in billList" :key="item.id">
<view class="top">
账单日期: {{ current ? item.month : item.create_time }}
</view>
<view class="bottom">
<view class="text">
<view class="t_item" v-if="current == 0">
<view class="t_title">任务名称</view>
<view class="tips">{{ item.remark }}</view>
</view>
<!--<view class="t_item">
<view class="t_title">金额归属</view>
<view class="tips">{{
$store.state.app.userInfo.nickname
}}</view>
</view> -->
<view class="t_item">
<view class="t_title">收益来源</view>
<view class="tips">
<text v-if="item.change_type == 202" style="color: #46be61">{{
item.type_desc
}}</text>
<text
v-else-if="item.change_type == 203"
style="color: #ff7c32"
>{{ item.type_desc }}</text
>
<text v-else="item.change_type == 203">{{
item.type_desc
}}</text>
</view>
</view>
</view>
<view class="price">
{{
current
? item.expenditure == 0
? "+" + item.income
: "-" + item.income
: item.change_amount_desc
}}
</view>
</view>
</view>
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{current?item.month:item.create_time}}</view>
</view>
<view class="bottom">
<view class="left">
<view>收益金额()</view>
<view class="num">
{{current?(item.expenditure==0?item.income:'-'+item.income):item.change_amount_desc}}
</view>
</view>
<view class="right">
<view>支出金额:{{item.expenditure>0?item.expenditure:'0.00'}}</view>
<view>入账金额:{{item.income>0?item.income:'0.00'}}</view>
</view>
</view>
</view>
-->
<u-loadmore
:status="loadConfig.status"
:loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText"
:nomore-text="loadConfig.nomoreText"
/>
</view>
<!-- 月账单 -->
<view class="bill_list" v-show="current == 1">
<view class="card" v-for="(item, index) in billListMonth" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{ item.month }}</view>
</view>
<view class="bottom">
<view class="left">
<view>个人收益金额()</view>
<view class="num">{{ item.income }}</view>
</view>
<view class="right">
<view
>支出金额:{{
item.expenditure > 0 ? item.expenditure : "0.00"
}}</view
>
<view>入账金额:{{ item.income > 0 ? item.income : "0.00" }}</view>
</view>
</view>
</view>
<u-loadmore status="nomore" nomore-text="仅展示一年数据" />
</view>
<!-- <button class="btn" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">提现余额</button> -->
</view>
</view>
</template>
<script>
// import {
// accountLogLists,
// accountLogListsMonth
// } from "@/api/pay.js"
// import {
// userInfo
// } from "@/api/oaUser.js"
// import {
// Toast
// } from '@/libs/uniApi.js'
import {
getUserInfo,
} from '@/api/user.js';
export default {
data () {
return {
user_id: 0,
userInfo: {},
otherUserInfo: {},
billTypeList: ['日账单', '月账单'],
current: 0,
billList: [],
eyeType:true,
billListMonth: [],
loadConfig: {
page: 1,
limit: 25,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~',
status: 'loadmore'
},
}
},
onLoad (e) {
if (e.id > 0) {
this.user_id = e.id
}
// this.loadBill()
},
onShow () {
if (this.user_id == 0) {
this.userInfo = this.$store.state.app.userInfo;
getUserInfo().then((res) => {
this.$store.commit('setUserInfo', res.data);
this.userInfo = res.data;
})
} else {
this.OtherUserInfo()
}
},
computed: {
// eyeType () {
// return this.$store.state.config.eyeType;
// },
all_money(){
let str = 0.00;
try{
this.userInfo.user_money?str=str+parseFloat(this.userInfo.user_money):0.00;
this.userInfo.deposit?str=str+parseFloat(this.userInfo.deposit):0.00;
str = str.toFixed(2);
}catch(e){
str = 0.00;
}
return str;
}
},
onBackPress () {
this.loadBill()
},
methods: {
navTo (url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
async OtherUserInfo () {
// let res = await userInfo({
// id: this.user_id
// });
getUserInfo().then(res => {
// that.userInfo = res.data;
// that.userInfo.svip_open = true;
// that.userInfo.vip_status = 2;
// that.is_promoter = res.data.is_promoter;
// that.extension_status = res.data.extension_status;
// this.userInfo = res.data
console.log(res.data)
});
// this.userInfo = res.data
},
updateEye () {
this.eyeType=!this.eyeType
},
//
changeBillType (type) {
this.current = type;
if (type == 1) this.loadBillMonth();
},
async loadBill () {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await accountLogLists({
type: 'um', //
page_no: this.loadConfig.page,
page_size: this.loadConfig.limit,
user_id: this.user_id
});
this.loadConfig.status = "loadmore"
if (res.data.lists.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.billList = [...this.billList, ...res.data.lists];
},
async loadBillMonth () {
let res = await accountLogListsMonth();
let list = [];
for (let key in res.data) {
list.push(res.data[key])
}
this.billListMonth = list;
}
},
onPullDownRefresh () {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
// background-color: #fff;
}
.finance_head {
background-color: #f02828;
height: 400rpx;
position: relative;
// box-shadow: 0 -10px 20px rgba(#fff, 0.9) inset;
background-image: linear-gradient(to top, rgba(#fff, 1), transparent);
// box-shadow: -10px -10px 40px rgba(#fff, 0.9);
background-size: 100% 35%;
background-repeat: no-repeat;
background-position: center bottom;
.top {
display: flex;
justify-content: space-between;
align-items: center;
flex: 1;
color: #fff;
padding: 10rpx 28rpx;
.accont {
// background-color: red;
display: flex;
justify-content: space-between;
width: auto;
width: auto;
line-height: 44px;
.name {
margin-left: 20rpx;
}
.name {
margin-left: 20rpx;
}
}
.left {
display: flex;
align-items: center;
flex: 1;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
// .name {
// margin: 0 17.5rpx;
// }
image {
width: 40rpx;
height: 40rpx;
}
}
.right {
font-size: 24.53rpx;
font-weight: 400;
color: #ffffff;
}
}
.center {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.title {
font-size: 25rpx;
font-weight: 400;
line-height: 39rpx;
}
.price {
font-size: 60rpx;
font-weight: bold;
line-height: 39rpx;
margin-top: 28rpx;
margin-bottom: 14rpx;
}
.bubble {
padding: 20rpx 28rpx 10rpx 28rpx;
background-image: url("@/static/images/bubble.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.text {
}
}
}
.bottom {
position: absolute;
bottom: -78rpx;
left: 50%;
transform: translateX(-50%);
width: 694rpx;
height: 140rpx;
background: #ffffff;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
justify-content: space-around;
align-items: center;
.item {
text-align: center;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
.num {
font-size: 39rpx;
font-weight: 500;
color: #f02828;
line-height: 39rpx;
}
}
}
}
.bill {
// padding: 28rpx;
// padding-top: 90rpx;
padding-bottom: 32rpx;
background-color: #f5f5f5;
.type_box {
background-color: #fff;
padding: 32rpx 0;
.type {
height: 53rpx;
width: 333rpx;
display: flex;
align-items: center;
overflow: hidden;
margin: 0 auto;
view {
flex: 1;
color: #f02828;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #3274f9;
&:nth-child(1) {
border-radius: 30rpx 0 0 30rpx;
}
&:nth-child(2) {
border-radius: 0 30rpx 30rpx 0;
}
}
.active {
background-color: #f02828;
color: #fff;
}
}
}
.bill_list {
// background-color: #f5f5f5;
padding-bottom: 100rpx;
padding-top: 28rpx;
.card {
padding: 28rpx;
background-color: #fff;
margin-bottom: 21rpx;
.top {
display: flex;
align-items: center;
font-size: 25rpx;
font-weight: 400;
color: #333333ff;
line-height: 39rpx;
.blue {
width: 137rpx;
height: 49rpx;
background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
font-size: 25rpx;
font-weight: 400;
color: #ffffff;
line-height: 39rpx;
display: flex;
justify-content: center;
align-items: center;
margin-right: 28rpx;
}
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
height: 160rpx;
.left {
flex: 1;
text-align: center;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
.num {
font-size: 39rpx;
font-weight: 500;
color: #f02828;
line-height: 39rpx;
}
}
.right {
flex: 1;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
}
}
}
.item {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
// height: 238rpx;
background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 28rpx;
.top {
margin-bottom: 28rpx;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
&:before {
display: inline-block;
content: "账单详情";
width: 137rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff;
margin-right: 28rpx;
}
}
.bottom {
display: flex;
justify-content: space-between;
.text {
font-size: 25rpx;
font-weight: 400;
color: #999999;
line-height: 39rpx;
.t_item {
display: flex;
.t_title {
margin-bottom: 16rpx;
flex-shrink: 0 !important;
}
.tips {
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
}
}
.price {
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 500;
color: #f02828;
}
}
}
}
.btn {
color: #fff;
border-radius: 100px;
text-align: center;
line-height: 84.21rpx;
margin: 0 auto;
margin-top: 84.21rpx;
width: 693.93rpx;
height: 84.21rpx;
background: #f02828;
box-shadow: 0px 9px 26px 1px #e9eff5;
position: fixed;
bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
}
}
</style>

View File

@ -239,7 +239,6 @@
const data = { const data = {
product_type: this.where.product_type product_type: this.where.product_type
} }
console.log('data', data);
orderStatistics(mer_id, data).then( orderStatistics(mer_id, data).then(
res => { res => {
that.census = res.data.order; that.census = res.data.order;

View File

@ -146,7 +146,7 @@
</view> </view>
</view> </view>
<view style="height:120upx;"></view> <view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);">
<view class="more"></view> <view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)"> <view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意 同意

View File

@ -4,7 +4,7 @@
<view class="search"> <view class="search">
<view class="search-content acea-row row-middle"> <view class="search-content acea-row row-middle">
<text class="iconfont icon-sousuo"></text> <text class="iconfont icon-sousuo"></text>
<input v-model="where.store_name" confirm-type="search" placeholder="请输收货人手机号或退款订单号搜索" class="input" <input v-model="where.search_info" confirm-type="search" placeholder="请输收货人手机号或订单号搜索" class="input"
@confirm="handleSearch" /> @confirm="handleSearch" />
</view> </view>
</view> </view>
@ -261,7 +261,7 @@
page: 1, page: 1,
limit: 10, limit: 10,
status: 1, status: 1,
store_name: '', search_info: '',
product_type: '' product_type: ''
}, },
list: [], list: [],
@ -284,9 +284,7 @@
that.init(); that.init();
} }
}, },
types: function() {
this.getIndex();
}
}, },
onLoad(option) { onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? "" this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
@ -324,12 +322,13 @@
}, },
handleSearch() { handleSearch() {
this.loaded = false; this.loaded = false;
this.where.page = 3; this.where.page = 1;
this.list = []; this.list = [];
this.getIndex(); this.getIndex();
}, },
// //
getIndex() { getIndex() {
let that = this; let that = this;
if (that.loading || that.loaded) return; if (that.loading || that.loaded) return;
that.loading = true; that.loading = true;
@ -355,7 +354,7 @@
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list); that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
console.log(that.list) // console.log(that.list)
// console.log(that.list); // console.log(that.list);
}, },
@ -381,10 +380,12 @@
if (val != 'verify') { if (val != 'verify') {
if (this.where.status != val) { if (this.where.status != val) {
this.where.status = val; this.where.status = val;
this.where.search_info=''
delete this.where.is_verify; delete this.where.is_verify;
this.init(); this.init();
} }
} else { } else {
this.where.search_info=''
this.where.is_verify = 1; this.where.is_verify = 1;
delete this.where.status; delete this.where.status;
this.init(); this.init();

View File

@ -789,6 +789,7 @@
</block> </block>
</swiper> </swiper>
</div> </div>
</div> </div>
<div class="recording" v-if="recording"> <div class="recording" v-if="recording">
<image src="/static/images/recording.png" /> <image src="/static/images/recording.png" />
@ -1944,6 +1945,7 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
margin-bottom: var(--status-bar-height);;
} }
.broadcast-details .footerCon.on { .broadcast-details .footerCon.on {

View File

@ -821,8 +821,10 @@
// //
get_product_list: function(isPage) { get_product_list: function(isPage) {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []); if (isPage === true) that.$set(that, 'productList', []);
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';

View File

@ -1,28 +1,26 @@
<template> <template>
<!-- #ifdef APP || H5 --> <view class="content">
<view>
<!-- #endif -->
<form @submit="formSubmit" report-submit='true'> <form @submit="formSubmit" report-submit='true'>
<view class="release_content"> <view class="release_content">
<view class="release_item"> <view class="release_item">
<view class="release_item-one"> <view class="release_item-one">
<view class="item-one"> <view class="item-one">
被委托商家 被委托商家
</view> </view>
<e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select> <e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1"
placeholder="选择选项"></e-select>
</view> </view>
<view class="release_item-one"> <view class="release_item-one">
<view class="item-one"> <view class="item-one">
委托周期 委托周期
</view> </view>
<view class="" @click="calendar"> <view class="">
<input type="number" v-model="date" /> <input type="number" v-model="formData.entrust_day" />
</view> </view>
<!-- <e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select> -->
</view> </view>
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}}) <view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})
@ -32,7 +30,7 @@
<text v-if="productList.length == 0" class="text">选择产品</text> <text v-if="productList.length == 0" class="text">选择产品</text>
<view v-else class="text"> <view v-else class="text">
<image class="image" v-for="(item,index) in productList" :key="index" <image class="image" v-for="(item,index) in productList" :key="index"
:src="item.image || (item.spu && item.spu.image)"></image> :src="item.image"></image>
</view> </view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
@ -41,7 +39,7 @@
<view class="content_center-one" v-for="(item,i) in productList" :key="i"> <view class="content_center-one" v-for="(item,i) in productList" :key="i">
<view class="center-one"> <view class="center-one">
<view class="center-one-img"> <view class="center-one-img">
<image :src="item.image" mode=""></image> <image :src="item.image" mode="aspectFit"></image>
</view> </view>
<view class="center-one-txt"> <view class="center-one-txt">
<view class="one-txta"> <view class="one-txta">
@ -60,29 +58,27 @@
</view> </view>
</view> </view>
<button class="release_btn button" form-type="submit">发布</button> <button class="release_btn button" form-type="submit">提交</button>
</view> </view>
</form> </form>
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar"
:startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm"
:showMonth="info.showMonth" @close="close" />
<!-- 提到的宝贝弹窗 --> <!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom"> <uni-popup ref="associated" type="bottom">
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated> <associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import associated from '@/components/realselist/realselist.vue'; import associated from '@/components/realselist/realselist.vue';
import eselect from '@/components/e-select/e-select.vue'; import eselect from '@/components/e-select/e-select.vue';
// import {} from '@/api/sale.js' import {
supplychain,
entrustchain,
editentrust,
entrustdetail
} from '@/api/sale.js'
export default { export default {
components: { components: {
associated, associated,
@ -92,20 +88,8 @@
return { return {
value1: 1, value1: 1,
value2: "", value2: "",
options1: [{ options1: [],
text: "Shenzhen1",
value: 1
}, {
text: "Shenzhen2",
value: 2
}, {
text: "Shenzhen3",
value: 3
}],
date: 1,
productList: [], productList: [],
info: { info: {
startDate: '', startDate: '',
@ -116,6 +100,14 @@
selected: [], selected: [],
showMonth: false showMonth: false
}, },
formData: {
entrust_mer_id: '',
entrust_day: 15,
is_type: "4",
product_info: [],
content: ''
},
type: ''
}; };
}, },
computed: { computed: {
@ -124,27 +116,49 @@
}, },
onLoad(options) { onLoad(e) {
this.id = e.id;
this.type = e.type
if (this.type) {
uni.setNavigationBarTitle({
title: '编辑打折'
})
this.editlist(e.id)
}
}, },
mounted() {
this.list()
},
methods: { methods: {
change1(item) {
// console.log(item);
confirm(e) {
let self = this
if (e.range.after && e.range.before) {
let star = new Date(e.range.after).getTime()
let stop = new Date(e.range.before).getTime()
let arr = stop - star
this.date = Math.floor(arr / (24 * 3600 * 1000));
// console.log(days)
if (this.date < 0) {
this.date = this.date * -1
}
}
}, },
list() {
supplychain({
page: 1
}).then((res => {
for (let i in res.data.list) {
this.options1.push({
text: res.data.list[i].mer_name,
value: res.data.list[i].mer_id
})
}
// console.log(res)
}))
},
editlist(id) {
entrustdetail(id).then((res) => {
this.formData.entrust_mer_id = res.data.entrust_mer_id
this.formData.entrust_day = res.data.entrust_day
this.productList = res.data.product_list
this.getProduct(res.data.product_list)
})
},
calendar() { calendar() {
this.$refs.calendar.open() this.$refs.calendar.open()
}, },
@ -158,12 +172,97 @@
}, },
// //
getProduct(data) { getProduct(data) {
console.log(data) this.formData.product_info=[]
if (data.length > 0) {
for (let i in data) {
this.formData.content += data[i].store_name + ','
this.formData.product_info.push({
product_attr_unique: data[i].product_attr_unique,
number: Number(data[i].number),
price: data[i].price
})
}
}
this.$refs.associated.close() this.$refs.associated.close()
}, },
// //
formSubmit(e) { formSubmit(e) {
console.log(e) console.log(e)
let that = this,
value = that.formData;
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
title: '请选择委托周期'
});
if (value.product_info.length == 0) return that.$util.Tips({
title: '请选择产品'
});
if (!value.entrust_mer_id) return that.$util.Tips({
title: '请添加商家'
});
this.type?
editentrust(this.id,value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '编辑成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
:
entrustchain(value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
} }
} }
} }
@ -174,6 +273,10 @@
background: #F5F5F5; background: #F5F5F5;
} }
.content {
height: 100vh;
position: relative;
}
.release_content { .release_content {
@ -418,6 +521,10 @@
} }
.release_btn { .release_btn {
margin-top: 100rpx;
position: absolute;
bottom: 150rpx;
left: 50%;
margin-left: -347rpx;
} }
</style> </style>

View File

@ -1,57 +1,51 @@
<template> <template>
<view class="content"> <view class="content">
<view class="content_top"> <view class="content_top">
<view class="content_top-one">
<image src="@/static/images/dong.gif" mode="aspectFill"></image>
</view>
<view class="content_top-two">
<view class="top-two-one">
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
</view>
<view class="top-two-two">
<!-- 2020-07-07 14:14:14
-->
{{objinfo.entrust_start_date}}
</view>
</view>
</view> </view>
<view class="content_center"> <view class="content_center">
<view class="content_center-one"> <view class="content_center-one" v-for="(item,index) in objinfo.product_list">
<view class="center-one"> <view class="center-one">
<view class="center-one-img"> <view class="center-one-img">
<image src="../../annex/static/left.png" mode=""></image> <image :src="item.image[0]" mode="aspectFit"></image>
</view> </view>
<view class="center-one-txt"> <view class="center-one-txt">
<view class="one-txta"> <view class="one-txta">
良品铺子肉松饼1000g/ ... {{item.store_name}}
</view> </view>
<view class="one-txtb"> <view class="one-txtb">
<view class=""> <view class="">
委托价:¥<span>34.90</span> 委托价:¥<span>{{item.price}}</span>
</view> </view>
<view class=""> <view class="">
数量:100 数量:{{item.number}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="content_center-one">
<view class="center-one">
<view class="center-one-img">
<image src="../../annex/static/left.png" mode=""></image>
</view>
<view class="center-one-txt">
<view class="one-txta">
良品铺子肉松饼1000g/ ...
</view>
<view class="one-txtb">
<view class="">
委托价:¥<span>34.90</span>
</view>
<view class="">
数量:100
</view>
</view>
</view>
</view>
</view> <view class="content_center-two" v-if="objinfo">
<view class="content_center-two">
<view class="center-two"> <view class="center-two">
<view class="center-twoa"> <view class="center-twoa">
委托方: 委托方:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺 {{objinfo.mer_info.mer_name}}
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two">
@ -59,7 +53,7 @@
被委托方: 被委托方:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺 {{objinfo.entrust_mer_info.mer_name}}
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two">
@ -67,7 +61,7 @@
委托周期: 委托周期:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺 {{objinfo.entrust_day}}
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two">
@ -75,7 +69,15 @@
结算周期: 结算周期:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺 {{objinfo.mer_info.settle_cycle}}
</view>
</view>
<view class="center-two">
<view class="center-twoa">
结算利息:
</view>
<view class="center-twob">
{{objinfo.mer_info.interest_rate}}%
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two">
@ -83,7 +85,8 @@
状态: 状态:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two">
@ -91,15 +94,15 @@
是否结束委托: 是否结束委托:
</view> </view>
<view class="center-twob"> <view class="center-twob">
通滩镇镇街店铺 {{objinfo.entrust_finish==0?'未结束':""||objinfo.entrust_finish==1?'已结束':""||objinfo.entrust_finish==2?'商家拒绝':""||objinfo.entrust_finish==3?'申请':""}}
</view> </view>
</view> </view>
<view class="center-two"> <view class="center-two" v-if="objinfo.entrust_finish_refusal">
<view class="center-twoa"> <view class="center-twoa">
拒绝原因: 拒绝原因:
</view> </view>
<view class="center-twob"> <view class="center-twob" :style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
通滩镇镇街店铺 {{objinfo.entrust_finish_refusal}}
</view> </view>
</view> </view>
</view> </view>
@ -111,38 +114,137 @@
</view> </view>
<view class="content_bootm_one"> <view class="content_bootm_one" v-for="(item,i) in objinfo.product_list" @click="Merchbaby(item)">
<view class="bootm_oneimg"> <view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image> <image :src="item.image[0]" mode="aspectFit"></image>
</view> </view>
<view class=""> <view class="">
良品铺子肉松饼1000g/ 面包糕... {{item.store_name}}
</view>
</view>
<view class="content_bootm_one">
<view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image>
</view>
<view class="">
良品铺子肉松饼1000g/ 面包糕...
</view> </view>
</view> </view>
</view> </view>
<button class="release_btn button" form-type="submit">发布</button> <button class="release_btn button" v-if="objinfo.mer_status==1&&type==1" @click="submit(objinfo)">发布</button>
</view> </view>
</template> </template>
<script> <script>
import {
addEntrustCart,
entrustdetail
} from '@/api/sale.js'
export default {
data() {
return {
objinfo: {},
goodsData: [{
name: '我发起的',
name1: '委托销售商品',
type: 1,
src: require('@/static/images/wtbg1.png'),
img: require('@/static/images/wtt1.png')
},
{
name: '我收到的',
name1: '帮助销售商品',
type: 2,
src: require('@/static/images/wtbg2.png'),
img: require('@/static/images/wtt2.png')
}
],
type: 0,
}
},
onLoad(e) {
this.list(e.id)
this.type = e.type
},
onShow() {
},
methods: {
//
list(id) {
entrustdetail(id).then((res) => {
this.objinfo = res.data
})
},
//
Merchbaby(item) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}`
})
},
//
submit(item) {
addEntrustCart({
community_id: item.community_id
}).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message,
icon: 'success'
})
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + res.data.cart_id.toString()
})
}
})
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.content{ .content {
position: relative; position: relative;
} }
.content_top { .content_top {
height: 151rpx; height: 151rpx;
background: linear-gradient(84deg, #2352FA 0%, #6497FF 100%); background: linear-gradient(84deg, #2352FA 0%, #6497FF 100%);
display: flex;
padding-top: 21rpx;
.content_top-one {
width: 107rpx;
height: 107rpx;
margin-left: 28rpx;
image {
width: 100%;
height: 100%;
}
}
.content_top-two {
margin-left: 25rpx;
.top-two-one {
font-size: 35rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 10rpx;
}
.top-two-two {
font-size: 28rpx;
font-family: SF Pro Display-Light, SF Pro Display;
font-weight: 300;
color: #FFFFFF;
margin-top: 10rpx;
}
}
} }
@ -217,6 +319,10 @@
} }
.center-twob { .center-twob {
width: 360rpx;
text-align: right;
word-wrap: break-word;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
@ -273,10 +379,8 @@
color: #FFFFFF; color: #FFFFFF;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left:-347rpx; margin-left: -347rpx;
position: fixed; position: fixed;
bottom: 100rpx; bottom: 100rpx;
} }
</style> </style>

View File

@ -6,7 +6,7 @@
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle> <cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
</view> </view>
<!-- 审核通过 打折的拒绝同意功能 调货不需要功能 --> <!-- 审核通过 打折的拒绝同意功能 调货不需要功能 -->
<view class="content-content" v-for="(item,i) in list" :key="i" > <view class="content-content" v-for="(item,i) in orderList" :key="i">
<view class="content-one"> <view class="content-one">
<view class="content-one-img"> <view class="content-one-img">
@ -14,88 +14,94 @@
</view> </view>
<view class="content-one-txt"> <view class="content-one-txt">
<view class="one-txt-a"> <view class="one-txt-a">
{{item.content}} {{item.title}}
</view> </view>
<view class="one-txt-b"> <view class="one-txt-b">
委托周期:{{item.day}} 委托周期:{{item.entrust_day}}
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==1"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" @click="order">
<view class="content-two-edita" @click="soldEdit">
待处理 待处理
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a"> <!-- <view class="contentgn_a" @click="soldEdit(item)">
处理 处理
</view>
<span></span>-->
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view> </view>
<span></span> <span></span>
<view class="contentgn_b"> <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.type==2"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted"> <view class="content-two-editb" @click="accepted">
已接受 已接受
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" @click="closingorder"> <view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
结束委托 结束委托
</view> </view>
<span></span> <span v-if="item.entrust_finish==3"></span>
<view class="contentgn_b"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==3"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined"> <view class="content-two-editc" @click="declined">
已拒绝 已拒绝
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a"> <!--<view class="contentgn_a" @click="deleteOrder(item)">
删除 删除
</view> </view>
<span></span> <span></span> -->
<view class="contentgn_b"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4"> <view class="content-two_one" v-if="item.type==4">
<view class="content-two-editd" @click="soldEdit"> <view class="content-two-editd" @click="soldEdit">
已完成 已完成
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a"> <view class="contentgn_a" @click="deleteOrder(item)">
删除 删除
</view> </view>
<span></span> <span></span>
<view class="contentgn_b"> <view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="adddelegation" @click="addDelegation">
<view v-if="orderList.length == 0 && this.where.page > 1"> <view class="adddelegation-one">
<image src="@/static/images/delegation.png" mode=""></image>
</view>
<view class="adddelegation-two">
新增委托
</view>
</view>
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage> <emptyPage title="暂无订单~"></emptyPage>
</view> </view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<uni-popup ref="bindmobile" type="center" @click="close"> <uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
@ -107,19 +113,16 @@
委托申请处理 委托申请处理
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b">
结算周期: <span>30</span> 结算周期: <span>{{obj.settle_cycle}}</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c">
利息比例: <span>0.05%</span> 利息比例: <span>{{obj.interest_rate}}%</span>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation"> <view class="cancellation" @click="passDelete(obj)">
拒绝 拒绝
</view> </view>
<view class="determine"> <view class="determine" @click="passagree(obj)">
接受 接受
</view> </view>
</view> </view>
@ -129,7 +132,6 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="bindmobile1" type="center" @click="close"> <uni-popup ref="bindmobile1" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
@ -149,15 +151,11 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="bindmobile2" type="center" @click="close"> <uni-popup ref="bindmobile2" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
@ -168,20 +166,17 @@
<view class="bg-content-a" style="margin-left: 207rpx;"> <view class="bg-content-a" style="margin-left: 207rpx;">
结束委托申请处理 结束委托申请处理
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b" v-if="obj.mer_info">
结算周期: <span>30</span> 结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c" v-if="obj.mer_info">
利息比例: <span>0.05%</span> 利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation"> <view class="cancellation" @click="refused">
拒绝 拒绝
</view> </view>
<view class="determine"> <view class="determine" @click="agree(obj)">
接受 接受
</view> </view>
</view> </view>
@ -202,24 +197,19 @@
<view class="bg-content-a" style="margin-left: 207rpx;"> <view class="bg-content-a" style="margin-left: 207rpx;">
结束委托申请处理 结束委托申请处理
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b" v-if="obj.mer_info">
结算周期: <span>30</span> 结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c" v-if="obj.mer_info">
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c">
利息比例: <span>0.05%</span>
</view>
<view class="bg-content-c">
拒绝原因 拒绝原因
<view class="" style="margin-top: 21rpx;"> <view class="" style="margin-top: 21rpx;">
<textarea v-model="refuseds" placeholder="输入拒绝原因" class="bg-content_textarea" />
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
</view> </view>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn" @click="agree(obj)">
<view class="determine"> <view class="determine">
接受 接受
</view> </view>
@ -235,34 +225,44 @@
<script> <script>
import cxNavTitle from '@/components/cx-navTitle.vue' import cxNavTitle from '@/components/cx-navTitle.vue'
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import {
entrustlist,
finishchain,
checkchain,
finishentrust
} from '@/api/sale.js'
export default { export default {
components: { components: {
cxNavTitle, cxNavTitle,
emptyPage emptyPage,
}, },
data() { data() {
return { return {
activeItem: "tabOne", activeItem: "tabOne",
status: 'loadmore',
tabTitle: "", tabTitle: "",
orderList: [], orderList: [],
where: { where: {
page: 1, page: 1,
limit: 10 limit: 10,
type: 1,
status: 0
}, },
tabs: [{ tabs: [{
name: "tabOne", name: "tabOne",
label: '待处理', label: '待处理',
type: '1' type: 0
}, },
{ {
name: "tabTwo", name: "tabTwo",
label: '已接受', label: '已接受',
type: '2' type: 1
}, },
{ {
name: "tabThree", name: "tabThree",
label: '已拒绝', label: '已拒绝',
type: '3' type: 2
}, },
], ],
@ -290,79 +290,248 @@
type: 4 type: 4
} }
] ],
obj: {},
refuseds: ''
} }
}, },
onLoad() { onLoad() {
this.tabTitle = this.tabs[0].name this.tabTitle = this.tabs[0].name
// -- : // -- :
console.log(this.tabs[0]) // console.log(this.tabs[0])
}, },
mounted() { mounted() {
this.commislist()
}, },
methods: { methods: {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.commislist()
},
nav(item) { nav(item) {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/commissionedSales/delegation_details/index' // url: '/pages/commissionedSales/delegation_details/index'
// }) // })
}, },
//
commislist() {
entrustlist(this.where).then((res) => {
this.orderList.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore'
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
})
},
//
tabClick(e) { // tabClick(e) { //
this.activeItem = e.name; //class this.activeItem = e.name; //class
this.tabTitle = e.name; // this.tabTitle = e.name; //
this.where.page = 1
this.orderList = []
this.where.status = e.type
this.commislist()
},
//
Edit(item) {
uni.navigateTo({
url: '/pages/commissionedSales/addDelegation/index?id=' + item.community_id + '&type=edit'
})
},
//
addDelegation() {
uni.navigateTo({
url: '/pages/commissionedSales/addDelegation/index'
})
}, },
// //
close() { close() {
console.log('1111111')
this.$refs.bindmobile.close() this.$refs.bindmobile.close()
this.$refs.bindmobile1.close() this.$refs.bindmobile1.close()
this.$refs.bindmobile2.close() this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close() this.$refs.bindmobile3.close()
}, },
//
order(item) {
if (item.mer_status == 0 && entrust_order_id != 0) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
} else {
this.$util.Tips({
title: '商家还没同意该订单',
icon: 'err'
})
}
},
//
detail(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
},
// //
soldEdit() { soldEdit(item) {
this.obj = item
console.log(item)
this.$refs.bindmobile.open() this.$refs.bindmobile.open()
}, },
// //
accepted() { accepted() {
this.$refs.bindmobile1.open()
}, },
// //
closingorder() { closingorder(item) {
this.$refs.bindmobile3.open() console.log(item)
this.obj = item
this.$refs.bindmobile2.open()
// this.$refs.bindmobile3.open()
},
//
refused() {
this.$refs.bindmobile2.close()
setTimeout(() => {
this.$refs.bindmobile3.open()
}, 1000)
}, },
// //
declined() { declined() {
this.$refs.bindmobile2.open() // this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open()
}, },
agree(item) {
finishentrust(item.community_id, {
status: 2,
refusal: this.refuseds
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabTwo"
this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close()
this.commislist()
})
},
//
deleteOrder(item) {
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
}).catch((err) => {
console.log(err)
this.$util.Tips({
title: err,
icon: 'error'
})
})
},
// //
auditEdit() { auditEdit() {
}, },
// //
passDelete() { passDelete(item) {
checkchain(item.community_id, {
status: 2
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
})
}, },
// //
passagree() { passagree(item) {
checkchain(item.community_id, {
status: 1
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content {
height: 100vh;
position: relative;
}
.content_top { .content_top {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.adddelegation {
width: 694rpx;
height: 95rpx;
background: linear-gradient(276deg, #F98649 0%, #F34E45 100%);
box-shadow: 0 5rpx 11rpx 2rpx rgba(136, 20, 7, 0.3);
border-radius: 47rpx 47rpx 47rpx 47rpx;
opacity: 1;
display: flex;
position: fixed;
position: absolute;
bottom: 84rpx;
left: 50%;
margin-left: -347rpx;
.adddelegation-one {
width: 50rpx;
margin-right: 30rpx;
height: 50rpx;
margin-left: 242rpx;
margin-top: 21rpx;
image {
width: 50rpx;
height: 50rpx;
}
}
.adddelegation-two {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 25rpx;
}
}
.content_top { .content_top {
@ -558,12 +727,11 @@
} }
span { span {
width: 0px; width: 1px;
height: 30rpx; height: 30rpx;
opacity: 1; opacity: 1;
margin-top: 8rpx;
margin-top: 10rpx; background-color: #cccccc;
border: 2rpx solid #CCCCCC;
} }
@ -744,7 +912,7 @@
.entrust_bg-content { .entrust_bg-content {
position: absolute; position: absolute;
top: 404rpx; top: 304rpx;
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
@ -790,7 +958,7 @@
.bg-content_textarea { .bg-content_textarea {
width: 624rpx; width: 624rpx;
height: 152rpx; height: 242rpx;
padding: 25rpx 18rpx; padding: 25rpx 18rpx;
background: #F5F5F5; background: #F5F5F5;

View File

@ -5,8 +5,8 @@
<!--选项卡滑动切换--> <!--选项卡滑动切换-->
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle> <cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
</view> </view>
<view class="content-content" v-for="(item,i) in list" :key="i" @click="nav(item)"> <view class="content-content" v-for="(item,i) in orderList" :key="i" @click="nav(item)">
<view class="content-one"> <view class="content-one">
<view class="content-one-img"> <view class="content-one-img">
@ -14,108 +14,114 @@
</view> </view>
<view class="content-one-txt"> <view class="content-one-txt">
<view class="one-txt-a"> <view class="one-txt-a">
{{item.content}} {{item.title}}
</view> </view>
<view class="one-txt-b"> <view class="one-txt-b">
委托周期:{{item.day}} 委托周期:{{item.entrust_day}}
</view>
<view class="one-txt-b" v-if="item.mer_status==1" style="color: red;margin-top: 3rpx;">
{{item.entrust_finish==0?'未申请结束委托':""||item.entrust_finish==1?'委托已结束':""||item.entrust_finish==2?'商家拒绝结束委托':""||item.entrust_finish==3?'结束委托申请中':""}}
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==1"> <view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" @click="soldEdit"> <view class="content-two-edita" @click="order">
待处理 待处理
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a"> <view class="contentgn_a" @click="soldEdit(item)">
处理 处理
</view> </view>
<span></span> <span></span>
<view class="contentgn_b"> <!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view>
<span></span> -->
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span> -->
<view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_oneq" v-if="item.type==2"> <view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted"> <view class="content-two-editb" @click="accepted">
已接受 已接受
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a" @click="closingorder"> <view class="contentgn_a" style="margin-left: 10rpx;"
结束委托 v-if="item.entrust_order_id>0&&item.mer_status==1" @click="closingorder(item)">
申请结束委托
</view> </view>
<span></span> <span v-if="item.entrust_order_id>0&&item.mer_status==1"></span>
<view class="contentgn_b"> <view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;"
@click="order(item)">
去下单
</view>
<span v-if="item.entrust_order_id==0"></span>
<view class="contentgn_b" @click="detail(item)">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==3"> <view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined"> <view class="content-two-editc" @click="declined">
已拒绝 已拒绝
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a"> <!--
删除 -->
</view> <view class="contentgn_b" @click="detail(item)">
<span></span>
<view class="contentgn_b">
详情 详情
</view> </view>
</view> </view>
</view> </view>
<view class="content-two_one" v-if="item.type==4"> <view class="content-two_one" v-if="item.type==4">
<view class="content-two-editd" @click="soldEdit"> <view class="content-two-editd" @click="soldEdit">
已完成 已完成
</view> </view>
<view class="contentgn"> <view class="contentgn">
<view class="contentgn_a">
删除 <view class="contentgn_b" @click="detail(item)">
</view>
<span></span>
<view class="contentgn_b">
详情 详情
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="orderList.length == 0 && this.where.page > 1"> <view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage> <emptyPage title="暂无订单~"></emptyPage>
</view> </view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<uni-popup ref="bindmobile" type="center" @click="close"> <uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
<image src="@/static/images/wt_close.png" mode=""></image> <image src="@/static/images/wt_close.png" mode=""></image>
</view> </view>
<view class="entrust_bg"> <view class="entrust_bg">
<view class="entrust_bg-content"> <view class="entrust_bg-content" v-if="obj.mer_info">
<view class="bg-content-a"> <view class="bg-content-a">
委托申请处理 委托申请处理
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b" >
结算周期: <span>30</span> 结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c" >
利息比例: <span>0.05%</span> 利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation"> <view class="cancellation" @click="passDelete(obj)">
拒绝 拒绝
</view> </view>
<view class="determine"> <view class="determine" @click="passagree(obj)">
接受 接受
</view> </view>
</view> </view>
@ -125,7 +131,6 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="bindmobile1" type="center" @click="close"> <uni-popup ref="bindmobile1" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
@ -134,26 +139,23 @@
<view class="entrust_bga"> <view class="entrust_bga">
<view class="entrust_bg-content"> <view class="entrust_bg-content">
<view class="bg-content-a"> <view class="bg-content-a">
确定结束委托? <!-- 确定结束委托? -->
申请委托结束处理
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation"> <view class="cancellation" @click="close">
取消 取消
</view> </view>
<view class="determine"> <view class="determine" @click="deteragrss(obj)">
确定 确定
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="bindmobile2" type="center" @click="close"> <uni-popup ref="bindmobile2" type="center" @click="close">
<view class="" style="position: relative;"> <view class="" style="position: relative;">
<view class="entrust"> <view class="entrust">
<view class="entrust_close" @click="close"> <view class="entrust_close" @click="close">
@ -166,13 +168,10 @@
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b">
结算周期: <span>30</span> 结算周期: <span>30</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c">
利息比例: <span>0.05%</span> 利息比例: <span>0.05%</span>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="cancellation"> <view class="cancellation">
拒绝 拒绝
@ -200,20 +199,15 @@
</view> </view>
<view class="bg-content-b"> <view class="bg-content-b">
结算周期: <span>30</span> 结算周期: <span>30</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c">
利息比例: <span>0.05%</span> 利息比例: <span>0.05%</span>
</view> </view>
<view class="bg-content-c"> <view class="bg-content-c">
拒绝原因 拒绝原因
<view class="" style="margin-top: 21rpx;"> <view class="" style="margin-top: 21rpx;">
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" /> <textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
</view> </view>
</view> </view>
<view class="entrust_bga_btn"> <view class="entrust_bga_btn">
<view class="determine"> <view class="determine">
@ -231,7 +225,11 @@
<script> <script>
import cxNavTitle from '@/components/cx-navTitle.vue' import cxNavTitle from '@/components/cx-navTitle.vue'
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import {} from '@/api/sale.js' import {
entrustlist,
finishchain,
checkchain
} from '@/api/sale.js'
export default { export default {
components: { components: {
cxNavTitle, cxNavTitle,
@ -239,27 +237,32 @@
}, },
data() { data() {
return { return {
obj: {},
activeItem: "tabOne",
status: 'loadmore',
activeItem: "tabOne", activeItem: "tabOne",
tabTitle: "", tabTitle: "",
orderList: [], orderList: [],
where: { where: {
page: 1, page: 1,
limit: 10 type: 2,
limit: 10,
status: 0
}, },
tabs: [{ tabs: [{
name: "tabOne", name: "tabOne",
label: '待处理', label: '待处理',
type: '1' type: '0'
}, },
{ {
name: "tabTwo", name: "tabTwo",
label: '已接受', label: '已接受',
type: '2' type: '1'
}, },
{ {
name: "tabThree", name: "tabThree",
label: '已拒绝', label: '已拒绝',
type: '3' type: '2'
}, },
], ],
@ -297,59 +300,150 @@
}, },
mounted() { mounted() {
this.commislist()
}, },
methods: { methods: {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.commislist()
},
nav(item) { nav(item) {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index' // url: '/pages/commissionedSales/delegation_details/index'
// })
},
//
commislist() {
entrustlist(this.where).then((res) => {
this.orderList.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore'
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
}) })
}, },
//
tabClick(e) { // tabClick(e) { //
this.activeItem = e.name; //class this.activeItem = e.name; //class
this.tabTitle = e.name; // this.tabTitle = e.name; //
this.where.page = 1
this.orderList = []
this.where.status = e.type
this.commislist()
}, },
// //
close() { close() {
console.log('1111111')
this.$refs.bindmobile.close() this.$refs.bindmobile.close()
this.$refs.bindmobile1.close() this.$refs.bindmobile1.close()
this.$refs.bindmobile2.close() this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close() this.$refs.bindmobile3.close()
}, },
//
detail(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
},
// //
soldEdit() { soldEdit(item) {
this.obj = item
this.$refs.bindmobile.open() this.$refs.bindmobile.open()
}, },
// //
accepted() { accepted() {
this.$refs.bindmobile1.open()
}, },
// //
closingorder() { closingorder(item) {
this.$refs.bindmobile3.open() this.obj = item
this.$refs.bindmobile1.open()
// this.$refs.bindmobile3.open()
},
//
order(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
})
},
//
deteragrss(item) {
finishchain(item.community_id, {
status: 1
}).then((res) => {
console.log(res)
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabTwo"
this.commislist()
this.$refs.bindmobile1.close()
}).catch((err) => {
this.$refs.bindmobile1.close()
this.$util.Tips({
title: err,
icon: 'error'
})
})
}, },
// //
declined() { declined() {
this.$refs.bindmobile2.open() // this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open()
},
//
deleteOrder(item) {
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
})
}, },
// //
auditEdit() { auditEdit() {
}, },
// //
passDelete() { passDelete(item) {
checkchain(item.community_id, {
status: 2
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
}, },
// //
passagree() { passagree(item) {
checkchain(item.community_id, {
status: 1
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
} }
} }
} }
@ -738,7 +832,7 @@
.entrust_bg-content { .entrust_bg-content {
position: absolute; position: absolute;
top: 404rpx; top: 304rpx;
.bg-content-a { .bg-content-a {
margin-left: 242rpx; margin-left: 242rpx;
@ -784,7 +878,7 @@
.bg-content_textarea { .bg-content_textarea {
width: 624rpx; width: 624rpx;
height: 152rpx; height: 242rpx;
padding: 25rpx 18rpx; padding: 25rpx 18rpx;
background: #F5F5F5; background: #F5F5F5;

View File

@ -2,17 +2,23 @@
<view class="gather"> <view class="gather">
<view @click="selectLocation" v-if="isFshow"> <view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}"> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ 'opacity': backColor,}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation"> <view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" <view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
style="color:#000;margin-left: 20rpx;"> style=" margin-left: 20rpx">
</view>
<view class="town_name">{{ street }}</view>
</view> </view>
<view class="town_name" style="color:#000;">{{street}}</view> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
</navigator>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view> <view class="bg-img">
</navigator> <img :src="bgColor" alt="">
</view>
</view> -->
</view> </view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow"> <!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img"> <view class="bg-img">
@ -220,7 +226,6 @@
this.backColor = 'rgba(252, 252, 252, 1)' this.backColor = 'rgba(252, 252, 252, 1)'
this.isFshow = true this.isFshow = true
} }
}, },
@ -370,7 +375,7 @@ this.editFlag = false;
timeout: '10', timeout: '10',
success: (res) => { success: (res) => {
// console.log(res) // console.log(res)
this.isshow = false
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
@ -388,6 +393,7 @@ this.editFlag = false;
}) })
}).catch(err => { }).catch(err => {
this.isshow = false
uni.showToast({ uni.showToast({
title: err, title: err,
icon: 'none' icon: 'none'
@ -395,12 +401,8 @@ this.editFlag = false;
}) })
}, },
fail: (err) => { fail: (err) => {
this.isshow = false
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
} }
}); });
}, },
@ -480,7 +482,9 @@ this.editFlag = false;
/* #ifdef H5 */ /* #ifdef H5 */
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx; padding-right: 20rpx;
// //

View File

@ -658,6 +658,11 @@
that.getConfig(); that.getConfig();
uni.hideLoading(); uni.hideLoading();
}, },
onHide(){
this.CartCount=0
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */

347
pages/guide/guide.vue Normal file
View File

@ -0,0 +1,347 @@
<template>
<view>
<view class="swiper-css zqui-rel" :style="{ height: hpx }">
<swiper class="swiper" :style="{ height: hpx }" :indicator-dots="indicatorDots" :autoplay="autoplay"
disable-touch='true' :interval="interval" :duration="duration" @change="guideAction">
<swiper-item v-for="(item, index) in imageList" :key="index" catchtouchmove="stopChange">
<image class="image-size" mode="widthFix" :src="item.src" />
</swiper-item>
</swiper>
<!-- 按钮样式切换 -->
<template v-if="cur != 2">
<view class=" flex-column dots">
<block v-for="(item,index) in imageList" :key="index">
<view class="dot" :class="{'active': index == cur}"></view>
</block>
</view>
</template>
<!-- 第三张图使用按钮立即进入 -->
<template v-if="cur == 1">
<button class="flex-column cu-btn footer" @click="launchApp">立即体验</button>
</template>
<!-- 右上角跳过按钮 -->
<view class="btn-box" @click="launchApp"><text class="passbtn">{{num}}跳过</text></view>
</view>
</view>
</template>
<script>
const animation = weex.requireModule('animation');
export default {
data() {
return {
//,
imageList: [{
src: '/static/images/guide.png'
}
],
indicatorDots: false,
autoplay: false,
interval: 10000,
duration: 500,
iStatusBarHeight: '0px',
hpx: '100%',
cur: 0,
dotsStyles: '',
num: 3
};
},
onLoad() {
let that = this;
plus.navigator.closeSplashscreen();
uni.getSystemInfo({
success: function(res) {
that.hpx = res.windowHeight + 'px';
}
});
},
onReady() {
// this.move(0, 1);
},
mounted() {
this.countDown()
},
methods: {
countDown() {
let {
num
} = this;
if (num === 3) this.nums = true;
num = num > 0 ? num - 1 : "GO";
setTimeout(() => {
this.num = num;
if (num == 'GO') {
this.launchApp()
return
}
this.countDown();
}, 1000);
},
stopTouchMove: function() {
return false;
},
launchApp() {
//,,
uni.setStorage({
key: 'launchFlag',
data: true,
success() {
uni.switchTab({
url: '/pages/index/index'
})
}
});
},
guideAction(event) {
let that = this,
index = event.detail.current;
that.cur = index;
// if (index == 0) {
// that.move(0, 1);
// that.moveTwo(150, 0.1);
// that.moveThree(150, 0.1);
// that.lefMainAction(0);
// }
// if (index == 1) {
// that.moveTwo(0, 1);
// that.move(150, 0.1);
// that.moveThree(150, 0.1);
// that.lefMainAction(uni.upx2px(80) + 'px');
// }
// if (index == 2) {
// that.moveThree(0, 1);
// that.moveTwo(150, 0.1);
// that.move(150, 0.1);
// that.lefMainAction(uni.upx2px(160) + 'px');
// }
},
lefMainAction(mum) {
var testLM = this.$refs.lefMain;
animation.transition(
testLM, {
styles: {
transform: 'translate(' + mum + ',0px)'
},
duration: 400, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
move(tran, opa) {
var testEl = this.$refs.box1;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box2;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
moveTwo(tran, opa) {
var testEl = this.$refs.box3;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box4;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
moveThree(tran, opa) {
var testEl = this.$refs.box5;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box6;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
}
}
};
</script>
<style lang="scss">
page {
min-height: 100%;
height: 100%;
}
.guide {
width: 100%;
height: 100%;
}
.image-size {
width: 750rpx;
height: 100%;
border: 1px solid red;
}
.title-box {
padding: 250rpx 0 120rpx 64rpx;
}
.guide-title {
font-size: 48rpx;
font-weight: bold;
color: rgba(58, 61, 68, 1);
}
.guide-subtitle {
margin-top: 20rpx;
font-size: 35rpx;
color: rgba(131, 136, 146, 1);
line-height: 50rpx;
}
.footer {
width: 231rpx;
height: 80rpx;
text-align: center;
position: fixed;
bottom: 116rpx;
left: 37%;
font-size: 30rpx;
color: #FFFFFF;
background-color: #2B9939;
}
.btn-box {
position: absolute;
z-index: 999;
right: 40rpx;
top: 120rpx;
}
.dots {
display: flex;
justify-content: center;
position: absolute;
z-index: 999;
height: 151rpx;
left: 0;
right: 0;
bottom: 20rpx;
}
.passbtn {
color: #ffffff;
text-align: center;
border-width: 1rpx;
border-color: rgba(255, 255, 255, 0.5);
border-style: solid;
border-radius: 30rpx;
font-size: 28rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
padding-left: 25rpx;
padding-right: 25rpx;
}
.dot {
margin: 0 4rpx;
width: 15rpx;
height: 15rpx;
background: #CDD2DD;
border-radius: 8rpx;
transition: all .6s;
}
.dot.active {
width: 40rpx;
background: #838892 !important;
}
/* 相对定位 */
.zqui-rel {
position: relative;
}
.swiper-css {
width: 750rpx;
}
.swiper-item {
width: 750rpx;
}
</style>

34
pages/guide/judge.vue Normal file
View File

@ -0,0 +1,34 @@
<template>
<view class="content"></view>
</template>
<script>
export default {
onLoad() {
this.checkGuide();
},
methods: {
checkGuide() {
console.log("进入checkGuide判断页");
//
try {
var launchFlag = uni.getStorageSync('launchFlag');
// console.log("launchFlag:" + launchFlag);
if (launchFlag) { //
uni.switchTab({
url:'/pages/index/index'
})
} else { //
console.log('去引导页');
uni.redirectTo({
url: '/pages/guide/guide'
});
}
} catch (e) {
console.log(e.message);
}
}
}
};
</script>

View File

@ -2,35 +2,52 @@
<view class="Circle_friends"> <view class="Circle_friends">
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view v-if="isFshow"> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ 'background-color': backColor }"> <view class="site-box flex_a_c_j_sb" :style="{ 'opacity': backColor,}">
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation"> <view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" <view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
style="color: #000; margin-left: 20rpx"> style=" margin-left: 20rpx">
</view> </view>
<view class="town_name" style="color: #000">{{ street }}</view> <view class="town_name">{{ street }}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']" style="color: #000"></view> <view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
</navigator> </navigator>
</view> </view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow"> <!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img"> <view class="bg-img">
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </view>
</view> --> </view> -->
</view> </view>
<zbpSwiper ref="list" :isSelectPlace="true" :town="street" :show="show" :location_Arr="locationArr" <zbpSwiper ref="list" :isSelectPlace="true" :town="street" :show="show" :location_Arr="locationArr"
@kkchange="kkchange" @change="dchange"> @change="dchange">
</zbpSwiper> </zbpSwiper>
<view class="tabs_wrapper"> <view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name" <!-- <u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs> :activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
<view class="tabs_wrapper-img">
<image src="@/static/images/zk.png" mode=""></image>
</view> -->
<view class="" style="width: 670rpx;">
<u-tabs :list="tabsData.list" @click="tabsChange" itemStyle=" height: 33px;" lineColor="#F84221"
:current="current" keyName="cate_name" :activeStyle="activeStyle"></u-tabs>
</view>
<view class="tabs_wrapper-img" @click="open">
<image src="@/static/images/zk.png" mode=""></image>
</view>
</view> </view>
<view class=""> </view> <view class=""> </view>
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList="cateGoods" /> <WaterfallsFlow :wfList="productList" @itemTap='itemTap' :type="1" />
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
<view class="empty_wrapper" v-if="emptyShow"> <view class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty> <u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
@ -39,16 +56,39 @@
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm" <u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> @cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-loadmore :status="status" v-if="cateGoods.length >= where.limit" />
<!-- <view class="bg_color"></view> --> <!-- <view class="bg_color"></view> -->
<!-- <m-tabbar native> <!--<m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon"></view> <view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view>
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
<uni-popup ref="popup" type="bottom">
<view class="classpage">
<view class="classpage-one">
全部分类
<image src="@/static/images/cuo.png" mode="" @click="cuo"></image>
</view>
<view class="classpage-two">
点击进入分类
</view>
<view class="classpage-three">
<view class="" v-for="(item,i) in tabsData.list" :key='i' @click="tabsChange2(item,i)">
{{item.cate_name}}
</view>
</view>
</view>
</uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
:isGoIndex="false"></authorize>
<view class="location" v-if="isshow"> <view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view> <view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view> <view class="locationb"> 用于向你推荐最近门店 </view>
@ -61,7 +101,10 @@
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue' import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
import authorize from '@/components/Authorize';
import {
getUserInfo
} from '@/api/user.js';
import { import {
getSlideAPI getSlideAPI
} from '@/api/lihai.js' } from '@/api/lihai.js'
@ -92,19 +135,21 @@
mTabbar, mTabbar,
zbpSwiper, zbpSwiper,
easyLoadimage, easyLoadimage,
WaterfallsFlow WaterfallsFlow,
authorize
}, },
data() { data() {
return { return {
activeStyle: {
isAuto: false, //
isShowAuth: false, //
activeStyle: {
color: '#333333', color: '#333333',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.04)' transform: 'scale(1.04)'
}, },
isshow: false, isshow: false,
locationArr: ({}), locationArr: ({}),
status: 'loadmore',
bgColor: '', bgColor: '',
showPicker: false, showPicker: false,
columnData: [], columnData: [],
@ -120,82 +165,77 @@
where: { where: {
category_id: 0, category_id: 0,
page: 1, page: 1,
limit: 6 limit: 10
}, },
loadend: false,
loading: false,
loadTitle: '加载更多',
currentItemId: 69, // 0 || 69 currentItemId: 69, // 0 || 69
keyword: '', keyword: '',
location: '', location: '',
emptyShow: false, emptyShow: false,
street: '', street: '',
cateGoods: [], productList: [],
recoList: [], recoList: [],
articleList: [], articleList: [],
streeta_id: '', streeta_id: '',
street: '', street: '',
bgColor: '', bgColor: '',
backColor: 'rgba(252, 252, 252, 0)', backColor: 0,
isFshow: false, isFshow: false,
scrollTop: 0, scrollTop: 0,
show: true show: true,
userid: '',
current:0
} }
}, },
onShow() {
//
uni.onNetworkStatusChange((res) => {
// truefalse
if (res.isConnected) {
this.getCateList()
this.getGoods()
this.Area()
uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = ''
if (connectstatus == true) {
connectstr = '已连接'
this.getRegistrationID()
} else {
connectstr = '未连接'
}
this.connectstatus = connectStr
})
}
});
},
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList() this.getCateList()
this.cateGoods = [] this.getGoods(true)
this.getGoods()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onLoad() { onLoad() {
this.selfLocation()
this.getCateList() this.getCateList()
// this.getArticle() //this.getArticle()
this.getGoods() this.getGoods(true)
this.Area() this.Area()
//this.setPermissions() //this.setPermissions()
// this.openTongZhi() // this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = ''
if (connectstatus == true) {
connectstr = '已连接'
this.getRegistrationID()
} else {
connectstr = '未连接'
}
this.connectstatus = connectStr
})
},
onTabItemTap(e) {
console.log(e)
if (e.text.length >= 4) {
uni.pageScrollTo({
selector: ".Circle_friends",
scrollTop: 0
})
}
},
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getGoods()
},
mounted() {
this.selfLocation()
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
}, },
onTabItemTap(e) { onTabItemTap(e) {
uni.pageScrollTo({ uni.pageScrollTo({
@ -205,13 +245,37 @@
}, },
onReachBottom() { onHide() {
if (this.status == 'nomore') return; this.getGoods(true)
this.status = 'loading';
this.where.page = ++this.where.page; uni.pageScrollTo({
this.getGoods() selector: ".Circle_friends",
scrollTop: 0
})
uni.setTabBarItem({
index: 0,
text: "泸州",
iconPath: '/static/tabbar_icon/a.png',
selectedIconPath: '/static/tabbar_icon/a-a.png'
});
this.isFshow = false
}, },
onReachBottom() {
if (this.productList.length > 0) {
setTimeout(() => {
this.getGoods(false);
}, 1000)
} else {
this.get_host_product();
}
},
mounted() { mounted() {
this.getUserInfo()
this.selfLocation() this.selfLocation()
// #ifdef H5 // #ifdef H5
// //
@ -221,9 +285,10 @@
this.$bus.$on('value-updated', (newValue) => { this.$bus.$on('value-updated', (newValue) => {
// //
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
}); });
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
@ -232,7 +297,7 @@
// //
if (scrollTop <= 20) { if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0.0)' this.backColor = 0
this.isFshow = false this.isFshow = false
this.show = true this.show = true
uni.setTabBarItem({ uni.setTabBarItem({
@ -242,11 +307,11 @@
selectedIconPath: '/static/tabbar_icon/a-a.png' selectedIconPath: '/static/tabbar_icon/a-a.png'
}); });
} else if (20 < scrollTop && scrollTop <= 100) { } else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(255, 255, 255, 0.5)' this.backColor = 0.5
this.isFshow = true this.isFshow = true
this.show = false this.show = false
} else if (scrollTop > 100) { } else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1.0)' this.backColor = 1
this.isFshow = true this.isFshow = true
this.show = false this.show = false
this.$nextTick(() => { this.$nextTick(() => {
@ -267,7 +332,55 @@
this.$bus.$off('value-updated') this.$bus.$off('value-updated')
}, },
methods: { methods: {
//
open() {
this.$refs.popup.open()
},
//
cuo() {
this.$refs.popup.close()
},
//
onLoadFun(data) {
this.getUserInfo();
this.isShowAuth = false;
},
/**
* 获取个人用户信息
*/
getUserInfo() {
getUserInfo().then(res => {
this.userid = res.data.uid
});
},
//
itemTap(item) {
if (this.userid) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}&uid=${this.userid}&user=1`
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.userid}&user=1`
// #endif
})
} else {
uni.navigateTo({
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
})
}
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
//
authColse: function(e) {
this.isShowAuth = e
},
scrolling() { scrolling() {
// //
let scrollTop = let scrollTop =
@ -292,7 +405,7 @@
// console.log("header "); // console.log("header ");
} }
if (scrollTop <= 20) { if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0.0)' this.backColor = 0
this.isFshow = false this.isFshow = false
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 0,
@ -301,10 +414,10 @@
selectedIconPath: '/static/tabbar_icon/a-a.png' selectedIconPath: '/static/tabbar_icon/a-a.png'
}); });
} else if (20 < scrollTop && scrollTop <= 100) { } else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(255, 255, 255, 0.5)' this.backColor = 0.5
this.isFshow = true this.isFshow = true
} else if (scrollTop > 100) { } else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1.0)' this.backColor = 1
this.isFshow = true this.isFshow = true
uni.setTabBarItem({ uni.setTabBarItem({
@ -320,12 +433,8 @@
kkchange(e) {
this.bgColor = e
},
tabsChange1(item) { tabsChange1(item) {
this.getArticleList(item.article_category_id) this.getArticleList(item.article_category_id)
this.streeta_id = item.id this.streeta_id = item.id
this.tabsData1.tabsActive = item.index this.tabsData1.tabsActive = item.index
@ -455,30 +564,33 @@
} }
}) })
}, },
getGoods: function(item) { getGoods: function(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
graphicLstApi(this.where).then(res => { if (isPage === true) that.$set(that, 'productList', []);
this.cateGoods.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore' that.loading = true;
that.loadTitle = '';
graphicLstApi(that.where).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'productList', productList);
}, 500)
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true // console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1);
// if (item) { if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
// if (item.index == 1 && this.cateGoods[0]) { that.loading = false;
// uni.navigateTo({ that.loadTitle = '加载更多';
// // #ifdef MP || H5 });
// url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
// // #endif
// // #ifdef APP
// url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// // #endif
// })
// }
// }
})
}, },
/*获取分类列表*/ /*获取分类列表*/
async getCateList() { async getCateList() {
@ -486,22 +598,39 @@
data data
} = await getTopicList() } = await getTopicList()
this.tabsData.list = [{ this.tabsData.list = [{
cate_name: "推荐", cate_name: "热门推荐",
category_id: 0 category_id: 0
}, ...data] }, ...data]
}, },
tabsChange(item) { tabsChange(item) {
this.cateGoods = []
this.productList = []
this.where.category_id = item.category_id this.where.category_id = item.category_id
this.emptyShow = false this.emptyShow = false
this.status = 'loadmore' this.loadend = false;
this.where.page = 1 this.$set(this.where, 'page', 1)
this.getGoods(item) this.getGoods(true)
this.street_id = item.id this.street_id = item.id
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
this.current = item.index
},
tabsChange2(item,index) {
// console.log(item,index)
this.productList = []
this.where.category_id = item.category_id
this.$refs.popup.close()
this.emptyShow = false
this.loadend = false;
this.$set(this.where, 'page', 1)
this.getGoods(true)
this.tabsData.tabsActive = index
this.current = index
}, },
selfLocation() { selfLocation() {
if (uni.getStorageSync('loction') == true) { if (uni.getStorageSync('loction') == true) {
this.isshow = false this.isshow = false
} else { } else {
@ -510,7 +639,7 @@
} }
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '10', timeout: '1000',
success: (res) => { success: (res) => {
this.isshow = false this.isshow = false
let latitude, longitude; let latitude, longitude;
@ -520,6 +649,7 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
let town = res.data.address_reference.town.title let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
@ -530,6 +660,7 @@
}) })
}).catch(err => { }).catch(err => {
this.isshow = false
uni.showToast({ uni.showToast({
title: err, title: err,
icon: 'none' icon: 'none'
@ -538,11 +669,7 @@
}, },
fail: (err) => { fail: (err) => {
this.isshow = false this.isshow = false
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
} }
}); });
}, },
@ -677,6 +804,57 @@
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%); background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
} }
.classpage {
width: 100%;
height: calc(100vh - 50px);
background-color: #fff;
position: relative;
padding-top: 40rpx;
padding-left: 40rpx;
padding-right: 10rpx;
.classpage-one {
text-align: center;
image {
position: absolute;
right: 25rpx;
width: 42rpx;
height: 42rpx;
}
}
.classpage-two {
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 77rpx;
}
.classpage-three {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 35rpx;
view {
margin-right: 20rpx;
margin-bottom: 14rpx;
width: 210rpx;
height: 81rpx;
line-height: 81rpx;
text-align: center;
background: #FFFFFF;
border-radius: 11rpx 11rpx 11rpx 11rpx;
opacity: 1;
border: 2rpx solid #707070;
}
}
}
// .bg-img { // .bg-img {
// position: absolute; // position: absolute;
// width: 100%; // width: 100%;
@ -737,6 +915,8 @@
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5; // background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx; padding-right: 20rpx;
@ -755,6 +935,7 @@
.iconfont { .iconfont {
opacity: 0; opacity: 0;
color: #fff;
font-size: 30rpx; font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
@ -772,8 +953,9 @@
} }
/deep/.u-tabs__wrapper__nav__item { /deep/.u-tabs__wrapper__nav__item {
padding: 0 0px; // padding: 0 0px;
padding-right: 10rpx; padding-left: 0rpx;
padding-right: 20rpx;
} }
.search_wrapper { .search_wrapper {
@ -783,9 +965,29 @@
.tabs_wrapper { .tabs_wrapper {
width: 720rpx; width: 720rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 21.05rpx; margin-bottom: 21.05rpx;
// margin-left: -20rpx; // margin-left: -20rpx;
position: relative;
}
.tabs_wrapper-img {
width: 40rpx;
height: 60rpx;
position: absolute;
z-index: 888;
background-color: #fff;
right: 0rpx;
top: 0;
image {
width: 40rpx;
height: 40rpx;
margin-top: 10rpx;
}
} }
.empty_wrapper { .empty_wrapper {

View File

@ -1,266 +1,324 @@
<template> <template>
<view class="gather"> <view class="gather">
<block v-if="isShow"> <block v-if="isShow">
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'"> <view class="" v-if="userInfoData.mer_info.setup_status==1">
<view class="special_work com" v-if="true"> <view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
<view class="title">市级供应链</view> <view class="special_work com" v-if="true">
<view class="content"> <view class="title">市级供应链</view>
<view class="examine" <view class="content">
@click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)"> <view class="examine"
<image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image> @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
<text class="text">在售管理</text> <image class="icon_img" :src="`${prefix}zsgl.png`" mode="aspectFill"></image>
</view> <text class="text">在售管理</text>
<view class="examine" </view>
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)"> <view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/admin/financial_management/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text> <text class="text">财务管理</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)"> @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"></image>
</image> <text class="text">订单管理</text>
<text class="text">入库管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<!-- <view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
<image class="icon_img"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png" mode="aspectFill">
</image>
<text class="text">视频教学</text>
</view> --> </view> -->
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image>
<text class="text">财务公开</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view> -->
</view>
</view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeStore'">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
<view class="content ">
<view class="examine" <view class="examine"
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)"> @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)">
<!-- @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`) -->
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text>
</view>
<view class="examine"
@click="navigator('/pages/users/order_list/indexCopy?status=-1&product_type=98')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
</view>
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image> </image>
<text class="text">入库管理</text> <text class="text">入库管理</text>
</view> </view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
<text class="text">商户设置</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)"> <view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image> </image>
<text class="text">提现管理</text> <text class="text">提现管理</text>
</view> </view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)"> @click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image> </image>
<text class="text">订单核销</text> <text class="text">订单核销</text>
</view> </view>
<view class="examine" <!-- <view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
</image>
<text class="text">交易大厅</text>
</view>
<view class="examine"
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)"> @click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image> </image>
<text class="text">委托销售</text> <text class="text">委托销售</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)"> <view class="examine"
<image class="icon_img" src="@/static/images/fabu.png" mode="aspectFill"> @click="navigator(`/pages/users/order_list/relase?mer_id=${mer_id}&status=-1`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image> </image>
<text class="text">发布管理</text> <text class="text">委托订单</text>
</view> --> </view> -->
<!-- <view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
<image class="icon_img"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png" mode="aspectFill">
</image>
<text class="text">视频教学</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)"> <!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image>
<text class="text">财务公开</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view> -->
</view>
</view>
</view>
<view class="business com"
v-if="userInfoData.mer_info.type_code === 'TypeStore'||userInfoData.mer_info.type_code === 'TypeTownSupplyChain'">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
<view class="content ">
<!-- <view class="examine"
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text>
</view>
<view class="examine"
@click="navigator('/pages/users/order_list/indexCopy?status=-1&product_type=98')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view> -->
<view class="examine"
@click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
</view>
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image>
<text class="text">入库管理</text>
</view>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
</image>
<text class="text">交易大厅</text>
</view>
<view class="examine"
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image>
<text class="text">委托销售</text>
</view>
<view class="examine"
@click="navigator(`/pages/users/order_list/relase?mer_id=${mer_id}&status=-1`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image>
<text class="text">委托订单</text>
</view>
<view class="examine"
@click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/fabu.png" mode="aspectFill">
</image>
<text class="text">发布管理</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image> </image>
<text class="text">财务公开</text> <text class="text">财务公开</text>
</view> --> </view> -->
</view>
</view> </view>
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view> </view>
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view> </view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeCloudWarehouse'"> <view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeCloudWarehouse'">
<view class="business com" v-if="true"> <view class="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">里海云仓</view> <view class="title">里海云仓</view>
<view class="content "> <view class="content ">
<view class="examine" <view class="examine"
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)"> @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text> <text class="text">供货采购</text>
</view> </view>
<view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')"> <view class="examine" @click="navigator('/pages/users/order_list/index?status=-1')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text> <text class="text">进货管理</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)"> <view class="examine"
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill"> @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
</image> <image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
<text class="text">扫码出库</text> </image>
</view> <text class="text">扫码出库</text>
<view class="examine" </view>
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)"> <view class="examine"
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill"> @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=2`)">
</image> <image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
<text class="text">入库管理</text> </image>
</view> <text class="text">入库管理</text>
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)"> </view>
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill"> <view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
</image> <image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
<text class="text">提现管理</text> </image>
</view> <text class="text">提现管理</text>
</view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)"> @click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image> </image>
<text class="text">客服记录</text> <text class="text">客服记录</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)"> @click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image> </image>
<text class="text">订单核销</text> <text class="text">订单核销</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)"> @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image> </image>
<text class="text">订单管理</text> <text class="text">订单管理</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)"> <view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image> </image>
<text class="text">商品管理</text> <text class="text">商品管理</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')"> @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image> </image>
<text class="text">商户设置</text> <text class="text">商户设置</text>
</view> </view>
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)"> <!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
</image> </image>
<text class="text">财务公开</text> <text class="text">财务公开</text>
</view> --> </view> -->
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="business com"
v-if="userInfoData.mer_info.type_code === 'TypeFeaturedCultural'|| userInfoData.mer_info.type_code === 'TypeFamousSpecialties'|| userInfoData.mer_info.type_code === 'TypeLocalCuisine' ">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
<view class="content ">
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
</view>
</view>
</view>
</view>
</view> </view>
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeFeaturedCultural'|| userInfoData.mer_info.type_code === 'TypeFamousSpecialties'|| userInfoData.mer_info.type_code === 'TypeLocalCuisine' "> <view class="" v-else>
<view class="business com" v-if="true"> <view class="business com">
<view class="special_work com"> <view class="special_work com">
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
<view class="content "> <view class="content ">
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
</image>
<text class="text">提现管理</text>
</view>
<view class="examine"
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
</image>
<text class="text">客服记录</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
</image>
<text class="text">订单核销</text>
</view>
<view class="examine"
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
</image>
<text class="text">订单管理</text>
</view>
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
</image>
<text class="text">商品管理</text>
</view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')"> @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
@ -272,7 +330,6 @@
</view> </view>
</view> </view>
</block> </block>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
@ -362,8 +419,6 @@
}, },
mounted() { mounted() {
this.appLocation() this.appLocation()
}, },

View File

@ -21,10 +21,11 @@
<view v-else> <view v-else>
<view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'> <view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'>
<view class='pictrue' v-if="isGoodsReturn==false"> <view class='pictrue' v-if="isGoodsReturn==false">
<image v-if="orderInfo.status != 9&&orderInfo.status !=12" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'"> <image v-if="orderInfo.status != 9&&orderInfo.status !=12"
:src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'">
</image> </image>
<image v-else :src="imgUrl+'/static/order_2.gif'"></image> <image v-else :src="imgUrl+'/static/order_2.gif'"></image>
</view> </view>
<view class='data' :class='isGoodsReturn ? "on":""'> <view class='data' :class='isGoodsReturn ? "on":""'>
@ -60,10 +61,19 @@
<view :class="orderInfo.order_status == 5 ? 'on':''">已完成</view> <view :class="orderInfo.order_status == 5 ? 'on':''">已完成</view>
</view> </view>
<view class='progress acea-row row-between-wrapper'> <view class='progress acea-row row-between-wrapper'>
<view class='iconfont icon-webicon318 t-color'
v-if=" orderInfo.order_status == 8||orderInfo.order_status == 9||orderInfo.order_status == 1"> <view
v-if="orderInfo.order_status == 8||orderInfo.order_status == 9||orderInfo.order_status == 1">
<view class='iconfont icon-webicon318 t-color'>
</view>
<view class='iconfont t-color'></view>
</view> </view>
<view class='iconfont t-color' else></view> <view class="" v-else>
<view class='iconfont icon-yuandianxiao t-color'>
</view>
<view class='iconfont t-color'></view>
</view>
<view class='line b-color'></view> <view class='line b-color'></view>
<view class='iconfont' <view class='iconfont'
:class='((orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'> :class='((orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'>
@ -73,13 +83,17 @@
</view> </view>
<view class='iconfont' <view class='iconfont'
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 && orderInfo.status != 9 ? "t-color":"")' :class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status > 3 && orderInfo.status != 9 ? "t-color":"")'
v-if="orderInfo.order_type == 0"></view> v-if="orderInfo.order_type == 0"></view>
<view class='line' :class='orderInfo.status > 1 && orderInfo.status != 9 ? "b-color":""' <view class='line' :class='orderInfo.status > 1 && orderInfo.status != 9 ? "b-color":""'
v-if="orderInfo.order_type == 0"></view> v-if="orderInfo.order_type == 0"></view>
<view class='iconfont' <view class='iconfont'
:class='(orderInfo.status == 2 && orderInfo.status != 9&& orderInfo.order_status != 8 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 && orderInfo.status != 9 ? "t-color":"")'> :class='(orderInfo.status == 2 && orderInfo.status != 9&& orderInfo.order_status != 8 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 && orderInfo.status != 9 ? "t-color":"")'>
</view> </view>
<view class='line' :class='orderInfo.status > 2 && orderInfo.status != 9 ? "b-color":""'> <view class='line' :class='orderInfo.status > 2 && orderInfo.status != 9 ? "b-color":""'>
</view> </view>
<view class='iconfont' <view class='iconfont'
@ -327,7 +341,7 @@
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流 hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流
</navigator> </navigator>
<view class="" v-if="orderInfo.activity_type==98"> <view class="" v-if="orderInfo.activity_type==98||orderInfo.activity_type==99">
<view class='bnt b-color' @tap='confirmOrdera(orderInfo)' v-if="orderInfo.pay_type==8">确认收货 <view class='bnt b-color' @tap='confirmOrdera(orderInfo)' v-if="orderInfo.pay_type==8">确认收货
</view> </view>
<view class='bnt b-color' @tap='confirmOrderb(orderInfo)' v-else>确认收货 <view class='bnt b-color' @tap='confirmOrderb(orderInfo)' v-else>确认收货

View File

@ -232,6 +232,17 @@
}) })
} }
} else if (this.product_type == 99) {
if(val==1){
uni.navigateTo({
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}`
})
}else{
uni.navigateTo({
url: `/pages/users/order_list/relase?status=0&product_type=${this.product_type}`
})
}
} else { } else {
if(val==1){ if(val==1){
uni.navigateTo({ uni.navigateTo({

File diff suppressed because it is too large Load Diff

View File

@ -187,7 +187,7 @@
// #endif // #endif
}, },
onLoad(options) { onLoad(options) {
console.log(options.type);
this.id = options.id; this.id = options.id;
this.order_id = options.order_id; this.order_id = options.order_id;
this.tabActive = options.type || 1; this.tabActive = options.type || 1;

View File

@ -140,11 +140,11 @@
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize> </authorize>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon" style="margin-top: -50rpx;"></view> <view class="custom_style_icon"></view>
<view class="" style="color: red;"> <view class="custom_style-txt" style="color: red;">
发布 发布
</view> </view>
</view> </view>
@ -680,6 +680,36 @@
page { page {
background: #F5F5F5; background: #F5F5F5;
} }
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
&_icon {
background-image: url('@/static/tabbar_icon/d-a.png');
background-repeat: no-repeat;
background-size: cover;
font-size: 80rpx;
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
}
.custom_style-txt{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
}
}
.crop_btn { .crop_btn {
line-height: 90rpx; line-height: 90rpx;
@ -783,6 +813,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 100;
.iconfont { .iconfont {
color: #ffffff; color: #ffffff;

View File

@ -162,22 +162,22 @@
<checkbox-group class="select_group flex_start" @change="deliveryWayChange"> <checkbox-group class="select_group flex_start" @change="deliveryWayChange">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value"> <label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view> <view>
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value)" /> <checkbox :value="val.value" disabled :checked="val.value" />
</view> </view>
<view>{{ val.name }}</view> <view>{{ val.name }}</view>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view>
<view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item"> <!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<view class="popup_group_item_label">是否包邮</view> <view class="popup_group_item_label">是否包邮</view>
<view class="popup_group_item_value"> <view class="popup_group_item_value">
<view class="popup_group_item_message"> <view class="popup_group_item_message">
<switch :checked="setFormData.delivery_free == '1'" color="#E93323" <switch :checked="setFormData.delivery_free == '1'" color="#E93323"
style="transform:scale(0.8)" @change="deliveryFreeChange" /> style="transform:scale(0.8)" @change="deliveryFreeChange" disabled="true"/>
</view> </view>
</view> </view>
</view> </view> -->
<view class="popup_group_item" <view class="popup_group_item"
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0" v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
@ -304,7 +304,7 @@
specifica: '', // specifica: '', //
setSpecificaValue: '', // setSpecificaValue: '', //
setSpecificaValue2: '', setSpecificaValue2: '',
delivery_way: [], // 1 2 delivery_way: [1,2], // 1 2
delivery_free: '1', // 0 1 delivery_free: '1', // 0 1
temp_id: '', // ID temp_id: '', // ID
tempName: '' // tempName: '' //
@ -407,7 +407,7 @@
this.bar_code_dis = true this.bar_code_dis = true
} }
this.initData(); this.initData();
this.getDeliveryType(); // this.getDeliveryType();
if (this.product_id) { if (this.product_id) {
this.initDataEditData(); this.initDataEditData();
} }

View File

@ -72,9 +72,9 @@
<view class="flex_a_c"> <view class="flex_a_c">
<text class="sub_title">配送方式</text> <text class="sub_title">配送方式</text>
<view class="flex"> <view class="flex">
<checkbox-group name="" @change="checkboxChange"> <checkbox-group name="" @change="checkboxChange" >
<checkbox :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text> <checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text>
<checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text> <checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text>
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
@ -133,10 +133,10 @@
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话"> <input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view> </view>
<view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" > <!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch> <u-switch v-model="credit_buy" @change="change"></u-switch>
</view> </view> -->
<view class="item_cell flex_a_c" v-if="credit_buy"> <view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天"> <input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
@ -146,7 +146,7 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %"> <input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view> </view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> <!-- <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell"> <!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb"> <view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text> <text class="sub_title">是否开启商户</text>
@ -217,7 +217,7 @@
}, },
isZiti: false, isZiti: false,
isKuaidi: false, isKuaidi: false,
delivery_way: [], delivery_way: [1,2],
takeName: '', takeName: '',
takePhone: '', takePhone: '',
servicePhone: '', servicePhone: '',
@ -274,6 +274,9 @@
onLoad(e) { onLoad(e) {
this.id = e.mer_id this.id = e.mer_id
this.getMerchantInfo(e.mer_id) this.getMerchantInfo(e.mer_id)
this.isZiti = true
this.isKuaidi = true
}, },
onShow() {}, onShow() {},
methods: { methods: {
@ -281,7 +284,7 @@
merchantInfoAPI({ merchantInfoAPI({
id id
}).then(res => { }).then(res => {
console.log(res); this.mer_name= res.data.mer_name
this.images[0].img = res.data.mer_banner this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar this.images[1].img = res.data.mer_avatar
this.images[2].img = res.data.mini_banner this.images[2].img = res.data.mini_banner
@ -302,7 +305,7 @@
this.mer_take_time = res.data.mer_take_time this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword this.cruxText = res.data.mer_keyword
this.mer_name= res.data.mer_name
this.servicePhone = res.data.service_phone this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false this.merState = res.data.mer_state === 1 ? true : false
@ -367,7 +370,7 @@
mer_avatar: this.images[1].img, mer_avatar: this.images[1].img,
mini_banner: this.images[2].img, mini_banner: this.images[2].img,
mer_certificate: this.images[3].img, mer_certificate: this.images[3].img,
delivery_way: this.delivery_way, delivery_way: [1,2],
mer_take_name: this.takeName, mer_take_name: this.takeName,
mer_take_phone: this.takePhone, mer_take_phone: this.takePhone,
mer_take_address: this.detailSite, mer_take_address: this.detailSite,

File diff suppressed because one or more lines are too long

View File

@ -149,7 +149,7 @@
<view class="picture"> <view class="picture">
<image class="image" :src="goods.spu.image"></image> <image class="image" :src="goods.spu.image"></image>
</view> </view>
<view class="product-text"> <view class="product-text" >
<text class="name line1" <text class="name line1"
v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text> v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text>
<text class="name line1" <text class="name line1"
@ -226,19 +226,19 @@
<text class="count">{{item.relevance.length}}</text> <text class="count">{{item.relevance.length}}</text>
</view> </view>
</view> </view>
<view v-if="showManage" class="manage"> <view v-if="showManage == item.author.uid" class="manage">
<view class="manage-gou"></view> <view class="manage-gou"></view>
<navigator hover-class="none" <navigator hover-class="none"
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'" :url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
class="items"> class="items">
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;"> <image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;">
</image> </image>
<text class="text">编辑</text> <text class="text" style="margin-left: 20rpx;">编辑</text>
</navigator> </navigator>
<view class="items" @click.stop="deleteTopic(item)"> <view class="items" @click.stop="deleteTopic(item)">
<image src="../static/img/index/video-delete.png" <image src="../static/img/index/video-delete.png"
style="width: 16px; height: 16px;"></image> style="width: 16px; height: 16px;"></image>
<text class="text">删除</text> <text class="text" style="margin-left: 20rpx;">删除</text>
</view> </view>
</view> </view>
<!-- 1.视频预览时的图片currenttimes就是获取当前滑块的时间点如果不需要可以注释掉 --> <!-- 1.视频预览时的图片currenttimes就是获取当前滑块的时间点如果不需要可以注释掉 -->
@ -358,6 +358,7 @@
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { navigateBack } from '../../../libs/uniApi';
export default { export default {
computed: configMap({ computed: configMap({
statusBarHeight: 0, statusBarHeight: 0,
@ -401,7 +402,7 @@
newTime: 0, //跟手滑动后的最新时间💗 newTime: 0, //跟手滑动后的最新时间💗
timeNumber: 0, //🌟💗 timeNumber: 0, //🌟💗
ProgressBarBottom: 20, //进度条离底部的距离💗 ProgressBarBottom: 20, //进度条离底部的距离💗
object_fit: 'cover', //视频样式默认包含🌟💗 object_fit: 'contain', //视频样式默认包含🌟💗
mode: 'aspectFit', //图片封面样式🌟💗 mode: 'aspectFit', //图片封面样式🌟💗
timeout: "", //🌟用来阻止 setTimeout()方法 timeout: "", //🌟用来阻止 setTimeout()方法
voice: "", //🌟用来阻止 setTimeout()方法 voice: "", //🌟用来阻止 setTimeout()方法
@ -501,7 +502,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度 this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度 this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据 this.get() //这一步,加载视频数据
// if (this.isLogin) this.getUserInfo() if (this.isLogin) this.getUserInfo()
}, },
onReady() {}, onReady() {},
methods: { methods: {
@ -637,17 +638,23 @@
content: '确定要删除该话题么?', content: '确定要删除该话题么?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log(item.community_id)
deletePlantApi(item.community_id).then(res => { deletePlantApi(item.community_id).then(res => {
if (res.status === 200) { console.log(res)
if (res.status == 200) {
that.$util.Tips({ that.$util.Tips({
title: res.message title: res.message
}); });
setTimeout(function() { // setTimeout(function() {
uni.redirectTo({ // uni.redirectTo({
url: '/pages/plantGrass/plant_user/index?id=' + // url: '/pages/plantGrass/plant_user/index?id=' +
item.uid // item.uid
// })
// }, 1000);
uni.navigateBack({
delta:1,
}) })
}, 1000);
} }
}) })
} else if (res.cancel) { } else if (res.cancel) {
@ -855,6 +862,7 @@
}, },
scrolls(event) { scrolls(event) {
this.showManage = false; this.showManage = false;
this.isDragging = event.isDragging; this.isDragging = event.isDragging;
if (!event.isDragging) { //isDragging判断用户是不是在滑动滑动true停止滑动false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦 if (!event.isDragging) { //isDragging判断用户是不是在滑动滑动true停止滑动false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦
@ -1238,7 +1246,8 @@
left: 0; left: 0;
top: 70rpx; top: 70rpx;
height: 86rpx; height: 86rpx;
.icon-xiangzuo { .icon-xiangzuo {
margin-left: 10px; margin-left: 10px;
@ -1405,7 +1414,7 @@
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
padding: 0 8px; padding: 0 8px;
position: absolute; position: absolute;
bottom: 10px; bottom: 185px;
right: 60px; right: 60px;
border-radius: 8px; border-radius: 8px;
@ -1541,7 +1550,8 @@
.product-item { .product-item {
width: 444rpx; width: 444rpx;
height: 136rpx; height: 136rpx;
background: rgba(0, 0, 0, .55); // background: rgba(0, 0, 0, .55);
background-color: #F4F4F4;
border-radius: 12rpx; border-radius: 12rpx;
padding: 16rpx 15rpx; padding: 16rpx 15rpx;
margin-right: 30rpx; margin-right: 30rpx;
@ -1587,7 +1597,8 @@
.name { .name {
font-size: 24rpx; font-size: 24rpx;
width: 286rpx; width: 286rpx;
color: #fff; // color: #fff;
color: #000;
} }
.product-price { .product-price {
@ -1602,7 +1613,8 @@
.sm, .sm,
.money { .money {
color: #ffffff; // color: #ffffff;
color: #000;
font-size: 24rpx; font-size: 24rpx;
} }
} }

View File

@ -1767,7 +1767,7 @@
margin-top: 27rpx; margin-top: 27rpx;
.product-item { .product-item {
display: inline-block; display: inline-block;
width: 444rpx; width: 444rpx;
height: 136rpx; height: 136rpx;
background: rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .55);

View File

@ -1,65 +1,6 @@
<template> <template>
<view class="merchant-details"> <view class="merchant-details">
<view style="height: var(--status-bar-height);"></view> <view class="top">
<view class="tit">
<u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/succes.png"
width="348.83rpx" height="271.77rpx" @click="goBack"></u--image>
恭喜您的申请已通过
</view>
<view class="content">
<view class="steps">
<u-steps current="3" direction="column" mode="number">
<u-steps-item title="运输中" desc="11:40">
<!-- <u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/CGBZ.png"
width="31.54rpx" height="31.54rpx"></u--image> -->
<!-- <u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/succes.png" width="348.83rpx" height="271.77rpx"
@click="goBack"></u--image> -->
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="待审核" desc="10:35">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="审核通过" desc="11:40">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
</u-steps>
</view>
<view class="msg" v-if="mer_id > 0 && resData.login_url" @click="copyTBL()">
<view style="margin-bottom: 20rpx;">
<text style="font-weight: bold;">登录地址</text>
<text class="">{{resData.login_url}}</text>
</view>
<view>
<text style="font-weight: bold;">商户账号</text>
<text class="">{{resData.phone}}</text>
</view>
<!-- <view class=" phone">
<view class="">
<text class="head">商户账号</text>
<text class="content">{{resData.phone}}</text>
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view> -->
</view>
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
<view class="btn_bottom" @click="navgo(`/pages/product/basicSet?mer_id=${mer_id}`)">
<u-button type="primary" style="background-color: #3274F9;border-radius: 30rpx;border: none;"
text="完善商户信息"></u-button>
</view>
<!-- <view class="top">
<image class="img" src="../static/images/successTop.png" mode=""></image> <image class="img" src="../static/images/successTop.png" mode=""></image>
<view class="title"> <view class="title">
恭喜您的申请已通过 恭喜您的申请已通过
@ -77,8 +18,12 @@
</view> </view>
<text class="cope" @click="copyTBL()">复制</text> <text class="cope" @click="copyTBL()">复制</text>
</view> </view>
</view> --> </view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
</view> </view>
</template> </template>
@ -109,11 +54,6 @@
} }
}, },
methods: { methods: {
navgo(url) {
uni.navigateTo({
url
})
},
getGoodsDetails(id) { getGoodsDetails(id) {
getGoodsDetails(id).then(res => { getGoodsDetails(id).then(res => {
this.resData = res.data this.resData = res.data
@ -198,100 +138,69 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.merchant-details { .merchant-details {
padding: 0 4vw; display: flex;
// padding: ; flex-direction: column;
align-items: center;
background-color: #fff;
height: 100vh; height: 100vh;
position: relative; position: relative;
// background-color: #C5D9FD;
background-image: url("../../../static/images/SJRZ/bg.png");
background-repeat: no-repeat;
position: relative;
.tit {
color: white;
font-size: 33.29rpx;
text-align: center;
// padding: 50vh 0;
transform: translateY(5vh);
display: flex;
// justify-content: space-around;
flex-direction: column;
align-items: center;
}
.content {
background-color: white;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
// transform: translateY(20vh);
margin-top: 100rpx;
box-sizing: border-box;
padding: 2vw;
// .steps {}
.msg {
width: 85%;
padding: 30rpx;
// height: 150rpx;
margin: 30rpx auto;
background-color: #F4F7FE;
border-radius: 8rpx;
.li {
// margin-: ;
// display: flex;
// justify-content: left;
// display: flex;
// flex-shrink: 1;
}
}
}
.top { .top {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.img { .img {
width: 340rpx; width: 340rpx;
height: 280rpx; height: 280rpx;
margin: 140rpx 0 30rpx 0; margin: 140rpx 0 30rpx 0;
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
} }
.msg {
width: 85%;
.btn { padding: 30rpx;
// width: 70%; height: 150rpx;
// position: absolute; margin: 70rpx 70rpx;
// text-align: center; background-color: #F6F6F6;
// color: #999999; border-radius: 8rpx;
// font-size: 24rpx; .url {
// bottom: 80rpx display: flex;
// background-color: red; flex-wrap: nowrap;
// height: 100vw; margin-bottom: 20rpx;
margin-top: 5vw; }
.phone {
display: flex;
justify-content: space-between;
}
.head {
color: #333333;
font-size: 28rpx;
font-weight: 500;
white-space: nowrap;
}
.content {
color: #999999;
font-size: 26rpx;
}
.cope {
padding: 5rpx 16rpx;
color: #FFFFFF;
border-radius: 30rpx;
background-color: #999999;
margin-left: 40rpx;
font-size: 20rpx;
}
} }
.btn {
.btn_bottom { width: 70%;
position: fixed; position: absolute;
width: 92vw; text-align: center;
bottom: 20rpx; color: #999999;
font-size: 24rpx;
bottom: 80rpx
} }
} }
</style> </style>

View File

@ -2,19 +2,22 @@
<view class="Circle_friends"> <view class="Circle_friends">
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view v-if="isFshow"> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}"> <view class="site-box flex_a_c_j_sb" :style="{'opacity':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation"> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" <view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
style="color:#000;margin-left: 20rpx;">
</view> </view>
<view class="town_name" style="color:#000;">{{street}}</view> <view class="town_name">{{street}}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view> <view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
</navigator> </navigator>
</view> </view>
</view> </view>
<zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr" <zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr"
@change="dchange"> @change="dchange">
</zbpSwiper> </zbpSwiper>
@ -70,8 +73,6 @@
</view> </view>
<view class="list-con"> <view class="list-con">
<!-- <view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')"> -->
<view class="list-con-left" <view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')"> @tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
@ -85,8 +86,6 @@
<image src="@/static/images/f5.png" mode="aspectFit"></image> <image src="@/static/images/f5.png" mode="aspectFit"></image>
</view> </view>
<view class="list-con-right"> <view class="list-con-right">
<!-- <view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> -->
<view class="con-right" style="margin-bottom: 20rpx" <view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> @click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
@ -99,8 +98,6 @@
</view> --> </view> -->
<image src="@/static/images/f7.png" mode="aspectFit"></image> <image src="@/static/images/f7.png" mode="aspectFit"></image>
</view> </view>
<!-- <view class="con-right"
@click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')"> -->
<view class="con-right" <view class="con-right"
@click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')"> @click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
@ -119,7 +116,10 @@
<image src="@/static/images/f4.png" mode="aspectFit"></image> <image src="@/static/images/f4.png" mode="aspectFit"></image>
</view> </view>
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList="cateGoods" /> <WaterfallsFlow :wfList="productList" :type="1" />
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
<view class="empty_wrapper" v-if="emptyShow"> <view class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty> <u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
@ -128,17 +128,19 @@
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm" <u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> @cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-loadmore :status="status" v-if="cateGoods.length >= where.limit" />
<view class="location" v-if="isshow"> <view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view> <view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view> <view class="locationb"> 用于向你推荐最近门店 </view>
</view> </view>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon"></view> <view class="custom_style_icon"></view>
</view> <view class="custom_style-txt" style="color: #282828;">
发布
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->
</view> </view>
@ -196,7 +198,7 @@
}, },
isshow: false, isshow: false,
locationArr: ({}), locationArr: ({}),
status: 'loadmore',
bgColor: '', bgColor: '',
showPicker: false, showPicker: false,
columnData: [], columnData: [],
@ -220,25 +222,27 @@
location: '', location: '',
emptyShow: false, emptyShow: false,
town: '', town: '',
cateGoods: [], productList: [],
recoList: [], recoList: [],
articleList: [], articleList: [],
street_id: '', street_id: '',
street: '', street: '',
bgColor: '', bgColor: '',
isFshow: false, isFshow: false,
backColor: 'rgba(252, 252, 252, 0)' backColor: 0,
loadend: false,
loading: false,
loadTitle: '加载更多',
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.cateGoods = [] this.list(true);
this.list()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onLoad() { onLoad() {
this.list() this.list()
this.Area() this.Area()
@ -257,13 +261,16 @@
}) })
}, },
onReachBottom() { onReachBottom() {
if (this.status == 'nomore') return; if (this.productList.length > 0) {
this.status = 'loading'; setTimeout(() => {
this.where.page = ++this.where.page; this.list(false);
}, 500)
} else {
this.list()
}
this.list()
}, },
beforeDestroy() { beforeDestroy() {
// //
@ -290,26 +297,24 @@
} }
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
const scrollTop = e.scrollTop; const scrollTop = e.scrollTop;
if (scrollTop <= 20) { if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)' this.backColor = 0
this.isFshow = false this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) { } else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)' this.backColor = 0.5
this.isFshow = true this.isFshow = true
} else if (scrollTop > 100) { } else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)' this.backColor = 1
this.isFshow = true this.isFshow = true
} }
}, },
// #endif // #endif
methods: { methods: {
navaction(val) { navaction(val) {
uni.navigateTo({ uni.navigateTo({
@ -318,16 +323,33 @@
}, },
// //
list(id) { list(isPage, id) {
if (id) {
spuInfo(id, this.where1).then(res => { let that = this;
this.cateGoods.push(...res.data.list) if (that.loadend) return;
}) if (that.loading) return;
} else {
getProductHot(this.where.page, this.where.limit).then(res => { if (isPage === true) that.$set(that, 'productList', []);
this.cateGoods.push(...res.data.list)
}) that.loading = true;
} that.loadTitle = '';
getProductHot(that.where.page, that.where.limit).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'productList', productList);
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
}, },
@ -358,13 +380,13 @@
if (scrollTop <= 20) { if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)' this.backColor = 0
this.isFshow = false this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) { } else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)' this.backColor = 0.5
this.isFshow = true this.isFshow = true
} else if (scrollTop > 100) { } else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)' this.backColor = 1
this.isFshow = true this.isFshow = true
@ -392,7 +414,8 @@
this.street = e.value[1].name this.street = e.value[1].name
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.productList = []
this.list(true, this.street_id)
this.$nextTick(() => { this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code); this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
@ -482,6 +505,8 @@
this.street = e.value[1].name this.street = e.value[1].name
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.productList = []
this.list(true, this.street_id)
}, },
selfLocation() { selfLocation() {
if (uni.getStorageSync('loction') == true) { if (uni.getStorageSync('loction') == true) {
@ -503,6 +528,7 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
this.isshow = false
this.town = res.data.address_reference.town.title this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
@ -513,6 +539,7 @@
}) })
this.list(this.street_id) this.list(this.street_id)
}).catch(err => { }).catch(err => {
this.isshow = false
uni.showToast({ uni.showToast({
title: err, title: err,
icon: 'none' icon: 'none'
@ -614,7 +641,8 @@
/* #ifdef H5 */ /* #ifdef H5 */
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5; background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx; padding-right: 20rpx;
@ -859,6 +887,7 @@
margin-top: -10rpx; margin-top: -10rpx;
padding: 12rpx; padding: 12rpx;
.list-con-left { .list-con-left {
width: 357rpx; width: 357rpx;
height: 482rpx; height: 482rpx;

View File

@ -373,14 +373,8 @@
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
this.merId = res.data.service.mer_id this.merId = res.data.service.mer_id
}) })
}, },
// //
deliveryFreeChange(val) { deliveryFreeChange(val) {

View File

@ -616,10 +616,8 @@
if (this.type == 'edit') { if (this.type == 'edit') {
this.formData.product_info = [] this.formData.product_info = []
} }
this.productList = [] this.productList = []
this.price = 0; this.price = 0;
console.log(data)
if (data.length > 0) { if (data.length > 0) {
this.productList = data; this.productList = data;
for (let i in data) { for (let i in data) {

View File

@ -228,6 +228,9 @@
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
<view class="custom_style"> <view class="custom_style">
<view class="custom_style_icon"></view> <view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view>
</view> </view>
</template> </template>
</m-tabbar> --> </m-tabbar> -->

View File

@ -230,6 +230,7 @@
}) })
return return
} }
feedback({ feedback({
type: this.qsArray[this.qsIndex].feedback_category_id, type: this.qsArray[this.qsIndex].feedback_category_id,
content: this.con, content: this.con,
@ -238,6 +239,9 @@
contact: this.phone contact: this.phone
}).then(res => { }).then(res => {
this.isShowbox = true this.isShowbox = true
uni.redirectTo({
url:'/pages/user/index'
})
}).catch(error => { }).catch(error => {
this.$util.Tips({ this.$util.Tips({
title: error title: error

View File

@ -155,7 +155,7 @@
that.where.page = 1; that.where.page = 1;
that.shopList = []; that.shopList = [];
getOrderList(that.where, that.mer_id).then(res => { getOrderList(that.where, that.mer_id).then(res => {
console.log(res); // console.log(res);
that.shopList = res.data.list that.shopList = res.data.list
console.log(that.shopList); console.log(that.shopList);
}) })
@ -164,9 +164,9 @@
if (this.loading || this.loaded) return; if (this.loading || this.loaded) return;
this.loading = true; this.loading = true;
getOrderList(this.where, this.mer_id).then(res => { getOrderList(this.where, this.mer_id).then(res => {
console.log(res); // console.log(res);
this.shopList = res.data.list this.shopList = res.data.list
console.log(this.shopList); // console.log(this.shopList);
}) })
}, },
importshop(order_id, product_id, unique) { importshop(order_id, product_id, unique) {

View File

@ -8,10 +8,10 @@
<text class='phone'>{{addressInfo.phone}}</text> <text class='phone'>{{addressInfo.phone}}</text>
</view> </view>
<view> <view>
<text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}
<text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
</view> </view>
</view> </view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none" <navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -1083,7 +1083,7 @@
that.order_key = res.data.key that.order_key = res.data.key
that.cartArr[4].title = that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%` `结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
console.log(res.data.order[0]);
if (res.data.order[0].credit_buy == 1 && this.type_id == 12) { if (res.data.order[0].credit_buy == 1 && this.type_id == 12) {
this.cartArr[4].payStatus = 1 this.cartArr[4].payStatus = 1
} else { } else {
@ -1126,7 +1126,7 @@
real_name: res.data.real_name, real_name: res.data.real_name,
phone: res.data.phone phone: res.data.phone
} }
console.log(that.addressId);
this.$nextTick(() => { this.$nextTick(() => {
this.getConfirm(that.addressId); this.getConfirm(that.addressId);
}) })

View File

@ -680,11 +680,11 @@
* 提示 * 提示
*/ */
dePay() { dePay() {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
title: '该订单属于先货后款的订单,等商户确认后才能支付', title: '该订单属于先货后款的订单,等商户确认后才能支付',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); console.log('用户点击确定');
} else if (res.cancel) { } else if (res.cancel) {
@ -692,7 +692,7 @@
} }
} }
}); });
}, },
/** /**
* 点击去评价 * 点击去评价
@ -732,7 +732,7 @@
if (status == 5) { if (status == 5) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/refund/list?type=0' url: '/pages/users/refund/list?type=98'
}) })
} else { } else {
if (status == this.orderStatus) return; if (status == this.orderStatus) return;

File diff suppressed because it is too large Load Diff

View File

@ -111,7 +111,7 @@
isScroll: true, isScroll: true,
page: 1, page: 1,
limit: 15, limit: 15,
type: 1 type: 0
} }
}, },
onLoad(e) { onLoad(e) {
@ -153,7 +153,7 @@
}, },
getList() { getList() {
if (!this.isScroll) return if (!this.isScroll) return
if (this.type == 1) { if (this.type == 0) {
refundList({ refundList({
type: this.tabIndex, type: this.tabIndex,
page: this.page, page: this.page,
@ -167,7 +167,7 @@
}) })
} else { } else {
refundList({ refundList({
product_type: 98, product_type: this.type,
type: this.tabIndex, type: this.tabIndex,
page: this.page, page: this.page,
limit: this.limit limit: this.limit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

BIN
static/applet/gx_app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
static/applet/shop_app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
static/images/bubble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/cuo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

BIN
static/images/dian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/guide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

BIN
static/images/relase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/images/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/shopp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/zk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,5 +1,6 @@
import { import {
getUserInfo getUserInfo,
Appversion
} from "../../api/user.js"; } from "../../api/user.js";
import { import {
LOGIN_STATUS, LOGIN_STATUS,
@ -9,6 +10,9 @@ import Cache from '../../utils/cache';
import { import {
USER_INFO USER_INFO
} from '../../config/cache'; } from '../../config/cache';
// #ifdef APP-PLUS
import Updater from '@/uni_modules/guyue-updater/index';
// #endif
const state = { const state = {
location: Cache.get('LOCATION_DATA', true) || {}, location: Cache.get('LOCATION_DATA', true) || {},
@ -99,9 +103,80 @@ const actions = {
}).catch(() => { }).catch(() => {
}); });
},
async INIT_CONFIG({
state,
commit
}, data = false) {
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
if (os.osName == 'ios') {
apptype = 2
} else {
apptype = 1
}
Appversion({
version: os.appWgtVersion,
type: apptype
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({
// title: '检查更新中'
// })
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
// uni.hideLoading();
}
}
}).catch((err) => {
// console.log(err)
})
// #endif
} }
}; };
function compareVersions(version1, version2) {
const arr1 = version1.split('.').map(Number);
const arr2 = version2.split('.').map(Number);
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
const num1 = i < arr1.length ? arr1[i] : 0;
const num2 = i < arr2.length ? arr2[i] : 0;
if (num1 > num2) {
return 1;
} else if (num1 < num2) {
return -1;
}
}
return 0;
}
export default { export default {
state, state,
mutations, mutations,

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,6 @@
## 1.0.22023-06-02
修复部分bug新增条件编译仅限app平台调用
## 1.0.12023-06-02
去除ts使用js进行开发兼容性更好
## 1.0.02023-05-04
完成初始功能支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabbar、原生导航栏

View File

@ -0,0 +1,24 @@
import { download, install } from "./updater";
export default class Updater {
static async update(options ) {
// #ifdef APP-PLUS
// 静默更新
if (options.quiet) {
download({
url: options.downUrl,
onSuccess(filePath) {
install(filePath, false, options.versionName);
},
});
} else if (options.downUrl) {
uni.navigateTo({
url: `/uni_modules/guyue-updater/pages/updater?data=${encodeURIComponent(JSON.stringify(options))}`,
animationType: "fade-in",
animationDuration: 200,
});
}
// #endif
}
}

View File

@ -0,0 +1,12 @@
export type UpdateParams = {
content: string; // 必填,更新内容,内容中使用 \n 进行换行
downUrl: string; // 必填wgt热更新请给出 .wgt 的文件地址APK整包更新请设置下载apk地址ios请设置苹果商店的连接地址;
title?: string; // 用于显示弹窗标题,默认 发现新版本
versionName?: string; // 版本名,用于显示更新版本,如 1.0.0
quiet?: boolean; // 是否是静默更新开启后不会有弹窗会在后台下载更新文件在下次启动APP时使用更新
force?: boolean; // 是否是强制更新,开启后,弹窗无法被关闭,必须更新
updateBtnText?: string; // 升级按钮文字,默认 立即升级
downMsgTip?: string; // 仅android默认 下载中,请稍后
downSucTip?: string; // 仅android默认 下载完成,安装中
downErrorTip?: string; // 仅android默认 下载失败,请重试
}

View File

@ -0,0 +1,82 @@
{
"id": "guyue-updater",
"displayName": "App版本升级弹框和进度提示",
"version": "1.0.2",
"description": "app热更新模块支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabar原生导航栏",
"keywords": [
"热更新",
"进度提示",
"版本升级",
"app自动升级",
"wgt自动升级"
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.9"
},
"dcloudext": {
"type": "sdk-js",
"sale": {
"regular": {
"price": "9.98"
},
"sourcecode": {
"price": "16.80"
}
},
"contact": {
"qq": "2292550932"
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {},
"H5-mobile": {
"Safari": "n",
"Android Browser": "n",
"微信浏览器(Android)": "n",
"QQ浏览器(Android)": "n"
},
"H5-pc": {
"Chrome": "n",
"IE": "n",
"Edge": "n",
"Firefox": "n",
"Safari": "n"
},
"小程序": {
"微信": "n",
"阿里": "n",
"百度": "n",
"字节跳动": "n",
"QQ": "n",
"钉钉": "n",
"快手": "n",
"飞书": "n",
"京东": "n"
},
"快应用": {
"华为": "n",
"联盟": "n"
}
}
}
}
}

View File

@ -0,0 +1,315 @@
<template>
<view class="container">
<view class="main" @click.stop="">
<view class="header">
<image src="../assets/bg1.png" class="bg1" />
<image src="../assets/bg2.png" class="bg2" />
<view class="version-title">{{ updateParams.title }}</view>
<view class="version-name" v-if="updateParams.versionName">V{{ updateParams.versionName }}</view>
</view>
<view class="title">更新内容</view>
<view class="content" >
<rich-text :nodes="content" />
</view>
<view class="progress" v-if="downloading">
<view class="slider">
<view class="active-slider" :style="{ width: `${progress}%` }">
<view class="bar" />
<view class="dot">
<view class="text">{{ progress }}%</view>
<view class="circle" />
</view>
</view>
</view>
</view>
<view class="button" :class="{'active': !downloading || downloadError}" @click="handleButton">
{{ downloadText }}
</view>
</view>
<view class="bottom" v-if="!updateParams.force" @click="back">
<view class="line"/>
<image src="../assets/close.png" class="close" />
</view>
</view>
</template>
<script>
import { download, install } from "../updater";
export default {
data() {
const data = {
updateParams: {},
progress: 0,
downloading: false,
downloadSucc: false,
downloadError: false,
};
return data;
},
computed: {
content() {
return (this.updateParams.content || '').replace(/[\r\n]/gim, '<br/>');
},
downloadText () {
if (this.downloadSucc) {
return this.updateParams.downSucTip;
}
if (this.downloadError) {
return this.updateParams.downErrorTip;
}
if (this.downloading) {
return this.updateParams.downMsgTip;
}
return this.updateParams.updateBtnText;
},
},
onLoad(params) {
const data = {
title: '发现新版本',
updateBtnText: '立即升级',
downMsgTip: '下载中,请稍后',
downSucTip: '下载完成,安装中',
downErrorTip: '下载失败,请重试',
quiet: false,
force: false,
...(JSON.parse(decodeURIComponent(params.data)))
};
this.updateParams = data;
},
onBackPress() {
return this.updateParams.force;
},
methods: {
back() {
if (!this.updateParams.force) {
uni.navigateBack();
}
},
//
start() {
if (!this.updateParams.downUrl) {
return;
}
// ios appstore.apk.wgt
const isResource = ['.apk', '.wgt'].some(ext => this.updateParams.downUrl.toLocaleLowerCase().includes(ext));
if (plus.os.name !== "Android" || !isResource) {
plus.runtime.openURL(this.updateParams.downUrl);
return;
}
this.downloading = true;
const self = this;
download({
url: self.updateParams.downUrl,
onProgress(progress) {
self.progress = progress;
},
onSuccess(filePath) {
self.downloadSucc = true;
self.downloadError = false;
install(filePath, true);
},
onFail() {
self.downloading = false;
self.downloadSucc = false;
self.downloadError = true;
},
});
},
handleButton() {
if (!this.downloading) {
return this.start();
}
if (this.downloadError) {
this.progress = 0;
this.downloading = false;
this.downloadSucc = false;
this.downloadError = true;
return this.start();
}
},
},
};
</script>
<style lang="less">
page {
width: 100vw;
height: 100vh;
background: transparent;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.main {
width: 75%;
background-color: #fff;
border-radius: 8rpx;
padding-bottom: 10rpx;
}
.header {
position: relative;
.bg1 {
width: 100%;
height: calc(100vw * 0.375);
border-top-left-radius: 8rpx;
border-top-right-radius: 8rpx;
}
.bg2 {
position: absolute;
top: -40%;
right: 13%;
width: 35.9%;
height: calc(100vw * 0.5441);
}
.version-title {
position: absolute;
top: 13%;
left: 8%;
color: #961c00;
font-size: 40rpx;
}
.version-name {
position: absolute;
top: 36%;
left: 24%;
background-color: #e54139;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
padding: 8rpx 20rpx;
border-radius: 20rpx;
}
}
.title {
background-color: #ff6d42;
color: #fff;
display: inline-block;
margin-top: 12rpx;
margin-left: 30rpx;
font-size: 26rpx;
line-height: 26rpx;
padding: 8rpx 20rpx;
border-radius: 8rpx;
}
.content {
margin-top: 12rpx;
margin-left: 30rpx;
font-size: 28rpx;
line-height: 2;
max-height: 240rpx;
overflow-y: auto;
}
.button {
margin: 20rpx 30rpx;
background-color: #ffaa00;
color: #fff;
font-size: 30rpx;
text-align: center;
padding: 20rpx 0;
border-radius: 14rpx;
opacity: 0.5;
pointer-events: none;
&:active {
opacity: 0.6;
}
&.active {
opacity: 1;
pointer-events: initial;
}
}
.progress {
padding: 50rpx 50rpx 18rpx;
.slider {
position: relative;
width: 100%;
height: 10rpx;
border-radius: 5rpx;
background-color: #e2e2e2;
.active-slider {
display: flex;
flex-direction: row;
align-items: center;
position: absolute;
left: 0;
top: 0;
width: 0%;
height: 10rpx;
border-radius: 5rpx;
.bar {
flex: 1;
height: 100%;
background-color: #e84116;
border-top-left-radius: 5rpx;
border-bottom-left-radius: 5rpx;
}
.dot {
position: relative;
margin-left: -12rpx;
.text {
position: absolute;
top: -34rpx;
left: -50%;
color: #e84116;
font-size: 24rpx;
font-weight: 500;
}
.circle {
width: 12rpx;
height: 12rpx;
border: 6rpx solid #e84116;
border-radius: 50%;
background-color: #fff;
}
}
}
}
}
.bottom {
display: flex;
flex-direction: column;
align-items: center;
.line {
width: 3rpx;
height: 50rpx;
background-color: #fff;
}
.close {
width: 64rpx;
height: 64rpx;
margin-top: -4rpx;
}
}
</style>

View File

@ -0,0 +1,65 @@
# App热更新
App热更新模块支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabbar、原生导航栏。
可用于自建热更新渠道,不依赖于云服务,无云服务费用支出,也可以适配官方更新中心。
## 使用说明
### 1.将此项目导入自己的项目工程
### 2.在page.json中注册页面如下
```javascript
{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"navigationStyle": "custom",
"backgroundColor": "transparent",
"disableScroll": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"scrollIndicator": false,
"titleNView": false,
"popGesture": "none",
"bounce": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
}
```
### 3.将版本检测函数导入需要使用的页面
一般在App.vue中的onLaunch导入或者首页导入需要自行完成热更新检查一般在APP启动时发起一个请求获取热更新数据数据获取后可以调用该组件完成更新。
```javascript
import Updater from '@/uni_modules/guyue-updater/index';
// 仅在app平台有效其他平台调用无效
Updater.update({
title: '发现新版本',
content: '1. 我们更新了新的UI设计\n2. 我们更新了新的UI设计\n3. 我们更新了新的UI设计\n4. 我们更新了新的UI设计\n',
versionName: '1.3.6',
downUrl: 'https://cdn.xxx.cn/mp/__UNI__1F29D65.wgt',
force: false,
})
```
## 参数说明
```javascript
export type UpdateParams = {
content: string; // 必填,更新内容,内容中使用 \n 进行换行
downUrl: string; // 必填wgt热更新请给出 .wgt 的文件地址APK整包更新请设置下载apk地址ios请设置苹果商店的连接地址;
title?: string; // 用于显示弹窗标题,默认 发现新版本
versionName?: string; // 版本名,用于显示更新版本,如 1.0.0
quiet?: boolean; // 是否是静默更新开启后不会有弹窗会在后台下载更新文件在下次启动APP时使用更新
force?: boolean; // 是否是强制更新,开启后,弹窗无法被关闭,必须更新
updateBtnText?: string; // 升级按钮文字,默认 立即升级
downMsgTip?: string; // 仅android默认 下载中,请稍后
downSucTip?: string; // 仅android默认 下载完成,安装中
downErrorTip?: string; // 仅android默认 下载失败,请重试
}
```
## Android如何跳转到应用市场更新
downUrl 设置为应用市场的地址即可,如: market://details?id={这里写你的应用包名}
## iOS 如何跳转到AppStore
downUrl 设置为AppStore的地址即可 itms-apps://itunes.apple.com/cn/app/hello-uni-app/id1417078253

View File

@ -0,0 +1,31 @@
export const download = ({ url, onProgress, onSuccess, onFail }) => {
const task = uni.downloadFile({
url,
success(res) {
if (res.statusCode === 200) {
onSuccess && onSuccess(res.tempFilePath);
}
},
fail() {
onFail && onFail();
}
});
task.onProgressUpdate(res => {
onProgress && onProgress(res.progress);
});
};
export const install = (filePath, restart = false, version='') => {
plus.runtime.install(filePath, {
force: true
}, () => {
console.log('install success...');
if (restart) {
uni.setStorageSync('wgt_version', version);
plus.runtime.restart();
}
}, (e) => {
console.error('install fail...', e);
});
};

View File

@ -1,4 +1,9 @@
import { getGXconfig } from "@/api/uniMP.js"; import {
getGXconfig
} from "@/api/uniMP.js";
import {
HTTP_REQUEST_URL
} from '@/config/app';
const mp = uni.requireNativePlugin('uniMP'); const mp = uni.requireNativePlugin('uniMP');
let appid = ''; // 应用id let appid = ''; // 应用id
@ -7,146 +12,144 @@ let timer = null; // 加载计时器
// 比较版本号大小 // 比较版本号大小
function compareVersions(version1, version2) { function compareVersions(version1, version2) {
const arr1 = version1.split('.').map(Number); const arr1 = version1.split('.').map(Number);
const arr2 = version2.split('.').map(Number); const arr2 = version2.split('.').map(Number);
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) { for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
const num1 = i < arr1.length ? arr1[i] : 0; const num1 = i < arr1.length ? arr1[i] : 0;
const num2 = i < arr2.length ? arr2[i] : 0; const num2 = i < arr2.length ? arr2[i] : 0;
if (num1 > num2) { if (num1 > num2) {
return 1; return 1;
} else if (num1 < num2) { } else if (num1 < num2) {
return -1; return -1;
} }
} }
return 0; return 0;
} }
// 加载小程序 // 加载小程序
const loadMP = async (id) => { const loadMP = async (id) => {
appid = id; appid = id;
let info = await getGXconfig(); let info = await getGXconfig();
console.log('最新版本', info.data); console.log('最新版本', info.data);
console.log(mp, uni); console.log(mp, uni);
// return ; // return ;
uni.showLoading({ uni.showLoading({
title: '下载中...', title: '初始化中...',
mask: true mask: true
}) })
mp.getUniMPVersion(id, (ret) => { mp.getUniMPVersion(id, (ret) => {
console.log('当前版本', ret); console.log('当前版本', ret);
if (0 != ret.code || compareVersions(info.data.version, ret.versionInfo.name) == 1 || true) { let flag;
let count = 0; if (HTTP_REQUEST_URL == 'https://shop.lihaink.cn') {
timer = setInterval(() => { flag = false
if (count < 100) uni.showLoading({ } else {
title: `下载中... ${count}%`, flag = true
mask: true }
}) if (0 != ret.code || compareVersions(info.data.version, ret.versionInfo.name) == 1 || flag ==
else uni.showLoading({ true) {
title: '安装中...', let count = 0;
mask: true timer = setInterval(() => {
}) if (count < 100) uni.showLoading({
}, 600) title: `初始化中... ${count}%`,
let downloadTask = uni.downloadFile({ mask: true
url: info.data.version_info?.dow_url, })
success(res) { else uni.showLoading({
wgtFile = res.tempFilePath; title: '初始化中...100%',
console.log('下载完成', wgtFile); mask: true
installMP(); })
} }, 600)
}); let downloadTask = uni.downloadFile({
downloadTask.onProgressUpdate((res) => { url: info.data.version_info?.dow_url,
// console.log('下载进度' + res.progress); success(res) {
if (res.progress > count) count += 10; wgtFile = res.tempFilePath;
if (count >= 90) { console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
uni.hideLoading();
} }
}); });
} else { downloadTask.onProgressUpdate((res) => {
open() // console.log('初始化进度' + res.progress);
} if (res.progress > count) count += 10;
}); if (count >= 90) {
clearInterval(timer);
timer = null;
}
});
} else {
open()
}
});
}; };
// 小程序版本信息 // 小程序版本信息
const getVersion = (id) => { const getVersion = (id) => {
appid = id; appid = id;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
mp.getUniMPVersion(appid, (ret) => { mp.getUniMPVersion(appid, (ret) => {
console.log('供销', ret); console.log('供销', ret);
}); });
}) })
} }
// 安装小程序 // 初始化小程序
const installMP = () => { const installMP = () => {
mp.getUniMPVersion(appid, (ret) => { mp.getUniMPVersion(appid, (ret) => {
console.log('安装:供销', ret); doInstallMP();
doInstallMP(); console.log('getUniMPVersion: ' + JSON.stringify(ret));
// if (0 != ret.code) { //获取失败时安装应用 });
// doInstallMP();
// } else {
// uni.showModal({
// title: '提示',
// content: 'uni小程序已安装是否覆盖',
// success: res => {
// res.confirm && doInstallMP();
// }
// });
// }
console.log('getUniMPVersion: ' + JSON.stringify(ret));
});
}; };
const doInstallMP = () => { const doInstallMP = () => {
mp.installUniMP({ mp.installUniMP({
appid: appid, appid: appid,
wgtFile: wgtFile wgtFile: wgtFile
}, (r) => { }, (r) => {
if (0 == r.code) { if (0 == r.code) {
// uni.showToast({ open();
// title: '安装成功' } else {
// }); uni.hideLoading();
console.log('小程序安装成功'); clearInterval(timer);
open(); timer = null;
} else { uni.showModal({
uni.hideLoading(); title: '初始化失败',
uni.showModal({ content: JSON.stringify(r),
title: '安装失败', showCancel: false
content: JSON.stringify(r), });
showCancel: false }
}); console.log('初始化供销: ' + JSON.stringify(r));
} });
console.log('安装供销: ' + JSON.stringify(r));
});
}; };
const open = (id = null) => { const open = (id = null) => {
let token = uni.getStorageSync('LOGIN_STATUS_TOKEN'); let token = uni.getStorageSync('LOGIN_STATUS_TOKEN');
if (!token) return uni.showToast({ if (!token) return uni.showToast({
icon: 'none', icon: 'none',
title: '请先登录' title: '请先登录'
}) })
mp.openUniMP({ mp.openUniMP({
appid: id || appid, appid: id || appid,
extraData: { extraData: {
uniMP: true, uniMP: true,
token: token, token: token,
} }
}, (ret) => { }, (ret) => {
uni.hideLoading(); uni.hideLoading();
if (0 != ret.code) { if (0 != ret.code) {
uni.showModal({ uni.showModal({
title: '启动失败', title: '启动失败',
content: JSON.stringify(ret), content: JSON.stringify(ret),
showCancel: false showCancel: false
}); });
} }
console.log('openUniMP: ' + JSON.stringify(ret)); console.log('openUniMP: ' + JSON.stringify(ret));
}); });
} }
export default { export default {
loadMP, loadMP,
installMP, installMP,
doInstallMP, doInstallMP,
getVersion, getVersion,
open open
} }