Compare commits
13 Commits
3f7adfc342
...
be3213996f
Author | SHA1 | Date |
---|---|---|
zmj | be3213996f | |
zmj | d5b7abbdf6 | |
zmj | 3ecad90fd6 | |
zmj | ab6162d558 | |
zmj | e1a23da1d0 | |
zmj | e24c3094c3 | |
zmj | db89348f2a | |
zmj | b1b3f659b5 | |
zmj | f71924219f | |
zmj | 25c609e39a | |
zmj | fe5fc9ec35 | |
zmj | e7aefe8bff | |
zmj | 0f86686f8b |
|
@ -145,4 +145,8 @@ export const getloginSms = (data) => {
|
||||||
|
|
||||||
export const getReportingSms = (data) => {
|
export const getReportingSms = (data) => {
|
||||||
return request.post('/user/user/reporting_sms', data);
|
return request.post('/user/user/reporting_sms', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const uploadImg = (data) => {
|
||||||
|
return request.post('/Upload/image', data);
|
||||||
}
|
}
|
|
@ -1,53 +1,55 @@
|
||||||
<template>
|
<template>
|
||||||
<up-popup :show="show" round="10" @close="close" mode="center" :safeAreaInsetBottom="false">
|
<up-popup :show="show" round="10" @close="close" mode="center" :safeAreaInsetBottom="false">
|
||||||
<view class="m-modal-popup">
|
<view class="m-modal-popup">
|
||||||
<view class="head-title-modal">绑定手机号</view>
|
<view class="head-title-modal">绑定手机号</view>
|
||||||
<view class="content-modal">系统检测到您未绑定手机号, 为方便您继续使用, 请绑定手机号码</view>
|
<view class="content-modal">系统检测到您未绑定手机号, 为方便您继续使用, 请绑定手机号码</view>
|
||||||
<view class="btn-box-modal">
|
<view class="btn-box-modal">
|
||||||
<view style="width: 130rpx;"><up-button @click="close" plain color="#999">取消绑定</up-button></view>
|
<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 style="width: 350rpx;"><up-button @getphonenumber="change" open-type="getPhoneNumber"
|
||||||
</view>
|
color="#20B128">立即绑定</up-button></view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</view>
|
||||||
|
</up-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const props = defineProps({
|
const emit = defineEmits(['close', 'change']);
|
||||||
show: {
|
const close = () => {
|
||||||
type: Boolean,
|
emit('close');
|
||||||
default: false
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const emit = defineEmits(['close', 'change']);
|
|
||||||
const close = () => {
|
|
||||||
emit('close');
|
|
||||||
}
|
|
||||||
|
|
||||||
const change = (e)=>{
|
|
||||||
emit('change', e);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const change = (e) => {
|
||||||
|
emit('change', e);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.m-modal-popup{
|
.m-modal-popup {
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
.head-title-modal{
|
|
||||||
font-size: 32rpx;
|
.head-title-modal {
|
||||||
text-align: center;
|
font-size: 32rpx;
|
||||||
}
|
text-align: center;
|
||||||
.content-modal{
|
}
|
||||||
font-size: 26rpx;
|
|
||||||
color: #999;
|
.content-modal {
|
||||||
text-align: center;
|
font-size: 26rpx;
|
||||||
padding: 40rpx 0;
|
color: #999;
|
||||||
}
|
text-align: center;
|
||||||
.btn-box-modal{
|
padding: 40rpx 0;
|
||||||
display: flex;
|
}
|
||||||
justify-content: space-between;
|
|
||||||
}
|
.btn-box-modal {
|
||||||
}
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -37,13 +37,13 @@
|
||||||
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
|
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
|
||||||
<view>购买重量<text style="color: #F55726;">*</text></view>
|
<view>购买重量<text style="color: #F55726;">*</text></view>
|
||||||
<view style="justify-content: end;">
|
<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>
|
</view>
|
||||||
<view v-else class="row" style="height: 100rpx;">
|
<view v-else class="row" style="height: 100rpx;">
|
||||||
<view>购买数量<text style="color: #F55726;">*</text></view>
|
<view>购买数量<text style="color: #F55726;">*</text></view>
|
||||||
<view style="justify-content: end;">
|
<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>
|
</view>
|
||||||
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
|
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
|
||||||
|
@ -80,6 +80,9 @@
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const valChange = () => {
|
||||||
|
uni.vibrateShort();
|
||||||
|
}
|
||||||
|
|
||||||
let priceKey = ref({})
|
let priceKey = ref({})
|
||||||
if (uni.getStorageSync('PRICE_KEY')) {
|
if (uni.getStorageSync('PRICE_KEY')) {
|
||||||
|
|
|
@ -4,17 +4,22 @@ import store from "@/store/user.js"
|
||||||
// 环境
|
// 环境
|
||||||
// let env = "dev"
|
// let env = "dev"
|
||||||
let env = "prod"
|
let env = "prod"
|
||||||
// let env = "liu";
|
// let env = "release";
|
||||||
|
// let env = "local";
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
case 'dev':
|
case 'dev':
|
||||||
BASE_URL = 'https://test-multi-store.lihaink.cn';
|
BASE_URL = 'https://test-multi-store.lihaink.cn';
|
||||||
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
case 'liu':
|
case 'release':
|
||||||
BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
|
BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
|
||||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
break;
|
break;
|
||||||
|
case 'local':
|
||||||
|
BASE_URL = 'http://192.168.1.201:8545';
|
||||||
|
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
BASE_URL = 'https://multi-store.lihaink.cn';
|
BASE_URL = 'https://multi-store.lihaink.cn';
|
||||||
WSS_URL = 'wss://multi-store.lihaink.cn/pull'
|
WSS_URL = 'wss://multi-store.lihaink.cn/pull'
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,7 +19,7 @@
|
||||||
<view class="page-box1">
|
<view class="page-box1">
|
||||||
<view class="total" @click='isAdmin=!isAdmin'>
|
<view class="total" @click='isAdmin=!isAdmin'>
|
||||||
<view>共计<text style="color: #20B128;">{{cartList.length}}</text>件</view>
|
<view>共计<text style="color: #20B128;">{{cartList.length}}</text>件</view>
|
||||||
<view v-if="!isAdmin">管理</view>
|
<view v-if="!isAdmin">删除商品</view>
|
||||||
<view v-else>完成</view>
|
<view v-else>完成</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="cartList.length>0" class="list">
|
<view v-if="cartList.length>0" class="list">
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<text>个人中心</text>
|
<text>个人中心</text>
|
||||||
</view>
|
</view>
|
||||||
</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)">
|
<scroll-view class="head-view" scroll-x @scrolltolower="getgoodClassList(0)">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" :class="{ 'item-active': topActive === item.id }"
|
<view class="item" :class="{ 'item-active': topActive === item.id }"
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tag">
|
<view class="tag">
|
||||||
<view class="icon" />
|
<view class="icon" />
|
||||||
赠10%品牌礼品
|
赠10%品牌礼品券
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
|
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
|
||||||
|
@ -212,16 +212,15 @@
|
||||||
<view class="price-info">
|
<view class="price-info">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view>合计</view>
|
<view>合计</view>
|
||||||
<view class="price" v-if='cartInfo.pay_price<=0||userStore?.userInfo?.user_ship !=4'>¥<text
|
<view class="price">¥<text style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
|
||||||
style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 22rpx;text-indent: 3em;color: #F55726;"
|
<view style="font-size: 22rpx;color: #F55726;padding-left: 60rpx;"
|
||||||
v-if="cartInfo.msg&&cartInfo.total_price>0 ">
|
v-if="cartInfo.msg&&cartInfo.total_price>0">
|
||||||
{{cartInfo.msg }}
|
{{cartInfo.msg }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<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>
|
||||||
<view class="cart" @click="navTo(`/pages/cart/cart`)">
|
<view class="cart" @click="navTo(`/pages/cart/cart`)">
|
||||||
<image src="@/static/icon/cart.png"></image>
|
<image src="@/static/icon/cart.png"></image>
|
||||||
|
@ -238,11 +237,11 @@
|
||||||
温馨提示
|
温馨提示
|
||||||
</view>
|
</view>
|
||||||
<view class="rect-contetn">
|
<view class="rect-contetn">
|
||||||
只需再购买 {{500- cartInfo.pay_price}} 元,就能拥有10%的品牌礼品券,若错过此次机会则无礼品券
|
只需再凑满 {{500- cartInfo.pay_price}} 元,即可享受采购金额10%的品牌礼品兑换券,错过此次机会则无礼品券。
|
||||||
</view>
|
</view>
|
||||||
<view class="rect-btn">
|
<view class="rect-btn">
|
||||||
<view style="width: 236rpx;">
|
<view style="width: 236rpx;">
|
||||||
<up-button @click="abandActive">放弃优惠</up-button>
|
<up-button @click="abandActive">放弃礼品券</up-button>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 236rpx;">
|
<view style="width: 236rpx;">
|
||||||
<up-button color="#20b128" @click="showOverlay=false">继续采购</up-button>
|
<up-button color="#20b128" @click="showOverlay=false">继续采购</up-button>
|
||||||
|
@ -364,6 +363,8 @@
|
||||||
const show = ref(0);
|
const show = ref(0);
|
||||||
const topActive = ref(0);
|
const topActive = ref(0);
|
||||||
const changeOne = async (item, index) => {
|
const changeOne = async (item, index) => {
|
||||||
|
where.value.top_cate_id = item.id
|
||||||
|
delete where.value.two_cate_id // 删除二级分类的id, 因为切换一级分类时, 二级分类的id应该为空, 否则会获取到错误的商品列表数据
|
||||||
topActive.value = item.id;
|
topActive.value = item.id;
|
||||||
show.value = 0;
|
show.value = 0;
|
||||||
goodClassTow.value = item?.children || [];
|
goodClassTow.value = item?.children || [];
|
||||||
|
@ -376,6 +377,8 @@
|
||||||
|
|
||||||
const leftActive = ref(0);
|
const leftActive = ref(0);
|
||||||
const changeTwo = (item, index) => {
|
const changeTwo = (item, index) => {
|
||||||
|
console.log(item)
|
||||||
|
where.value.two_cate_id = item.id
|
||||||
isScroll.value = false;
|
isScroll.value = false;
|
||||||
getWXDom(instance)
|
getWXDom(instance)
|
||||||
leftActive.value = item.id;
|
leftActive.value = item.id;
|
||||||
|
@ -457,17 +460,19 @@
|
||||||
if (class_all) class_id = ""; //只能带其中一个
|
if (class_all) class_id = ""; //只能带其中一个
|
||||||
if (loadmore) where.value.page_no++;
|
if (loadmore) where.value.page_no++;
|
||||||
else where.value.page_no = 1;
|
else where.value.page_no = 1;
|
||||||
goodListApi({
|
let data = {
|
||||||
...where.value,
|
...where.value,
|
||||||
class_all: class_all,
|
class_all: class_all,
|
||||||
class: class_id,
|
class: class_id,
|
||||||
cate_id: 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) {
|
for (let key in res.data.extend) {
|
||||||
priceKey[key] = res.data.extend[key]
|
priceKey[key] = res.data.extend[key]
|
||||||
}
|
}
|
||||||
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
|
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
|
||||||
console.log(priceKey)
|
|
||||||
if (loadmore) goodList.value.push(...res.data.lists);
|
if (loadmore) goodList.value.push(...res.data.lists);
|
||||||
else goodList.value = res.data.lists;
|
else goodList.value = res.data.lists;
|
||||||
})
|
})
|
||||||
|
@ -581,6 +586,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!url) return;
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
})
|
})
|
||||||
|
@ -591,6 +599,8 @@
|
||||||
const goodRef = ref(null);
|
const goodRef = ref(null);
|
||||||
const goodData = ref({});
|
const goodData = ref({});
|
||||||
const openGoodPopup = (item) => { // 打开数量/重量弹窗
|
const openGoodPopup = (item) => { // 打开数量/重量弹窗
|
||||||
|
navTo(false)
|
||||||
|
if (!userStore.token || !userStore.userInfo.mobile) return;
|
||||||
goodData.value = item;
|
goodData.value = item;
|
||||||
goodRef.value.setData(item);
|
goodRef.value.setData(item);
|
||||||
showGoodPopup.value = true;
|
showGoodPopup.value = true;
|
||||||
|
@ -694,7 +704,6 @@
|
||||||
}
|
}
|
||||||
// 店铺id
|
// 店铺id
|
||||||
if (opt.id && opt.id != 'undefined') {
|
if (opt.id && opt.id != 'undefined') {
|
||||||
console.log(opt.id, opt.id != 'undefined', "进来了这里")
|
|
||||||
where.value.store_id = opt.id;
|
where.value.store_id = opt.id;
|
||||||
const info = await shopDetailApi({
|
const info = await shopDetailApi({
|
||||||
store_id: where.value.store_id
|
store_id: where.value.store_id
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill"
|
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill"
|
||||||
color="#fff" size="28"></up-icon>微信快捷登录</up-button>
|
color="#fff" size="28"></up-icon>微信快捷登录</up-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<!-- <view class="btn">
|
||||||
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
||||||
name="account-fill" color="#fff" size="28"></up-icon>手机号快捷登录</up-button>
|
name="account-fill" color="#fff" size="28"></up-icon>手机号快捷登录</up-button>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view class="btn">
|
<!-- <view class="btn">
|
||||||
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
||||||
size="28"></up-icon>公众号授权</up-button>
|
size="28"></up-icon>公众号授权</up-button>
|
||||||
|
|
142
pages/my/my.vue
142
pages/my/my.vue
|
@ -1,7 +1,7 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.rest {
|
.rest {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-around;
|
||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
|
|
||||||
.rest-item {
|
.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>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
@ -29,7 +43,7 @@
|
||||||
<image class="bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp"
|
<image class="bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp"
|
||||||
mode="widthFix"></image>
|
mode="widthFix"></image>
|
||||||
<view class="u-card">
|
<view class="u-card">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;" @click="updataInfp">
|
||||||
<up-avatar :src="userInfo.avatar" size="56"></up-avatar>
|
<up-avatar :src="userInfo.avatar" size="56"></up-avatar>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="u-phone">{{userInfo.nickname}}</view>
|
<view class="u-phone">{{userInfo.nickname}}</view>
|
||||||
|
@ -42,32 +56,37 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</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">
|
||||||
<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-num">{{userInfo.now_money||"0.00"}}</view>
|
||||||
<view class="rest-item-txt">余额</view>
|
<view class="rest-item-txt">余额</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=1')">
|
<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-num">{{userInfo.purchase_funds||'0.00'}}</view>
|
||||||
<view class="rest-item-txt">采购款</view>
|
<view class="rest-item-txt">采购款</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rest-item">
|
<view class="rest-item">
|
||||||
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
|
<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 class="rest-item-txt">返还金</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
<!-- <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" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
||||||
<view class="rest-item">
|
<view class="rest-item">
|
||||||
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
|
<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>
|
</view>
|
||||||
<view class="order-info-box">
|
<view class="order-info-box">
|
||||||
|
@ -120,10 +139,38 @@
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import useUserStore from "@/store/user";
|
import useUserStore from "@/store/user";
|
||||||
|
@ -135,13 +182,18 @@
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
userInfoApi
|
userInfoApi,
|
||||||
|
uploadImg,
|
||||||
|
loginUpdateUserApi
|
||||||
} from "@/api/user.js"
|
} from "@/api/user.js"
|
||||||
|
import {
|
||||||
|
config
|
||||||
|
} from "@/config/app.js"
|
||||||
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = ref({});
|
const userInfo = ref({});
|
||||||
|
let token = uni.getStorageSync('token') || ''
|
||||||
const orderCount = ref({
|
const orderCount = ref({
|
||||||
no_pay: 0,
|
no_pay: 0,
|
||||||
receiving: 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 = () => {
|
const logout = () => {
|
||||||
userStore.setToken('');
|
userStore.setToken('');
|
||||||
userStore.setUserInfo({});
|
userStore.setUserInfo({});
|
||||||
|
@ -191,6 +295,9 @@
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
userInfoApi().then(res => {
|
userInfoApi().then(res => {
|
||||||
userInfo.value = res.data;
|
userInfo.value = res.data;
|
||||||
|
formData.avatar = res.data.avatar
|
||||||
|
formData.nick_name = res.data.nickname
|
||||||
|
|
||||||
})
|
})
|
||||||
getOrderCount();
|
getOrderCount();
|
||||||
})
|
})
|
||||||
|
@ -222,7 +329,7 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 50rpx 0 50rpx 50rpx;
|
padding: 50rpx 0 50rpx 50rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50rpx;
|
top: -10rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -407,6 +514,9 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popContent {
|
||||||
|
padding: 30rpx 20rpx 50rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.gift {
|
.gift {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
|
|
@ -113,6 +113,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<ZyPasswordboard v-if='passwordBoardVisible' v-model:visible="passwordBoardVisible" v-bind="passwordBoardProps"
|
||||||
|
@close='closeKeyBord' />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -127,6 +129,7 @@
|
||||||
import good from "./component/good.vue";
|
import good from "./component/good.vue";
|
||||||
import orderCanclePopup from "@/components/orderCanclePopup.vue"
|
import orderCanclePopup from "@/components/orderCanclePopup.vue"
|
||||||
import modal from "@/components/modal.vue"
|
import modal from "@/components/modal.vue"
|
||||||
|
import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue';
|
||||||
import {
|
import {
|
||||||
cancelOrderApi,
|
cancelOrderApi,
|
||||||
rePaymentApi,
|
rePaymentApi,
|
||||||
|
@ -134,6 +137,11 @@
|
||||||
orderListApi,
|
orderListApi,
|
||||||
purchaseAgainApi
|
purchaseAgainApi
|
||||||
} from "@/api/order.js"
|
} from "@/api/order.js"
|
||||||
|
import {
|
||||||
|
userInfoApi
|
||||||
|
} from "@/api/user.js"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const tabsActive = ref(0)
|
const tabsActive = ref(0)
|
||||||
const changeTab = ({
|
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({
|
rePaymentApi({
|
||||||
order_id: e.id,
|
order_id: e.id,
|
||||||
address_id: e.address_id,
|
address_id: e.address_id,
|
||||||
|
@ -317,6 +353,11 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const notWxPay = () => {
|
||||||
|
alert("不是微信支付")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 订单
|
// 订单
|
||||||
const where = ref([{
|
const where = ref([{
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
|
|
|
@ -79,9 +79,16 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="m-card order-remark">
|
<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>订单备注</text>
|
||||||
<text>0/200</text>
|
<text>{{formData.remark.length}}/140</text>
|
||||||
</view>
|
</view>
|
||||||
<up-textarea style="background-color: #F6F6F6;" v-model="formData.remark" placeholder="暂无备注内容"
|
<up-textarea style="background-color: #F6F6F6;" v-model="formData.remark" placeholder="暂无备注内容"
|
||||||
:height="40"></up-textarea>
|
:height="40"></up-textarea>
|
||||||
|
@ -103,8 +110,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row"
|
<!-- <view class="row"
|
||||||
v-if="userInfo.user_ship == 4 || userInfo.user_ship == 5 || userInfo.user_ship == 6 || userInfo.user_ship == 1">
|
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="row"> -->
|
||||||
<view class="icon-text">
|
<view class="icon-text">
|
||||||
<image src="@/static/icon/YEZF.png" style="width:40rpx;height: 40rpx;" />
|
<image src="@/static/icon/YEZF.png" style="width:40rpx;height: 40rpx;" />
|
||||||
|
@ -120,7 +128,8 @@
|
||||||
</view>
|
</view>
|
||||||
</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">
|
<view class="icon-text">
|
||||||
<image src="@/static/icon/cgkzf.png" style="width:40rpx;height: 40rpx;" />
|
<image src="@/static/icon/cgkzf.png" style="width:40rpx;height: 40rpx;" />
|
||||||
<text style="margin-left: 20rpx;font-size: 26rpx;">采购款支付</text>
|
<text style="margin-left: 20rpx;font-size: 26rpx;">采购款支付</text>
|
||||||
|
@ -140,7 +149,7 @@
|
||||||
|
|
||||||
<view class="submit-row">
|
<view class="submit-row">
|
||||||
<view class="tips">
|
<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">
|
<view class="all">
|
||||||
<text style="color: #000;">合计: </text>
|
<text style="color: #000;">合计: </text>
|
||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
|
@ -152,8 +161,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 200rpx;">
|
<view style="width: 200rpx;">
|
||||||
<up-button color="#20B128" shape="circle" @click="submitOrder"
|
<up-button color="#20B128" shape="circle" @click="submitOrder" :throttleTime="1000">支付</up-button>
|
||||||
:throttleTime="1000">预付款提交</up-button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -208,6 +216,7 @@
|
||||||
|
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
const reservation_time = ref('')
|
const reservation_time = ref('')
|
||||||
|
const isCh = ref(0)
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
remark: ""
|
remark: ""
|
||||||
|
@ -371,11 +380,6 @@
|
||||||
const passwordBoardProps = {
|
const passwordBoardProps = {
|
||||||
title: '输入支付密码',
|
title: '输入支付密码',
|
||||||
onComplete(value) {
|
onComplete(value) {
|
||||||
// uni.vibrateShort({
|
|
||||||
// success: function() {
|
|
||||||
// console.log('success');
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
password.value = value
|
password.value = value
|
||||||
passwordBoardVisible.value = false
|
passwordBoardVisible.value = false
|
||||||
payFn()
|
payFn()
|
||||||
|
@ -554,6 +558,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|
Loading…
Reference in New Issue