Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
c8c82fb93a |
42
App.vue
|
|
@ -16,9 +16,6 @@ import request from './utils/request'
|
||||||
import {
|
import {
|
||||||
setVersion
|
setVersion
|
||||||
} from './utils/version.js'
|
} from './utils/version.js'
|
||||||
import {
|
|
||||||
APP_BACK_BASE_URL
|
|
||||||
} from './utils/appBackBase.js'
|
|
||||||
//初始化一键登录插件
|
//初始化一键登录插件
|
||||||
const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns');
|
const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns');
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -69,13 +66,38 @@ export default {
|
||||||
// await setVersion()
|
// await setVersion()
|
||||||
|
|
||||||
//获取访问路由
|
//获取访问路由
|
||||||
// #ifndef MP-WEIXIN
|
// 发起 GET 请求
|
||||||
uni.setStorageSync('baseUrl', APP_BACK_BASE_URL)
|
let version = uni.getStorageSync('setVersion')
|
||||||
// #endif
|
let baseUrl
|
||||||
// #ifdef MP-WEIXIN
|
await uni.request({
|
||||||
wx.setStorageSync('baseUrl', APP_BACK_BASE_URL)
|
url: 'https://api.mrrwlkj.top/api/openPuc/getSjApiUrl', // 接口地址
|
||||||
// #endif
|
method: 'GET', // 请求方法(默认 GET)
|
||||||
this.$store.commit("setLocation", true)
|
header: {
|
||||||
|
'Content-Type': 'application/json', // 请求头
|
||||||
|
'VersionCode': version.VersionCode,
|
||||||
|
'DeviceBrand': version.DeviceBrand,
|
||||||
|
'DeviceType': version.DeviceType
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
uni.setStorageSync('baseUrl', res.data.data.url)
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
wx.setStorageSync('baseUrl', res.data.data.url)
|
||||||
|
// #endif
|
||||||
|
this.$store.commit("setLocation", true)
|
||||||
|
}
|
||||||
|
console.log('请求成功', res.data);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('请求失败', err);
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
console.log('请求完成(无论成功失败都会执行)');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
//禁止手机横屏
|
//禁止手机横屏
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "美融融商家",
|
"name" : "美融融商家",
|
||||||
"appid" : "__UNI__BBE6285",
|
"appid" : "__UNI__BBE6285",
|
||||||
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
|
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
|
||||||
"versionName" : "1.0.22",
|
"versionName" : "1.0.21",
|
||||||
"versionCode" : 1022,
|
"versionCode" : 1021,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
||||||
14
pages.json
|
|
@ -31,20 +31,6 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/home/growth-package",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/home/growth-package-result",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "支付结果",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/message/message",
|
"path": "pages/message/message",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -26,85 +26,71 @@
|
||||||
<script>
|
<script>
|
||||||
import permissionUtils from "@/utils/per";
|
import permissionUtils from "@/utils/per";
|
||||||
import locationService from "@/utils/locationService";
|
import locationService from "@/utils/locationService";
|
||||||
import request from "@/utils/request";
|
export default {
|
||||||
|
data() {
|
||||||
export default {
|
return {
|
||||||
data() {
|
isShowPer: false, // 控制电话权限说明视图显示
|
||||||
return {
|
phone: '19950079687'
|
||||||
isShowPer: false, // 控制电话权限说明视图显示
|
|
||||||
phone: '19950079687' // 默认号码,接口失败时使用
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
// 调用接口获取客服电话
|
|
||||||
this.getCustomerService();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 获取客服电话
|
|
||||||
async getCustomerService() {
|
|
||||||
try {
|
|
||||||
const res = await request.post('/sj/poster/getCustomerService');
|
|
||||||
if (res.code === 200 && res.data && res.data.phone) {
|
|
||||||
this.phone = res.data.phone;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取客服电话失败', error);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 拨打电话
|
onLoad(options) {
|
||||||
async callPhone() {
|
this.phone = options.phone || '19950079687'
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
},
|
||||||
if (systemInfo.platform === "ios") {
|
methods: {
|
||||||
uni.makePhoneCall({ phoneNumber: this.phone });
|
// 拨打电话
|
||||||
} else {
|
async callPhone() {
|
||||||
let permission = "android.permission.CALL_PHONE";
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
this.isShowPer = true;
|
if (systemInfo.platform === "ios") {
|
||||||
|
uni.makePhoneCall({ phoneNumber: this.phone });
|
||||||
|
} else {
|
||||||
|
let permission = "android.permission.CALL_PHONE";
|
||||||
|
this.isShowPer = true;
|
||||||
|
|
||||||
// 1. 检查权限
|
// 1. 检查权限
|
||||||
const { granted } = await permissionUtils.checkPermission(
|
const { granted } = await permissionUtils.checkPermission(
|
||||||
"phone",
|
"phone",
|
||||||
"需要拨打电话权限,方便您联系客服"
|
"需要拨打电话权限,方便您联系客服"
|
||||||
);
|
);
|
||||||
if (granted) {
|
if (granted) {
|
||||||
this.isShowPer = false;
|
this.isShowPer = false;
|
||||||
uni.makePhoneCall({ phoneNumber: this.phone });
|
uni.makePhoneCall({ phoneNumber: this.phone });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isShowPer = false;
|
this.isShowPer = false;
|
||||||
// 2. 显示权限说明弹窗
|
// 2. 显示权限说明弹窗
|
||||||
const confirm = await this.showPermissionDialog(
|
const confirm = await this.showPermissionDialog(
|
||||||
"拨打电话权限申请",
|
"拨打电话权限申请",
|
||||||
"我们需要拨打电话权限,方便您联系客服"
|
"我们需要拨打电话权限,方便您联系客服"
|
||||||
);
|
);
|
||||||
if (!confirm) return;
|
if (!confirm) return;
|
||||||
|
|
||||||
// 3. 请求权限
|
// 3. 请求权限
|
||||||
const result = await permissionUtils.requestPermission(
|
const result = await permissionUtils.requestPermission(
|
||||||
"phone",
|
"phone",
|
||||||
"需要拨打电话权限,方便您联系客服"
|
"需要拨打电话权限,方便您联系客服"
|
||||||
);
|
);
|
||||||
if (result) {
|
if (result) {
|
||||||
uni.makePhoneCall({ phoneNumber: this.phone });
|
uni.makePhoneCall({ phoneNumber: this.phone });
|
||||||
} else {
|
} else {
|
||||||
locationService.openAppSettings();
|
locationService.openAppSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
showPermissionDialog(title, content) {
|
||||||
showPermissionDialog(title, content) {
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
confirmText: "去开启",
|
confirmText: "去开启",
|
||||||
success(res) {
|
success(res) {
|
||||||
resolve(res.confirm);
|
resolve(res.confirm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -1,167 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="growth-package-result-page">
|
|
||||||
<custom-navbar
|
|
||||||
title="支付结果"
|
|
||||||
:showBack="true"
|
|
||||||
backgroundColor="#F7F7F7"
|
|
||||||
borderBottom="none"
|
|
||||||
></custom-navbar>
|
|
||||||
|
|
||||||
<view class="result-main">
|
|
||||||
<view class="result-icon" :class="isFail ? 'is-fail' : 'is-success'">
|
|
||||||
<block v-if="isFail">
|
|
||||||
<view class="fail-line"></view>
|
|
||||||
<view class="fail-dot"></view>
|
|
||||||
</block>
|
|
||||||
<view v-else class="success-check"></view>
|
|
||||||
</view>
|
|
||||||
<view class="result-title">{{ resultInfo.title }}</view>
|
|
||||||
<view class="result-desc">{{ resultInfo.desc }}</view>
|
|
||||||
<view class="primary-btn" @tap="handlePrimaryTap">{{ isFail ? "重新支付" : "返回首页" }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import CustomNavbar from "@/components/custom-navbar/custom-navbar.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
CustomNavbar,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
status: "success",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
isFail() {
|
|
||||||
return this.status === "fail";
|
|
||||||
},
|
|
||||||
resultInfo() {
|
|
||||||
if (this.isFail) {
|
|
||||||
return {
|
|
||||||
title: "报名失败",
|
|
||||||
desc: "最后一步出了点问题 请重新支付",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
title: "报名成功",
|
|
||||||
desc: "您已完成支付 感谢你对美融融的支持",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
this.status = options.status === "fail" ? "fail" : "success";
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handlePrimaryTap() {
|
|
||||||
if (this.isFail) {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pages/home/growth-package",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.switchTab({
|
|
||||||
url: "/pages/home/home",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
page {
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.growth-package-result-page {
|
|
||||||
min-height: 100vh;
|
|
||||||
background: #ffffff;
|
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-main {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
padding: 246rpx 40rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-icon {
|
|
||||||
width: 104rpx;
|
|
||||||
height: 104rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-icon.is-success {
|
|
||||||
background: #12c76b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-icon.is-fail {
|
|
||||||
background: #ff4652;
|
|
||||||
}
|
|
||||||
|
|
||||||
.success-check {
|
|
||||||
width: 44rpx;
|
|
||||||
height: 24rpx;
|
|
||||||
border-left: 8rpx solid #ffffff;
|
|
||||||
border-bottom: 8rpx solid #ffffff;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
margin-top: -8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fail-line {
|
|
||||||
width: 8rpx;
|
|
||||||
height: 46rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fail-dot {
|
|
||||||
width: 8rpx;
|
|
||||||
height: 8rpx;
|
|
||||||
margin-left: -8rpx;
|
|
||||||
margin-top: 58rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-title {
|
|
||||||
margin-top: 34rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 40rpx;
|
|
||||||
color: #333333;
|
|
||||||
line-height: 56rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-desc {
|
|
||||||
margin-top: 8rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #b9b9b9;
|
|
||||||
line-height: 38rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.primary-btn {
|
|
||||||
width: 350rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
margin-top: 144rpx;
|
|
||||||
border: 1rpx solid #ff4b67;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #ff4767;
|
|
||||||
line-height: 42rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,348 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="growth-package-page">
|
|
||||||
<image class="content-image" src="@/static/images/home/growth-package/intro.png" mode="widthFix"></image>
|
|
||||||
<view class="deal-carousel">
|
|
||||||
<swiper class="deal-swiper" autoplay circular :interval="3000" previous-margin="40rpx"
|
|
||||||
next-margin="40rpx" :current="dealCurrentIndex" @change="handleDealChange">
|
|
||||||
<swiper-item v-for="(item, index) in dealSlides" :key="item">
|
|
||||||
<view class="deal-slide" :class="getDealSlideClass(index)">
|
|
||||||
<image class="deal-slide-image" :src="item" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
<view class="deal-indicator">
|
|
||||||
<view class="indicator-track" v-for="(item, index) in dealSlides" :key="item"
|
|
||||||
:class="{ active: index === dealCurrentIndex }"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image class="content-image" src="@/static/images/home/growth-package/plan.png" mode="widthFix"></image>
|
|
||||||
|
|
||||||
<view class="fixed-action" @tap="handlePayTap">
|
|
||||||
<image class="action-image" :src="actionImage" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import request from "@/utils/request";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GrowthPackage",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dealCurrentIndex: 0,
|
|
||||||
isPaying: false,
|
|
||||||
isJoined: false,
|
|
||||||
dealSlides: [
|
|
||||||
"/static/images/home/growth-package/deal-1.png",
|
|
||||||
"/static/images/home/growth-package/deal-2.png",
|
|
||||||
"/static/images/home/growth-package/deal-3.png",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
actionImage() {
|
|
||||||
return this.isJoined
|
|
||||||
? "/static/images/home/growth-package/action-success.png"
|
|
||||||
: "/static/images/home/growth-package/action.png";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.getGrowthPackageStatus();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getGrowthPackageStatus() {
|
|
||||||
if (!uni.getStorageSync("accessToken")) {
|
|
||||||
this.isJoined = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.isPaying) return;
|
|
||||||
uni.showLoading({
|
|
||||||
title: "查询报名状态...",
|
|
||||||
mask: true,
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
const res = await request.post(
|
|
||||||
"/sj/growthPackage/status",
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
hideLoading: true,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.isJoined = !!(res && res.code === 200 && res.data && Number(res.data.is_joined) === 1);
|
|
||||||
} catch (error) {
|
|
||||||
console.log("growthPackageStatus error", error);
|
|
||||||
} finally {
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleDealChange(event) {
|
|
||||||
this.dealCurrentIndex = event.detail.current;
|
|
||||||
},
|
|
||||||
getDealSlideClass(index) {
|
|
||||||
const length = this.dealSlides.length;
|
|
||||||
const prevIndex = (this.dealCurrentIndex + length - 1) % length;
|
|
||||||
const nextIndex = (this.dealCurrentIndex + 1) % length;
|
|
||||||
if (index === this.dealCurrentIndex) {
|
|
||||||
return "is-active";
|
|
||||||
}
|
|
||||||
if (index === prevIndex) {
|
|
||||||
return "is-prev";
|
|
||||||
}
|
|
||||||
if (index === nextIndex) {
|
|
||||||
return "is-next";
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
handlePayTap() {
|
|
||||||
if (this.isPaying) return;
|
|
||||||
if (this.isJoined) return;
|
|
||||||
if (!uni.getStorageSync("accessToken")) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/blogPopup/blogPopup",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.showActionSheet({
|
|
||||||
itemList: ["微信支付", "支付宝支付"],
|
|
||||||
success: (res) => {
|
|
||||||
const payKind = res.tapIndex === 0 ? 2 : 3;
|
|
||||||
this.createGrowthPackagePay(payKind);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async createGrowthPackagePay(payKind) {
|
|
||||||
this.isPaying = true;
|
|
||||||
uni.showLoading({
|
|
||||||
title: "支付中...",
|
|
||||||
mask: true,
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
const payRes = await request.post(
|
|
||||||
"/sj/growthPackage/pay",
|
|
||||||
{
|
|
||||||
pay_kind: payKind,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
hideLoading: true,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (!payRes || payRes.code !== 200) {
|
|
||||||
uni.hideLoading();
|
|
||||||
this.isPaying = false;
|
|
||||||
if (payRes && payRes.data && (payRes.data.id || payRes.data.number)) {
|
|
||||||
this.goToPayResult("fail", payRes.data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.showToast({
|
|
||||||
title: (payRes && payRes.msg) || "支付请求失败",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const orderInfo = payRes.data || {};
|
|
||||||
if (Number(orderInfo.is_joined) === 1) {
|
|
||||||
uni.hideLoading();
|
|
||||||
this.isPaying = false;
|
|
||||||
this.isJoined = true;
|
|
||||||
this.goToPayResult("success", orderInfo.order || {});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const paymentParams = orderInfo.pay_params || orderInfo.orderInfo;
|
|
||||||
if (!paymentParams) {
|
|
||||||
uni.hideLoading();
|
|
||||||
this.isPaying = false;
|
|
||||||
if (orderInfo.id || orderInfo.number) {
|
|
||||||
this.goToPayResult("fail", orderInfo);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.showToast({
|
|
||||||
title: "支付参数缺失",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.hideLoading();
|
|
||||||
this.requestGrowthPackagePayment(payKind, paymentParams, orderInfo);
|
|
||||||
} catch (error) {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.showToast({
|
|
||||||
title: "支付请求失败",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
this.isPaying = false;
|
|
||||||
console.log("growthPackagePay error", error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
requestGrowthPackagePayment(payKind, paymentParams, orderInfo) {
|
|
||||||
const provider = payKind === 2 ? "wxpay" : "alipay";
|
|
||||||
let payOrderInfo = paymentParams;
|
|
||||||
if (payKind === 2 && paymentParams && typeof paymentParams === "object") {
|
|
||||||
payOrderInfo = {
|
|
||||||
...paymentParams,
|
|
||||||
};
|
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
|
||||||
if (systemInfo.platform === "ios" && payOrderInfo.appid) {
|
|
||||||
payOrderInfo.appId = payOrderInfo.appid;
|
|
||||||
delete payOrderInfo.appid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
uni.requestPayment({
|
|
||||||
provider,
|
|
||||||
orderInfo: payOrderInfo,
|
|
||||||
success: () => {
|
|
||||||
this.queryGrowthPackagePay(orderInfo);
|
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
this.isPaying = false;
|
|
||||||
console.log("growthPackage requestPayment fail", err);
|
|
||||||
this.goToPayResult("fail", orderInfo);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async queryGrowthPackagePay(orderInfo) {
|
|
||||||
try {
|
|
||||||
const queryRes = await request.post(
|
|
||||||
"/sj/growthPackage/queryPay",
|
|
||||||
{
|
|
||||||
id: orderInfo.id,
|
|
||||||
number: orderInfo.number,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
hideLoading: true,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
const order = queryRes && queryRes.data && queryRes.data.order;
|
|
||||||
if (queryRes && queryRes.code === 200 && order && Number(order.state) === 2) {
|
|
||||||
this.isJoined = true;
|
|
||||||
this.goToPayResult("success", order);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.goToPayResult("fail", orderInfo);
|
|
||||||
} catch (error) {
|
|
||||||
console.log("growthPackageQueryPay error", error);
|
|
||||||
this.goToPayResult("fail", orderInfo);
|
|
||||||
} finally {
|
|
||||||
this.isPaying = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
goToPayResult(status, orderInfo = {}) {
|
|
||||||
const params = [`status=${status}`];
|
|
||||||
if (orderInfo.number) {
|
|
||||||
params.push(`number=${encodeURIComponent(orderInfo.number)}`);
|
|
||||||
}
|
|
||||||
if (orderInfo.pay_money || orderInfo.order_money) {
|
|
||||||
params.push(`money=${encodeURIComponent(orderInfo.pay_money || orderInfo.order_money)}`);
|
|
||||||
}
|
|
||||||
uni.redirectTo({
|
|
||||||
url: `/pages/home/growth-package-result?${params.join("&")}`,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background: #150903;
|
|
||||||
}
|
|
||||||
|
|
||||||
.growth-package-page {
|
|
||||||
min-height: 100vh;
|
|
||||||
padding-bottom: 259rpx;
|
|
||||||
background: #150903;
|
|
||||||
|
|
||||||
.content-image {
|
|
||||||
display: block;
|
|
||||||
width: 750rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-carousel {
|
|
||||||
position: relative;
|
|
||||||
width: 750rpx;
|
|
||||||
height: 1342rpx;
|
|
||||||
background: #000000;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-swiper {
|
|
||||||
width: 750rpx;
|
|
||||||
height: 1280rpx;
|
|
||||||
background: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide {
|
|
||||||
position: relative;
|
|
||||||
width: 670rpx;
|
|
||||||
height: 1280rpx;
|
|
||||||
background: #000000;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide-image {
|
|
||||||
display: block;
|
|
||||||
width: 670rpx;
|
|
||||||
height: 1280rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide.is-prev,
|
|
||||||
.deal-slide.is-next {
|
|
||||||
height: 1169rpx;
|
|
||||||
margin-top: 56rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide.is-prev .deal-slide-image,
|
|
||||||
.deal-slide.is-next .deal-slide-image {
|
|
||||||
position: absolute;
|
|
||||||
top: -56rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide.is-prev .deal-slide-image {
|
|
||||||
right: 10rpx;
|
|
||||||
border-top-right-radius: 20rpx;
|
|
||||||
border-bottom-right-radius: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-slide.is-next .deal-slide-image {
|
|
||||||
left: 10rpx;
|
|
||||||
border-top-left-radius: 20rpx;
|
|
||||||
border-bottom-left-radius: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-indicator {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 62rpx;
|
|
||||||
column-gap: 8rpx;
|
|
||||||
background: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.indicator-track {
|
|
||||||
width: 146rpx;
|
|
||||||
height: 8rpx;
|
|
||||||
border-radius: 999rpx;
|
|
||||||
background: rgba(255, 255, 255, 0.42);
|
|
||||||
}
|
|
||||||
|
|
||||||
.indicator-track.active {
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-action {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 20;
|
|
||||||
width: 750rpx;
|
|
||||||
height: 259rpx;
|
|
||||||
background: #150903;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-image {
|
|
||||||
display: block;
|
|
||||||
width: 750rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -20,10 +20,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="home-banner" @tap="goToGrowthPackage">
|
|
||||||
<image class="home-banner-img" src="@/static/images/home/banner.png" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="setup-modal-mask" v-if="showSetupModal" catchtouchmove="true">
|
<view class="setup-modal-mask" v-if="showSetupModal" catchtouchmove="true">
|
||||||
<view class="setup-modal-content">
|
<view class="setup-modal-content">
|
||||||
<image class="modal-bg"
|
<image class="modal-bg"
|
||||||
|
|
@ -185,7 +181,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="notice-bar card-box" v-if="noticeList.length > 0">
|
<view class="notice-bar card-box">
|
||||||
<image class="notice-icon"
|
<image class="notice-icon"
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/75f624b8-a6ed-4787-9380-1a087062805b.png">
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/75f624b8-a6ed-4787-9380-1a087062805b.png">
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -210,9 +206,6 @@
|
||||||
<brand-card class="brand-card-wrap" v-for="(item, index) in brands" :key="index" :item="item"
|
<brand-card class="brand-card-wrap" v-for="(item, index) in brands" :key="index" :item="item"
|
||||||
:tagKeys="item.tagKeys"></brand-card>
|
:tagKeys="item.tagKeys"></brand-card>
|
||||||
</view>
|
</view>
|
||||||
<view class="home-empty" v-if="brands.length === 0">
|
|
||||||
<noData top="20rpx"></noData>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="skills-section card-box">
|
<view class="skills-section card-box">
|
||||||
|
|
@ -226,9 +219,6 @@
|
||||||
<view class="skill-list">
|
<view class="skill-list">
|
||||||
<skill-card v-for="(item, index) in skills" :key="index" :item="item"></skill-card>
|
<skill-card v-for="(item, index) in skills" :key="index" :item="item"></skill-card>
|
||||||
</view>
|
</view>
|
||||||
<view class="home-empty" v-if="skills.length === 0">
|
|
||||||
<noData top="20rpx"></noData>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="height: 120rpx;"></view>
|
<view style="height: 120rpx;"></view>
|
||||||
|
|
@ -270,7 +260,11 @@ export default {
|
||||||
displayScore: 0,
|
displayScore: 0,
|
||||||
animationTimer: null,
|
animationTimer: null,
|
||||||
|
|
||||||
noticeList: [],
|
noticeList: [{
|
||||||
|
id: 0,
|
||||||
|
title: '',
|
||||||
|
url: ''
|
||||||
|
}],
|
||||||
|
|
||||||
quickActions: [{
|
quickActions: [{
|
||||||
name: '扫码验券',
|
name: '扫码验券',
|
||||||
|
|
@ -478,11 +472,6 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goToGrowthPackage() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/home/growth-package'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 弹窗中的快捷跳转功能
|
// 弹窗中的快捷跳转功能
|
||||||
closeSetupModal() {
|
closeSetupModal() {
|
||||||
this.showSetupModal = false;
|
this.showSetupModal = false;
|
||||||
|
|
@ -555,14 +544,7 @@ export default {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/blogPopup/blogPopup'
|
url: '/pages/blogPopup/blogPopup'
|
||||||
});
|
});
|
||||||
return;
|
return
|
||||||
}
|
|
||||||
if (this.brands.length === 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '暂无数据',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/jingxuan/selected-brands'
|
url: '/pages/jingxuan/selected-brands'
|
||||||
|
|
@ -573,14 +555,7 @@ export default {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/blogPopup/blogPopup'
|
url: '/pages/blogPopup/blogPopup'
|
||||||
});
|
});
|
||||||
return;
|
return
|
||||||
}
|
|
||||||
if (this.skills.length === 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '暂无数据',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/jingxuan/selected-skills'
|
url: '/pages/jingxuan/selected-skills'
|
||||||
|
|
@ -742,11 +717,7 @@ export default {
|
||||||
tagKeys: tags
|
tagKeys: tags
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.brands = [];
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.brands = [];
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -771,11 +742,7 @@ export default {
|
||||||
video: item.video || ''
|
video: item.video || ''
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.skills = [];
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.skills = [];
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -1133,7 +1100,7 @@ page {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
.user-info {
|
.user-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -1236,23 +1203,6 @@ page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-banner {
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
width: 710rpx;
|
|
||||||
height: 266rpx;
|
|
||||||
margin-left: -4rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
border-radius: 24rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.home-banner-img {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.settlement-guide {
|
.settlement-guide {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -1538,12 +1488,6 @@ page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-empty {
|
|
||||||
height: 360rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skills-section {
|
.skills-section {
|
||||||
.skill-list {
|
.skill-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label">行业资质</text>
|
<text class="label required">行业资质</text>
|
||||||
<view class="image-list">
|
<view class="image-list">
|
||||||
<view class="image-item" v-for="(img, index) in formData.qualifications_sector" :key="'industry-' + index">
|
<view class="image-item" v-for="(img, index) in formData.qualifications_sector" :key="'industry-' + index">
|
||||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||||
|
|
@ -1080,6 +1080,13 @@ export default {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!this.formData.qualifications_sector || this.formData.qualifications_sector.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请上传行业资质',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ export default {
|
||||||
this.formData.id = options.id;
|
this.formData.id = options.id;
|
||||||
this.getInit();
|
this.getInit();
|
||||||
} else {
|
} else {
|
||||||
request.post("/sj/firstclass", { id: uni.getStorageSync("sjId") }).then((res) => {
|
request.post("/sj/firstclass", {}).then((res) => {
|
||||||
this.serviceTypes = this.serviceTypes.concat(res.data);
|
this.serviceTypes = this.serviceTypes.concat(res.data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -539,7 +539,7 @@ export default {
|
||||||
this.formData.video = null;
|
this.formData.video = null;
|
||||||
},
|
},
|
||||||
async getInit() {
|
async getInit() {
|
||||||
const firstclass = await request.post("/sj/firstclass", { id: uni.getStorageSync("sjId") });
|
const firstclass = await request.post("/sj/firstclass");
|
||||||
this.serviceTypes = this.serviceTypes.concat(firstclass.data);
|
this.serviceTypes = this.serviceTypes.concat(firstclass.data);
|
||||||
|
|
||||||
await request
|
await request
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-image-box box-cont">
|
<view class="form-item-image-box box-cont">
|
||||||
<text class="label">行业资质</text>
|
<text class="label required">行业资质</text>
|
||||||
<view class="image-list">
|
<view class="image-list">
|
||||||
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector"
|
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector"
|
||||||
:key="'industry-' + index">
|
:key="'industry-' + index">
|
||||||
|
|
|
||||||
|
|
@ -331,47 +331,7 @@
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 兼容接口里门店地址字段的不同命名
|
// 获取用户信息(原有,未变)
|
||||||
pickFirst(data, fields) {
|
|
||||||
for (const field of fields) {
|
|
||||||
const value = data && data[field];
|
|
||||||
if (value !== undefined && value !== null && String(value).trim() !== '') {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
|
|
||||||
normalizeStoreInfo(data = {}) {
|
|
||||||
return {
|
|
||||||
head_photo: this.pickFirst(data, ['head_photo', 'shop_head_photo']),
|
|
||||||
name: this.pickFirst(data, ['name', 'shop_name']),
|
|
||||||
dependency: this.pickFirst(data, ['dependency', 'shop_dependency', 'uscc_dependency']),
|
|
||||||
address: this.pickFirst(data, ['address', 'shop_address', 'uscc_address']),
|
|
||||||
dependency_code: this.pickFirst(data, ['dependency_code', 'shop_dependency_code', 'uscc_area']),
|
|
||||||
dependency_province: this.pickFirst(data, ['dependency_province', 'shop_dependency_province', 'uscc_province']),
|
|
||||||
dependency_city: this.pickFirst(data, ['dependency_city', 'shop_dependency_city', 'uscc_city']),
|
|
||||||
longitude: this.pickFirst(data, ['longitude', 'shop_longitude']),
|
|
||||||
latitude: this.pickFirst(data, ['latitude', 'shop_latitude'])
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
mergeStoreInfoWithOriginal(data = {}) {
|
|
||||||
const storeInfo = this.normalizeStoreInfo(data);
|
|
||||||
return {
|
|
||||||
head_photo: storeInfo.head_photo || this.originalData.head_photo,
|
|
||||||
name: storeInfo.name || this.originalData.name,
|
|
||||||
dependency: storeInfo.dependency || this.originalData.dependency,
|
|
||||||
address: storeInfo.address || this.originalData.address,
|
|
||||||
dependency_code: storeInfo.dependency_code || this.originalData.dependency_code,
|
|
||||||
dependency_province: storeInfo.dependency_province || this.originalData.dependency_province,
|
|
||||||
dependency_city: storeInfo.dependency_city || this.originalData.dependency_city,
|
|
||||||
longitude: storeInfo.longitude || this.originalData.longitude,
|
|
||||||
latitude: storeInfo.latitude || this.originalData.latitude
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取用户信息
|
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
console.log('开始获取用户信息...');
|
console.log('开始获取用户信息...');
|
||||||
const type = 3;
|
const type = 3;
|
||||||
|
|
@ -387,13 +347,23 @@
|
||||||
|
|
||||||
this.userId = userData.id;
|
this.userId = userData.id;
|
||||||
|
|
||||||
this.originalData = this.normalizeStoreInfo(userData);
|
this.originalData = {
|
||||||
|
head_photo: userData.head_photo || '',
|
||||||
|
name: userData.name || '',
|
||||||
|
dependency: userData.dependency || '',
|
||||||
|
address: userData.address || '',
|
||||||
|
dependency_code: userData.dependency_code || '',
|
||||||
|
dependency_province: userData.dependency_province || '',
|
||||||
|
dependency_city: userData.dependency_city || '',
|
||||||
|
longitude: userData.longitude || '',
|
||||||
|
latitude: userData.latitude || ''
|
||||||
|
};
|
||||||
|
|
||||||
this.dependency_code = this.originalData.dependency_code || '';
|
this.dependency_code = userData.dependency_code || '';
|
||||||
this.dependency_province = this.originalData.dependency_province || '';
|
this.dependency_province = userData.dependency_province || '';
|
||||||
this.dependency_city = this.originalData.dependency_city || '';
|
this.dependency_city = userData.dependency_city || '';
|
||||||
this.longitude = this.originalData.longitude || '';
|
this.longitude = userData.longitude || '';
|
||||||
this.latitude = this.originalData.latitude || '';
|
this.latitude = userData.latitude || '';
|
||||||
|
|
||||||
this.pendingData = {
|
this.pendingData = {
|
||||||
...this.originalData
|
...this.originalData
|
||||||
|
|
@ -474,7 +444,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.auditStatus === 1 || this.auditStatus === 3) {
|
if (this.auditStatus === 1 || this.auditStatus === 3) {
|
||||||
this.pendingData = this.mergeStoreInfoWithOriginal(detail);
|
this.pendingData = {
|
||||||
|
head_photo: detail.head_photo || this.originalData.head_photo,
|
||||||
|
name: detail.name || this.originalData.name,
|
||||||
|
dependency: detail.dependency || this.originalData.dependency,
|
||||||
|
address: detail.address || this.originalData.address,
|
||||||
|
dependency_code: detail.dependency_code || this.originalData.dependency_code,
|
||||||
|
dependency_province: detail.dependency_province || this.originalData
|
||||||
|
.dependency_province,
|
||||||
|
dependency_city: detail.dependency_city || this.originalData.dependency_city,
|
||||||
|
longitude: detail.longitude || this.originalData.longitude,
|
||||||
|
latitude: detail.latitude || this.originalData.latitude
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.auditStatus === 2) {
|
if (this.auditStatus === 2) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
</serviecFirstTab>
|
</serviecFirstTab>
|
||||||
|
|
||||||
<view class="service-list">
|
<view class="service-list">
|
||||||
<view class="service-item flex-row-center-between" v-for="(item, index) in getList" :key="index" v-if="(item.is_choice && isBack!=0) || isBack==0">
|
<view class="service-item flex-row-center-between" v-for="(item, index) in getList" :key="index">
|
||||||
<view class="item-left flex-row-start">
|
<view class="item-left flex-row-start">
|
||||||
<image class="item-left-photo" :src="item.photo[0]" mode="aspectFill"></image>
|
<image class="item-left-photo" :src="item.photo[0]" mode="aspectFill"></image>
|
||||||
<view class="item-left-texts">
|
<view class="item-left-texts">
|
||||||
|
|
|
||||||
|
|
@ -233,13 +233,6 @@
|
||||||
},
|
},
|
||||||
// 开始服务
|
// 开始服务
|
||||||
startOrder(e, order) {
|
startOrder(e, order) {
|
||||||
if (order.team_buy_order_state == 1) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "订单当前处于拼团中,服务将在拼团完成后才开启~",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.showInput = true;
|
this.showInput = true;
|
||||||
this.handelOrder = order;
|
this.handelOrder = order;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 486 KiB |
|
Before Width: | Height: | Size: 509 KiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 18 MiB |
|
|
@ -1 +0,0 @@
|
||||||
export const APP_BACK_BASE_URL = "http://test.mrrwlkj.top";
|
|
||||||
|
|
@ -120,14 +120,14 @@ const request = async (options, isUpdate) => {
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
|
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
// baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
|
baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
// baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
|
//baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
baseURL = "https://app.mrrweb.com.cn";
|
// baseURL = "https://app.mrrweb.com.cn";
|
||||||
} else {
|
} else {
|
||||||
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
|
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
// baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
|
baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
// baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
|
//baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
|
||||||
baseURL = "https://app.mrrweb.com.cn";
|
// baseURL = "https://app.mrrweb.com.cn";
|
||||||
|
|
||||||
console.log("生产环境");
|
console.log("生产环境");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
import { APP_BACK_BASE_URL } from './appBackBase.js'
|
|
||||||
|
|
||||||
let VersionCode = '';
|
let VersionCode = '';
|
||||||
let DeviceType = '';
|
let DeviceType = '';
|
||||||
let platform = '';
|
let platform = '';
|
||||||
|
|
@ -62,6 +60,30 @@ export function setVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getBaseUrl() {
|
export async function getBaseUrl() {
|
||||||
uni.setStorageSync('baseUrl', APP_BACK_BASE_URL)
|
let version = uni.getStorageSync('setVersion')
|
||||||
return APP_BACK_BASE_URL
|
await uni.request({
|
||||||
|
url: 'https://api.mrrwlkj.top/api/openPuc/getSjApiUrl', // 接口地址
|
||||||
|
method: 'GET', // 请求方法(默认 GET)
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json', // 请求头
|
||||||
|
'VersionCode': version.VersionCode,
|
||||||
|
'DeviceBrand': version.DeviceBrand,
|
||||||
|
'DeviceType': version.DeviceType
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
uni.setStorageSync('baseUrl', res.data.data.url)
|
||||||
|
// store.commit('setBaseUrl', res.data.data.url)
|
||||||
|
}
|
||||||
|
return res.data.data.url;
|
||||||
|
console.log('请求成功', res.data);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('请求失败', err);
|
||||||
|
return 'http://60.247.146.5:93';
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
console.log('请求完成(无论成功失败都会执行)');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||