Browse Source

feat: 更新环境变量并添加历史记录配置功能

- 将默认环境从"develop"改为"trial"
- 在个人中心页面添加测试按钮用于跳转订单支付成功页
- 支付成功页的二维码改为从configMap动态获取
- 首页添加历史记录配置功能,支持动态显示数据
master
前端-胡立永 3 weeks ago
parent
commit
dfd958472d
4 changed files with 58 additions and 8 deletions
  1. +43
    -4
      pages/index.vue
  2. +6
    -0
      pages/personalCenter/index.vue
  3. +8
    -3
      pages_order/order/payOrderSuccessful.vue
  4. +1
    -1
      utils/getUrl.js

+ 43
- 4
pages/index.vue View File

@ -194,7 +194,27 @@
</view> -->
</view>
<view class="split-line"></view>
<view class="history-record-content">
<view class="history-record-content"
v-if="historyRecordConfig &&
historyRecordConfig.length > 0">
<view class="history-record-content-image">
<view class="history-record-content-image-1"
v-for="(item, index) in historyRecordConfig"
:key="index"
:style="'background-image: url(' + item.image + '); background-size: cover;'">
<view class="history-record-content-image-1-text">
<view class="history-record-content-image-1-text-1">{{ item.count }}</view>
<view class="history-record-content-image-1-text-2">{{ item.time }}</view>
</view>
</view>
</view>
<view class="history-record-content-text">
<text>*数据来源于猫妈狗爸平台</text>
</view>
</view>
<view class="history-record-content" v-else>
<view class="history-record-content-image">
<view class="history-record-content-image-1">
<view class="history-record-content-image-1-text">
@ -375,6 +395,7 @@
num: "47131",
numTime: "2024.12.12",
},
historyRecordConfig : [],
currentCoupon: null,
companionList: [],
isMember: false,
@ -387,9 +408,10 @@
CouponItem,
CouponRulePopup
},
mounted() {
this.getCalendarDate();
},
// onLoad() {
// this.getCalendarDate();
// },
methods: {
closeNewUserPopup() {
this.isNewUser = false;
@ -900,6 +922,23 @@
longitude: 121.49857,
latitude: 31.22514
});
uni.$on('initConfig', r => {
let homejson = this.$store.state.configMap.home_config
console.log('homejson', homejson);
if(homejson && homejson.paramValueText){
try{
let home = JSON.parse(homejson.paramValueText)
this.historyRecordConfig = home && home.historyRecords || []
}catch(e){}
}
})
this.getCalendarDate()
}
}
</script>


+ 6
- 0
pages/personalCenter/index.vue View File

@ -250,6 +250,12 @@
}
},
methods: {
testBtn(){
uni.reLaunch({
// url: '/pages_order/order/orderList'
url: '/pages_order/order/payOrderSuccessful'
});
},
onGetPhoneNumber(e){
if(e.detail.errMsg=="getPhoneNumber:fail user deny"){ //


+ 8
- 3
pages_order/order/payOrderSuccessful.vue View File

@ -13,7 +13,8 @@
<text class="item-title">请及时添加服务顾问的企业微信</text>
<view class="code">
<image src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/details/QR_Code.png"
<image :src="configMap.pet_order_qrcode &&
configMap.pet_order_qrcode.paramValueImage || qrcode"
mode="aspectFit"
:show-menu-by-longpress="true"
style="width: 260rpx; height:260rpx"/>
@ -58,14 +59,18 @@
<script>
import Kefu from '@/pages/common/kefu.vue'
import { mapState } from 'vuex'
export default {
data() {
return {
qrcode : 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/details/QR_Code.png'
};
},
components:{
Kefu
Kefu,
},
computed: {
...mapState(['configMap'])
},
methods: {
goHome() {


+ 1
- 1
utils/getUrl.js View File

@ -1,4 +1,4 @@
let current ="develop";
let current ="trial";
const accountInfo = wx.getAccountInfoSync();
// current = accountInfo.miniProgram.envVersion;


Loading…
Cancel
Save