第一次上传

This commit is contained in:
Ls
2026-03-09 16:39:03 +08:00
commit 3d9efaf15c
924 changed files with 326227 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
{
"name" : "科讯代购",
"appid" : "__UNI__06C2D6A",
"description" : "",
"versionName" : "1.0.8",
"versionCode" : 108,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"compatible" : {
"ignoreVersion" : true //true表示忽略版本检查提示框HBuilderX1.9.0及以上版本支持
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {
"Barcode" : {},
"Maps" : {},
"Geolocation" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"minSdkVersion" : 25,
"targetSdkVersion" : 25,
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
/* ios打包配置 */
"ios" : {
"idfa" : false,
"dSYMs" : false
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {},
"maps" : {
"amap" : {
"name" : "amapZAvZjTHj",
"appkey_ios" : "3caf9e6f01b0085be1e75e0d0e281fe7",
"appkey_android" : "3caf9e6f01b0085be1e75e0d0e281fe7"
}
},
"geolocation" : {
"amap" : {
"name" : "amapZAvZjTHj",
"__platform__" : [ "android" ],
"appkey_ios" : "",
"appkey_android" : "3caf9e6f01b0085be1e75e0d0e281fe7"
}
}
},
"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" : "wx48366fb1ba81d1ea",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取用户地址展示附近商家"
}
},
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]
},
"mp-alipay" : {
"usingComponents" : true,
"appid" : "2021005103643678"
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "7DIBZ-K4HCJ-ZR2FE-FOOOP-SALFT-RLFYW"
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,206 @@
<template>
<view>
<view class="" style=" width: 100%; height: 310rpx; background: linear-gradient(45deg,#FF6B35,#FF8B65);">
</view>
<view class=""
style=" margin: 0 30rpx; margin-top: -110rpx; padding: 30rpx; background-color: #fff; border-radius: 20rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="" style="font-size: 36rpx; font-weight: 600;">
大大怪将军
</view>
<view @click="Service.GoPage('/pages/userFunc/setData')" class="">
<up-icon name="arrow-right" size="18" color='#333333' :bold='true'></up-icon>
</view>
</view>
<view class=""
style="display: flex; align-items: center; margin-top: 40rpx; justify-content: space-between; ">
<view @click="Service.GoPage('/pages/userFunc/integration')" class=""
style=" width: 48%; display: flex;align-items: center;">
<view class=""
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
<img :src="Service.GetIconImg('/static/index/user/code.png')"
style="width: 50rpx; height: 50rpx; " alt="" />
</view>
<view class=""
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
2758积分
</view>
<view class="">
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
</view>
</view>
<view class="" @click="Service.GoPage('/pages/userFunc/trade?type='+1)"
style=" width: 48%; display: flex;align-items: center;">
<view class=""
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
<img :src="Service.GetIconImg('/static/index/user/list.png')"
style="width: 50rpx; height: 50rpx; " alt="" />
</view>
<view class=""
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
交易记录
</view>
<view class="">
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
</view>
</view>
</view>
</view>
<!-- 管理中心 -->
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
<text class="section-title" style="font-weight: 600;">商家管理中心</text>
<view class="service-grid">
<view class="service-item" @click="gotopage(controItem)" v-for="(controItem,serviceIndex) in controList"
:key="serviceIndex">
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
<image :src="Service.GetIconImg(controItem.img)" class="service-icon"></image>
</view>
<text class="service-text">{{controItem.name}}</text>
</view>
</view>
</view>
<!-- 个人服务 -->
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
<text class="section-title" style="font-weight: 600;">我的服务</text>
<view class=""
style=" margin-top: 40rpx; display: flex; align-items: center; justify-content: space-between;">
<view style=" width: 45%; display: flex; align-items: center;" @click="serviceFunc(myServiceItem,serviceIndex)"
v-for="(myServiceItem,serviceIndex) in myServiceList" :key="serviceIndex">
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
<image :src="Service.GetIconImg(myServiceItem.img)" class="service-icon"></image>
</view>
<text style="margin-left: 30rpx; font-size: 28rpx; font-weight: 600; ">{{myServiceItem.name}}</text>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref } from "vue";
let controList = ref([
{
img: '/static/index/user/analysis.png',
name: '数据统计',
path: '/pages/userFunc/statistics'
},
{
img: '/static/index/user/shop.png',
name: '商品管理',
path: '/pages/goods/goodsContro'
},
{
img: '/static/index/user/trad.png',
name: '交易明细',
path: '/pages/userFunc/trade?type=' + 0
},
{
img: '/static/index/user/store.png',
name: '编辑店铺',
path: '/pages/userFunc/editStore'
}
])
let myServiceList = ref([
{
img: '/static/index/user/request.png',
name: '客服咨询',
path: ''
},
{
img: '/static/index/user/set.png',
name: '系统设置',
path: '/pages/userFunc/set'
}
])
onLoad(() => {
});
onShow(() => {
});
const gotopage = (item : any) => {
if (item.path) {
Service.GoPage(item.path)
}
}
const serviceFunc=(item:any,index:any)=>{
if(index==0){
console.log('跳转到企业微信');
// wx.openCustomerServiceChat({
// extInfo: { url: 'https://work.weixin.qq.com/kfid/kfca1bed1765b5dfbb2' },
// corpId: 'wwb1123fbb286554ab',
// success(res) { },
// fail(err) {
// console.log(err, '失败')
// // 失败回调
// }
// })
}else{
Service.GoPage(item.path)
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
/* 服务区域通用样式 */
.service-section,
.value-added-section {
background-color: #fff;
margin: 20rpx 0rpx;
overflow: hidden;
padding: 20rpx;
}
/* 服务网格 */
.service-grid {
display: flex;
flex-wrap: wrap;
padding: 10rpx 20rpx 30rpx;
}
.service-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx 0;
}
.service-icon {
width: 40rpx;
height: 40rpx;
}
.service-text {
font-size: 24rpx;
color: #666;
margin-top: 16rpx;
text-align: center;
}
</style>

View File

@@ -0,0 +1,214 @@
// #ifdef APP-NVUE
import {
sleep,
getImageInfo,
isBase64,
networkReg
} from './utils';
const dom = weex.requireModule('dom')
import {
version
} from '../../package.json'
export default {
data() {
return {
tempFilePath: [],
isInitFile: false,
osName: uni.getSystemInfoSync().osName
}
},
methods: {
getParentWeith() {
return new Promise(resolve => {
dom.getComponentRect(this.$refs.limepainter, (res) => {
this.parentWidth = Math.ceil(res.size.width)
this.canvasWidth = this.canvasWidth || this.parentWidth || 300
this.canvasHeight = res.size.height || this.canvasHeight || 150
resolve(res.size)
})
})
},
onPageFinish() {
this.webview = this.$refs.webview
this.webview.evalJS(`init(${this.dpr})`)
},
onMessage(e) {
const res = e.detail.data[0] || null;
if (res.event) {
if (res.event == 'inited') {
this.inited = true
}
if (res.event == 'fail') {
this.$emit('fail', res)
}
if (res.event == 'layoutChange') {
const data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data
this.canvasWidth = Math.ceil(data.width);
this.canvasHeight = Math.ceil(data.height);
}
if (res.event == 'progressChange') {
this.progress = res.data * 1
}
if (res.event == 'file') {
this.tempFilePath.push(res.data)
if (this.tempFilePath.length > 7) {
this.tempFilePath.shift()
}
return
}
if (res.event == 'success') {
if (res.data) {
this.tempFilePath.push(res.data)
if (this.tempFilePath.length > 8) {
this.tempFilePath.shift()
}
if (this.isCanvasToTempFilePath) {
this.setFilePath(this.tempFilePath.join(''), {
isEmit: true
})
}
} else {
this.$emit('fail', 'canvas no data')
}
return
}
this.$emit(res.event, JSON.parse(res.data));
} else if (res.file) {
this.file = res.data;
} else {
console.info(res[0])
}
},
getWebViewInited() {
if (this.inited) return Promise.resolve(this.inited);
return new Promise((resolve) => {
this.$watch(
'inited',
async val => {
if (val) {
resolve(val)
}
}, {
immediate: true
}
);
})
},
getTempFilePath() {
if (this.tempFilePath.length == 8) return Promise.resolve(this.tempFilePath)
return new Promise((resolve) => {
this.$watch(
'tempFilePath',
async val => {
if (val.length == 8) {
resolve(val.join(''))
}
}, {
deep: true
}
);
})
},
getWebViewDone() {
if (this.progress == 1) return Promise.resolve(this.progress);
return new Promise((resolve) => {
this.$watch(
'progress',
async val => {
if (val == 1) {
this.$emit('done')
this.done = true
this.runTask()
resolve(val)
}
}, {
immediate: true
}
);
})
},
async render(args) {
try {
await this.getSize(args)
const {
width
} = args.css || args
if (!width && this.parentWidth) {
Object.assign(args, {
width: this.parentWidth
})
}
const newNode = await this.calcImage(args);
await this.getWebViewInited()
this.webview.evalJS(`source(${JSON.stringify(newNode)})`)
await this.getWebViewDone()
await sleep(this.afterDelay)
if (this.isCanvasToTempFilePath) {
const params = {
fileType: this.fileType,
quality: this.quality
}
this.webview.evalJS(`save(${JSON.stringify(params)})`)
}
return Promise.resolve()
} catch (e) {
this.$emit('fail', e)
}
},
async calcImage(args) {
let node = JSON.parse(JSON.stringify(args))
const urlReg = /url\((.+)\)/
const {
backgroundImage
} = node.css || {}
const isBG = backgroundImage && urlReg.exec(backgroundImage)[1]
const url = node.url || node.src || isBG
if (['text', 'qrcode'].includes(node.type)) {
return node
}
if ((node.type === "image" || isBG) && url && !isBase64(url) && (this.osName == 'ios' || !networkReg
.test(url))) {
let {
path
} = await getImageInfo(url, true)
if (isBG) {
node.css.backgroundImage = `url(${path})`
} else {
node.src = path
}
} else if (node.views && node.views.length) {
for (let i = 0; i < node.views.length; i++) {
node.views[i] = await this.calcImage(node.views[i])
}
}
return node
},
async canvasToTempFilePath(args = {}) {
if (!this.inited) {
return this.$emit('fail', 'no init')
}
this.tempFilePath = []
if (args.fileType == 'jpg') {
args.fileType = 'jpeg'
}
this.webview.evalJS(`save(${JSON.stringify(args)})`)
try {
let tempFilePath = await this.getTempFilePath()
tempFilePath = await this.setFilePath(tempFilePath, args)
args.success({
errMsg: "canvasToTempFilePath:ok",
tempFilePath
})
} catch (e) {
console.log('e', e)
args.fail({
error: e
})
}
}
}
}
// #endif