Compare commits

..

No commits in common. "be3213996fc3ff11e5e9c7a71061dd1676afa026" and "3f7adfc342264711e1808620515fc2b3d374d860" have entirely different histories.

11 changed files with 638 additions and 860 deletions

View File

@ -145,8 +145,4 @@ export const getloginSms = (data) => {
export const getReportingSms = (data) => {
return request.post('/user/user/reporting_sms', data);
}
export const uploadImg = (data) => {
return request.post('/Upload/image', data);
}

View File

@ -1,55 +1,53 @@
<template>
<up-popup :show="show" round="10" @close="close" mode="center" :safeAreaInsetBottom="false">
<view class="m-modal-popup">
<view class="head-title-modal">绑定手机号</view>
<view class="content-modal">系统检测到您未绑定手机号, 为方便您继续使用, 请绑定手机号码</view>
<view class="btn-box-modal">
<view style="width: 130rpx;"><up-button @click="close" plain color="#999">取消绑定</up-button></view>
<view style="width: 350rpx;"><up-button @getphonenumber="change" open-type="getPhoneNumber"
color="#20B128">立即绑定</up-button></view>
</view>
</view>
</up-popup>
<up-popup :show="show" round="10" @close="close" mode="center" :safeAreaInsetBottom="false">
<view class="m-modal-popup">
<view class="head-title-modal">绑定手机号</view>
<view class="content-modal">系统检测到您未绑定手机号, 为方便您继续使用, 请绑定手机号码</view>
<view class="btn-box-modal">
<view style="width: 130rpx;"><up-button @click="close" plain color="#999">取消绑定</up-button></view>
<view style="width: 350rpx;"><up-button @getphonenumber="change" open-type="getPhoneNumber" color="#20B128">立即绑定</up-button></view>
</view>
</view>
</up-popup>
</template>
<script setup>
const props = defineProps({
show: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['close', 'change']);
const close = () => {
emit('close');
}
const props = defineProps({
show: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['close', 'change']);
const close = () => {
emit('close');
}
const change = (e)=>{
emit('change', e);
}
const change = (e) => {
emit('change', e);
}
</script>
<style scoped lang="scss">
.m-modal-popup {
width: 500rpx;
padding: 40rpx;
.head-title-modal {
font-size: 32rpx;
text-align: center;
}
.content-modal {
font-size: 26rpx;
color: #999;
text-align: center;
padding: 40rpx 0;
}
.btn-box-modal {
display: flex;
justify-content: space-between;
}
}
.m-modal-popup{
width: 500rpx;
padding: 40rpx;
.head-title-modal{
font-size: 32rpx;
text-align: center;
}
.content-modal{
font-size: 26rpx;
color: #999;
text-align: center;
padding: 40rpx 0;
}
.btn-box-modal{
display: flex;
justify-content: space-between;
}
}
</style>

View File

@ -37,13 +37,13 @@
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
<view>购买重量<text style="color: #F55726;">*</text></view>
<view style="justify-content: end;">
<up-number-box v-model="datas.cart_num" @change="valChange"></up-number-box>
<up-number-box v-model="datas.cart_num"></up-number-box>
</view>
</view>
<view v-else class="row" style="height: 100rpx;">
<view>购买数量<text style="color: #F55726;">*</text></view>
<view style="justify-content: end;">
<up-number-box v-model="datas.cart_num" @change="valChange"></up-number-box>
<up-number-box v-model="datas.cart_num"></up-number-box>
</view>
</view>
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
@ -80,9 +80,6 @@
},
})
const valChange = () => {
uni.vibrateShort();
}
let priceKey = ref({})
if (uni.getStorageSync('PRICE_KEY')) {

View File

@ -4,22 +4,17 @@ import store from "@/store/user.js"
// 环境
// let env = "dev"
let env = "prod"
// let env = "release";
// let env = "local";
// let env = "liu";
switch (env) {
case 'dev':
BASE_URL = 'https://test-multi-store.lihaink.cn';
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
break;
case 'release':
case 'liu':
BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break;
case 'local':
BASE_URL = 'http://192.168.1.201:8545';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break;
default:
BASE_URL = 'https://multi-store.lihaink.cn';
WSS_URL = 'wss://multi-store.lihaink.cn/pull'

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
<view class="page-box1">
<view class="total" @click='isAdmin=!isAdmin'>
<view>共计<text style="color: #20B128;">{{cartList.length}}</text></view>
<view v-if="!isAdmin">删除商品</view>
<view v-if="!isAdmin">管理</view>
<view v-else>完成</view>
</view>
<view v-if="cartList.length>0" class="list">

View File

@ -58,7 +58,7 @@
<text>个人中心</text>
</view>
</view>
<view class='headScoll' ref='headscroll' :style="{ height: isScroll ? '0' : '170rpx' }">
<view class='headScoll' ref='headscroll' :style="{ height: isScroll ? '0' : '200rpx' }">
<scroll-view class="head-view" scroll-x @scrolltolower="getgoodClassList(0)">
<view class="list">
<view class="item" :class="{ 'item-active': topActive === item.id }"
@ -167,7 +167,7 @@
</view>
<view class="tag">
<view class="icon" />
赠10%品牌礼品
赠10%品牌礼品
</view>
</view>
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
@ -212,15 +212,16 @@
<view class="price-info">
<view class="row">
<view>合计</view>
<view class="price">¥<text style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
<view class="price" v-if='cartInfo.pay_price<=0||userStore?.userInfo?.user_ship !=4'>¥<text
style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
</view>
<view style="font-size: 22rpx;color: #F55726;padding-left: 60rpx;"
v-if="cartInfo.msg&&cartInfo.total_price>0">
<view style="font-size: 22rpx;text-indent: 3em;color: #F55726;"
v-if="cartInfo.msg&&cartInfo.total_price>0 ">
{{cartInfo.msg }}
</view>
</view>
<view class="btn">
<up-button color="#20b128" :disabled="cartInfo.pay_price<=0" @click="settleAccounts"> 支付</up-button>
<up-button color="#20b128" :disabled="cartInfo.pay_price<=0" @click="settleAccounts"> 结算</up-button>
</view>
<view class="cart" @click="navTo(`/pages/cart/cart`)">
<image src="@/static/icon/cart.png"></image>
@ -237,11 +238,11 @@
温馨提示
</view>
<view class="rect-contetn">
只需再凑满 {{500- cartInfo.pay_price}} 即可享受采购金额10%的品牌礼品兑换券错过此次机会则无礼品券
只需再购买 {{500- cartInfo.pay_price}} 就能拥有10%的品牌礼品券若错过此次机会则无礼品券
</view>
<view class="rect-btn">
<view style="width: 236rpx;">
<up-button @click="abandActive">放弃礼品券</up-button>
<up-button @click="abandActive">放弃优惠</up-button>
</view>
<view style="width: 236rpx;">
<up-button color="#20b128" @click="showOverlay=false">继续采购</up-button>
@ -363,8 +364,6 @@
const show = ref(0);
const topActive = ref(0);
const changeOne = async (item, index) => {
where.value.top_cate_id = item.id
delete where.value.two_cate_id // id, , id,
topActive.value = item.id;
show.value = 0;
goodClassTow.value = item?.children || [];
@ -377,8 +376,6 @@
const leftActive = ref(0);
const changeTwo = (item, index) => {
console.log(item)
where.value.two_cate_id = item.id
isScroll.value = false;
getWXDom(instance)
leftActive.value = item.id;
@ -460,19 +457,17 @@
if (class_all) class_id = ""; //
if (loadmore) where.value.page_no++;
else where.value.page_no = 1;
let data = {
goodListApi({
...where.value,
class_all: class_all,
class: class_id,
cate_id: class_id,
// top_cate_id: "",
// two_cate_id: ""
}
goodListApi(data).then(res => {
}).then(res => {
for (let key in res.data.extend) {
priceKey[key] = res.data.extend[key]
}
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
console.log(priceKey)
if (loadmore) goodList.value.push(...res.data.lists);
else goodList.value = res.data.lists;
})
@ -586,9 +581,6 @@
}
}
})
if (!url) return;
uni.navigateTo({
url: url
})
@ -599,8 +591,6 @@
const goodRef = ref(null);
const goodData = ref({});
const openGoodPopup = (item) => { // /
navTo(false)
if (!userStore.token || !userStore.userInfo.mobile) return;
goodData.value = item;
goodRef.value.setData(item);
showGoodPopup.value = true;
@ -704,6 +694,7 @@
}
// id
if (opt.id && opt.id != 'undefined') {
console.log(opt.id, opt.id != 'undefined', "进来了这里")
where.value.store_id = opt.id;
const info = await shopDetailApi({
store_id: where.value.store_id

View File

@ -16,10 +16,10 @@
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill"
color="#fff" size="28"></up-icon></up-button>
</view>
<!-- <view class="btn">
<view class="btn">
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
name="account-fill" color="#fff" size="28"></up-icon></up-button>
</view> -->
</view>
<!-- <view class="btn">
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
size="28"></up-icon></up-button>

View File

@ -1,7 +1,7 @@
<style lang="scss">
.rest {
display: flex;
justify-content: space-around;
justify-content: space-between;
margin: 20rpx;
.rest-item {
@ -20,20 +20,6 @@
}
}
}
.balance {
position: absolute;
top: 160rpx;
z-index: 999;
left: 80rpx;
font-size: 50rpx;
display: flex;
align-items: center;
width: 620rpx;
justify-content: space-between;
}
</style>
<template>
<view>
@ -43,7 +29,7 @@
<image class="bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp"
mode="widthFix"></image>
<view class="u-card">
<view style="display: flex;" @click="updataInfp">
<view style="display: flex;">
<up-avatar :src="userInfo.avatar" size="56"></up-avatar>
<view class="content">
<view class="u-phone">{{userInfo.nickname}}</view>
@ -56,37 +42,32 @@
</view>
</view>
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
余额:
</view>
<view class="">
{{userInfo.now_money||"0.00"}}<text style="font-size: 28rpx;"> ()</text>
</view>
</view>
<view class="rest">
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
<view class="rest-item-num">{{userInfo.now_money||"0.00"}}</view>
<view class="rest-item-txt">余额</view>
</view> -->
</view>
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=1')">
<view class="rest-item-num">{{userInfo.purchase_funds||'0.00'}}</view>
<view class="rest-item-txt">采购款</view>
</view>
<view class="rest-item">
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
<!-- <view class="rest-item-num">{{"10000.00"}}</view> -->
<view class="rest-item-txt">返还金</view>
</view>
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
<view class="rest-item">
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
<view class="rest-item-txt">冻结礼品券</view>
</view>
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
<view class="rest-item">
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
<view class="rest-item-txt">礼品券</view>
</view>
<view class="rest-item">
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
<view class="rest-item-txt">冻结券</view>
<view class="rest-item-txt">可用礼品券</view>
</view>
</view>
<view class="order-info-box">
@ -139,38 +120,10 @@
</up-cell-group>
</view>
</view>
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true">
<view class="popContent">
<view style="text-align: center;font-size: 30rpx;font-weight: bold;">
修改个人信息
</view>
<up-form labelPosition="left">
<up-form-item label="呢称" prop="userInfo.name" borderBottom ref="item1">
<up-input v-model="formData.nick_name" border="none" placeholder="请输入个人呢称"></up-input>
</up-form-item>
<up-form-item label="头像" prop="userInfo.sex" borderBottom ref="item1">
<up-image :src="formData.avatar" width="80px" height="80px" @click="uploadAvatar"></up-image>
</up-form-item>
</up-form>
<view style="display: flex;margin-top: 40rpx;justify-content: space-around;">
<view style="width: 200rpx;">
<up-button color="#20b128" @click="updataFn">保存</up-button>
</view>
<view style="width: 200rpx;">
<up-button @click="showPop=false">取消</up-button>
</view>
</view>
<!-- <button></button> -->
</view>
</up-popup>
</template>
<script setup>
import {
reactive,
ref
} from "vue";
import useUserStore from "@/store/user";
@ -182,18 +135,13 @@
onPullDownRefresh
} from "@dcloudio/uni-app"
import {
userInfoApi,
uploadImg,
loginUpdateUserApi
userInfoApi
} from "@/api/user.js"
import {
config
} from "@/config/app.js"
const userStore = useUserStore();
const userInfo = ref({});
let token = uni.getStorageSync('token') || ''
const orderCount = ref({
no_pay: 0,
receiving: 0,
@ -230,58 +178,6 @@
}
const showPop = ref(false)
const updataInfp = () => {
console.log(5454)
showPop.value = true
}
const formData = reactive({
nick_name: "",
avatar: ""
})
const updataFn = () => {
loginUpdateUserApi({
nickname: formData.nick_name,
avatar: formData.avatar
}).then(res => {
uni.$u.toast('修改成功');
showPop.value = false
userInfoApi().then(res => {
userInfo.value = res.data;
})
})
}
const uploadAvatar = () => {
uni.chooseImage({
success: (chooseImageRes) => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFilePaths;
uni.uploadFile({
url: config.HTTP_REQUEST_URL + '/api/Upload/image', //
filePath: tempFilePaths[0],
name: 'file',
header: {
token: token,
},
success: (uploadFileRes) => {
let data = JSON.parse(uploadFileRes.data)
formData.avatar = data.data.uri
uni.hideLoading()
}
});
}
});
}
const logout = () => {
userStore.setToken('');
userStore.setUserInfo({});
@ -295,9 +191,6 @@
onShow(() => {
userInfoApi().then(res => {
userInfo.value = res.data;
formData.avatar = res.data.avatar
formData.nick_name = res.data.nickname
})
getOrderCount();
})
@ -329,7 +222,7 @@
box-sizing: border-box;
padding: 50rpx 0 50rpx 50rpx;
position: absolute;
top: -10rpx;
top: 50rpx;
left: 0;
z-index: 2;
display: flex;
@ -514,9 +407,6 @@
overflow: hidden;
}
.popContent {
padding: 30rpx 20rpx 50rpx 20rpx;
}
.gift {
width: 710rpx;

View File

@ -113,8 +113,6 @@
</view>
</view>
</view>
<ZyPasswordboard v-if='passwordBoardVisible' v-model:visible="passwordBoardVisible" v-bind="passwordBoardProps"
@close='closeKeyBord' />
</template>
<script setup>
@ -129,7 +127,6 @@
import good from "./component/good.vue";
import orderCanclePopup from "@/components/orderCanclePopup.vue"
import modal from "@/components/modal.vue"
import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue';
import {
cancelOrderApi,
rePaymentApi,
@ -137,11 +134,6 @@
orderListApi,
purchaseAgainApi
} from "@/api/order.js"
import {
userInfoApi
} from "@/api/user.js"
const tabsActive = ref(0)
const changeTab = ({
@ -292,35 +284,7 @@
}
}
const pay_type = ref('3')
const rePay = async (e) => {
payFn(e)
return
if (!pay_type.value) return uni.$u.toast('请选择支付方式');
if (pay_type.value == 3 || pay_type.value == 18) {
let res = await userInfoApi()
return res.data.pay_password ? passwordBoardVisible.value = true : showModal.value = true
}
}
//
const password = ref(''); //
const passwordBoardVisible = ref(false);
const passwordBoardProps = {
title: '输入支付密码',
onComplete(value) {
password.value = value
passwordBoardVisible.value = false
console.log(password.value)
// payFn()
}
};
const closeKeyBord = () => {
password.value = ''
}
const payFn = (e) => {
const rePay = (e) => {
rePaymentApi({
order_id: e.id,
address_id: e.address_id,
@ -353,11 +317,6 @@
})
}
const notWxPay = () => {
alert("不是微信支付")
}
//
const where = ref([{
page_no: 1,

View File

@ -79,16 +79,9 @@
</view>
<view class="m-card order-remark">
<!-- <view style="display: flex;align-items: center;">
<text style="margin-right: 20rpx;">是否存货</text>
<up-radio-group v-model="isCh" placement="row">
<up-radio activeColor="#20b128" label="是" name="1" style="margin-right: 10rpx;"></up-radio>
<up-radio activeColor="#20b128" label="否" name="0"></up-radio>
</up-radio-group>
</view> -->
<view class="head-title" style="margin-top: 20rpx;">
<view class="head-title">
<text>订单备注</text>
<text>{{formData.remark.length}}/140</text>
<text>0/200</text>
</view>
<up-textarea style="background-color: #F6F6F6;" v-model="formData.remark" placeholder="暂无备注内容"
:height="40"></up-textarea>
@ -110,9 +103,8 @@
</view>
</view>
<!-- <view class="row"
v-if="userInfo.user_ship == 4 || userInfo.user_ship == 5 || userInfo.user_ship == 6 || userInfo.user_ship == 1"> -->
<view class="row">
<view class="row"
v-if="userInfo.user_ship == 4 || userInfo.user_ship == 5 || userInfo.user_ship == 6 || userInfo.user_ship == 1">
<!-- <view class="row"> -->
<view class="icon-text">
<image src="@/static/icon/YEZF.png" style="width:40rpx;height: 40rpx;" />
@ -128,8 +120,7 @@
</view>
</view>
<!-- <view class="row" v-if="userInfo.user_ship == 1"> -->
<view class="row">
<view class="row" v-if="userInfo.user_ship == 1">
<view class="icon-text">
<image src="@/static/icon/cgkzf.png" style="width:40rpx;height: 40rpx;" />
<text style="margin-left: 20rpx;font-size: 26rpx;">采购款支付</text>
@ -149,7 +140,7 @@
<view class="submit-row">
<view class="tips">
<view style="margin-right: 20rpx;transform: translateY(5rpx);"> {{ cartList.length }} </view>
<view style="margin-right: 20rpx;"> {{ cartList.length }} </view>
<view class="all">
<text style="color: #000;">合计: </text>
<text></text>
@ -161,7 +152,8 @@
</view>
</view>
<view style="width: 200rpx;">
<up-button color="#20B128" shape="circle" @click="submitOrder" :throttleTime="1000">支付</up-button>
<up-button color="#20B128" shape="circle" @click="submitOrder"
:throttleTime="1000">预付款提交</up-button>
</view>
</view>
@ -216,7 +208,6 @@
const cartStore = useCartStore();
const reservation_time = ref('')
const isCh = ref(0)
const formData = ref({
remark: ""
@ -380,6 +371,11 @@
const passwordBoardProps = {
title: '输入支付密码',
onComplete(value) {
// uni.vibrateShort({
// success: function() {
// console.log('success');
// }
// });
password.value = value
passwordBoardVisible.value = false
payFn()
@ -558,7 +554,6 @@
justify-content: space-between;
font-size: 24rpx;
margin-top: 10rpx;
align-items: center;
}
.time {