This commit is contained in:
hetian
2024-03-12 14:18:34 +08:00
14 changed files with 192 additions and 35 deletions

View File

@@ -2,6 +2,10 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "remote"
},
"default" :
{
"launchtype" : "remote"

View File

@@ -186,6 +186,11 @@
@import 'static/iconfont/iconfont.css';
@import 'static/css/guildford.css';
@import 'static/css/style.scss';
// #ifdef APP
@import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconfont-app.css';
// #endif
/* 条件编译仅在H5平台生效 */
// #ifdef H5

View File

@@ -1,12 +1,23 @@
let domain = 'http://127.0.0.1:8081'
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
//移动端商城API
let domain = 'https://api.front.javademo.hdq.xbdzz.cn'
module.exports = {
// 请求域名 格式: https://您的域名
HTTP_REQUEST_URL:domain,
// #ifdef MP
HTTP_REQUEST_URL: domain,
// #endif
HTTP_ADMIN_URL:'http://127.0.0.1:8080', //PC后台的API请求地址上传图片用
HTTP_ADMIN_URL:'https://api.admin.javademo.hdq.xbdzz.cn', //PC后台的API请求地址上传图片用,影响h5上传头像
// #ifdef H5
//H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,

View File

@@ -17,10 +17,20 @@ function prePage(){
export const toLogin = Debounce(_toLogin,800)
export function _toLogin(push, pathLogin) {
console.log(43333); //修改
store.commit("LOGOUT");
let path = prePage();
let login_back_url = Cache.get(BACK_URL);
// #ifdef APP //修改
uni.navigateTo({
url: '/pages/users/login/index'
})
return
// #endif
// #ifdef H5
// path = location.href;
path = location.pathname + location.search;

View File

@@ -1,6 +1,6 @@
{
"name" : "crmeb",
"appid" : "__UNI__E8BDBA5",
"name" : "何天",
"appid" : "__UNI__E0D9AB1",
"description" : "crmeb商城",
"versionName" : "1.0.0",
"versionCode" : 1001,
@@ -16,7 +16,13 @@
"delay" : 0
},
/* */
"modules" : {},
"modules" : {
"Share" : {},
"VideoPlayer" : {},
"OAuth" : {},
"Payment" : {},
"Geolocation" : {}
},
/* */
"distribute" : {
/* android */
@@ -31,35 +37,92 @@
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : []
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
/* ios */
"ios" : {
"idfa" : false
"idfa" : false,
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {},
"icons" : {}
"sdkConfigs" : {
"ad" : {},
"geolocation" : {
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "",
"appkey_android" : "2D2BZ-G5635-3JDIH-QY5R3-HI43Z-ARFNB"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wxe2fc3c6a514c613a",
"UniversalLinks" : ""
}
},
"share" : {
"weixin" : {
"appid" : "wxe2fc3c6a514c613a",
"UniversalLinks" : ""
}
},
"oauth" : {
"weixin" : {
"appid" : "wxe2fc3c6a514c613a",
"UniversalLinks" : ""
}
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "123",
"appid" : "wxd29e5ba4ccbcca2f",
"setting" : {
"urlCheck" : true,
"minified" : true,

View File

@@ -1,7 +1,7 @@
<template>
<view>
<view class="page-index" :class="{'bgf':navIndex >0}">
<!-- #ifdef H5 -->
<!-- #ifdef H5||APP -->
<view class="header">
<view class="serch-wrapper flex">
<view class="logo">
@@ -13,21 +13,6 @@
</view>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<view class="mp-header">
<view class="sys-head" :style="{ height: statusBarHeight }"></view>
<view class="serch-box" style="height: 40px;">
<view class="serch-wrapper flex">
<view class="logo">
<image :src="logoUrl" mode=""></image>
</view>
<navigator url="/pages/goods_search/index" class="input" hover-class="none"><text
class="iconfont icon-xiazai5"></text>
搜索商品</navigator>
</view>
</view>
</view>
<!-- #endif -->
<!-- 首页展示 -->
<view class="page_content" :style="'margin-top:'+(marTop)+'px;'" v-if="navIndex == 0">
<view class="mp-bg"></view>
@@ -247,6 +232,7 @@
},
data() {
return {
pageHeight: 0,
loaded: false,
loading: false,
isAuto: false, //没有授权的不会自动授权
@@ -1006,14 +992,14 @@
}
}
/* #ifdef MP */
/* #ifdef MP||APP */
.mp-header {
z-index: 999;
position: fixed;
left: 0;
top: 0;
width: 100%;
/* #ifdef H5 */
/* #ifdef H5||APP */
padding-bottom: 20rpx;
/* #endif */
background-color: $theme-color;
@@ -1032,7 +1018,7 @@
.input {
display: flex;
align-items: center;
/* #ifdef MP */
/* #ifdef MP||APP */
width: 305rpx;
/* #endif */
height: 50rpx;

View File

@@ -408,6 +408,16 @@
if (backUrl.indexOf('/pages/users/login/index') !== -1) {
backUrl = '/pages/index/index';
}
// #ifdef APP
uni.reLaunch({
url: "/pages/index/index"
});
return
// #endif
console.log(69999);
console.log(backUrl);
uni.reLaunch({
url: backUrl
});

View File

@@ -949,7 +949,7 @@
mark: that.mark,
storeId: that.system_store.id || 0,
shippingType: that.$util.$h.Add(that.shippingType, 1),
payChannel: that.payChannel
payChannel: that.payChannel||'weixinh5'
};
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice))

View File

@@ -1,5 +1,8 @@
<template>
<view>
<!-- #ifdef APP-->
<view class='status'></view>
<!-- #endif -->
<form @submit="formSubmit" report-submit='true'>
<view class='addAddress pad30'>
<view class='list borRadius14'>
@@ -575,4 +578,12 @@
position: absolute;
right:0;
}
.status{
display: flex;
width: 750rpx;
// background-color: #E93323;
height: var(--status-bar-height);
}
</style>

View File

@@ -1,5 +1,8 @@
<template>
<view>
<!-- #ifdef APP-->
<view class='status_1'></view>
<!-- #endif -->
<view class='line'>
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
</view>
@@ -44,9 +47,16 @@
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
<!-- #ifdef H5-->
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view v-if="this.$wechat.isWeixin()" class='addressBnt wxbnt' @click='getAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
<!-- #ifdef APP-->
<view class='addressBnt on bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<!-- #endif -->
</view>
<!-- #ifdef MP -->
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
@@ -458,4 +468,10 @@
.footer .addressBnt.wxbnt {
background-color: #fe960f;
}
.status_1{
display: flex;
width: 750rpx;
// background-color: #E93323;
height: var(--status-bar-height);
}
</style>

29
app/project.config.json Normal file
View File

@@ -0,0 +1,29 @@
{
"appid": "wxd29e5ba4ccbcca2f",
"compileType": "miniprogram",
"libVersion": "3.1.4",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"condition": false
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

View File

@@ -0,0 +1,8 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "app",
"setting": {
"compileHotReLoad": true
},
"libVersion": "3.1.4"
}

View File

@@ -8,7 +8,7 @@ import Cache from "@/utils/cache";
export function silenceBindingSpread() {
//#ifdef H5
//#ifdef H5 || APP
let puid = Cache.get('spread');
//#endif

View File

@@ -33,6 +33,10 @@ function baseRequest(url, method, data, {
}
if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
return new Promise((reslove, reject) => {
console.log(4333222);
console.log(Url);
Url=HTTP_REQUEST_URL||'http://api.front.hdq.xbdzz.cn'
console.log( Url + '/api/front/' + url);
uni.request({
url: Url + '/api/front/' + url,
method: method || 'GET',