Compare commits

...

4 Commits

Author SHA1 Message Date
tianyi d565ea287d 1 2 weeks ago
tianyi c067af7243 1 2 weeks ago
tianyi 70c0b94bf0 1 2 weeks ago
tianyi 61efb7aed0 1 2 weeks ago
  1. 2
      manifest.json
  2. 11
      pages.json
  3. 2
      pages/login/login.vue
  4. 58
      pages/shop/addGoods.vue
  5. 4605
      pages/worker/index.vue

2
manifest.json

@ -2,7 +2,7 @@
"name" : "半径里商家端", "name" : "半径里商家端",
"appid" : "__UNI__F1A1D03", "appid" : "__UNI__F1A1D03",
"description" : "", "description" : "",
"versionName" : "1.2.3", "versionName" : "1.2.4",
"versionCode" : 1, "versionCode" : 1,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

11
pages.json

@ -317,8 +317,17 @@
"bounce": "none" "bounce": "none"
} }
} }
},
{
"path": "pages/worker/index",
"style": {
"navigationBarTitleText": "配送员首页",
"navigationStyle": "custom",
"app-plus": {
"bounce": "none"
}
}
} }
], ],
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {

2
pages/login/login.vue

@ -344,7 +344,7 @@
uni.setStorageSync("isShop",true) uni.setStorageSync("isShop",true)
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: '../index/index' url: '../worker/index'
}) })
}, 200) }, 200)
uni.showToast('登录成功', 2000, true) uni.showToast('登录成功', 2000, true)

58
pages/shop/addGoods.vue

@ -267,7 +267,6 @@
* @param {Object} e {html,text} 内容的html文本和text文本 * @param {Object} e {html,text} 内容的html文本和text文本
*/ */
inputOver(e) { inputOver(e) {
//
this.productIntro = e this.productIntro = e
}, },
@ -276,7 +275,6 @@
* @param {Object} e {html,text} 内容的html文本和text文本 * @param {Object} e {html,text} 内容的html文本和text文本
*/ */
overMax(e) { overMax(e) {
//
}, },
/** /**
@ -286,9 +284,7 @@
* @tutorial 相关api https://uniapp.dcloud.net.cn/api/media/editor-context.html * @tutorial 相关api https://uniapp.dcloud.net.cn/api/media/editor-context.html
*/ */
initEditor(editor) { initEditor(editor) {
this.editorIns = editor // this.editorIns = editor
//
}, },
/** /**
* 直接运行示例工程插入图片无法正常显示的看这里 * 直接运行示例工程插入图片无法正常显示的看这里
@ -308,7 +304,7 @@
// tempFilePath // tempFilePath
editorCtx.insertImage({ editorCtx.insertImage({
src: tempFiles[0].tempFilePath, src: tempFiles[0].tempFilePath,
width: '80%', // 100%便 width: '80%',
success: function() {} success: function() {}
}) })
// #endif // #endif
@ -316,35 +312,10 @@
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN
editorCtx.insertImage({ editorCtx.insertImage({
src: tempFiles[0].path, src: tempFiles[0].path,
width: '80%', // 100%便 width: '80%',
success: function() {} success: function() {}
}) })
// #endif // #endif
/**
* 使用 uniCloud.uploadFile 上传图片的示例方法可适用多选上传
* 正式开发环境中请将上面 本地临时插入图片预览 注释后模仿以下写法
*/
// tempFiles.forEach(async (item) => {
// uni.showLoading({
// title: '',
// mask: true
// })
// let upfile = await uniCloud.uploadFile({
// filePath: item.path,
// // policy_does_not_allow_file_overwrite
// // cloudPath / cloudstorage
// cloudPath: `cloudstorage/${item.name}`,
// cloudPathAsRealPath: true
// })
// editorCtx.insertImage({
// src: upfile.fileID,
// width: '80%', // 100%便
// success: function () {
// uni.hideLoading()
// }
// })
// })
}, },
// //
goGategoryLow() { goGategoryLow() {
@ -369,7 +340,6 @@
this.typeItem = res.result[0] this.typeItem = res.result[0]
this.formData.categoryId = this.typeItem.id this.formData.categoryId = this.typeItem.id
} }
} }
} else { } else {
uni.showToast({ uni.showToast({
@ -386,7 +356,7 @@
// this.$refs.form.validate((valid) => { // this.$refs.form.validate((valid) => {
// if (valid) { // if (valid) {
if (this.modalType == 0) { if (this.modalType == 0) {
// id
delete this.formData.id; delete this.formData.id;
if(this.formData.isMoreBuy != 1){ if(this.formData.isMoreBuy != 1){
this.formData.isMoreBuy = 0 this.formData.isMoreBuy = 0
@ -454,7 +424,7 @@
}, },
guigeSubmit(){ guigeSubmit(){
if(this.modalclassType == 'shuxing'){ if(this.modalclassType == 'shuxing'){
// canbuy
if(this.typeToAttrName){ if(this.typeToAttrName){
this.canbuyMap[this.typeToAttrName] = parseInt(this.currentCanbuy) || 1 this.canbuyMap[this.typeToAttrName] = parseInt(this.currentCanbuy) || 1
} }
@ -462,7 +432,7 @@
let parentName = this.attrValueArr[i].parentName let parentName = this.attrValueArr[i].parentName
let canbuyVal = parseInt(this.canbuyMap[parentName]) || 1 let canbuyVal = parseInt(this.canbuyMap[parentName]) || 1
if(this.formData.attributeList1.size == 0){ if(this.formData.attributeList1.size == 0){
//set has get
let data = { let data = {
title:[], title:[],
canbuy: canbuyVal canbuy: canbuyVal
@ -545,7 +515,7 @@
}, },
edit(v) { edit(v) {
this.modalType = 1; this.modalType = 1;
// null""
for (let attr in v) { for (let attr in v) {
if (v[attr] == null) { if (v[attr] == null) {
v[attr] = ""; v[attr] = "";
@ -556,7 +526,6 @@
this.formData = data; this.formData = data;
// attributeListstring
let attrObj = this.formData.attributeList let attrObj = this.formData.attributeList
if (typeof attrObj === 'string' && attrObj !== '') { if (typeof attrObj === 'string' && attrObj !== '') {
attrObj = JSON.parse(attrObj) attrObj = JSON.parse(attrObj)
@ -566,7 +535,6 @@
} }
this.formData.attributeList1 = new Map(Object.entries(attrObj)); this.formData.attributeList1 = new Map(Object.entries(attrObj));
// attributeListPricestring
let priceArr = this.formData.attributeListPrice let priceArr = this.formData.attributeListPrice
if (typeof priceArr === 'string' && priceArr !== '') { if (typeof priceArr === 'string' && priceArr !== '') {
priceArr = JSON.parse(priceArr) priceArr = JSON.parse(priceArr)
@ -576,7 +544,6 @@
} }
this.formData.attributeListPrice = priceArr this.formData.attributeListPrice = priceArr
// canbuyMapcanbuy1
this.canbuyMap = {} this.canbuyMap = {}
this.attrValueArr = [] this.attrValueArr = []
this.formData.attributeList1.forEach((value, key) => { this.formData.attributeList1.forEach((value, key) => {
@ -589,9 +556,8 @@
}) })
} }
}); });
// attributeListPricespecValueArr
this.specValueArr = JSON.parse(JSON.stringify(this.formData.attributeListPrice))
this.specValueArr = JSON.parse(JSON.stringify(this.formData.attributeListPrice))
this.formData.sellTime = this.formData.sellBeginTime != '' ? 1 : 0 this.formData.sellTime = this.formData.sellBeginTime != '' ? 1 : 0
this.modalVisible = true; this.modalVisible = true;
@ -610,7 +576,7 @@
} }
} }
}else{ }else{
//guige
if(this.categorySonData[index].checked == true){ if(this.categorySonData[index].checked == true){
this.specValueArr.push(this.categorySonData[index]) this.specValueArr.push(this.categorySonData[index])
}else{ }else{
@ -625,7 +591,7 @@
}, },
// //
clickLeftBtn(index) { clickLeftBtn(index) {
// canbuy
if(this.typeToAttrName){ if(this.typeToAttrName){
this.canbuyMap[this.typeToAttrName] = parseInt(this.currentCanbuy) || 1 this.canbuyMap[this.typeToAttrName] = parseInt(this.currentCanbuy) || 1
} }
@ -638,7 +604,7 @@
} }
this.categoryIndex = index this.categoryIndex = index
this.typeToAttrName = this.categoryData[this.categoryIndex].title this.typeToAttrName = this.categoryData[this.categoryIndex].title
// canbuy
this.currentCanbuy = this.canbuyMap[this.typeToAttrName] || 1 this.currentCanbuy = this.canbuyMap[this.typeToAttrName] || 1
this.getCateGorySon(this.categoryData[this.categoryIndex].id) this.getCateGorySon(this.categoryData[this.categoryIndex].id)
}, },
@ -674,7 +640,7 @@
that.categoryData[i].parentId = false that.categoryData[i].parentId = false
} }
} }
//parent
that.typeToAttrName = res.result[that.categoryIndex].title that.typeToAttrName = res.result[that.categoryIndex].title
// canbuy // canbuy
that.currentCanbuy = that.canbuyMap[that.typeToAttrName] || 1 that.currentCanbuy = that.canbuyMap[that.typeToAttrName] || 1

4605
pages/worker/index.vue

File diff suppressed because it is too large
Loading…
Cancel
Save