This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-20 17:35:35 +08:00
parent 149de63487
commit f0d75a0ae0
7 changed files with 436 additions and 234 deletions

View File

@ -16,30 +16,36 @@ import request from "@/utils/request.js";
* 获取主页数据 无需授权
*
*/
export function getIndexData()
{
return request.get("common/home",{},{ noAuth : true});
export function getIndexData() {
return request.get("common/home", {}, {
noAuth: true
});
}
/**
* 获取app版本
*/
export function getAppVersion() {
return request.get('appVersion',{},{noAuth:true});
return request.get('appVersion', {}, {
noAuth: true
});
}
/**
* 获取登录授权login
*
*/
export function getLogo()
{
return request.get('wechat/get_logo', {}, { noAuth : true});
export function getLogo() {
return request.get('wechat/get_logo', {}, {
noAuth: true
});
}
/**
* 保存form_id
* @param string formId
*/
export function setFormId(formId) {
return request.post("wechat/set_form_id", { formId: formId});
return request.post("wechat/set_form_id", {
formId: formId
});
}
/**
* 领取优惠卷
@ -54,14 +60,18 @@ export function setCouponReceive(couponId){
* @param object data
*/
export function getShopCoupons(id) {
return request.get('coupon/store/'+id,{},{ noAuth: true})
return request.get('coupon/store/' + id, {}, {
noAuth: true
})
}
/**
* 商品优惠券列表
* @param object data
*/
export function getCoupons(data) {
return request.get('coupon/product',data,{ noAuth: true})
return request.get('coupon/product', data, {
noAuth: true
})
}
/**
* 我的优惠券
@ -75,7 +85,9 @@ export function getUserCoupons(data){
*
*/
export function getArticleCategoryList() {
return request.get('article/category/lst',{},{noAuth:true})
return request.get('article/category/lst', {}, {
noAuth: true
})
}
/**
* 文章列表
@ -83,21 +95,27 @@ export function getArticleCategoryList(){
*
*/
export function getArticleList(cid, data) {
return request.get('article/lst/' + cid, data,{noAuth:true})
return request.get('article/lst/' + cid, data, {
noAuth: true
})
}
/**
* 文章 热门列表
*
*/
export function getArticleHotList() {
return request.get('article/hot/list',{},{noAuth:true});
return request.get('article/hot/list', {}, {
noAuth: true
});
}
/**
* 文章 轮播列表
*
*/
export function getArticleBannerList() {
return request.get('article/banner/list',{},{noAuth:true})
return request.get('article/banner/list', {}, {
noAuth: true
})
}
/**
* 文章详情
@ -105,28 +123,41 @@ export function getArticleBannerList(){
*
*/
export function getArticleDetails(id) {
return request.get('article/detail/'+id,{},{noAuth:true});
return request.get('article/detail/' + id, {}, {
noAuth: true
});
}
/**
* 手机号+验证码登录接口
* @param object data
*/
export function loginMobile(data) {
return request.post('login/mobile',data,{noAuth:true})
return request.post('login/mobile', data, {
noAuth: true
})
}
/**
* 获取短信KEY
* @param object phone
*/
export function verifyCode() {
return request.get('verify_code', {},{noAuth:true})
return request.get('verify_code', {}, {
noAuth: true
})
}
/**
* 验证码发送
* @param object phone
*/
export function registerVerify(phone, reset, key, code) {
return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true})
return request.post('register/verify', {
phone: phone,
type: reset === undefined ? 'reset' : reset,
key: key,
code: code
}, {
noAuth: true
})
}
/**
* 手机号注册
@ -134,7 +165,9 @@ export function registerVerify(phone, reset, key, code){
*
*/
export function phoneRegister(data) {
return request.post('register',data,{noAuth:true});
return request.post('register', data, {
noAuth: true
});
}
/**
* 手机号修改密码
@ -142,7 +175,9 @@ export function phoneRegister(data){
*
*/
export function phoneRegisterReset(data) {
return request.post('register/reset',data,{noAuth:true})
return request.post('register/reset', data, {
noAuth: true
})
}
/**
* 手机号+密码登录
@ -150,7 +185,9 @@ export function phoneRegisterReset(data){
*
*/
export function phoneLogin(data) {
return request.post('login',data,{noAuth:true})
return request.post('login', data, {
noAuth: true
})
}
/* h5切换公众号登陆 */
export function switchH5Login(data) {
@ -168,39 +205,68 @@ export function modifyPhone(data){
export function modifyPassword(data) {
return request.post('user/change/password', data);
}
/** 设置登录密码 */
export function setPayPwd(data) {
return request.post('User/set/withdrawal_pwd', data);
}
/** 退出登錄 */
export function logout() {
return request.get('logout');
}
/** 获取订阅消息id */
export function getTemlIds() {
return request.get('wechat/teml_ids', {}, { noAuth:true});
return request.get('wechat/teml_ids', {}, {
noAuth: true
});
}
/** 首页拼团数据 */
export function pink() {
return request.get('pink', {}, { noAuth:true});
return request.get('pink', {}, {
noAuth: true
});
}
/** 获取城市信息 */
export function getCity() {
return request.get('system/city/lst', { }, { noAuth: true });
return request.get('system/city/lst', {}, {
noAuth: true
});
}
export function getCityV2(pid) {
return request.get('v2/system/city/lst/'+pid, {}, {noAuth: true});
return request.get('v2/system/city/lst/' + pid, {}, {
noAuth: true
});
}
export function getCityList(address) {
return request.get('v2/system/city', {address}, {noAuth: true});
return request.get('v2/system/city', {
address
}, {
noAuth: true
});
}
/** 获取小程序直播列表 */
export function getLiveList(page, limit) {
return request.get('wechat/live', { page, limit}, { noAuth: true });
return request.get('wechat/live', {
page,
limit
}, {
noAuth: true
});
}
/* APP登录 */
export function wechatAppAuth(data) {
return request.post("auth/app", data, { noAuth: true });
return request.post("auth/app", data, {
noAuth: true
});
}
/* APPLE登录 */
export function appleAppAuth(data) {
return request.post("auth/apple", data, { noAuth: true });
return request.post("auth/apple", data, {
noAuth: true
});
}
/* 小程序获取手机号解密 */
export function appletsDecrypt(data) {
@ -210,7 +276,9 @@ export function appletsDecrypt(data) {
* 获取首页DIY
*/
export function getDiy(data) {
return request.get('diy',data,{ noAuth: true });
return request.get('diy', data, {
noAuth: true
});
}
/**
* 获取首页微页面
@ -352,7 +420,9 @@ export function getCateData(data) {
* @param {Object} data
*/
export function village(data) {
return request.get('v2/system/geo/lst', data, { noAuth: true });
return request.get('v2/system/geo/lst', data, {
noAuth: true
});
}
/**
@ -360,5 +430,7 @@ export function village(data) {
* @param {Object} data
*/
export function brigade(data) {
return request.get('v2/system/brigade', data, { noAuth: true });
return request.get('v2/system/brigade', data, {
noAuth: true
});
}

View File

@ -23,8 +23,10 @@
</view>
<view v-else class='item acea-row row-between-wrapper'>
<view>支付方式</view>
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3" class='itemCom'>微信</view>
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝</view>
<view v-if="order_pay_info.pay_type==1 || order_pay_info.pay_type==2 || order_pay_info.pay_type==3"
class='itemCom'>微信</view>
<view v-else-if="order_pay_info.pay_type==4 || order_pay_info.pay_type==5" class='itemCom'>支付宝
</view>
<view v-else class='itemCom'>余额</view>
</view>
<view v-if="order_type== 20" class='item acea-row row-between-wrapper'>
@ -35,12 +37,14 @@
<view>支付金额</view>
<view class='itemCom'>{{order_pay_info.pay_price}}</view>
</view>
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid" class='item acea-row row-between-wrapper'>
<view v-if="order_pay_info.give_integral > 0 && order_pay_info.paid"
class='item acea-row row-between-wrapper'>
<view>赠送积分</view>
<view class='itemCom t-color'>{{order_pay_info.give_integral}}</view>
</view>
<!--失败时加上这个 -->
<view class='item acea-row row-between-wrapper' v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
<view class='item acea-row row-between-wrapper'
v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline' && msg != 'success'">
<view>失败原因</view>
<view class='itemCom'>{{order_pay_info.pay_type==0 ? '余额不足':msg}}</view>
</view>
@ -49,9 +53,11 @@
<view @tap="goOrderDetails">
<button formType="submit" class='returnBnt gColor' hover-class='none'>查看订单</button>
</view>
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit" hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex" class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
<view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
<button @click="goPink(order_pay_info.activity_id)" class='returnBnt s-Color' formType="submit"
hover-class='none' v-if="order_pay_info.activity_type == 4 && order_pay_info.paid">邀请好友参团</button>
<button v-if="!order_pay_info.paid || order_pay_info.activity_type != 4" @click="goIndex"
class='returnBnt s-Color' formType="submit" hover-class='none'>返回首页</button>
<!-- <view class="coupon-wrapper" v-if="couponList.length>0 && order_pay_info.paid">
<view class="hd">
<view class="line"></view>
<view class="txt">赠送优惠券</view>
@ -79,7 +85,7 @@
<text v-if="!isOpen" class="iconfont icon-xiangxia"></text>
<text v-else class="iconfont icon-xiangshang"></text>
</view>
</view>
</view> -->
</view>
</view>
</template>
@ -94,11 +100,21 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {getPayOrder} from '@/api/order.js';
import {openOrderSubscribe} from '@/utils/SubscribeMessage.js';
import {mapGetters} from "vuex";
import { toLogin } from '@/libs/login.js';
import { HTTP_REQUEST_URL } from '@/config/app';
import {
getPayOrder
} from '@/api/order.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import {
mapGetters
} from "vuex";
import {
toLogin
} from '@/libs/login.js';
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
components: {
@ -245,6 +261,7 @@
border-radius: 10rpx;
padding: 1rpx 0 28rpx 0;
}
.payment-status .icon {
font-size: 70rpx;
width: 140rpx;
@ -256,19 +273,23 @@
border: 6rpx solid #f5f5f5;
margin: -76rpx auto 0 auto;
background-color: #999;
&.icon-duihao2 {
background-color: var(--view-theme);
}
}
.payment-status .icon.fail {
text-shadow: 0px 4px 0px #7a7a7a;
}
.payment-status .status {
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin: 25rpx 0 37rpx 0;
}
.payment-status .wrapper {
border: 1px solid #eee;
margin: 0 30rpx 47rpx 30rpx;
@ -276,16 +297,20 @@
border-left: 0;
border-right: 0;
}
.payment-status .wrapper .item {
font-size: 28rpx;
color: #282828;
}
.payment-status .wrapper .item~.item {
margin-top: 20rpx;
}
.payment-status .wrapper .item .itemCom {
color: #666;
}
.payment-status .returnBnt {
width: 630rpx;
height: 86rpx;
@ -295,17 +320,21 @@
text-align: center;
line-height: 86rpx;
margin: 0 auto 20rpx auto;
&.gColor {
background-color: var(--view-theme);
}
&.s-Color {
color: var(--view-theme);
border: 1px solid var(--view-theme);
}
}
.t-color {
color: var(--view-theme) !important;
}
.coupon-wrapper {
.hd {
display: flex;
@ -314,26 +343,32 @@
margin: 30rpx 0;
color: #999999;
font-size: 24rpx;
.line {
width: 70rpx;
height: 1px;
background: #DCDCDC;
}
.txt {
margin: 0 20rpx;
}
}
.coupon-box {
height: 356rpx;
padding: 0 20rpx;
overflow: hidden;
&.on {
height: auto;
}
.coupon-item {
width: 100%;
margin-bottom: 20rpx;
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06);
.left-bg {
display: flex;
align-items: center;
@ -342,21 +377,25 @@
height: 160rpx;
color: #fff;
font-size: 64rpx;
text {
margin-top: 26rpx;
font-size: 36rpx;
}
}
.info {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 20rpx;
padding: 20rpx 0;
.title {
color: #282828;
font-size: 30rpx;
}
.des {
font-size: 24rpx;
color: #999999;
@ -364,6 +403,7 @@
}
}
}
.more {
display: flex;
align-items: center;
@ -371,6 +411,7 @@
padding-top: 24rpx;
font-size: 24rpx;
color: #999999;
.iconfont {
margin-top: 6rpx;
margin-left: 10rpx;

View File

@ -45,7 +45,7 @@
</view>
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
<view class="v-btn">{{cartForm.total_amount||0}} 确认支付</view>
<view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}} 确认支付</view>
</view>
<!-- 登陆 -->
@ -116,7 +116,6 @@
isAuto: false, //
isShowAuth: false, //
mer_id: '',
tips: '暂未登陆~',
changeTxt: '展开',
isOpen: false,
keyBoardShow: false,
@ -135,7 +134,6 @@
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.tips = '加载中...';
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
@ -153,7 +151,6 @@
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.tips = '加载中...';
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
@ -268,9 +265,10 @@
that.merchantInfo = res.data.list;
}
}).catch((err) => {
that.tips = err.message || err.smg || err;
that.$util.Tips({
title: err.message || err.msg || err
}, () => {
})
// #ifdef APP
setTimeout(() => {

View File

@ -872,15 +872,23 @@
merchantLicenseIdentify({
image: res.data.path
}).then(res => {
uni.hideLoading();
if (res.status == 200) {
that.merchantData.address = res.data.address;
that.merchantData.user_name = res.data.legal_person;
that.merchantData.social_credit_code = res.data.register_number;
that.merchantData.company_name = res.data.name;
// that.$set('merchantData', that.merchantData);
uni.hideLoading();
} else {
that.$util.Tips({
title: "识别失败!"
})
}
}).catch((e) => {
uni.hideLoading();
Toast(e)
that.$util.Tips({
title: "识别失败"
})
})
});
},

View File

@ -481,6 +481,9 @@
<timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
<areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow'
@submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
<!-- 支付密码 -->
<!-- <popups></popups> -->
</view>
</template>
<script>
@ -549,6 +552,7 @@
import dayjs from "@/plugin/dayjs/dayjs.min.js";
import areaWindow from '@/components/areaWindow';
import timeranges from '@/components/timeranges';
import popups from "@/components/popups/index.vue";
export default {
components: {
couponListWindow,
@ -559,7 +563,8 @@
discountDetails,
"jyf-parser": parser,
areaWindow,
timeranges
timeranges,
popups
},
filters: {
filterDay(val) {
@ -629,8 +634,7 @@
img: 'width:100%;display:block;',
video: 'width:100%;'
},
radioList: [
{
radioList: [{
title: this.deliveryName,
check: true
},
@ -896,7 +900,8 @@
getUserInfo().then(res => {
this.userInfo = res.data;
//
if(this.userInfo.service&&this.userInfo.service.mer_id) getAdminApplyAPI(this.userInfo.service.mer_id).then(res => {
if (this.userInfo.service && this.userInfo.service.mer_id) getAdminApplyAPI(this.userInfo
.service.mer_id).then(res => {
this.moneyInfo = res.data;
this.cartArr.forEach(item => {
if (item.value == 'merBalance') item.payStatus = 1;
@ -1802,11 +1807,18 @@
data.takes.push(el.mer_id)
}
})
if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
return that.$util
.Tips({
return that.$util.Tips({
title: '余额不足!'
});
//
uni.showLoading({
title: '订单支付中',
mask: true

View File

@ -91,6 +91,16 @@
<text class='iconfont icon-you'></text>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>支付提现密码</view>
<view class='input acea-row row-between-wrapper' @click="changePayPwd">
<text class='id'>修改支付提现密码</text>
<text class='iconfont icon-you'></text>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view>填写邀请码</view>
<view class='input acea-row row-between-wrapper' @click="showPopup">
@ -380,7 +390,7 @@
let that = this;
if (that.userInfo.phone) {
uni.navigateTo({
url: `/pages/users/user_modify_pwd/index`
url: `/pages/users/user_modify_pwd/index?type=loginPwd`
})
} else {
that.$util.Tips({
@ -388,6 +398,21 @@
});
}
},
//
changePayPwd() {
let that = this;
if (that.userInfo.phone) {
uni.navigateTo({
url: `/pages/users/user_modify_pwd/index?type=payPwd`
})
} else {
that.$util.Tips({
title: '请先绑定手机号'
});
}
},
showPopup() {
if (this.promotion_code) return Toast('已经填写过了');
this.$refs.popup.open();

View File

@ -8,24 +8,29 @@
<text class="phone">{{userInfo.phone}}</text>
</view>
<view class="item acea-row row-between-wrapper codeVal">
<input type='number' placeholder='验证码' placeholder-class='placeholder' class="codeIput" v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' @click="handleVerify">
<input type='number' placeholder='验证码' placeholder-class='placeholder' class="codeIput"
v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
@click="handleVerify">
{{ text }}
</button>
</view>
<view class="border"></view>
<view class="item">
<input type='password' placeholder='新密码' placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
<input type='password' :placeholder="type == 'payPwd'?'请设置支付密码':'新密码'"
placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
</view>
<view class="item">
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
<input type='password' :placeholder="type == 'payPwd'?'请再次设置支付密码':'新密码'"
placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
</view>
</view>
</view>
<button form-type="submit" @click="confirmSubmit" class="confirmBnt">确认</button>
</view>
</form>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify"></Verify>
</view>
</template>
@ -40,11 +45,24 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import sendVerifyCode from "@/mixins/SendVerifyCode";
import { modifyPassword, verifyCode, appletsDecrypt } from '@/api/api.js';
import { getUserInfo } from '@/api/user.js';
import { registerVerify } from '@/api/user.js'
import { mapGetters } from "vuex";
import { toLogin } from '@/libs/login.js';
import {
modifyPassword,
verifyCode,
appletsDecrypt,
setPayPwd
} from '@/api/api.js';
import {
getUserInfo
} from '@/api/user.js';
import {
registerVerify
} from '@/api/user.js'
import {
mapGetters
} from "vuex";
import {
toLogin
} from '@/libs/login.js';
import Verify from '@/components/verify/verify.vue';
export default {
mixins: [sendVerifyCode],
@ -61,11 +79,13 @@
key: '',
codeVal: '',
disabled: false,
type: ''
};
},
computed: mapGetters(['isLogin', 'viewColor']),
onLoad() {
onLoad(opt) {
let that = this
this.type = opt.type;
if (this.isLogin) {
this.getUserInfo()
} else {
@ -93,6 +113,7 @@
that.userInfo = res.data
});
},
confirmSubmit: function() {
let that = this;
if (!that.password) return that.$util.Tips({
@ -107,6 +128,22 @@
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
if (this.type == 'payPwd') { //
setPayPwd({
password: that.password,
repassword: that.repassword,
sms_code: that.captcha
}).then(res => {
return that.$util.Tips({
title: '设置成功!',
icon: 'success'
}, {
tab: 5,
url: '/pages/users/user_info/index'
});
})
} else { //
modifyPassword({
password: that.password,
repassword: that.repassword,
@ -124,6 +161,7 @@
title: err
});
})
}
},
/**
* 发送验证码
@ -170,6 +208,7 @@
background: #fff;
padding-top: 53rpx;
}
.ChangePassword .phone {
font-size: 32rpx;
}
@ -188,6 +227,7 @@
font-size: 32rpx;
}
/deep/.uni-input-input {
// box-shadow: inset 0 0 0 0 #fff;
}
@ -205,6 +245,7 @@
position: relative;
padding-left: 26rpx;
color: var(--view-theme);
&::before {
content: "";
width: 1rpx;
@ -216,14 +257,17 @@
display: inline-block;
}
}
.ChangePassword .list .item .code.on {
color: #b9b9bc !important;
}
.ChangePassword .list .border {
width: 100%;
height: 21rpx;
background: #F5F5F5;
}
.confirmBnt {
font-size: 32rpx;
width: 580rpx;
@ -235,6 +279,7 @@
line-height: 90rpx;
background-color: var(--view-theme);
}
.getPhoneBtn {
font-size: 32rpx;
width: 580rpx;
@ -245,6 +290,7 @@
margin: 40rpx auto 0 auto;
text-align: center;
line-height: 90rpx;
.iconfont {
font-size: 32rpx;
margin-right: 12rpx;