Compare commits

..

1 Commits

Author SHA1 Message Date
BAKEYi c8c82fb93a 1 2026-06-17 16:30:51 +08:00
26 changed files with 14929 additions and 14338 deletions

32
App.vue
View File

@ -16,9 +16,6 @@ import request from './utils/request'
import {
setVersion
} from './utils/version.js'
import {
APP_BACK_BASE_URL
} from './utils/appBackBase.js'
//
const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns');
export default {
@ -69,13 +66,38 @@ export default {
// await setVersion()
//访
// GET
let version = uni.getStorageSync('setVersion')
let baseUrl
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) {
// #ifndef MP-WEIXIN
uni.setStorageSync('baseUrl', APP_BACK_BASE_URL)
uni.setStorageSync('baseUrl', res.data.data.url)
// #endif
// #ifdef MP-WEIXIN
wx.setStorageSync('baseUrl', APP_BACK_BASE_URL)
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
//

View File

@ -2,8 +2,8 @@
"name" : "美融融商家",
"appid" : "__UNI__BBE6285",
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
"versionName" : "1.0.22",
"versionCode" : 1022,
"versionName" : "1.0.21",
"versionCode" : 1021,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -31,20 +31,6 @@
"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",
"style": {

View File

@ -26,31 +26,17 @@
<script>
import permissionUtils from "@/utils/per";
import locationService from "@/utils/locationService";
import request from "@/utils/request";
export default {
data() {
return {
isShowPer: false, //
phone: '19950079687' // 使
phone: '19950079687'
}
},
onLoad(options) {
//
this.getCustomerService();
this.phone = options.phone || '19950079687'
},
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);
}
},
//
async callPhone() {
const systemInfo = uni.getSystemInfoSync();

View File

@ -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>

View File

@ -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>

View File

@ -20,10 +20,6 @@
</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-content">
<image class="modal-bg"
@ -185,7 +181,7 @@
</view>
</view>
<view class="notice-bar card-box" v-if="noticeList.length > 0">
<view class="notice-bar card-box">
<image class="notice-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/75f624b8-a6ed-4787-9380-1a087062805b.png">
</image>
@ -210,9 +206,6 @@
<brand-card class="brand-card-wrap" v-for="(item, index) in brands" :key="index" :item="item"
:tagKeys="item.tagKeys"></brand-card>
</view>
<view class="home-empty" v-if="brands.length === 0">
<noData top="20rpx"></noData>
</view>
</view>
<view class="skills-section card-box">
@ -226,9 +219,6 @@
<view class="skill-list">
<skill-card v-for="(item, index) in skills" :key="index" :item="item"></skill-card>
</view>
<view class="home-empty" v-if="skills.length === 0">
<noData top="20rpx"></noData>
</view>
</view>
<view style="height: 120rpx;"></view>
@ -270,7 +260,11 @@ export default {
displayScore: 0,
animationTimer: null,
noticeList: [],
noticeList: [{
id: 0,
title: '',
url: ''
}],
quickActions: [{
name: '扫码验券',
@ -478,11 +472,6 @@ export default {
});
}
},
goToGrowthPackage() {
uni.navigateTo({
url: '/pages/home/growth-package'
});
},
//
closeSetupModal() {
this.showSetupModal = false;
@ -555,14 +544,7 @@ export default {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return;
}
if (this.brands.length === 0) {
uni.showToast({
title: '暂无数据',
icon: 'none'
});
return;
return
}
uni.navigateTo({
url: '/pages/jingxuan/selected-brands'
@ -573,14 +555,7 @@ export default {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return;
}
if (this.skills.length === 0) {
uni.showToast({
title: '暂无数据',
icon: 'none'
});
return;
return
}
uni.navigateTo({
url: '/pages/jingxuan/selected-skills'
@ -742,11 +717,7 @@ export default {
tagKeys: tags
};
});
} else {
this.brands = [];
}
}).catch(() => {
this.brands = [];
});
},
@ -771,11 +742,7 @@ export default {
video: item.video || ''
};
});
} else {
this.skills = [];
}
}).catch(() => {
this.skills = [];
});
},
@ -1133,7 +1100,7 @@ page {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
margin-bottom: 40rpx;
.user-info {
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 {
padding: 0;
overflow: hidden;
@ -1538,12 +1488,6 @@ page {
}
}
.home-empty {
height: 360rpx;
display: flex;
justify-content: center;
}
.skills-section {
.skill-list {
display: flex;

View File

@ -181,7 +181,7 @@
</view>
<view class="form-item-one box-cont">
<text class="label">行业资质</text>
<text class="label required">行业资质</text>
<view class="image-list">
<view class="image-item" v-for="(img, index) in formData.qualifications_sector" :key="'industry-' + index">
<image :src="img" mode="aspectFill" class="qualification-image"></image>
@ -1080,6 +1080,13 @@ export default {
});
return false;
}
if (!this.formData.qualifications_sector || this.formData.qualifications_sector.length === 0) {
uni.showToast({
title: '请上传行业资质',
icon: 'none'
});
return false;
}
return true;
}
}

View File

@ -372,7 +372,7 @@ export default {
this.formData.id = options.id;
this.getInit();
} else {
request.post("/sj/firstclass", { id: uni.getStorageSync("sjId") }).then((res) => {
request.post("/sj/firstclass", {}).then((res) => {
this.serviceTypes = this.serviceTypes.concat(res.data);
});
}
@ -539,7 +539,7 @@ export default {
this.formData.video = null;
},
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);
await request

View File

@ -225,7 +225,7 @@
</view>
<view class="form-item-image-box box-cont">
<text class="label">行业资质</text>
<text class="label required">行业资质</text>
<view class="image-list">
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector"
:key="'industry-' + index">

View File

@ -331,47 +331,7 @@
} 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() {
console.log('开始获取用户信息...');
const type = 3;
@ -387,13 +347,23 @@
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_province = this.originalData.dependency_province || '';
this.dependency_city = this.originalData.dependency_city || '';
this.longitude = this.originalData.longitude || '';
this.latitude = this.originalData.latitude || '';
this.dependency_code = userData.dependency_code || '';
this.dependency_province = userData.dependency_province || '';
this.dependency_city = userData.dependency_city || '';
this.longitude = userData.longitude || '';
this.latitude = userData.latitude || '';
this.pendingData = {
...this.originalData
@ -474,7 +444,18 @@
}
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) {

View File

@ -7,7 +7,7 @@
</serviecFirstTab>
<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">
<image class="item-left-photo" :src="item.photo[0]" mode="aspectFill"></image>
<view class="item-left-texts">

View File

@ -233,13 +233,6 @@
},
//
startOrder(e, order) {
if (order.team_buy_order_state == 1) {
uni.showToast({
title: "订单当前处于拼团中,服务将在拼团完成后才开启~",
icon: "none",
});
return
}
this.showInput = true;
this.handelOrder = order;
},

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 MiB

View File

@ -1 +0,0 @@
export const APP_BACK_BASE_URL = "http://test.mrrwlkj.top";

View File

@ -120,14 +120,14 @@ const request = async (options, isUpdate) => {
if (process.env.NODE_ENV === "development") {
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
// baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
//baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
baseURL = "https://app.mrrweb.com.cn";
// baseURL = "https://app.mrrweb.com.cn";
} else {
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
// baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
baseURL = "http://test.mrrwlkj.top"; // 发布到生产环境时,此处代码会被摇树移除掉。
//baseURL = 'http://dev.mrrwlkj.top'; // 发布到生产环境时,此处代码会被摇树移除掉。
baseURL = "https://app.mrrweb.com.cn";
// baseURL = "https://app.mrrweb.com.cn";
console.log("生产环境");
}

View File

@ -1,6 +1,4 @@
import { APP_BACK_BASE_URL } from './appBackBase.js'
let VersionCode = '';
let DeviceType = '';
let platform = '';
@ -62,6 +60,30 @@ export function setVersion() {
}
export async function getBaseUrl() {
uni.setStorageSync('baseUrl', APP_BACK_BASE_URL)
return APP_BACK_BASE_URL
let version = uni.getStorageSync('setVersion')
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('请求完成(无论成功失败都会执行)');
}
});
}