处理兼容性问题

h5
wangdong 4 months ago
parent 9807473c17
commit cf770b2f7a
  1. 1
      main.js
  2. 4
      manifest.json
  3. 8
      node_modules/.vite/deps/_metadata.json
  4. 4
      node_modules/.vite/deps/lodash.js
  5. 2
      node_modules/.vite/deps/lodash.js.map
  6. 4
      node_modules/.vite/deps/package.json
  7. 4
      node_modules/.vite/deps/weixin-js-sdk.js
  8. 2
      node_modules/.vite/deps/weixin-js-sdk.js.map
  9. 6
      pages/activity/newPeople.vue
  10. 6
      pages/goods/detail.vue
  11. 9
      pages/index/index.vue
  12. 33
      pages/login/index.vue
  13. 12
      pages/squareDynamic/index.vue
  14. 28
      pages/user/index.vue

@ -22,7 +22,6 @@ export function createApp() {
app.config.globalProperties.$checkModule = checkModuleKey
app.config.globalProperties.$checkModules = checkModules
app.config.globalProperties.$picUrl = picUrl
console.log(wx.getExtConfigSync())
// 使用 uView UI
app.use(uView)

@ -1,6 +1,6 @@
{
"name" : "零售商城",
"appid" : "__UNI__B5412AE",
"appid" : "__UNI__B215990",
"description" : "零售商城是一款提供家电,3C数码,家装建材为一体的批发采购平台,一站式解决找货方案,简化采购流程",
"versionName" : "1.0.0",
"versionCode" : 1,
@ -123,7 +123,7 @@
"optimization" : {
"subPackages" : true
},
"embeddedAppIdList": ["wx014ad2ef80a147a7"],
"embeddedAppIdList" : [ "wx014ad2ef80a147a7" ],
"requiredPrivateInfos" : [ "chooseAddress", "getLocation" ]
},
"mp-alipay" : {

@ -1,17 +1,17 @@
{
"hash": "21e32e26",
"browserHash": "4c6f45ce",
"hash": "cb8f5915",
"browserHash": "2f3b9bbd",
"optimized": {
"weixin-js-sdk": {
"src": "../../weixin-js-sdk/index.js",
"file": "weixin-js-sdk.js",
"fileHash": "f4f72ebd",
"fileHash": "71edba62",
"needsInterop": true
},
"lodash": {
"src": "../../lodash/lodash.js",
"file": "lodash.js",
"fileHash": "3c4dd255",
"fileHash": "d1026310",
"needsInterop": true
}
},

@ -2,9 +2,9 @@ import {
__commonJS
} from "./chunk-RSJERJUL.js";
// ../../../../proj/yanzong_qianduan/node_modules/lodash/lodash.js
// D:/My Proj/yanzhong/yanzong_qianduan/node_modules/lodash/lodash.js
var require_lodash = __commonJS({
"../../../../proj/yanzong_qianduan/node_modules/lodash/lodash.js"(exports, module) {
"D:/My Proj/yanzhong/yanzong_qianduan/node_modules/lodash/lodash.js"(exports, module) {
(function() {
var undefined;
var VERSION = "4.17.21";

File diff suppressed because one or more lines are too long

@ -1,3 +1 @@
{
"type": "module"
}
{"type":"module"}

@ -2,9 +2,9 @@ import {
__commonJS
} from "./chunk-RSJERJUL.js";
// ../../../../proj/yanzong_qianduan/node_modules/weixin-js-sdk/index.js
// D:/My Proj/yanzhong/yanzong_qianduan/node_modules/weixin-js-sdk/index.js
var require_weixin_js_sdk = __commonJS({
"../../../../proj/yanzong_qianduan/node_modules/weixin-js-sdk/index.js"(exports, module) {
"D:/My Proj/yanzhong/yanzong_qianduan/node_modules/weixin-js-sdk/index.js"(exports, module) {
!function(e, n) {
module.exports = n(e);
}(typeof window === "object" && window, function(r, e) {

File diff suppressed because one or more lines are too long

@ -208,7 +208,13 @@
padding: 100rpx 0;
}
.newpeople {
// #ifdef MP-WEIXIN
background: url(https://www.royaum.com.cn/static/news/newPeople-bg.png) center 132rpx no-repeat;
// #endif
// #ifndef MP-WEIXIN
background: url(https://www.royaum.com.cn/static/news/newPeople-bg.png) center 88rpx no-repeat;
// #endif
background-size: 100% auto;
overflow: hidden;

@ -184,12 +184,6 @@
<view class="chosed">
<view class="title">发货</view>
<view class="info" v-html="promise_info">
<!-- <text v-if="goods.delivery_time==0">24小时内发货</text>
<text v-if="goods.delivery_time==2">72小时内发货</text>
<text v-if="goods.delivery_time==3">7天内发货</text>
<text v-if="goods.delivery_time==4">15天内发货</text>
<text v-if="goods.delivery_time==5">30天内发货</text>
<text v-if="goods.delivery_time==6">45天内发货</text> -->
</view>
</view>
<view class="chosed">

@ -641,7 +641,6 @@
tabbar: [],
curTabIndex: 0,
wxAppSetting: {},
storagePageIndex: '',
tabActiveColor: '',
navBgColor: '',
recommendPage: 1,
@ -1167,6 +1166,7 @@
//
getAuthorize() {
const _this = this
// #ifdef MP-WEIXIN
uni.authorize({
scope: 'scope.userLocation', //
success(res) {
@ -1195,6 +1195,10 @@
})
},
})
// #endif
// #ifndef MP-WEIXIN
_this.getAdressLocation()
// #endif
},
getAdressLocation() {
@ -1225,6 +1229,9 @@
fail: () => {
console.log("获取经纬度失败");
},
complete: (e) => {
console.log(e);
}
});
},
},

@ -1,5 +1,6 @@
<template>
<!-- <view class="login">
<!-- #ifndef MP-WEIXIN -->
<view class="login">
<view class="refund-navbar">
<u-navbar title="" :border-bottom="false" :background="background"></u-navbar>
</view>
@ -20,21 +21,23 @@
</view>
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId" :isNew='1'></mpWeiXinMobile>
<!-- <view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId" isNew='1'></mpWeiXinMobile>
</view>
<view class="" v-else style="
font-size: 28rpx;
color: #666;
text-align: center;
margin-top: 50rpx;
" @click="login">
font-size: 28rpx;
color: #666;
text-align: center;
margin-top: 50rpx;
" @click="login">
手机号快捷登录
</view>
</view> -->
</view> -->
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="login-box">
<view class="refund-navbar">
<u-navbar title="" :border-bottom="false" background="rgba(255, 233, 240, 1)"></u-navbar>
<u-navbar title="" :border-bottom="false" :background="{ background: 'rgba(255, 233, 240, 1)' }"></u-navbar>
</view>
<view class="login-logo">
<image :src="loginInfo.login_img" mode="widthFix"></image>
@ -47,10 +50,11 @@
同意<text @click="toTextPage(1)">用户服务协议</text><text @click="toTextPage(2)">隐私政策</text>
</view>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :isNew='2' :refereeId="refereeId"></mpWeiXinMobile>
<mpWeiXinMobile isNew='2' :refereeId="refereeId"></mpWeiXinMobile>
</view>
<view class="fd fd-on" v-else @click="login">登录</view>
</view>
<!-- #endif -->
</template>
<script>
@ -86,6 +90,11 @@
loginInfo:{}
};
},
watch: {
isCheckout() {
console.log(this.isCheckout);
},
},
onLoad(o) {
//
const scene = getSceneData(o)

@ -141,12 +141,16 @@
if (sys.windowTop) {
this.windowHeight += sys.windowTop;
}
},
onReady() {
const query = uni.createSelectorQuery().in(this);
query.select('#publish').boundingClientRect(data => {
this.width = data.width;
this.height = data.height;
this.offsetWidth = data.width / 2;
this.offsetHeight = data.height / 2;
if (data) {
this.width = data.width;
this.height = data.height;
this.offsetWidth = data.width / 2;
this.offsetHeight = data.height / 2;
}
}).exec();
},
onShow() {

@ -686,7 +686,6 @@
</view>
</template>
<script>
const ctx = uni.createCanvasContext('myCanvas')
import {
checkLogin
} from '@/core/app'
@ -737,7 +736,8 @@
this.goodsRecommend = [];
this.getSuggest()
this.is_show_open_shop_buttun = uni.getStorageSync("Store").storeInfo.is_show_open_shop_buttun
this.setting = uni.getStorageSync('Setting').customer
this.setting = uni.getStorageSync('Setting').customer;
this.ctx = uni.createCanvasContext('myCanvas')
},
onShow(options) {
if (uni.getStorageSync("userInfo").user_id) {
@ -800,7 +800,7 @@
},
createImge(index, w, h) {
const that = this;
ctx.fillRect(0, 0, w / that.devicePixelRatio, h / that.devicePixelRatio);
this.ctx.fillRect(0, 0, w / that.devicePixelRatio, h / that.devicePixelRatio);
uni.downloadFile({
url: index == 1 ? 'https://www.royaum.com.cn/static/1@2x.png' :
'https://www.royaum.com.cn/static/2@2x.png',
@ -810,37 +810,37 @@
'https://www.royaum.com.cn/static/2@2x.png')
console.log(res.tempFilePath)
console.log("that.qrcode", that.qrcode)
ctx.beginPath(); //
ctx.drawImage(res.tempFilePath, 0, 0, w / that.devicePixelRatio, h / that
this.ctx.beginPath(); //
this.ctx.drawImage(res.tempFilePath, 0, 0, w / that.devicePixelRatio, h / that
.devicePixelRatio);
uni.downloadFile({
url: that.qrcode,
success: (res2) => {
ctx.save(); //
this.ctx.save(); //
if (index == 1) {
ctx.arc(162 / that.devicePixelRatio / 2 + 468 / that
this.ctx.arc(162 / that.devicePixelRatio / 2 + 468 / that
.devicePixelRatio,
162 / that.devicePixelRatio / 2 + 480 / that
.devicePixelRatio,
162 / that.devicePixelRatio / 2, 0, Math.PI * 2, false);
ctx.clip();
ctx.drawImage(res2.tempFilePath, 468 / that.devicePixelRatio, 480 /
this.ctx.clip();
this.ctx.drawImage(res2.tempFilePath, 468 / that.devicePixelRatio, 480 /
that.devicePixelRatio, 162 / that.devicePixelRatio, 162 /
that
.devicePixelRatio);
} else {
ctx.arc(162 / that.devicePixelRatio / 2 + 275 / that
this.ctx.arc(162 / that.devicePixelRatio / 2 + 275 / that
.devicePixelRatio,
162 / that.devicePixelRatio / 2 + 635 / that
.devicePixelRatio,
162 / that.devicePixelRatio / 2, 0, Math.PI * 2, false);
ctx.clip();
ctx.drawImage(res2.tempFilePath, 275 / that.devicePixelRatio, 635 /
this.ctx.clip();
this.ctx.drawImage(res2.tempFilePath, 275 / that.devicePixelRatio, 635 /
that.devicePixelRatio, 162 / that.devicePixelRatio, 162 /
that
.devicePixelRatio);
}
ctx.draw()
this.ctx.draw()
uni.canvasToTempFilePath({
width: w / that.devicePixelRatio,
height: h / that.devicePixelRatio,
@ -855,7 +855,7 @@
that.qrcode2 = res.tempFilePath
console.log(that.qrcode2)
}
ctx.clearRect(0, 0, w, h);
this.ctx.clearRect(0, 0, w, h);
}
})

Loading…
Cancel
Save