Merge branch 'master' of https://gitee.com/sheepjs/shopro-uniapp
commit
0c9c0c4dc3
7
env
7
env
|
@ -1,3 +1,6 @@
|
|||
# 版本号
|
||||
SHOPRO_VERSION = v1.8.1
|
||||
|
||||
# 正式环境接口域名
|
||||
SHOPRO_BASE_URL = https://api.shopro.sheepjs.com
|
||||
|
||||
|
@ -13,7 +16,5 @@ SHOPRO_API_PATH = /shop/api/
|
|||
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
|
||||
SHOPRO_STATIC_URL = https://file.sheepjs.com
|
||||
|
||||
SHOPRO_VERSION = v1.8.1
|
||||
|
||||
# 是否开启直播 1 开启直播 | 0 关闭直播
|
||||
# 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启)
|
||||
SHOPRO_MPLIVE_ON = 0
|
|
@ -151,6 +151,7 @@
|
|||
cart.delete(cartItem.id);
|
||||
return;
|
||||
}
|
||||
if(cartItem.goods_num === e) return;
|
||||
cartItem.goods_num = e;
|
||||
cart.update({
|
||||
goods_id: cartItem.goods_id,
|
||||
|
|
|
@ -3,13 +3,9 @@
|
|||
<s-layout title="申请售后">
|
||||
<!-- 售后商品 -->
|
||||
<view class="goods-box">
|
||||
<s-goods-item
|
||||
:img="state.goodsItem.goods_image"
|
||||
:title="state.goodsItem.goods_title"
|
||||
:skuText="state.goodsItem.goods_sku_text"
|
||||
:price="state.goodsItem.goods_price"
|
||||
:num="state.goodsItem.goods_num"
|
||||
></s-goods-item>
|
||||
<s-goods-item :img="state.goodsItem.goods_image" :title="state.goodsItem.goods_title"
|
||||
:skuText="state.goodsItem.goods_sku_text" :price="state.goodsItem.goods_price"
|
||||
:num="state.goodsItem.goods_num"></s-goods-item>
|
||||
</view>
|
||||
|
||||
<uni-forms ref="form" v-model="formData" :rules="rules" label-position="top">
|
||||
|
@ -18,17 +14,9 @@
|
|||
<view class="item-title ss-m-b-20">售后类型</view>
|
||||
<view class="ss-flex-col">
|
||||
<radio-group @change="onRefundChange">
|
||||
<label
|
||||
class="ss-flex ss-col-center ss-p-y-10"
|
||||
v-for="(item, index) in state.refundTypeList"
|
||||
:key="index"
|
||||
>
|
||||
<radio
|
||||
:checked="formData.type === item.value"
|
||||
color="var(--ui-BG-Main)"
|
||||
style="transform: scale(0.8)"
|
||||
:value="item.value"
|
||||
/>
|
||||
<label class="ss-flex ss-col-center ss-p-y-10" v-for="(item, index) in state.refundTypeList" :key="index">
|
||||
<radio :checked="formData.type === item.value" color="var(--ui-BG-Main)" style="transform: scale(0.8)"
|
||||
:value="item.value" />
|
||||
<view class="item-value ss-m-l-8">{{ item.text }}</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
|
@ -47,13 +35,8 @@
|
|||
<view class="refund-item u-m-b-20">
|
||||
<view class="item-title ss-m-b-20">联系方式</view>
|
||||
<view class="input-box u-flex">
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
type="number"
|
||||
v-model="formData.mobile"
|
||||
placeholder="请输入您的联系电话"
|
||||
paddingLeft="10"
|
||||
/>
|
||||
<uni-easyinput :inputBorder="false" type="number" v-model="formData.mobile" placeholder="请输入您的联系电话"
|
||||
paddingLeft="10" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -61,23 +44,11 @@
|
|||
<view class="refund-item">
|
||||
<view class="item-title ss-m-b-20">相关描述</view>
|
||||
<view class="describe-box">
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
class="describe-content"
|
||||
type="textarea"
|
||||
maxlength="120"
|
||||
autoHeight
|
||||
v-model="formData.content"
|
||||
placeholder="客官~请描述您遇到的问题,建议上传照片"
|
||||
></uni-easyinput>
|
||||
<uni-easyinput :inputBorder="false" class="describe-content" type="textarea" maxlength="120" autoHeight
|
||||
v-model="formData.content" placeholder="客官~请描述您遇到的问题,建议上传照片"></uni-easyinput>
|
||||
<view class="upload-img">
|
||||
<s-uploader
|
||||
v-model:url="formData.images"
|
||||
fileMediatype="image"
|
||||
limit="9"
|
||||
mode="grid"
|
||||
:imageStyles="{ width: '168rpx', height: '168rpx' }"
|
||||
/>
|
||||
<s-uploader v-model:url="formData.images" fileMediatype="image" limit="9" mode="grid"
|
||||
:imageStyles="{ width: '168rpx', height: '168rpx' }" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -86,9 +57,7 @@
|
|||
<su-fixed bottom placeholder>
|
||||
<view class="foot-wrap">
|
||||
<view class="foot_box ss-flex ss-col-center ss-row-between ss-p-x-30">
|
||||
<button class="ss-reset-button contcat-btn" @tap="sheep.$router.go('/pages/chat/index')"
|
||||
>联系客服</button
|
||||
>
|
||||
<button class="ss-reset-button contcat-btn" @tap="sheep.$router.go('/pages/chat/index')">联系客服</button>
|
||||
<button class="ss-reset-button ui-BG-Main-Gradient sub-btn" @tap="submit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -97,29 +66,17 @@
|
|||
|
||||
<su-popup :show="state.showModal" round="10" :showClose="true" @close="state.showModal = false">
|
||||
<view class="modal-box page_box">
|
||||
<view class="modal-head item-title head_box ss-flex ss-row-center ss-col-center"
|
||||
>申请原因</view
|
||||
>
|
||||
<view class="modal-head item-title head_box ss-flex ss-row-center ss-col-center">申请原因</view>
|
||||
<view class="modal-content content_box">
|
||||
<radio-group @change="onChange">
|
||||
<label
|
||||
class="radio ss-flex ss-col-center"
|
||||
v-for="item in state.refundReasonList"
|
||||
:key="item.value"
|
||||
>
|
||||
<label class="radio ss-flex ss-col-center" v-for="item in state.refundReasonList" :key="item.value">
|
||||
<view class="ss-flex-1 ss-p-20">{{ item.title }}</view>
|
||||
<radio
|
||||
:value="item.value"
|
||||
color="var(--ui-BG-Main)"
|
||||
:checked="item.value === state.currentValue"
|
||||
/>
|
||||
<radio :value="item.value" color="var(--ui-BG-Main)" :checked="item.value === state.currentValue" />
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view class="modal-foot foot_box ss-flex ss-row-center ss-col-center">
|
||||
<button class="ss-reset-button close-btn ui-BG-Main-Gradient" @tap="onReason"
|
||||
>确定</button
|
||||
>
|
||||
<button class="ss-reset-button close-btn ui-BG-Main-Gradient" @tap="onReason">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</su-popup>
|
||||
|
@ -135,7 +92,6 @@
|
|||
showModal: false,
|
||||
currentValue: 0,
|
||||
goodsItem: {},
|
||||
// showSuccess: false,
|
||||
reasonText: '',
|
||||
//售后类型
|
||||
refundTypeList: [
|
||||
|
@ -190,6 +146,9 @@
|
|||
|
||||
// 提交表单
|
||||
async function submit() {
|
||||
// #ifdef MP
|
||||
sheep.$platform.useProvider('wechat').subscribeMessage('order_aftersale_change');
|
||||
// #endif
|
||||
let data = {
|
||||
...formData,
|
||||
order_id: state.goodsItem.order_id,
|
||||
|
@ -200,7 +159,6 @@
|
|||
uni.showToast({
|
||||
title: res.msg,
|
||||
});
|
||||
// state.showSuccess = true;
|
||||
sheep.$router.go('/pages/order/aftersale/list');
|
||||
}
|
||||
}
|
||||
|
@ -247,9 +205,11 @@
|
|||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
padding: 30rpx;
|
||||
|
||||
&:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
// 留言
|
||||
.describe-box {
|
||||
width: 690rpx;
|
||||
|
|
|
@ -394,7 +394,7 @@
|
|||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
// #ifdef MP
|
||||
sheep.$platform.useProvider('wechat').subscribeMessage('order_apply_refund');
|
||||
sheep.$platform.useProvider('wechat').subscribeMessage('order_refund');
|
||||
// #endif
|
||||
const { error, data } = await sheep.$api.order.applyRefund(orderId);
|
||||
if (error === 0) {
|
||||
|
|
|
@ -1,53 +1,34 @@
|
|||
<template>
|
||||
<s-layout title="充值" class="withdraw-wrap" navbar="inner">
|
||||
<view
|
||||
class="wallet-num-box ss-flex ss-col-center ss-row-between"
|
||||
:style="[
|
||||
<view class="wallet-num-box ss-flex ss-col-center ss-row-between" :style="[
|
||||
{
|
||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||
paddingTop: Number(statusBarHeight + 108) + 'rpx',
|
||||
},
|
||||
]"
|
||||
>
|
||||
]">
|
||||
<view class="">
|
||||
<view class="num-title">当前余额(元)</view>
|
||||
<view class="wallet-num">{{ userInfo.money }}</view>
|
||||
</view>
|
||||
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/recharge-log')"
|
||||
>充值记录</button
|
||||
>
|
||||
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/recharge-log')">充值记录</button>
|
||||
</view>
|
||||
<view class="recharge-box">
|
||||
<view class="recharge-card-box" v-if="state.data.status">
|
||||
<view class="input-label ss-m-b-50">充值金额</view>
|
||||
<view class="input-box ss-flex border-bottom ss-p-b-20" v-if="state.data.custom_status">
|
||||
<view class="unit">¥</view>
|
||||
<uni-easyinput
|
||||
v-model="state.recharge_money"
|
||||
type="digit"
|
||||
placeholder="请输入充值金额"
|
||||
:inputBorder="false"
|
||||
>
|
||||
<uni-easyinput v-model="state.recharge_money" type="digit" placeholder="请输入充值金额" :inputBorder="false">
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view class="face-value-box ss-flex ss-flex-wrap ss-m-y-40">
|
||||
<button
|
||||
class="ss-reset-button face-value-btn"
|
||||
v-for="item in state.faceValueList"
|
||||
:key="item.money"
|
||||
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]"
|
||||
@tap="onCard(item.money)"
|
||||
>
|
||||
<button class="ss-reset-button face-value-btn" v-for="item in state.faceValueList" :key="item.money"
|
||||
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]" @tap="onCard(item.money)">
|
||||
<text class="face-value-title">{{ item.money }}</text>
|
||||
<view v-if="item.gift" class="face-value-tag">
|
||||
送{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view
|
||||
>
|
||||
送{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view>
|
||||
</button>
|
||||
</view>
|
||||
<button
|
||||
class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main"
|
||||
@tap="onConfirm"
|
||||
>
|
||||
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main" @tap="onConfirm">
|
||||
确认充值
|
||||
</button>
|
||||
</view>
|
||||
|
@ -93,6 +74,9 @@
|
|||
recharge_money: state.recharge_money,
|
||||
});
|
||||
if (error === 0) {
|
||||
// #ifdef MP
|
||||
sheep.$platform.useProvider('wechat').subscribeMessage('money_change');
|
||||
// #endif
|
||||
sheep.$router.go('/pages/pay/index', { orderSN: data.order_sn, type: 'recharge' });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ export default class SheepPay {
|
|||
const { error, data } = await this.prepay();
|
||||
if (error === 0) {
|
||||
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
||||
}`;
|
||||
}&orderType=${this.orderType}`;
|
||||
location.href = `${data.pay_data.h5_url}&redirect_url=${encodeURIComponent(redirect_url)}`;
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ export default class SheepPay {
|
|||
let { error, data } = await this.prepay();
|
||||
if (error === 0) {
|
||||
const redirect_url = `${getRootUrl()}pages/pay/result?orderSN=${this.orderSN}&payment=${this.payment
|
||||
}`;
|
||||
}&orderType=${this.orderType}`;
|
||||
location.href = data.pay_data + encodeURIComponent(redirect_url);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import uni from '@dcloudio/vite-plugin-uni';
|
|||
import path from 'path';
|
||||
// import viteCompression from 'vite-plugin-compression';
|
||||
import uniReadPagesV3Plugin from './sheep/router/utils/uni-read-pages-v3';
|
||||
import mpliveMainfestPlugin from './sheep/libs/mpLive-manifest-plugin';
|
||||
import mpliveMainfestPlugin from './sheep/libs/mplive-manifest-plugin';
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
|
Loading…
Reference in New Issue