Compare commits

...

13 Commits

Author SHA1 Message Date
zmj be3213996f add 2024-06-27 21:43:40 +08:00
zmj d5b7abbdf6 add 2024-06-27 21:16:36 +08:00
zmj 3ecad90fd6 add 2024-06-27 20:15:39 +08:00
zmj ab6162d558 add 2024-06-27 18:27:31 +08:00
zmj e1a23da1d0 add 2024-06-27 17:59:54 +08:00
zmj e24c3094c3 add 2024-06-27 17:49:50 +08:00
zmj db89348f2a add 2024-06-27 17:39:25 +08:00
zmj b1b3f659b5 add 2024-06-27 14:00:57 +08:00
zmj f71924219f add 2024-06-27 11:23:39 +08:00
zmj 25c609e39a add 2024-06-27 10:49:56 +08:00
zmj fe5fc9ec35 ad 2024-06-27 10:35:45 +08:00
zmj e7aefe8bff add 2024-06-27 10:34:22 +08:00
zmj 0f86686f8b add 2024-06-27 09:16:38 +08:00
11 changed files with 843 additions and 621 deletions

View File

@ -145,4 +145,8 @@ 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,53 +1,55 @@
<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 props = defineProps({
show: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['close', 'change']);
const close = () => {
emit('close');
}
const change = (e)=>{
emit('change', e);
}
const emit = defineEmits(['close', 'change']);
const close = () => {
emit('close');
}
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"></up-number-box>
<up-number-box v-model="datas.cart_num" @change="valChange"></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"></up-number-box>
<up-number-box v-model="datas.cart_num" @change="valChange"></up-number-box>
</view>
</view>
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
@ -80,6 +80,9 @@
},
})
const valChange = () => {
uni.vibrateShort();
}
let priceKey = ref({})
if (uni.getStorageSync('PRICE_KEY')) {

View File

@ -4,17 +4,22 @@ import store from "@/store/user.js"
// 环境
// let env = "dev"
let env = "prod"
// let env = "liu";
// let env = "release";
// let env = "local";
switch (env) {
case 'dev':
BASE_URL = 'https://test-multi-store.lihaink.cn';
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
break;
case 'liu':
case 'release':
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' : '200rpx' }">
<view class='headScoll' ref='headscroll' :style="{ height: isScroll ? '0' : '170rpx' }">
<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,16 +212,15 @@
<view class="price-info">
<view class="row">
<view>合计</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 class="price">¥<text style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
</view>
<view style="font-size: 22rpx;text-indent: 3em;color: #F55726;"
v-if="cartInfo.msg&&cartInfo.total_price>0 ">
<view style="font-size: 22rpx;color: #F55726;padding-left: 60rpx;"
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>
@ -238,11 +237,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>
@ -364,6 +363,8 @@
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 || [];
@ -376,6 +377,8 @@
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;
@ -457,17 +460,19 @@
if (class_all) class_id = ""; //
if (loadmore) where.value.page_no++;
else where.value.page_no = 1;
goodListApi({
let data = {
...where.value,
class_all: class_all,
class: class_id,
cate_id: class_id,
}).then(res => {
// top_cate_id: "",
// two_cate_id: ""
}
goodListApi(data).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;
})
@ -581,6 +586,9 @@
}
}
})
if (!url) return;
uni.navigateTo({
url: url
})
@ -591,6 +599,8 @@
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;
@ -694,7 +704,6 @@
}
// 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-between;
justify-content: space-around;
margin: 20rpx;
.rest-item {
@ -20,6 +20,20 @@
}
}
}
.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>
@ -29,7 +43,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;">
<view style="display: flex;" @click="updataInfp">
<up-avatar :src="userInfo.avatar" size="56"></up-avatar>
<view class="content">
<view class="u-phone">{{userInfo.nickname}}</view>
@ -42,32 +56,37 @@
</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 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>
</view>
<view class="order-info-box">
@ -120,10 +139,38 @@
</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";
@ -135,13 +182,18 @@
onPullDownRefresh
} from "@dcloudio/uni-app"
import {
userInfoApi
userInfoApi,
uploadImg,
loginUpdateUserApi
} 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,
@ -178,6 +230,58 @@
}
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({});
@ -191,6 +295,9 @@
onShow(() => {
userInfoApi().then(res => {
userInfo.value = res.data;
formData.avatar = res.data.avatar
formData.nick_name = res.data.nickname
})
getOrderCount();
})
@ -222,7 +329,7 @@
box-sizing: border-box;
padding: 50rpx 0 50rpx 50rpx;
position: absolute;
top: 50rpx;
top: -10rpx;
left: 0;
z-index: 2;
display: flex;
@ -407,6 +514,9 @@
overflow: hidden;
}
.popContent {
padding: 30rpx 20rpx 50rpx 20rpx;
}
.gift {
width: 710rpx;

View File

@ -113,6 +113,8 @@
</view>
</view>
</view>
<ZyPasswordboard v-if='passwordBoardVisible' v-model:visible="passwordBoardVisible" v-bind="passwordBoardProps"
@close='closeKeyBord' />
</template>
<script setup>
@ -127,6 +129,7 @@
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,
@ -134,6 +137,11 @@
orderListApi,
purchaseAgainApi
} from "@/api/order.js"
import {
userInfoApi
} from "@/api/user.js"
const tabsActive = ref(0)
const changeTab = ({
@ -284,7 +292,35 @@
}
}
const rePay = (e) => {
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) => {
rePaymentApi({
order_id: e.id,
address_id: e.address_id,
@ -317,6 +353,11 @@
})
}
const notWxPay = () => {
alert("不是微信支付")
}
//
const where = ref([{
page_no: 1,

View File

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